diff --git a/MG5aMC/mg5amcnlo b/MG5aMC/mg5amcnlo index a7f4f9e10c..fe0bb0b36c 160000 --- a/MG5aMC/mg5amcnlo +++ b/MG5aMC/mg5amcnlo @@ -1 +1 @@ -Subproject commit a7f4f9e10c7b632f872409b323f990bb46c46b00 +Subproject commit fe0bb0b36c3c195bfefc66016a78339ca7a11bd5 diff --git a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/launch_plugin.py b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/launch_plugin.py index 0924927785..ba08c10340 100644 --- a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/launch_plugin.py +++ b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/launch_plugin.py @@ -33,7 +33,7 @@ def compile(self, *args, **opts): if 'cwd' in opts and os.path.basename(opts['cwd']) == 'Source': path = pjoin(opts['cwd'], 'make_opts') common_run_interface.CommonRunCmd.update_make_opts_full(path, - {'FPTYPE': self.run_card['floating_type'] }) + {'override FPTYPE': self.run_card['floating_type'] }) misc.sprint('FPTYPE checked') cudacpp_supported_backends = [ 'fortran', 'cuda', 'hip', 'cpp', 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z', 'cppauto' ] if args and args[0][0] == 'madevent' and hasattr(self, 'run_card'): @@ -76,7 +76,7 @@ def reset_makeopts(self, old_value, new_value, name): if not hasattr(self, 'path'): raise Exception if name == 'floating_type': - common_run_interface.CommonRunCmd.update_make_opts_full({'FPTYPE': new_value}) + common_run_interface.CommonRunCmd.update_make_opts_full({'override FPTYPE': new_value}) else: raise Exception Sourcedir = pjoin(os.path.dirname(os.path.dirname(self.path)), 'Source') 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 87aa648dd2..49b928db67 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 @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: S. Roiser (Nov 2021) for the MG5aMC CUDACPP plugin. -// Further modified by: S. Roiser, J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2021-2025) for the MG5aMC CUDACPP plugin. #ifndef BRIDGE_H #define BRIDGE_H 1 @@ -255,11 +255,15 @@ namespace mg5amcCpu throw std::logic_error( "Bridge constructor: FIXME! cannot choose gputhreads" ); // this should never happen! m_gpublocks = m_nevt / m_gputhreads; } +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Instantiate device Bridge (nevt=" << m_nevt << ", gpublocks=" << m_gpublocks << ", gputhreads=" << m_gputhreads << ", gpublocks*gputhreads=" << m_gpublocks * m_gputhreads << ")" << std::endl; +#endif m_pmek.reset( new MatrixElementKernelDevice( m_devMomentaC, m_devGs, m_devRndHel, m_devRndCol, m_devChannelIds, m_devMEs, m_devSelHel, m_devSelCol, m_gpublocks, m_gputhreads ) ); #else +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Instantiate host Bridge (nevt=" << m_nevt << ")" << std::endl; +#endif m_pmek.reset( new MatrixElementKernelHost( m_hstMomentaC, m_hstGs, m_hstRndHel, m_hstRndCol, m_hstChannelIds, m_hstMEs, m_hstSelHel, m_hstSelCol, m_nevt ) ); #endif // MGONGPUCPP_GPUIMPL // Create a process object, read param card and set parameters @@ -290,8 +294,10 @@ namespace mg5amcCpu throw std::runtime_error( "Bridge: gpublocks*gputhreads must equal m_nevt in set_gpugrid" ); m_gpublocks = gpublocks; m_gputhreads = gputhreads; +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Set grid in Bridge (nevt=" << m_nevt << ", gpublocks=" << m_gpublocks << ", gputhreads=" << m_gputhreads << ", gpublocks*gputhreads=" << m_gpublocks * m_gputhreads << ")" << std::endl; +#endif m_pmek->setGrid( m_gpublocks, m_gputhreads ); } #endif @@ -347,7 +353,9 @@ namespace mg5amcCpu if( goodHelOnly ) return; m_pmek->computeMatrixElements( useChannelIds ); copyHostFromDevice( m_hstMEs, m_devMEs ); +#ifdef MGONGPUCPP_VERBOSE flagAbnormalMEs( m_hstMEs.data(), m_nevt ); +#endif copyHostFromDevice( m_hstSelHel, m_devSelHel ); copyHostFromDevice( m_hstSelCol, m_devSelCol ); if constexpr( std::is_same_v ) @@ -400,7 +408,9 @@ namespace mg5amcCpu } if( goodHelOnly ) return; m_pmek->computeMatrixElements( useChannelIds ); +#ifdef MGONGPUCPP_VERBOSE flagAbnormalMEs( m_hstMEs.data(), m_nevt ); +#endif if constexpr( std::is_same_v ) { memcpy( mes, m_hstMEs.data(), m_hstMEs.bytes() ); diff --git a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/GpuRuntime.h b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/GpuRuntime.h index 860c7fde16..6a4b946e74 100644 --- a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/GpuRuntime.h +++ b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/GpuRuntime.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: J. Teig (Jun 2023, based on earlier work by S. Roiser) for the MG5aMC CUDACPP plugin. -// Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2025) for the MG5aMC CUDACPP plugin. #ifndef MG5AMC_GPURUNTIME_H #define MG5AMC_GPURUNTIME_H 1 @@ -50,7 +50,7 @@ namespace mg5amcGpu // Set up CUDA application // ** NB: strictly speaking this is not needed when using the CUDA runtime API ** // Calling cudaSetDevice on startup is useful to properly book-keep the time spent in CUDA initialization - static void setUp( const bool debug = true ) + static void setUp( const bool debug = false ) // ZW: changed debug default to false { // ** NB: it is useful to call cudaSetDevice, or cudaFree, to properly book-keep the time spent in CUDA initialization // ** NB: otherwise, the first CUDA operation (eg a cudaMemcpyToSymbol in CPPProcess ctor) appears to take much longer! @@ -71,7 +71,7 @@ namespace mg5amcGpu // ** NB: strictly speaking this is not needed when using the CUDA runtime API ** // Calling cudaDeviceReset on shutdown is only needed for checking memory leaks in cuda-memcheck // See https://docs.nvidia.com/cuda/cuda-memcheck/index.html#leak-checking - static void tearDown( const bool debug = true ) + static void tearDown( const bool debug = false ) // ZW: changed debug default to false { if( debug ) std::cout << "__GpuRuntime: calling GpuDeviceReset()" << std::endl; checkGpu( gpuDeviceReset() ); 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 f463977c1a..703ea3781c 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 @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: A. Valassi (Jan 2022) for the MG5aMC CUDACPP plugin. -// Further modified by: J. Teig, A. Valassi (2022-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: J. Teig, A. Valassi, Z. Wettersten (2022-2025) for the MG5aMC CUDACPP plugin. #include "MatrixElementKernels.h" @@ -60,7 +60,9 @@ namespace mg5amcCpu #ifdef MGONGPU_CHANNELID_DEBUG MatrixElementKernelBase::dumpNevtProcessedByChannel(); #endif +#ifdef MGONGPUCPP_VERBOSE MatrixElementKernelBase::dumpSignallingFPEs(); +#endif } //-------------------------------------------------------------------------- diff --git a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/MatrixElementKernels.h b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/MatrixElementKernels.h index 7acff4b308..8da04d7945 100644 --- a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/MatrixElementKernels.h +++ b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/MatrixElementKernels.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: A. Valassi (Jan 2022) for the MG5aMC CUDACPP plugin. -// Further modified by: J. Teig, A. Valassi (2022-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: J. Teig, A. Valassi, Z. Wettersten (2022-2025) for the MG5aMC CUDACPP plugin. #ifndef MATRIXELEMENTKERNELS_H #define MATRIXELEMENTKERNELS_H 1 @@ -134,7 +134,7 @@ namespace mg5amcCpu // Does this host system support the SIMD used in the matrix element calculation? // [NB: this is private, SIMD vectorization in mg5amc C++ code is currently only used in the ME calculations below MatrixElementKernelHost!] - static bool hostSupportsSIMD( const bool verbose = true ); + static bool hostSupportsSIMD( const bool verbose = false ); // ZW: default verbose false private: diff --git a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/MemoryAccessGs.h b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/MemoryAccessGs.h index 63c17a68fa..50a6aaef4d 100644 --- a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/MemoryAccessGs.h +++ b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/MemoryAccessGs.h @@ -128,6 +128,14 @@ namespace mg5amcCpu #endif } + // Locate a field (output) in a memory buffer (input) from a kernel event-indexing mechanism (internal) + // [Signature (SCALAR OR VECTOR) ===> fptype_sv* kernelAccess( fptype* buffer ) <===] + static __host__ __device__ inline fptype_sv* + kernelAccessP( fptype* buffer ) + { + return reinterpret_cast( buffer ); + } + // Locate a field (output) in a memory buffer (input) from a kernel event-indexing mechanism (internal) and the given field indexes (input) // [Signature (const, SCALAR) ===> const fptype& kernelAccessConst( const fptype* buffer ) <===] static constexpr auto kernelAccessConst_s = diff --git a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/MemoryBuffers.h b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/MemoryBuffers.h index deddc425f5..3d9ff21943 100644 --- a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/MemoryBuffers.h +++ b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/MemoryBuffers.h @@ -13,6 +13,7 @@ #include "CPPProcess.h" #include "GpuRuntime.h" #include "Parameters_%(model_name)s.h" +#include "processConfig.h" #include @@ -274,7 +275,8 @@ namespace mg5amcCpu typedef BufferBase BufferNumerators; // The size (number of elements) per event in a memory buffer for numerators - constexpr size_t sizePerEventNumerators = 1; + // (should be equal to the number of diagrams in the process) + constexpr size_t sizePerEventNumerators = processConfig::ndiagrams; #ifndef MGONGPUCPP_GPUIMPL // A class encapsulating a C++ host buffer for gs diff --git a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/processConfig.h b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/processConfig.h new file mode 100644 index 0000000000..a4777347d0 --- /dev/null +++ b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/processConfig.h @@ -0,0 +1,16 @@ +// Copyright (C) 2025 CERN and UCLouvain. +// Licensed under the GNU Lesser General Public License (version 3 or later). +// Created by: S. Roiser (May 2025) for the MG5aMC CUDACPP plugin. +// Further modified by: ... for the MG5aMC CUDACPP plugin. + + +#ifndef MG5_CONFIG_%(processid_uppercase)s_H +#define MG5_CONFIG_%(processid_uppercase)s_H 1 + +namespace processConfig { + + constexpr int ndiagrams = %(ndiagrams)d; + +} + +#endif // MG5_CONFIG_%(processid_uppercase)s_H \ No newline at end of file diff --git a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/process_cc.inc b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/process_cc.inc index 444c848e10..3bdc467fd6 100644 --- a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/process_cc.inc +++ b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/process_cc.inc @@ -23,6 +23,7 @@ #include "MemoryAccessMatrixElements.h" #include "MemoryAccessMomenta.h" #include "MemoryAccessWavefunctions.h" +#include "processConfig.h" #ifdef MGONGPU_SUPPORTS_MULTICHANNEL #include "MemoryAccessDenominators.h" diff --git a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/process_function_definitions.inc b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/process_function_definitions.inc index 47322262e4..ad839d49f4 100644 --- a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/process_function_definitions.inc +++ b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/process_function_definitions.inc @@ -4,7 +4,7 @@ ! Copyright (C) 2020-2024 CERN and UCLouvain. ! Licensed under the GNU Lesser General Public License (version 3 or later). ! Modified by: A. Valassi (Sep 2021) for the MG5aMC CUDACPP plugin. -! Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. +! Further modified by: J. Teig, A. Valassi, Z. Wettersten (2021-2025) for the MG5aMC CUDACPP plugin. !========================================================================== //========================================================================== // Class member functions for calculating the matrix elements for @@ -16,6 +16,69 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { +#ifdef MGONGPU_SUPPORTS_MULTICHANNEL + __device__ INLINE unsigned int getChannelId( const unsigned int* allChannelIds +#ifndef MGONGPUCPP_GPUIMPL + , + const int ievt00, + bool sanityCheckMixedPrecision = true +#endif + ) + { + unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr +#ifdef MGONGPUCPP_GPUIMPL + using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page + if( allChannelIds != nullptr ) + { + const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) + const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) + // NB: channelIds_sv is a scalar in CUDA + channelId = channelIds_sv; + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + } +#else // Cuda or C++ + using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + if( allChannelIds != nullptr ) + { + // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) + const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 + uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) +#ifndef MGONGPU_CPPSIMD + // NB: channelIds_sv is a scalar in no-SIMD C++ + channelId = channelIds_sv; +#else + // NB: channelIds_sv is a vector in SIMD C++ + channelId = channelIds_sv[0]; // element[0] + for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] + { + assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId + } +#endif + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + if( sanityCheckMixedPrecision ) + { +#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT + // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) + const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 + uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + for( int i = 0; i < neppV; ++i ) + { + assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector + } +#endif + } + } +#endif // MGONGPUCPP_GPUIMPL + return channelId; + } +#endif // MGONGPU_SUPPORTS_MULTICHANNEL + constexpr int nw6 = CPPProcess::nw6; // dimensions of each wavefunction (HELAS KEK 91-11): e.g. 6 for e+ e- -> mu+ mu- (fermions and vectors) constexpr int npar = CPPProcess::npar; // #particles in total (external = initial + final): e.g. 4 for e+ e- -> mu+ mu- constexpr int ncomb = CPPProcess::ncomb; // #helicity combinations: e.g. 16 for e+ e- -> mu+ mu- (2**4 = fermion spin up/down ** npar) @@ -117,7 +180,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- @@ -476,9 +541,6 @@ namespace mg5amcCpu #ifdef MGONGPUCPP_GPUIMPL // Remember: in CUDA this is a kernel for one event, in c++ this processes n events const int ievt = blockDim.x * blockIdx.x + threadIdx.x; // index of event (thread) in grid -#ifdef MGONGPU_SUPPORTS_MULTICHANNEL - using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events -#endif #else //assert( (size_t)(allmomenta) %% mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] //assert( (size_t)(allMEs) %% mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] @@ -486,7 +548,6 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL using NUM_ACCESS = HostAccessNumerators; // non-trivial access: buffer includes all events using DEN_ACCESS = HostAccessDenominators; // non-trivial access: buffer includes all events - using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events #endif #endif diff --git a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/process_sigmaKin_function.inc b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/process_sigmaKin_function.inc index d49047a623..616a88403e 100644 --- a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/process_sigmaKin_function.inc +++ b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/process_sigmaKin_function.inc @@ -26,11 +26,12 @@ fptype_sv& MEs_sv = E_ACCESS::kernelAccess( MEs ); MEs_sv = fptype_sv{ 0 }; #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - numerators_sv = fptype_sv{ 0 }; + for( int i = 0; i < processConfig::ndiagrams; ++i ) + numerators_sv[i] = fptype_sv{ 0 }; denominators_sv = fptype_sv{ 0 }; #endif } @@ -43,17 +44,7 @@ // *** START OF PART 1a - CUDA (one event per GPU thread) *** #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) - const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) - // NB: channelIds_sv is a scalar in CUDA - channelId = channelIds_sv; - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) - } + unsigned int channelId = getChannelId( allChannelIds ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (for the single event processed in calculate_wavefunctions) @@ -168,38 +159,7 @@ const int ievt00 = ipagV2 * neppV; // loop on one SIMD page (neppV events) at a time #endif #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) - const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 - uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) -#ifndef MGONGPU_CPPSIMD - // NB: channelIds_sv is a scalar in no-SIMD C++ - channelId = channelIds_sv; -#else - // NB: channelIds_sv is a vector in SIMD C++ - channelId = channelIds_sv[0]; // element[0] - for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] - { - assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId - } -#endif - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) -#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT - // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) - const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 - uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - for( int i = 0; i < neppV; ++i ) - { - assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector - } -#endif - } + unsigned int channelId = getChannelId( allChannelIds, ievt00 ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (jamp2[nParity][ncolor][neppV] for the SIMD vector - or the two SIMD vectors - of events processed in calculate_wavefunctions) @@ -372,11 +332,12 @@ #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( allChannelIds != nullptr ) // fix segfault #892 (not 'channelIds[0] != 0') { - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + const unsigned int channelId = getChannelId( allChannelIds, ievt0, false ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - MEs_sv *= numerators_sv / denominators_sv; + MEs_sv *= numerators_sv[channelId - 1] / denominators_sv; } #endif //for( int ieppV = 0; ieppV < neppV; ieppV++ ) diff --git a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/model_handling.py b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/model_handling.py index 554c97974b..6fd4603c70 100644 --- a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/model_handling.py +++ b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/model_handling.py @@ -1439,6 +1439,7 @@ def generate_process_files(self): self.edit_check_sa() self.edit_mgonGPU() self.edit_processidfile() # AV new file (NB this is Sigma-specific, should not be a symlink to Subprocesses) + self.edit_processConfig() # sub process specific, not to be symlinked from the Subprocesses directory self.edit_testxxx() # AV new file (NB this is generic in Subprocesses and then linked in Sigma-specific) self.edit_memorybuffers() # AV new file (NB this is generic in Subprocesses and then linked in Sigma-specific) @@ -1518,6 +1519,16 @@ def edit_processidfile(self): ff.write(template % replace_dict) ff.close() + def edit_processConfig(self): + """Generate process_config.h""" + ###misc.sprint('Entering PLUGIN_OneProcessExporter.edit_processConfig') + template = open(pjoin(self.template_path,'gpu','processConfig.h'),'r').read() + replace_dict = {} + replace_dict['ndiagrams'] = len(self.matrix_elements[0].get('diagrams')) + replace_dict['processid_uppercase'] = self.get_process_name().upper() + ff = open(pjoin(self.path, 'processConfig.h'),'w') + ff.write(template % replace_dict) + ff.close() def generate_subprocess_directory_end(self, **opt): """ opt contain all local variable of the fortran original function""" @@ -1916,7 +1927,7 @@ def super_get_matrix_element_calls(self, matrix_element, color_amplitudes, multi COUPs[ndcoup + iicoup] = allCOUPs[ndcoup + iicoup]; // independent couplings, fixed for all events fptype* MEs = E_ACCESS::ieventAccessRecord( allMEs, ievt0 ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); #endif #endif @@ -1926,7 +1937,7 @@ def super_get_matrix_element_calls(self, matrix_element, color_amplitudes, multi #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Numerators and denominators for the current event (CUDA) or SIMD event page (C++) - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); #endif""") diagrams = matrix_element.get('diagrams') @@ -1958,8 +1969,12 @@ def super_get_matrix_element_calls(self, matrix_element, color_amplitudes, multi ###res.append("if( channelId == %i ) numerators_sv += cxabs2( amp_sv[0] );" % diag_to_config[id_amp]) # BUG #472 ###res.append("if( channelId == %i ) numerators_sv += cxabs2( amp_sv[0] );" % id_amp) # wrong fix for BUG #472 res.append("#ifdef MGONGPU_SUPPORTS_MULTICHANNEL") - res.append("if( channelId == %i ) numerators_sv += cxabs2( amp_sv[0] );" % diagram.get('number')) - res.append("if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] );") + diagnum = diagram.get('number') + res.append("if( channelId != 0 )") + res.append("{") + res.append(" numerators_sv[%i] += cxabs2( amp_sv[0] );" % (diagnum-1)) + res.append(" denominators_sv += cxabs2( amp_sv[0] );") + res.append("}") res.append("#endif") else: res.append("#ifdef MGONGPU_SUPPORTS_MULTICHANNEL") 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 db84a9053c..a6c8267949 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 @@ -1,8 +1,11 @@ +WARNING:root:python3.12 support is still experimental. For the moment re-weighting is NOT working and do expect a LOT of syntax warning. We do not advise python3.12 for production for the moment. +Running MG5 in debug mode +Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT +Plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT has marked as NOT being validated with this version: 3.6.2. +It has been validated for the last time with version: 3.6.0 Note that this is a development version. This version is intended for development/beta testing and NOT for production. This version has not been fully tested (if at all) and might have limited user support (if at all) -Running MG5 in debug mode -Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT ************************************************************ * * * W E L C O M E to * @@ -15,7 +18,7 @@ Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT * * * * * * * * * * * * -* VERSION 3.6.0 2024-09-30 * +* VERSION 3.6.2 2025-03-19 * * * * WARNING: UNKNOWN DEVELOPMENT VERSION. * * WARNING: DO NOT USE FOR PRODUCTION * @@ -46,10 +49,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 Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt -import /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu.mg +import /shared/roiser/sw/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 @@ -58,7 +60,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.006200551986694336  +DEBUG: model prefixing takes 0.0018396377563476562  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  @@ -150,21 +152,21 @@ 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.005 s Total: 1 processes with 2 diagrams output madevent_simd ../TMPOUT/CODEGEN_mad_ee_mumu --hel_recycling=False --vector_size=32 Output will be done with PLUGIN: CUDACPP_OUTPUT Addition matrix-element will be done with PLUGIN: CUDACPP_OUTPUT -DEBUG: opt['output_options']['vector_size'] =  32 [export_v4.py at line 4334]  +DEBUG: opt['output_options']['vector_size'] =  32 [export_v4.py at line 4166]  Output will be done with PLUGIN: CUDACPP_OUTPUT DEBUG: Entering PLUGIN_ProcessExporter.__init__ (initialise the exporter) [output.py at line 171]  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 176]  -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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu  +INFO: Creating subdirectories in directory /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu +WARNING: File exists /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/Cards  +WARNING: File exists /shared/roiser/sw/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 @@ -176,22 +178,22 @@ FileWriter mu+ mu- WEIGHTED<=4 @1 INFO: Finding symmetric diagrams for subprocess group epem_mupmum -DEBUG: len(subproc_diagrams_for_config) =  2 [model_handling.py at line 1527]  -DEBUG: iconfig_to_diag =  {1: 1, 2: 2} [model_handling.py at line 1551]  -DEBUG: diag_to_iconfig =  {1: 1, 2: 2} [model_handling.py at line 1552]  +DEBUG: len(subproc_diagrams_for_config) =  2 [model_handling.py at line 1538]  +DEBUG: iconfig_to_diag =  {1: 1, 2: 2} [model_handling.py at line 1562]  +DEBUG: diag_to_iconfig =  {1: 1, 2: 2} [model_handling.py at line 1563]  Generated helas calls for 1 subprocesses (2 diagrams) in 0.004 s -Wrote files for 8 helas calls in 0.070 s +Wrote files for 8 helas calls in 1.297 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.201 s +ALOHA: aloha creates 3 routines in 0.122 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 FFV2_4 routines -ALOHA: aloha creates 7 routines in 0.253 s +ALOHA: aloha creates 7 routines in 0.122 s FFV1 FFV1 FFV2 @@ -200,38 +202,40 @@ ALOHA: aloha creates 7 routines in 0.253 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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/src/./HelAmps_sm.h +INFO: Created file HelAmps_sm.h in directory /shared/roiser/sw/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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/src/./Parameters_sm.h +FileWriter for /shared/roiser/sw/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: /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/src/. and /shared/roiser/sw/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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/Cards/me5_configuration.txt INFO: Use Fortran compiler gfortran INFO: Use c++ compiler g++ INFO: Generate jpeg diagrams 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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu; patch -p4 -i /shared/roiser/sw/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common patching file SubProcesses/makefile -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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/SubProcesses/P1_epem_mupmum; patch -p6 -i /shared/roiser/sw/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file driver.f patching file matrix1.f Hunk #2 succeeded at 236 (offset 9 lines). DEBUG: p.returncode =  0 [output.py at line 263]  -Output to directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu done. +Output to directory /shared/roiser/sw/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 +/shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/README Run "open index.html" to see more information about this process. quit -real 0m2.054s -user 0m1.767s -sys 0m0.275s -Code generation completed in 2 seconds +real 0m6.345s +user 0m1.204s +sys 0m0.651s +Code generation completed in 7 seconds +/shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/bin/internal/banner.py:3309: SyntaxWarning: invalid escape sequence '\s' + function_pat = re.compile('^\s+(?:SUBROUTINE|(?:%(type)s)\s+function)\s+([a-zA-Z]\w*)' \ ************************************************************ * * * W E L C O M E to * @@ -244,7 +248,7 @@ Code generation completed in 2 seconds * * * * * * * * * * * * -* VERSION 3.6.0 * +* VERSION 3.6.2 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -252,13 +256,14 @@ Code generation completed in 2 seconds * 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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/Cards/me5_configuration.txt +INFO: load configuration from /shared/roiser/sw/madgraph4gpu/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/Cards/me5_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 +/shared/roiser/sw/madgraph4gpu/MG5aMC/mg5amcnlo/madgraph/various/banner.py:3309: SyntaxWarning: invalid escape sequence '\s' + function_pat = re.compile('^\s+(?:SUBROUTINE|(?:%(type)s)\s+function)\s+([a-zA-Z]\w*)' \ quit INFO: launch in debug mode @@ -274,7 +279,7 @@ launch in debug mode * * * * * * * * * * * * -* VERSION 3.6.0 * +* VERSION 3.6.2 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -282,10 +287,9 @@ 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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/Cards/me5_configuration.txt +INFO: load configuration from /shared/roiser/sw/madgraph4gpu/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/Cards/me5_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 68b4c46295..a0212bfb62 100644 --- a/epochX/cudacpp/ee_mumu.mad/Cards/me5_configuration.txt +++ b/epochX/cudacpp/ee_mumu.mad/Cards/me5_configuration.txt @@ -235,7 +235,7 @@ # pineappl = pineappl -#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo +#mg5_path = /shared/roiser/sw/madgraph4gpu/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo +#mg5_path = /shared/roiser/sw/madgraph4gpu/MG5aMC/mg5amcnlo 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 bb623f867a..884d65b94b 100644 --- a/epochX/cudacpp/ee_mumu.mad/Cards/proc_card_mg5.dat +++ b/epochX/cudacpp/ee_mumu.mad/Cards/proc_card_mg5.dat @@ -8,7 +8,7 @@ #* * * * #* * #* * -#* VERSION 3.6.0 2024-09-30 * +#* VERSION 3.6.2 2025-03-19 * #* * #* WARNING: UNKNOWN DEVELOPMENT VERSION. * #* WARNING: DO NOT USE FOR PRODUCTION * diff --git a/epochX/cudacpp/ee_mumu.mad/Cards/run_card.dat b/epochX/cudacpp/ee_mumu.mad/Cards/run_card.dat index 74f70b567b..c1037c83d7 100644 --- a/epochX/cudacpp/ee_mumu.mad/Cards/run_card.dat +++ b/epochX/cudacpp/ee_mumu.mad/Cards/run_card.dat @@ -112,6 +112,7 @@ # Parton level cuts definition * #******************************* 0.0 = dsqrt_shat ! minimal shat for full process + -1 = dsqrt_shatmax ! maximum shat for full process # # #********************************************************************* diff --git a/epochX/cudacpp/ee_mumu.mad/Cards/run_card_default.dat b/epochX/cudacpp/ee_mumu.mad/Cards/run_card_default.dat index 68ee164d00..4ba7540657 100644 --- a/epochX/cudacpp/ee_mumu.mad/Cards/run_card_default.dat +++ b/epochX/cudacpp/ee_mumu.mad/Cards/run_card_default.dat @@ -112,6 +112,7 @@ # Parton level cuts definition * #******************************* 0.0 = dsqrt_shat ! minimal shat for full process + -1 = dsqrt_shatmax ! maximum shat for full process # # #********************************************************************* diff --git a/epochX/cudacpp/ee_mumu.mad/MGMEVersion.txt b/epochX/cudacpp/ee_mumu.mad/MGMEVersion.txt index 084e244cea..77a069e39b 100644 --- a/epochX/cudacpp/ee_mumu.mad/MGMEVersion.txt +++ b/epochX/cudacpp/ee_mumu.mad/MGMEVersion.txt @@ -1 +1 @@ -3.6.0 \ No newline at end of file +3.6.2 \ No newline at end of file diff --git a/epochX/cudacpp/ee_mumu.mad/Source/alfas_functions.f b/epochX/cudacpp/ee_mumu.mad/Source/alfas_functions.f index bb69a6384e..84aeff369c 100644 --- a/epochX/cudacpp/ee_mumu.mad/Source/alfas_functions.f +++ b/epochX/cudacpp/ee_mumu.mad/Source/alfas_functions.f @@ -188,6 +188,10 @@ SUBROUTINE NEWTON1(T,A_IN,A_OUT,NLOOP,NF) A_OUT=A_IN/(1D0+A_IN*B0(NF)*T) IF (NLOOP .EQ. 1) RETURN + if (1D0+A_IN*B0(NF)*T.le.0d0)THEN + A_OUT = 9d98 + RETURN + ENDIF A_OUT=A_IN/(1D0+B0(NF)*A_IN*T+C1(NF)*A_IN*LOG(1D0+A_IN*B0(NF)*T)) IF (A_OUT .LT. 0D0) AS=0.3D0 30 AS=A_OUT diff --git a/epochX/cudacpp/ee_mumu.mad/Source/cuts.inc b/epochX/cudacpp/ee_mumu.mad/Source/cuts.inc index 23d099e5f7..a8ccc7420d 100644 --- a/epochX/cudacpp/ee_mumu.mad/Source/cuts.inc +++ b/epochX/cudacpp/ee_mumu.mad/Source/cuts.inc @@ -37,7 +37,7 @@ C REAL*8 misset,missetmax,ptheavy REAL*8 ptllmin,ptllmax integer maxjetflavor - REAl*8 dsqrt_shat + REAl*8 dsqrt_shat,dsqrt_shatmax COMMON /to_min_max_cuts/ & PTJmax,PTBmax,PTAmax,PTLmax, @@ -60,7 +60,7 @@ C & ht2max,ht3max,ht4max, & htjmin,htjmax,ihtmin,ihtmax, & misset,missetmax,ptheavy, - & ptllmin,ptllmax,dsqrt_shat, + & ptllmin,ptllmax,dsqrt_shat,dsqrt_shatmax, & maxjetflavor C diff --git a/epochX/cudacpp/ee_mumu.mad/Source/make_opts b/epochX/cudacpp/ee_mumu.mad/Source/make_opts index e4b87ee6ad..f9f7b64bb5 100644 --- a/epochX/cudacpp/ee_mumu.mad/Source/make_opts +++ b/epochX/cudacpp/ee_mumu.mad/Source/make_opts @@ -5,8 +5,8 @@ GLOBAL_FLAG=-O3 -ffast-math -fbounds-check MACFLAG= MG5AMC_VERSION=SpecifiedByMG5aMCAtRunTime PYTHIA8_PATH=NotInstalled -STDLIB_FLAG= STDLIB=-lstdc++ +STDLIB_FLAG= #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 291ca907ee..f9321e7a94 100644 --- a/epochX/cudacpp/ee_mumu.mad/Source/makefile +++ b/epochX/cudacpp/ee_mumu.mad/Source/makefile @@ -73,6 +73,7 @@ $(BINDIR)gensudgrid: $(GENSUDGRID) $(LIBDIR)libpdf.$(libext) $(LIBDIR)libgammaUP # Dependencies dsample.o: DiscreteSampler.o dsample.f genps.inc StringCast.o vector.inc +pawgraph.o: vector.inc DiscreteSampler.o: StringCast.o invarients.o: invarients.f genps.inc gen_ximprove.o: gen_ximprove.f run_config.inc run_card.inc diff --git a/epochX/cudacpp/ee_mumu.mad/Source/run_card.inc b/epochX/cudacpp/ee_mumu.mad/Source/run_card.inc index 80d5ae41aa..83061d9ae9 100644 --- a/epochX/cudacpp/ee_mumu.mad/Source/run_card.inc +++ b/epochX/cudacpp/ee_mumu.mad/Source/run_card.inc @@ -88,6 +88,8 @@ DSQRT_SHAT = 0.000000000000000D+00 + DSQRT_SHATMAX = -1 + LIMHEL = 0.000000000000000D+00 PTJ = 2.000000000000000D+01 diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/Bridge.h b/epochX/cudacpp/ee_mumu.mad/SubProcesses/Bridge.h index 87aa648dd2..49b928db67 100644 --- a/epochX/cudacpp/ee_mumu.mad/SubProcesses/Bridge.h +++ b/epochX/cudacpp/ee_mumu.mad/SubProcesses/Bridge.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: S. Roiser (Nov 2021) for the MG5aMC CUDACPP plugin. -// Further modified by: S. Roiser, J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2021-2025) for the MG5aMC CUDACPP plugin. #ifndef BRIDGE_H #define BRIDGE_H 1 @@ -255,11 +255,15 @@ namespace mg5amcCpu throw std::logic_error( "Bridge constructor: FIXME! cannot choose gputhreads" ); // this should never happen! m_gpublocks = m_nevt / m_gputhreads; } +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Instantiate device Bridge (nevt=" << m_nevt << ", gpublocks=" << m_gpublocks << ", gputhreads=" << m_gputhreads << ", gpublocks*gputhreads=" << m_gpublocks * m_gputhreads << ")" << std::endl; +#endif m_pmek.reset( new MatrixElementKernelDevice( m_devMomentaC, m_devGs, m_devRndHel, m_devRndCol, m_devChannelIds, m_devMEs, m_devSelHel, m_devSelCol, m_gpublocks, m_gputhreads ) ); #else +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Instantiate host Bridge (nevt=" << m_nevt << ")" << std::endl; +#endif m_pmek.reset( new MatrixElementKernelHost( m_hstMomentaC, m_hstGs, m_hstRndHel, m_hstRndCol, m_hstChannelIds, m_hstMEs, m_hstSelHel, m_hstSelCol, m_nevt ) ); #endif // MGONGPUCPP_GPUIMPL // Create a process object, read param card and set parameters @@ -290,8 +294,10 @@ namespace mg5amcCpu throw std::runtime_error( "Bridge: gpublocks*gputhreads must equal m_nevt in set_gpugrid" ); m_gpublocks = gpublocks; m_gputhreads = gputhreads; +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Set grid in Bridge (nevt=" << m_nevt << ", gpublocks=" << m_gpublocks << ", gputhreads=" << m_gputhreads << ", gpublocks*gputhreads=" << m_gpublocks * m_gputhreads << ")" << std::endl; +#endif m_pmek->setGrid( m_gpublocks, m_gputhreads ); } #endif @@ -347,7 +353,9 @@ namespace mg5amcCpu if( goodHelOnly ) return; m_pmek->computeMatrixElements( useChannelIds ); copyHostFromDevice( m_hstMEs, m_devMEs ); +#ifdef MGONGPUCPP_VERBOSE flagAbnormalMEs( m_hstMEs.data(), m_nevt ); +#endif copyHostFromDevice( m_hstSelHel, m_devSelHel ); copyHostFromDevice( m_hstSelCol, m_devSelCol ); if constexpr( std::is_same_v ) @@ -400,7 +408,9 @@ namespace mg5amcCpu } if( goodHelOnly ) return; m_pmek->computeMatrixElements( useChannelIds ); +#ifdef MGONGPUCPP_VERBOSE flagAbnormalMEs( m_hstMEs.data(), m_nevt ); +#endif if constexpr( std::is_same_v ) { memcpy( mes, m_hstMEs.data(), m_hstMEs.bytes() ); diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/GpuRuntime.h b/epochX/cudacpp/ee_mumu.mad/SubProcesses/GpuRuntime.h index 860c7fde16..6a4b946e74 100644 --- a/epochX/cudacpp/ee_mumu.mad/SubProcesses/GpuRuntime.h +++ b/epochX/cudacpp/ee_mumu.mad/SubProcesses/GpuRuntime.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: J. Teig (Jun 2023, based on earlier work by S. Roiser) for the MG5aMC CUDACPP plugin. -// Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2025) for the MG5aMC CUDACPP plugin. #ifndef MG5AMC_GPURUNTIME_H #define MG5AMC_GPURUNTIME_H 1 @@ -50,7 +50,7 @@ namespace mg5amcGpu // Set up CUDA application // ** NB: strictly speaking this is not needed when using the CUDA runtime API ** // Calling cudaSetDevice on startup is useful to properly book-keep the time spent in CUDA initialization - static void setUp( const bool debug = true ) + static void setUp( const bool debug = false ) // ZW: changed debug default to false { // ** NB: it is useful to call cudaSetDevice, or cudaFree, to properly book-keep the time spent in CUDA initialization // ** NB: otherwise, the first CUDA operation (eg a cudaMemcpyToSymbol in CPPProcess ctor) appears to take much longer! @@ -71,7 +71,7 @@ namespace mg5amcGpu // ** NB: strictly speaking this is not needed when using the CUDA runtime API ** // Calling cudaDeviceReset on shutdown is only needed for checking memory leaks in cuda-memcheck // See https://docs.nvidia.com/cuda/cuda-memcheck/index.html#leak-checking - static void tearDown( const bool debug = true ) + static void tearDown( const bool debug = false ) // ZW: changed debug default to false { if( debug ) std::cout << "__GpuRuntime: calling GpuDeviceReset()" << std::endl; checkGpu( gpuDeviceReset() ); diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/MGVersion.txt b/epochX/cudacpp/ee_mumu.mad/SubProcesses/MGVersion.txt index 084e244cea..77a069e39b 100644 --- a/epochX/cudacpp/ee_mumu.mad/SubProcesses/MGVersion.txt +++ b/epochX/cudacpp/ee_mumu.mad/SubProcesses/MGVersion.txt @@ -1 +1 @@ -3.6.0 \ No newline at end of file +3.6.2 \ No newline at end of file diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/MatrixElementKernels.cc b/epochX/cudacpp/ee_mumu.mad/SubProcesses/MatrixElementKernels.cc index f463977c1a..703ea3781c 100644 --- a/epochX/cudacpp/ee_mumu.mad/SubProcesses/MatrixElementKernels.cc +++ b/epochX/cudacpp/ee_mumu.mad/SubProcesses/MatrixElementKernels.cc @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: A. Valassi (Jan 2022) for the MG5aMC CUDACPP plugin. -// Further modified by: J. Teig, A. Valassi (2022-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: J. Teig, A. Valassi, Z. Wettersten (2022-2025) for the MG5aMC CUDACPP plugin. #include "MatrixElementKernels.h" @@ -60,7 +60,9 @@ namespace mg5amcCpu #ifdef MGONGPU_CHANNELID_DEBUG MatrixElementKernelBase::dumpNevtProcessedByChannel(); #endif +#ifdef MGONGPUCPP_VERBOSE MatrixElementKernelBase::dumpSignallingFPEs(); +#endif } //-------------------------------------------------------------------------- diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/MatrixElementKernels.h b/epochX/cudacpp/ee_mumu.mad/SubProcesses/MatrixElementKernels.h index 7acff4b308..8da04d7945 100644 --- a/epochX/cudacpp/ee_mumu.mad/SubProcesses/MatrixElementKernels.h +++ b/epochX/cudacpp/ee_mumu.mad/SubProcesses/MatrixElementKernels.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: A. Valassi (Jan 2022) for the MG5aMC CUDACPP plugin. -// Further modified by: J. Teig, A. Valassi (2022-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: J. Teig, A. Valassi, Z. Wettersten (2022-2025) for the MG5aMC CUDACPP plugin. #ifndef MATRIXELEMENTKERNELS_H #define MATRIXELEMENTKERNELS_H 1 @@ -134,7 +134,7 @@ namespace mg5amcCpu // Does this host system support the SIMD used in the matrix element calculation? // [NB: this is private, SIMD vectorization in mg5amc C++ code is currently only used in the ME calculations below MatrixElementKernelHost!] - static bool hostSupportsSIMD( const bool verbose = true ); + static bool hostSupportsSIMD( const bool verbose = false ); // ZW: default verbose false private: diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/MemoryAccessGs.h b/epochX/cudacpp/ee_mumu.mad/SubProcesses/MemoryAccessGs.h index 63c17a68fa..50a6aaef4d 100644 --- a/epochX/cudacpp/ee_mumu.mad/SubProcesses/MemoryAccessGs.h +++ b/epochX/cudacpp/ee_mumu.mad/SubProcesses/MemoryAccessGs.h @@ -128,6 +128,14 @@ namespace mg5amcCpu #endif } + // Locate a field (output) in a memory buffer (input) from a kernel event-indexing mechanism (internal) + // [Signature (SCALAR OR VECTOR) ===> fptype_sv* kernelAccess( fptype* buffer ) <===] + static __host__ __device__ inline fptype_sv* + kernelAccessP( fptype* buffer ) + { + return reinterpret_cast( buffer ); + } + // Locate a field (output) in a memory buffer (input) from a kernel event-indexing mechanism (internal) and the given field indexes (input) // [Signature (const, SCALAR) ===> const fptype& kernelAccessConst( const fptype* buffer ) <===] static constexpr auto kernelAccessConst_s = diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/MemoryBuffers.h b/epochX/cudacpp/ee_mumu.mad/SubProcesses/MemoryBuffers.h index 65a101888d..17ba7a89e5 100644 --- a/epochX/cudacpp/ee_mumu.mad/SubProcesses/MemoryBuffers.h +++ b/epochX/cudacpp/ee_mumu.mad/SubProcesses/MemoryBuffers.h @@ -13,6 +13,7 @@ #include "CPPProcess.h" #include "GpuRuntime.h" #include "Parameters_sm.h" +#include "processConfig.h" #include @@ -274,7 +275,8 @@ namespace mg5amcCpu typedef BufferBase BufferNumerators; // The size (number of elements) per event in a memory buffer for numerators - constexpr size_t sizePerEventNumerators = 1; + // (should be equal to the number of diagrams in the process) + constexpr size_t sizePerEventNumerators = processConfig::ndiagrams; #ifndef MGONGPUCPP_GPUIMPL // A class encapsulating a C++ host buffer for gs 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 7bd57a8dbb..3c053daa0b 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 @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -25,6 +25,7 @@ #include "MemoryAccessMatrixElements.h" #include "MemoryAccessMomenta.h" #include "MemoryAccessWavefunctions.h" +#include "processConfig.h" #ifdef MGONGPU_SUPPORTS_MULTICHANNEL #include "MemoryAccessDenominators.h" @@ -96,6 +97,69 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { +#ifdef MGONGPU_SUPPORTS_MULTICHANNEL + __device__ INLINE unsigned int getChannelId( const unsigned int* allChannelIds +#ifndef MGONGPUCPP_GPUIMPL + , + const int ievt00, + bool sanityCheckMixedPrecision = true +#endif + ) + { + unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr +#ifdef MGONGPUCPP_GPUIMPL + using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page + if( allChannelIds != nullptr ) + { + const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) + const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) + // NB: channelIds_sv is a scalar in CUDA + channelId = channelIds_sv; + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + } +#else // Cuda or C++ + using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + if( allChannelIds != nullptr ) + { + // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) + const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 + uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) +#ifndef MGONGPU_CPPSIMD + // NB: channelIds_sv is a scalar in no-SIMD C++ + channelId = channelIds_sv; +#else + // NB: channelIds_sv is a vector in SIMD C++ + channelId = channelIds_sv[0]; // element[0] + for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] + { + assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId + } +#endif + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + if( sanityCheckMixedPrecision ) + { +#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT + // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) + const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 + uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + for( int i = 0; i < neppV; ++i ) + { + assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector + } +#endif + } + } +#endif // MGONGPUCPP_GPUIMPL + return channelId; + } +#endif // MGONGPU_SUPPORTS_MULTICHANNEL + constexpr int nw6 = CPPProcess::nw6; // dimensions of each wavefunction (HELAS KEK 91-11): e.g. 6 for e+ e- -> mu+ mu- (fermions and vectors) constexpr int npar = CPPProcess::npar; // #particles in total (external = initial + final): e.g. 4 for e+ e- -> mu+ mu- constexpr int ncomb = CPPProcess::ncomb; // #helicity combinations: e.g. 16 for e+ e- -> mu+ mu- (2**4 = fermion spin up/down ** npar) @@ -305,7 +369,7 @@ namespace mg5amcCpu COUPs[ndcoup + iicoup] = allCOUPs[ndcoup + iicoup]; // independent couplings, fixed for all events fptype* MEs = E_ACCESS::ieventAccessRecord( allMEs, ievt0 ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); #endif #endif @@ -315,7 +379,7 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Numerators and denominators for the current event (CUDA) or SIMD event page (C++) - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); #endif @@ -335,8 +399,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1 FFV1_0( w_fp[2], w_fp[3], w_fp[4], COUPs[ndcoup + 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] ); + if( channelId != 0 ) + { + numerators_sv[0] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= amp_sv[0]; @@ -348,8 +415,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 2 FFV2_4_0( w_fp[2], w_fp[3], w_fp[4], COUPs[ndcoup + 1], 1.0, COUPs[ndcoup + 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] ); + if( channelId != 0 ) + { + numerators_sv[1] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= amp_sv[0]; @@ -539,7 +609,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- @@ -908,9 +980,6 @@ namespace mg5amcCpu #ifdef MGONGPUCPP_GPUIMPL // Remember: in CUDA this is a kernel for one event, in c++ this processes n events const int ievt = blockDim.x * blockIdx.x + threadIdx.x; // index of event (thread) in grid -#ifdef MGONGPU_SUPPORTS_MULTICHANNEL - using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events -#endif #else //assert( (size_t)(allmomenta) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] //assert( (size_t)(allMEs) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] @@ -918,7 +987,6 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL using NUM_ACCESS = HostAccessNumerators; // non-trivial access: buffer includes all events using DEN_ACCESS = HostAccessDenominators; // non-trivial access: buffer includes all events - using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events #endif #endif @@ -943,11 +1011,12 @@ namespace mg5amcCpu fptype_sv& MEs_sv = E_ACCESS::kernelAccess( MEs ); MEs_sv = fptype_sv{ 0 }; #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - numerators_sv = fptype_sv{ 0 }; + for( int i = 0; i < processConfig::ndiagrams; ++i ) + numerators_sv[i] = fptype_sv{ 0 }; denominators_sv = fptype_sv{ 0 }; #endif } @@ -960,17 +1029,7 @@ namespace mg5amcCpu // *** START OF PART 1a - CUDA (one event per GPU thread) *** #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) - const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) - // NB: channelIds_sv is a scalar in CUDA - channelId = channelIds_sv; - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) - } + unsigned int channelId = getChannelId( allChannelIds ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (for the single event processed in calculate_wavefunctions) @@ -1085,38 +1144,7 @@ namespace mg5amcCpu const int ievt00 = ipagV2 * neppV; // loop on one SIMD page (neppV events) at a time #endif #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) - const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 - uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) -#ifndef MGONGPU_CPPSIMD - // NB: channelIds_sv is a scalar in no-SIMD C++ - channelId = channelIds_sv; -#else - // NB: channelIds_sv is a vector in SIMD C++ - channelId = channelIds_sv[0]; // element[0] - for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] - { - assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId - } -#endif - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) -#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT - // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) - const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 - uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - for( int i = 0; i < neppV; ++i ) - { - assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector - } -#endif - } + unsigned int channelId = getChannelId( allChannelIds, ievt00 ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (jamp2[nParity][ncolor][neppV] for the SIMD vector - or the two SIMD vectors - of events processed in calculate_wavefunctions) @@ -1289,11 +1317,12 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( allChannelIds != nullptr ) // fix segfault #892 (not 'channelIds[0] != 0') { - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + const unsigned int channelId = getChannelId( allChannelIds, ievt0, false ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - MEs_sv *= numerators_sv / denominators_sv; + MEs_sv *= numerators_sv[channelId - 1] / denominators_sv; } #endif //for( int ieppV = 0; ieppV < neppV; ieppV++ ) diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/CPPProcess.h b/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/CPPProcess.h index 159826a904..8f9b209cbf 100644 --- a/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/CPPProcess.h +++ b/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/auto_dsig.f b/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/auto_dsig.f index 70fe04e4d8..b60bf0aacb 100644 --- a/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/auto_dsig.f +++ b/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C 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 280eff025e..661e3e2c4d 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 @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -140,7 +140,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDDO QSCALE=QSCALE/2D0 ELSE - QSCALE=DSQRT(Q2FACT(IB(1))) + QSCALE=DSQRT(Q2FACT(1)) ENDIF EP1=PDG2PDF(LPP(IB(1)),-11, IB(1),XBK(IB(1)), QSCALE) IF (PDLABEL.EQ.'dressed') EP1_COMPONENTS(1:4 ) = @@ -149,7 +149,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) IF (DSQRT(Q2FACT(IB(2))).NE.0D0) THEN - QSCALE=DSQRT(Q2FACT(IB(2))) + QSCALE=DSQRT(Q2FACT(2)) ENDIF EM2=PDG2PDF(LPP(IB(2)),11, IB(2),XBK(IB(2)), QSCALE) IF (PDLABEL.EQ.'dressed') EM2_COMPONENTS(1:4 ) = @@ -228,7 +228,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -302,6 +302,10 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, INTEGER I_EE C +C STUFF FOR UPC +C + DOUBLE PRECISION PHOTONPDFSQUARE +C C EXTERNAL FUNCTIONS C LOGICAL PASSCUTS @@ -385,14 +389,14 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, IF (ABS(LPP(IB(1))).GE.1) THEN C LP=SIGN(1,LPP(IB(1))) EP1(IVEC)=PDG2PDF(LPP(IB(1)),-11, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) IF (PDLABEL.EQ.'dressed') EP1_COMPONENTS(1:4 , IVEC) = $ EE_COMPONENTS(1:4) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) EM2(IVEC)=PDG2PDF(LPP(IB(2)),11, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) IF (PDLABEL.EQ.'dressed') EM2_COMPONENTS(1:4 , IVEC) = $ EE_COMPONENTS(1:4) ENDIF diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/card.png b/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/card.png new file mode 100644 index 0000000000..a7a77bb3ae Binary files /dev/null and b/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/card.png differ 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 1a2e5df4e6..75e9aa1dc8 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 @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -325,7 +325,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -368,7 +368,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C INTEGER I,J,M,N COMPLEX*16 ZTEMP, TMP_JAMP(0) - REAL*8 CF(NCOLOR,NCOLOR) + INTEGER CF(NCOLOR*(NCOLOR+1)/2) + INTEGER DENOM, CF_INDEX COMPLEX*16 AMP(NGRAPHS), JAMP(NCOLOR,NAMPSO) COMPLEX*16 W(6,NWAVEFUNCS) C Needed for v4 models @@ -411,7 +412,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C C COLOR DATA C - DATA (CF(I, 1),I= 1, 1) /1.000000000000000D+00/ + DATA DENOM/1/ + DATA (CF(I),I= 1, 1) /1/ C 1 ColorOne() C ---------- C BEGIN CODE @@ -455,10 +457,12 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) MATRIX1 = 0.D0 DO M = 1, NAMPSO + CF_INDEX = 0 DO I = 1, NCOLOR ZTEMP = (0.D0,0.D0) - DO J = 1, NCOLOR - ZTEMP = ZTEMP + CF(J,I)*JAMP(J,M) + DO J = I, NCOLOR + CF_INDEX = CF_INDEX + 1 + ZTEMP = ZTEMP + CF(CF_INDEX)*JAMP(J,M) ENDDO DO N = 1, NAMPSO @@ -467,6 +471,7 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) ENDDO ENDDO ENDDO + MATRIX1 = MATRIX1/DENOM IF(SDE_STRAT.EQ.1)THEN AMP2(1)=AMP2(1)+AMP(1)*DCONJG(AMP(1)) diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/matrix11.png b/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/matrix11.png new file mode 100644 index 0000000000..efad61c00e Binary files /dev/null and b/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/matrix11.png differ diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/processConfig.h b/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/processConfig.h new file mode 100644 index 0000000000..65cfee8266 --- /dev/null +++ b/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/processConfig.h @@ -0,0 +1,16 @@ +// Copyright (C) 2025 CERN and UCLouvain. +// Licensed under the GNU Lesser General Public License (version 3 or later). +// Created by: S. Roiser (May 2025) for the MG5aMC CUDACPP plugin. +// Further modified by: ... for the MG5aMC CUDACPP plugin. + + +#ifndef MG5_CONFIG_SIGMA_SM_EPEM_MUPMUM_H +#define MG5_CONFIG_SIGMA_SM_EPEM_MUPMUM_H 1 + +namespace processConfig { + + constexpr int ndiagrams = 2; + +} + +#endif // MG5_CONFIG_SIGMA_SM_EPEM_MUPMUM_H \ No newline at end of file diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/cuts.f b/epochX/cudacpp/ee_mumu.mad/SubProcesses/cuts.f index 7898714201..bd50ab1357 100644 --- a/epochX/cudacpp/ee_mumu.mad/SubProcesses/cuts.f +++ b/epochX/cudacpp/ee_mumu.mad/SubProcesses/cuts.f @@ -307,12 +307,18 @@ LOGICAL FUNCTION PASSCUTS(P, VECSIZE_USED) c c Limit S_hat c - if (dsqrt_shat.ne.0d0)then - if (nincoming.eq.2.and.sumdot(p(0,1),p(0,2),1d0) .lt. dsqrt_shat**2) then - passcuts=.false. - return - endif - endif + if(nincoming.eq.2) then + if (dsqrt_shat.ne.0d0.or.dsqrt_shatmax.ne.-1d0)then + xvar = sumdot(p(0,1),p(0,2),1d0) + if (xvar .lt. dsqrt_shat**2)then + passcuts=.false. + return + else if (dsqrt_shatmax.ne.-1d0 .and. xvar .gt. dsqrt_shatmax**2)then + passcuts = .false. + return + endif + endif + endif C $B$ DESACTIVATE_CUT $E$ !This is a tag for MadWeight if(debug) write (*,*) '=============================' diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/genps.f b/epochX/cudacpp/ee_mumu.mad/SubProcesses/genps.f index 1c32e93f5d..8503bdbec8 100644 --- a/epochX/cudacpp/ee_mumu.mad/SubProcesses/genps.f +++ b/epochX/cudacpp/ee_mumu.mad/SubProcesses/genps.f @@ -1373,6 +1373,10 @@ subroutine gen_s(x,smin,smax,spole,swidth,s,jac,pass) double precision smin,smax,spole,swidth,s,jac double precision x logical pass + include 'maxparticles.inc' + include '../../Source/vector.inc' + include 'run.inc' + include 'cuts.inc' c c Local c @@ -1384,6 +1388,10 @@ subroutine gen_s(x,smin,smax,spole,swidth,s,jac,pass) c----- c Begin Code c----- + if (dsqrt_shatmax.ne.-1d0)then + smax = min(smax, dsqrt_shatmax**2) + endif + pass=.true. if (jac .eq. 0 .and. .not. warned0) then print*,'Input jacobian 0 in genps' @@ -1628,7 +1636,10 @@ SUBROUTINE GENCMS(S,X1,X2,X,SMIN,SJACOBI) DOUBLE PRECISION ETA,ETAMIN,ETAMAX logical warned data warned/.false./ - + include 'maxparticles.inc' + include '../../Source/vector.inc' + include 'run.inc' + include 'cuts.inc' C------------ C BEGIN CODE C------------ @@ -1645,7 +1656,11 @@ SUBROUTINE GENCMS(S,X1,X2,X,SMIN,SJACOBI) C IF THERE IS NO S CHANNEL POLE USE BELOW: TAUMIN = 0d0 !SMIN/S !keep scale fix - TAUMAX = 1D0 + if (dsqrt_shatmax.ne.-1d0)then + TAUMAX=dsqrt_shatmax**2/S + else + TAUMAX = 1D0 + endif TAU = (TAUMAX-TAUMIN)*X(1)+TAUMIN SJACOBI= sjacobi*(TAUMAX-TAUMIN) @@ -1915,7 +1930,7 @@ double precision function get_channel_cut(p, config) if(sde_strat.eq.2)then t = dot(ptemp(0,-i), ptemp(0,-i)) Mass = prmass(-i, config) - get_channel_cut = get_channel_cut / ((t-Mass)*(t+Mass)+stot*1d-10)**2 + get_channel_cut = get_channel_cut / (t-Mass**2+stot*1d-10)**2 endif c write(*,*) i, "t, Mass, fact", t, Mass, ((t-Mass)*(t+Mass))**2,get_channel_cut t = t/stot @@ -1930,9 +1945,9 @@ double precision function get_channel_cut(p, config) t = dot(ptemp(0,-i), ptemp(0,-i)) Mass = prmass(-i, config) Width = prwidth(-i, config) - tmp = (t-Mass)*(t+Mass) + tmp = (t-Mass**2) tmp2 = Mass*Width - get_channel_cut = get_channel_cut* (tmp**2 - tmp2**2)/(tmp**2 + tmp2**2)**2 + get_channel_cut = get_channel_cut/(tmp**2 + tmp2**2) endif c write(*,*) i, "s, Mass, Width, fact", t, Mass, Width, (((t-Mass)*(t+Mass) )**2 + Width**2*Mass**2), get_channel_cut endif diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/myamp.f b/epochX/cudacpp/ee_mumu.mad/SubProcesses/myamp.f index 9e5f8d44dd..5360566ef4 100644 --- a/epochX/cudacpp/ee_mumu.mad/SubProcesses/myamp.f +++ b/epochX/cudacpp/ee_mumu.mad/SubProcesses/myamp.f @@ -231,6 +231,7 @@ subroutine set_peaks double precision x1,x2,xk(nexternal) double precision dr,mtot,etot,xqfact double precision spmass + double precision stot ! technically the min with dsqrt_shatmax**2 with the physical one integer i, iconfig, l1, l2, j, nt, nbw, iproc, k integer iden_part(-nexternal+1:nexternal) @@ -285,8 +286,8 @@ subroutine set_peaks integer lbw(0:nexternal) !Use of B.W. common /to_BW/ lbw - double precision stot,m1,m2 - common/to_stot/stot,m1,m2 + double precision real_stot,m1,m2 + common/to_stot/real_stot,m1,m2 include 'coupl.inc' ! needs VECSIZE_MEMMAX (defined in vector.inc) include 'cuts.inc' @@ -309,6 +310,12 @@ subroutine set_peaks c----- c Begin Code c----- + if (dsqrt_shatmax.ne.-1)then + stot = min(real_stot, dsqrt_shatmax**2) + else + stot = real_stot + endif + iconfig = this_config c needs to be initialise to avoid segfault do i = -nexternal,-1 diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/Gridpack/gridrun b/epochX/cudacpp/ee_mumu.mad/bin/internal/Gridpack/gridrun index 8c8f7d3940..01d4ab53f5 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/Gridpack/gridrun +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/Gridpack/gridrun @@ -91,7 +91,7 @@ import internal.madevent_interface as cmd_interface try: - cmd_line = cmd_interface.GridPackCmd(me_dir=root_path, nb_event=args[0], seed=args[1], gran=args[2]) + cmd_line = cmd_interface.GridPackCmd(me_dir=root_path, nb_event=args[0], seed=args[1], gran=args[2], nprocs=args[3], maxevts=args[4]) except KeyboardInterrupt: print('Quit on KeyboardInterrupt') diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/Gridpack/run.sh b/epochX/cudacpp/ee_mumu.mad/bin/internal/Gridpack/run.sh index 20adf572c2..2d149f96be 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/Gridpack/run.sh +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/Gridpack/run.sh @@ -14,6 +14,18 @@ # USAGE : run [num_events] [iseed] ## ############################################################################# +function usage() { + local retcode="${1:-1}" # default return code is 1 + echo "Usage:" + echo " run.sh [options] [num events] [seed]" + echo " run.sh [options] [num events] [seed] [granularity]" + echo "Options:" + echo " -h, --help print this message and exit" + echo " -p, --parallel [num procs] number of processes to run in parallel" + echo " -m, --maxevts [num events] maximum number of unweighted events per job" + exit $retcode +} + if [[ -d ./madevent ]]; then DIR='./madevent' else @@ -32,23 +44,46 @@ export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${PWD}/madevent/lib:${PWD}/HELAS/lib # For Mac OS X export DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:${PWD}/madevent/lib:${PWD}/HELAS/lib +pos_args=() +nprocs=1 +maxevts=2500 -if [[ ($1 != "") && ("$2" != "") && ("$3" == "") ]]; then - num_events=$1 - seed=$2 - gran=1 -elif [[ ($1 != "") && ("$2" != "") && ("$3" != "") ]]; then - num_events=$1 - seed=$2 - gran=$3 -else - echo "Warning: input is not correct. script requires two arguments: NB_EVENT SEED" -fi +while [[ $# -gt 0 ]]; do + case $1 in + -h|--help) + usage 0 ;; + -p|--parallel) + nprocs="$2" && shift && shift ;; + -m|--maxevts) + maxevts="$2" && shift && shift ;; + -*) + echo "Error: Unknown option $1" && usage ;; + *) + pos_args+=("$1") && shift ;; + esac +done + +case `echo "${pos_args[@]}" | wc -w | tr -d " "` in + "2") + num_events=${pos_args[0]} + seed=${pos_args[1]} + gran=1 + ;; + "3") + num_events=${pos_args[0]} + seed=${pos_args[1]} + gran=${pos_args[2]} + ;; + *) + echo "Error: number of arguments is not correct" + usage + ;; +esac -echo "Now generating $num_events events with random seed $seed and granularity $gran" +echo "Now generating $num_events events with random seed $seed and granularity $gran using $nprocs processes" ############ RUN THE PYTHON CODE ##################### -${DIR}/bin/gridrun $num_events $seed $gran +${DIR}/bin/gridrun $num_events $seed $gran $nprocs $maxevts ######################################################## ########### POSTPROCESSING ##################### diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/banner.py b/epochX/cudacpp/ee_mumu.mad/bin/internal/banner.py index 42d82818d0..022861fc31 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/banner.py +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/banner.py @@ -353,7 +353,7 @@ def modify_init_cross(self, cross, allow_zero=False): assert "init" in self cross = dict(cross) - for key in cross.keys(): + for key in list(cross.keys()): if isinstance(key, str) and key.isdigit() and int(key) not in cross: cross[int(key)] = cross[key] @@ -3318,7 +3318,6 @@ def retro_compatible_custom_fct(lines, mode=None): for i,line in enumerate(lines[:]): if search and re.search(include_pat, line): name = re.findall(include_pat, line)[0] - misc.sprint('DETECTED INCLUDE', name) if 'vector.inc' in name: search = False if 'run.inc' in name: @@ -3326,7 +3325,6 @@ def retro_compatible_custom_fct(lines, mode=None): search = False sol.append(line) if re.search(function_pat, line): - misc.sprint("DETECTED FCT") search = True return sol @@ -4201,6 +4199,7 @@ def default_setup(self): self.add_param("bwcutoff", 15.0) self.add_param("cut_decays", False, cut='d') self.add_param('dsqrt_shat',0., cut=True) + self.add_param('dsqrt_shatmax', -1, cut=True) self.add_param("nhel", 0, include=False) self.add_param("limhel", 1e-8, hidden=True, comment="threshold to determine if an helicity contributes when not MC over helicity.") #pt cut @@ -5577,6 +5576,9 @@ def default_setup(self): #technical self.add_param('folding', [1,1,1], include=False) + + #bias + self.add_param('flavour_bias',[5,1], hidden=True, comment="Example: '5,100' means that the probability to generate an event with a bottom (or anti-bottom) quark is increased by a factor 100, but the weight of those events is reduced by a factor 100. Requires that the 'event_norm' is set to 'bias'.") #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]") @@ -5790,6 +5792,17 @@ def check_validity(self): if self['mcatnlo_delta'] and not self['parton_shower'].lower() == 'pythia8': raise InvalidRunCard("MC@NLO-DELTA only possible with matching to Pythia8") + # check that the flavour_bias is consistent + if len(self['flavour_bias']) != 2: + raise InvalidRunCard("'flavour_bias' should contain exactly two numbers: the abs(PDG) of the flavour to enhance, and the enhancement multiplication factor.") + for i in self['flavour_bias']: + if i < 0: + raise InvalidRunCard("flavour and multiplication factor should be positive in the flavour_bias parameter") + if self['flavour_bias'][1] != 1 and self['event_norm'] != 'bias': + logger.warning('Non-trivial flavour enhancement factor: setting event normalisation to "bias"') + self['event_norm']='bias' + + # check that ebeam is bigger than the proton mass. for i in [1,2]: # do not for proton mass if not proton PDF (or when scan initialization) 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 bc785b5de6..a34705f6bc 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 @@ -1092,11 +1092,11 @@ def write_summary(self, path, order=None, lastline=False, nbcol=20): to_print = self.cross[-1:] for info in to_print: name = info['run_name'] - bench = info['bench'] + bench = [float(x) for x in info['bench']] data = [] for k in keys: if k in info: - data.append(info[k]) + data.append(float(info[k])) else: data.append(0.) ff.write(formatting % tuple([name] + bench + data)) 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 9ff7390cf5..541cd6294b 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 @@ -750,8 +750,8 @@ def __init__(self, me_dir, options, *args, **opts): else: self.ninitial = self.proc_characteristics['ninitial'] - def make_make_all_html_results(self, folder_names = [], jobs=[]): - return sum_html.make_all_html_results(self, folder_names, jobs) + def make_make_all_html_results(self, folder_names = [], jobs=[], get_attr=None): + return sum_html.make_all_html_results(self, folder_names, jobs, get_attr) def write_RunWeb(self, me_dir): @@ -3831,7 +3831,7 @@ def store_scan_result(self): """return the information that need to be kept for the scan summary. Auto-width are automatically added.""" - return {'cross': self.results.current['cross']} + return {'cross': self.results.current['cross'], 'error': self.results.current['error']} def add_error_log_in_html(self, errortype=None): @@ -5135,10 +5135,10 @@ def init_run(self, cards): self.special_shortcut.update( {'ebeam':([float],['run_card ebeam1 %(0)s', 'run_card ebeam2 %(0)s']), 'lpp': ([int],['run_card lpp1 %(0)s', 'run_card lpp2 %(0)s' ]), - 'lhc': ([int],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), + 'lhc': ([float],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), 'lep': ([int],['run_card lpp1 0', 'run_card lpp2 0', 'run_card ebeam1 %(0)s/2', 'run_card ebeam2 %(0)s/2']), 'ilc': ([int],['run_card lpp1 0', 'run_card lpp2 0', 'run_card ebeam1 %(0)s/2', 'run_card ebeam2 %(0)s/2']), - 'lcc': ([int],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), + 'lcc': ([float],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), 'fixed_scale': ([float],['run_card fixed_fac_scale T', 'run_card fixed_ren_scale T', 'run_card scale %(0)s', 'run_card dsqrt_q2fact1 %(0)s' ,'run_card dsqrt_q2fact2 %(0)s']), 'no_parton_cut':([],['run_card nocut T']), 'cm_velocity':([float], [lambda self :self.set_CM_velocity]), @@ -6740,7 +6740,15 @@ def postcmd(self, stop, line): return ending_question - + def help_update(self): + logger.info(""" syntax: update dependent: Change the mass/width of particles which are not free parameter for the model. + update missing: add to the current param_card missing blocks/parameters. + update to_slha1: pass SLHA2 card to SLHA1 convention. (beta) + update to_slha2: pass SLHA1 card to SLHA2 convention. (beta) + update to_full [run_card] + update XXX [where XXX correspond to a hidden block of the run_card]: + supported block are %s + """, ', '.join(self.update_block)) def do_update(self, line, timer=0): @@ -6756,6 +6764,8 @@ def do_update(self, line, timer=0): logger.warning('miss an argument (dependent or missing). Please retry') return + args[0] = args[0].lower() + if args[0] == 'dependent': if not self.mother_interface: logger.warning('Failed to update dependent parameter. This might create trouble for external program (like MadSpin/shower/...)') @@ -6805,10 +6815,11 @@ def do_update(self, line, timer=0): self.modified_card.add('run') # delay writting of the run_card logger.info('add optional block %s to the run_card', args[0]) else: - self.help_update() + self.do_help('update') logger.warning('unvalid options for update command. Please retry') + def update_to_full(self, line): """ trigger via update to_full LINE""" 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 789976beee..c321fd88e5 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/extended_cmd.py +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/extended_cmd.py @@ -1317,6 +1317,8 @@ def nice_error_handling(self, error, line): debug_file = open(self.debug_output, 'a') traceback.print_exc(file=debug_file) + if __debug__: + traceback.print_exc() if hasattr(error, 'filename'): debug_file.write("Related File: %s\n" % error.filename) # Create a nice error output @@ -1928,7 +1930,8 @@ def do_display(self, line, output=sys.stdout): for i, name in enumerate(split): try: __import__('.'.join(split[:i+1])) - exec('%s=sys.modules[\'%s\']' % (split[i], '.'.join(split[:i+1]))) + tmp = {} + exec('%s=sys.modules[\'%s\']' % (split[i], '.'.join(split[:i+1])), globals(),tmp) except ImportError: try: var = eval(args[1]) @@ -1939,7 +1942,7 @@ def do_display(self, line, output=sys.stdout): outstr += 'EXTERNAL:\n' outstr += misc.nice_representation(var, nb_space=4) else: - var = eval(args[1]) + var = eval(args[1], globals(), tmp) outstr += 'EXTERNAL:\n' outstr += misc.nice_representation(var, nb_space=4) diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/file_writers.py b/epochX/cudacpp/ee_mumu.mad/bin/internal/file_writers.py index 526756129f..74ba0d195c 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/file_writers.py +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/file_writers.py @@ -140,10 +140,6 @@ def preprocess_template(self, input_lines, context={}): else: raise self.FileWriterError("%s not string" % repr(input_lines)) - # Setup the contextual environment - for contextual_variable, value in context.items(): - exec('%s=%s'%(str(contextual_variable),repr(value))) - res = [] # The variable below tracks the conditional statements structure if_stack = [] @@ -166,7 +162,7 @@ def preprocess_template(self, input_lines, context={}): # Treat an if statement elif preproc_command.group('command')=='if': try: - if_stack.append(eval(preproc_command.group('body'))==True) + if_stack.append(eval(preproc_command.group('body'), globals(), context)==True) except Exception as e: raise self.FilePreProcessingError('Could not evaluate'+\ "python expression '%s' given the context %s provided."%\ diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/files.py b/epochX/cudacpp/ee_mumu.mad/bin/internal/files.py index 551b71ddb6..3061b007e7 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/files.py +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/files.py @@ -147,9 +147,14 @@ def cp(path1, path2, log=True, error=False): path2 = format_path(path2) try: shutil.copy(path1, path2) + except shutil.Error as why: + logger.debug('no cp since identical: %s', why) + return except IOError as why: import madgraph.various.misc as misc try: + if 'same file' in str(why): + return if os.path.exists(path2): path2 = os.path.join(path2, os.path.split(path1)[1]) misc.copytree(path1, path2) @@ -157,12 +162,10 @@ def cp(path1, path2, log=True, error=False): if error: raise if log: - logger.warning(why) + logger.warning("fail to cp", path1, path2, why) else: - misc.sprint("fail to cp", why) - except shutil.Error: - # idetical file - pass + misc.sprint("fail to cp",path1,path2, why) + def rm(path, log=True): """removes path, that can be a single element or a list""" diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/gen_cardhtml-pl b/epochX/cudacpp/ee_mumu.mad/bin/internal/gen_cardhtml-pl index 1810c6c082..6e0e06533d 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/gen_cardhtml-pl +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/gen_cardhtml-pl @@ -137,7 +137,7 @@ until($listpos>$#incard){ print PAGE " Model: $model \n"; print PAGE " \n \n
\n"; print PAGE " \n"; - print PAGE "\"\" \n"; + print PAGE "\"\" \n"; print PAGE "
\n"; print PAGE " \n \n \n"; print PAGE " \n"; diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/gen_crossxhtml.py b/epochX/cudacpp/ee_mumu.mad/bin/internal/gen_crossxhtml.py index 681bf9d09b..3114a4350c 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/gen_crossxhtml.py +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/gen_crossxhtml.py @@ -133,7 +133,7 @@ class AllResults(dict): web = False - _run_entries = ['cross', 'error','nb_event_pythia','run_mode','run_statistics', + _run_entries = ['cross', 'error','axsec','nb_event_pythia','run_mode','run_statistics', 'nb_event','cross_pythia','error_pythia', 'nb_event_pythia8','cross_pythia8','error_pythia8', 'shower_dir'] diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/gen_jpeg-pl b/epochX/cudacpp/ee_mumu.mad/bin/internal/gen_jpeg-pl index 87d03da394..31b7e9fe55 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/gen_jpeg-pl +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/gen_jpeg-pl @@ -1,16 +1,16 @@ #!/usr/bin/perl -w #--------------------------------------------------------------------- -# Run GS to create jpeg files defined as $gs +# Run GS to create PNG files defined as $gs #--------------------------------------------------------------------- -system("/bin/bash -c \"rm -f matrix*.jpg\" "); +system("/bin/bash -c \"rm -f matrix*.png\" "); $imatrix = ""; if (! -e "matrix.ps") {$imatrix = 1;} -$max_jpg = 2; -if ($imatrix eq "") {$max_jpg = 5;} -# add 1 to max_jpg, to get max_jpg pages -$max_jpg += 1; +$max_png = 2; +if ($imatrix eq "") {$max_png = 5;} +# add 1 to max_png, to get max_png pages +$max_png += 1; open(PAGE,"> diagrams.html") || die "Error creating diagrams.html"; print PAGE "\ \n"; print PAGE "\ \n"; @@ -21,22 +21,22 @@ while ( -e "matrix$imatrix.ps"){ open(IN, "< matrix$imatrix.ps") || die "No file matrix$imatrix.ps"; open(OUT, "> matrix-1.ps") || die "Could not open file matrix-1.ps"; while () { - if ($_ =~ m/^%%Page: $max_jpg $max_jpg/) {last;} + if ($_ =~ m/^%%Page: $max_png $max_png/) {last;} else {print OUT $_, "\n";} } close(OUT); close(IN); - system "/bin/bash -c \"nice gs \-sDEVICE\=jpeg \-sOutputFile\=matrix$imatrix\%00d.jpg \-q \-dNOPAUSE \-dBATCH matrix-1.ps > /dev/null\""; + system "/bin/bash -c \"nice gs \-sDEVICE\=pngmono \-r150 \-sOutputFile\=matrix$imatrix\%00d.png \-q \-dNOPAUSE \-dBATCH matrix-1.ps > /dev/null\""; system "rm -f matrix-1.ps"; -# Determine how many jpg files we have +# Determine how many png files we have $pages=1; - while(-e "matrix$imatrix$pages.jpg"){ + while(-e "matrix$imatrix$pages.png"){ $pages++; }#end of while #reduce it by one - if ($pages > $max_jpg){ + if ($pages > $max_png){ $pages -= 1; } # Find name of process @@ -45,24 +45,24 @@ while ( -e "matrix$imatrix.ps"){ if ($proc =~ /Process: (.+?)(\s\w+=\d+)*$/) { $proc = $1; } print PAGE "

\ Postscript Diagrams for $proc\<\/A\> \ \n"; for($j=1;$j<$pages;$j++){ - print PAGE "\\"Page \ \n"; + print PAGE "\\"Page \ \n"; }#end of for # -# In case I didn't include all of the diagrams as jpeg, warn user +# In case I didn't include all of the diagrams as PNG, warn user # - if (-e "matrix$imatrix$max_jpg.jpg" ) { - print PAGE "

To save bandwidth not all diagrams were converted to jpeg."; + if (-e "matrix$imatrix$max_png.png" ) { + print PAGE "

To save bandwidth not all diagrams were converted to PNG."; print PAGE "

To view all diagrams click on "; print PAGE "\ postscript. \<\/A\> \ \n"; # # Delete files which aren't included in diagrams.html # - system ("/bin/bash -c \"rm -f matrix$max_jpg.jpg\" "); + system ("/bin/bash -c \"rm -f matrix$max_png.png\" "); } # -# Now create jpeg file for card +# Now create PNG file for card # - if (! -e "../../HTML/card.jpg") { + if (! -e "../../HTML/card.png") { system ("/bin/bash -c \"head -352 matrix$imatrix.ps >& junk.ps\" "); open(JUNK,">> junk.ps") || die "Error opening junk.ps"; @@ -72,7 +72,7 @@ while ( -e "matrix$imatrix.ps"){ system ("/bin/bash -c \"cat matrix$imatrix.ps | sed 1,352d >> junk.ps\" "); - system "/bin/bash -c \"nice gs \-sDEVICE\=jpeg \-sOutputFile\=card.jpg \-q \-dNOPAUSE \-dBATCH \-g180x150 ./junk.ps; rm -f junk.ps; cp -p card.jpg ../../HTML/card.jpg > /dev/null\" "; + system "/bin/bash -c \"nice gs \-sDEVICE\=pngmono \-sOutputFile\=card.png \-q \-dNOPAUSE \-dBATCH \-g180x150 ./junk.ps; rm -f junk.ps; cp -p card.png ../../HTML/card.png > /dev/null\" "; } if ($imatrix eq "") {$imatrix = 0;} $imatrix = $imatrix + 1; @@ -82,3 +82,4 @@ print PAGE "\n"; print PAGE "\<\/BODY\> \n"; print PAGE "\<\/HTML\> \n"; close(PAGE); + 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 415ecc9de0..d5d7fc8faf 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/gen_ximprove.py +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/gen_ximprove.py @@ -30,6 +30,7 @@ import stat import sys import six +import time from six.moves import range from six.moves import zip @@ -304,6 +305,7 @@ def get_helicity(self, to_submit=True, clean=True): logger.debug('(%s) nb_hel: %s zero amp: %s bad_amps_hel: %s/%s', split_file[-1], len(good_hels),len(bad_amps),len(bad_amps_perhel), len(good_hels)*nb_amp ) if len(good_hels) == 1: files.cp(matrix_file, matrix_file.replace('orig','optim')) + files.cp(matrix_file.replace('.f','.o'), matrix_file.replace('orig','optim').replace('.f','.o')) continue # avoid optimization if onlye one helicity gauge = self.cmd.proc_characteristics['gauge'] @@ -1059,6 +1061,7 @@ def __init__(self, cmd, opt=None): # parameter for the gridpack run self.nreq = 2000 self.iseed = 4321 + self.maxevts = 2500 # placeholder for information self.results = 0 #updated in launch/update_html @@ -1200,6 +1203,10 @@ def reset_multijob(self): def write_multijob(self, Channel, nb_split): """ """ if nb_split <=1: + try: + os.remove(pjoin(self.me_dir, 'SubProcesses', Channel.get('name'), 'multijob.dat')) + except OSError: + pass return f = open(pjoin(self.me_dir, 'SubProcesses', Channel.get('name'), 'multijob.dat'), 'w') f.write('%i\n' % nb_split) @@ -1828,17 +1835,17 @@ class gen_ximprove_gridpack(gen_ximprove_v4): 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 gen_events_security = 1.00 - def __new__(cls, *args, **opts): + def __new__(cls, cmd, opts): cls.force_class = 'gridpack' - return super(gen_ximprove_gridpack, cls).__new__(cls, *args, **opts) + return super(gen_ximprove_gridpack, cls).__new__(cls, cmd, opts) - def __init__(self, *args, **opts): + def __init__(self, cmd, opts): self.ngran = -1 + self.nprocs = 1 self.gscalefact = {} self.readonly = False if 'ngran' in opts: @@ -1846,9 +1853,18 @@ def __init__(self, *args, **opts): # del opts['ngran'] if 'readonly' in opts: self.readonly = opts['readonly'] - super(gen_ximprove_gridpack,self).__init__(*args, **opts) + if 'nprocs' in opts: + self.nprocs = int(opts['nprocs']) + if 'maxevts' in opts and self.nprocs > 1: + self.max_request_event = int(opts['maxevts']) + super(gen_ximprove_gridpack,self).__init__(cmd, opts) if self.ngran == -1: self.ngran = 1 + + if self.nprocs > 1: + self.combining_job = 0 + else: + self.combining_job = sys.maxsize def find_job_for_event(self): """return the list of channel that need to be improved""" @@ -1876,8 +1892,8 @@ def find_job_for_event(self): continue # no event to generate events self.gscalefact[tag] = max(1, 1/(goal_lum * C.get('axsec')/ self.ngran)) #need to generate events - logger.debug('request events for ', C.get('name'), 'cross=', - C.get('axsec'), 'needed events = ', goal_lum * C.get('axsec')) + logger.debug('request events for %s cross=%d needed events = %d', + C.get('name'), C.get('axsec'), goal_lum * C.get('axsec')) to_refine.append(C) logger.info('need to improve %s channels' % len(to_refine)) @@ -1897,8 +1913,13 @@ def get_job_for_event(self): 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 - + nb_split = int(max(1,((needed_event-1)// self.max_request_event) +1)) + if not self.split_channels: + nb_split = 1 + if nb_split > self.max_splitting: + 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')) @@ -1908,13 +1929,16 @@ def get_job_for_event(self): nevents = self.max_event_in_iter if nevents < self.min_event_in_iter: + nb_split = int(nb_split * nevents / self.min_event_in_iter) + 1 # sr dangerous? nevents = self.min_event_in_iter # # 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) - + # write the multi-job information + self.write_multijob(C, nb_split) + #create the info dict assume no splitting for the default info = {'name': self.cmd.results.current['run_name'], 'script_name': 'unknown', @@ -1925,7 +1949,7 @@ def get_job_for_event(self): 'nevents': nevents, #int(nevents*self.gen_events_security)+1, 'maxiter': self.max_iter, 'miniter': self.min_iter, - 'precision': -1*int(needed_event)/C.get('axsec'), + 'precision': -goal_lum/nb_split, # -1*int(needed_event)/C.get('axsec'), 'requested_event': needed_event, 'nhel': self.run_card['nhel'], 'channel': C.name.replace('G',''), @@ -1938,27 +1962,59 @@ def get_job_for_event(self): basedir = pjoin(os.path.dirname(__file__), '..','..','SubProcesses', info['P_dir'], info['directory']) info['base_directory'] = basedir - jobs.append(info) - + if nb_split == 1: + jobs.append(info) + else: + for i in range(nb_split): + new_info = dict(info) + new_info['offset'] = i+1 + new_info['directory'] += self.alphabet[i % 26] + str((i+1)//26) + new_info['base_directory'] = info['directory'] + jobs.append(new_info) write_dir = '.' if self.readonly else None self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), jobs, write_dir) + if self.nprocs > 1: + nprocs_cluster = cluster.MultiCore(nb_core=self.nprocs) + gridpack_start = time.time() + def gridpack_wait_monitoring(Idle, Running, Done): + if Idle+Running+Done == 0: + return + logger.info("Gridpack event generation: %s Idle, %s Running, %s Done [%s]" + % (Idle, Running, Done, misc.format_time(time.time()-gridpack_start))) + done = [] for j in jobs: - if j['P_dir'] in done: - continue - done.append(j['P_dir']) + if self.nprocs == 1: + if j['P_dir'] in done: + continue + done.append(j['P_dir']) + # Give a little status. Sometimes these jobs run very long, and having hours without any + # console output can be a bit frightening and make users think we are looping. + if len(done)%5==0: + logger.info(f"Working on job {len(done)} of {len(jobs)}") + # set the working directory path. pwd = pjoin(os.getcwd(),j['P_dir']) if self.readonly else pjoin(self.me_dir, 'SubProcesses', j['P_dir']) - exe = pjoin(pwd, 'ajob1') + exe = pjoin(pwd, j['script_name']) st = os.stat(exe) os.chmod(exe, st.st_mode | stat.S_IEXEC) # run the code\ - cluster.onecore.launch_and_wait(exe, cwd=pwd, packet_member=j['packet']) + if self.nprocs == 1: + cluster.onecore.launch_and_wait(exe, cwd=pwd, packet_member=j['packet']) + else: + nprocs_cluster.cluster_submit(exe, cwd=pwd, packet_member=j['packet']) write_dir = '.' if self.readonly else pjoin(self.me_dir, 'SubProcesses') + if self.nprocs > 1: + nprocs_cluster.wait(self.me_dir, gridpack_wait_monitoring) + + if self.readonly: + combine_runs.CombineRuns(write_dir) + else: + combine_runs.CombineRuns(self.me_dir) self.check_events(goal_lum, to_refine, jobs, write_dir) def check_events(self, goal_lum, to_refine, jobs, Sdir): diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/hel_recycle.py b/epochX/cudacpp/ee_mumu.mad/bin/internal/hel_recycle.py index 1471de4bcb..978ba6575e 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/hel_recycle.py +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/hel_recycle.py @@ -550,7 +550,7 @@ def get_jamp_lines(self, line): def get_amp2_lines(self, line): if line.startswith(' DO I = 1, NCOLOR'): self.in_amp2 = False - elif not line.isspace(): + elif not line.isspace() and 'DENOM' not in line: self.template_dict['amp2_lines'] += f'{line[0:6]} {self.add_indices(line[6:])}' def prepare_bools(self): diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/histograms.py b/epochX/cudacpp/ee_mumu.mad/bin/internal/histograms.py index 51ae2914fc..d68c560806 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/histograms.py +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/histograms.py @@ -1149,11 +1149,8 @@ def parse_one_histo_from_stream(self, stream, all_weight_header, boundaries = [0.0,0.0] for j, weight in \ enumerate(HwU.histo_bin_weight_re.finditer(line_bin)): - if (j == len(weight_header)): - continue - if j == len(all_weight_header): - raise HwU.ParseError("There is more bin weights"+\ - " specified than expected (%i)"%len(weight_header)) + #if (j == len(weight_header)): + # continue if selected_central_weight == all_weight_header[j]: bin_weights['central'] = float(weight.group('weight')) if all_weight_header[j] == 'boundary_xmin': @@ -2480,14 +2477,14 @@ def get_main_central_plot_lines(HwU_name, block_position, color_index, # return [template_no_stat%rep_dic]+\ # ([template%rep_dic] if show_mc_uncertainties else []) - # The use of sqrt(-1) is just a trick to prevent the line to display + # The use of 1/0 is just a trick to prevent the line to display res = [] - rep_dic['data'] = '($3 < 0 ? sqrt(-1) : $3)' + rep_dic['data'] = '($3 < 0 ? 1/0 : $3)' res.append(template_no_stat%rep_dic) rep_dic['title'] = " title ''" if show_mc_uncertainties: res.append(template%rep_dic) - rep_dic['data'] = '($3 >= 0 ? sqrt(-1) : abs($3))' + rep_dic['data'] = '($3 >= 0 ? 1/0 : abs($3))' rep_dic['ls'] = ' ls %d'%(100+color_index) res.append(template_no_stat%rep_dic) if show_mc_uncertainties: @@ -2739,13 +2736,13 @@ def ratio_no_correlations(wgtsA, wgtsB): """#-- rendering subhistograms '%(subhistogram_type)s' %(unset label)s %(set_format_y)s +%(set_yscale)s set yrange [%(ymin).4e:%(ymax).4e] set origin %(origin_x).4e, %(origin_y).4e set size %(size_x).4e, %(size_y).4e set mytics %(mytics)d %(set_ytics)s %(set_format_x)s -%(set_yscale)s %(set_ylabel)s %(set_histo_label)s plot \\""" @@ -2878,7 +2875,7 @@ def ratio_no_correlations(wgtsA, wgtsB): # We decide to show uncertainties in the main plot only if they # are part of a monocolor band. Otherwise, they will only be - # shown in the first subplot. Notice that plotting 'sqrt(-1)' + # shown in the first subplot. Notice that plotting '1/0' # is just a trick so as to have only the key printed with no # line @@ -2890,7 +2887,7 @@ def ratio_no_correlations(wgtsA, wgtsB): '%s, scale variation'%title, band='scale' in use_band) else: uncertainty_plot_lines[-1]['scale'] = \ - ["sqrt(-1) ls %d title '%s'"%(color_index+10,'%s, scale variation'%title)] + ["1/0 ls %d title '%s'"%(color_index+10,'%s, scale variation'%title)] # And now PDF_variation if available if not PDF_var_pos is None and len(PDF_var_pos)>0: if 'pdf' in use_band: @@ -2899,7 +2896,7 @@ def ratio_no_correlations(wgtsA, wgtsB): '%s, PDF variation'%title, band='pdf' in use_band) else: uncertainty_plot_lines[-1]['pdf'] = \ - ["sqrt(-1) ls %d title '%s'"%(color_index+20,'%s, PDF variation'%title)] + ["1/0 ls %d title '%s'"%(color_index+20,'%s, PDF variation'%title)] # And now merging variation if available if not merging_var_pos is None and len(merging_var_pos)>0: if 'merging_scale' in use_band: @@ -2908,7 +2905,7 @@ def ratio_no_correlations(wgtsA, wgtsB): '%s, merging scale variation'%title, band='merging_scale' in use_band) else: uncertainty_plot_lines[-1]['merging_scale'] = \ - ["sqrt(-1) ls %d title '%s'"%(color_index+30,'%s, merging scale variation'%title)] + ["1/0 ls %d title '%s'"%(color_index+30,'%s, merging scale variation'%title)] # And now alpsfact variation if available if not alpsfact_var_pos is None and len(alpsfact_var_pos)>0: if 'alpsfact' in use_band: @@ -2917,7 +2914,7 @@ def ratio_no_correlations(wgtsA, wgtsB): '%s, alpsfact variation'%title, band='alpsfact' in use_band) else: uncertainty_plot_lines[-1]['alpsfact'] = \ - ["sqrt(-1) ls %d title '%s'"%(color_index+40,'%s, alpsfact variation'%title)] + ["1/0 ls %d title '%s'"%(color_index+40,'%s, alpsfact variation'%title)] # plot_lines.append( # "'%s' index %d using (($1+$2)/2):3 ls %d title '%s'"\ 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 0924927785..ba08c10340 100644 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/launch_plugin.py +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/launch_plugin.py @@ -33,7 +33,7 @@ def compile(self, *args, **opts): if 'cwd' in opts and os.path.basename(opts['cwd']) == 'Source': path = pjoin(opts['cwd'], 'make_opts') common_run_interface.CommonRunCmd.update_make_opts_full(path, - {'FPTYPE': self.run_card['floating_type'] }) + {'override FPTYPE': self.run_card['floating_type'] }) misc.sprint('FPTYPE checked') cudacpp_supported_backends = [ 'fortran', 'cuda', 'hip', 'cpp', 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z', 'cppauto' ] if args and args[0][0] == 'madevent' and hasattr(self, 'run_card'): @@ -76,7 +76,7 @@ def reset_makeopts(self, old_value, new_value, name): if not hasattr(self, 'path'): raise Exception if name == 'floating_type': - common_run_interface.CommonRunCmd.update_make_opts_full({'FPTYPE': new_value}) + common_run_interface.CommonRunCmd.update_make_opts_full({'override FPTYPE': new_value}) else: raise Exception Sourcedir = pjoin(os.path.dirname(os.path.dirname(self.path)), 'Source') diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/lhe_parser.py b/epochX/cudacpp/ee_mumu.mad/bin/internal/lhe_parser.py index f6e47956cd..76ded329c0 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/lhe_parser.py +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/lhe_parser.py @@ -2953,8 +2953,8 @@ def pt(self): @property def pseudorapidity(self): - norm = math.sqrt(self.px**2 + self.py**2+self.pz**2) - return 0.5* math.log((norm - self.pz) / (norm + self.pz)) + norm = math.sqrt(self.px**2 + self.py**2 + self.pz**2) + return 0.5* math.log((norm + self.pz) / (norm - self.pz)) @property def rapidity(self): 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 85e5bcf5e3..2852f1d4d8 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/madevent_interface.py +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/madevent_interface.py @@ -1171,10 +1171,10 @@ def check_survey(self, args, cmd='survey'): for opt,value in self._survey_options.items(): if arg.startswith('--%s=' % opt): exec('self.opts[\'%s\'] = %s(arg.split(\'=\')[-1])' % \ - (opt, value[0])) + (opt, value[0]), globals(), {'self':self, 'arg':arg}) arg = "" if arg != "": raise Exception - except Exception: + except Exception as error: self.help_survey() raise self.InvalidCmd('invalid %s argument'% arg) @@ -3656,9 +3656,11 @@ def do_refine(self, line): else: self.refine_mode = "new" - cross, error = self.make_make_all_html_results() + cross, error, across = self.make_make_all_html_results(get_attr=('xsec','xerru','axsec')) + self.results.add_detail('cross', cross) self.results.add_detail('error', error) + self.results.add_detail('axsec', across) self.results.add_detail('run_statistics', dict(self.results.get_detail('run_statistics'))) @@ -3786,7 +3788,7 @@ def split(a, n): for i, local_G in enumerate(split(Gdirs, nb_chunk)): line = [pjoin(self.me_dir, "Events", self.run_name, "partials%d.lhe.gz" % i)] line.append(pjoin(self.me_dir, 'Events', self.run_name, '%s_%s_banner.txt' % (self.run_name, tag))) - line.append(str(self.results.current['cross'])) + line.append(str(self.results.current.get('axsec'))) line += local_G partials_info.append(self.do_combine_events_partial(' '.join(line), preprocess_only=True)) mycluster.submit(sys.executable, @@ -6749,7 +6751,7 @@ def get_subP_ids(path): class GridPackCmd(MadEventCmd): """The command for the gridpack --Those are not suppose to be use interactively--""" - def __init__(self, me_dir = None, nb_event=0, seed=0, gran=-1, *completekey, **stdin): + def __init__(self, me_dir = None, nb_event=0, seed=0, gran=-1, nprocs=1, maxevts=2500, *completekey, **stdin): """Initialize the command and directly run""" # Initialize properly @@ -6759,6 +6761,8 @@ 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.nprocs = nprocs + self.maxevts = maxevts self.options['automatic_html_opening'] = False #write the grid_card.dat on disk @@ -6874,7 +6878,7 @@ def launch(self, nb_event, seed): #misc.call([pjoin(self.me_dir,'bin','refine4grid'), # str(nb_event), '0', 'Madevent','1','GridRun_%s' % seed], # cwd=self.me_dir) - self.refine4grid(nb_event) + self.gridpack_cross = self.refine4grid(nb_event) # 3) Combine the events/pythia/... self.exec_cmd('combine_events') @@ -6902,6 +6906,8 @@ def refine4grid(self, nb_event): precision = nb_event + across= self.make_make_all_html_results(get_attr='axsec') + self.opts = dict([(key,value[1]) for (key,value) in \ self._survey_options.items()]) @@ -6915,8 +6921,9 @@ def refine4grid(self, nb_event): 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} + refine_opt = {'err_goal': nb_event, 'split_channels': True, + 'ngran':self.granularity, 'readonly': self.readonly, + 'nprocs': self.nprocs, 'maxevts': self.maxevts} 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 @@ -6926,7 +6933,7 @@ def refine4grid(self, nb_event): #print 'run combine!!!' #combine_runs.CombineRuns(self.me_dir) - return + return across #update html output Presults = sum_html.collect_result(self) cross, error = Presults.xsec, Presults.xerru @@ -7051,10 +7058,14 @@ def do_combine_events(self, line): sum_axsec += result.get('axsec')*gscalefact[Gdir] if len(AllEvent) >= 80: #perform a partial unweighting - if self.results.current['cross'] == 0 and self.run_card['gridpack']: - nb_event= self.nb_event + if not self.results.current.get('axsec'): + if self.run_card['gridpack'] and self.gridpack_cross: + nb_event = min(abs(1.05*self.nb_event*sum_axsec/self.gridpack_cross),self.nb_event) + else: + nb_event= self.nb_event else: - nb_event = min(abs(1.01*self.nb_event*sum_axsec/self.results.current['cross']),self.run_card['nevents']) + nb_event = min(abs(1.01*self.nb_event*sum_axsec/self.results.current.get('axsec')),self.run_card['nevents'], self.nb_event, self.gridpack_cross, sum_axsec) + misc.sprint(nb_event, self.results.current.get('axsec'), self.gridpack_cross) AllEvent.unweight(pjoin(outdir, self.run_name, "partials%s.lhe.gz" % partials), get_wgt, log_level=5, trunc_error=1e-2, event_target=nb_event) AllEvent = lhe_parser.MultiEventFile() @@ -7068,6 +7079,7 @@ def do_combine_events(self, line): for data in partials_info: AllEvent.add(*data) + sum_xsec += data[1] if not hasattr(self,'proc_characteristic'): self.proc_characteristic = self.get_characteristics() diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/restore_data b/epochX/cudacpp/ee_mumu.mad/bin/internal/restore_data index 6205bb9567..407ed7aa91 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/restore_data +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/restore_data @@ -48,8 +48,17 @@ for i in `cat subproc.mg` ; do cd ../ done +# check if we are on a Mac, otherwise assume Linux +if [[ "$OSTYPE" == "darwin"* ]]; then + # no nproc on Mac, so use sysctl instead + # use -S1024 because there is a limit on the length of the command + xargs_opts="-P $(sysctl -n hw.ncpu) -S1024" +else + xargs_opts="-P $(nproc --all)" +fi + find . -mindepth 2 -maxdepth 2 -type d -name 'G*' -print0 \ - | xargs --null -P "$(nproc --all)" -I{} bash -c " + | xargs --null ${xargs_opts} -I{} bash -c " cd {} for j in $1_results.dat ; do if [[ -e \$j ]] ; then diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/sum_html.py b/epochX/cudacpp/ee_mumu.mad/bin/internal/sum_html.py index 9dd5826f71..fb8dd3a74a 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/sum_html.py +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/sum_html.py @@ -770,7 +770,7 @@ def collect_result(cmd, folder_names=[], jobs=None, main_dir=None): return all -def make_all_html_results(cmd, folder_names = [], jobs=[]): +def make_all_html_results(cmd, folder_names = [], jobs=[], get_attr=None): """ folder_names and jobs have been added for the amcatnlo runs """ run = cmd.results.current['run_name'] if not os.path.exists(pjoin(cmd.me_dir, 'HTML', run)): @@ -794,7 +794,12 @@ def make_all_html_results(cmd, folder_names = [], jobs=[]): fsock.write('%s

' % Presults.get_html(run, unit, cmd.me_dir)) fsock.write('%s
' % P_text) - return Presults.xsec, Presults.xerru + if not get_attr: + return Presults.xsec, Presults.xerru + else: + if isinstance(get_attr, tuple): + return [getattr(Presults, _) for _ in get_attr] + return getattr(Presults, get_attr) diff --git a/epochX/cudacpp/ee_mumu.mad/bin/internal/ufomodel/write_param_card.py b/epochX/cudacpp/ee_mumu.mad/bin/internal/ufomodel/write_param_card.py index 57a85b0614..33a89259f8 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/ufomodel/write_param_card.py +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/ufomodel/write_param_card.py @@ -116,9 +116,10 @@ def write_param(self, param, lhablock): def write_dep_param_block(self, lhablock): import cmath from parameters import all_parameters + param_values = {'cmath':cmath} for parameter in all_parameters: try: - exec("%s = %s" % (parameter.name, parameter.value)) + exec("%s = %s" % (parameter.name, parameter.value), globals(), param_values) except Exception: pass text = "## Not dependent paramater.\n" @@ -134,7 +135,7 @@ def write_dep_param_block(self, lhablock): prefix = "DECAY " for part, param in data: if isinstance(param.value, str): - value = complex(eval(param.value)).real + value = complex(eval(param.value, globals(), param_values)).real else: value = param.value diff --git a/epochX/cudacpp/ee_mumu.mad/bin/madevent b/epochX/cudacpp/ee_mumu.mad/bin/madevent index dff9711b73..9c5363e682 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/madevent +++ b/epochX/cudacpp/ee_mumu.mad/bin/madevent @@ -178,6 +178,17 @@ force_run = False if (args and args[0] == 'treatcards'): force_run=True + +# check that madgraph is not in PYTHONPATH +try: + import madgraph +except ImportError: + pass +else: + logger.getLogger('madgraph').error('Looks like you do have madgraph in your PYTHONPATH (or you run this executable from the main MG5aMC directory). This executable will likely not work in such case.') + + + # Call the cmd interface main loop try: if '-h' in args or '--help' in args: diff --git a/epochX/cudacpp/ee_mumu.mad/src/HelAmps_sm.h b/epochX/cudacpp/ee_mumu.mad/src/HelAmps_sm.h index 18f664e0d1..337ed3e675 100644 --- a/epochX/cudacpp/ee_mumu.mad/src/HelAmps_sm.h +++ b/epochX/cudacpp/ee_mumu.mad/src/HelAmps_sm.h @@ -8,7 +8,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/ee_mumu.mad/src/Parameters_sm.cc b/epochX/cudacpp/ee_mumu.mad/src/Parameters_sm.cc index 37676c1d8d..a34d22a043 100644 --- a/epochX/cudacpp/ee_mumu.mad/src/Parameters_sm.cc +++ b/epochX/cudacpp/ee_mumu.mad/src/Parameters_sm.cc @@ -7,7 +7,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/ee_mumu.mad/src/Parameters_sm.h b/epochX/cudacpp/ee_mumu.mad/src/Parameters_sm.h index 5fcde71f6b..9d95e01e1b 100644 --- a/epochX/cudacpp/ee_mumu.mad/src/Parameters_sm.h +++ b/epochX/cudacpp/ee_mumu.mad/src/Parameters_sm.h @@ -7,7 +7,7 @@ // Further modified by: A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/ee_mumu.sa/CODEGEN_cudacpp_ee_mumu_log.txt b/epochX/cudacpp/ee_mumu.sa/CODEGEN_cudacpp_ee_mumu_log.txt index f27925604a..35d7ce4ba9 100644 --- a/epochX/cudacpp/ee_mumu.sa/CODEGEN_cudacpp_ee_mumu_log.txt +++ b/epochX/cudacpp/ee_mumu.sa/CODEGEN_cudacpp_ee_mumu_log.txt @@ -1,8 +1,18 @@ +WARNING:root:python3.12 support is still experimental. For the moment re-weighting is NOT working and do expect a LOT of syntax warning. We do not advise python3.12 for production for the moment. +/shared/roiser/sw/madgraph4gpu/MG5aMC/mg5amcnlo/madgraph/various/banner.py:3309: SyntaxWarning: invalid escape sequence '\s' + function_pat = re.compile('^\s+(?:SUBROUTINE|(?:%(type)s)\s+function)\s+([a-zA-Z]\w*)' \ +/shared/roiser/sw/madgraph4gpu/MG5aMC/mg5amcnlo/madgraph/iolibs/export_v4.py:4187: SyntaxWarning: invalid escape sequence '\d' + arg['coup'] = re.sub('coup(\d+)\)s','coup\g<1>)s%(vec\g<1>)s', arg['coup']) +/shared/roiser/sw/madgraph4gpu/MG5aMC/mg5amcnlo/madgraph/iolibs/export_v4.py:4187: SyntaxWarning: invalid escape sequence '\g' + arg['coup'] = re.sub('coup(\d+)\)s','coup\g<1>)s%(vec\g<1>)s', arg['coup']) +Running MG5 in debug mode +('WARNING: loading of madgraph too slow!!!', 0.6939451694488525) +Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT +Plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT has marked as NOT being validated with this version: 3.6.2. +It has been validated for the last time with version: 3.6.0 Note that this is a development version. This version is intended for development/beta testing and NOT for production. This version has not been fully tested (if at all) and might have limited user support (if at all) -Running MG5 in debug mode -Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT ************************************************************ * * * W E L C O M E to * @@ -15,7 +25,7 @@ Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT * * * * * * * * * * * * -* VERSION 3.6.0 2024-09-30 * +* VERSION 3.6.2 2025-03-19 * * * * WARNING: UNKNOWN DEVELOPMENT VERSION. * * WARNING: DO NOT USE FOR PRODUCTION * @@ -46,10 +56,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 Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt -import /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_ee_mumu.mg +import /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_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 @@ -58,7 +67,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.006340742111206055  +DEBUG: model prefixing takes 0.0018661022186279297  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  @@ -150,13 +159,13 @@ 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.006 s Total: 1 processes with 2 diagrams output standalone_cudacpp ../TMPOUT/CODEGEN_cudacpp_ee_mumu Output will be done with PLUGIN: CUDACPP_OUTPUT DEBUG: Entering PLUGIN_ProcessExporter.__init__ (initialise the exporter) [output.py at line 171]  DEBUG: Entering PLUGIN_ProcessExporter.copy_template (initialise the directory) [output.py at line 176]  -INFO: Creating subdirectories in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_ee_mumu +INFO: Creating subdirectories in directory /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_ee_mumu 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 @@ -165,17 +174,17 @@ INFO: Processing color information for process: e+ e- > mu+ mu- @1 DEBUG: type(fortran_model)= [output.py at line 220]  DEBUG: type(me)= me=0 [output.py at line 221]  DEBUG: "need to link", self.to_link_in_P =  need to link ['nvtx.h', 'timer.h', 'timermap.h', 'ompnumthreads.h', 'GpuRuntime.h', 'GpuAbstraction.h', 'MemoryAccessHelpers.h', 'MemoryAccessVectors.h', 'MemoryAccessMatrixElements.h', 'MemoryAccessMomenta.h', 'MemoryAccessRandomNumbers.h', 'MemoryAccessWeights.h', 'MemoryAccessAmplitudes.h', 'MemoryAccessWavefunctions.h', 'MemoryAccessGs.h', 'MemoryAccessCouplingsFixed.h', 'MemoryAccessNumerators.h', 'MemoryAccessDenominators.h', 'MemoryAccessChannelIds.h', 'EventStatistics.h', 'CommonRandomNumbers.h', 'CrossSectionKernels.cc', 'CrossSectionKernels.h', 'MatrixElementKernels.cc', 'MatrixElementKernels.h', 'RamboSamplingKernels.cc', 'RamboSamplingKernels.h', 'RandomNumberKernels.h', 'CommonRandomNumberKernel.cc', 'CurandRandomNumberKernel.cc', 'HiprandRandomNumberKernel.cc', 'Bridge.h', 'BridgeKernels.cc', 'BridgeKernels.h', 'fbridge.cc', 'fbridge.inc', 'fsampler.cc', 'fsampler.inc', 'MadgraphTest.h', 'runTest.cc', 'testmisc.cc', 'testxxx_cc_ref.txt', 'valgrind.h', 'cudacpp.mk', 'testxxx.cc', 'MemoryBuffers.h', 'MemoryAccessCouplings.h', 'perf.py', 'profile.sh'] [output.py at line 222]  -INFO: Creating files in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_ee_mumu/SubProcesses/P1_Sigma_sm_epem_mupmum -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_ee_mumu/SubProcesses/P1_Sigma_sm_epem_mupmum/./CPPProcess.h -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_ee_mumu/SubProcesses/P1_Sigma_sm_epem_mupmum/./CPPProcess.cc -INFO: Created files CPPProcess.h and CPPProcess.cc in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_ee_mumu/SubProcesses/P1_Sigma_sm_epem_mupmum/. +INFO: Creating files in directory /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_ee_mumu/SubProcesses/P1_Sigma_sm_epem_mupmum +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_ee_mumu/SubProcesses/P1_Sigma_sm_epem_mupmum/./CPPProcess.h +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_ee_mumu/SubProcesses/P1_Sigma_sm_epem_mupmum/./CPPProcess.cc +INFO: Created files CPPProcess.h and CPPProcess.cc in directory /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_ee_mumu/SubProcesses/P1_Sigma_sm_epem_mupmum/. Generated helas calls for 1 subprocesses (2 diagrams) in 0.004 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 FFV2_4 routines -ALOHA: aloha creates 4 routines in 0.267 s +ALOHA: aloha creates 4 routines in 0.124 s FFV1 FFV1 FFV2 @@ -184,17 +193,17 @@ ALOHA: aloha creates 4 routines in 0.267 s FFV4 FFV2_4 FFV2_4 -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_ee_mumu/src/./HelAmps_sm.h -INFO: Created file HelAmps_sm.h in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_ee_mumu/src/. +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_ee_mumu/src/./HelAmps_sm.h +INFO: Created file HelAmps_sm.h in directory /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_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_cudacpp_ee_mumu/src/./Parameters_sm.h -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_ee_mumu/src/./Parameters_sm.cc +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_ee_mumu/src/./Parameters_sm.h +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_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_cudacpp_ee_mumu/src/. and /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_ee_mumu/src/. +INFO: /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_ee_mumu/src/. and /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_ee_mumu/src/. quit -real 0m0.659s -user 0m0.589s -sys 0m0.056s -Code generation completed in 1 seconds +real 0m1.908s +user 0m0.670s +sys 0m0.163s +Code generation completed in 2 seconds diff --git a/epochX/cudacpp/ee_mumu.sa/SubProcesses/Bridge.h b/epochX/cudacpp/ee_mumu.sa/SubProcesses/Bridge.h index 87aa648dd2..49b928db67 100644 --- a/epochX/cudacpp/ee_mumu.sa/SubProcesses/Bridge.h +++ b/epochX/cudacpp/ee_mumu.sa/SubProcesses/Bridge.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: S. Roiser (Nov 2021) for the MG5aMC CUDACPP plugin. -// Further modified by: S. Roiser, J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2021-2025) for the MG5aMC CUDACPP plugin. #ifndef BRIDGE_H #define BRIDGE_H 1 @@ -255,11 +255,15 @@ namespace mg5amcCpu throw std::logic_error( "Bridge constructor: FIXME! cannot choose gputhreads" ); // this should never happen! m_gpublocks = m_nevt / m_gputhreads; } +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Instantiate device Bridge (nevt=" << m_nevt << ", gpublocks=" << m_gpublocks << ", gputhreads=" << m_gputhreads << ", gpublocks*gputhreads=" << m_gpublocks * m_gputhreads << ")" << std::endl; +#endif m_pmek.reset( new MatrixElementKernelDevice( m_devMomentaC, m_devGs, m_devRndHel, m_devRndCol, m_devChannelIds, m_devMEs, m_devSelHel, m_devSelCol, m_gpublocks, m_gputhreads ) ); #else +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Instantiate host Bridge (nevt=" << m_nevt << ")" << std::endl; +#endif m_pmek.reset( new MatrixElementKernelHost( m_hstMomentaC, m_hstGs, m_hstRndHel, m_hstRndCol, m_hstChannelIds, m_hstMEs, m_hstSelHel, m_hstSelCol, m_nevt ) ); #endif // MGONGPUCPP_GPUIMPL // Create a process object, read param card and set parameters @@ -290,8 +294,10 @@ namespace mg5amcCpu throw std::runtime_error( "Bridge: gpublocks*gputhreads must equal m_nevt in set_gpugrid" ); m_gpublocks = gpublocks; m_gputhreads = gputhreads; +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Set grid in Bridge (nevt=" << m_nevt << ", gpublocks=" << m_gpublocks << ", gputhreads=" << m_gputhreads << ", gpublocks*gputhreads=" << m_gpublocks * m_gputhreads << ")" << std::endl; +#endif m_pmek->setGrid( m_gpublocks, m_gputhreads ); } #endif @@ -347,7 +353,9 @@ namespace mg5amcCpu if( goodHelOnly ) return; m_pmek->computeMatrixElements( useChannelIds ); copyHostFromDevice( m_hstMEs, m_devMEs ); +#ifdef MGONGPUCPP_VERBOSE flagAbnormalMEs( m_hstMEs.data(), m_nevt ); +#endif copyHostFromDevice( m_hstSelHel, m_devSelHel ); copyHostFromDevice( m_hstSelCol, m_devSelCol ); if constexpr( std::is_same_v ) @@ -400,7 +408,9 @@ namespace mg5amcCpu } if( goodHelOnly ) return; m_pmek->computeMatrixElements( useChannelIds ); +#ifdef MGONGPUCPP_VERBOSE flagAbnormalMEs( m_hstMEs.data(), m_nevt ); +#endif if constexpr( std::is_same_v ) { memcpy( mes, m_hstMEs.data(), m_hstMEs.bytes() ); diff --git a/epochX/cudacpp/ee_mumu.sa/SubProcesses/GpuRuntime.h b/epochX/cudacpp/ee_mumu.sa/SubProcesses/GpuRuntime.h index 860c7fde16..6a4b946e74 100644 --- a/epochX/cudacpp/ee_mumu.sa/SubProcesses/GpuRuntime.h +++ b/epochX/cudacpp/ee_mumu.sa/SubProcesses/GpuRuntime.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: J. Teig (Jun 2023, based on earlier work by S. Roiser) for the MG5aMC CUDACPP plugin. -// Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2025) for the MG5aMC CUDACPP plugin. #ifndef MG5AMC_GPURUNTIME_H #define MG5AMC_GPURUNTIME_H 1 @@ -50,7 +50,7 @@ namespace mg5amcGpu // Set up CUDA application // ** NB: strictly speaking this is not needed when using the CUDA runtime API ** // Calling cudaSetDevice on startup is useful to properly book-keep the time spent in CUDA initialization - static void setUp( const bool debug = true ) + static void setUp( const bool debug = false ) // ZW: changed debug default to false { // ** NB: it is useful to call cudaSetDevice, or cudaFree, to properly book-keep the time spent in CUDA initialization // ** NB: otherwise, the first CUDA operation (eg a cudaMemcpyToSymbol in CPPProcess ctor) appears to take much longer! @@ -71,7 +71,7 @@ namespace mg5amcGpu // ** NB: strictly speaking this is not needed when using the CUDA runtime API ** // Calling cudaDeviceReset on shutdown is only needed for checking memory leaks in cuda-memcheck // See https://docs.nvidia.com/cuda/cuda-memcheck/index.html#leak-checking - static void tearDown( const bool debug = true ) + static void tearDown( const bool debug = false ) // ZW: changed debug default to false { if( debug ) std::cout << "__GpuRuntime: calling GpuDeviceReset()" << std::endl; checkGpu( gpuDeviceReset() ); diff --git a/epochX/cudacpp/ee_mumu.sa/SubProcesses/MatrixElementKernels.cc b/epochX/cudacpp/ee_mumu.sa/SubProcesses/MatrixElementKernels.cc index f463977c1a..703ea3781c 100644 --- a/epochX/cudacpp/ee_mumu.sa/SubProcesses/MatrixElementKernels.cc +++ b/epochX/cudacpp/ee_mumu.sa/SubProcesses/MatrixElementKernels.cc @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: A. Valassi (Jan 2022) for the MG5aMC CUDACPP plugin. -// Further modified by: J. Teig, A. Valassi (2022-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: J. Teig, A. Valassi, Z. Wettersten (2022-2025) for the MG5aMC CUDACPP plugin. #include "MatrixElementKernels.h" @@ -60,7 +60,9 @@ namespace mg5amcCpu #ifdef MGONGPU_CHANNELID_DEBUG MatrixElementKernelBase::dumpNevtProcessedByChannel(); #endif +#ifdef MGONGPUCPP_VERBOSE MatrixElementKernelBase::dumpSignallingFPEs(); +#endif } //-------------------------------------------------------------------------- diff --git a/epochX/cudacpp/ee_mumu.sa/SubProcesses/MatrixElementKernels.h b/epochX/cudacpp/ee_mumu.sa/SubProcesses/MatrixElementKernels.h index 7acff4b308..8da04d7945 100644 --- a/epochX/cudacpp/ee_mumu.sa/SubProcesses/MatrixElementKernels.h +++ b/epochX/cudacpp/ee_mumu.sa/SubProcesses/MatrixElementKernels.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: A. Valassi (Jan 2022) for the MG5aMC CUDACPP plugin. -// Further modified by: J. Teig, A. Valassi (2022-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: J. Teig, A. Valassi, Z. Wettersten (2022-2025) for the MG5aMC CUDACPP plugin. #ifndef MATRIXELEMENTKERNELS_H #define MATRIXELEMENTKERNELS_H 1 @@ -134,7 +134,7 @@ namespace mg5amcCpu // Does this host system support the SIMD used in the matrix element calculation? // [NB: this is private, SIMD vectorization in mg5amc C++ code is currently only used in the ME calculations below MatrixElementKernelHost!] - static bool hostSupportsSIMD( const bool verbose = true ); + static bool hostSupportsSIMD( const bool verbose = false ); // ZW: default verbose false private: diff --git a/epochX/cudacpp/ee_mumu.sa/SubProcesses/MemoryAccessGs.h b/epochX/cudacpp/ee_mumu.sa/SubProcesses/MemoryAccessGs.h index 63c17a68fa..50a6aaef4d 100644 --- a/epochX/cudacpp/ee_mumu.sa/SubProcesses/MemoryAccessGs.h +++ b/epochX/cudacpp/ee_mumu.sa/SubProcesses/MemoryAccessGs.h @@ -128,6 +128,14 @@ namespace mg5amcCpu #endif } + // Locate a field (output) in a memory buffer (input) from a kernel event-indexing mechanism (internal) + // [Signature (SCALAR OR VECTOR) ===> fptype_sv* kernelAccess( fptype* buffer ) <===] + static __host__ __device__ inline fptype_sv* + kernelAccessP( fptype* buffer ) + { + return reinterpret_cast( buffer ); + } + // Locate a field (output) in a memory buffer (input) from a kernel event-indexing mechanism (internal) and the given field indexes (input) // [Signature (const, SCALAR) ===> const fptype& kernelAccessConst( const fptype* buffer ) <===] static constexpr auto kernelAccessConst_s = diff --git a/epochX/cudacpp/ee_mumu.sa/SubProcesses/MemoryBuffers.h b/epochX/cudacpp/ee_mumu.sa/SubProcesses/MemoryBuffers.h index 65a101888d..17ba7a89e5 100644 --- a/epochX/cudacpp/ee_mumu.sa/SubProcesses/MemoryBuffers.h +++ b/epochX/cudacpp/ee_mumu.sa/SubProcesses/MemoryBuffers.h @@ -13,6 +13,7 @@ #include "CPPProcess.h" #include "GpuRuntime.h" #include "Parameters_sm.h" +#include "processConfig.h" #include @@ -274,7 +275,8 @@ namespace mg5amcCpu typedef BufferBase BufferNumerators; // The size (number of elements) per event in a memory buffer for numerators - constexpr size_t sizePerEventNumerators = 1; + // (should be equal to the number of diagrams in the process) + constexpr size_t sizePerEventNumerators = processConfig::ndiagrams; #ifndef MGONGPUCPP_GPUIMPL // A class encapsulating a C++ host buffer for gs 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 16a91dd141..76f8b7f25c 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 @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -25,6 +25,7 @@ #include "MemoryAccessMatrixElements.h" #include "MemoryAccessMomenta.h" #include "MemoryAccessWavefunctions.h" +#include "processConfig.h" #ifdef MGONGPU_SUPPORTS_MULTICHANNEL #include "MemoryAccessDenominators.h" @@ -96,6 +97,69 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { +#ifdef MGONGPU_SUPPORTS_MULTICHANNEL + __device__ INLINE unsigned int getChannelId( const unsigned int* allChannelIds +#ifndef MGONGPUCPP_GPUIMPL + , + const int ievt00, + bool sanityCheckMixedPrecision = true +#endif + ) + { + unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr +#ifdef MGONGPUCPP_GPUIMPL + using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page + if( allChannelIds != nullptr ) + { + const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) + const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) + // NB: channelIds_sv is a scalar in CUDA + channelId = channelIds_sv; + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + } +#else // Cuda or C++ + using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + if( allChannelIds != nullptr ) + { + // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) + const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 + uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) +#ifndef MGONGPU_CPPSIMD + // NB: channelIds_sv is a scalar in no-SIMD C++ + channelId = channelIds_sv; +#else + // NB: channelIds_sv is a vector in SIMD C++ + channelId = channelIds_sv[0]; // element[0] + for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] + { + assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId + } +#endif + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + if( sanityCheckMixedPrecision ) + { +#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT + // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) + const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 + uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + for( int i = 0; i < neppV; ++i ) + { + assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector + } +#endif + } + } +#endif // MGONGPUCPP_GPUIMPL + return channelId; + } +#endif // MGONGPU_SUPPORTS_MULTICHANNEL + constexpr int nw6 = CPPProcess::nw6; // dimensions of each wavefunction (HELAS KEK 91-11): e.g. 6 for e+ e- -> mu+ mu- (fermions and vectors) constexpr int npar = CPPProcess::npar; // #particles in total (external = initial + final): e.g. 4 for e+ e- -> mu+ mu- constexpr int ncomb = CPPProcess::ncomb; // #helicity combinations: e.g. 16 for e+ e- -> mu+ mu- (2**4 = fermion spin up/down ** npar) @@ -305,7 +369,7 @@ namespace mg5amcCpu COUPs[ndcoup + iicoup] = allCOUPs[ndcoup + iicoup]; // independent couplings, fixed for all events fptype* MEs = E_ACCESS::ieventAccessRecord( allMEs, ievt0 ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); #endif #endif @@ -315,7 +379,7 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Numerators and denominators for the current event (CUDA) or SIMD event page (C++) - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); #endif @@ -537,7 +601,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- @@ -906,9 +972,6 @@ namespace mg5amcCpu #ifdef MGONGPUCPP_GPUIMPL // Remember: in CUDA this is a kernel for one event, in c++ this processes n events const int ievt = blockDim.x * blockIdx.x + threadIdx.x; // index of event (thread) in grid -#ifdef MGONGPU_SUPPORTS_MULTICHANNEL - using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events -#endif #else //assert( (size_t)(allmomenta) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] //assert( (size_t)(allMEs) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] @@ -916,7 +979,6 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL using NUM_ACCESS = HostAccessNumerators; // non-trivial access: buffer includes all events using DEN_ACCESS = HostAccessDenominators; // non-trivial access: buffer includes all events - using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events #endif #endif @@ -941,11 +1003,12 @@ namespace mg5amcCpu fptype_sv& MEs_sv = E_ACCESS::kernelAccess( MEs ); MEs_sv = fptype_sv{ 0 }; #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - numerators_sv = fptype_sv{ 0 }; + for( int i = 0; i < processConfig::ndiagrams; ++i ) + numerators_sv[i] = fptype_sv{ 0 }; denominators_sv = fptype_sv{ 0 }; #endif } @@ -958,17 +1021,7 @@ namespace mg5amcCpu // *** START OF PART 1a - CUDA (one event per GPU thread) *** #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) - const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) - // NB: channelIds_sv is a scalar in CUDA - channelId = channelIds_sv; - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) - } + unsigned int channelId = getChannelId( allChannelIds ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (for the single event processed in calculate_wavefunctions) @@ -1083,38 +1136,7 @@ namespace mg5amcCpu const int ievt00 = ipagV2 * neppV; // loop on one SIMD page (neppV events) at a time #endif #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) - const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 - uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) -#ifndef MGONGPU_CPPSIMD - // NB: channelIds_sv is a scalar in no-SIMD C++ - channelId = channelIds_sv; -#else - // NB: channelIds_sv is a vector in SIMD C++ - channelId = channelIds_sv[0]; // element[0] - for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] - { - assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId - } -#endif - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) -#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT - // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) - const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 - uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - for( int i = 0; i < neppV; ++i ) - { - assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector - } -#endif - } + unsigned int channelId = getChannelId( allChannelIds, ievt00 ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (jamp2[nParity][ncolor][neppV] for the SIMD vector - or the two SIMD vectors - of events processed in calculate_wavefunctions) @@ -1287,11 +1309,12 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( allChannelIds != nullptr ) // fix segfault #892 (not 'channelIds[0] != 0') { - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + const unsigned int channelId = getChannelId( allChannelIds, ievt0, false ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - MEs_sv *= numerators_sv / denominators_sv; + MEs_sv *= numerators_sv[channelId - 1] / denominators_sv; } #endif //for( int ieppV = 0; ieppV < neppV; ieppV++ ) diff --git a/epochX/cudacpp/ee_mumu.sa/SubProcesses/P1_Sigma_sm_epem_mupmum/CPPProcess.h b/epochX/cudacpp/ee_mumu.sa/SubProcesses/P1_Sigma_sm_epem_mupmum/CPPProcess.h index 159826a904..8f9b209cbf 100644 --- a/epochX/cudacpp/ee_mumu.sa/SubProcesses/P1_Sigma_sm_epem_mupmum/CPPProcess.h +++ b/epochX/cudacpp/ee_mumu.sa/SubProcesses/P1_Sigma_sm_epem_mupmum/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/ee_mumu.sa/SubProcesses/P1_Sigma_sm_epem_mupmum/processConfig.h b/epochX/cudacpp/ee_mumu.sa/SubProcesses/P1_Sigma_sm_epem_mupmum/processConfig.h new file mode 100644 index 0000000000..65cfee8266 --- /dev/null +++ b/epochX/cudacpp/ee_mumu.sa/SubProcesses/P1_Sigma_sm_epem_mupmum/processConfig.h @@ -0,0 +1,16 @@ +// Copyright (C) 2025 CERN and UCLouvain. +// Licensed under the GNU Lesser General Public License (version 3 or later). +// Created by: S. Roiser (May 2025) for the MG5aMC CUDACPP plugin. +// Further modified by: ... for the MG5aMC CUDACPP plugin. + + +#ifndef MG5_CONFIG_SIGMA_SM_EPEM_MUPMUM_H +#define MG5_CONFIG_SIGMA_SM_EPEM_MUPMUM_H 1 + +namespace processConfig { + + constexpr int ndiagrams = 2; + +} + +#endif // MG5_CONFIG_SIGMA_SM_EPEM_MUPMUM_H \ 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 18f664e0d1..337ed3e675 100644 --- a/epochX/cudacpp/ee_mumu.sa/src/HelAmps_sm.h +++ b/epochX/cudacpp/ee_mumu.sa/src/HelAmps_sm.h @@ -8,7 +8,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/ee_mumu.sa/src/Parameters_sm.cc b/epochX/cudacpp/ee_mumu.sa/src/Parameters_sm.cc index 37676c1d8d..a34d22a043 100644 --- a/epochX/cudacpp/ee_mumu.sa/src/Parameters_sm.cc +++ b/epochX/cudacpp/ee_mumu.sa/src/Parameters_sm.cc @@ -7,7 +7,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/ee_mumu.sa/src/Parameters_sm.h b/epochX/cudacpp/ee_mumu.sa/src/Parameters_sm.h index 5fcde71f6b..9d95e01e1b 100644 --- a/epochX/cudacpp/ee_mumu.sa/src/Parameters_sm.h +++ b/epochX/cudacpp/ee_mumu.sa/src/Parameters_sm.h @@ -7,7 +7,7 @@ // Further modified by: A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== 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 453da8d298..2a280f1aa1 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 @@ -1,8 +1,11 @@ +WARNING:root:python3.12 support is still experimental. For the moment re-weighting is NOT working and do expect a LOT of syntax warning. We do not advise python3.12 for production for the moment. +Running MG5 in debug mode +Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT +Plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT has marked as NOT being validated with this version: 3.6.2. +It has been validated for the last time with version: 3.6.0 Note that this is a development version. This version is intended for development/beta testing and NOT for production. This version has not been fully tested (if at all) and might have limited user support (if at all) -Running MG5 in debug mode -Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT ************************************************************ * * * W E L C O M E to * @@ -15,7 +18,7 @@ Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT * * * * * * * * * * * * -* VERSION 3.6.0 2024-09-30 * +* VERSION 3.6.2 2025-03-19 * * * * WARNING: UNKNOWN DEVELOPMENT VERSION. * * WARNING: DO NOT USE FOR PRODUCTION * @@ -46,10 +49,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 Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt -import /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt.mg +import /shared/roiser/sw/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 @@ -58,7 +60,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.0065233707427978516  +DEBUG: model prefixing takes 0.0018689632415771484  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  @@ -151,21 +153,21 @@ 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.009 s +1 processes with 3 diagrams generated in 0.012 s Total: 1 processes with 3 diagrams output madevent_simd ../TMPOUT/CODEGEN_mad_gg_tt --hel_recycling=False --vector_size=32 Output will be done with PLUGIN: CUDACPP_OUTPUT Addition matrix-element will be done with PLUGIN: CUDACPP_OUTPUT -DEBUG: opt['output_options']['vector_size'] =  32 [export_v4.py at line 4334]  +DEBUG: opt['output_options']['vector_size'] =  32 [export_v4.py at line 4166]  Output will be done with PLUGIN: CUDACPP_OUTPUT DEBUG: Entering PLUGIN_ProcessExporter.__init__ (initialise the exporter) [output.py at line 171]  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 176]  -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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt  +INFO: Creating subdirectories in directory /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt +WARNING: File exists /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/Cards  +WARNING: File exists /shared/roiser/sw/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 @@ -177,54 +179,56 @@ FileWriter t t~ WEIGHTED<=2 @1 INFO: Finding symmetric diagrams for subprocess group gg_ttx -DEBUG: len(subproc_diagrams_for_config) =  3 [model_handling.py at line 1527]  -DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3} [model_handling.py at line 1551]  -DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3} [model_handling.py at line 1552]  -Generated helas calls for 1 subprocesses (3 diagrams) in 0.006 s -Wrote files for 10 helas calls in 0.072 s +DEBUG: len(subproc_diagrams_for_config) =  3 [model_handling.py at line 1538]  +DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3} [model_handling.py at line 1562]  +DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3} [model_handling.py at line 1563]  +Generated helas calls for 1 subprocesses (3 diagrams) in 0.005 s +Wrote files for 10 helas calls in 1.322 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.144 s +ALOHA: aloha creates 2 routines in 0.065 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 4 routines in 0.132 s +ALOHA: aloha creates 4 routines in 0.079 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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/src/./HelAmps_sm.h +INFO: Created file HelAmps_sm.h in directory /shared/roiser/sw/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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/src/./Parameters_sm.h +FileWriter for /shared/roiser/sw/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: /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/src/. and /shared/roiser/sw/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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/Cards/me5_configuration.txt INFO: Use Fortran compiler gfortran INFO: Use c++ compiler g++ INFO: Generate jpeg diagrams 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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt; patch -p4 -i /shared/roiser/sw/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common patching file SubProcesses/makefile -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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/SubProcesses/P1_gg_ttx; patch -p6 -i /shared/roiser/sw/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file driver.f patching file matrix1.f DEBUG: p.returncode =  0 [output.py at line 263]  -Output to directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt done. +Output to directory /shared/roiser/sw/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 +/shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/README Run "open index.html" to see more information about this process. quit -real 0m1.991s -user 0m1.616s -sys 0m0.275s -Code generation completed in 2 seconds +real 0m6.206s +user 0m1.186s +sys 0m0.626s +Code generation completed in 7 seconds +/shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/bin/internal/banner.py:3309: SyntaxWarning: invalid escape sequence '\s' + function_pat = re.compile('^\s+(?:SUBROUTINE|(?:%(type)s)\s+function)\s+([a-zA-Z]\w*)' \ ************************************************************ * * * W E L C O M E to * @@ -237,7 +241,7 @@ Code generation completed in 2 seconds * * * * * * * * * * * * -* VERSION 3.6.0 * +* VERSION 3.6.2 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -245,10 +249,9 @@ Code generation completed in 2 seconds * 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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/Cards/me5_configuration.txt +INFO: load configuration from /shared/roiser/sw/madgraph4gpu/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/Cards/me5_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 @@ -267,7 +270,7 @@ launch in debug mode * * * * * * * * * * * * -* VERSION 3.6.0 * +* VERSION 3.6.2 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -275,10 +278,9 @@ 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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/Cards/me5_configuration.txt +INFO: load configuration from /shared/roiser/sw/madgraph4gpu/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/Cards/me5_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 68b4c46295..a0212bfb62 100644 --- a/epochX/cudacpp/gg_tt.mad/Cards/me5_configuration.txt +++ b/epochX/cudacpp/gg_tt.mad/Cards/me5_configuration.txt @@ -235,7 +235,7 @@ # pineappl = pineappl -#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo +#mg5_path = /shared/roiser/sw/madgraph4gpu/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo +#mg5_path = /shared/roiser/sw/madgraph4gpu/MG5aMC/mg5amcnlo diff --git a/epochX/cudacpp/gg_tt.mad/Cards/proc_card_mg5.dat b/epochX/cudacpp/gg_tt.mad/Cards/proc_card_mg5.dat index 66598786f5..5763a666b2 100644 --- a/epochX/cudacpp/gg_tt.mad/Cards/proc_card_mg5.dat +++ b/epochX/cudacpp/gg_tt.mad/Cards/proc_card_mg5.dat @@ -8,7 +8,7 @@ #* * * * #* * #* * -#* VERSION 3.6.0 2024-09-30 * +#* VERSION 3.6.2 2025-03-19 * #* * #* WARNING: UNKNOWN DEVELOPMENT VERSION. * #* WARNING: DO NOT USE FOR PRODUCTION * diff --git a/epochX/cudacpp/gg_tt.mad/Cards/run_card.dat b/epochX/cudacpp/gg_tt.mad/Cards/run_card.dat index 6b82577032..000832aacd 100644 --- a/epochX/cudacpp/gg_tt.mad/Cards/run_card.dat +++ b/epochX/cudacpp/gg_tt.mad/Cards/run_card.dat @@ -107,6 +107,7 @@ # Parton level cuts definition * #******************************* 0.0 = dsqrt_shat ! minimal shat for full process + -1 = dsqrt_shatmax ! maximum shat for full process # # #********************************************************************* diff --git a/epochX/cudacpp/gg_tt.mad/Cards/run_card_default.dat b/epochX/cudacpp/gg_tt.mad/Cards/run_card_default.dat index b8db871c35..85e1d39035 100644 --- a/epochX/cudacpp/gg_tt.mad/Cards/run_card_default.dat +++ b/epochX/cudacpp/gg_tt.mad/Cards/run_card_default.dat @@ -107,6 +107,7 @@ # Parton level cuts definition * #******************************* 0.0 = dsqrt_shat ! minimal shat for full process + -1 = dsqrt_shatmax ! maximum shat for full process # # #********************************************************************* diff --git a/epochX/cudacpp/gg_tt.mad/MGMEVersion.txt b/epochX/cudacpp/gg_tt.mad/MGMEVersion.txt index 084e244cea..77a069e39b 100644 --- a/epochX/cudacpp/gg_tt.mad/MGMEVersion.txt +++ b/epochX/cudacpp/gg_tt.mad/MGMEVersion.txt @@ -1 +1 @@ -3.6.0 \ No newline at end of file +3.6.2 \ No newline at end of file diff --git a/epochX/cudacpp/gg_tt.mad/Source/alfas_functions.f b/epochX/cudacpp/gg_tt.mad/Source/alfas_functions.f index bb69a6384e..84aeff369c 100644 --- a/epochX/cudacpp/gg_tt.mad/Source/alfas_functions.f +++ b/epochX/cudacpp/gg_tt.mad/Source/alfas_functions.f @@ -188,6 +188,10 @@ SUBROUTINE NEWTON1(T,A_IN,A_OUT,NLOOP,NF) A_OUT=A_IN/(1D0+A_IN*B0(NF)*T) IF (NLOOP .EQ. 1) RETURN + if (1D0+A_IN*B0(NF)*T.le.0d0)THEN + A_OUT = 9d98 + RETURN + ENDIF A_OUT=A_IN/(1D0+B0(NF)*A_IN*T+C1(NF)*A_IN*LOG(1D0+A_IN*B0(NF)*T)) IF (A_OUT .LT. 0D0) AS=0.3D0 30 AS=A_OUT diff --git a/epochX/cudacpp/gg_tt.mad/Source/cuts.inc b/epochX/cudacpp/gg_tt.mad/Source/cuts.inc index 23d099e5f7..a8ccc7420d 100644 --- a/epochX/cudacpp/gg_tt.mad/Source/cuts.inc +++ b/epochX/cudacpp/gg_tt.mad/Source/cuts.inc @@ -37,7 +37,7 @@ C REAL*8 misset,missetmax,ptheavy REAL*8 ptllmin,ptllmax integer maxjetflavor - REAl*8 dsqrt_shat + REAl*8 dsqrt_shat,dsqrt_shatmax COMMON /to_min_max_cuts/ & PTJmax,PTBmax,PTAmax,PTLmax, @@ -60,7 +60,7 @@ C & ht2max,ht3max,ht4max, & htjmin,htjmax,ihtmin,ihtmax, & misset,missetmax,ptheavy, - & ptllmin,ptllmax,dsqrt_shat, + & ptllmin,ptllmax,dsqrt_shat,dsqrt_shatmax, & maxjetflavor C diff --git a/epochX/cudacpp/gg_tt.mad/Source/make_opts b/epochX/cudacpp/gg_tt.mad/Source/make_opts index e4b87ee6ad..f9f7b64bb5 100644 --- a/epochX/cudacpp/gg_tt.mad/Source/make_opts +++ b/epochX/cudacpp/gg_tt.mad/Source/make_opts @@ -5,8 +5,8 @@ GLOBAL_FLAG=-O3 -ffast-math -fbounds-check MACFLAG= MG5AMC_VERSION=SpecifiedByMG5aMCAtRunTime PYTHIA8_PATH=NotInstalled -STDLIB_FLAG= STDLIB=-lstdc++ +STDLIB_FLAG= #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 291ca907ee..f9321e7a94 100644 --- a/epochX/cudacpp/gg_tt.mad/Source/makefile +++ b/epochX/cudacpp/gg_tt.mad/Source/makefile @@ -73,6 +73,7 @@ $(BINDIR)gensudgrid: $(GENSUDGRID) $(LIBDIR)libpdf.$(libext) $(LIBDIR)libgammaUP # Dependencies dsample.o: DiscreteSampler.o dsample.f genps.inc StringCast.o vector.inc +pawgraph.o: vector.inc DiscreteSampler.o: StringCast.o invarients.o: invarients.f genps.inc gen_ximprove.o: gen_ximprove.f run_config.inc run_card.inc diff --git a/epochX/cudacpp/gg_tt.mad/Source/run_card.inc b/epochX/cudacpp/gg_tt.mad/Source/run_card.inc index 1a1bc782bd..8bd5f73840 100644 --- a/epochX/cudacpp/gg_tt.mad/Source/run_card.inc +++ b/epochX/cudacpp/gg_tt.mad/Source/run_card.inc @@ -88,6 +88,8 @@ DSQRT_SHAT = 0.000000000000000D+00 + DSQRT_SHATMAX = -1 + LIMHEL = 0.000000000000000D+00 PTJ = 2.000000000000000D+01 diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/Bridge.h b/epochX/cudacpp/gg_tt.mad/SubProcesses/Bridge.h index 87aa648dd2..49b928db67 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/Bridge.h +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/Bridge.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: S. Roiser (Nov 2021) for the MG5aMC CUDACPP plugin. -// Further modified by: S. Roiser, J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2021-2025) for the MG5aMC CUDACPP plugin. #ifndef BRIDGE_H #define BRIDGE_H 1 @@ -255,11 +255,15 @@ namespace mg5amcCpu throw std::logic_error( "Bridge constructor: FIXME! cannot choose gputhreads" ); // this should never happen! m_gpublocks = m_nevt / m_gputhreads; } +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Instantiate device Bridge (nevt=" << m_nevt << ", gpublocks=" << m_gpublocks << ", gputhreads=" << m_gputhreads << ", gpublocks*gputhreads=" << m_gpublocks * m_gputhreads << ")" << std::endl; +#endif m_pmek.reset( new MatrixElementKernelDevice( m_devMomentaC, m_devGs, m_devRndHel, m_devRndCol, m_devChannelIds, m_devMEs, m_devSelHel, m_devSelCol, m_gpublocks, m_gputhreads ) ); #else +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Instantiate host Bridge (nevt=" << m_nevt << ")" << std::endl; +#endif m_pmek.reset( new MatrixElementKernelHost( m_hstMomentaC, m_hstGs, m_hstRndHel, m_hstRndCol, m_hstChannelIds, m_hstMEs, m_hstSelHel, m_hstSelCol, m_nevt ) ); #endif // MGONGPUCPP_GPUIMPL // Create a process object, read param card and set parameters @@ -290,8 +294,10 @@ namespace mg5amcCpu throw std::runtime_error( "Bridge: gpublocks*gputhreads must equal m_nevt in set_gpugrid" ); m_gpublocks = gpublocks; m_gputhreads = gputhreads; +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Set grid in Bridge (nevt=" << m_nevt << ", gpublocks=" << m_gpublocks << ", gputhreads=" << m_gputhreads << ", gpublocks*gputhreads=" << m_gpublocks * m_gputhreads << ")" << std::endl; +#endif m_pmek->setGrid( m_gpublocks, m_gputhreads ); } #endif @@ -347,7 +353,9 @@ namespace mg5amcCpu if( goodHelOnly ) return; m_pmek->computeMatrixElements( useChannelIds ); copyHostFromDevice( m_hstMEs, m_devMEs ); +#ifdef MGONGPUCPP_VERBOSE flagAbnormalMEs( m_hstMEs.data(), m_nevt ); +#endif copyHostFromDevice( m_hstSelHel, m_devSelHel ); copyHostFromDevice( m_hstSelCol, m_devSelCol ); if constexpr( std::is_same_v ) @@ -400,7 +408,9 @@ namespace mg5amcCpu } if( goodHelOnly ) return; m_pmek->computeMatrixElements( useChannelIds ); +#ifdef MGONGPUCPP_VERBOSE flagAbnormalMEs( m_hstMEs.data(), m_nevt ); +#endif if constexpr( std::is_same_v ) { memcpy( mes, m_hstMEs.data(), m_hstMEs.bytes() ); diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/GpuRuntime.h b/epochX/cudacpp/gg_tt.mad/SubProcesses/GpuRuntime.h index 860c7fde16..6a4b946e74 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/GpuRuntime.h +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/GpuRuntime.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: J. Teig (Jun 2023, based on earlier work by S. Roiser) for the MG5aMC CUDACPP plugin. -// Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2025) for the MG5aMC CUDACPP plugin. #ifndef MG5AMC_GPURUNTIME_H #define MG5AMC_GPURUNTIME_H 1 @@ -50,7 +50,7 @@ namespace mg5amcGpu // Set up CUDA application // ** NB: strictly speaking this is not needed when using the CUDA runtime API ** // Calling cudaSetDevice on startup is useful to properly book-keep the time spent in CUDA initialization - static void setUp( const bool debug = true ) + static void setUp( const bool debug = false ) // ZW: changed debug default to false { // ** NB: it is useful to call cudaSetDevice, or cudaFree, to properly book-keep the time spent in CUDA initialization // ** NB: otherwise, the first CUDA operation (eg a cudaMemcpyToSymbol in CPPProcess ctor) appears to take much longer! @@ -71,7 +71,7 @@ namespace mg5amcGpu // ** NB: strictly speaking this is not needed when using the CUDA runtime API ** // Calling cudaDeviceReset on shutdown is only needed for checking memory leaks in cuda-memcheck // See https://docs.nvidia.com/cuda/cuda-memcheck/index.html#leak-checking - static void tearDown( const bool debug = true ) + static void tearDown( const bool debug = false ) // ZW: changed debug default to false { if( debug ) std::cout << "__GpuRuntime: calling GpuDeviceReset()" << std::endl; checkGpu( gpuDeviceReset() ); diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/MGVersion.txt b/epochX/cudacpp/gg_tt.mad/SubProcesses/MGVersion.txt index 084e244cea..77a069e39b 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/MGVersion.txt +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/MGVersion.txt @@ -1 +1 @@ -3.6.0 \ No newline at end of file +3.6.2 \ No newline at end of file diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/MatrixElementKernels.cc b/epochX/cudacpp/gg_tt.mad/SubProcesses/MatrixElementKernels.cc index f463977c1a..703ea3781c 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/MatrixElementKernels.cc +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/MatrixElementKernels.cc @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: A. Valassi (Jan 2022) for the MG5aMC CUDACPP plugin. -// Further modified by: J. Teig, A. Valassi (2022-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: J. Teig, A. Valassi, Z. Wettersten (2022-2025) for the MG5aMC CUDACPP plugin. #include "MatrixElementKernels.h" @@ -60,7 +60,9 @@ namespace mg5amcCpu #ifdef MGONGPU_CHANNELID_DEBUG MatrixElementKernelBase::dumpNevtProcessedByChannel(); #endif +#ifdef MGONGPUCPP_VERBOSE MatrixElementKernelBase::dumpSignallingFPEs(); +#endif } //-------------------------------------------------------------------------- diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/MatrixElementKernels.h b/epochX/cudacpp/gg_tt.mad/SubProcesses/MatrixElementKernels.h index 7acff4b308..8da04d7945 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/MatrixElementKernels.h +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/MatrixElementKernels.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: A. Valassi (Jan 2022) for the MG5aMC CUDACPP plugin. -// Further modified by: J. Teig, A. Valassi (2022-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: J. Teig, A. Valassi, Z. Wettersten (2022-2025) for the MG5aMC CUDACPP plugin. #ifndef MATRIXELEMENTKERNELS_H #define MATRIXELEMENTKERNELS_H 1 @@ -134,7 +134,7 @@ namespace mg5amcCpu // Does this host system support the SIMD used in the matrix element calculation? // [NB: this is private, SIMD vectorization in mg5amc C++ code is currently only used in the ME calculations below MatrixElementKernelHost!] - static bool hostSupportsSIMD( const bool verbose = true ); + static bool hostSupportsSIMD( const bool verbose = false ); // ZW: default verbose false private: diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/MemoryAccessGs.h b/epochX/cudacpp/gg_tt.mad/SubProcesses/MemoryAccessGs.h index 63c17a68fa..50a6aaef4d 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/MemoryAccessGs.h +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/MemoryAccessGs.h @@ -128,6 +128,14 @@ namespace mg5amcCpu #endif } + // Locate a field (output) in a memory buffer (input) from a kernel event-indexing mechanism (internal) + // [Signature (SCALAR OR VECTOR) ===> fptype_sv* kernelAccess( fptype* buffer ) <===] + static __host__ __device__ inline fptype_sv* + kernelAccessP( fptype* buffer ) + { + return reinterpret_cast( buffer ); + } + // Locate a field (output) in a memory buffer (input) from a kernel event-indexing mechanism (internal) and the given field indexes (input) // [Signature (const, SCALAR) ===> const fptype& kernelAccessConst( const fptype* buffer ) <===] static constexpr auto kernelAccessConst_s = diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/MemoryBuffers.h b/epochX/cudacpp/gg_tt.mad/SubProcesses/MemoryBuffers.h index 65a101888d..17ba7a89e5 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/MemoryBuffers.h +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/MemoryBuffers.h @@ -13,6 +13,7 @@ #include "CPPProcess.h" #include "GpuRuntime.h" #include "Parameters_sm.h" +#include "processConfig.h" #include @@ -274,7 +275,8 @@ namespace mg5amcCpu typedef BufferBase BufferNumerators; // The size (number of elements) per event in a memory buffer for numerators - constexpr size_t sizePerEventNumerators = 1; + // (should be equal to the number of diagrams in the process) + constexpr size_t sizePerEventNumerators = processConfig::ndiagrams; #ifndef MGONGPUCPP_GPUIMPL // A class encapsulating a C++ host buffer for gs 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 b32f4b931e..7387ab4335 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 @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -25,6 +25,7 @@ #include "MemoryAccessMatrixElements.h" #include "MemoryAccessMomenta.h" #include "MemoryAccessWavefunctions.h" +#include "processConfig.h" #ifdef MGONGPU_SUPPORTS_MULTICHANNEL #include "MemoryAccessDenominators.h" @@ -96,6 +97,69 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { +#ifdef MGONGPU_SUPPORTS_MULTICHANNEL + __device__ INLINE unsigned int getChannelId( const unsigned int* allChannelIds +#ifndef MGONGPUCPP_GPUIMPL + , + const int ievt00, + bool sanityCheckMixedPrecision = true +#endif + ) + { + unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr +#ifdef MGONGPUCPP_GPUIMPL + using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page + if( allChannelIds != nullptr ) + { + const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) + const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) + // NB: channelIds_sv is a scalar in CUDA + channelId = channelIds_sv; + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + } +#else // Cuda or C++ + using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + if( allChannelIds != nullptr ) + { + // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) + const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 + uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) +#ifndef MGONGPU_CPPSIMD + // NB: channelIds_sv is a scalar in no-SIMD C++ + channelId = channelIds_sv; +#else + // NB: channelIds_sv is a vector in SIMD C++ + channelId = channelIds_sv[0]; // element[0] + for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] + { + assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId + } +#endif + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + if( sanityCheckMixedPrecision ) + { +#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT + // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) + const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 + uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + for( int i = 0; i < neppV; ++i ) + { + assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector + } +#endif + } + } +#endif // MGONGPUCPP_GPUIMPL + return channelId; + } +#endif // MGONGPU_SUPPORTS_MULTICHANNEL + constexpr int nw6 = CPPProcess::nw6; // dimensions of each wavefunction (HELAS KEK 91-11): e.g. 6 for e+ e- -> mu+ mu- (fermions and vectors) constexpr int npar = CPPProcess::npar; // #particles in total (external = initial + final): e.g. 4 for e+ e- -> mu+ mu- constexpr int ncomb = CPPProcess::ncomb; // #helicity combinations: e.g. 16 for e+ e- -> mu+ mu- (2**4 = fermion spin up/down ** npar) @@ -305,7 +369,7 @@ namespace mg5amcCpu COUPs[ndcoup + iicoup] = allCOUPs[ndcoup + iicoup]; // independent couplings, fixed for all events fptype* MEs = E_ACCESS::ieventAccessRecord( allMEs, ievt0 ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); #endif #endif @@ -315,7 +379,7 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Numerators and denominators for the current event (CUDA) or SIMD event page (C++) - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); #endif @@ -335,8 +399,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1 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] ); + if( channelId != 0 ) + { + numerators_sv[0] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[1] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -349,8 +416,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 2 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] ); + if( channelId != 0 ) + { + numerators_sv[1] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= amp_sv[0]; @@ -362,8 +432,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 3 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] ); + if( channelId != 0 ) + { + numerators_sv[2] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] -= amp_sv[0]; @@ -555,7 +628,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- @@ -923,9 +998,6 @@ namespace mg5amcCpu #ifdef MGONGPUCPP_GPUIMPL // Remember: in CUDA this is a kernel for one event, in c++ this processes n events const int ievt = blockDim.x * blockIdx.x + threadIdx.x; // index of event (thread) in grid -#ifdef MGONGPU_SUPPORTS_MULTICHANNEL - using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events -#endif #else //assert( (size_t)(allmomenta) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] //assert( (size_t)(allMEs) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] @@ -933,7 +1005,6 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL using NUM_ACCESS = HostAccessNumerators; // non-trivial access: buffer includes all events using DEN_ACCESS = HostAccessDenominators; // non-trivial access: buffer includes all events - using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events #endif #endif @@ -958,11 +1029,12 @@ namespace mg5amcCpu fptype_sv& MEs_sv = E_ACCESS::kernelAccess( MEs ); MEs_sv = fptype_sv{ 0 }; #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - numerators_sv = fptype_sv{ 0 }; + for( int i = 0; i < processConfig::ndiagrams; ++i ) + numerators_sv[i] = fptype_sv{ 0 }; denominators_sv = fptype_sv{ 0 }; #endif } @@ -975,17 +1047,7 @@ namespace mg5amcCpu // *** START OF PART 1a - CUDA (one event per GPU thread) *** #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) - const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) - // NB: channelIds_sv is a scalar in CUDA - channelId = channelIds_sv; - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) - } + unsigned int channelId = getChannelId( allChannelIds ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (for the single event processed in calculate_wavefunctions) @@ -1100,38 +1162,7 @@ namespace mg5amcCpu const int ievt00 = ipagV2 * neppV; // loop on one SIMD page (neppV events) at a time #endif #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) - const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 - uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) -#ifndef MGONGPU_CPPSIMD - // NB: channelIds_sv is a scalar in no-SIMD C++ - channelId = channelIds_sv; -#else - // NB: channelIds_sv is a vector in SIMD C++ - channelId = channelIds_sv[0]; // element[0] - for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] - { - assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId - } -#endif - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) -#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT - // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) - const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 - uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - for( int i = 0; i < neppV; ++i ) - { - assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector - } -#endif - } + unsigned int channelId = getChannelId( allChannelIds, ievt00 ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (jamp2[nParity][ncolor][neppV] for the SIMD vector - or the two SIMD vectors - of events processed in calculate_wavefunctions) @@ -1304,11 +1335,12 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( allChannelIds != nullptr ) // fix segfault #892 (not 'channelIds[0] != 0') { - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + const unsigned int channelId = getChannelId( allChannelIds, ievt0, false ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - MEs_sv *= numerators_sv / denominators_sv; + MEs_sv *= numerators_sv[channelId - 1] / denominators_sv; } #endif //for( int ieppV = 0; ieppV < neppV; ieppV++ ) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/CPPProcess.h b/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/CPPProcess.h index feff1cc6e1..c0ba6c2f8c 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/CPPProcess.h +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/auto_dsig.f b/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/auto_dsig.f index bc9bcfeb9b..5d6ef2ba62 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/auto_dsig.f +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C 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 db3c284caa..f46e9bfaf0 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 @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -137,14 +137,14 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDDO QSCALE=QSCALE/2D0 ELSE - QSCALE=DSQRT(Q2FACT(IB(1))) + QSCALE=DSQRT(Q2FACT(1)) ENDIF G1=PDG2PDF(LPP(IB(1)),0, IB(1),XBK(IB(1)), QSCALE) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) IF (DSQRT(Q2FACT(IB(2))).NE.0D0) THEN - QSCALE=DSQRT(Q2FACT(IB(2))) + QSCALE=DSQRT(Q2FACT(2)) ENDIF G2=PDG2PDF(LPP(IB(2)),0, IB(2),XBK(IB(2)), QSCALE) ENDIF @@ -219,7 +219,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -290,6 +290,10 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, INTEGER I_EE C +C STUFF FOR UPC +C + DOUBLE PRECISION PHOTONPDFSQUARE +C C EXTERNAL FUNCTIONS C LOGICAL PASSCUTS @@ -373,12 +377,12 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, IF (ABS(LPP(IB(1))).GE.1) THEN C LP=SIGN(1,LPP(IB(1))) G1(IVEC)=PDG2PDF(LPP(IB(1)),0, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) G2(IVEC)=PDG2PDF(LPP(IB(2)),0, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) ENDIF ENDDO ! IWARP LOOP ENDDO ! CURRWARP LOOP diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/card.png b/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/card.png new file mode 100644 index 0000000000..03ecfdfe16 Binary files /dev/null and b/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/card.png differ diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/matrix1.f b/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/matrix1.f index 707ea40323..e6ca6093c7 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/matrix1.f +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/matrix1.f @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -307,7 +307,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -350,7 +350,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C INTEGER I,J,M,N COMPLEX*16 ZTEMP, TMP_JAMP(0) - REAL*8 CF(NCOLOR,NCOLOR) + INTEGER CF(NCOLOR*(NCOLOR+1)/2) + INTEGER DENOM, CF_INDEX COMPLEX*16 AMP(NGRAPHS), JAMP(NCOLOR,NAMPSO) COMPLEX*16 W(6,NWAVEFUNCS) C Needed for v4 models @@ -393,11 +394,10 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C C COLOR DATA C - DATA (CF(I, 1),I= 1, 2) /5.333333333333333D+00, - $ -6.666666666666666D-01/ + DATA DENOM/3/ + DATA (CF(I),I= 1, 2) /16,-4/ C 1 T(1,2,3,4) - DATA (CF(I, 2),I= 1, 2) /-6.666666666666666D-01 - $ ,5.333333333333333D+00/ + DATA (CF(I),I= 3, 3) /16/ C 1 T(2,1,3,4) C ---------- C BEGIN CODE @@ -446,10 +446,12 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) MATRIX1 = 0.D0 DO M = 1, NAMPSO + CF_INDEX = 0 DO I = 1, NCOLOR ZTEMP = (0.D0,0.D0) - DO J = 1, NCOLOR - ZTEMP = ZTEMP + CF(J,I)*JAMP(J,M) + DO J = I, NCOLOR + CF_INDEX = CF_INDEX + 1 + ZTEMP = ZTEMP + CF(CF_INDEX)*JAMP(J,M) ENDDO DO N = 1, NAMPSO @@ -458,6 +460,7 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) ENDDO ENDDO ENDDO + MATRIX1 = MATRIX1/DENOM IF(SDE_STRAT.EQ.1)THEN AMP2(1)=AMP2(1)+AMP(1)*DCONJG(AMP(1)) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/matrix11.png b/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/matrix11.png new file mode 100644 index 0000000000..9017b25979 Binary files /dev/null and b/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/matrix11.png differ diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/processConfig.h b/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/processConfig.h new file mode 100644 index 0000000000..8f6a27f796 --- /dev/null +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/processConfig.h @@ -0,0 +1,16 @@ +// Copyright (C) 2025 CERN and UCLouvain. +// Licensed under the GNU Lesser General Public License (version 3 or later). +// Created by: S. Roiser (May 2025) for the MG5aMC CUDACPP plugin. +// Further modified by: ... for the MG5aMC CUDACPP plugin. + + +#ifndef MG5_CONFIG_SIGMA_SM_GG_TTX_H +#define MG5_CONFIG_SIGMA_SM_GG_TTX_H 1 + +namespace processConfig { + + constexpr int ndiagrams = 3; + +} + +#endif // MG5_CONFIG_SIGMA_SM_GG_TTX_H \ No newline at end of file diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/cuts.f b/epochX/cudacpp/gg_tt.mad/SubProcesses/cuts.f index 7898714201..bd50ab1357 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/cuts.f +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/cuts.f @@ -307,12 +307,18 @@ LOGICAL FUNCTION PASSCUTS(P, VECSIZE_USED) c c Limit S_hat c - if (dsqrt_shat.ne.0d0)then - if (nincoming.eq.2.and.sumdot(p(0,1),p(0,2),1d0) .lt. dsqrt_shat**2) then - passcuts=.false. - return - endif - endif + if(nincoming.eq.2) then + if (dsqrt_shat.ne.0d0.or.dsqrt_shatmax.ne.-1d0)then + xvar = sumdot(p(0,1),p(0,2),1d0) + if (xvar .lt. dsqrt_shat**2)then + passcuts=.false. + return + else if (dsqrt_shatmax.ne.-1d0 .and. xvar .gt. dsqrt_shatmax**2)then + passcuts = .false. + return + endif + endif + endif C $B$ DESACTIVATE_CUT $E$ !This is a tag for MadWeight if(debug) write (*,*) '=============================' diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/genps.f b/epochX/cudacpp/gg_tt.mad/SubProcesses/genps.f index 1c32e93f5d..8503bdbec8 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/genps.f +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/genps.f @@ -1373,6 +1373,10 @@ subroutine gen_s(x,smin,smax,spole,swidth,s,jac,pass) double precision smin,smax,spole,swidth,s,jac double precision x logical pass + include 'maxparticles.inc' + include '../../Source/vector.inc' + include 'run.inc' + include 'cuts.inc' c c Local c @@ -1384,6 +1388,10 @@ subroutine gen_s(x,smin,smax,spole,swidth,s,jac,pass) c----- c Begin Code c----- + if (dsqrt_shatmax.ne.-1d0)then + smax = min(smax, dsqrt_shatmax**2) + endif + pass=.true. if (jac .eq. 0 .and. .not. warned0) then print*,'Input jacobian 0 in genps' @@ -1628,7 +1636,10 @@ SUBROUTINE GENCMS(S,X1,X2,X,SMIN,SJACOBI) DOUBLE PRECISION ETA,ETAMIN,ETAMAX logical warned data warned/.false./ - + include 'maxparticles.inc' + include '../../Source/vector.inc' + include 'run.inc' + include 'cuts.inc' C------------ C BEGIN CODE C------------ @@ -1645,7 +1656,11 @@ SUBROUTINE GENCMS(S,X1,X2,X,SMIN,SJACOBI) C IF THERE IS NO S CHANNEL POLE USE BELOW: TAUMIN = 0d0 !SMIN/S !keep scale fix - TAUMAX = 1D0 + if (dsqrt_shatmax.ne.-1d0)then + TAUMAX=dsqrt_shatmax**2/S + else + TAUMAX = 1D0 + endif TAU = (TAUMAX-TAUMIN)*X(1)+TAUMIN SJACOBI= sjacobi*(TAUMAX-TAUMIN) @@ -1915,7 +1930,7 @@ double precision function get_channel_cut(p, config) if(sde_strat.eq.2)then t = dot(ptemp(0,-i), ptemp(0,-i)) Mass = prmass(-i, config) - get_channel_cut = get_channel_cut / ((t-Mass)*(t+Mass)+stot*1d-10)**2 + get_channel_cut = get_channel_cut / (t-Mass**2+stot*1d-10)**2 endif c write(*,*) i, "t, Mass, fact", t, Mass, ((t-Mass)*(t+Mass))**2,get_channel_cut t = t/stot @@ -1930,9 +1945,9 @@ double precision function get_channel_cut(p, config) t = dot(ptemp(0,-i), ptemp(0,-i)) Mass = prmass(-i, config) Width = prwidth(-i, config) - tmp = (t-Mass)*(t+Mass) + tmp = (t-Mass**2) tmp2 = Mass*Width - get_channel_cut = get_channel_cut* (tmp**2 - tmp2**2)/(tmp**2 + tmp2**2)**2 + get_channel_cut = get_channel_cut/(tmp**2 + tmp2**2) endif c write(*,*) i, "s, Mass, Width, fact", t, Mass, Width, (((t-Mass)*(t+Mass) )**2 + Width**2*Mass**2), get_channel_cut endif diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/myamp.f b/epochX/cudacpp/gg_tt.mad/SubProcesses/myamp.f index 9e5f8d44dd..5360566ef4 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/myamp.f +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/myamp.f @@ -231,6 +231,7 @@ subroutine set_peaks double precision x1,x2,xk(nexternal) double precision dr,mtot,etot,xqfact double precision spmass + double precision stot ! technically the min with dsqrt_shatmax**2 with the physical one integer i, iconfig, l1, l2, j, nt, nbw, iproc, k integer iden_part(-nexternal+1:nexternal) @@ -285,8 +286,8 @@ subroutine set_peaks integer lbw(0:nexternal) !Use of B.W. common /to_BW/ lbw - double precision stot,m1,m2 - common/to_stot/stot,m1,m2 + double precision real_stot,m1,m2 + common/to_stot/real_stot,m1,m2 include 'coupl.inc' ! needs VECSIZE_MEMMAX (defined in vector.inc) include 'cuts.inc' @@ -309,6 +310,12 @@ subroutine set_peaks c----- c Begin Code c----- + if (dsqrt_shatmax.ne.-1)then + stot = min(real_stot, dsqrt_shatmax**2) + else + stot = real_stot + endif + iconfig = this_config c needs to be initialise to avoid segfault do i = -nexternal,-1 diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/Gridpack/gridrun b/epochX/cudacpp/gg_tt.mad/bin/internal/Gridpack/gridrun index 8c8f7d3940..01d4ab53f5 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/Gridpack/gridrun +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/Gridpack/gridrun @@ -91,7 +91,7 @@ import internal.madevent_interface as cmd_interface try: - cmd_line = cmd_interface.GridPackCmd(me_dir=root_path, nb_event=args[0], seed=args[1], gran=args[2]) + cmd_line = cmd_interface.GridPackCmd(me_dir=root_path, nb_event=args[0], seed=args[1], gran=args[2], nprocs=args[3], maxevts=args[4]) except KeyboardInterrupt: print('Quit on KeyboardInterrupt') diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/Gridpack/run.sh b/epochX/cudacpp/gg_tt.mad/bin/internal/Gridpack/run.sh index 20adf572c2..2d149f96be 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/Gridpack/run.sh +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/Gridpack/run.sh @@ -14,6 +14,18 @@ # USAGE : run [num_events] [iseed] ## ############################################################################# +function usage() { + local retcode="${1:-1}" # default return code is 1 + echo "Usage:" + echo " run.sh [options] [num events] [seed]" + echo " run.sh [options] [num events] [seed] [granularity]" + echo "Options:" + echo " -h, --help print this message and exit" + echo " -p, --parallel [num procs] number of processes to run in parallel" + echo " -m, --maxevts [num events] maximum number of unweighted events per job" + exit $retcode +} + if [[ -d ./madevent ]]; then DIR='./madevent' else @@ -32,23 +44,46 @@ export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${PWD}/madevent/lib:${PWD}/HELAS/lib # For Mac OS X export DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:${PWD}/madevent/lib:${PWD}/HELAS/lib +pos_args=() +nprocs=1 +maxevts=2500 -if [[ ($1 != "") && ("$2" != "") && ("$3" == "") ]]; then - num_events=$1 - seed=$2 - gran=1 -elif [[ ($1 != "") && ("$2" != "") && ("$3" != "") ]]; then - num_events=$1 - seed=$2 - gran=$3 -else - echo "Warning: input is not correct. script requires two arguments: NB_EVENT SEED" -fi +while [[ $# -gt 0 ]]; do + case $1 in + -h|--help) + usage 0 ;; + -p|--parallel) + nprocs="$2" && shift && shift ;; + -m|--maxevts) + maxevts="$2" && shift && shift ;; + -*) + echo "Error: Unknown option $1" && usage ;; + *) + pos_args+=("$1") && shift ;; + esac +done + +case `echo "${pos_args[@]}" | wc -w | tr -d " "` in + "2") + num_events=${pos_args[0]} + seed=${pos_args[1]} + gran=1 + ;; + "3") + num_events=${pos_args[0]} + seed=${pos_args[1]} + gran=${pos_args[2]} + ;; + *) + echo "Error: number of arguments is not correct" + usage + ;; +esac -echo "Now generating $num_events events with random seed $seed and granularity $gran" +echo "Now generating $num_events events with random seed $seed and granularity $gran using $nprocs processes" ############ RUN THE PYTHON CODE ##################### -${DIR}/bin/gridrun $num_events $seed $gran +${DIR}/bin/gridrun $num_events $seed $gran $nprocs $maxevts ######################################################## ########### POSTPROCESSING ##################### diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/banner.py b/epochX/cudacpp/gg_tt.mad/bin/internal/banner.py index 42d82818d0..022861fc31 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/banner.py +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/banner.py @@ -353,7 +353,7 @@ def modify_init_cross(self, cross, allow_zero=False): assert "init" in self cross = dict(cross) - for key in cross.keys(): + for key in list(cross.keys()): if isinstance(key, str) and key.isdigit() and int(key) not in cross: cross[int(key)] = cross[key] @@ -3318,7 +3318,6 @@ def retro_compatible_custom_fct(lines, mode=None): for i,line in enumerate(lines[:]): if search and re.search(include_pat, line): name = re.findall(include_pat, line)[0] - misc.sprint('DETECTED INCLUDE', name) if 'vector.inc' in name: search = False if 'run.inc' in name: @@ -3326,7 +3325,6 @@ def retro_compatible_custom_fct(lines, mode=None): search = False sol.append(line) if re.search(function_pat, line): - misc.sprint("DETECTED FCT") search = True return sol @@ -4201,6 +4199,7 @@ def default_setup(self): self.add_param("bwcutoff", 15.0) self.add_param("cut_decays", False, cut='d') self.add_param('dsqrt_shat',0., cut=True) + self.add_param('dsqrt_shatmax', -1, cut=True) self.add_param("nhel", 0, include=False) self.add_param("limhel", 1e-8, hidden=True, comment="threshold to determine if an helicity contributes when not MC over helicity.") #pt cut @@ -5577,6 +5576,9 @@ def default_setup(self): #technical self.add_param('folding', [1,1,1], include=False) + + #bias + self.add_param('flavour_bias',[5,1], hidden=True, comment="Example: '5,100' means that the probability to generate an event with a bottom (or anti-bottom) quark is increased by a factor 100, but the weight of those events is reduced by a factor 100. Requires that the 'event_norm' is set to 'bias'.") #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]") @@ -5790,6 +5792,17 @@ def check_validity(self): if self['mcatnlo_delta'] and not self['parton_shower'].lower() == 'pythia8': raise InvalidRunCard("MC@NLO-DELTA only possible with matching to Pythia8") + # check that the flavour_bias is consistent + if len(self['flavour_bias']) != 2: + raise InvalidRunCard("'flavour_bias' should contain exactly two numbers: the abs(PDG) of the flavour to enhance, and the enhancement multiplication factor.") + for i in self['flavour_bias']: + if i < 0: + raise InvalidRunCard("flavour and multiplication factor should be positive in the flavour_bias parameter") + if self['flavour_bias'][1] != 1 and self['event_norm'] != 'bias': + logger.warning('Non-trivial flavour enhancement factor: setting event normalisation to "bias"') + self['event_norm']='bias' + + # check that ebeam is bigger than the proton mass. for i in [1,2]: # do not for proton mass if not proton PDF (or when scan initialization) 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 bc785b5de6..a34705f6bc 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 @@ -1092,11 +1092,11 @@ def write_summary(self, path, order=None, lastline=False, nbcol=20): to_print = self.cross[-1:] for info in to_print: name = info['run_name'] - bench = info['bench'] + bench = [float(x) for x in info['bench']] data = [] for k in keys: if k in info: - data.append(info[k]) + data.append(float(info[k])) else: data.append(0.) ff.write(formatting % tuple([name] + bench + data)) 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 9ff7390cf5..541cd6294b 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 @@ -750,8 +750,8 @@ def __init__(self, me_dir, options, *args, **opts): else: self.ninitial = self.proc_characteristics['ninitial'] - def make_make_all_html_results(self, folder_names = [], jobs=[]): - return sum_html.make_all_html_results(self, folder_names, jobs) + def make_make_all_html_results(self, folder_names = [], jobs=[], get_attr=None): + return sum_html.make_all_html_results(self, folder_names, jobs, get_attr) def write_RunWeb(self, me_dir): @@ -3831,7 +3831,7 @@ def store_scan_result(self): """return the information that need to be kept for the scan summary. Auto-width are automatically added.""" - return {'cross': self.results.current['cross']} + return {'cross': self.results.current['cross'], 'error': self.results.current['error']} def add_error_log_in_html(self, errortype=None): @@ -5135,10 +5135,10 @@ def init_run(self, cards): self.special_shortcut.update( {'ebeam':([float],['run_card ebeam1 %(0)s', 'run_card ebeam2 %(0)s']), 'lpp': ([int],['run_card lpp1 %(0)s', 'run_card lpp2 %(0)s' ]), - 'lhc': ([int],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), + 'lhc': ([float],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), 'lep': ([int],['run_card lpp1 0', 'run_card lpp2 0', 'run_card ebeam1 %(0)s/2', 'run_card ebeam2 %(0)s/2']), 'ilc': ([int],['run_card lpp1 0', 'run_card lpp2 0', 'run_card ebeam1 %(0)s/2', 'run_card ebeam2 %(0)s/2']), - 'lcc': ([int],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), + 'lcc': ([float],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), 'fixed_scale': ([float],['run_card fixed_fac_scale T', 'run_card fixed_ren_scale T', 'run_card scale %(0)s', 'run_card dsqrt_q2fact1 %(0)s' ,'run_card dsqrt_q2fact2 %(0)s']), 'no_parton_cut':([],['run_card nocut T']), 'cm_velocity':([float], [lambda self :self.set_CM_velocity]), @@ -6740,7 +6740,15 @@ def postcmd(self, stop, line): return ending_question - + def help_update(self): + logger.info(""" syntax: update dependent: Change the mass/width of particles which are not free parameter for the model. + update missing: add to the current param_card missing blocks/parameters. + update to_slha1: pass SLHA2 card to SLHA1 convention. (beta) + update to_slha2: pass SLHA1 card to SLHA2 convention. (beta) + update to_full [run_card] + update XXX [where XXX correspond to a hidden block of the run_card]: + supported block are %s + """, ', '.join(self.update_block)) def do_update(self, line, timer=0): @@ -6756,6 +6764,8 @@ def do_update(self, line, timer=0): logger.warning('miss an argument (dependent or missing). Please retry') return + args[0] = args[0].lower() + if args[0] == 'dependent': if not self.mother_interface: logger.warning('Failed to update dependent parameter. This might create trouble for external program (like MadSpin/shower/...)') @@ -6805,10 +6815,11 @@ def do_update(self, line, timer=0): self.modified_card.add('run') # delay writting of the run_card logger.info('add optional block %s to the run_card', args[0]) else: - self.help_update() + self.do_help('update') logger.warning('unvalid options for update command. Please retry') + def update_to_full(self, line): """ trigger via update to_full LINE""" 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 789976beee..c321fd88e5 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/extended_cmd.py +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/extended_cmd.py @@ -1317,6 +1317,8 @@ def nice_error_handling(self, error, line): debug_file = open(self.debug_output, 'a') traceback.print_exc(file=debug_file) + if __debug__: + traceback.print_exc() if hasattr(error, 'filename'): debug_file.write("Related File: %s\n" % error.filename) # Create a nice error output @@ -1928,7 +1930,8 @@ def do_display(self, line, output=sys.stdout): for i, name in enumerate(split): try: __import__('.'.join(split[:i+1])) - exec('%s=sys.modules[\'%s\']' % (split[i], '.'.join(split[:i+1]))) + tmp = {} + exec('%s=sys.modules[\'%s\']' % (split[i], '.'.join(split[:i+1])), globals(),tmp) except ImportError: try: var = eval(args[1]) @@ -1939,7 +1942,7 @@ def do_display(self, line, output=sys.stdout): outstr += 'EXTERNAL:\n' outstr += misc.nice_representation(var, nb_space=4) else: - var = eval(args[1]) + var = eval(args[1], globals(), tmp) outstr += 'EXTERNAL:\n' outstr += misc.nice_representation(var, nb_space=4) diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/file_writers.py b/epochX/cudacpp/gg_tt.mad/bin/internal/file_writers.py index 526756129f..74ba0d195c 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/file_writers.py +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/file_writers.py @@ -140,10 +140,6 @@ def preprocess_template(self, input_lines, context={}): else: raise self.FileWriterError("%s not string" % repr(input_lines)) - # Setup the contextual environment - for contextual_variable, value in context.items(): - exec('%s=%s'%(str(contextual_variable),repr(value))) - res = [] # The variable below tracks the conditional statements structure if_stack = [] @@ -166,7 +162,7 @@ def preprocess_template(self, input_lines, context={}): # Treat an if statement elif preproc_command.group('command')=='if': try: - if_stack.append(eval(preproc_command.group('body'))==True) + if_stack.append(eval(preproc_command.group('body'), globals(), context)==True) except Exception as e: raise self.FilePreProcessingError('Could not evaluate'+\ "python expression '%s' given the context %s provided."%\ diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/files.py b/epochX/cudacpp/gg_tt.mad/bin/internal/files.py index 551b71ddb6..3061b007e7 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/files.py +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/files.py @@ -147,9 +147,14 @@ def cp(path1, path2, log=True, error=False): path2 = format_path(path2) try: shutil.copy(path1, path2) + except shutil.Error as why: + logger.debug('no cp since identical: %s', why) + return except IOError as why: import madgraph.various.misc as misc try: + if 'same file' in str(why): + return if os.path.exists(path2): path2 = os.path.join(path2, os.path.split(path1)[1]) misc.copytree(path1, path2) @@ -157,12 +162,10 @@ def cp(path1, path2, log=True, error=False): if error: raise if log: - logger.warning(why) + logger.warning("fail to cp", path1, path2, why) else: - misc.sprint("fail to cp", why) - except shutil.Error: - # idetical file - pass + misc.sprint("fail to cp",path1,path2, why) + def rm(path, log=True): """removes path, that can be a single element or a list""" diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/gen_cardhtml-pl b/epochX/cudacpp/gg_tt.mad/bin/internal/gen_cardhtml-pl index 1810c6c082..6e0e06533d 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/gen_cardhtml-pl +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/gen_cardhtml-pl @@ -137,7 +137,7 @@ until($listpos>$#incard){ print PAGE " Model: $model \n"; print PAGE " \n \n
\n"; print PAGE " \n"; - print PAGE "\"\" \n"; + print PAGE "\"\" \n"; print PAGE "
\n"; print PAGE " \n \n \n"; print PAGE " \n"; diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/gen_crossxhtml.py b/epochX/cudacpp/gg_tt.mad/bin/internal/gen_crossxhtml.py index 681bf9d09b..3114a4350c 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/gen_crossxhtml.py +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/gen_crossxhtml.py @@ -133,7 +133,7 @@ class AllResults(dict): web = False - _run_entries = ['cross', 'error','nb_event_pythia','run_mode','run_statistics', + _run_entries = ['cross', 'error','axsec','nb_event_pythia','run_mode','run_statistics', 'nb_event','cross_pythia','error_pythia', 'nb_event_pythia8','cross_pythia8','error_pythia8', 'shower_dir'] diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/gen_jpeg-pl b/epochX/cudacpp/gg_tt.mad/bin/internal/gen_jpeg-pl index 87d03da394..31b7e9fe55 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/gen_jpeg-pl +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/gen_jpeg-pl @@ -1,16 +1,16 @@ #!/usr/bin/perl -w #--------------------------------------------------------------------- -# Run GS to create jpeg files defined as $gs +# Run GS to create PNG files defined as $gs #--------------------------------------------------------------------- -system("/bin/bash -c \"rm -f matrix*.jpg\" "); +system("/bin/bash -c \"rm -f matrix*.png\" "); $imatrix = ""; if (! -e "matrix.ps") {$imatrix = 1;} -$max_jpg = 2; -if ($imatrix eq "") {$max_jpg = 5;} -# add 1 to max_jpg, to get max_jpg pages -$max_jpg += 1; +$max_png = 2; +if ($imatrix eq "") {$max_png = 5;} +# add 1 to max_png, to get max_png pages +$max_png += 1; open(PAGE,"> diagrams.html") || die "Error creating diagrams.html"; print PAGE "\ \n"; print PAGE "\ \n"; @@ -21,22 +21,22 @@ while ( -e "matrix$imatrix.ps"){ open(IN, "< matrix$imatrix.ps") || die "No file matrix$imatrix.ps"; open(OUT, "> matrix-1.ps") || die "Could not open file matrix-1.ps"; while () { - if ($_ =~ m/^%%Page: $max_jpg $max_jpg/) {last;} + if ($_ =~ m/^%%Page: $max_png $max_png/) {last;} else {print OUT $_, "\n";} } close(OUT); close(IN); - system "/bin/bash -c \"nice gs \-sDEVICE\=jpeg \-sOutputFile\=matrix$imatrix\%00d.jpg \-q \-dNOPAUSE \-dBATCH matrix-1.ps > /dev/null\""; + system "/bin/bash -c \"nice gs \-sDEVICE\=pngmono \-r150 \-sOutputFile\=matrix$imatrix\%00d.png \-q \-dNOPAUSE \-dBATCH matrix-1.ps > /dev/null\""; system "rm -f matrix-1.ps"; -# Determine how many jpg files we have +# Determine how many png files we have $pages=1; - while(-e "matrix$imatrix$pages.jpg"){ + while(-e "matrix$imatrix$pages.png"){ $pages++; }#end of while #reduce it by one - if ($pages > $max_jpg){ + if ($pages > $max_png){ $pages -= 1; } # Find name of process @@ -45,24 +45,24 @@ while ( -e "matrix$imatrix.ps"){ if ($proc =~ /Process: (.+?)(\s\w+=\d+)*$/) { $proc = $1; } print PAGE "

To save bandwidth not all diagrams were converted to jpeg."; + if (-e "matrix$imatrix$max_png.png" ) { + print PAGE "

To save bandwidth not all diagrams were converted to PNG."; print PAGE "

To view all diagrams click on "; print PAGE "\ postscript. \<\/A\> \ \n"; # # Delete files which aren't included in diagrams.html # - system ("/bin/bash -c \"rm -f matrix$max_jpg.jpg\" "); + system ("/bin/bash -c \"rm -f matrix$max_png.png\" "); } # -# Now create jpeg file for card +# Now create PNG file for card # - if (! -e "../../HTML/card.jpg") { + if (! -e "../../HTML/card.png") { system ("/bin/bash -c \"head -352 matrix$imatrix.ps >& junk.ps\" "); open(JUNK,">> junk.ps") || die "Error opening junk.ps"; @@ -72,7 +72,7 @@ while ( -e "matrix$imatrix.ps"){ system ("/bin/bash -c \"cat matrix$imatrix.ps | sed 1,352d >> junk.ps\" "); - system "/bin/bash -c \"nice gs \-sDEVICE\=jpeg \-sOutputFile\=card.jpg \-q \-dNOPAUSE \-dBATCH \-g180x150 ./junk.ps; rm -f junk.ps; cp -p card.jpg ../../HTML/card.jpg > /dev/null\" "; + system "/bin/bash -c \"nice gs \-sDEVICE\=pngmono \-sOutputFile\=card.png \-q \-dNOPAUSE \-dBATCH \-g180x150 ./junk.ps; rm -f junk.ps; cp -p card.png ../../HTML/card.png > /dev/null\" "; } if ($imatrix eq "") {$imatrix = 0;} $imatrix = $imatrix + 1; @@ -82,3 +82,4 @@ print PAGE "\n"; print PAGE "\<\/BODY\> \n"; print PAGE "\<\/HTML\> \n"; close(PAGE); + 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 415ecc9de0..d5d7fc8faf 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/gen_ximprove.py +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/gen_ximprove.py @@ -30,6 +30,7 @@ import stat import sys import six +import time from six.moves import range from six.moves import zip @@ -304,6 +305,7 @@ def get_helicity(self, to_submit=True, clean=True): logger.debug('(%s) nb_hel: %s zero amp: %s bad_amps_hel: %s/%s', split_file[-1], len(good_hels),len(bad_amps),len(bad_amps_perhel), len(good_hels)*nb_amp ) if len(good_hels) == 1: files.cp(matrix_file, matrix_file.replace('orig','optim')) + files.cp(matrix_file.replace('.f','.o'), matrix_file.replace('orig','optim').replace('.f','.o')) continue # avoid optimization if onlye one helicity gauge = self.cmd.proc_characteristics['gauge'] @@ -1059,6 +1061,7 @@ def __init__(self, cmd, opt=None): # parameter for the gridpack run self.nreq = 2000 self.iseed = 4321 + self.maxevts = 2500 # placeholder for information self.results = 0 #updated in launch/update_html @@ -1200,6 +1203,10 @@ def reset_multijob(self): def write_multijob(self, Channel, nb_split): """ """ if nb_split <=1: + try: + os.remove(pjoin(self.me_dir, 'SubProcesses', Channel.get('name'), 'multijob.dat')) + except OSError: + pass return f = open(pjoin(self.me_dir, 'SubProcesses', Channel.get('name'), 'multijob.dat'), 'w') f.write('%i\n' % nb_split) @@ -1828,17 +1835,17 @@ class gen_ximprove_gridpack(gen_ximprove_v4): 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 gen_events_security = 1.00 - def __new__(cls, *args, **opts): + def __new__(cls, cmd, opts): cls.force_class = 'gridpack' - return super(gen_ximprove_gridpack, cls).__new__(cls, *args, **opts) + return super(gen_ximprove_gridpack, cls).__new__(cls, cmd, opts) - def __init__(self, *args, **opts): + def __init__(self, cmd, opts): self.ngran = -1 + self.nprocs = 1 self.gscalefact = {} self.readonly = False if 'ngran' in opts: @@ -1846,9 +1853,18 @@ def __init__(self, *args, **opts): # del opts['ngran'] if 'readonly' in opts: self.readonly = opts['readonly'] - super(gen_ximprove_gridpack,self).__init__(*args, **opts) + if 'nprocs' in opts: + self.nprocs = int(opts['nprocs']) + if 'maxevts' in opts and self.nprocs > 1: + self.max_request_event = int(opts['maxevts']) + super(gen_ximprove_gridpack,self).__init__(cmd, opts) if self.ngran == -1: self.ngran = 1 + + if self.nprocs > 1: + self.combining_job = 0 + else: + self.combining_job = sys.maxsize def find_job_for_event(self): """return the list of channel that need to be improved""" @@ -1876,8 +1892,8 @@ def find_job_for_event(self): continue # no event to generate events self.gscalefact[tag] = max(1, 1/(goal_lum * C.get('axsec')/ self.ngran)) #need to generate events - logger.debug('request events for ', C.get('name'), 'cross=', - C.get('axsec'), 'needed events = ', goal_lum * C.get('axsec')) + logger.debug('request events for %s cross=%d needed events = %d', + C.get('name'), C.get('axsec'), goal_lum * C.get('axsec')) to_refine.append(C) logger.info('need to improve %s channels' % len(to_refine)) @@ -1897,8 +1913,13 @@ def get_job_for_event(self): 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 - + nb_split = int(max(1,((needed_event-1)// self.max_request_event) +1)) + if not self.split_channels: + nb_split = 1 + if nb_split > self.max_splitting: + 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')) @@ -1908,13 +1929,16 @@ def get_job_for_event(self): nevents = self.max_event_in_iter if nevents < self.min_event_in_iter: + nb_split = int(nb_split * nevents / self.min_event_in_iter) + 1 # sr dangerous? nevents = self.min_event_in_iter # # 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) - + # write the multi-job information + self.write_multijob(C, nb_split) + #create the info dict assume no splitting for the default info = {'name': self.cmd.results.current['run_name'], 'script_name': 'unknown', @@ -1925,7 +1949,7 @@ def get_job_for_event(self): 'nevents': nevents, #int(nevents*self.gen_events_security)+1, 'maxiter': self.max_iter, 'miniter': self.min_iter, - 'precision': -1*int(needed_event)/C.get('axsec'), + 'precision': -goal_lum/nb_split, # -1*int(needed_event)/C.get('axsec'), 'requested_event': needed_event, 'nhel': self.run_card['nhel'], 'channel': C.name.replace('G',''), @@ -1938,27 +1962,59 @@ def get_job_for_event(self): basedir = pjoin(os.path.dirname(__file__), '..','..','SubProcesses', info['P_dir'], info['directory']) info['base_directory'] = basedir - jobs.append(info) - + if nb_split == 1: + jobs.append(info) + else: + for i in range(nb_split): + new_info = dict(info) + new_info['offset'] = i+1 + new_info['directory'] += self.alphabet[i % 26] + str((i+1)//26) + new_info['base_directory'] = info['directory'] + jobs.append(new_info) write_dir = '.' if self.readonly else None self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), jobs, write_dir) + if self.nprocs > 1: + nprocs_cluster = cluster.MultiCore(nb_core=self.nprocs) + gridpack_start = time.time() + def gridpack_wait_monitoring(Idle, Running, Done): + if Idle+Running+Done == 0: + return + logger.info("Gridpack event generation: %s Idle, %s Running, %s Done [%s]" + % (Idle, Running, Done, misc.format_time(time.time()-gridpack_start))) + done = [] for j in jobs: - if j['P_dir'] in done: - continue - done.append(j['P_dir']) + if self.nprocs == 1: + if j['P_dir'] in done: + continue + done.append(j['P_dir']) + # Give a little status. Sometimes these jobs run very long, and having hours without any + # console output can be a bit frightening and make users think we are looping. + if len(done)%5==0: + logger.info(f"Working on job {len(done)} of {len(jobs)}") + # set the working directory path. pwd = pjoin(os.getcwd(),j['P_dir']) if self.readonly else pjoin(self.me_dir, 'SubProcesses', j['P_dir']) - exe = pjoin(pwd, 'ajob1') + exe = pjoin(pwd, j['script_name']) st = os.stat(exe) os.chmod(exe, st.st_mode | stat.S_IEXEC) # run the code\ - cluster.onecore.launch_and_wait(exe, cwd=pwd, packet_member=j['packet']) + if self.nprocs == 1: + cluster.onecore.launch_and_wait(exe, cwd=pwd, packet_member=j['packet']) + else: + nprocs_cluster.cluster_submit(exe, cwd=pwd, packet_member=j['packet']) write_dir = '.' if self.readonly else pjoin(self.me_dir, 'SubProcesses') + if self.nprocs > 1: + nprocs_cluster.wait(self.me_dir, gridpack_wait_monitoring) + + if self.readonly: + combine_runs.CombineRuns(write_dir) + else: + combine_runs.CombineRuns(self.me_dir) self.check_events(goal_lum, to_refine, jobs, write_dir) def check_events(self, goal_lum, to_refine, jobs, Sdir): diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/hel_recycle.py b/epochX/cudacpp/gg_tt.mad/bin/internal/hel_recycle.py index 1471de4bcb..978ba6575e 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/hel_recycle.py +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/hel_recycle.py @@ -550,7 +550,7 @@ def get_jamp_lines(self, line): def get_amp2_lines(self, line): if line.startswith(' DO I = 1, NCOLOR'): self.in_amp2 = False - elif not line.isspace(): + elif not line.isspace() and 'DENOM' not in line: self.template_dict['amp2_lines'] += f'{line[0:6]} {self.add_indices(line[6:])}' def prepare_bools(self): diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/histograms.py b/epochX/cudacpp/gg_tt.mad/bin/internal/histograms.py index 51ae2914fc..d68c560806 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/histograms.py +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/histograms.py @@ -1149,11 +1149,8 @@ def parse_one_histo_from_stream(self, stream, all_weight_header, boundaries = [0.0,0.0] for j, weight in \ enumerate(HwU.histo_bin_weight_re.finditer(line_bin)): - if (j == len(weight_header)): - continue - if j == len(all_weight_header): - raise HwU.ParseError("There is more bin weights"+\ - " specified than expected (%i)"%len(weight_header)) + #if (j == len(weight_header)): + # continue if selected_central_weight == all_weight_header[j]: bin_weights['central'] = float(weight.group('weight')) if all_weight_header[j] == 'boundary_xmin': @@ -2480,14 +2477,14 @@ def get_main_central_plot_lines(HwU_name, block_position, color_index, # return [template_no_stat%rep_dic]+\ # ([template%rep_dic] if show_mc_uncertainties else []) - # The use of sqrt(-1) is just a trick to prevent the line to display + # The use of 1/0 is just a trick to prevent the line to display res = [] - rep_dic['data'] = '($3 < 0 ? sqrt(-1) : $3)' + rep_dic['data'] = '($3 < 0 ? 1/0 : $3)' res.append(template_no_stat%rep_dic) rep_dic['title'] = " title ''" if show_mc_uncertainties: res.append(template%rep_dic) - rep_dic['data'] = '($3 >= 0 ? sqrt(-1) : abs($3))' + rep_dic['data'] = '($3 >= 0 ? 1/0 : abs($3))' rep_dic['ls'] = ' ls %d'%(100+color_index) res.append(template_no_stat%rep_dic) if show_mc_uncertainties: @@ -2739,13 +2736,13 @@ def ratio_no_correlations(wgtsA, wgtsB): """#-- rendering subhistograms '%(subhistogram_type)s' %(unset label)s %(set_format_y)s +%(set_yscale)s set yrange [%(ymin).4e:%(ymax).4e] set origin %(origin_x).4e, %(origin_y).4e set size %(size_x).4e, %(size_y).4e set mytics %(mytics)d %(set_ytics)s %(set_format_x)s -%(set_yscale)s %(set_ylabel)s %(set_histo_label)s plot \\""" @@ -2878,7 +2875,7 @@ def ratio_no_correlations(wgtsA, wgtsB): # We decide to show uncertainties in the main plot only if they # are part of a monocolor band. Otherwise, they will only be - # shown in the first subplot. Notice that plotting 'sqrt(-1)' + # shown in the first subplot. Notice that plotting '1/0' # is just a trick so as to have only the key printed with no # line @@ -2890,7 +2887,7 @@ def ratio_no_correlations(wgtsA, wgtsB): '%s, scale variation'%title, band='scale' in use_band) else: uncertainty_plot_lines[-1]['scale'] = \ - ["sqrt(-1) ls %d title '%s'"%(color_index+10,'%s, scale variation'%title)] + ["1/0 ls %d title '%s'"%(color_index+10,'%s, scale variation'%title)] # And now PDF_variation if available if not PDF_var_pos is None and len(PDF_var_pos)>0: if 'pdf' in use_band: @@ -2899,7 +2896,7 @@ def ratio_no_correlations(wgtsA, wgtsB): '%s, PDF variation'%title, band='pdf' in use_band) else: uncertainty_plot_lines[-1]['pdf'] = \ - ["sqrt(-1) ls %d title '%s'"%(color_index+20,'%s, PDF variation'%title)] + ["1/0 ls %d title '%s'"%(color_index+20,'%s, PDF variation'%title)] # And now merging variation if available if not merging_var_pos is None and len(merging_var_pos)>0: if 'merging_scale' in use_band: @@ -2908,7 +2905,7 @@ def ratio_no_correlations(wgtsA, wgtsB): '%s, merging scale variation'%title, band='merging_scale' in use_band) else: uncertainty_plot_lines[-1]['merging_scale'] = \ - ["sqrt(-1) ls %d title '%s'"%(color_index+30,'%s, merging scale variation'%title)] + ["1/0 ls %d title '%s'"%(color_index+30,'%s, merging scale variation'%title)] # And now alpsfact variation if available if not alpsfact_var_pos is None and len(alpsfact_var_pos)>0: if 'alpsfact' in use_band: @@ -2917,7 +2914,7 @@ def ratio_no_correlations(wgtsA, wgtsB): '%s, alpsfact variation'%title, band='alpsfact' in use_band) else: uncertainty_plot_lines[-1]['alpsfact'] = \ - ["sqrt(-1) ls %d title '%s'"%(color_index+40,'%s, alpsfact variation'%title)] + ["1/0 ls %d title '%s'"%(color_index+40,'%s, alpsfact variation'%title)] # plot_lines.append( # "'%s' index %d using (($1+$2)/2):3 ls %d title '%s'"\ diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/launch_plugin.py b/epochX/cudacpp/gg_tt.mad/bin/internal/launch_plugin.py index 0924927785..ba08c10340 100644 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/launch_plugin.py +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/launch_plugin.py @@ -33,7 +33,7 @@ def compile(self, *args, **opts): if 'cwd' in opts and os.path.basename(opts['cwd']) == 'Source': path = pjoin(opts['cwd'], 'make_opts') common_run_interface.CommonRunCmd.update_make_opts_full(path, - {'FPTYPE': self.run_card['floating_type'] }) + {'override FPTYPE': self.run_card['floating_type'] }) misc.sprint('FPTYPE checked') cudacpp_supported_backends = [ 'fortran', 'cuda', 'hip', 'cpp', 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z', 'cppauto' ] if args and args[0][0] == 'madevent' and hasattr(self, 'run_card'): @@ -76,7 +76,7 @@ def reset_makeopts(self, old_value, new_value, name): if not hasattr(self, 'path'): raise Exception if name == 'floating_type': - common_run_interface.CommonRunCmd.update_make_opts_full({'FPTYPE': new_value}) + common_run_interface.CommonRunCmd.update_make_opts_full({'override FPTYPE': new_value}) else: raise Exception Sourcedir = pjoin(os.path.dirname(os.path.dirname(self.path)), 'Source') diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/lhe_parser.py b/epochX/cudacpp/gg_tt.mad/bin/internal/lhe_parser.py index f6e47956cd..76ded329c0 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/lhe_parser.py +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/lhe_parser.py @@ -2953,8 +2953,8 @@ def pt(self): @property def pseudorapidity(self): - norm = math.sqrt(self.px**2 + self.py**2+self.pz**2) - return 0.5* math.log((norm - self.pz) / (norm + self.pz)) + norm = math.sqrt(self.px**2 + self.py**2 + self.pz**2) + return 0.5* math.log((norm + self.pz) / (norm - self.pz)) @property def rapidity(self): 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 85e5bcf5e3..2852f1d4d8 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/madevent_interface.py +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/madevent_interface.py @@ -1171,10 +1171,10 @@ def check_survey(self, args, cmd='survey'): for opt,value in self._survey_options.items(): if arg.startswith('--%s=' % opt): exec('self.opts[\'%s\'] = %s(arg.split(\'=\')[-1])' % \ - (opt, value[0])) + (opt, value[0]), globals(), {'self':self, 'arg':arg}) arg = "" if arg != "": raise Exception - except Exception: + except Exception as error: self.help_survey() raise self.InvalidCmd('invalid %s argument'% arg) @@ -3656,9 +3656,11 @@ def do_refine(self, line): else: self.refine_mode = "new" - cross, error = self.make_make_all_html_results() + cross, error, across = self.make_make_all_html_results(get_attr=('xsec','xerru','axsec')) + self.results.add_detail('cross', cross) self.results.add_detail('error', error) + self.results.add_detail('axsec', across) self.results.add_detail('run_statistics', dict(self.results.get_detail('run_statistics'))) @@ -3786,7 +3788,7 @@ def split(a, n): for i, local_G in enumerate(split(Gdirs, nb_chunk)): line = [pjoin(self.me_dir, "Events", self.run_name, "partials%d.lhe.gz" % i)] line.append(pjoin(self.me_dir, 'Events', self.run_name, '%s_%s_banner.txt' % (self.run_name, tag))) - line.append(str(self.results.current['cross'])) + line.append(str(self.results.current.get('axsec'))) line += local_G partials_info.append(self.do_combine_events_partial(' '.join(line), preprocess_only=True)) mycluster.submit(sys.executable, @@ -6749,7 +6751,7 @@ def get_subP_ids(path): class GridPackCmd(MadEventCmd): """The command for the gridpack --Those are not suppose to be use interactively--""" - def __init__(self, me_dir = None, nb_event=0, seed=0, gran=-1, *completekey, **stdin): + def __init__(self, me_dir = None, nb_event=0, seed=0, gran=-1, nprocs=1, maxevts=2500, *completekey, **stdin): """Initialize the command and directly run""" # Initialize properly @@ -6759,6 +6761,8 @@ 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.nprocs = nprocs + self.maxevts = maxevts self.options['automatic_html_opening'] = False #write the grid_card.dat on disk @@ -6874,7 +6878,7 @@ def launch(self, nb_event, seed): #misc.call([pjoin(self.me_dir,'bin','refine4grid'), # str(nb_event), '0', 'Madevent','1','GridRun_%s' % seed], # cwd=self.me_dir) - self.refine4grid(nb_event) + self.gridpack_cross = self.refine4grid(nb_event) # 3) Combine the events/pythia/... self.exec_cmd('combine_events') @@ -6902,6 +6906,8 @@ def refine4grid(self, nb_event): precision = nb_event + across= self.make_make_all_html_results(get_attr='axsec') + self.opts = dict([(key,value[1]) for (key,value) in \ self._survey_options.items()]) @@ -6915,8 +6921,9 @@ def refine4grid(self, nb_event): 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} + refine_opt = {'err_goal': nb_event, 'split_channels': True, + 'ngran':self.granularity, 'readonly': self.readonly, + 'nprocs': self.nprocs, 'maxevts': self.maxevts} 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 @@ -6926,7 +6933,7 @@ def refine4grid(self, nb_event): #print 'run combine!!!' #combine_runs.CombineRuns(self.me_dir) - return + return across #update html output Presults = sum_html.collect_result(self) cross, error = Presults.xsec, Presults.xerru @@ -7051,10 +7058,14 @@ def do_combine_events(self, line): sum_axsec += result.get('axsec')*gscalefact[Gdir] if len(AllEvent) >= 80: #perform a partial unweighting - if self.results.current['cross'] == 0 and self.run_card['gridpack']: - nb_event= self.nb_event + if not self.results.current.get('axsec'): + if self.run_card['gridpack'] and self.gridpack_cross: + nb_event = min(abs(1.05*self.nb_event*sum_axsec/self.gridpack_cross),self.nb_event) + else: + nb_event= self.nb_event else: - nb_event = min(abs(1.01*self.nb_event*sum_axsec/self.results.current['cross']),self.run_card['nevents']) + nb_event = min(abs(1.01*self.nb_event*sum_axsec/self.results.current.get('axsec')),self.run_card['nevents'], self.nb_event, self.gridpack_cross, sum_axsec) + misc.sprint(nb_event, self.results.current.get('axsec'), self.gridpack_cross) AllEvent.unweight(pjoin(outdir, self.run_name, "partials%s.lhe.gz" % partials), get_wgt, log_level=5, trunc_error=1e-2, event_target=nb_event) AllEvent = lhe_parser.MultiEventFile() @@ -7068,6 +7079,7 @@ def do_combine_events(self, line): for data in partials_info: AllEvent.add(*data) + sum_xsec += data[1] if not hasattr(self,'proc_characteristic'): self.proc_characteristic = self.get_characteristics() diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/restore_data b/epochX/cudacpp/gg_tt.mad/bin/internal/restore_data index 6205bb9567..407ed7aa91 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/restore_data +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/restore_data @@ -48,8 +48,17 @@ for i in `cat subproc.mg` ; do cd ../ done +# check if we are on a Mac, otherwise assume Linux +if [[ "$OSTYPE" == "darwin"* ]]; then + # no nproc on Mac, so use sysctl instead + # use -S1024 because there is a limit on the length of the command + xargs_opts="-P $(sysctl -n hw.ncpu) -S1024" +else + xargs_opts="-P $(nproc --all)" +fi + find . -mindepth 2 -maxdepth 2 -type d -name 'G*' -print0 \ - | xargs --null -P "$(nproc --all)" -I{} bash -c " + | xargs --null ${xargs_opts} -I{} bash -c " cd {} for j in $1_results.dat ; do if [[ -e \$j ]] ; then diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/sum_html.py b/epochX/cudacpp/gg_tt.mad/bin/internal/sum_html.py index 9dd5826f71..fb8dd3a74a 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/sum_html.py +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/sum_html.py @@ -770,7 +770,7 @@ def collect_result(cmd, folder_names=[], jobs=None, main_dir=None): return all -def make_all_html_results(cmd, folder_names = [], jobs=[]): +def make_all_html_results(cmd, folder_names = [], jobs=[], get_attr=None): """ folder_names and jobs have been added for the amcatnlo runs """ run = cmd.results.current['run_name'] if not os.path.exists(pjoin(cmd.me_dir, 'HTML', run)): @@ -794,7 +794,12 @@ def make_all_html_results(cmd, folder_names = [], jobs=[]): fsock.write('%s

' % Presults.get_html(run, unit, cmd.me_dir)) fsock.write('%s
' % P_text) - return Presults.xsec, Presults.xerru + if not get_attr: + return Presults.xsec, Presults.xerru + else: + if isinstance(get_attr, tuple): + return [getattr(Presults, _) for _ in get_attr] + return getattr(Presults, get_attr) diff --git a/epochX/cudacpp/gg_tt.mad/bin/internal/ufomodel/write_param_card.py b/epochX/cudacpp/gg_tt.mad/bin/internal/ufomodel/write_param_card.py index 57a85b0614..33a89259f8 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/ufomodel/write_param_card.py +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/ufomodel/write_param_card.py @@ -116,9 +116,10 @@ def write_param(self, param, lhablock): def write_dep_param_block(self, lhablock): import cmath from parameters import all_parameters + param_values = {'cmath':cmath} for parameter in all_parameters: try: - exec("%s = %s" % (parameter.name, parameter.value)) + exec("%s = %s" % (parameter.name, parameter.value), globals(), param_values) except Exception: pass text = "## Not dependent paramater.\n" @@ -134,7 +135,7 @@ def write_dep_param_block(self, lhablock): prefix = "DECAY " for part, param in data: if isinstance(param.value, str): - value = complex(eval(param.value)).real + value = complex(eval(param.value, globals(), param_values)).real else: value = param.value diff --git a/epochX/cudacpp/gg_tt.mad/bin/madevent b/epochX/cudacpp/gg_tt.mad/bin/madevent index dff9711b73..9c5363e682 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/madevent +++ b/epochX/cudacpp/gg_tt.mad/bin/madevent @@ -178,6 +178,17 @@ force_run = False if (args and args[0] == 'treatcards'): force_run=True + +# check that madgraph is not in PYTHONPATH +try: + import madgraph +except ImportError: + pass +else: + logger.getLogger('madgraph').error('Looks like you do have madgraph in your PYTHONPATH (or you run this executable from the main MG5aMC directory). This executable will likely not work in such case.') + + + # Call the cmd interface main loop try: if '-h' in args or '--help' in args: diff --git a/epochX/cudacpp/gg_tt.mad/src/HelAmps_sm.h b/epochX/cudacpp/gg_tt.mad/src/HelAmps_sm.h index febf1dcf42..c7283310f9 100644 --- a/epochX/cudacpp/gg_tt.mad/src/HelAmps_sm.h +++ b/epochX/cudacpp/gg_tt.mad/src/HelAmps_sm.h @@ -8,7 +8,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_tt.mad/src/Parameters_sm.cc b/epochX/cudacpp/gg_tt.mad/src/Parameters_sm.cc index d09f387480..c341b26e1e 100644 --- a/epochX/cudacpp/gg_tt.mad/src/Parameters_sm.cc +++ b/epochX/cudacpp/gg_tt.mad/src/Parameters_sm.cc @@ -7,7 +7,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_tt.mad/src/Parameters_sm.h b/epochX/cudacpp/gg_tt.mad/src/Parameters_sm.h index ba434e7b98..1d880fe7d9 100644 --- a/epochX/cudacpp/gg_tt.mad/src/Parameters_sm.h +++ b/epochX/cudacpp/gg_tt.mad/src/Parameters_sm.h @@ -7,7 +7,7 @@ // Further modified by: A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_tt.sa/CODEGEN_cudacpp_gg_tt_log.txt b/epochX/cudacpp/gg_tt.sa/CODEGEN_cudacpp_gg_tt_log.txt index 816b17272d..6ef99f7c49 100644 --- a/epochX/cudacpp/gg_tt.sa/CODEGEN_cudacpp_gg_tt_log.txt +++ b/epochX/cudacpp/gg_tt.sa/CODEGEN_cudacpp_gg_tt_log.txt @@ -1,8 +1,11 @@ +WARNING:root:python3.12 support is still experimental. For the moment re-weighting is NOT working and do expect a LOT of syntax warning. We do not advise python3.12 for production for the moment. +Running MG5 in debug mode +Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT +Plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT has marked as NOT being validated with this version: 3.6.2. +It has been validated for the last time with version: 3.6.0 Note that this is a development version. This version is intended for development/beta testing and NOT for production. This version has not been fully tested (if at all) and might have limited user support (if at all) -Running MG5 in debug mode -Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT ************************************************************ * * * W E L C O M E to * @@ -15,7 +18,7 @@ Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT * * * * * * * * * * * * -* VERSION 3.6.0 2024-09-30 * +* VERSION 3.6.2 2025-03-19 * * * * WARNING: UNKNOWN DEVELOPMENT VERSION. * * WARNING: DO NOT USE FOR PRODUCTION * @@ -46,10 +49,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 Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt -import /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_tt.mg +import /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_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 @@ -58,7 +60,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.006091594696044922  +DEBUG: model prefixing takes 0.0018947124481201172  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  @@ -151,13 +153,13 @@ 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.007 s Total: 1 processes with 3 diagrams output standalone_cudacpp ../TMPOUT/CODEGEN_cudacpp_gg_tt Output will be done with PLUGIN: CUDACPP_OUTPUT DEBUG: Entering PLUGIN_ProcessExporter.__init__ (initialise the exporter) [output.py at line 171]  DEBUG: Entering PLUGIN_ProcessExporter.copy_template (initialise the directory) [output.py at line 176]  -INFO: Creating subdirectories in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_tt +INFO: Creating subdirectories in directory /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_tt 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 @@ -166,30 +168,30 @@ INFO: Processing color information for process: g g > t t~ @1 DEBUG: type(fortran_model)= [output.py at line 220]  DEBUG: type(me)= me=0 [output.py at line 221]  DEBUG: "need to link", self.to_link_in_P =  need to link ['nvtx.h', 'timer.h', 'timermap.h', 'ompnumthreads.h', 'GpuRuntime.h', 'GpuAbstraction.h', 'MemoryAccessHelpers.h', 'MemoryAccessVectors.h', 'MemoryAccessMatrixElements.h', 'MemoryAccessMomenta.h', 'MemoryAccessRandomNumbers.h', 'MemoryAccessWeights.h', 'MemoryAccessAmplitudes.h', 'MemoryAccessWavefunctions.h', 'MemoryAccessGs.h', 'MemoryAccessCouplingsFixed.h', 'MemoryAccessNumerators.h', 'MemoryAccessDenominators.h', 'MemoryAccessChannelIds.h', 'EventStatistics.h', 'CommonRandomNumbers.h', 'CrossSectionKernels.cc', 'CrossSectionKernels.h', 'MatrixElementKernels.cc', 'MatrixElementKernels.h', 'RamboSamplingKernels.cc', 'RamboSamplingKernels.h', 'RandomNumberKernels.h', 'CommonRandomNumberKernel.cc', 'CurandRandomNumberKernel.cc', 'HiprandRandomNumberKernel.cc', 'Bridge.h', 'BridgeKernels.cc', 'BridgeKernels.h', 'fbridge.cc', 'fbridge.inc', 'fsampler.cc', 'fsampler.inc', 'MadgraphTest.h', 'runTest.cc', 'testmisc.cc', 'testxxx_cc_ref.txt', 'valgrind.h', 'cudacpp.mk', 'testxxx.cc', 'MemoryBuffers.h', 'MemoryAccessCouplings.h', 'perf.py', 'profile.sh'] [output.py at line 222]  -INFO: Creating files in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_tt/SubProcesses/P1_Sigma_sm_gg_ttx -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_tt/SubProcesses/P1_Sigma_sm_gg_ttx/./CPPProcess.h -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_tt/SubProcesses/P1_Sigma_sm_gg_ttx/./CPPProcess.cc -INFO: Created files CPPProcess.h and CPPProcess.cc in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_tt/SubProcesses/P1_Sigma_sm_gg_ttx/. -Generated helas calls for 1 subprocesses (3 diagrams) in 0.006 s +INFO: Creating files in directory /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_tt/SubProcesses/P1_Sigma_sm_gg_ttx +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_tt/SubProcesses/P1_Sigma_sm_gg_ttx/./CPPProcess.h +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_tt/SubProcesses/P1_Sigma_sm_gg_ttx/./CPPProcess.cc +INFO: Created files CPPProcess.h and CPPProcess.cc in directory /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_tt/SubProcesses/P1_Sigma_sm_gg_ttx/. +Generated helas calls for 1 subprocesses (3 diagrams) in 0.005 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.144 s +ALOHA: aloha creates 2 routines in 0.062 s VVV1 FFV1 FFV1 FFV1 -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_tt/src/./HelAmps_sm.h -INFO: Created file HelAmps_sm.h in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_tt/src/. +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_tt/src/./HelAmps_sm.h +INFO: Created file HelAmps_sm.h in directory /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_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_cudacpp_gg_tt/src/./Parameters_sm.h -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_tt/src/./Parameters_sm.cc +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_tt/src/./Parameters_sm.h +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_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_cudacpp_gg_tt/src/. and /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_tt/src/. +INFO: /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_tt/src/. and /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_tt/src/. quit -real 0m0.544s -user 0m0.472s -sys 0m0.060s +real 0m1.240s +user 0m0.368s +sys 0m0.101s Code generation completed in 1 seconds diff --git a/epochX/cudacpp/gg_tt.sa/SubProcesses/Bridge.h b/epochX/cudacpp/gg_tt.sa/SubProcesses/Bridge.h index 87aa648dd2..49b928db67 100644 --- a/epochX/cudacpp/gg_tt.sa/SubProcesses/Bridge.h +++ b/epochX/cudacpp/gg_tt.sa/SubProcesses/Bridge.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: S. Roiser (Nov 2021) for the MG5aMC CUDACPP plugin. -// Further modified by: S. Roiser, J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2021-2025) for the MG5aMC CUDACPP plugin. #ifndef BRIDGE_H #define BRIDGE_H 1 @@ -255,11 +255,15 @@ namespace mg5amcCpu throw std::logic_error( "Bridge constructor: FIXME! cannot choose gputhreads" ); // this should never happen! m_gpublocks = m_nevt / m_gputhreads; } +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Instantiate device Bridge (nevt=" << m_nevt << ", gpublocks=" << m_gpublocks << ", gputhreads=" << m_gputhreads << ", gpublocks*gputhreads=" << m_gpublocks * m_gputhreads << ")" << std::endl; +#endif m_pmek.reset( new MatrixElementKernelDevice( m_devMomentaC, m_devGs, m_devRndHel, m_devRndCol, m_devChannelIds, m_devMEs, m_devSelHel, m_devSelCol, m_gpublocks, m_gputhreads ) ); #else +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Instantiate host Bridge (nevt=" << m_nevt << ")" << std::endl; +#endif m_pmek.reset( new MatrixElementKernelHost( m_hstMomentaC, m_hstGs, m_hstRndHel, m_hstRndCol, m_hstChannelIds, m_hstMEs, m_hstSelHel, m_hstSelCol, m_nevt ) ); #endif // MGONGPUCPP_GPUIMPL // Create a process object, read param card and set parameters @@ -290,8 +294,10 @@ namespace mg5amcCpu throw std::runtime_error( "Bridge: gpublocks*gputhreads must equal m_nevt in set_gpugrid" ); m_gpublocks = gpublocks; m_gputhreads = gputhreads; +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Set grid in Bridge (nevt=" << m_nevt << ", gpublocks=" << m_gpublocks << ", gputhreads=" << m_gputhreads << ", gpublocks*gputhreads=" << m_gpublocks * m_gputhreads << ")" << std::endl; +#endif m_pmek->setGrid( m_gpublocks, m_gputhreads ); } #endif @@ -347,7 +353,9 @@ namespace mg5amcCpu if( goodHelOnly ) return; m_pmek->computeMatrixElements( useChannelIds ); copyHostFromDevice( m_hstMEs, m_devMEs ); +#ifdef MGONGPUCPP_VERBOSE flagAbnormalMEs( m_hstMEs.data(), m_nevt ); +#endif copyHostFromDevice( m_hstSelHel, m_devSelHel ); copyHostFromDevice( m_hstSelCol, m_devSelCol ); if constexpr( std::is_same_v ) @@ -400,7 +408,9 @@ namespace mg5amcCpu } if( goodHelOnly ) return; m_pmek->computeMatrixElements( useChannelIds ); +#ifdef MGONGPUCPP_VERBOSE flagAbnormalMEs( m_hstMEs.data(), m_nevt ); +#endif if constexpr( std::is_same_v ) { memcpy( mes, m_hstMEs.data(), m_hstMEs.bytes() ); diff --git a/epochX/cudacpp/gg_tt.sa/SubProcesses/GpuRuntime.h b/epochX/cudacpp/gg_tt.sa/SubProcesses/GpuRuntime.h index 860c7fde16..6a4b946e74 100644 --- a/epochX/cudacpp/gg_tt.sa/SubProcesses/GpuRuntime.h +++ b/epochX/cudacpp/gg_tt.sa/SubProcesses/GpuRuntime.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: J. Teig (Jun 2023, based on earlier work by S. Roiser) for the MG5aMC CUDACPP plugin. -// Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2025) for the MG5aMC CUDACPP plugin. #ifndef MG5AMC_GPURUNTIME_H #define MG5AMC_GPURUNTIME_H 1 @@ -50,7 +50,7 @@ namespace mg5amcGpu // Set up CUDA application // ** NB: strictly speaking this is not needed when using the CUDA runtime API ** // Calling cudaSetDevice on startup is useful to properly book-keep the time spent in CUDA initialization - static void setUp( const bool debug = true ) + static void setUp( const bool debug = false ) // ZW: changed debug default to false { // ** NB: it is useful to call cudaSetDevice, or cudaFree, to properly book-keep the time spent in CUDA initialization // ** NB: otherwise, the first CUDA operation (eg a cudaMemcpyToSymbol in CPPProcess ctor) appears to take much longer! @@ -71,7 +71,7 @@ namespace mg5amcGpu // ** NB: strictly speaking this is not needed when using the CUDA runtime API ** // Calling cudaDeviceReset on shutdown is only needed for checking memory leaks in cuda-memcheck // See https://docs.nvidia.com/cuda/cuda-memcheck/index.html#leak-checking - static void tearDown( const bool debug = true ) + static void tearDown( const bool debug = false ) // ZW: changed debug default to false { if( debug ) std::cout << "__GpuRuntime: calling GpuDeviceReset()" << std::endl; checkGpu( gpuDeviceReset() ); diff --git a/epochX/cudacpp/gg_tt.sa/SubProcesses/MatrixElementKernels.cc b/epochX/cudacpp/gg_tt.sa/SubProcesses/MatrixElementKernels.cc index f463977c1a..703ea3781c 100644 --- a/epochX/cudacpp/gg_tt.sa/SubProcesses/MatrixElementKernels.cc +++ b/epochX/cudacpp/gg_tt.sa/SubProcesses/MatrixElementKernels.cc @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: A. Valassi (Jan 2022) for the MG5aMC CUDACPP plugin. -// Further modified by: J. Teig, A. Valassi (2022-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: J. Teig, A. Valassi, Z. Wettersten (2022-2025) for the MG5aMC CUDACPP plugin. #include "MatrixElementKernels.h" @@ -60,7 +60,9 @@ namespace mg5amcCpu #ifdef MGONGPU_CHANNELID_DEBUG MatrixElementKernelBase::dumpNevtProcessedByChannel(); #endif +#ifdef MGONGPUCPP_VERBOSE MatrixElementKernelBase::dumpSignallingFPEs(); +#endif } //-------------------------------------------------------------------------- diff --git a/epochX/cudacpp/gg_tt.sa/SubProcesses/MatrixElementKernels.h b/epochX/cudacpp/gg_tt.sa/SubProcesses/MatrixElementKernels.h index 7acff4b308..8da04d7945 100644 --- a/epochX/cudacpp/gg_tt.sa/SubProcesses/MatrixElementKernels.h +++ b/epochX/cudacpp/gg_tt.sa/SubProcesses/MatrixElementKernels.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: A. Valassi (Jan 2022) for the MG5aMC CUDACPP plugin. -// Further modified by: J. Teig, A. Valassi (2022-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: J. Teig, A. Valassi, Z. Wettersten (2022-2025) for the MG5aMC CUDACPP plugin. #ifndef MATRIXELEMENTKERNELS_H #define MATRIXELEMENTKERNELS_H 1 @@ -134,7 +134,7 @@ namespace mg5amcCpu // Does this host system support the SIMD used in the matrix element calculation? // [NB: this is private, SIMD vectorization in mg5amc C++ code is currently only used in the ME calculations below MatrixElementKernelHost!] - static bool hostSupportsSIMD( const bool verbose = true ); + static bool hostSupportsSIMD( const bool verbose = false ); // ZW: default verbose false private: diff --git a/epochX/cudacpp/gg_tt.sa/SubProcesses/MemoryAccessGs.h b/epochX/cudacpp/gg_tt.sa/SubProcesses/MemoryAccessGs.h index 63c17a68fa..50a6aaef4d 100644 --- a/epochX/cudacpp/gg_tt.sa/SubProcesses/MemoryAccessGs.h +++ b/epochX/cudacpp/gg_tt.sa/SubProcesses/MemoryAccessGs.h @@ -128,6 +128,14 @@ namespace mg5amcCpu #endif } + // Locate a field (output) in a memory buffer (input) from a kernel event-indexing mechanism (internal) + // [Signature (SCALAR OR VECTOR) ===> fptype_sv* kernelAccess( fptype* buffer ) <===] + static __host__ __device__ inline fptype_sv* + kernelAccessP( fptype* buffer ) + { + return reinterpret_cast( buffer ); + } + // Locate a field (output) in a memory buffer (input) from a kernel event-indexing mechanism (internal) and the given field indexes (input) // [Signature (const, SCALAR) ===> const fptype& kernelAccessConst( const fptype* buffer ) <===] static constexpr auto kernelAccessConst_s = diff --git a/epochX/cudacpp/gg_tt.sa/SubProcesses/MemoryBuffers.h b/epochX/cudacpp/gg_tt.sa/SubProcesses/MemoryBuffers.h index 65a101888d..17ba7a89e5 100644 --- a/epochX/cudacpp/gg_tt.sa/SubProcesses/MemoryBuffers.h +++ b/epochX/cudacpp/gg_tt.sa/SubProcesses/MemoryBuffers.h @@ -13,6 +13,7 @@ #include "CPPProcess.h" #include "GpuRuntime.h" #include "Parameters_sm.h" +#include "processConfig.h" #include @@ -274,7 +275,8 @@ namespace mg5amcCpu typedef BufferBase BufferNumerators; // The size (number of elements) per event in a memory buffer for numerators - constexpr size_t sizePerEventNumerators = 1; + // (should be equal to the number of diagrams in the process) + constexpr size_t sizePerEventNumerators = processConfig::ndiagrams; #ifndef MGONGPUCPP_GPUIMPL // A class encapsulating a C++ host buffer for gs 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 5c7a133eed..ed4bdf6297 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 @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -25,6 +25,7 @@ #include "MemoryAccessMatrixElements.h" #include "MemoryAccessMomenta.h" #include "MemoryAccessWavefunctions.h" +#include "processConfig.h" #ifdef MGONGPU_SUPPORTS_MULTICHANNEL #include "MemoryAccessDenominators.h" @@ -96,6 +97,69 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { +#ifdef MGONGPU_SUPPORTS_MULTICHANNEL + __device__ INLINE unsigned int getChannelId( const unsigned int* allChannelIds +#ifndef MGONGPUCPP_GPUIMPL + , + const int ievt00, + bool sanityCheckMixedPrecision = true +#endif + ) + { + unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr +#ifdef MGONGPUCPP_GPUIMPL + using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page + if( allChannelIds != nullptr ) + { + const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) + const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) + // NB: channelIds_sv is a scalar in CUDA + channelId = channelIds_sv; + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + } +#else // Cuda or C++ + using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + if( allChannelIds != nullptr ) + { + // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) + const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 + uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) +#ifndef MGONGPU_CPPSIMD + // NB: channelIds_sv is a scalar in no-SIMD C++ + channelId = channelIds_sv; +#else + // NB: channelIds_sv is a vector in SIMD C++ + channelId = channelIds_sv[0]; // element[0] + for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] + { + assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId + } +#endif + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + if( sanityCheckMixedPrecision ) + { +#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT + // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) + const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 + uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + for( int i = 0; i < neppV; ++i ) + { + assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector + } +#endif + } + } +#endif // MGONGPUCPP_GPUIMPL + return channelId; + } +#endif // MGONGPU_SUPPORTS_MULTICHANNEL + constexpr int nw6 = CPPProcess::nw6; // dimensions of each wavefunction (HELAS KEK 91-11): e.g. 6 for e+ e- -> mu+ mu- (fermions and vectors) constexpr int npar = CPPProcess::npar; // #particles in total (external = initial + final): e.g. 4 for e+ e- -> mu+ mu- constexpr int ncomb = CPPProcess::ncomb; // #helicity combinations: e.g. 16 for e+ e- -> mu+ mu- (2**4 = fermion spin up/down ** npar) @@ -305,7 +369,7 @@ namespace mg5amcCpu COUPs[ndcoup + iicoup] = allCOUPs[ndcoup + iicoup]; // independent couplings, fixed for all events fptype* MEs = E_ACCESS::ieventAccessRecord( allMEs, ievt0 ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); #endif #endif @@ -315,7 +379,7 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Numerators and denominators for the current event (CUDA) or SIMD event page (C++) - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); #endif @@ -552,7 +616,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- @@ -920,9 +986,6 @@ namespace mg5amcCpu #ifdef MGONGPUCPP_GPUIMPL // Remember: in CUDA this is a kernel for one event, in c++ this processes n events const int ievt = blockDim.x * blockIdx.x + threadIdx.x; // index of event (thread) in grid -#ifdef MGONGPU_SUPPORTS_MULTICHANNEL - using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events -#endif #else //assert( (size_t)(allmomenta) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] //assert( (size_t)(allMEs) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] @@ -930,7 +993,6 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL using NUM_ACCESS = HostAccessNumerators; // non-trivial access: buffer includes all events using DEN_ACCESS = HostAccessDenominators; // non-trivial access: buffer includes all events - using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events #endif #endif @@ -955,11 +1017,12 @@ namespace mg5amcCpu fptype_sv& MEs_sv = E_ACCESS::kernelAccess( MEs ); MEs_sv = fptype_sv{ 0 }; #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - numerators_sv = fptype_sv{ 0 }; + for( int i = 0; i < processConfig::ndiagrams; ++i ) + numerators_sv[i] = fptype_sv{ 0 }; denominators_sv = fptype_sv{ 0 }; #endif } @@ -972,17 +1035,7 @@ namespace mg5amcCpu // *** START OF PART 1a - CUDA (one event per GPU thread) *** #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) - const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) - // NB: channelIds_sv is a scalar in CUDA - channelId = channelIds_sv; - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) - } + unsigned int channelId = getChannelId( allChannelIds ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (for the single event processed in calculate_wavefunctions) @@ -1097,38 +1150,7 @@ namespace mg5amcCpu const int ievt00 = ipagV2 * neppV; // loop on one SIMD page (neppV events) at a time #endif #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) - const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 - uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) -#ifndef MGONGPU_CPPSIMD - // NB: channelIds_sv is a scalar in no-SIMD C++ - channelId = channelIds_sv; -#else - // NB: channelIds_sv is a vector in SIMD C++ - channelId = channelIds_sv[0]; // element[0] - for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] - { - assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId - } -#endif - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) -#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT - // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) - const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 - uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - for( int i = 0; i < neppV; ++i ) - { - assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector - } -#endif - } + unsigned int channelId = getChannelId( allChannelIds, ievt00 ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (jamp2[nParity][ncolor][neppV] for the SIMD vector - or the two SIMD vectors - of events processed in calculate_wavefunctions) @@ -1301,11 +1323,12 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( allChannelIds != nullptr ) // fix segfault #892 (not 'channelIds[0] != 0') { - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + const unsigned int channelId = getChannelId( allChannelIds, ievt0, false ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - MEs_sv *= numerators_sv / denominators_sv; + MEs_sv *= numerators_sv[channelId - 1] / denominators_sv; } #endif //for( int ieppV = 0; ieppV < neppV; ieppV++ ) diff --git a/epochX/cudacpp/gg_tt.sa/SubProcesses/P1_Sigma_sm_gg_ttx/CPPProcess.h b/epochX/cudacpp/gg_tt.sa/SubProcesses/P1_Sigma_sm_gg_ttx/CPPProcess.h index feff1cc6e1..c0ba6c2f8c 100644 --- a/epochX/cudacpp/gg_tt.sa/SubProcesses/P1_Sigma_sm_gg_ttx/CPPProcess.h +++ b/epochX/cudacpp/gg_tt.sa/SubProcesses/P1_Sigma_sm_gg_ttx/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_tt.sa/SubProcesses/P1_Sigma_sm_gg_ttx/processConfig.h b/epochX/cudacpp/gg_tt.sa/SubProcesses/P1_Sigma_sm_gg_ttx/processConfig.h new file mode 100644 index 0000000000..8f6a27f796 --- /dev/null +++ b/epochX/cudacpp/gg_tt.sa/SubProcesses/P1_Sigma_sm_gg_ttx/processConfig.h @@ -0,0 +1,16 @@ +// Copyright (C) 2025 CERN and UCLouvain. +// Licensed under the GNU Lesser General Public License (version 3 or later). +// Created by: S. Roiser (May 2025) for the MG5aMC CUDACPP plugin. +// Further modified by: ... for the MG5aMC CUDACPP plugin. + + +#ifndef MG5_CONFIG_SIGMA_SM_GG_TTX_H +#define MG5_CONFIG_SIGMA_SM_GG_TTX_H 1 + +namespace processConfig { + + constexpr int ndiagrams = 3; + +} + +#endif // MG5_CONFIG_SIGMA_SM_GG_TTX_H \ 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 febf1dcf42..c7283310f9 100644 --- a/epochX/cudacpp/gg_tt.sa/src/HelAmps_sm.h +++ b/epochX/cudacpp/gg_tt.sa/src/HelAmps_sm.h @@ -8,7 +8,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_tt.sa/src/Parameters_sm.cc b/epochX/cudacpp/gg_tt.sa/src/Parameters_sm.cc index d09f387480..c341b26e1e 100644 --- a/epochX/cudacpp/gg_tt.sa/src/Parameters_sm.cc +++ b/epochX/cudacpp/gg_tt.sa/src/Parameters_sm.cc @@ -7,7 +7,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_tt.sa/src/Parameters_sm.h b/epochX/cudacpp/gg_tt.sa/src/Parameters_sm.h index ba434e7b98..1d880fe7d9 100644 --- a/epochX/cudacpp/gg_tt.sa/src/Parameters_sm.h +++ b/epochX/cudacpp/gg_tt.sa/src/Parameters_sm.h @@ -7,7 +7,7 @@ // Further modified by: A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== 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 6466d14e6d..7fad274dea 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 @@ -1,8 +1,11 @@ +WARNING:root:python3.12 support is still experimental. For the moment re-weighting is NOT working and do expect a LOT of syntax warning. We do not advise python3.12 for production for the moment. +Running MG5 in debug mode +Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT +Plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT has marked as NOT being validated with this version: 3.6.2. +It has been validated for the last time with version: 3.6.0 Note that this is a development version. This version is intended for development/beta testing and NOT for production. This version has not been fully tested (if at all) and might have limited user support (if at all) -Running MG5 in debug mode -Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT ************************************************************ * * * W E L C O M E to * @@ -15,7 +18,7 @@ Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT * * * * * * * * * * * * -* VERSION 3.6.0 2024-09-30 * +* VERSION 3.6.2 2025-03-19 * * * * WARNING: UNKNOWN DEVELOPMENT VERSION. * * WARNING: DO NOT USE FOR PRODUCTION * @@ -46,10 +49,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 Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt -import /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g.mg +import /shared/roiser/sw/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 @@ -58,7 +60,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.00611424446105957  +DEBUG: model prefixing takes 0.0017981529235839844  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  @@ -164,16 +166,16 @@ Total: 2 processes with 19 diagrams output madevent_simd ../TMPOUT/CODEGEN_mad_gg_tt01g --hel_recycling=False --vector_size=32 Output will be done with PLUGIN: CUDACPP_OUTPUT Addition matrix-element will be done with PLUGIN: CUDACPP_OUTPUT -DEBUG: opt['output_options']['vector_size'] =  32 [export_v4.py at line 4334]  +DEBUG: opt['output_options']['vector_size'] =  32 [export_v4.py at line 4166]  Output will be done with PLUGIN: CUDACPP_OUTPUT DEBUG: Entering PLUGIN_ProcessExporter.__init__ (initialise the exporter) [output.py at line 171]  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 176]  -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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g  +INFO: Creating subdirectories in directory /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g +WARNING: File exists /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/Cards  +WARNING: File exists /shared/roiser/sw/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 @@ -187,9 +189,9 @@ FileWriter t t~ g WEIGHTED<=3 @2 INFO: Finding symmetric diagrams for subprocess group gg_ttxg -DEBUG: len(subproc_diagrams_for_config) =  15 [model_handling.py at line 1527]  -DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12, 13: 13, 14: 14, 15: 15} [model_handling.py at line 1551]  -DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12, 13: 13, 14: 14, 15: 15} [model_handling.py at line 1552]  +DEBUG: len(subproc_diagrams_for_config) =  15 [model_handling.py at line 1538]  +DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12, 13: 13, 14: 14, 15: 15} [model_handling.py at line 1562]  +DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12, 13: 13, 14: 14, 15: 15} [model_handling.py at line 1563]  INFO: Creating files in directory P1_gg_ttx DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1156]  INFO: Creating files in directory . @@ -198,25 +200,25 @@ FileWriter t t~ WEIGHTED<=2 @1 INFO: Finding symmetric diagrams for subprocess group gg_ttx -DEBUG: len(subproc_diagrams_for_config) =  3 [model_handling.py at line 1527]  -DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3} [model_handling.py at line 1551]  -DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3} [model_handling.py at line 1552]  -Generated helas calls for 2 subprocesses (19 diagrams) in 0.043 s -Wrote files for 46 helas calls in 0.184 s +DEBUG: len(subproc_diagrams_for_config) =  3 [model_handling.py at line 1538]  +DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3} [model_handling.py at line 1562]  +DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3} [model_handling.py at line 1563]  +Generated helas calls for 2 subprocesses (19 diagrams) in 0.020 s +Wrote files for 46 helas calls in 2.386 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.322 s +ALOHA: aloha creates 5 routines in 0.180 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 10 routines in 0.311 s +ALOHA: aloha creates 10 routines in 0.136 s VVV1 VVV1 FFV1 @@ -226,41 +228,43 @@ ALOHA: aloha creates 10 routines in 0.311 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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/src/./HelAmps_sm.h +INFO: Created file HelAmps_sm.h in directory /shared/roiser/sw/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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/src/./Parameters_sm.h +FileWriter for /shared/roiser/sw/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: /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/src/. and /shared/roiser/sw/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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/Cards/me5_configuration.txt INFO: Use Fortran compiler gfortran INFO: Use c++ compiler g++ INFO: Generate jpeg diagrams 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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g; patch -p4 -i /shared/roiser/sw/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common patching file SubProcesses/makefile -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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/SubProcesses/P1_gg_ttx; patch -p6 -i /shared/roiser/sw/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 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 +DEBUG: cd /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/SubProcesses/P2_gg_ttxg; patch -p6 -i /shared/roiser/sw/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file driver.f patching file matrix1.f Hunk #2 succeeded at 243 (offset 16 lines). DEBUG: p.returncode =  0 [output.py at line 263]  -Output to directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g done. +Output to directory /shared/roiser/sw/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 +/shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/README Run "open index.html" to see more information about this process. quit -real 0m2.583s -user 0m2.278s -sys 0m0.302s -Code generation completed in 3 seconds +real 0m7.842s +user 0m1.579s +sys 0m0.751s +Code generation completed in 8 seconds +/shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/bin/internal/banner.py:3309: SyntaxWarning: invalid escape sequence '\s' + function_pat = re.compile('^\s+(?:SUBROUTINE|(?:%(type)s)\s+function)\s+([a-zA-Z]\w*)' \ ************************************************************ * * * W E L C O M E to * @@ -273,7 +277,7 @@ Code generation completed in 3 seconds * * * * * * * * * * * * -* VERSION 3.6.0 * +* VERSION 3.6.2 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -281,10 +285,9 @@ Code generation completed in 3 seconds * 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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/Cards/me5_configuration.txt +INFO: load configuration from /shared/roiser/sw/madgraph4gpu/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/Cards/me5_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 @@ -303,7 +306,7 @@ launch in debug mode * * * * * * * * * * * * -* VERSION 3.6.0 * +* VERSION 3.6.2 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -311,10 +314,9 @@ 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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/Cards/me5_configuration.txt +INFO: load configuration from /shared/roiser/sw/madgraph4gpu/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt01g/Cards/me5_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 68b4c46295..a0212bfb62 100644 --- a/epochX/cudacpp/gg_tt01g.mad/Cards/me5_configuration.txt +++ b/epochX/cudacpp/gg_tt01g.mad/Cards/me5_configuration.txt @@ -235,7 +235,7 @@ # pineappl = pineappl -#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo +#mg5_path = /shared/roiser/sw/madgraph4gpu/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo +#mg5_path = /shared/roiser/sw/madgraph4gpu/MG5aMC/mg5amcnlo diff --git a/epochX/cudacpp/gg_tt01g.mad/Cards/proc_card_mg5.dat b/epochX/cudacpp/gg_tt01g.mad/Cards/proc_card_mg5.dat index e50becb2d9..5c24946480 100644 --- a/epochX/cudacpp/gg_tt01g.mad/Cards/proc_card_mg5.dat +++ b/epochX/cudacpp/gg_tt01g.mad/Cards/proc_card_mg5.dat @@ -8,7 +8,7 @@ #* * * * #* * #* * -#* VERSION 3.6.0 2024-09-30 * +#* VERSION 3.6.2 2025-03-19 * #* * #* WARNING: UNKNOWN DEVELOPMENT VERSION. * #* WARNING: DO NOT USE FOR PRODUCTION * diff --git a/epochX/cudacpp/gg_tt01g.mad/Cards/run_card.dat b/epochX/cudacpp/gg_tt01g.mad/Cards/run_card.dat index 1711d30371..d4c7c73e61 100644 --- a/epochX/cudacpp/gg_tt01g.mad/Cards/run_card.dat +++ b/epochX/cudacpp/gg_tt01g.mad/Cards/run_card.dat @@ -125,6 +125,7 @@ # Parton level cuts definition * #******************************* 0.0 = dsqrt_shat ! minimal shat for full process + -1 = dsqrt_shatmax ! maximum shat for full process # # #********************************************************************* diff --git a/epochX/cudacpp/gg_tt01g.mad/Cards/run_card_default.dat b/epochX/cudacpp/gg_tt01g.mad/Cards/run_card_default.dat index 364dbd21b0..730a05e322 100644 --- a/epochX/cudacpp/gg_tt01g.mad/Cards/run_card_default.dat +++ b/epochX/cudacpp/gg_tt01g.mad/Cards/run_card_default.dat @@ -125,6 +125,7 @@ # Parton level cuts definition * #******************************* 0.0 = dsqrt_shat ! minimal shat for full process + -1 = dsqrt_shatmax ! maximum shat for full process # # #********************************************************************* diff --git a/epochX/cudacpp/gg_tt01g.mad/MGMEVersion.txt b/epochX/cudacpp/gg_tt01g.mad/MGMEVersion.txt index 084e244cea..77a069e39b 100644 --- a/epochX/cudacpp/gg_tt01g.mad/MGMEVersion.txt +++ b/epochX/cudacpp/gg_tt01g.mad/MGMEVersion.txt @@ -1 +1 @@ -3.6.0 \ No newline at end of file +3.6.2 \ No newline at end of file diff --git a/epochX/cudacpp/gg_tt01g.mad/Source/alfas_functions.f b/epochX/cudacpp/gg_tt01g.mad/Source/alfas_functions.f index bb69a6384e..84aeff369c 100644 --- a/epochX/cudacpp/gg_tt01g.mad/Source/alfas_functions.f +++ b/epochX/cudacpp/gg_tt01g.mad/Source/alfas_functions.f @@ -188,6 +188,10 @@ SUBROUTINE NEWTON1(T,A_IN,A_OUT,NLOOP,NF) A_OUT=A_IN/(1D0+A_IN*B0(NF)*T) IF (NLOOP .EQ. 1) RETURN + if (1D0+A_IN*B0(NF)*T.le.0d0)THEN + A_OUT = 9d98 + RETURN + ENDIF A_OUT=A_IN/(1D0+B0(NF)*A_IN*T+C1(NF)*A_IN*LOG(1D0+A_IN*B0(NF)*T)) IF (A_OUT .LT. 0D0) AS=0.3D0 30 AS=A_OUT diff --git a/epochX/cudacpp/gg_tt01g.mad/Source/cuts.inc b/epochX/cudacpp/gg_tt01g.mad/Source/cuts.inc index 23d099e5f7..a8ccc7420d 100644 --- a/epochX/cudacpp/gg_tt01g.mad/Source/cuts.inc +++ b/epochX/cudacpp/gg_tt01g.mad/Source/cuts.inc @@ -37,7 +37,7 @@ C REAL*8 misset,missetmax,ptheavy REAL*8 ptllmin,ptllmax integer maxjetflavor - REAl*8 dsqrt_shat + REAl*8 dsqrt_shat,dsqrt_shatmax COMMON /to_min_max_cuts/ & PTJmax,PTBmax,PTAmax,PTLmax, @@ -60,7 +60,7 @@ C & ht2max,ht3max,ht4max, & htjmin,htjmax,ihtmin,ihtmax, & misset,missetmax,ptheavy, - & ptllmin,ptllmax,dsqrt_shat, + & ptllmin,ptllmax,dsqrt_shat,dsqrt_shatmax, & maxjetflavor C diff --git a/epochX/cudacpp/gg_tt01g.mad/Source/make_opts b/epochX/cudacpp/gg_tt01g.mad/Source/make_opts index e4b87ee6ad..f9f7b64bb5 100644 --- a/epochX/cudacpp/gg_tt01g.mad/Source/make_opts +++ b/epochX/cudacpp/gg_tt01g.mad/Source/make_opts @@ -5,8 +5,8 @@ GLOBAL_FLAG=-O3 -ffast-math -fbounds-check MACFLAG= MG5AMC_VERSION=SpecifiedByMG5aMCAtRunTime PYTHIA8_PATH=NotInstalled -STDLIB_FLAG= STDLIB=-lstdc++ +STDLIB_FLAG= #end_of_make_opts_variables BIASLIBDIR=../../../lib/ diff --git a/epochX/cudacpp/gg_tt01g.mad/Source/makefile b/epochX/cudacpp/gg_tt01g.mad/Source/makefile index 291ca907ee..f9321e7a94 100644 --- a/epochX/cudacpp/gg_tt01g.mad/Source/makefile +++ b/epochX/cudacpp/gg_tt01g.mad/Source/makefile @@ -73,6 +73,7 @@ $(BINDIR)gensudgrid: $(GENSUDGRID) $(LIBDIR)libpdf.$(libext) $(LIBDIR)libgammaUP # Dependencies dsample.o: DiscreteSampler.o dsample.f genps.inc StringCast.o vector.inc +pawgraph.o: vector.inc DiscreteSampler.o: StringCast.o invarients.o: invarients.f genps.inc gen_ximprove.o: gen_ximprove.f run_config.inc run_card.inc diff --git a/epochX/cudacpp/gg_tt01g.mad/Source/run_card.inc b/epochX/cudacpp/gg_tt01g.mad/Source/run_card.inc index 2588190439..e169c1f193 100644 --- a/epochX/cudacpp/gg_tt01g.mad/Source/run_card.inc +++ b/epochX/cudacpp/gg_tt01g.mad/Source/run_card.inc @@ -88,6 +88,8 @@ DSQRT_SHAT = 0.000000000000000D+00 + DSQRT_SHATMAX = -1 + LIMHEL = 0.000000000000000D+00 PTJ = 2.000000000000000D+01 diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/Bridge.h b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/Bridge.h index 87aa648dd2..49b928db67 100644 --- a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/Bridge.h +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/Bridge.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: S. Roiser (Nov 2021) for the MG5aMC CUDACPP plugin. -// Further modified by: S. Roiser, J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2021-2025) for the MG5aMC CUDACPP plugin. #ifndef BRIDGE_H #define BRIDGE_H 1 @@ -255,11 +255,15 @@ namespace mg5amcCpu throw std::logic_error( "Bridge constructor: FIXME! cannot choose gputhreads" ); // this should never happen! m_gpublocks = m_nevt / m_gputhreads; } +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Instantiate device Bridge (nevt=" << m_nevt << ", gpublocks=" << m_gpublocks << ", gputhreads=" << m_gputhreads << ", gpublocks*gputhreads=" << m_gpublocks * m_gputhreads << ")" << std::endl; +#endif m_pmek.reset( new MatrixElementKernelDevice( m_devMomentaC, m_devGs, m_devRndHel, m_devRndCol, m_devChannelIds, m_devMEs, m_devSelHel, m_devSelCol, m_gpublocks, m_gputhreads ) ); #else +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Instantiate host Bridge (nevt=" << m_nevt << ")" << std::endl; +#endif m_pmek.reset( new MatrixElementKernelHost( m_hstMomentaC, m_hstGs, m_hstRndHel, m_hstRndCol, m_hstChannelIds, m_hstMEs, m_hstSelHel, m_hstSelCol, m_nevt ) ); #endif // MGONGPUCPP_GPUIMPL // Create a process object, read param card and set parameters @@ -290,8 +294,10 @@ namespace mg5amcCpu throw std::runtime_error( "Bridge: gpublocks*gputhreads must equal m_nevt in set_gpugrid" ); m_gpublocks = gpublocks; m_gputhreads = gputhreads; +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Set grid in Bridge (nevt=" << m_nevt << ", gpublocks=" << m_gpublocks << ", gputhreads=" << m_gputhreads << ", gpublocks*gputhreads=" << m_gpublocks * m_gputhreads << ")" << std::endl; +#endif m_pmek->setGrid( m_gpublocks, m_gputhreads ); } #endif @@ -347,7 +353,9 @@ namespace mg5amcCpu if( goodHelOnly ) return; m_pmek->computeMatrixElements( useChannelIds ); copyHostFromDevice( m_hstMEs, m_devMEs ); +#ifdef MGONGPUCPP_VERBOSE flagAbnormalMEs( m_hstMEs.data(), m_nevt ); +#endif copyHostFromDevice( m_hstSelHel, m_devSelHel ); copyHostFromDevice( m_hstSelCol, m_devSelCol ); if constexpr( std::is_same_v ) @@ -400,7 +408,9 @@ namespace mg5amcCpu } if( goodHelOnly ) return; m_pmek->computeMatrixElements( useChannelIds ); +#ifdef MGONGPUCPP_VERBOSE flagAbnormalMEs( m_hstMEs.data(), m_nevt ); +#endif if constexpr( std::is_same_v ) { memcpy( mes, m_hstMEs.data(), m_hstMEs.bytes() ); diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/GpuRuntime.h b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/GpuRuntime.h index 860c7fde16..6a4b946e74 100644 --- a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/GpuRuntime.h +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/GpuRuntime.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: J. Teig (Jun 2023, based on earlier work by S. Roiser) for the MG5aMC CUDACPP plugin. -// Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2025) for the MG5aMC CUDACPP plugin. #ifndef MG5AMC_GPURUNTIME_H #define MG5AMC_GPURUNTIME_H 1 @@ -50,7 +50,7 @@ namespace mg5amcGpu // Set up CUDA application // ** NB: strictly speaking this is not needed when using the CUDA runtime API ** // Calling cudaSetDevice on startup is useful to properly book-keep the time spent in CUDA initialization - static void setUp( const bool debug = true ) + static void setUp( const bool debug = false ) // ZW: changed debug default to false { // ** NB: it is useful to call cudaSetDevice, or cudaFree, to properly book-keep the time spent in CUDA initialization // ** NB: otherwise, the first CUDA operation (eg a cudaMemcpyToSymbol in CPPProcess ctor) appears to take much longer! @@ -71,7 +71,7 @@ namespace mg5amcGpu // ** NB: strictly speaking this is not needed when using the CUDA runtime API ** // Calling cudaDeviceReset on shutdown is only needed for checking memory leaks in cuda-memcheck // See https://docs.nvidia.com/cuda/cuda-memcheck/index.html#leak-checking - static void tearDown( const bool debug = true ) + static void tearDown( const bool debug = false ) // ZW: changed debug default to false { if( debug ) std::cout << "__GpuRuntime: calling GpuDeviceReset()" << std::endl; checkGpu( gpuDeviceReset() ); diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/MGVersion.txt b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/MGVersion.txt index 084e244cea..77a069e39b 100644 --- a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/MGVersion.txt +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/MGVersion.txt @@ -1 +1 @@ -3.6.0 \ No newline at end of file +3.6.2 \ No newline at end of file diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/MatrixElementKernels.cc b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/MatrixElementKernels.cc index f463977c1a..703ea3781c 100644 --- a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/MatrixElementKernels.cc +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/MatrixElementKernels.cc @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: A. Valassi (Jan 2022) for the MG5aMC CUDACPP plugin. -// Further modified by: J. Teig, A. Valassi (2022-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: J. Teig, A. Valassi, Z. Wettersten (2022-2025) for the MG5aMC CUDACPP plugin. #include "MatrixElementKernels.h" @@ -60,7 +60,9 @@ namespace mg5amcCpu #ifdef MGONGPU_CHANNELID_DEBUG MatrixElementKernelBase::dumpNevtProcessedByChannel(); #endif +#ifdef MGONGPUCPP_VERBOSE MatrixElementKernelBase::dumpSignallingFPEs(); +#endif } //-------------------------------------------------------------------------- diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/MatrixElementKernels.h b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/MatrixElementKernels.h index 7acff4b308..8da04d7945 100644 --- a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/MatrixElementKernels.h +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/MatrixElementKernels.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: A. Valassi (Jan 2022) for the MG5aMC CUDACPP plugin. -// Further modified by: J. Teig, A. Valassi (2022-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: J. Teig, A. Valassi, Z. Wettersten (2022-2025) for the MG5aMC CUDACPP plugin. #ifndef MATRIXELEMENTKERNELS_H #define MATRIXELEMENTKERNELS_H 1 @@ -134,7 +134,7 @@ namespace mg5amcCpu // Does this host system support the SIMD used in the matrix element calculation? // [NB: this is private, SIMD vectorization in mg5amc C++ code is currently only used in the ME calculations below MatrixElementKernelHost!] - static bool hostSupportsSIMD( const bool verbose = true ); + static bool hostSupportsSIMD( const bool verbose = false ); // ZW: default verbose false private: diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/MemoryAccessGs.h b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/MemoryAccessGs.h index 63c17a68fa..50a6aaef4d 100644 --- a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/MemoryAccessGs.h +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/MemoryAccessGs.h @@ -128,6 +128,14 @@ namespace mg5amcCpu #endif } + // Locate a field (output) in a memory buffer (input) from a kernel event-indexing mechanism (internal) + // [Signature (SCALAR OR VECTOR) ===> fptype_sv* kernelAccess( fptype* buffer ) <===] + static __host__ __device__ inline fptype_sv* + kernelAccessP( fptype* buffer ) + { + return reinterpret_cast( buffer ); + } + // Locate a field (output) in a memory buffer (input) from a kernel event-indexing mechanism (internal) and the given field indexes (input) // [Signature (const, SCALAR) ===> const fptype& kernelAccessConst( const fptype* buffer ) <===] static constexpr auto kernelAccessConst_s = diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/MemoryBuffers.h b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/MemoryBuffers.h index 65a101888d..17ba7a89e5 100644 --- a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/MemoryBuffers.h +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/MemoryBuffers.h @@ -13,6 +13,7 @@ #include "CPPProcess.h" #include "GpuRuntime.h" #include "Parameters_sm.h" +#include "processConfig.h" #include @@ -274,7 +275,8 @@ namespace mg5amcCpu typedef BufferBase BufferNumerators; // The size (number of elements) per event in a memory buffer for numerators - constexpr size_t sizePerEventNumerators = 1; + // (should be equal to the number of diagrams in the process) + constexpr size_t sizePerEventNumerators = processConfig::ndiagrams; #ifndef MGONGPUCPP_GPUIMPL // A class encapsulating a C++ host buffer for gs diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P1_gg_ttx/CPPProcess.cc b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P1_gg_ttx/CPPProcess.cc index b32f4b931e..7387ab4335 100644 --- a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P1_gg_ttx/CPPProcess.cc +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P1_gg_ttx/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -25,6 +25,7 @@ #include "MemoryAccessMatrixElements.h" #include "MemoryAccessMomenta.h" #include "MemoryAccessWavefunctions.h" +#include "processConfig.h" #ifdef MGONGPU_SUPPORTS_MULTICHANNEL #include "MemoryAccessDenominators.h" @@ -96,6 +97,69 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { +#ifdef MGONGPU_SUPPORTS_MULTICHANNEL + __device__ INLINE unsigned int getChannelId( const unsigned int* allChannelIds +#ifndef MGONGPUCPP_GPUIMPL + , + const int ievt00, + bool sanityCheckMixedPrecision = true +#endif + ) + { + unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr +#ifdef MGONGPUCPP_GPUIMPL + using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page + if( allChannelIds != nullptr ) + { + const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) + const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) + // NB: channelIds_sv is a scalar in CUDA + channelId = channelIds_sv; + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + } +#else // Cuda or C++ + using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + if( allChannelIds != nullptr ) + { + // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) + const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 + uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) +#ifndef MGONGPU_CPPSIMD + // NB: channelIds_sv is a scalar in no-SIMD C++ + channelId = channelIds_sv; +#else + // NB: channelIds_sv is a vector in SIMD C++ + channelId = channelIds_sv[0]; // element[0] + for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] + { + assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId + } +#endif + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + if( sanityCheckMixedPrecision ) + { +#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT + // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) + const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 + uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + for( int i = 0; i < neppV; ++i ) + { + assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector + } +#endif + } + } +#endif // MGONGPUCPP_GPUIMPL + return channelId; + } +#endif // MGONGPU_SUPPORTS_MULTICHANNEL + constexpr int nw6 = CPPProcess::nw6; // dimensions of each wavefunction (HELAS KEK 91-11): e.g. 6 for e+ e- -> mu+ mu- (fermions and vectors) constexpr int npar = CPPProcess::npar; // #particles in total (external = initial + final): e.g. 4 for e+ e- -> mu+ mu- constexpr int ncomb = CPPProcess::ncomb; // #helicity combinations: e.g. 16 for e+ e- -> mu+ mu- (2**4 = fermion spin up/down ** npar) @@ -305,7 +369,7 @@ namespace mg5amcCpu COUPs[ndcoup + iicoup] = allCOUPs[ndcoup + iicoup]; // independent couplings, fixed for all events fptype* MEs = E_ACCESS::ieventAccessRecord( allMEs, ievt0 ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); #endif #endif @@ -315,7 +379,7 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Numerators and denominators for the current event (CUDA) or SIMD event page (C++) - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); #endif @@ -335,8 +399,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1 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] ); + if( channelId != 0 ) + { + numerators_sv[0] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[1] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -349,8 +416,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 2 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] ); + if( channelId != 0 ) + { + numerators_sv[1] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= amp_sv[0]; @@ -362,8 +432,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 3 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] ); + if( channelId != 0 ) + { + numerators_sv[2] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] -= amp_sv[0]; @@ -555,7 +628,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- @@ -923,9 +998,6 @@ namespace mg5amcCpu #ifdef MGONGPUCPP_GPUIMPL // Remember: in CUDA this is a kernel for one event, in c++ this processes n events const int ievt = blockDim.x * blockIdx.x + threadIdx.x; // index of event (thread) in grid -#ifdef MGONGPU_SUPPORTS_MULTICHANNEL - using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events -#endif #else //assert( (size_t)(allmomenta) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] //assert( (size_t)(allMEs) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] @@ -933,7 +1005,6 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL using NUM_ACCESS = HostAccessNumerators; // non-trivial access: buffer includes all events using DEN_ACCESS = HostAccessDenominators; // non-trivial access: buffer includes all events - using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events #endif #endif @@ -958,11 +1029,12 @@ namespace mg5amcCpu fptype_sv& MEs_sv = E_ACCESS::kernelAccess( MEs ); MEs_sv = fptype_sv{ 0 }; #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - numerators_sv = fptype_sv{ 0 }; + for( int i = 0; i < processConfig::ndiagrams; ++i ) + numerators_sv[i] = fptype_sv{ 0 }; denominators_sv = fptype_sv{ 0 }; #endif } @@ -975,17 +1047,7 @@ namespace mg5amcCpu // *** START OF PART 1a - CUDA (one event per GPU thread) *** #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) - const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) - // NB: channelIds_sv is a scalar in CUDA - channelId = channelIds_sv; - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) - } + unsigned int channelId = getChannelId( allChannelIds ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (for the single event processed in calculate_wavefunctions) @@ -1100,38 +1162,7 @@ namespace mg5amcCpu const int ievt00 = ipagV2 * neppV; // loop on one SIMD page (neppV events) at a time #endif #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) - const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 - uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) -#ifndef MGONGPU_CPPSIMD - // NB: channelIds_sv is a scalar in no-SIMD C++ - channelId = channelIds_sv; -#else - // NB: channelIds_sv is a vector in SIMD C++ - channelId = channelIds_sv[0]; // element[0] - for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] - { - assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId - } -#endif - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) -#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT - // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) - const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 - uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - for( int i = 0; i < neppV; ++i ) - { - assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector - } -#endif - } + unsigned int channelId = getChannelId( allChannelIds, ievt00 ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (jamp2[nParity][ncolor][neppV] for the SIMD vector - or the two SIMD vectors - of events processed in calculate_wavefunctions) @@ -1304,11 +1335,12 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( allChannelIds != nullptr ) // fix segfault #892 (not 'channelIds[0] != 0') { - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + const unsigned int channelId = getChannelId( allChannelIds, ievt0, false ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - MEs_sv *= numerators_sv / denominators_sv; + MEs_sv *= numerators_sv[channelId - 1] / denominators_sv; } #endif //for( int ieppV = 0; ieppV < neppV; ieppV++ ) diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P1_gg_ttx/CPPProcess.h b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P1_gg_ttx/CPPProcess.h index feff1cc6e1..c0ba6c2f8c 100644 --- a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P1_gg_ttx/CPPProcess.h +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P1_gg_ttx/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P1_gg_ttx/auto_dsig.f b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P1_gg_ttx/auto_dsig.f index bc9bcfeb9b..5d6ef2ba62 100644 --- a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P1_gg_ttx/auto_dsig.f +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P1_gg_ttx/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P1_gg_ttx/auto_dsig1.f b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P1_gg_ttx/auto_dsig1.f index db3c284caa..f46e9bfaf0 100644 --- a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P1_gg_ttx/auto_dsig1.f +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P1_gg_ttx/auto_dsig1.f @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -137,14 +137,14 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDDO QSCALE=QSCALE/2D0 ELSE - QSCALE=DSQRT(Q2FACT(IB(1))) + QSCALE=DSQRT(Q2FACT(1)) ENDIF G1=PDG2PDF(LPP(IB(1)),0, IB(1),XBK(IB(1)), QSCALE) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) IF (DSQRT(Q2FACT(IB(2))).NE.0D0) THEN - QSCALE=DSQRT(Q2FACT(IB(2))) + QSCALE=DSQRT(Q2FACT(2)) ENDIF G2=PDG2PDF(LPP(IB(2)),0, IB(2),XBK(IB(2)), QSCALE) ENDIF @@ -219,7 +219,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -290,6 +290,10 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, INTEGER I_EE C +C STUFF FOR UPC +C + DOUBLE PRECISION PHOTONPDFSQUARE +C C EXTERNAL FUNCTIONS C LOGICAL PASSCUTS @@ -373,12 +377,12 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, IF (ABS(LPP(IB(1))).GE.1) THEN C LP=SIGN(1,LPP(IB(1))) G1(IVEC)=PDG2PDF(LPP(IB(1)),0, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) G2(IVEC)=PDG2PDF(LPP(IB(2)),0, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) ENDIF ENDDO ! IWARP LOOP ENDDO ! CURRWARP LOOP diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P1_gg_ttx/matrix1.f b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P1_gg_ttx/matrix1.f index 707ea40323..e6ca6093c7 100644 --- a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P1_gg_ttx/matrix1.f +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P1_gg_ttx/matrix1.f @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -307,7 +307,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -350,7 +350,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C INTEGER I,J,M,N COMPLEX*16 ZTEMP, TMP_JAMP(0) - REAL*8 CF(NCOLOR,NCOLOR) + INTEGER CF(NCOLOR*(NCOLOR+1)/2) + INTEGER DENOM, CF_INDEX COMPLEX*16 AMP(NGRAPHS), JAMP(NCOLOR,NAMPSO) COMPLEX*16 W(6,NWAVEFUNCS) C Needed for v4 models @@ -393,11 +394,10 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C C COLOR DATA C - DATA (CF(I, 1),I= 1, 2) /5.333333333333333D+00, - $ -6.666666666666666D-01/ + DATA DENOM/3/ + DATA (CF(I),I= 1, 2) /16,-4/ C 1 T(1,2,3,4) - DATA (CF(I, 2),I= 1, 2) /-6.666666666666666D-01 - $ ,5.333333333333333D+00/ + DATA (CF(I),I= 3, 3) /16/ C 1 T(2,1,3,4) C ---------- C BEGIN CODE @@ -446,10 +446,12 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) MATRIX1 = 0.D0 DO M = 1, NAMPSO + CF_INDEX = 0 DO I = 1, NCOLOR ZTEMP = (0.D0,0.D0) - DO J = 1, NCOLOR - ZTEMP = ZTEMP + CF(J,I)*JAMP(J,M) + DO J = I, NCOLOR + CF_INDEX = CF_INDEX + 1 + ZTEMP = ZTEMP + CF(CF_INDEX)*JAMP(J,M) ENDDO DO N = 1, NAMPSO @@ -458,6 +460,7 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) ENDDO ENDDO ENDDO + MATRIX1 = MATRIX1/DENOM IF(SDE_STRAT.EQ.1)THEN AMP2(1)=AMP2(1)+AMP(1)*DCONJG(AMP(1)) diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P1_gg_ttx/matrix11.png b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P1_gg_ttx/matrix11.png new file mode 100644 index 0000000000..9017b25979 Binary files /dev/null and b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P1_gg_ttx/matrix11.png differ diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P1_gg_ttx/processConfig.h b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P1_gg_ttx/processConfig.h new file mode 100644 index 0000000000..8f6a27f796 --- /dev/null +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P1_gg_ttx/processConfig.h @@ -0,0 +1,16 @@ +// Copyright (C) 2025 CERN and UCLouvain. +// Licensed under the GNU Lesser General Public License (version 3 or later). +// Created by: S. Roiser (May 2025) for the MG5aMC CUDACPP plugin. +// Further modified by: ... for the MG5aMC CUDACPP plugin. + + +#ifndef MG5_CONFIG_SIGMA_SM_GG_TTX_H +#define MG5_CONFIG_SIGMA_SM_GG_TTX_H 1 + +namespace processConfig { + + constexpr int ndiagrams = 3; + +} + +#endif // MG5_CONFIG_SIGMA_SM_GG_TTX_H \ No newline at end of file diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P2_gg_ttxg/CPPProcess.cc b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P2_gg_ttxg/CPPProcess.cc index c8b3dbf03c..f0f6679753 100644 --- a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P2_gg_ttxg/CPPProcess.cc +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P2_gg_ttxg/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -25,6 +25,7 @@ #include "MemoryAccessMatrixElements.h" #include "MemoryAccessMomenta.h" #include "MemoryAccessWavefunctions.h" +#include "processConfig.h" #ifdef MGONGPU_SUPPORTS_MULTICHANNEL #include "MemoryAccessDenominators.h" @@ -96,6 +97,69 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { +#ifdef MGONGPU_SUPPORTS_MULTICHANNEL + __device__ INLINE unsigned int getChannelId( const unsigned int* allChannelIds +#ifndef MGONGPUCPP_GPUIMPL + , + const int ievt00, + bool sanityCheckMixedPrecision = true +#endif + ) + { + unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr +#ifdef MGONGPUCPP_GPUIMPL + using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page + if( allChannelIds != nullptr ) + { + const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) + const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) + // NB: channelIds_sv is a scalar in CUDA + channelId = channelIds_sv; + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + } +#else // Cuda or C++ + using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + if( allChannelIds != nullptr ) + { + // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) + const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 + uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) +#ifndef MGONGPU_CPPSIMD + // NB: channelIds_sv is a scalar in no-SIMD C++ + channelId = channelIds_sv; +#else + // NB: channelIds_sv is a vector in SIMD C++ + channelId = channelIds_sv[0]; // element[0] + for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] + { + assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId + } +#endif + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + if( sanityCheckMixedPrecision ) + { +#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT + // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) + const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 + uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + for( int i = 0; i < neppV; ++i ) + { + assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector + } +#endif + } + } +#endif // MGONGPUCPP_GPUIMPL + return channelId; + } +#endif // MGONGPU_SUPPORTS_MULTICHANNEL + constexpr int nw6 = CPPProcess::nw6; // dimensions of each wavefunction (HELAS KEK 91-11): e.g. 6 for e+ e- -> mu+ mu- (fermions and vectors) constexpr int npar = CPPProcess::npar; // #particles in total (external = initial + final): e.g. 4 for e+ e- -> mu+ mu- constexpr int ncomb = CPPProcess::ncomb; // #helicity combinations: e.g. 16 for e+ e- -> mu+ mu- (2**4 = fermion spin up/down ** npar) @@ -305,7 +369,7 @@ namespace mg5amcCpu COUPs[ndcoup + iicoup] = allCOUPs[ndcoup + iicoup]; // independent couplings, fixed for all events fptype* MEs = E_ACCESS::ieventAccessRecord( allMEs, ievt0 ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); #endif #endif @@ -315,7 +379,7 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Numerators and denominators for the current event (CUDA) or SIMD event page (C++) - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); #endif @@ -338,8 +402,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1 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] ); + if( channelId != 0 ) + { + numerators_sv[0] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= amp_sv[0]; jamp_sv[2] += amp_sv[0]; @@ -354,8 +421,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 2 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] ); + if( channelId != 0 ) + { + numerators_sv[1] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[5] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -368,8 +438,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 3 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] ); + if( channelId != 0 ) + { + numerators_sv[2] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[2] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -383,8 +456,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 4 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] ); + if( channelId != 0 ) + { + numerators_sv[3] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] -= amp_sv[0]; @@ -396,8 +472,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 5 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] ); + if( channelId != 0 ) + { + numerators_sv[4] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[1] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -410,8 +489,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 6 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] ); + if( channelId != 0 ) + { + numerators_sv[5] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= amp_sv[0]; @@ -424,8 +506,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 7 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] ); + if( channelId != 0 ) + { + numerators_sv[6] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[3] -= amp_sv[0]; @@ -437,8 +522,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 8 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] ); + if( channelId != 0 ) + { + numerators_sv[7] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[3] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[5] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -451,8 +539,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 9 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] ); + if( channelId != 0 ) + { + numerators_sv[8] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[5] -= amp_sv[0]; @@ -464,8 +555,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 10 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] ); + if( channelId != 0 ) + { + numerators_sv[9] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[3] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -478,8 +572,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 11 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] ); + if( channelId != 0 ) + { + numerators_sv[10] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[4] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -492,8 +589,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 12 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] ); + if( channelId != 0 ) + { + numerators_sv[11] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += amp_sv[0]; jamp_sv[2] -= amp_sv[0]; @@ -508,8 +608,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 13 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] ); + if( channelId != 0 ) + { + numerators_sv[12] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] -= amp_sv[0]; @@ -521,8 +624,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 14 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] ); + if( channelId != 0 ) + { + numerators_sv[13] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] -= amp_sv[0]; @@ -534,8 +640,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 15 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] ); + if( channelId != 0 ) + { + numerators_sv[14] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += amp_sv[0]; jamp_sv[1] -= amp_sv[0]; @@ -774,7 +883,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- @@ -1144,9 +1255,6 @@ namespace mg5amcCpu #ifdef MGONGPUCPP_GPUIMPL // Remember: in CUDA this is a kernel for one event, in c++ this processes n events const int ievt = blockDim.x * blockIdx.x + threadIdx.x; // index of event (thread) in grid -#ifdef MGONGPU_SUPPORTS_MULTICHANNEL - using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events -#endif #else //assert( (size_t)(allmomenta) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] //assert( (size_t)(allMEs) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] @@ -1154,7 +1262,6 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL using NUM_ACCESS = HostAccessNumerators; // non-trivial access: buffer includes all events using DEN_ACCESS = HostAccessDenominators; // non-trivial access: buffer includes all events - using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events #endif #endif @@ -1179,11 +1286,12 @@ namespace mg5amcCpu fptype_sv& MEs_sv = E_ACCESS::kernelAccess( MEs ); MEs_sv = fptype_sv{ 0 }; #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - numerators_sv = fptype_sv{ 0 }; + for( int i = 0; i < processConfig::ndiagrams; ++i ) + numerators_sv[i] = fptype_sv{ 0 }; denominators_sv = fptype_sv{ 0 }; #endif } @@ -1196,17 +1304,7 @@ namespace mg5amcCpu // *** START OF PART 1a - CUDA (one event per GPU thread) *** #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) - const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) - // NB: channelIds_sv is a scalar in CUDA - channelId = channelIds_sv; - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) - } + unsigned int channelId = getChannelId( allChannelIds ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (for the single event processed in calculate_wavefunctions) @@ -1321,38 +1419,7 @@ namespace mg5amcCpu const int ievt00 = ipagV2 * neppV; // loop on one SIMD page (neppV events) at a time #endif #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) - const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 - uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) -#ifndef MGONGPU_CPPSIMD - // NB: channelIds_sv is a scalar in no-SIMD C++ - channelId = channelIds_sv; -#else - // NB: channelIds_sv is a vector in SIMD C++ - channelId = channelIds_sv[0]; // element[0] - for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] - { - assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId - } -#endif - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) -#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT - // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) - const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 - uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - for( int i = 0; i < neppV; ++i ) - { - assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector - } -#endif - } + unsigned int channelId = getChannelId( allChannelIds, ievt00 ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (jamp2[nParity][ncolor][neppV] for the SIMD vector - or the two SIMD vectors - of events processed in calculate_wavefunctions) @@ -1525,11 +1592,12 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( allChannelIds != nullptr ) // fix segfault #892 (not 'channelIds[0] != 0') { - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + const unsigned int channelId = getChannelId( allChannelIds, ievt0, false ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - MEs_sv *= numerators_sv / denominators_sv; + MEs_sv *= numerators_sv[channelId - 1] / denominators_sv; } #endif //for( int ieppV = 0; ieppV < neppV; ieppV++ ) diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P2_gg_ttxg/CPPProcess.h b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P2_gg_ttxg/CPPProcess.h index b583fc85fe..97e301eb5a 100644 --- a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P2_gg_ttxg/CPPProcess.h +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P2_gg_ttxg/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P2_gg_ttxg/auto_dsig.f b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P2_gg_ttxg/auto_dsig.f index 8843b88a23..8c42969338 100644 --- a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P2_gg_ttxg/auto_dsig.f +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P2_gg_ttxg/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P2_gg_ttxg/auto_dsig1.f b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P2_gg_ttxg/auto_dsig1.f index b22dde0f92..13aa155096 100644 --- a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P2_gg_ttxg/auto_dsig1.f +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P2_gg_ttxg/auto_dsig1.f @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -137,14 +137,14 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDDO QSCALE=QSCALE/2D0 ELSE - QSCALE=DSQRT(Q2FACT(IB(1))) + QSCALE=DSQRT(Q2FACT(1)) ENDIF G1=PDG2PDF(LPP(IB(1)),0, IB(1),XBK(IB(1)), QSCALE) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) IF (DSQRT(Q2FACT(IB(2))).NE.0D0) THEN - QSCALE=DSQRT(Q2FACT(IB(2))) + QSCALE=DSQRT(Q2FACT(2)) ENDIF G2=PDG2PDF(LPP(IB(2)),0, IB(2),XBK(IB(2)), QSCALE) ENDIF @@ -219,7 +219,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -290,6 +290,10 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, INTEGER I_EE C +C STUFF FOR UPC +C + DOUBLE PRECISION PHOTONPDFSQUARE +C C EXTERNAL FUNCTIONS C LOGICAL PASSCUTS @@ -373,12 +377,12 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, IF (ABS(LPP(IB(1))).GE.1) THEN C LP=SIGN(1,LPP(IB(1))) G1(IVEC)=PDG2PDF(LPP(IB(1)),0, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) G2(IVEC)=PDG2PDF(LPP(IB(2)),0, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) ENDIF ENDDO ! IWARP LOOP ENDDO ! CURRWARP LOOP diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P2_gg_ttxg/card.png b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P2_gg_ttxg/card.png new file mode 100644 index 0000000000..004a8b90c6 Binary files /dev/null and b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P2_gg_ttxg/card.png differ diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P2_gg_ttxg/matrix1.f b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P2_gg_ttxg/matrix1.f index 7d44ae130e..cbadd0f13d 100644 --- a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P2_gg_ttxg/matrix1.f +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P2_gg_ttxg/matrix1.f @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -323,7 +323,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -366,7 +366,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C INTEGER I,J,M,N COMPLEX*16 ZTEMP, TMP_JAMP(9) - REAL*8 CF(NCOLOR,NCOLOR) + INTEGER CF(NCOLOR*(NCOLOR+1)/2) + INTEGER DENOM, CF_INDEX COMPLEX*16 AMP(NGRAPHS), JAMP(NCOLOR,NAMPSO) COMPLEX*16 W(6,NWAVEFUNCS) C Needed for v4 models @@ -409,33 +410,18 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C C COLOR DATA C - DATA (CF(I, 1),I= 1, 6) /7.111111111111111D+00, - $ -8.888888888888888D-01,-8.888888888888888D-01 - $ ,1.111111111111111D-01,1.111111111111111D-01,1.111111111111111D - $ +00/ + DATA DENOM/9/ + DATA (CF(I),I= 1, 6) /64,-16,-16,2,2,20/ C 1 T(1,2,5,3,4) - DATA (CF(I, 2),I= 1, 6) /-8.888888888888888D-01 - $ ,7.111111111111111D+00,1.111111111111111D-01,1.111111111111111D - $ +00,-8.888888888888888D-01,1.111111111111111D-01/ + DATA (CF(I),I= 7, 11) /64,2,20,-16,2/ C 1 T(1,5,2,3,4) - DATA (CF(I, 3),I= 1, 6) /-8.888888888888888D-01 - $ ,1.111111111111111D-01,7.111111111111111D+00, - $ -8.888888888888888D-01,1.111111111111111D+00,1.111111111111111D - $ -01/ + DATA (CF(I),I= 12, 15) /64,-16,20,2/ C 1 T(2,1,5,3,4) - DATA (CF(I, 4),I= 1, 6) /1.111111111111111D-01 - $ ,1.111111111111111D+00,-8.888888888888888D-01 - $ ,7.111111111111111D+00,1.111111111111111D-01, - $ -8.888888888888888D-01/ + DATA (CF(I),I= 16, 18) /64,2,-16/ C 1 T(2,5,1,3,4) - DATA (CF(I, 5),I= 1, 6) /1.111111111111111D-01, - $ -8.888888888888888D-01,1.111111111111111D+00,1.111111111111111D - $ -01,7.111111111111111D+00,-8.888888888888888D-01/ + DATA (CF(I),I= 19, 20) /64,-16/ C 1 T(5,1,2,3,4) - DATA (CF(I, 6),I= 1, 6) /1.111111111111111D+00 - $ ,1.111111111111111D-01,1.111111111111111D-01, - $ -8.888888888888888D-01,-8.888888888888888D-01 - $ ,7.111111111111111D+00/ + DATA (CF(I),I= 21, 21) /64/ C 1 T(5,2,1,3,4) C ---------- C BEGIN CODE @@ -549,10 +535,12 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) MATRIX1 = 0.D0 DO M = 1, NAMPSO + CF_INDEX = 0 DO I = 1, NCOLOR ZTEMP = (0.D0,0.D0) - DO J = 1, NCOLOR - ZTEMP = ZTEMP + CF(J,I)*JAMP(J,M) + DO J = I, NCOLOR + CF_INDEX = CF_INDEX + 1 + ZTEMP = ZTEMP + CF(CF_INDEX)*JAMP(J,M) ENDDO DO N = 1, NAMPSO @@ -561,6 +549,7 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) ENDDO ENDDO ENDDO + MATRIX1 = MATRIX1/DENOM IF(SDE_STRAT.EQ.1)THEN AMP2(1)=AMP2(1)+AMP(1)*DCONJG(AMP(1)) diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P2_gg_ttxg/matrix11.png b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P2_gg_ttxg/matrix11.png new file mode 100644 index 0000000000..1d8168c79a Binary files /dev/null and b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P2_gg_ttxg/matrix11.png differ diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P2_gg_ttxg/matrix12.png b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P2_gg_ttxg/matrix12.png new file mode 100644 index 0000000000..b912383fa4 Binary files /dev/null and b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P2_gg_ttxg/matrix12.png differ diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P2_gg_ttxg/processConfig.h b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P2_gg_ttxg/processConfig.h new file mode 100644 index 0000000000..47044dbe6a --- /dev/null +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P2_gg_ttxg/processConfig.h @@ -0,0 +1,16 @@ +// Copyright (C) 2025 CERN and UCLouvain. +// Licensed under the GNU Lesser General Public License (version 3 or later). +// Created by: S. Roiser (May 2025) for the MG5aMC CUDACPP plugin. +// Further modified by: ... for the MG5aMC CUDACPP plugin. + + +#ifndef MG5_CONFIG_SIGMA_SM_GG_TTXG_H +#define MG5_CONFIG_SIGMA_SM_GG_TTXG_H 1 + +namespace processConfig { + + constexpr int ndiagrams = 16; + +} + +#endif // MG5_CONFIG_SIGMA_SM_GG_TTXG_H \ No newline at end of file diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/cuts.f b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/cuts.f index 7898714201..bd50ab1357 100644 --- a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/cuts.f +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/cuts.f @@ -307,12 +307,18 @@ LOGICAL FUNCTION PASSCUTS(P, VECSIZE_USED) c c Limit S_hat c - if (dsqrt_shat.ne.0d0)then - if (nincoming.eq.2.and.sumdot(p(0,1),p(0,2),1d0) .lt. dsqrt_shat**2) then - passcuts=.false. - return - endif - endif + if(nincoming.eq.2) then + if (dsqrt_shat.ne.0d0.or.dsqrt_shatmax.ne.-1d0)then + xvar = sumdot(p(0,1),p(0,2),1d0) + if (xvar .lt. dsqrt_shat**2)then + passcuts=.false. + return + else if (dsqrt_shatmax.ne.-1d0 .and. xvar .gt. dsqrt_shatmax**2)then + passcuts = .false. + return + endif + endif + endif C $B$ DESACTIVATE_CUT $E$ !This is a tag for MadWeight if(debug) write (*,*) '=============================' diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/genps.f b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/genps.f index 1c32e93f5d..8503bdbec8 100644 --- a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/genps.f +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/genps.f @@ -1373,6 +1373,10 @@ subroutine gen_s(x,smin,smax,spole,swidth,s,jac,pass) double precision smin,smax,spole,swidth,s,jac double precision x logical pass + include 'maxparticles.inc' + include '../../Source/vector.inc' + include 'run.inc' + include 'cuts.inc' c c Local c @@ -1384,6 +1388,10 @@ subroutine gen_s(x,smin,smax,spole,swidth,s,jac,pass) c----- c Begin Code c----- + if (dsqrt_shatmax.ne.-1d0)then + smax = min(smax, dsqrt_shatmax**2) + endif + pass=.true. if (jac .eq. 0 .and. .not. warned0) then print*,'Input jacobian 0 in genps' @@ -1628,7 +1636,10 @@ SUBROUTINE GENCMS(S,X1,X2,X,SMIN,SJACOBI) DOUBLE PRECISION ETA,ETAMIN,ETAMAX logical warned data warned/.false./ - + include 'maxparticles.inc' + include '../../Source/vector.inc' + include 'run.inc' + include 'cuts.inc' C------------ C BEGIN CODE C------------ @@ -1645,7 +1656,11 @@ SUBROUTINE GENCMS(S,X1,X2,X,SMIN,SJACOBI) C IF THERE IS NO S CHANNEL POLE USE BELOW: TAUMIN = 0d0 !SMIN/S !keep scale fix - TAUMAX = 1D0 + if (dsqrt_shatmax.ne.-1d0)then + TAUMAX=dsqrt_shatmax**2/S + else + TAUMAX = 1D0 + endif TAU = (TAUMAX-TAUMIN)*X(1)+TAUMIN SJACOBI= sjacobi*(TAUMAX-TAUMIN) @@ -1915,7 +1930,7 @@ double precision function get_channel_cut(p, config) if(sde_strat.eq.2)then t = dot(ptemp(0,-i), ptemp(0,-i)) Mass = prmass(-i, config) - get_channel_cut = get_channel_cut / ((t-Mass)*(t+Mass)+stot*1d-10)**2 + get_channel_cut = get_channel_cut / (t-Mass**2+stot*1d-10)**2 endif c write(*,*) i, "t, Mass, fact", t, Mass, ((t-Mass)*(t+Mass))**2,get_channel_cut t = t/stot @@ -1930,9 +1945,9 @@ double precision function get_channel_cut(p, config) t = dot(ptemp(0,-i), ptemp(0,-i)) Mass = prmass(-i, config) Width = prwidth(-i, config) - tmp = (t-Mass)*(t+Mass) + tmp = (t-Mass**2) tmp2 = Mass*Width - get_channel_cut = get_channel_cut* (tmp**2 - tmp2**2)/(tmp**2 + tmp2**2)**2 + get_channel_cut = get_channel_cut/(tmp**2 + tmp2**2) endif c write(*,*) i, "s, Mass, Width, fact", t, Mass, Width, (((t-Mass)*(t+Mass) )**2 + Width**2*Mass**2), get_channel_cut endif diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/myamp.f b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/myamp.f index 9e5f8d44dd..5360566ef4 100644 --- a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/myamp.f +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/myamp.f @@ -231,6 +231,7 @@ subroutine set_peaks double precision x1,x2,xk(nexternal) double precision dr,mtot,etot,xqfact double precision spmass + double precision stot ! technically the min with dsqrt_shatmax**2 with the physical one integer i, iconfig, l1, l2, j, nt, nbw, iproc, k integer iden_part(-nexternal+1:nexternal) @@ -285,8 +286,8 @@ subroutine set_peaks integer lbw(0:nexternal) !Use of B.W. common /to_BW/ lbw - double precision stot,m1,m2 - common/to_stot/stot,m1,m2 + double precision real_stot,m1,m2 + common/to_stot/real_stot,m1,m2 include 'coupl.inc' ! needs VECSIZE_MEMMAX (defined in vector.inc) include 'cuts.inc' @@ -309,6 +310,12 @@ subroutine set_peaks c----- c Begin Code c----- + if (dsqrt_shatmax.ne.-1)then + stot = min(real_stot, dsqrt_shatmax**2) + else + stot = real_stot + endif + iconfig = this_config c needs to be initialise to avoid segfault do i = -nexternal,-1 diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/Gridpack/gridrun b/epochX/cudacpp/gg_tt01g.mad/bin/internal/Gridpack/gridrun index 8c8f7d3940..01d4ab53f5 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/Gridpack/gridrun +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/Gridpack/gridrun @@ -91,7 +91,7 @@ import internal.madevent_interface as cmd_interface try: - cmd_line = cmd_interface.GridPackCmd(me_dir=root_path, nb_event=args[0], seed=args[1], gran=args[2]) + cmd_line = cmd_interface.GridPackCmd(me_dir=root_path, nb_event=args[0], seed=args[1], gran=args[2], nprocs=args[3], maxevts=args[4]) except KeyboardInterrupt: print('Quit on KeyboardInterrupt') diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/Gridpack/run.sh b/epochX/cudacpp/gg_tt01g.mad/bin/internal/Gridpack/run.sh index 20adf572c2..2d149f96be 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/Gridpack/run.sh +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/Gridpack/run.sh @@ -14,6 +14,18 @@ # USAGE : run [num_events] [iseed] ## ############################################################################# +function usage() { + local retcode="${1:-1}" # default return code is 1 + echo "Usage:" + echo " run.sh [options] [num events] [seed]" + echo " run.sh [options] [num events] [seed] [granularity]" + echo "Options:" + echo " -h, --help print this message and exit" + echo " -p, --parallel [num procs] number of processes to run in parallel" + echo " -m, --maxevts [num events] maximum number of unweighted events per job" + exit $retcode +} + if [[ -d ./madevent ]]; then DIR='./madevent' else @@ -32,23 +44,46 @@ export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${PWD}/madevent/lib:${PWD}/HELAS/lib # For Mac OS X export DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:${PWD}/madevent/lib:${PWD}/HELAS/lib +pos_args=() +nprocs=1 +maxevts=2500 -if [[ ($1 != "") && ("$2" != "") && ("$3" == "") ]]; then - num_events=$1 - seed=$2 - gran=1 -elif [[ ($1 != "") && ("$2" != "") && ("$3" != "") ]]; then - num_events=$1 - seed=$2 - gran=$3 -else - echo "Warning: input is not correct. script requires two arguments: NB_EVENT SEED" -fi +while [[ $# -gt 0 ]]; do + case $1 in + -h|--help) + usage 0 ;; + -p|--parallel) + nprocs="$2" && shift && shift ;; + -m|--maxevts) + maxevts="$2" && shift && shift ;; + -*) + echo "Error: Unknown option $1" && usage ;; + *) + pos_args+=("$1") && shift ;; + esac +done + +case `echo "${pos_args[@]}" | wc -w | tr -d " "` in + "2") + num_events=${pos_args[0]} + seed=${pos_args[1]} + gran=1 + ;; + "3") + num_events=${pos_args[0]} + seed=${pos_args[1]} + gran=${pos_args[2]} + ;; + *) + echo "Error: number of arguments is not correct" + usage + ;; +esac -echo "Now generating $num_events events with random seed $seed and granularity $gran" +echo "Now generating $num_events events with random seed $seed and granularity $gran using $nprocs processes" ############ RUN THE PYTHON CODE ##################### -${DIR}/bin/gridrun $num_events $seed $gran +${DIR}/bin/gridrun $num_events $seed $gran $nprocs $maxevts ######################################################## ########### POSTPROCESSING ##################### diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/banner.py b/epochX/cudacpp/gg_tt01g.mad/bin/internal/banner.py index 42d82818d0..022861fc31 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/banner.py +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/banner.py @@ -353,7 +353,7 @@ def modify_init_cross(self, cross, allow_zero=False): assert "init" in self cross = dict(cross) - for key in cross.keys(): + for key in list(cross.keys()): if isinstance(key, str) and key.isdigit() and int(key) not in cross: cross[int(key)] = cross[key] @@ -3318,7 +3318,6 @@ def retro_compatible_custom_fct(lines, mode=None): for i,line in enumerate(lines[:]): if search and re.search(include_pat, line): name = re.findall(include_pat, line)[0] - misc.sprint('DETECTED INCLUDE', name) if 'vector.inc' in name: search = False if 'run.inc' in name: @@ -3326,7 +3325,6 @@ def retro_compatible_custom_fct(lines, mode=None): search = False sol.append(line) if re.search(function_pat, line): - misc.sprint("DETECTED FCT") search = True return sol @@ -4201,6 +4199,7 @@ def default_setup(self): self.add_param("bwcutoff", 15.0) self.add_param("cut_decays", False, cut='d') self.add_param('dsqrt_shat',0., cut=True) + self.add_param('dsqrt_shatmax', -1, cut=True) self.add_param("nhel", 0, include=False) self.add_param("limhel", 1e-8, hidden=True, comment="threshold to determine if an helicity contributes when not MC over helicity.") #pt cut @@ -5577,6 +5576,9 @@ def default_setup(self): #technical self.add_param('folding', [1,1,1], include=False) + + #bias + self.add_param('flavour_bias',[5,1], hidden=True, comment="Example: '5,100' means that the probability to generate an event with a bottom (or anti-bottom) quark is increased by a factor 100, but the weight of those events is reduced by a factor 100. Requires that the 'event_norm' is set to 'bias'.") #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]") @@ -5790,6 +5792,17 @@ def check_validity(self): if self['mcatnlo_delta'] and not self['parton_shower'].lower() == 'pythia8': raise InvalidRunCard("MC@NLO-DELTA only possible with matching to Pythia8") + # check that the flavour_bias is consistent + if len(self['flavour_bias']) != 2: + raise InvalidRunCard("'flavour_bias' should contain exactly two numbers: the abs(PDG) of the flavour to enhance, and the enhancement multiplication factor.") + for i in self['flavour_bias']: + if i < 0: + raise InvalidRunCard("flavour and multiplication factor should be positive in the flavour_bias parameter") + if self['flavour_bias'][1] != 1 and self['event_norm'] != 'bias': + logger.warning('Non-trivial flavour enhancement factor: setting event normalisation to "bias"') + self['event_norm']='bias' + + # check that ebeam is bigger than the proton mass. for i in [1,2]: # do not for proton mass if not proton PDF (or when scan initialization) diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/check_param_card.py b/epochX/cudacpp/gg_tt01g.mad/bin/internal/check_param_card.py index bc785b5de6..a34705f6bc 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/check_param_card.py +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/check_param_card.py @@ -1092,11 +1092,11 @@ def write_summary(self, path, order=None, lastline=False, nbcol=20): to_print = self.cross[-1:] for info in to_print: name = info['run_name'] - bench = info['bench'] + bench = [float(x) for x in info['bench']] data = [] for k in keys: if k in info: - data.append(info[k]) + data.append(float(info[k])) else: data.append(0.) ff.write(formatting % tuple([name] + bench + data)) diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/common_run_interface.py b/epochX/cudacpp/gg_tt01g.mad/bin/internal/common_run_interface.py index 9ff7390cf5..541cd6294b 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/common_run_interface.py +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/common_run_interface.py @@ -750,8 +750,8 @@ def __init__(self, me_dir, options, *args, **opts): else: self.ninitial = self.proc_characteristics['ninitial'] - def make_make_all_html_results(self, folder_names = [], jobs=[]): - return sum_html.make_all_html_results(self, folder_names, jobs) + def make_make_all_html_results(self, folder_names = [], jobs=[], get_attr=None): + return sum_html.make_all_html_results(self, folder_names, jobs, get_attr) def write_RunWeb(self, me_dir): @@ -3831,7 +3831,7 @@ def store_scan_result(self): """return the information that need to be kept for the scan summary. Auto-width are automatically added.""" - return {'cross': self.results.current['cross']} + return {'cross': self.results.current['cross'], 'error': self.results.current['error']} def add_error_log_in_html(self, errortype=None): @@ -5135,10 +5135,10 @@ def init_run(self, cards): self.special_shortcut.update( {'ebeam':([float],['run_card ebeam1 %(0)s', 'run_card ebeam2 %(0)s']), 'lpp': ([int],['run_card lpp1 %(0)s', 'run_card lpp2 %(0)s' ]), - 'lhc': ([int],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), + 'lhc': ([float],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), 'lep': ([int],['run_card lpp1 0', 'run_card lpp2 0', 'run_card ebeam1 %(0)s/2', 'run_card ebeam2 %(0)s/2']), 'ilc': ([int],['run_card lpp1 0', 'run_card lpp2 0', 'run_card ebeam1 %(0)s/2', 'run_card ebeam2 %(0)s/2']), - 'lcc': ([int],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), + 'lcc': ([float],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), 'fixed_scale': ([float],['run_card fixed_fac_scale T', 'run_card fixed_ren_scale T', 'run_card scale %(0)s', 'run_card dsqrt_q2fact1 %(0)s' ,'run_card dsqrt_q2fact2 %(0)s']), 'no_parton_cut':([],['run_card nocut T']), 'cm_velocity':([float], [lambda self :self.set_CM_velocity]), @@ -6740,7 +6740,15 @@ def postcmd(self, stop, line): return ending_question - + def help_update(self): + logger.info(""" syntax: update dependent: Change the mass/width of particles which are not free parameter for the model. + update missing: add to the current param_card missing blocks/parameters. + update to_slha1: pass SLHA2 card to SLHA1 convention. (beta) + update to_slha2: pass SLHA1 card to SLHA2 convention. (beta) + update to_full [run_card] + update XXX [where XXX correspond to a hidden block of the run_card]: + supported block are %s + """, ', '.join(self.update_block)) def do_update(self, line, timer=0): @@ -6756,6 +6764,8 @@ def do_update(self, line, timer=0): logger.warning('miss an argument (dependent or missing). Please retry') return + args[0] = args[0].lower() + if args[0] == 'dependent': if not self.mother_interface: logger.warning('Failed to update dependent parameter. This might create trouble for external program (like MadSpin/shower/...)') @@ -6805,10 +6815,11 @@ def do_update(self, line, timer=0): self.modified_card.add('run') # delay writting of the run_card logger.info('add optional block %s to the run_card', args[0]) else: - self.help_update() + self.do_help('update') logger.warning('unvalid options for update command. Please retry') + def update_to_full(self, line): """ trigger via update to_full LINE""" diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/extended_cmd.py b/epochX/cudacpp/gg_tt01g.mad/bin/internal/extended_cmd.py index 789976beee..c321fd88e5 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/extended_cmd.py +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/extended_cmd.py @@ -1317,6 +1317,8 @@ def nice_error_handling(self, error, line): debug_file = open(self.debug_output, 'a') traceback.print_exc(file=debug_file) + if __debug__: + traceback.print_exc() if hasattr(error, 'filename'): debug_file.write("Related File: %s\n" % error.filename) # Create a nice error output @@ -1928,7 +1930,8 @@ def do_display(self, line, output=sys.stdout): for i, name in enumerate(split): try: __import__('.'.join(split[:i+1])) - exec('%s=sys.modules[\'%s\']' % (split[i], '.'.join(split[:i+1]))) + tmp = {} + exec('%s=sys.modules[\'%s\']' % (split[i], '.'.join(split[:i+1])), globals(),tmp) except ImportError: try: var = eval(args[1]) @@ -1939,7 +1942,7 @@ def do_display(self, line, output=sys.stdout): outstr += 'EXTERNAL:\n' outstr += misc.nice_representation(var, nb_space=4) else: - var = eval(args[1]) + var = eval(args[1], globals(), tmp) outstr += 'EXTERNAL:\n' outstr += misc.nice_representation(var, nb_space=4) diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/file_writers.py b/epochX/cudacpp/gg_tt01g.mad/bin/internal/file_writers.py index 526756129f..74ba0d195c 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/file_writers.py +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/file_writers.py @@ -140,10 +140,6 @@ def preprocess_template(self, input_lines, context={}): else: raise self.FileWriterError("%s not string" % repr(input_lines)) - # Setup the contextual environment - for contextual_variable, value in context.items(): - exec('%s=%s'%(str(contextual_variable),repr(value))) - res = [] # The variable below tracks the conditional statements structure if_stack = [] @@ -166,7 +162,7 @@ def preprocess_template(self, input_lines, context={}): # Treat an if statement elif preproc_command.group('command')=='if': try: - if_stack.append(eval(preproc_command.group('body'))==True) + if_stack.append(eval(preproc_command.group('body'), globals(), context)==True) except Exception as e: raise self.FilePreProcessingError('Could not evaluate'+\ "python expression '%s' given the context %s provided."%\ diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/files.py b/epochX/cudacpp/gg_tt01g.mad/bin/internal/files.py index 551b71ddb6..3061b007e7 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/files.py +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/files.py @@ -147,9 +147,14 @@ def cp(path1, path2, log=True, error=False): path2 = format_path(path2) try: shutil.copy(path1, path2) + except shutil.Error as why: + logger.debug('no cp since identical: %s', why) + return except IOError as why: import madgraph.various.misc as misc try: + if 'same file' in str(why): + return if os.path.exists(path2): path2 = os.path.join(path2, os.path.split(path1)[1]) misc.copytree(path1, path2) @@ -157,12 +162,10 @@ def cp(path1, path2, log=True, error=False): if error: raise if log: - logger.warning(why) + logger.warning("fail to cp", path1, path2, why) else: - misc.sprint("fail to cp", why) - except shutil.Error: - # idetical file - pass + misc.sprint("fail to cp",path1,path2, why) + def rm(path, log=True): """removes path, that can be a single element or a list""" diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/gen_cardhtml-pl b/epochX/cudacpp/gg_tt01g.mad/bin/internal/gen_cardhtml-pl index 1810c6c082..6e0e06533d 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/gen_cardhtml-pl +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/gen_cardhtml-pl @@ -137,7 +137,7 @@ until($listpos>$#incard){ print PAGE " Model: $model \n"; print PAGE " \n \n
\n"; print PAGE " \n"; - print PAGE "\"\" \n"; + print PAGE "\"\" \n"; print PAGE "
\n"; print PAGE " \n \n \n"; print PAGE " \n"; diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/gen_crossxhtml.py b/epochX/cudacpp/gg_tt01g.mad/bin/internal/gen_crossxhtml.py index 681bf9d09b..3114a4350c 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/gen_crossxhtml.py +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/gen_crossxhtml.py @@ -133,7 +133,7 @@ class AllResults(dict): web = False - _run_entries = ['cross', 'error','nb_event_pythia','run_mode','run_statistics', + _run_entries = ['cross', 'error','axsec','nb_event_pythia','run_mode','run_statistics', 'nb_event','cross_pythia','error_pythia', 'nb_event_pythia8','cross_pythia8','error_pythia8', 'shower_dir'] diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/gen_jpeg-pl b/epochX/cudacpp/gg_tt01g.mad/bin/internal/gen_jpeg-pl index 87d03da394..31b7e9fe55 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/gen_jpeg-pl +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/gen_jpeg-pl @@ -1,16 +1,16 @@ #!/usr/bin/perl -w #--------------------------------------------------------------------- -# Run GS to create jpeg files defined as $gs +# Run GS to create PNG files defined as $gs #--------------------------------------------------------------------- -system("/bin/bash -c \"rm -f matrix*.jpg\" "); +system("/bin/bash -c \"rm -f matrix*.png\" "); $imatrix = ""; if (! -e "matrix.ps") {$imatrix = 1;} -$max_jpg = 2; -if ($imatrix eq "") {$max_jpg = 5;} -# add 1 to max_jpg, to get max_jpg pages -$max_jpg += 1; +$max_png = 2; +if ($imatrix eq "") {$max_png = 5;} +# add 1 to max_png, to get max_png pages +$max_png += 1; open(PAGE,"> diagrams.html") || die "Error creating diagrams.html"; print PAGE "\ \n"; print PAGE "\ \n"; @@ -21,22 +21,22 @@ while ( -e "matrix$imatrix.ps"){ open(IN, "< matrix$imatrix.ps") || die "No file matrix$imatrix.ps"; open(OUT, "> matrix-1.ps") || die "Could not open file matrix-1.ps"; while () { - if ($_ =~ m/^%%Page: $max_jpg $max_jpg/) {last;} + if ($_ =~ m/^%%Page: $max_png $max_png/) {last;} else {print OUT $_, "\n";} } close(OUT); close(IN); - system "/bin/bash -c \"nice gs \-sDEVICE\=jpeg \-sOutputFile\=matrix$imatrix\%00d.jpg \-q \-dNOPAUSE \-dBATCH matrix-1.ps > /dev/null\""; + system "/bin/bash -c \"nice gs \-sDEVICE\=pngmono \-r150 \-sOutputFile\=matrix$imatrix\%00d.png \-q \-dNOPAUSE \-dBATCH matrix-1.ps > /dev/null\""; system "rm -f matrix-1.ps"; -# Determine how many jpg files we have +# Determine how many png files we have $pages=1; - while(-e "matrix$imatrix$pages.jpg"){ + while(-e "matrix$imatrix$pages.png"){ $pages++; }#end of while #reduce it by one - if ($pages > $max_jpg){ + if ($pages > $max_png){ $pages -= 1; } # Find name of process @@ -45,24 +45,24 @@ while ( -e "matrix$imatrix.ps"){ if ($proc =~ /Process: (.+?)(\s\w+=\d+)*$/) { $proc = $1; } print PAGE "

To save bandwidth not all diagrams were converted to jpeg."; + if (-e "matrix$imatrix$max_png.png" ) { + print PAGE "

To save bandwidth not all diagrams were converted to PNG."; print PAGE "

To view all diagrams click on "; print PAGE "\ postscript. \<\/A\> \ \n"; # # Delete files which aren't included in diagrams.html # - system ("/bin/bash -c \"rm -f matrix$max_jpg.jpg\" "); + system ("/bin/bash -c \"rm -f matrix$max_png.png\" "); } # -# Now create jpeg file for card +# Now create PNG file for card # - if (! -e "../../HTML/card.jpg") { + if (! -e "../../HTML/card.png") { system ("/bin/bash -c \"head -352 matrix$imatrix.ps >& junk.ps\" "); open(JUNK,">> junk.ps") || die "Error opening junk.ps"; @@ -72,7 +72,7 @@ while ( -e "matrix$imatrix.ps"){ system ("/bin/bash -c \"cat matrix$imatrix.ps | sed 1,352d >> junk.ps\" "); - system "/bin/bash -c \"nice gs \-sDEVICE\=jpeg \-sOutputFile\=card.jpg \-q \-dNOPAUSE \-dBATCH \-g180x150 ./junk.ps; rm -f junk.ps; cp -p card.jpg ../../HTML/card.jpg > /dev/null\" "; + system "/bin/bash -c \"nice gs \-sDEVICE\=pngmono \-sOutputFile\=card.png \-q \-dNOPAUSE \-dBATCH \-g180x150 ./junk.ps; rm -f junk.ps; cp -p card.png ../../HTML/card.png > /dev/null\" "; } if ($imatrix eq "") {$imatrix = 0;} $imatrix = $imatrix + 1; @@ -82,3 +82,4 @@ print PAGE "\n"; print PAGE "\<\/BODY\> \n"; print PAGE "\<\/HTML\> \n"; close(PAGE); + 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 415ecc9de0..d5d7fc8faf 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/gen_ximprove.py +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/gen_ximprove.py @@ -30,6 +30,7 @@ import stat import sys import six +import time from six.moves import range from six.moves import zip @@ -304,6 +305,7 @@ def get_helicity(self, to_submit=True, clean=True): logger.debug('(%s) nb_hel: %s zero amp: %s bad_amps_hel: %s/%s', split_file[-1], len(good_hels),len(bad_amps),len(bad_amps_perhel), len(good_hels)*nb_amp ) if len(good_hels) == 1: files.cp(matrix_file, matrix_file.replace('orig','optim')) + files.cp(matrix_file.replace('.f','.o'), matrix_file.replace('orig','optim').replace('.f','.o')) continue # avoid optimization if onlye one helicity gauge = self.cmd.proc_characteristics['gauge'] @@ -1059,6 +1061,7 @@ def __init__(self, cmd, opt=None): # parameter for the gridpack run self.nreq = 2000 self.iseed = 4321 + self.maxevts = 2500 # placeholder for information self.results = 0 #updated in launch/update_html @@ -1200,6 +1203,10 @@ def reset_multijob(self): def write_multijob(self, Channel, nb_split): """ """ if nb_split <=1: + try: + os.remove(pjoin(self.me_dir, 'SubProcesses', Channel.get('name'), 'multijob.dat')) + except OSError: + pass return f = open(pjoin(self.me_dir, 'SubProcesses', Channel.get('name'), 'multijob.dat'), 'w') f.write('%i\n' % nb_split) @@ -1828,17 +1835,17 @@ class gen_ximprove_gridpack(gen_ximprove_v4): 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 gen_events_security = 1.00 - def __new__(cls, *args, **opts): + def __new__(cls, cmd, opts): cls.force_class = 'gridpack' - return super(gen_ximprove_gridpack, cls).__new__(cls, *args, **opts) + return super(gen_ximprove_gridpack, cls).__new__(cls, cmd, opts) - def __init__(self, *args, **opts): + def __init__(self, cmd, opts): self.ngran = -1 + self.nprocs = 1 self.gscalefact = {} self.readonly = False if 'ngran' in opts: @@ -1846,9 +1853,18 @@ def __init__(self, *args, **opts): # del opts['ngran'] if 'readonly' in opts: self.readonly = opts['readonly'] - super(gen_ximprove_gridpack,self).__init__(*args, **opts) + if 'nprocs' in opts: + self.nprocs = int(opts['nprocs']) + if 'maxevts' in opts and self.nprocs > 1: + self.max_request_event = int(opts['maxevts']) + super(gen_ximprove_gridpack,self).__init__(cmd, opts) if self.ngran == -1: self.ngran = 1 + + if self.nprocs > 1: + self.combining_job = 0 + else: + self.combining_job = sys.maxsize def find_job_for_event(self): """return the list of channel that need to be improved""" @@ -1876,8 +1892,8 @@ def find_job_for_event(self): continue # no event to generate events self.gscalefact[tag] = max(1, 1/(goal_lum * C.get('axsec')/ self.ngran)) #need to generate events - logger.debug('request events for ', C.get('name'), 'cross=', - C.get('axsec'), 'needed events = ', goal_lum * C.get('axsec')) + logger.debug('request events for %s cross=%d needed events = %d', + C.get('name'), C.get('axsec'), goal_lum * C.get('axsec')) to_refine.append(C) logger.info('need to improve %s channels' % len(to_refine)) @@ -1897,8 +1913,13 @@ def get_job_for_event(self): 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 - + nb_split = int(max(1,((needed_event-1)// self.max_request_event) +1)) + if not self.split_channels: + nb_split = 1 + if nb_split > self.max_splitting: + 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')) @@ -1908,13 +1929,16 @@ def get_job_for_event(self): nevents = self.max_event_in_iter if nevents < self.min_event_in_iter: + nb_split = int(nb_split * nevents / self.min_event_in_iter) + 1 # sr dangerous? nevents = self.min_event_in_iter # # 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) - + # write the multi-job information + self.write_multijob(C, nb_split) + #create the info dict assume no splitting for the default info = {'name': self.cmd.results.current['run_name'], 'script_name': 'unknown', @@ -1925,7 +1949,7 @@ def get_job_for_event(self): 'nevents': nevents, #int(nevents*self.gen_events_security)+1, 'maxiter': self.max_iter, 'miniter': self.min_iter, - 'precision': -1*int(needed_event)/C.get('axsec'), + 'precision': -goal_lum/nb_split, # -1*int(needed_event)/C.get('axsec'), 'requested_event': needed_event, 'nhel': self.run_card['nhel'], 'channel': C.name.replace('G',''), @@ -1938,27 +1962,59 @@ def get_job_for_event(self): basedir = pjoin(os.path.dirname(__file__), '..','..','SubProcesses', info['P_dir'], info['directory']) info['base_directory'] = basedir - jobs.append(info) - + if nb_split == 1: + jobs.append(info) + else: + for i in range(nb_split): + new_info = dict(info) + new_info['offset'] = i+1 + new_info['directory'] += self.alphabet[i % 26] + str((i+1)//26) + new_info['base_directory'] = info['directory'] + jobs.append(new_info) write_dir = '.' if self.readonly else None self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), jobs, write_dir) + if self.nprocs > 1: + nprocs_cluster = cluster.MultiCore(nb_core=self.nprocs) + gridpack_start = time.time() + def gridpack_wait_monitoring(Idle, Running, Done): + if Idle+Running+Done == 0: + return + logger.info("Gridpack event generation: %s Idle, %s Running, %s Done [%s]" + % (Idle, Running, Done, misc.format_time(time.time()-gridpack_start))) + done = [] for j in jobs: - if j['P_dir'] in done: - continue - done.append(j['P_dir']) + if self.nprocs == 1: + if j['P_dir'] in done: + continue + done.append(j['P_dir']) + # Give a little status. Sometimes these jobs run very long, and having hours without any + # console output can be a bit frightening and make users think we are looping. + if len(done)%5==0: + logger.info(f"Working on job {len(done)} of {len(jobs)}") + # set the working directory path. pwd = pjoin(os.getcwd(),j['P_dir']) if self.readonly else pjoin(self.me_dir, 'SubProcesses', j['P_dir']) - exe = pjoin(pwd, 'ajob1') + exe = pjoin(pwd, j['script_name']) st = os.stat(exe) os.chmod(exe, st.st_mode | stat.S_IEXEC) # run the code\ - cluster.onecore.launch_and_wait(exe, cwd=pwd, packet_member=j['packet']) + if self.nprocs == 1: + cluster.onecore.launch_and_wait(exe, cwd=pwd, packet_member=j['packet']) + else: + nprocs_cluster.cluster_submit(exe, cwd=pwd, packet_member=j['packet']) write_dir = '.' if self.readonly else pjoin(self.me_dir, 'SubProcesses') + if self.nprocs > 1: + nprocs_cluster.wait(self.me_dir, gridpack_wait_monitoring) + + if self.readonly: + combine_runs.CombineRuns(write_dir) + else: + combine_runs.CombineRuns(self.me_dir) self.check_events(goal_lum, to_refine, jobs, write_dir) def check_events(self, goal_lum, to_refine, jobs, Sdir): diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/hel_recycle.py b/epochX/cudacpp/gg_tt01g.mad/bin/internal/hel_recycle.py index 1471de4bcb..978ba6575e 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/hel_recycle.py +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/hel_recycle.py @@ -550,7 +550,7 @@ def get_jamp_lines(self, line): def get_amp2_lines(self, line): if line.startswith(' DO I = 1, NCOLOR'): self.in_amp2 = False - elif not line.isspace(): + elif not line.isspace() and 'DENOM' not in line: self.template_dict['amp2_lines'] += f'{line[0:6]} {self.add_indices(line[6:])}' def prepare_bools(self): diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/histograms.py b/epochX/cudacpp/gg_tt01g.mad/bin/internal/histograms.py index 51ae2914fc..d68c560806 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/histograms.py +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/histograms.py @@ -1149,11 +1149,8 @@ def parse_one_histo_from_stream(self, stream, all_weight_header, boundaries = [0.0,0.0] for j, weight in \ enumerate(HwU.histo_bin_weight_re.finditer(line_bin)): - if (j == len(weight_header)): - continue - if j == len(all_weight_header): - raise HwU.ParseError("There is more bin weights"+\ - " specified than expected (%i)"%len(weight_header)) + #if (j == len(weight_header)): + # continue if selected_central_weight == all_weight_header[j]: bin_weights['central'] = float(weight.group('weight')) if all_weight_header[j] == 'boundary_xmin': @@ -2480,14 +2477,14 @@ def get_main_central_plot_lines(HwU_name, block_position, color_index, # return [template_no_stat%rep_dic]+\ # ([template%rep_dic] if show_mc_uncertainties else []) - # The use of sqrt(-1) is just a trick to prevent the line to display + # The use of 1/0 is just a trick to prevent the line to display res = [] - rep_dic['data'] = '($3 < 0 ? sqrt(-1) : $3)' + rep_dic['data'] = '($3 < 0 ? 1/0 : $3)' res.append(template_no_stat%rep_dic) rep_dic['title'] = " title ''" if show_mc_uncertainties: res.append(template%rep_dic) - rep_dic['data'] = '($3 >= 0 ? sqrt(-1) : abs($3))' + rep_dic['data'] = '($3 >= 0 ? 1/0 : abs($3))' rep_dic['ls'] = ' ls %d'%(100+color_index) res.append(template_no_stat%rep_dic) if show_mc_uncertainties: @@ -2739,13 +2736,13 @@ def ratio_no_correlations(wgtsA, wgtsB): """#-- rendering subhistograms '%(subhistogram_type)s' %(unset label)s %(set_format_y)s +%(set_yscale)s set yrange [%(ymin).4e:%(ymax).4e] set origin %(origin_x).4e, %(origin_y).4e set size %(size_x).4e, %(size_y).4e set mytics %(mytics)d %(set_ytics)s %(set_format_x)s -%(set_yscale)s %(set_ylabel)s %(set_histo_label)s plot \\""" @@ -2878,7 +2875,7 @@ def ratio_no_correlations(wgtsA, wgtsB): # We decide to show uncertainties in the main plot only if they # are part of a monocolor band. Otherwise, they will only be - # shown in the first subplot. Notice that plotting 'sqrt(-1)' + # shown in the first subplot. Notice that plotting '1/0' # is just a trick so as to have only the key printed with no # line @@ -2890,7 +2887,7 @@ def ratio_no_correlations(wgtsA, wgtsB): '%s, scale variation'%title, band='scale' in use_band) else: uncertainty_plot_lines[-1]['scale'] = \ - ["sqrt(-1) ls %d title '%s'"%(color_index+10,'%s, scale variation'%title)] + ["1/0 ls %d title '%s'"%(color_index+10,'%s, scale variation'%title)] # And now PDF_variation if available if not PDF_var_pos is None and len(PDF_var_pos)>0: if 'pdf' in use_band: @@ -2899,7 +2896,7 @@ def ratio_no_correlations(wgtsA, wgtsB): '%s, PDF variation'%title, band='pdf' in use_band) else: uncertainty_plot_lines[-1]['pdf'] = \ - ["sqrt(-1) ls %d title '%s'"%(color_index+20,'%s, PDF variation'%title)] + ["1/0 ls %d title '%s'"%(color_index+20,'%s, PDF variation'%title)] # And now merging variation if available if not merging_var_pos is None and len(merging_var_pos)>0: if 'merging_scale' in use_band: @@ -2908,7 +2905,7 @@ def ratio_no_correlations(wgtsA, wgtsB): '%s, merging scale variation'%title, band='merging_scale' in use_band) else: uncertainty_plot_lines[-1]['merging_scale'] = \ - ["sqrt(-1) ls %d title '%s'"%(color_index+30,'%s, merging scale variation'%title)] + ["1/0 ls %d title '%s'"%(color_index+30,'%s, merging scale variation'%title)] # And now alpsfact variation if available if not alpsfact_var_pos is None and len(alpsfact_var_pos)>0: if 'alpsfact' in use_band: @@ -2917,7 +2914,7 @@ def ratio_no_correlations(wgtsA, wgtsB): '%s, alpsfact variation'%title, band='alpsfact' in use_band) else: uncertainty_plot_lines[-1]['alpsfact'] = \ - ["sqrt(-1) ls %d title '%s'"%(color_index+40,'%s, alpsfact variation'%title)] + ["1/0 ls %d title '%s'"%(color_index+40,'%s, alpsfact variation'%title)] # plot_lines.append( # "'%s' index %d using (($1+$2)/2):3 ls %d title '%s'"\ diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/launch_plugin.py b/epochX/cudacpp/gg_tt01g.mad/bin/internal/launch_plugin.py index 0924927785..ba08c10340 100644 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/launch_plugin.py +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/launch_plugin.py @@ -33,7 +33,7 @@ def compile(self, *args, **opts): if 'cwd' in opts and os.path.basename(opts['cwd']) == 'Source': path = pjoin(opts['cwd'], 'make_opts') common_run_interface.CommonRunCmd.update_make_opts_full(path, - {'FPTYPE': self.run_card['floating_type'] }) + {'override FPTYPE': self.run_card['floating_type'] }) misc.sprint('FPTYPE checked') cudacpp_supported_backends = [ 'fortran', 'cuda', 'hip', 'cpp', 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z', 'cppauto' ] if args and args[0][0] == 'madevent' and hasattr(self, 'run_card'): @@ -76,7 +76,7 @@ def reset_makeopts(self, old_value, new_value, name): if not hasattr(self, 'path'): raise Exception if name == 'floating_type': - common_run_interface.CommonRunCmd.update_make_opts_full({'FPTYPE': new_value}) + common_run_interface.CommonRunCmd.update_make_opts_full({'override FPTYPE': new_value}) else: raise Exception Sourcedir = pjoin(os.path.dirname(os.path.dirname(self.path)), 'Source') diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/lhe_parser.py b/epochX/cudacpp/gg_tt01g.mad/bin/internal/lhe_parser.py index f6e47956cd..76ded329c0 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/lhe_parser.py +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/lhe_parser.py @@ -2953,8 +2953,8 @@ def pt(self): @property def pseudorapidity(self): - norm = math.sqrt(self.px**2 + self.py**2+self.pz**2) - return 0.5* math.log((norm - self.pz) / (norm + self.pz)) + norm = math.sqrt(self.px**2 + self.py**2 + self.pz**2) + return 0.5* math.log((norm + self.pz) / (norm - self.pz)) @property def rapidity(self): 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 85e5bcf5e3..2852f1d4d8 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/madevent_interface.py +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/madevent_interface.py @@ -1171,10 +1171,10 @@ def check_survey(self, args, cmd='survey'): for opt,value in self._survey_options.items(): if arg.startswith('--%s=' % opt): exec('self.opts[\'%s\'] = %s(arg.split(\'=\')[-1])' % \ - (opt, value[0])) + (opt, value[0]), globals(), {'self':self, 'arg':arg}) arg = "" if arg != "": raise Exception - except Exception: + except Exception as error: self.help_survey() raise self.InvalidCmd('invalid %s argument'% arg) @@ -3656,9 +3656,11 @@ def do_refine(self, line): else: self.refine_mode = "new" - cross, error = self.make_make_all_html_results() + cross, error, across = self.make_make_all_html_results(get_attr=('xsec','xerru','axsec')) + self.results.add_detail('cross', cross) self.results.add_detail('error', error) + self.results.add_detail('axsec', across) self.results.add_detail('run_statistics', dict(self.results.get_detail('run_statistics'))) @@ -3786,7 +3788,7 @@ def split(a, n): for i, local_G in enumerate(split(Gdirs, nb_chunk)): line = [pjoin(self.me_dir, "Events", self.run_name, "partials%d.lhe.gz" % i)] line.append(pjoin(self.me_dir, 'Events', self.run_name, '%s_%s_banner.txt' % (self.run_name, tag))) - line.append(str(self.results.current['cross'])) + line.append(str(self.results.current.get('axsec'))) line += local_G partials_info.append(self.do_combine_events_partial(' '.join(line), preprocess_only=True)) mycluster.submit(sys.executable, @@ -6749,7 +6751,7 @@ def get_subP_ids(path): class GridPackCmd(MadEventCmd): """The command for the gridpack --Those are not suppose to be use interactively--""" - def __init__(self, me_dir = None, nb_event=0, seed=0, gran=-1, *completekey, **stdin): + def __init__(self, me_dir = None, nb_event=0, seed=0, gran=-1, nprocs=1, maxevts=2500, *completekey, **stdin): """Initialize the command and directly run""" # Initialize properly @@ -6759,6 +6761,8 @@ 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.nprocs = nprocs + self.maxevts = maxevts self.options['automatic_html_opening'] = False #write the grid_card.dat on disk @@ -6874,7 +6878,7 @@ def launch(self, nb_event, seed): #misc.call([pjoin(self.me_dir,'bin','refine4grid'), # str(nb_event), '0', 'Madevent','1','GridRun_%s' % seed], # cwd=self.me_dir) - self.refine4grid(nb_event) + self.gridpack_cross = self.refine4grid(nb_event) # 3) Combine the events/pythia/... self.exec_cmd('combine_events') @@ -6902,6 +6906,8 @@ def refine4grid(self, nb_event): precision = nb_event + across= self.make_make_all_html_results(get_attr='axsec') + self.opts = dict([(key,value[1]) for (key,value) in \ self._survey_options.items()]) @@ -6915,8 +6921,9 @@ def refine4grid(self, nb_event): 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} + refine_opt = {'err_goal': nb_event, 'split_channels': True, + 'ngran':self.granularity, 'readonly': self.readonly, + 'nprocs': self.nprocs, 'maxevts': self.maxevts} 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 @@ -6926,7 +6933,7 @@ def refine4grid(self, nb_event): #print 'run combine!!!' #combine_runs.CombineRuns(self.me_dir) - return + return across #update html output Presults = sum_html.collect_result(self) cross, error = Presults.xsec, Presults.xerru @@ -7051,10 +7058,14 @@ def do_combine_events(self, line): sum_axsec += result.get('axsec')*gscalefact[Gdir] if len(AllEvent) >= 80: #perform a partial unweighting - if self.results.current['cross'] == 0 and self.run_card['gridpack']: - nb_event= self.nb_event + if not self.results.current.get('axsec'): + if self.run_card['gridpack'] and self.gridpack_cross: + nb_event = min(abs(1.05*self.nb_event*sum_axsec/self.gridpack_cross),self.nb_event) + else: + nb_event= self.nb_event else: - nb_event = min(abs(1.01*self.nb_event*sum_axsec/self.results.current['cross']),self.run_card['nevents']) + nb_event = min(abs(1.01*self.nb_event*sum_axsec/self.results.current.get('axsec')),self.run_card['nevents'], self.nb_event, self.gridpack_cross, sum_axsec) + misc.sprint(nb_event, self.results.current.get('axsec'), self.gridpack_cross) AllEvent.unweight(pjoin(outdir, self.run_name, "partials%s.lhe.gz" % partials), get_wgt, log_level=5, trunc_error=1e-2, event_target=nb_event) AllEvent = lhe_parser.MultiEventFile() @@ -7068,6 +7079,7 @@ def do_combine_events(self, line): for data in partials_info: AllEvent.add(*data) + sum_xsec += data[1] if not hasattr(self,'proc_characteristic'): self.proc_characteristic = self.get_characteristics() diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/restore_data b/epochX/cudacpp/gg_tt01g.mad/bin/internal/restore_data index 6205bb9567..407ed7aa91 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/restore_data +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/restore_data @@ -48,8 +48,17 @@ for i in `cat subproc.mg` ; do cd ../ done +# check if we are on a Mac, otherwise assume Linux +if [[ "$OSTYPE" == "darwin"* ]]; then + # no nproc on Mac, so use sysctl instead + # use -S1024 because there is a limit on the length of the command + xargs_opts="-P $(sysctl -n hw.ncpu) -S1024" +else + xargs_opts="-P $(nproc --all)" +fi + find . -mindepth 2 -maxdepth 2 -type d -name 'G*' -print0 \ - | xargs --null -P "$(nproc --all)" -I{} bash -c " + | xargs --null ${xargs_opts} -I{} bash -c " cd {} for j in $1_results.dat ; do if [[ -e \$j ]] ; then diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/sum_html.py b/epochX/cudacpp/gg_tt01g.mad/bin/internal/sum_html.py index 9dd5826f71..fb8dd3a74a 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/sum_html.py +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/sum_html.py @@ -770,7 +770,7 @@ def collect_result(cmd, folder_names=[], jobs=None, main_dir=None): return all -def make_all_html_results(cmd, folder_names = [], jobs=[]): +def make_all_html_results(cmd, folder_names = [], jobs=[], get_attr=None): """ folder_names and jobs have been added for the amcatnlo runs """ run = cmd.results.current['run_name'] if not os.path.exists(pjoin(cmd.me_dir, 'HTML', run)): @@ -794,7 +794,12 @@ def make_all_html_results(cmd, folder_names = [], jobs=[]): fsock.write('%s

' % Presults.get_html(run, unit, cmd.me_dir)) fsock.write('%s
' % P_text) - return Presults.xsec, Presults.xerru + if not get_attr: + return Presults.xsec, Presults.xerru + else: + if isinstance(get_attr, tuple): + return [getattr(Presults, _) for _ in get_attr] + return getattr(Presults, get_attr) diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/internal/ufomodel/write_param_card.py b/epochX/cudacpp/gg_tt01g.mad/bin/internal/ufomodel/write_param_card.py index 57a85b0614..33a89259f8 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/ufomodel/write_param_card.py +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/ufomodel/write_param_card.py @@ -116,9 +116,10 @@ def write_param(self, param, lhablock): def write_dep_param_block(self, lhablock): import cmath from parameters import all_parameters + param_values = {'cmath':cmath} for parameter in all_parameters: try: - exec("%s = %s" % (parameter.name, parameter.value)) + exec("%s = %s" % (parameter.name, parameter.value), globals(), param_values) except Exception: pass text = "## Not dependent paramater.\n" @@ -134,7 +135,7 @@ def write_dep_param_block(self, lhablock): prefix = "DECAY " for part, param in data: if isinstance(param.value, str): - value = complex(eval(param.value)).real + value = complex(eval(param.value, globals(), param_values)).real else: value = param.value diff --git a/epochX/cudacpp/gg_tt01g.mad/bin/madevent b/epochX/cudacpp/gg_tt01g.mad/bin/madevent index dff9711b73..9c5363e682 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/madevent +++ b/epochX/cudacpp/gg_tt01g.mad/bin/madevent @@ -178,6 +178,17 @@ force_run = False if (args and args[0] == 'treatcards'): force_run=True + +# check that madgraph is not in PYTHONPATH +try: + import madgraph +except ImportError: + pass +else: + logger.getLogger('madgraph').error('Looks like you do have madgraph in your PYTHONPATH (or you run this executable from the main MG5aMC directory). This executable will likely not work in such case.') + + + # Call the cmd interface main loop try: if '-h' in args or '--help' in args: diff --git a/epochX/cudacpp/gg_tt01g.mad/src/HelAmps_sm.h b/epochX/cudacpp/gg_tt01g.mad/src/HelAmps_sm.h index ff9f0d7f00..63bc46f8b9 100644 --- a/epochX/cudacpp/gg_tt01g.mad/src/HelAmps_sm.h +++ b/epochX/cudacpp/gg_tt01g.mad/src/HelAmps_sm.h @@ -8,7 +8,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_tt01g.mad/src/Parameters_sm.cc b/epochX/cudacpp/gg_tt01g.mad/src/Parameters_sm.cc index 47a3a011b8..d17aac5b5c 100644 --- a/epochX/cudacpp/gg_tt01g.mad/src/Parameters_sm.cc +++ b/epochX/cudacpp/gg_tt01g.mad/src/Parameters_sm.cc @@ -7,7 +7,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_tt01g.mad/src/Parameters_sm.h b/epochX/cudacpp/gg_tt01g.mad/src/Parameters_sm.h index 76066c7bb1..63f7d185bd 100644 --- a/epochX/cudacpp/gg_tt01g.mad/src/Parameters_sm.h +++ b/epochX/cudacpp/gg_tt01g.mad/src/Parameters_sm.h @@ -7,7 +7,7 @@ // Further modified by: A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== 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 c216de0edd..21a520c613 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 @@ -1,8 +1,11 @@ +WARNING:root:python3.12 support is still experimental. For the moment re-weighting is NOT working and do expect a LOT of syntax warning. We do not advise python3.12 for production for the moment. +Running MG5 in debug mode +Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT +Plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT has marked as NOT being validated with this version: 3.6.2. +It has been validated for the last time with version: 3.6.0 Note that this is a development version. This version is intended for development/beta testing and NOT for production. This version has not been fully tested (if at all) and might have limited user support (if at all) -Running MG5 in debug mode -Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT ************************************************************ * * * W E L C O M E to * @@ -15,7 +18,7 @@ Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT * * * * * * * * * * * * -* VERSION 3.6.0 2024-09-30 * +* VERSION 3.6.2 2025-03-19 * * * * WARNING: UNKNOWN DEVELOPMENT VERSION. * * WARNING: DO NOT USE FOR PRODUCTION * @@ -46,10 +49,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 Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt -import /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg.mg +import /shared/roiser/sw/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 @@ -58,7 +60,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.006003379821777344  +DEBUG: model prefixing takes 0.0018248558044433594  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  @@ -151,21 +153,21 @@ 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.012 s Total: 1 processes with 16 diagrams output madevent_simd ../TMPOUT/CODEGEN_mad_gg_ttg --hel_recycling=False --vector_size=32 Output will be done with PLUGIN: CUDACPP_OUTPUT Addition matrix-element will be done with PLUGIN: CUDACPP_OUTPUT -DEBUG: opt['output_options']['vector_size'] =  32 [export_v4.py at line 4334]  +DEBUG: opt['output_options']['vector_size'] =  32 [export_v4.py at line 4166]  Output will be done with PLUGIN: CUDACPP_OUTPUT DEBUG: Entering PLUGIN_ProcessExporter.__init__ (initialise the exporter) [output.py at line 171]  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 176]  -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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg  +INFO: Creating subdirectories in directory /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg +WARNING: File exists /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/Cards  +WARNING: File exists /shared/roiser/sw/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 @@ -177,25 +179,25 @@ FileWriter t t~ g WEIGHTED<=3 @1 INFO: Finding symmetric diagrams for subprocess group gg_ttxg -DEBUG: len(subproc_diagrams_for_config) =  15 [model_handling.py at line 1527]  -DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12, 13: 13, 14: 14, 15: 15} [model_handling.py at line 1551]  -DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12, 13: 13, 14: 14, 15: 15} [model_handling.py at line 1552]  -Generated helas calls for 1 subprocesses (16 diagrams) in 0.037 s -Wrote files for 36 helas calls in 0.123 s +DEBUG: len(subproc_diagrams_for_config) =  15 [model_handling.py at line 1538]  +DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12, 13: 13, 14: 14, 15: 15} [model_handling.py at line 1562]  +DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12, 13: 13, 14: 14, 15: 15} [model_handling.py at line 1563]  +Generated helas calls for 1 subprocesses (16 diagrams) in 0.015 s +Wrote files for 36 helas calls in 1.505 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.331 s +ALOHA: aloha creates 5 routines in 0.181 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 10 routines in 0.310 s +ALOHA: aloha creates 10 routines in 0.138 s VVV1 VVV1 FFV1 @@ -205,38 +207,40 @@ ALOHA: aloha creates 10 routines in 0.310 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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/src/./HelAmps_sm.h +INFO: Created file HelAmps_sm.h in directory /shared/roiser/sw/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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/src/./Parameters_sm.h +FileWriter for /shared/roiser/sw/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: /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/src/. and /shared/roiser/sw/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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/Cards/me5_configuration.txt INFO: Use Fortran compiler gfortran INFO: Use c++ compiler g++ INFO: Generate jpeg diagrams 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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg; patch -p4 -i /shared/roiser/sw/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common patching file SubProcesses/makefile -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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/SubProcesses/P1_gg_ttxg; patch -p6 -i /shared/roiser/sw/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file driver.f patching file matrix1.f Hunk #2 succeeded at 243 (offset 16 lines). DEBUG: p.returncode =  0 [output.py at line 263]  -Output to directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg done. +Output to directory /shared/roiser/sw/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 +/shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/README Run "open index.html" to see more information about this process. quit -real 0m2.439s -user 0m2.135s -sys 0m0.297s -Code generation completed in 2 seconds +real 0m6.976s +user 0m1.417s +sys 0m0.709s +Code generation completed in 7 seconds +/shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/bin/internal/banner.py:3309: SyntaxWarning: invalid escape sequence '\s' + function_pat = re.compile('^\s+(?:SUBROUTINE|(?:%(type)s)\s+function)\s+([a-zA-Z]\w*)' \ ************************************************************ * * * W E L C O M E to * @@ -249,7 +253,7 @@ Code generation completed in 2 seconds * * * * * * * * * * * * -* VERSION 3.6.0 * +* VERSION 3.6.2 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -257,10 +261,9 @@ Code generation completed in 2 seconds * 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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/Cards/me5_configuration.txt +INFO: load configuration from /shared/roiser/sw/madgraph4gpu/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/Cards/me5_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 @@ -279,7 +282,7 @@ launch in debug mode * * * * * * * * * * * * -* VERSION 3.6.0 * +* VERSION 3.6.2 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -287,10 +290,9 @@ 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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/Cards/me5_configuration.txt +INFO: load configuration from /shared/roiser/sw/madgraph4gpu/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttg/Cards/me5_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 68b4c46295..a0212bfb62 100644 --- a/epochX/cudacpp/gg_ttg.mad/Cards/me5_configuration.txt +++ b/epochX/cudacpp/gg_ttg.mad/Cards/me5_configuration.txt @@ -235,7 +235,7 @@ # pineappl = pineappl -#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo +#mg5_path = /shared/roiser/sw/madgraph4gpu/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo +#mg5_path = /shared/roiser/sw/madgraph4gpu/MG5aMC/mg5amcnlo diff --git a/epochX/cudacpp/gg_ttg.mad/Cards/proc_card_mg5.dat b/epochX/cudacpp/gg_ttg.mad/Cards/proc_card_mg5.dat index 3ace6e558c..ebd9e0f23b 100644 --- a/epochX/cudacpp/gg_ttg.mad/Cards/proc_card_mg5.dat +++ b/epochX/cudacpp/gg_ttg.mad/Cards/proc_card_mg5.dat @@ -8,7 +8,7 @@ #* * * * #* * #* * -#* VERSION 3.6.0 2024-09-30 * +#* VERSION 3.6.2 2025-03-19 * #* * #* WARNING: UNKNOWN DEVELOPMENT VERSION. * #* WARNING: DO NOT USE FOR PRODUCTION * diff --git a/epochX/cudacpp/gg_ttg.mad/Cards/run_card.dat b/epochX/cudacpp/gg_ttg.mad/Cards/run_card.dat index d087670827..a16ea5dee6 100644 --- a/epochX/cudacpp/gg_ttg.mad/Cards/run_card.dat +++ b/epochX/cudacpp/gg_ttg.mad/Cards/run_card.dat @@ -107,6 +107,7 @@ # Parton level cuts definition * #******************************* 0.0 = dsqrt_shat ! minimal shat for full process + -1 = dsqrt_shatmax ! maximum shat for full process # # #********************************************************************* diff --git a/epochX/cudacpp/gg_ttg.mad/Cards/run_card_default.dat b/epochX/cudacpp/gg_ttg.mad/Cards/run_card_default.dat index 43e93cbf40..cdcd77f36d 100644 --- a/epochX/cudacpp/gg_ttg.mad/Cards/run_card_default.dat +++ b/epochX/cudacpp/gg_ttg.mad/Cards/run_card_default.dat @@ -107,6 +107,7 @@ # Parton level cuts definition * #******************************* 0.0 = dsqrt_shat ! minimal shat for full process + -1 = dsqrt_shatmax ! maximum shat for full process # # #********************************************************************* diff --git a/epochX/cudacpp/gg_ttg.mad/MGMEVersion.txt b/epochX/cudacpp/gg_ttg.mad/MGMEVersion.txt index 084e244cea..77a069e39b 100644 --- a/epochX/cudacpp/gg_ttg.mad/MGMEVersion.txt +++ b/epochX/cudacpp/gg_ttg.mad/MGMEVersion.txt @@ -1 +1 @@ -3.6.0 \ No newline at end of file +3.6.2 \ No newline at end of file diff --git a/epochX/cudacpp/gg_ttg.mad/Source/alfas_functions.f b/epochX/cudacpp/gg_ttg.mad/Source/alfas_functions.f index bb69a6384e..84aeff369c 100644 --- a/epochX/cudacpp/gg_ttg.mad/Source/alfas_functions.f +++ b/epochX/cudacpp/gg_ttg.mad/Source/alfas_functions.f @@ -188,6 +188,10 @@ SUBROUTINE NEWTON1(T,A_IN,A_OUT,NLOOP,NF) A_OUT=A_IN/(1D0+A_IN*B0(NF)*T) IF (NLOOP .EQ. 1) RETURN + if (1D0+A_IN*B0(NF)*T.le.0d0)THEN + A_OUT = 9d98 + RETURN + ENDIF A_OUT=A_IN/(1D0+B0(NF)*A_IN*T+C1(NF)*A_IN*LOG(1D0+A_IN*B0(NF)*T)) IF (A_OUT .LT. 0D0) AS=0.3D0 30 AS=A_OUT diff --git a/epochX/cudacpp/gg_ttg.mad/Source/cuts.inc b/epochX/cudacpp/gg_ttg.mad/Source/cuts.inc index 23d099e5f7..a8ccc7420d 100644 --- a/epochX/cudacpp/gg_ttg.mad/Source/cuts.inc +++ b/epochX/cudacpp/gg_ttg.mad/Source/cuts.inc @@ -37,7 +37,7 @@ C REAL*8 misset,missetmax,ptheavy REAL*8 ptllmin,ptllmax integer maxjetflavor - REAl*8 dsqrt_shat + REAl*8 dsqrt_shat,dsqrt_shatmax COMMON /to_min_max_cuts/ & PTJmax,PTBmax,PTAmax,PTLmax, @@ -60,7 +60,7 @@ C & ht2max,ht3max,ht4max, & htjmin,htjmax,ihtmin,ihtmax, & misset,missetmax,ptheavy, - & ptllmin,ptllmax,dsqrt_shat, + & ptllmin,ptllmax,dsqrt_shat,dsqrt_shatmax, & maxjetflavor C diff --git a/epochX/cudacpp/gg_ttg.mad/Source/make_opts b/epochX/cudacpp/gg_ttg.mad/Source/make_opts index e4b87ee6ad..f9f7b64bb5 100644 --- a/epochX/cudacpp/gg_ttg.mad/Source/make_opts +++ b/epochX/cudacpp/gg_ttg.mad/Source/make_opts @@ -5,8 +5,8 @@ GLOBAL_FLAG=-O3 -ffast-math -fbounds-check MACFLAG= MG5AMC_VERSION=SpecifiedByMG5aMCAtRunTime PYTHIA8_PATH=NotInstalled -STDLIB_FLAG= STDLIB=-lstdc++ +STDLIB_FLAG= #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 291ca907ee..f9321e7a94 100644 --- a/epochX/cudacpp/gg_ttg.mad/Source/makefile +++ b/epochX/cudacpp/gg_ttg.mad/Source/makefile @@ -73,6 +73,7 @@ $(BINDIR)gensudgrid: $(GENSUDGRID) $(LIBDIR)libpdf.$(libext) $(LIBDIR)libgammaUP # Dependencies dsample.o: DiscreteSampler.o dsample.f genps.inc StringCast.o vector.inc +pawgraph.o: vector.inc DiscreteSampler.o: StringCast.o invarients.o: invarients.f genps.inc gen_ximprove.o: gen_ximprove.f run_config.inc run_card.inc diff --git a/epochX/cudacpp/gg_ttg.mad/Source/run_card.inc b/epochX/cudacpp/gg_ttg.mad/Source/run_card.inc index 1a1bc782bd..8bd5f73840 100644 --- a/epochX/cudacpp/gg_ttg.mad/Source/run_card.inc +++ b/epochX/cudacpp/gg_ttg.mad/Source/run_card.inc @@ -88,6 +88,8 @@ DSQRT_SHAT = 0.000000000000000D+00 + DSQRT_SHATMAX = -1 + LIMHEL = 0.000000000000000D+00 PTJ = 2.000000000000000D+01 diff --git a/epochX/cudacpp/gg_ttg.mad/SubProcesses/Bridge.h b/epochX/cudacpp/gg_ttg.mad/SubProcesses/Bridge.h index 87aa648dd2..49b928db67 100644 --- a/epochX/cudacpp/gg_ttg.mad/SubProcesses/Bridge.h +++ b/epochX/cudacpp/gg_ttg.mad/SubProcesses/Bridge.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: S. Roiser (Nov 2021) for the MG5aMC CUDACPP plugin. -// Further modified by: S. Roiser, J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2021-2025) for the MG5aMC CUDACPP plugin. #ifndef BRIDGE_H #define BRIDGE_H 1 @@ -255,11 +255,15 @@ namespace mg5amcCpu throw std::logic_error( "Bridge constructor: FIXME! cannot choose gputhreads" ); // this should never happen! m_gpublocks = m_nevt / m_gputhreads; } +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Instantiate device Bridge (nevt=" << m_nevt << ", gpublocks=" << m_gpublocks << ", gputhreads=" << m_gputhreads << ", gpublocks*gputhreads=" << m_gpublocks * m_gputhreads << ")" << std::endl; +#endif m_pmek.reset( new MatrixElementKernelDevice( m_devMomentaC, m_devGs, m_devRndHel, m_devRndCol, m_devChannelIds, m_devMEs, m_devSelHel, m_devSelCol, m_gpublocks, m_gputhreads ) ); #else +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Instantiate host Bridge (nevt=" << m_nevt << ")" << std::endl; +#endif m_pmek.reset( new MatrixElementKernelHost( m_hstMomentaC, m_hstGs, m_hstRndHel, m_hstRndCol, m_hstChannelIds, m_hstMEs, m_hstSelHel, m_hstSelCol, m_nevt ) ); #endif // MGONGPUCPP_GPUIMPL // Create a process object, read param card and set parameters @@ -290,8 +294,10 @@ namespace mg5amcCpu throw std::runtime_error( "Bridge: gpublocks*gputhreads must equal m_nevt in set_gpugrid" ); m_gpublocks = gpublocks; m_gputhreads = gputhreads; +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Set grid in Bridge (nevt=" << m_nevt << ", gpublocks=" << m_gpublocks << ", gputhreads=" << m_gputhreads << ", gpublocks*gputhreads=" << m_gpublocks * m_gputhreads << ")" << std::endl; +#endif m_pmek->setGrid( m_gpublocks, m_gputhreads ); } #endif @@ -347,7 +353,9 @@ namespace mg5amcCpu if( goodHelOnly ) return; m_pmek->computeMatrixElements( useChannelIds ); copyHostFromDevice( m_hstMEs, m_devMEs ); +#ifdef MGONGPUCPP_VERBOSE flagAbnormalMEs( m_hstMEs.data(), m_nevt ); +#endif copyHostFromDevice( m_hstSelHel, m_devSelHel ); copyHostFromDevice( m_hstSelCol, m_devSelCol ); if constexpr( std::is_same_v ) @@ -400,7 +408,9 @@ namespace mg5amcCpu } if( goodHelOnly ) return; m_pmek->computeMatrixElements( useChannelIds ); +#ifdef MGONGPUCPP_VERBOSE flagAbnormalMEs( m_hstMEs.data(), m_nevt ); +#endif if constexpr( std::is_same_v ) { memcpy( mes, m_hstMEs.data(), m_hstMEs.bytes() ); diff --git a/epochX/cudacpp/gg_ttg.mad/SubProcesses/GpuRuntime.h b/epochX/cudacpp/gg_ttg.mad/SubProcesses/GpuRuntime.h index 860c7fde16..6a4b946e74 100644 --- a/epochX/cudacpp/gg_ttg.mad/SubProcesses/GpuRuntime.h +++ b/epochX/cudacpp/gg_ttg.mad/SubProcesses/GpuRuntime.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: J. Teig (Jun 2023, based on earlier work by S. Roiser) for the MG5aMC CUDACPP plugin. -// Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2025) for the MG5aMC CUDACPP plugin. #ifndef MG5AMC_GPURUNTIME_H #define MG5AMC_GPURUNTIME_H 1 @@ -50,7 +50,7 @@ namespace mg5amcGpu // Set up CUDA application // ** NB: strictly speaking this is not needed when using the CUDA runtime API ** // Calling cudaSetDevice on startup is useful to properly book-keep the time spent in CUDA initialization - static void setUp( const bool debug = true ) + static void setUp( const bool debug = false ) // ZW: changed debug default to false { // ** NB: it is useful to call cudaSetDevice, or cudaFree, to properly book-keep the time spent in CUDA initialization // ** NB: otherwise, the first CUDA operation (eg a cudaMemcpyToSymbol in CPPProcess ctor) appears to take much longer! @@ -71,7 +71,7 @@ namespace mg5amcGpu // ** NB: strictly speaking this is not needed when using the CUDA runtime API ** // Calling cudaDeviceReset on shutdown is only needed for checking memory leaks in cuda-memcheck // See https://docs.nvidia.com/cuda/cuda-memcheck/index.html#leak-checking - static void tearDown( const bool debug = true ) + static void tearDown( const bool debug = false ) // ZW: changed debug default to false { if( debug ) std::cout << "__GpuRuntime: calling GpuDeviceReset()" << std::endl; checkGpu( gpuDeviceReset() ); diff --git a/epochX/cudacpp/gg_ttg.mad/SubProcesses/MGVersion.txt b/epochX/cudacpp/gg_ttg.mad/SubProcesses/MGVersion.txt index 084e244cea..77a069e39b 100644 --- a/epochX/cudacpp/gg_ttg.mad/SubProcesses/MGVersion.txt +++ b/epochX/cudacpp/gg_ttg.mad/SubProcesses/MGVersion.txt @@ -1 +1 @@ -3.6.0 \ No newline at end of file +3.6.2 \ No newline at end of file diff --git a/epochX/cudacpp/gg_ttg.mad/SubProcesses/MatrixElementKernels.cc b/epochX/cudacpp/gg_ttg.mad/SubProcesses/MatrixElementKernels.cc index f463977c1a..703ea3781c 100644 --- a/epochX/cudacpp/gg_ttg.mad/SubProcesses/MatrixElementKernels.cc +++ b/epochX/cudacpp/gg_ttg.mad/SubProcesses/MatrixElementKernels.cc @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: A. Valassi (Jan 2022) for the MG5aMC CUDACPP plugin. -// Further modified by: J. Teig, A. Valassi (2022-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: J. Teig, A. Valassi, Z. Wettersten (2022-2025) for the MG5aMC CUDACPP plugin. #include "MatrixElementKernels.h" @@ -60,7 +60,9 @@ namespace mg5amcCpu #ifdef MGONGPU_CHANNELID_DEBUG MatrixElementKernelBase::dumpNevtProcessedByChannel(); #endif +#ifdef MGONGPUCPP_VERBOSE MatrixElementKernelBase::dumpSignallingFPEs(); +#endif } //-------------------------------------------------------------------------- diff --git a/epochX/cudacpp/gg_ttg.mad/SubProcesses/MatrixElementKernels.h b/epochX/cudacpp/gg_ttg.mad/SubProcesses/MatrixElementKernels.h index 7acff4b308..8da04d7945 100644 --- a/epochX/cudacpp/gg_ttg.mad/SubProcesses/MatrixElementKernels.h +++ b/epochX/cudacpp/gg_ttg.mad/SubProcesses/MatrixElementKernels.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: A. Valassi (Jan 2022) for the MG5aMC CUDACPP plugin. -// Further modified by: J. Teig, A. Valassi (2022-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: J. Teig, A. Valassi, Z. Wettersten (2022-2025) for the MG5aMC CUDACPP plugin. #ifndef MATRIXELEMENTKERNELS_H #define MATRIXELEMENTKERNELS_H 1 @@ -134,7 +134,7 @@ namespace mg5amcCpu // Does this host system support the SIMD used in the matrix element calculation? // [NB: this is private, SIMD vectorization in mg5amc C++ code is currently only used in the ME calculations below MatrixElementKernelHost!] - static bool hostSupportsSIMD( const bool verbose = true ); + static bool hostSupportsSIMD( const bool verbose = false ); // ZW: default verbose false private: diff --git a/epochX/cudacpp/gg_ttg.mad/SubProcesses/MemoryAccessGs.h b/epochX/cudacpp/gg_ttg.mad/SubProcesses/MemoryAccessGs.h index 63c17a68fa..50a6aaef4d 100644 --- a/epochX/cudacpp/gg_ttg.mad/SubProcesses/MemoryAccessGs.h +++ b/epochX/cudacpp/gg_ttg.mad/SubProcesses/MemoryAccessGs.h @@ -128,6 +128,14 @@ namespace mg5amcCpu #endif } + // Locate a field (output) in a memory buffer (input) from a kernel event-indexing mechanism (internal) + // [Signature (SCALAR OR VECTOR) ===> fptype_sv* kernelAccess( fptype* buffer ) <===] + static __host__ __device__ inline fptype_sv* + kernelAccessP( fptype* buffer ) + { + return reinterpret_cast( buffer ); + } + // Locate a field (output) in a memory buffer (input) from a kernel event-indexing mechanism (internal) and the given field indexes (input) // [Signature (const, SCALAR) ===> const fptype& kernelAccessConst( const fptype* buffer ) <===] static constexpr auto kernelAccessConst_s = diff --git a/epochX/cudacpp/gg_ttg.mad/SubProcesses/MemoryBuffers.h b/epochX/cudacpp/gg_ttg.mad/SubProcesses/MemoryBuffers.h index 65a101888d..17ba7a89e5 100644 --- a/epochX/cudacpp/gg_ttg.mad/SubProcesses/MemoryBuffers.h +++ b/epochX/cudacpp/gg_ttg.mad/SubProcesses/MemoryBuffers.h @@ -13,6 +13,7 @@ #include "CPPProcess.h" #include "GpuRuntime.h" #include "Parameters_sm.h" +#include "processConfig.h" #include @@ -274,7 +275,8 @@ namespace mg5amcCpu typedef BufferBase BufferNumerators; // The size (number of elements) per event in a memory buffer for numerators - constexpr size_t sizePerEventNumerators = 1; + // (should be equal to the number of diagrams in the process) + constexpr size_t sizePerEventNumerators = processConfig::ndiagrams; #ifndef MGONGPUCPP_GPUIMPL // A class encapsulating a C++ host buffer for gs 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 5de1c626c8..cd559e5714 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 @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -25,6 +25,7 @@ #include "MemoryAccessMatrixElements.h" #include "MemoryAccessMomenta.h" #include "MemoryAccessWavefunctions.h" +#include "processConfig.h" #ifdef MGONGPU_SUPPORTS_MULTICHANNEL #include "MemoryAccessDenominators.h" @@ -96,6 +97,69 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { +#ifdef MGONGPU_SUPPORTS_MULTICHANNEL + __device__ INLINE unsigned int getChannelId( const unsigned int* allChannelIds +#ifndef MGONGPUCPP_GPUIMPL + , + const int ievt00, + bool sanityCheckMixedPrecision = true +#endif + ) + { + unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr +#ifdef MGONGPUCPP_GPUIMPL + using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page + if( allChannelIds != nullptr ) + { + const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) + const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) + // NB: channelIds_sv is a scalar in CUDA + channelId = channelIds_sv; + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + } +#else // Cuda or C++ + using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + if( allChannelIds != nullptr ) + { + // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) + const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 + uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) +#ifndef MGONGPU_CPPSIMD + // NB: channelIds_sv is a scalar in no-SIMD C++ + channelId = channelIds_sv; +#else + // NB: channelIds_sv is a vector in SIMD C++ + channelId = channelIds_sv[0]; // element[0] + for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] + { + assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId + } +#endif + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + if( sanityCheckMixedPrecision ) + { +#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT + // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) + const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 + uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + for( int i = 0; i < neppV; ++i ) + { + assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector + } +#endif + } + } +#endif // MGONGPUCPP_GPUIMPL + return channelId; + } +#endif // MGONGPU_SUPPORTS_MULTICHANNEL + constexpr int nw6 = CPPProcess::nw6; // dimensions of each wavefunction (HELAS KEK 91-11): e.g. 6 for e+ e- -> mu+ mu- (fermions and vectors) constexpr int npar = CPPProcess::npar; // #particles in total (external = initial + final): e.g. 4 for e+ e- -> mu+ mu- constexpr int ncomb = CPPProcess::ncomb; // #helicity combinations: e.g. 16 for e+ e- -> mu+ mu- (2**4 = fermion spin up/down ** npar) @@ -305,7 +369,7 @@ namespace mg5amcCpu COUPs[ndcoup + iicoup] = allCOUPs[ndcoup + iicoup]; // independent couplings, fixed for all events fptype* MEs = E_ACCESS::ieventAccessRecord( allMEs, ievt0 ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); #endif #endif @@ -315,7 +379,7 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Numerators and denominators for the current event (CUDA) or SIMD event page (C++) - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); #endif @@ -338,8 +402,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1 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] ); + if( channelId != 0 ) + { + numerators_sv[0] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= amp_sv[0]; jamp_sv[2] += amp_sv[0]; @@ -354,8 +421,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 2 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] ); + if( channelId != 0 ) + { + numerators_sv[1] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[5] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -368,8 +438,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 3 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] ); + if( channelId != 0 ) + { + numerators_sv[2] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[2] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -383,8 +456,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 4 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] ); + if( channelId != 0 ) + { + numerators_sv[3] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] -= amp_sv[0]; @@ -396,8 +472,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 5 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] ); + if( channelId != 0 ) + { + numerators_sv[4] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[1] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -410,8 +489,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 6 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] ); + if( channelId != 0 ) + { + numerators_sv[5] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= amp_sv[0]; @@ -424,8 +506,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 7 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] ); + if( channelId != 0 ) + { + numerators_sv[6] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[3] -= amp_sv[0]; @@ -437,8 +522,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 8 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] ); + if( channelId != 0 ) + { + numerators_sv[7] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[3] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[5] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -451,8 +539,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 9 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] ); + if( channelId != 0 ) + { + numerators_sv[8] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[5] -= amp_sv[0]; @@ -464,8 +555,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 10 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] ); + if( channelId != 0 ) + { + numerators_sv[9] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[3] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -478,8 +572,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 11 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] ); + if( channelId != 0 ) + { + numerators_sv[10] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[4] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -492,8 +589,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 12 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] ); + if( channelId != 0 ) + { + numerators_sv[11] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += amp_sv[0]; jamp_sv[2] -= amp_sv[0]; @@ -508,8 +608,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 13 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] ); + if( channelId != 0 ) + { + numerators_sv[12] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] -= amp_sv[0]; @@ -521,8 +624,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 14 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] ); + if( channelId != 0 ) + { + numerators_sv[13] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] -= amp_sv[0]; @@ -534,8 +640,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 15 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] ); + if( channelId != 0 ) + { + numerators_sv[14] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += amp_sv[0]; jamp_sv[1] -= amp_sv[0]; @@ -774,7 +883,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- @@ -1144,9 +1255,6 @@ namespace mg5amcCpu #ifdef MGONGPUCPP_GPUIMPL // Remember: in CUDA this is a kernel for one event, in c++ this processes n events const int ievt = blockDim.x * blockIdx.x + threadIdx.x; // index of event (thread) in grid -#ifdef MGONGPU_SUPPORTS_MULTICHANNEL - using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events -#endif #else //assert( (size_t)(allmomenta) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] //assert( (size_t)(allMEs) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] @@ -1154,7 +1262,6 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL using NUM_ACCESS = HostAccessNumerators; // non-trivial access: buffer includes all events using DEN_ACCESS = HostAccessDenominators; // non-trivial access: buffer includes all events - using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events #endif #endif @@ -1179,11 +1286,12 @@ namespace mg5amcCpu fptype_sv& MEs_sv = E_ACCESS::kernelAccess( MEs ); MEs_sv = fptype_sv{ 0 }; #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - numerators_sv = fptype_sv{ 0 }; + for( int i = 0; i < processConfig::ndiagrams; ++i ) + numerators_sv[i] = fptype_sv{ 0 }; denominators_sv = fptype_sv{ 0 }; #endif } @@ -1196,17 +1304,7 @@ namespace mg5amcCpu // *** START OF PART 1a - CUDA (one event per GPU thread) *** #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) - const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) - // NB: channelIds_sv is a scalar in CUDA - channelId = channelIds_sv; - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) - } + unsigned int channelId = getChannelId( allChannelIds ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (for the single event processed in calculate_wavefunctions) @@ -1321,38 +1419,7 @@ namespace mg5amcCpu const int ievt00 = ipagV2 * neppV; // loop on one SIMD page (neppV events) at a time #endif #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) - const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 - uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) -#ifndef MGONGPU_CPPSIMD - // NB: channelIds_sv is a scalar in no-SIMD C++ - channelId = channelIds_sv; -#else - // NB: channelIds_sv is a vector in SIMD C++ - channelId = channelIds_sv[0]; // element[0] - for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] - { - assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId - } -#endif - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) -#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT - // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) - const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 - uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - for( int i = 0; i < neppV; ++i ) - { - assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector - } -#endif - } + unsigned int channelId = getChannelId( allChannelIds, ievt00 ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (jamp2[nParity][ncolor][neppV] for the SIMD vector - or the two SIMD vectors - of events processed in calculate_wavefunctions) @@ -1525,11 +1592,12 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( allChannelIds != nullptr ) // fix segfault #892 (not 'channelIds[0] != 0') { - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + const unsigned int channelId = getChannelId( allChannelIds, ievt0, false ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - MEs_sv *= numerators_sv / denominators_sv; + MEs_sv *= numerators_sv[channelId - 1] / denominators_sv; } #endif //for( int ieppV = 0; ieppV < neppV; ieppV++ ) diff --git a/epochX/cudacpp/gg_ttg.mad/SubProcesses/P1_gg_ttxg/CPPProcess.h b/epochX/cudacpp/gg_ttg.mad/SubProcesses/P1_gg_ttxg/CPPProcess.h index 2acfa000a7..f052d1a725 100644 --- a/epochX/cudacpp/gg_ttg.mad/SubProcesses/P1_gg_ttxg/CPPProcess.h +++ b/epochX/cudacpp/gg_ttg.mad/SubProcesses/P1_gg_ttxg/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_ttg.mad/SubProcesses/P1_gg_ttxg/auto_dsig.f b/epochX/cudacpp/gg_ttg.mad/SubProcesses/P1_gg_ttxg/auto_dsig.f index 10496aa04d..b25c70108f 100644 --- a/epochX/cudacpp/gg_ttg.mad/SubProcesses/P1_gg_ttxg/auto_dsig.f +++ b/epochX/cudacpp/gg_ttg.mad/SubProcesses/P1_gg_ttxg/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C 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 7c8695090c..ef24864bf5 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 @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -137,14 +137,14 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDDO QSCALE=QSCALE/2D0 ELSE - QSCALE=DSQRT(Q2FACT(IB(1))) + QSCALE=DSQRT(Q2FACT(1)) ENDIF G1=PDG2PDF(LPP(IB(1)),0, IB(1),XBK(IB(1)), QSCALE) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) IF (DSQRT(Q2FACT(IB(2))).NE.0D0) THEN - QSCALE=DSQRT(Q2FACT(IB(2))) + QSCALE=DSQRT(Q2FACT(2)) ENDIF G2=PDG2PDF(LPP(IB(2)),0, IB(2),XBK(IB(2)), QSCALE) ENDIF @@ -219,7 +219,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -290,6 +290,10 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, INTEGER I_EE C +C STUFF FOR UPC +C + DOUBLE PRECISION PHOTONPDFSQUARE +C C EXTERNAL FUNCTIONS C LOGICAL PASSCUTS @@ -373,12 +377,12 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, IF (ABS(LPP(IB(1))).GE.1) THEN C LP=SIGN(1,LPP(IB(1))) G1(IVEC)=PDG2PDF(LPP(IB(1)),0, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) G2(IVEC)=PDG2PDF(LPP(IB(2)),0, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) ENDIF ENDDO ! IWARP LOOP ENDDO ! CURRWARP LOOP diff --git a/epochX/cudacpp/gg_ttg.mad/SubProcesses/P1_gg_ttxg/card.png b/epochX/cudacpp/gg_ttg.mad/SubProcesses/P1_gg_ttxg/card.png new file mode 100644 index 0000000000..004a8b90c6 Binary files /dev/null and b/epochX/cudacpp/gg_ttg.mad/SubProcesses/P1_gg_ttxg/card.png differ 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 797b19405d..c0a032fb9f 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 @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -323,7 +323,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -366,7 +366,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C INTEGER I,J,M,N COMPLEX*16 ZTEMP, TMP_JAMP(9) - REAL*8 CF(NCOLOR,NCOLOR) + INTEGER CF(NCOLOR*(NCOLOR+1)/2) + INTEGER DENOM, CF_INDEX COMPLEX*16 AMP(NGRAPHS), JAMP(NCOLOR,NAMPSO) COMPLEX*16 W(6,NWAVEFUNCS) C Needed for v4 models @@ -409,33 +410,18 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C C COLOR DATA C - DATA (CF(I, 1),I= 1, 6) /7.111111111111111D+00, - $ -8.888888888888888D-01,-8.888888888888888D-01 - $ ,1.111111111111111D-01,1.111111111111111D-01,1.111111111111111D - $ +00/ + DATA DENOM/9/ + DATA (CF(I),I= 1, 6) /64,-16,-16,2,2,20/ C 1 T(1,2,5,3,4) - DATA (CF(I, 2),I= 1, 6) /-8.888888888888888D-01 - $ ,7.111111111111111D+00,1.111111111111111D-01,1.111111111111111D - $ +00,-8.888888888888888D-01,1.111111111111111D-01/ + DATA (CF(I),I= 7, 11) /64,2,20,-16,2/ C 1 T(1,5,2,3,4) - DATA (CF(I, 3),I= 1, 6) /-8.888888888888888D-01 - $ ,1.111111111111111D-01,7.111111111111111D+00, - $ -8.888888888888888D-01,1.111111111111111D+00,1.111111111111111D - $ -01/ + DATA (CF(I),I= 12, 15) /64,-16,20,2/ C 1 T(2,1,5,3,4) - DATA (CF(I, 4),I= 1, 6) /1.111111111111111D-01 - $ ,1.111111111111111D+00,-8.888888888888888D-01 - $ ,7.111111111111111D+00,1.111111111111111D-01, - $ -8.888888888888888D-01/ + DATA (CF(I),I= 16, 18) /64,2,-16/ C 1 T(2,5,1,3,4) - DATA (CF(I, 5),I= 1, 6) /1.111111111111111D-01, - $ -8.888888888888888D-01,1.111111111111111D+00,1.111111111111111D - $ -01,7.111111111111111D+00,-8.888888888888888D-01/ + DATA (CF(I),I= 19, 20) /64,-16/ C 1 T(5,1,2,3,4) - DATA (CF(I, 6),I= 1, 6) /1.111111111111111D+00 - $ ,1.111111111111111D-01,1.111111111111111D-01, - $ -8.888888888888888D-01,-8.888888888888888D-01 - $ ,7.111111111111111D+00/ + DATA (CF(I),I= 21, 21) /64/ C 1 T(5,2,1,3,4) C ---------- C BEGIN CODE @@ -549,10 +535,12 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) MATRIX1 = 0.D0 DO M = 1, NAMPSO + CF_INDEX = 0 DO I = 1, NCOLOR ZTEMP = (0.D0,0.D0) - DO J = 1, NCOLOR - ZTEMP = ZTEMP + CF(J,I)*JAMP(J,M) + DO J = I, NCOLOR + CF_INDEX = CF_INDEX + 1 + ZTEMP = ZTEMP + CF(CF_INDEX)*JAMP(J,M) ENDDO DO N = 1, NAMPSO @@ -561,6 +549,7 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) ENDDO ENDDO ENDDO + MATRIX1 = MATRIX1/DENOM IF(SDE_STRAT.EQ.1)THEN AMP2(1)=AMP2(1)+AMP(1)*DCONJG(AMP(1)) diff --git a/epochX/cudacpp/gg_ttg.mad/SubProcesses/P1_gg_ttxg/matrix11.png b/epochX/cudacpp/gg_ttg.mad/SubProcesses/P1_gg_ttxg/matrix11.png new file mode 100644 index 0000000000..1d8168c79a Binary files /dev/null and b/epochX/cudacpp/gg_ttg.mad/SubProcesses/P1_gg_ttxg/matrix11.png differ diff --git a/epochX/cudacpp/gg_ttg.mad/SubProcesses/P1_gg_ttxg/matrix12.png b/epochX/cudacpp/gg_ttg.mad/SubProcesses/P1_gg_ttxg/matrix12.png new file mode 100644 index 0000000000..b912383fa4 Binary files /dev/null and b/epochX/cudacpp/gg_ttg.mad/SubProcesses/P1_gg_ttxg/matrix12.png differ diff --git a/epochX/cudacpp/gg_ttg.mad/SubProcesses/P1_gg_ttxg/processConfig.h b/epochX/cudacpp/gg_ttg.mad/SubProcesses/P1_gg_ttxg/processConfig.h new file mode 100644 index 0000000000..47044dbe6a --- /dev/null +++ b/epochX/cudacpp/gg_ttg.mad/SubProcesses/P1_gg_ttxg/processConfig.h @@ -0,0 +1,16 @@ +// Copyright (C) 2025 CERN and UCLouvain. +// Licensed under the GNU Lesser General Public License (version 3 or later). +// Created by: S. Roiser (May 2025) for the MG5aMC CUDACPP plugin. +// Further modified by: ... for the MG5aMC CUDACPP plugin. + + +#ifndef MG5_CONFIG_SIGMA_SM_GG_TTXG_H +#define MG5_CONFIG_SIGMA_SM_GG_TTXG_H 1 + +namespace processConfig { + + constexpr int ndiagrams = 16; + +} + +#endif // MG5_CONFIG_SIGMA_SM_GG_TTXG_H \ No newline at end of file diff --git a/epochX/cudacpp/gg_ttg.mad/SubProcesses/cuts.f b/epochX/cudacpp/gg_ttg.mad/SubProcesses/cuts.f index 7898714201..bd50ab1357 100644 --- a/epochX/cudacpp/gg_ttg.mad/SubProcesses/cuts.f +++ b/epochX/cudacpp/gg_ttg.mad/SubProcesses/cuts.f @@ -307,12 +307,18 @@ LOGICAL FUNCTION PASSCUTS(P, VECSIZE_USED) c c Limit S_hat c - if (dsqrt_shat.ne.0d0)then - if (nincoming.eq.2.and.sumdot(p(0,1),p(0,2),1d0) .lt. dsqrt_shat**2) then - passcuts=.false. - return - endif - endif + if(nincoming.eq.2) then + if (dsqrt_shat.ne.0d0.or.dsqrt_shatmax.ne.-1d0)then + xvar = sumdot(p(0,1),p(0,2),1d0) + if (xvar .lt. dsqrt_shat**2)then + passcuts=.false. + return + else if (dsqrt_shatmax.ne.-1d0 .and. xvar .gt. dsqrt_shatmax**2)then + passcuts = .false. + return + endif + endif + endif C $B$ DESACTIVATE_CUT $E$ !This is a tag for MadWeight if(debug) write (*,*) '=============================' diff --git a/epochX/cudacpp/gg_ttg.mad/SubProcesses/genps.f b/epochX/cudacpp/gg_ttg.mad/SubProcesses/genps.f index 1c32e93f5d..8503bdbec8 100644 --- a/epochX/cudacpp/gg_ttg.mad/SubProcesses/genps.f +++ b/epochX/cudacpp/gg_ttg.mad/SubProcesses/genps.f @@ -1373,6 +1373,10 @@ subroutine gen_s(x,smin,smax,spole,swidth,s,jac,pass) double precision smin,smax,spole,swidth,s,jac double precision x logical pass + include 'maxparticles.inc' + include '../../Source/vector.inc' + include 'run.inc' + include 'cuts.inc' c c Local c @@ -1384,6 +1388,10 @@ subroutine gen_s(x,smin,smax,spole,swidth,s,jac,pass) c----- c Begin Code c----- + if (dsqrt_shatmax.ne.-1d0)then + smax = min(smax, dsqrt_shatmax**2) + endif + pass=.true. if (jac .eq. 0 .and. .not. warned0) then print*,'Input jacobian 0 in genps' @@ -1628,7 +1636,10 @@ SUBROUTINE GENCMS(S,X1,X2,X,SMIN,SJACOBI) DOUBLE PRECISION ETA,ETAMIN,ETAMAX logical warned data warned/.false./ - + include 'maxparticles.inc' + include '../../Source/vector.inc' + include 'run.inc' + include 'cuts.inc' C------------ C BEGIN CODE C------------ @@ -1645,7 +1656,11 @@ SUBROUTINE GENCMS(S,X1,X2,X,SMIN,SJACOBI) C IF THERE IS NO S CHANNEL POLE USE BELOW: TAUMIN = 0d0 !SMIN/S !keep scale fix - TAUMAX = 1D0 + if (dsqrt_shatmax.ne.-1d0)then + TAUMAX=dsqrt_shatmax**2/S + else + TAUMAX = 1D0 + endif TAU = (TAUMAX-TAUMIN)*X(1)+TAUMIN SJACOBI= sjacobi*(TAUMAX-TAUMIN) @@ -1915,7 +1930,7 @@ double precision function get_channel_cut(p, config) if(sde_strat.eq.2)then t = dot(ptemp(0,-i), ptemp(0,-i)) Mass = prmass(-i, config) - get_channel_cut = get_channel_cut / ((t-Mass)*(t+Mass)+stot*1d-10)**2 + get_channel_cut = get_channel_cut / (t-Mass**2+stot*1d-10)**2 endif c write(*,*) i, "t, Mass, fact", t, Mass, ((t-Mass)*(t+Mass))**2,get_channel_cut t = t/stot @@ -1930,9 +1945,9 @@ double precision function get_channel_cut(p, config) t = dot(ptemp(0,-i), ptemp(0,-i)) Mass = prmass(-i, config) Width = prwidth(-i, config) - tmp = (t-Mass)*(t+Mass) + tmp = (t-Mass**2) tmp2 = Mass*Width - get_channel_cut = get_channel_cut* (tmp**2 - tmp2**2)/(tmp**2 + tmp2**2)**2 + get_channel_cut = get_channel_cut/(tmp**2 + tmp2**2) endif c write(*,*) i, "s, Mass, Width, fact", t, Mass, Width, (((t-Mass)*(t+Mass) )**2 + Width**2*Mass**2), get_channel_cut endif diff --git a/epochX/cudacpp/gg_ttg.mad/SubProcesses/myamp.f b/epochX/cudacpp/gg_ttg.mad/SubProcesses/myamp.f index 9e5f8d44dd..5360566ef4 100644 --- a/epochX/cudacpp/gg_ttg.mad/SubProcesses/myamp.f +++ b/epochX/cudacpp/gg_ttg.mad/SubProcesses/myamp.f @@ -231,6 +231,7 @@ subroutine set_peaks double precision x1,x2,xk(nexternal) double precision dr,mtot,etot,xqfact double precision spmass + double precision stot ! technically the min with dsqrt_shatmax**2 with the physical one integer i, iconfig, l1, l2, j, nt, nbw, iproc, k integer iden_part(-nexternal+1:nexternal) @@ -285,8 +286,8 @@ subroutine set_peaks integer lbw(0:nexternal) !Use of B.W. common /to_BW/ lbw - double precision stot,m1,m2 - common/to_stot/stot,m1,m2 + double precision real_stot,m1,m2 + common/to_stot/real_stot,m1,m2 include 'coupl.inc' ! needs VECSIZE_MEMMAX (defined in vector.inc) include 'cuts.inc' @@ -309,6 +310,12 @@ subroutine set_peaks c----- c Begin Code c----- + if (dsqrt_shatmax.ne.-1)then + stot = min(real_stot, dsqrt_shatmax**2) + else + stot = real_stot + endif + iconfig = this_config c needs to be initialise to avoid segfault do i = -nexternal,-1 diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/Gridpack/gridrun b/epochX/cudacpp/gg_ttg.mad/bin/internal/Gridpack/gridrun index 8c8f7d3940..01d4ab53f5 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/Gridpack/gridrun +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/Gridpack/gridrun @@ -91,7 +91,7 @@ import internal.madevent_interface as cmd_interface try: - cmd_line = cmd_interface.GridPackCmd(me_dir=root_path, nb_event=args[0], seed=args[1], gran=args[2]) + cmd_line = cmd_interface.GridPackCmd(me_dir=root_path, nb_event=args[0], seed=args[1], gran=args[2], nprocs=args[3], maxevts=args[4]) except KeyboardInterrupt: print('Quit on KeyboardInterrupt') diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/Gridpack/run.sh b/epochX/cudacpp/gg_ttg.mad/bin/internal/Gridpack/run.sh index 20adf572c2..2d149f96be 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/Gridpack/run.sh +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/Gridpack/run.sh @@ -14,6 +14,18 @@ # USAGE : run [num_events] [iseed] ## ############################################################################# +function usage() { + local retcode="${1:-1}" # default return code is 1 + echo "Usage:" + echo " run.sh [options] [num events] [seed]" + echo " run.sh [options] [num events] [seed] [granularity]" + echo "Options:" + echo " -h, --help print this message and exit" + echo " -p, --parallel [num procs] number of processes to run in parallel" + echo " -m, --maxevts [num events] maximum number of unweighted events per job" + exit $retcode +} + if [[ -d ./madevent ]]; then DIR='./madevent' else @@ -32,23 +44,46 @@ export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${PWD}/madevent/lib:${PWD}/HELAS/lib # For Mac OS X export DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:${PWD}/madevent/lib:${PWD}/HELAS/lib +pos_args=() +nprocs=1 +maxevts=2500 -if [[ ($1 != "") && ("$2" != "") && ("$3" == "") ]]; then - num_events=$1 - seed=$2 - gran=1 -elif [[ ($1 != "") && ("$2" != "") && ("$3" != "") ]]; then - num_events=$1 - seed=$2 - gran=$3 -else - echo "Warning: input is not correct. script requires two arguments: NB_EVENT SEED" -fi +while [[ $# -gt 0 ]]; do + case $1 in + -h|--help) + usage 0 ;; + -p|--parallel) + nprocs="$2" && shift && shift ;; + -m|--maxevts) + maxevts="$2" && shift && shift ;; + -*) + echo "Error: Unknown option $1" && usage ;; + *) + pos_args+=("$1") && shift ;; + esac +done + +case `echo "${pos_args[@]}" | wc -w | tr -d " "` in + "2") + num_events=${pos_args[0]} + seed=${pos_args[1]} + gran=1 + ;; + "3") + num_events=${pos_args[0]} + seed=${pos_args[1]} + gran=${pos_args[2]} + ;; + *) + echo "Error: number of arguments is not correct" + usage + ;; +esac -echo "Now generating $num_events events with random seed $seed and granularity $gran" +echo "Now generating $num_events events with random seed $seed and granularity $gran using $nprocs processes" ############ RUN THE PYTHON CODE ##################### -${DIR}/bin/gridrun $num_events $seed $gran +${DIR}/bin/gridrun $num_events $seed $gran $nprocs $maxevts ######################################################## ########### POSTPROCESSING ##################### diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/banner.py b/epochX/cudacpp/gg_ttg.mad/bin/internal/banner.py index 42d82818d0..022861fc31 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/banner.py +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/banner.py @@ -353,7 +353,7 @@ def modify_init_cross(self, cross, allow_zero=False): assert "init" in self cross = dict(cross) - for key in cross.keys(): + for key in list(cross.keys()): if isinstance(key, str) and key.isdigit() and int(key) not in cross: cross[int(key)] = cross[key] @@ -3318,7 +3318,6 @@ def retro_compatible_custom_fct(lines, mode=None): for i,line in enumerate(lines[:]): if search and re.search(include_pat, line): name = re.findall(include_pat, line)[0] - misc.sprint('DETECTED INCLUDE', name) if 'vector.inc' in name: search = False if 'run.inc' in name: @@ -3326,7 +3325,6 @@ def retro_compatible_custom_fct(lines, mode=None): search = False sol.append(line) if re.search(function_pat, line): - misc.sprint("DETECTED FCT") search = True return sol @@ -4201,6 +4199,7 @@ def default_setup(self): self.add_param("bwcutoff", 15.0) self.add_param("cut_decays", False, cut='d') self.add_param('dsqrt_shat',0., cut=True) + self.add_param('dsqrt_shatmax', -1, cut=True) self.add_param("nhel", 0, include=False) self.add_param("limhel", 1e-8, hidden=True, comment="threshold to determine if an helicity contributes when not MC over helicity.") #pt cut @@ -5577,6 +5576,9 @@ def default_setup(self): #technical self.add_param('folding', [1,1,1], include=False) + + #bias + self.add_param('flavour_bias',[5,1], hidden=True, comment="Example: '5,100' means that the probability to generate an event with a bottom (or anti-bottom) quark is increased by a factor 100, but the weight of those events is reduced by a factor 100. Requires that the 'event_norm' is set to 'bias'.") #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]") @@ -5790,6 +5792,17 @@ def check_validity(self): if self['mcatnlo_delta'] and not self['parton_shower'].lower() == 'pythia8': raise InvalidRunCard("MC@NLO-DELTA only possible with matching to Pythia8") + # check that the flavour_bias is consistent + if len(self['flavour_bias']) != 2: + raise InvalidRunCard("'flavour_bias' should contain exactly two numbers: the abs(PDG) of the flavour to enhance, and the enhancement multiplication factor.") + for i in self['flavour_bias']: + if i < 0: + raise InvalidRunCard("flavour and multiplication factor should be positive in the flavour_bias parameter") + if self['flavour_bias'][1] != 1 and self['event_norm'] != 'bias': + logger.warning('Non-trivial flavour enhancement factor: setting event normalisation to "bias"') + self['event_norm']='bias' + + # check that ebeam is bigger than the proton mass. for i in [1,2]: # do not for proton mass if not proton PDF (or when scan initialization) 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 bc785b5de6..a34705f6bc 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 @@ -1092,11 +1092,11 @@ def write_summary(self, path, order=None, lastline=False, nbcol=20): to_print = self.cross[-1:] for info in to_print: name = info['run_name'] - bench = info['bench'] + bench = [float(x) for x in info['bench']] data = [] for k in keys: if k in info: - data.append(info[k]) + data.append(float(info[k])) else: data.append(0.) ff.write(formatting % tuple([name] + bench + data)) 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 9ff7390cf5..541cd6294b 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 @@ -750,8 +750,8 @@ def __init__(self, me_dir, options, *args, **opts): else: self.ninitial = self.proc_characteristics['ninitial'] - def make_make_all_html_results(self, folder_names = [], jobs=[]): - return sum_html.make_all_html_results(self, folder_names, jobs) + def make_make_all_html_results(self, folder_names = [], jobs=[], get_attr=None): + return sum_html.make_all_html_results(self, folder_names, jobs, get_attr) def write_RunWeb(self, me_dir): @@ -3831,7 +3831,7 @@ def store_scan_result(self): """return the information that need to be kept for the scan summary. Auto-width are automatically added.""" - return {'cross': self.results.current['cross']} + return {'cross': self.results.current['cross'], 'error': self.results.current['error']} def add_error_log_in_html(self, errortype=None): @@ -5135,10 +5135,10 @@ def init_run(self, cards): self.special_shortcut.update( {'ebeam':([float],['run_card ebeam1 %(0)s', 'run_card ebeam2 %(0)s']), 'lpp': ([int],['run_card lpp1 %(0)s', 'run_card lpp2 %(0)s' ]), - 'lhc': ([int],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), + 'lhc': ([float],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), 'lep': ([int],['run_card lpp1 0', 'run_card lpp2 0', 'run_card ebeam1 %(0)s/2', 'run_card ebeam2 %(0)s/2']), 'ilc': ([int],['run_card lpp1 0', 'run_card lpp2 0', 'run_card ebeam1 %(0)s/2', 'run_card ebeam2 %(0)s/2']), - 'lcc': ([int],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), + 'lcc': ([float],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), 'fixed_scale': ([float],['run_card fixed_fac_scale T', 'run_card fixed_ren_scale T', 'run_card scale %(0)s', 'run_card dsqrt_q2fact1 %(0)s' ,'run_card dsqrt_q2fact2 %(0)s']), 'no_parton_cut':([],['run_card nocut T']), 'cm_velocity':([float], [lambda self :self.set_CM_velocity]), @@ -6740,7 +6740,15 @@ def postcmd(self, stop, line): return ending_question - + def help_update(self): + logger.info(""" syntax: update dependent: Change the mass/width of particles which are not free parameter for the model. + update missing: add to the current param_card missing blocks/parameters. + update to_slha1: pass SLHA2 card to SLHA1 convention. (beta) + update to_slha2: pass SLHA1 card to SLHA2 convention. (beta) + update to_full [run_card] + update XXX [where XXX correspond to a hidden block of the run_card]: + supported block are %s + """, ', '.join(self.update_block)) def do_update(self, line, timer=0): @@ -6756,6 +6764,8 @@ def do_update(self, line, timer=0): logger.warning('miss an argument (dependent or missing). Please retry') return + args[0] = args[0].lower() + if args[0] == 'dependent': if not self.mother_interface: logger.warning('Failed to update dependent parameter. This might create trouble for external program (like MadSpin/shower/...)') @@ -6805,10 +6815,11 @@ def do_update(self, line, timer=0): self.modified_card.add('run') # delay writting of the run_card logger.info('add optional block %s to the run_card', args[0]) else: - self.help_update() + self.do_help('update') logger.warning('unvalid options for update command. Please retry') + def update_to_full(self, line): """ trigger via update to_full LINE""" 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 789976beee..c321fd88e5 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/extended_cmd.py +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/extended_cmd.py @@ -1317,6 +1317,8 @@ def nice_error_handling(self, error, line): debug_file = open(self.debug_output, 'a') traceback.print_exc(file=debug_file) + if __debug__: + traceback.print_exc() if hasattr(error, 'filename'): debug_file.write("Related File: %s\n" % error.filename) # Create a nice error output @@ -1928,7 +1930,8 @@ def do_display(self, line, output=sys.stdout): for i, name in enumerate(split): try: __import__('.'.join(split[:i+1])) - exec('%s=sys.modules[\'%s\']' % (split[i], '.'.join(split[:i+1]))) + tmp = {} + exec('%s=sys.modules[\'%s\']' % (split[i], '.'.join(split[:i+1])), globals(),tmp) except ImportError: try: var = eval(args[1]) @@ -1939,7 +1942,7 @@ def do_display(self, line, output=sys.stdout): outstr += 'EXTERNAL:\n' outstr += misc.nice_representation(var, nb_space=4) else: - var = eval(args[1]) + var = eval(args[1], globals(), tmp) outstr += 'EXTERNAL:\n' outstr += misc.nice_representation(var, nb_space=4) diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/file_writers.py b/epochX/cudacpp/gg_ttg.mad/bin/internal/file_writers.py index 526756129f..74ba0d195c 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/file_writers.py +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/file_writers.py @@ -140,10 +140,6 @@ def preprocess_template(self, input_lines, context={}): else: raise self.FileWriterError("%s not string" % repr(input_lines)) - # Setup the contextual environment - for contextual_variable, value in context.items(): - exec('%s=%s'%(str(contextual_variable),repr(value))) - res = [] # The variable below tracks the conditional statements structure if_stack = [] @@ -166,7 +162,7 @@ def preprocess_template(self, input_lines, context={}): # Treat an if statement elif preproc_command.group('command')=='if': try: - if_stack.append(eval(preproc_command.group('body'))==True) + if_stack.append(eval(preproc_command.group('body'), globals(), context)==True) except Exception as e: raise self.FilePreProcessingError('Could not evaluate'+\ "python expression '%s' given the context %s provided."%\ diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/files.py b/epochX/cudacpp/gg_ttg.mad/bin/internal/files.py index 551b71ddb6..3061b007e7 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/files.py +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/files.py @@ -147,9 +147,14 @@ def cp(path1, path2, log=True, error=False): path2 = format_path(path2) try: shutil.copy(path1, path2) + except shutil.Error as why: + logger.debug('no cp since identical: %s', why) + return except IOError as why: import madgraph.various.misc as misc try: + if 'same file' in str(why): + return if os.path.exists(path2): path2 = os.path.join(path2, os.path.split(path1)[1]) misc.copytree(path1, path2) @@ -157,12 +162,10 @@ def cp(path1, path2, log=True, error=False): if error: raise if log: - logger.warning(why) + logger.warning("fail to cp", path1, path2, why) else: - misc.sprint("fail to cp", why) - except shutil.Error: - # idetical file - pass + misc.sprint("fail to cp",path1,path2, why) + def rm(path, log=True): """removes path, that can be a single element or a list""" diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/gen_cardhtml-pl b/epochX/cudacpp/gg_ttg.mad/bin/internal/gen_cardhtml-pl index 1810c6c082..6e0e06533d 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/gen_cardhtml-pl +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/gen_cardhtml-pl @@ -137,7 +137,7 @@ until($listpos>$#incard){ print PAGE " Model: $model \n"; print PAGE " \n \n
\n"; print PAGE " \n"; - print PAGE "\"\" \n"; + print PAGE "\"\" \n"; print PAGE "
\n"; print PAGE " \n \n \n"; print PAGE " \n"; diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/gen_crossxhtml.py b/epochX/cudacpp/gg_ttg.mad/bin/internal/gen_crossxhtml.py index 681bf9d09b..3114a4350c 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/gen_crossxhtml.py +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/gen_crossxhtml.py @@ -133,7 +133,7 @@ class AllResults(dict): web = False - _run_entries = ['cross', 'error','nb_event_pythia','run_mode','run_statistics', + _run_entries = ['cross', 'error','axsec','nb_event_pythia','run_mode','run_statistics', 'nb_event','cross_pythia','error_pythia', 'nb_event_pythia8','cross_pythia8','error_pythia8', 'shower_dir'] diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/gen_jpeg-pl b/epochX/cudacpp/gg_ttg.mad/bin/internal/gen_jpeg-pl index 87d03da394..31b7e9fe55 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/gen_jpeg-pl +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/gen_jpeg-pl @@ -1,16 +1,16 @@ #!/usr/bin/perl -w #--------------------------------------------------------------------- -# Run GS to create jpeg files defined as $gs +# Run GS to create PNG files defined as $gs #--------------------------------------------------------------------- -system("/bin/bash -c \"rm -f matrix*.jpg\" "); +system("/bin/bash -c \"rm -f matrix*.png\" "); $imatrix = ""; if (! -e "matrix.ps") {$imatrix = 1;} -$max_jpg = 2; -if ($imatrix eq "") {$max_jpg = 5;} -# add 1 to max_jpg, to get max_jpg pages -$max_jpg += 1; +$max_png = 2; +if ($imatrix eq "") {$max_png = 5;} +# add 1 to max_png, to get max_png pages +$max_png += 1; open(PAGE,"> diagrams.html") || die "Error creating diagrams.html"; print PAGE "\ \n"; print PAGE "\ \n"; @@ -21,22 +21,22 @@ while ( -e "matrix$imatrix.ps"){ open(IN, "< matrix$imatrix.ps") || die "No file matrix$imatrix.ps"; open(OUT, "> matrix-1.ps") || die "Could not open file matrix-1.ps"; while () { - if ($_ =~ m/^%%Page: $max_jpg $max_jpg/) {last;} + if ($_ =~ m/^%%Page: $max_png $max_png/) {last;} else {print OUT $_, "\n";} } close(OUT); close(IN); - system "/bin/bash -c \"nice gs \-sDEVICE\=jpeg \-sOutputFile\=matrix$imatrix\%00d.jpg \-q \-dNOPAUSE \-dBATCH matrix-1.ps > /dev/null\""; + system "/bin/bash -c \"nice gs \-sDEVICE\=pngmono \-r150 \-sOutputFile\=matrix$imatrix\%00d.png \-q \-dNOPAUSE \-dBATCH matrix-1.ps > /dev/null\""; system "rm -f matrix-1.ps"; -# Determine how many jpg files we have +# Determine how many png files we have $pages=1; - while(-e "matrix$imatrix$pages.jpg"){ + while(-e "matrix$imatrix$pages.png"){ $pages++; }#end of while #reduce it by one - if ($pages > $max_jpg){ + if ($pages > $max_png){ $pages -= 1; } # Find name of process @@ -45,24 +45,24 @@ while ( -e "matrix$imatrix.ps"){ if ($proc =~ /Process: (.+?)(\s\w+=\d+)*$/) { $proc = $1; } print PAGE "

To save bandwidth not all diagrams were converted to jpeg."; + if (-e "matrix$imatrix$max_png.png" ) { + print PAGE "

To save bandwidth not all diagrams were converted to PNG."; print PAGE "

To view all diagrams click on "; print PAGE "\ postscript. \<\/A\> \ \n"; # # Delete files which aren't included in diagrams.html # - system ("/bin/bash -c \"rm -f matrix$max_jpg.jpg\" "); + system ("/bin/bash -c \"rm -f matrix$max_png.png\" "); } # -# Now create jpeg file for card +# Now create PNG file for card # - if (! -e "../../HTML/card.jpg") { + if (! -e "../../HTML/card.png") { system ("/bin/bash -c \"head -352 matrix$imatrix.ps >& junk.ps\" "); open(JUNK,">> junk.ps") || die "Error opening junk.ps"; @@ -72,7 +72,7 @@ while ( -e "matrix$imatrix.ps"){ system ("/bin/bash -c \"cat matrix$imatrix.ps | sed 1,352d >> junk.ps\" "); - system "/bin/bash -c \"nice gs \-sDEVICE\=jpeg \-sOutputFile\=card.jpg \-q \-dNOPAUSE \-dBATCH \-g180x150 ./junk.ps; rm -f junk.ps; cp -p card.jpg ../../HTML/card.jpg > /dev/null\" "; + system "/bin/bash -c \"nice gs \-sDEVICE\=pngmono \-sOutputFile\=card.png \-q \-dNOPAUSE \-dBATCH \-g180x150 ./junk.ps; rm -f junk.ps; cp -p card.png ../../HTML/card.png > /dev/null\" "; } if ($imatrix eq "") {$imatrix = 0;} $imatrix = $imatrix + 1; @@ -82,3 +82,4 @@ print PAGE "\n"; print PAGE "\<\/BODY\> \n"; print PAGE "\<\/HTML\> \n"; close(PAGE); + 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 415ecc9de0..d5d7fc8faf 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/gen_ximprove.py +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/gen_ximprove.py @@ -30,6 +30,7 @@ import stat import sys import six +import time from six.moves import range from six.moves import zip @@ -304,6 +305,7 @@ def get_helicity(self, to_submit=True, clean=True): logger.debug('(%s) nb_hel: %s zero amp: %s bad_amps_hel: %s/%s', split_file[-1], len(good_hels),len(bad_amps),len(bad_amps_perhel), len(good_hels)*nb_amp ) if len(good_hels) == 1: files.cp(matrix_file, matrix_file.replace('orig','optim')) + files.cp(matrix_file.replace('.f','.o'), matrix_file.replace('orig','optim').replace('.f','.o')) continue # avoid optimization if onlye one helicity gauge = self.cmd.proc_characteristics['gauge'] @@ -1059,6 +1061,7 @@ def __init__(self, cmd, opt=None): # parameter for the gridpack run self.nreq = 2000 self.iseed = 4321 + self.maxevts = 2500 # placeholder for information self.results = 0 #updated in launch/update_html @@ -1200,6 +1203,10 @@ def reset_multijob(self): def write_multijob(self, Channel, nb_split): """ """ if nb_split <=1: + try: + os.remove(pjoin(self.me_dir, 'SubProcesses', Channel.get('name'), 'multijob.dat')) + except OSError: + pass return f = open(pjoin(self.me_dir, 'SubProcesses', Channel.get('name'), 'multijob.dat'), 'w') f.write('%i\n' % nb_split) @@ -1828,17 +1835,17 @@ class gen_ximprove_gridpack(gen_ximprove_v4): 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 gen_events_security = 1.00 - def __new__(cls, *args, **opts): + def __new__(cls, cmd, opts): cls.force_class = 'gridpack' - return super(gen_ximprove_gridpack, cls).__new__(cls, *args, **opts) + return super(gen_ximprove_gridpack, cls).__new__(cls, cmd, opts) - def __init__(self, *args, **opts): + def __init__(self, cmd, opts): self.ngran = -1 + self.nprocs = 1 self.gscalefact = {} self.readonly = False if 'ngran' in opts: @@ -1846,9 +1853,18 @@ def __init__(self, *args, **opts): # del opts['ngran'] if 'readonly' in opts: self.readonly = opts['readonly'] - super(gen_ximprove_gridpack,self).__init__(*args, **opts) + if 'nprocs' in opts: + self.nprocs = int(opts['nprocs']) + if 'maxevts' in opts and self.nprocs > 1: + self.max_request_event = int(opts['maxevts']) + super(gen_ximprove_gridpack,self).__init__(cmd, opts) if self.ngran == -1: self.ngran = 1 + + if self.nprocs > 1: + self.combining_job = 0 + else: + self.combining_job = sys.maxsize def find_job_for_event(self): """return the list of channel that need to be improved""" @@ -1876,8 +1892,8 @@ def find_job_for_event(self): continue # no event to generate events self.gscalefact[tag] = max(1, 1/(goal_lum * C.get('axsec')/ self.ngran)) #need to generate events - logger.debug('request events for ', C.get('name'), 'cross=', - C.get('axsec'), 'needed events = ', goal_lum * C.get('axsec')) + logger.debug('request events for %s cross=%d needed events = %d', + C.get('name'), C.get('axsec'), goal_lum * C.get('axsec')) to_refine.append(C) logger.info('need to improve %s channels' % len(to_refine)) @@ -1897,8 +1913,13 @@ def get_job_for_event(self): 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 - + nb_split = int(max(1,((needed_event-1)// self.max_request_event) +1)) + if not self.split_channels: + nb_split = 1 + if nb_split > self.max_splitting: + 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')) @@ -1908,13 +1929,16 @@ def get_job_for_event(self): nevents = self.max_event_in_iter if nevents < self.min_event_in_iter: + nb_split = int(nb_split * nevents / self.min_event_in_iter) + 1 # sr dangerous? nevents = self.min_event_in_iter # # 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) - + # write the multi-job information + self.write_multijob(C, nb_split) + #create the info dict assume no splitting for the default info = {'name': self.cmd.results.current['run_name'], 'script_name': 'unknown', @@ -1925,7 +1949,7 @@ def get_job_for_event(self): 'nevents': nevents, #int(nevents*self.gen_events_security)+1, 'maxiter': self.max_iter, 'miniter': self.min_iter, - 'precision': -1*int(needed_event)/C.get('axsec'), + 'precision': -goal_lum/nb_split, # -1*int(needed_event)/C.get('axsec'), 'requested_event': needed_event, 'nhel': self.run_card['nhel'], 'channel': C.name.replace('G',''), @@ -1938,27 +1962,59 @@ def get_job_for_event(self): basedir = pjoin(os.path.dirname(__file__), '..','..','SubProcesses', info['P_dir'], info['directory']) info['base_directory'] = basedir - jobs.append(info) - + if nb_split == 1: + jobs.append(info) + else: + for i in range(nb_split): + new_info = dict(info) + new_info['offset'] = i+1 + new_info['directory'] += self.alphabet[i % 26] + str((i+1)//26) + new_info['base_directory'] = info['directory'] + jobs.append(new_info) write_dir = '.' if self.readonly else None self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), jobs, write_dir) + if self.nprocs > 1: + nprocs_cluster = cluster.MultiCore(nb_core=self.nprocs) + gridpack_start = time.time() + def gridpack_wait_monitoring(Idle, Running, Done): + if Idle+Running+Done == 0: + return + logger.info("Gridpack event generation: %s Idle, %s Running, %s Done [%s]" + % (Idle, Running, Done, misc.format_time(time.time()-gridpack_start))) + done = [] for j in jobs: - if j['P_dir'] in done: - continue - done.append(j['P_dir']) + if self.nprocs == 1: + if j['P_dir'] in done: + continue + done.append(j['P_dir']) + # Give a little status. Sometimes these jobs run very long, and having hours without any + # console output can be a bit frightening and make users think we are looping. + if len(done)%5==0: + logger.info(f"Working on job {len(done)} of {len(jobs)}") + # set the working directory path. pwd = pjoin(os.getcwd(),j['P_dir']) if self.readonly else pjoin(self.me_dir, 'SubProcesses', j['P_dir']) - exe = pjoin(pwd, 'ajob1') + exe = pjoin(pwd, j['script_name']) st = os.stat(exe) os.chmod(exe, st.st_mode | stat.S_IEXEC) # run the code\ - cluster.onecore.launch_and_wait(exe, cwd=pwd, packet_member=j['packet']) + if self.nprocs == 1: + cluster.onecore.launch_and_wait(exe, cwd=pwd, packet_member=j['packet']) + else: + nprocs_cluster.cluster_submit(exe, cwd=pwd, packet_member=j['packet']) write_dir = '.' if self.readonly else pjoin(self.me_dir, 'SubProcesses') + if self.nprocs > 1: + nprocs_cluster.wait(self.me_dir, gridpack_wait_monitoring) + + if self.readonly: + combine_runs.CombineRuns(write_dir) + else: + combine_runs.CombineRuns(self.me_dir) self.check_events(goal_lum, to_refine, jobs, write_dir) def check_events(self, goal_lum, to_refine, jobs, Sdir): diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/hel_recycle.py b/epochX/cudacpp/gg_ttg.mad/bin/internal/hel_recycle.py index 1471de4bcb..978ba6575e 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/hel_recycle.py +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/hel_recycle.py @@ -550,7 +550,7 @@ def get_jamp_lines(self, line): def get_amp2_lines(self, line): if line.startswith(' DO I = 1, NCOLOR'): self.in_amp2 = False - elif not line.isspace(): + elif not line.isspace() and 'DENOM' not in line: self.template_dict['amp2_lines'] += f'{line[0:6]} {self.add_indices(line[6:])}' def prepare_bools(self): diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/histograms.py b/epochX/cudacpp/gg_ttg.mad/bin/internal/histograms.py index 51ae2914fc..d68c560806 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/histograms.py +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/histograms.py @@ -1149,11 +1149,8 @@ def parse_one_histo_from_stream(self, stream, all_weight_header, boundaries = [0.0,0.0] for j, weight in \ enumerate(HwU.histo_bin_weight_re.finditer(line_bin)): - if (j == len(weight_header)): - continue - if j == len(all_weight_header): - raise HwU.ParseError("There is more bin weights"+\ - " specified than expected (%i)"%len(weight_header)) + #if (j == len(weight_header)): + # continue if selected_central_weight == all_weight_header[j]: bin_weights['central'] = float(weight.group('weight')) if all_weight_header[j] == 'boundary_xmin': @@ -2480,14 +2477,14 @@ def get_main_central_plot_lines(HwU_name, block_position, color_index, # return [template_no_stat%rep_dic]+\ # ([template%rep_dic] if show_mc_uncertainties else []) - # The use of sqrt(-1) is just a trick to prevent the line to display + # The use of 1/0 is just a trick to prevent the line to display res = [] - rep_dic['data'] = '($3 < 0 ? sqrt(-1) : $3)' + rep_dic['data'] = '($3 < 0 ? 1/0 : $3)' res.append(template_no_stat%rep_dic) rep_dic['title'] = " title ''" if show_mc_uncertainties: res.append(template%rep_dic) - rep_dic['data'] = '($3 >= 0 ? sqrt(-1) : abs($3))' + rep_dic['data'] = '($3 >= 0 ? 1/0 : abs($3))' rep_dic['ls'] = ' ls %d'%(100+color_index) res.append(template_no_stat%rep_dic) if show_mc_uncertainties: @@ -2739,13 +2736,13 @@ def ratio_no_correlations(wgtsA, wgtsB): """#-- rendering subhistograms '%(subhistogram_type)s' %(unset label)s %(set_format_y)s +%(set_yscale)s set yrange [%(ymin).4e:%(ymax).4e] set origin %(origin_x).4e, %(origin_y).4e set size %(size_x).4e, %(size_y).4e set mytics %(mytics)d %(set_ytics)s %(set_format_x)s -%(set_yscale)s %(set_ylabel)s %(set_histo_label)s plot \\""" @@ -2878,7 +2875,7 @@ def ratio_no_correlations(wgtsA, wgtsB): # We decide to show uncertainties in the main plot only if they # are part of a monocolor band. Otherwise, they will only be - # shown in the first subplot. Notice that plotting 'sqrt(-1)' + # shown in the first subplot. Notice that plotting '1/0' # is just a trick so as to have only the key printed with no # line @@ -2890,7 +2887,7 @@ def ratio_no_correlations(wgtsA, wgtsB): '%s, scale variation'%title, band='scale' in use_band) else: uncertainty_plot_lines[-1]['scale'] = \ - ["sqrt(-1) ls %d title '%s'"%(color_index+10,'%s, scale variation'%title)] + ["1/0 ls %d title '%s'"%(color_index+10,'%s, scale variation'%title)] # And now PDF_variation if available if not PDF_var_pos is None and len(PDF_var_pos)>0: if 'pdf' in use_band: @@ -2899,7 +2896,7 @@ def ratio_no_correlations(wgtsA, wgtsB): '%s, PDF variation'%title, band='pdf' in use_band) else: uncertainty_plot_lines[-1]['pdf'] = \ - ["sqrt(-1) ls %d title '%s'"%(color_index+20,'%s, PDF variation'%title)] + ["1/0 ls %d title '%s'"%(color_index+20,'%s, PDF variation'%title)] # And now merging variation if available if not merging_var_pos is None and len(merging_var_pos)>0: if 'merging_scale' in use_band: @@ -2908,7 +2905,7 @@ def ratio_no_correlations(wgtsA, wgtsB): '%s, merging scale variation'%title, band='merging_scale' in use_band) else: uncertainty_plot_lines[-1]['merging_scale'] = \ - ["sqrt(-1) ls %d title '%s'"%(color_index+30,'%s, merging scale variation'%title)] + ["1/0 ls %d title '%s'"%(color_index+30,'%s, merging scale variation'%title)] # And now alpsfact variation if available if not alpsfact_var_pos is None and len(alpsfact_var_pos)>0: if 'alpsfact' in use_band: @@ -2917,7 +2914,7 @@ def ratio_no_correlations(wgtsA, wgtsB): '%s, alpsfact variation'%title, band='alpsfact' in use_band) else: uncertainty_plot_lines[-1]['alpsfact'] = \ - ["sqrt(-1) ls %d title '%s'"%(color_index+40,'%s, alpsfact variation'%title)] + ["1/0 ls %d title '%s'"%(color_index+40,'%s, alpsfact variation'%title)] # plot_lines.append( # "'%s' index %d using (($1+$2)/2):3 ls %d title '%s'"\ diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/launch_plugin.py b/epochX/cudacpp/gg_ttg.mad/bin/internal/launch_plugin.py index 0924927785..ba08c10340 100644 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/launch_plugin.py +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/launch_plugin.py @@ -33,7 +33,7 @@ def compile(self, *args, **opts): if 'cwd' in opts and os.path.basename(opts['cwd']) == 'Source': path = pjoin(opts['cwd'], 'make_opts') common_run_interface.CommonRunCmd.update_make_opts_full(path, - {'FPTYPE': self.run_card['floating_type'] }) + {'override FPTYPE': self.run_card['floating_type'] }) misc.sprint('FPTYPE checked') cudacpp_supported_backends = [ 'fortran', 'cuda', 'hip', 'cpp', 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z', 'cppauto' ] if args and args[0][0] == 'madevent' and hasattr(self, 'run_card'): @@ -76,7 +76,7 @@ def reset_makeopts(self, old_value, new_value, name): if not hasattr(self, 'path'): raise Exception if name == 'floating_type': - common_run_interface.CommonRunCmd.update_make_opts_full({'FPTYPE': new_value}) + common_run_interface.CommonRunCmd.update_make_opts_full({'override FPTYPE': new_value}) else: raise Exception Sourcedir = pjoin(os.path.dirname(os.path.dirname(self.path)), 'Source') diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/lhe_parser.py b/epochX/cudacpp/gg_ttg.mad/bin/internal/lhe_parser.py index f6e47956cd..76ded329c0 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/lhe_parser.py +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/lhe_parser.py @@ -2953,8 +2953,8 @@ def pt(self): @property def pseudorapidity(self): - norm = math.sqrt(self.px**2 + self.py**2+self.pz**2) - return 0.5* math.log((norm - self.pz) / (norm + self.pz)) + norm = math.sqrt(self.px**2 + self.py**2 + self.pz**2) + return 0.5* math.log((norm + self.pz) / (norm - self.pz)) @property def rapidity(self): 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 85e5bcf5e3..2852f1d4d8 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/madevent_interface.py +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/madevent_interface.py @@ -1171,10 +1171,10 @@ def check_survey(self, args, cmd='survey'): for opt,value in self._survey_options.items(): if arg.startswith('--%s=' % opt): exec('self.opts[\'%s\'] = %s(arg.split(\'=\')[-1])' % \ - (opt, value[0])) + (opt, value[0]), globals(), {'self':self, 'arg':arg}) arg = "" if arg != "": raise Exception - except Exception: + except Exception as error: self.help_survey() raise self.InvalidCmd('invalid %s argument'% arg) @@ -3656,9 +3656,11 @@ def do_refine(self, line): else: self.refine_mode = "new" - cross, error = self.make_make_all_html_results() + cross, error, across = self.make_make_all_html_results(get_attr=('xsec','xerru','axsec')) + self.results.add_detail('cross', cross) self.results.add_detail('error', error) + self.results.add_detail('axsec', across) self.results.add_detail('run_statistics', dict(self.results.get_detail('run_statistics'))) @@ -3786,7 +3788,7 @@ def split(a, n): for i, local_G in enumerate(split(Gdirs, nb_chunk)): line = [pjoin(self.me_dir, "Events", self.run_name, "partials%d.lhe.gz" % i)] line.append(pjoin(self.me_dir, 'Events', self.run_name, '%s_%s_banner.txt' % (self.run_name, tag))) - line.append(str(self.results.current['cross'])) + line.append(str(self.results.current.get('axsec'))) line += local_G partials_info.append(self.do_combine_events_partial(' '.join(line), preprocess_only=True)) mycluster.submit(sys.executable, @@ -6749,7 +6751,7 @@ def get_subP_ids(path): class GridPackCmd(MadEventCmd): """The command for the gridpack --Those are not suppose to be use interactively--""" - def __init__(self, me_dir = None, nb_event=0, seed=0, gran=-1, *completekey, **stdin): + def __init__(self, me_dir = None, nb_event=0, seed=0, gran=-1, nprocs=1, maxevts=2500, *completekey, **stdin): """Initialize the command and directly run""" # Initialize properly @@ -6759,6 +6761,8 @@ 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.nprocs = nprocs + self.maxevts = maxevts self.options['automatic_html_opening'] = False #write the grid_card.dat on disk @@ -6874,7 +6878,7 @@ def launch(self, nb_event, seed): #misc.call([pjoin(self.me_dir,'bin','refine4grid'), # str(nb_event), '0', 'Madevent','1','GridRun_%s' % seed], # cwd=self.me_dir) - self.refine4grid(nb_event) + self.gridpack_cross = self.refine4grid(nb_event) # 3) Combine the events/pythia/... self.exec_cmd('combine_events') @@ -6902,6 +6906,8 @@ def refine4grid(self, nb_event): precision = nb_event + across= self.make_make_all_html_results(get_attr='axsec') + self.opts = dict([(key,value[1]) for (key,value) in \ self._survey_options.items()]) @@ -6915,8 +6921,9 @@ def refine4grid(self, nb_event): 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} + refine_opt = {'err_goal': nb_event, 'split_channels': True, + 'ngran':self.granularity, 'readonly': self.readonly, + 'nprocs': self.nprocs, 'maxevts': self.maxevts} 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 @@ -6926,7 +6933,7 @@ def refine4grid(self, nb_event): #print 'run combine!!!' #combine_runs.CombineRuns(self.me_dir) - return + return across #update html output Presults = sum_html.collect_result(self) cross, error = Presults.xsec, Presults.xerru @@ -7051,10 +7058,14 @@ def do_combine_events(self, line): sum_axsec += result.get('axsec')*gscalefact[Gdir] if len(AllEvent) >= 80: #perform a partial unweighting - if self.results.current['cross'] == 0 and self.run_card['gridpack']: - nb_event= self.nb_event + if not self.results.current.get('axsec'): + if self.run_card['gridpack'] and self.gridpack_cross: + nb_event = min(abs(1.05*self.nb_event*sum_axsec/self.gridpack_cross),self.nb_event) + else: + nb_event= self.nb_event else: - nb_event = min(abs(1.01*self.nb_event*sum_axsec/self.results.current['cross']),self.run_card['nevents']) + nb_event = min(abs(1.01*self.nb_event*sum_axsec/self.results.current.get('axsec')),self.run_card['nevents'], self.nb_event, self.gridpack_cross, sum_axsec) + misc.sprint(nb_event, self.results.current.get('axsec'), self.gridpack_cross) AllEvent.unweight(pjoin(outdir, self.run_name, "partials%s.lhe.gz" % partials), get_wgt, log_level=5, trunc_error=1e-2, event_target=nb_event) AllEvent = lhe_parser.MultiEventFile() @@ -7068,6 +7079,7 @@ def do_combine_events(self, line): for data in partials_info: AllEvent.add(*data) + sum_xsec += data[1] if not hasattr(self,'proc_characteristic'): self.proc_characteristic = self.get_characteristics() diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/restore_data b/epochX/cudacpp/gg_ttg.mad/bin/internal/restore_data index 6205bb9567..407ed7aa91 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/restore_data +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/restore_data @@ -48,8 +48,17 @@ for i in `cat subproc.mg` ; do cd ../ done +# check if we are on a Mac, otherwise assume Linux +if [[ "$OSTYPE" == "darwin"* ]]; then + # no nproc on Mac, so use sysctl instead + # use -S1024 because there is a limit on the length of the command + xargs_opts="-P $(sysctl -n hw.ncpu) -S1024" +else + xargs_opts="-P $(nproc --all)" +fi + find . -mindepth 2 -maxdepth 2 -type d -name 'G*' -print0 \ - | xargs --null -P "$(nproc --all)" -I{} bash -c " + | xargs --null ${xargs_opts} -I{} bash -c " cd {} for j in $1_results.dat ; do if [[ -e \$j ]] ; then diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/sum_html.py b/epochX/cudacpp/gg_ttg.mad/bin/internal/sum_html.py index 9dd5826f71..fb8dd3a74a 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/sum_html.py +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/sum_html.py @@ -770,7 +770,7 @@ def collect_result(cmd, folder_names=[], jobs=None, main_dir=None): return all -def make_all_html_results(cmd, folder_names = [], jobs=[]): +def make_all_html_results(cmd, folder_names = [], jobs=[], get_attr=None): """ folder_names and jobs have been added for the amcatnlo runs """ run = cmd.results.current['run_name'] if not os.path.exists(pjoin(cmd.me_dir, 'HTML', run)): @@ -794,7 +794,12 @@ def make_all_html_results(cmd, folder_names = [], jobs=[]): fsock.write('%s

' % Presults.get_html(run, unit, cmd.me_dir)) fsock.write('%s
' % P_text) - return Presults.xsec, Presults.xerru + if not get_attr: + return Presults.xsec, Presults.xerru + else: + if isinstance(get_attr, tuple): + return [getattr(Presults, _) for _ in get_attr] + return getattr(Presults, get_attr) diff --git a/epochX/cudacpp/gg_ttg.mad/bin/internal/ufomodel/write_param_card.py b/epochX/cudacpp/gg_ttg.mad/bin/internal/ufomodel/write_param_card.py index 57a85b0614..33a89259f8 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/ufomodel/write_param_card.py +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/ufomodel/write_param_card.py @@ -116,9 +116,10 @@ def write_param(self, param, lhablock): def write_dep_param_block(self, lhablock): import cmath from parameters import all_parameters + param_values = {'cmath':cmath} for parameter in all_parameters: try: - exec("%s = %s" % (parameter.name, parameter.value)) + exec("%s = %s" % (parameter.name, parameter.value), globals(), param_values) except Exception: pass text = "## Not dependent paramater.\n" @@ -134,7 +135,7 @@ def write_dep_param_block(self, lhablock): prefix = "DECAY " for part, param in data: if isinstance(param.value, str): - value = complex(eval(param.value)).real + value = complex(eval(param.value, globals(), param_values)).real else: value = param.value diff --git a/epochX/cudacpp/gg_ttg.mad/bin/madevent b/epochX/cudacpp/gg_ttg.mad/bin/madevent index dff9711b73..9c5363e682 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/madevent +++ b/epochX/cudacpp/gg_ttg.mad/bin/madevent @@ -178,6 +178,17 @@ force_run = False if (args and args[0] == 'treatcards'): force_run=True + +# check that madgraph is not in PYTHONPATH +try: + import madgraph +except ImportError: + pass +else: + logger.getLogger('madgraph').error('Looks like you do have madgraph in your PYTHONPATH (or you run this executable from the main MG5aMC directory). This executable will likely not work in such case.') + + + # Call the cmd interface main loop try: if '-h' in args or '--help' in args: diff --git a/epochX/cudacpp/gg_ttg.mad/src/HelAmps_sm.h b/epochX/cudacpp/gg_ttg.mad/src/HelAmps_sm.h index ff9f0d7f00..63bc46f8b9 100644 --- a/epochX/cudacpp/gg_ttg.mad/src/HelAmps_sm.h +++ b/epochX/cudacpp/gg_ttg.mad/src/HelAmps_sm.h @@ -8,7 +8,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_ttg.mad/src/Parameters_sm.cc b/epochX/cudacpp/gg_ttg.mad/src/Parameters_sm.cc index 47a3a011b8..d17aac5b5c 100644 --- a/epochX/cudacpp/gg_ttg.mad/src/Parameters_sm.cc +++ b/epochX/cudacpp/gg_ttg.mad/src/Parameters_sm.cc @@ -7,7 +7,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_ttg.mad/src/Parameters_sm.h b/epochX/cudacpp/gg_ttg.mad/src/Parameters_sm.h index 76066c7bb1..63f7d185bd 100644 --- a/epochX/cudacpp/gg_ttg.mad/src/Parameters_sm.h +++ b/epochX/cudacpp/gg_ttg.mad/src/Parameters_sm.h @@ -7,7 +7,7 @@ // Further modified by: A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_ttg.sa/CODEGEN_cudacpp_gg_ttg_log.txt b/epochX/cudacpp/gg_ttg.sa/CODEGEN_cudacpp_gg_ttg_log.txt index 882c93c3a5..c431fd81b5 100644 --- a/epochX/cudacpp/gg_ttg.sa/CODEGEN_cudacpp_gg_ttg_log.txt +++ b/epochX/cudacpp/gg_ttg.sa/CODEGEN_cudacpp_gg_ttg_log.txt @@ -1,8 +1,11 @@ +WARNING:root:python3.12 support is still experimental. For the moment re-weighting is NOT working and do expect a LOT of syntax warning. We do not advise python3.12 for production for the moment. +Running MG5 in debug mode +Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT +Plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT has marked as NOT being validated with this version: 3.6.2. +It has been validated for the last time with version: 3.6.0 Note that this is a development version. This version is intended for development/beta testing and NOT for production. This version has not been fully tested (if at all) and might have limited user support (if at all) -Running MG5 in debug mode -Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT ************************************************************ * * * W E L C O M E to * @@ -15,7 +18,7 @@ Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT * * * * * * * * * * * * -* VERSION 3.6.0 2024-09-30 * +* VERSION 3.6.2 2025-03-19 * * * * WARNING: UNKNOWN DEVELOPMENT VERSION. * * WARNING: DO NOT USE FOR PRODUCTION * @@ -46,10 +49,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 Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt -import /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttg.mg +import /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_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 @@ -58,7 +60,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.006311178207397461  +DEBUG: model prefixing takes 0.0017962455749511719  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  @@ -151,13 +153,13 @@ 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.022 s +1 processes with 16 diagrams generated in 0.012 s Total: 1 processes with 16 diagrams output standalone_cudacpp ../TMPOUT/CODEGEN_cudacpp_gg_ttg Output will be done with PLUGIN: CUDACPP_OUTPUT DEBUG: Entering PLUGIN_ProcessExporter.__init__ (initialise the exporter) [output.py at line 171]  DEBUG: Entering PLUGIN_ProcessExporter.copy_template (initialise the directory) [output.py at line 176]  -INFO: Creating subdirectories in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttg +INFO: Creating subdirectories in directory /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttg 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 @@ -166,18 +168,18 @@ INFO: Processing color information for process: g g > t t~ g @1 DEBUG: type(fortran_model)= [output.py at line 220]  DEBUG: type(me)= me=0 [output.py at line 221]  DEBUG: "need to link", self.to_link_in_P =  need to link ['nvtx.h', 'timer.h', 'timermap.h', 'ompnumthreads.h', 'GpuRuntime.h', 'GpuAbstraction.h', 'MemoryAccessHelpers.h', 'MemoryAccessVectors.h', 'MemoryAccessMatrixElements.h', 'MemoryAccessMomenta.h', 'MemoryAccessRandomNumbers.h', 'MemoryAccessWeights.h', 'MemoryAccessAmplitudes.h', 'MemoryAccessWavefunctions.h', 'MemoryAccessGs.h', 'MemoryAccessCouplingsFixed.h', 'MemoryAccessNumerators.h', 'MemoryAccessDenominators.h', 'MemoryAccessChannelIds.h', 'EventStatistics.h', 'CommonRandomNumbers.h', 'CrossSectionKernels.cc', 'CrossSectionKernels.h', 'MatrixElementKernels.cc', 'MatrixElementKernels.h', 'RamboSamplingKernels.cc', 'RamboSamplingKernels.h', 'RandomNumberKernels.h', 'CommonRandomNumberKernel.cc', 'CurandRandomNumberKernel.cc', 'HiprandRandomNumberKernel.cc', 'Bridge.h', 'BridgeKernels.cc', 'BridgeKernels.h', 'fbridge.cc', 'fbridge.inc', 'fsampler.cc', 'fsampler.inc', 'MadgraphTest.h', 'runTest.cc', 'testmisc.cc', 'testxxx_cc_ref.txt', 'valgrind.h', 'cudacpp.mk', 'testxxx.cc', 'MemoryBuffers.h', 'MemoryAccessCouplings.h', 'perf.py', 'profile.sh'] [output.py at line 222]  -INFO: Creating files in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttg/SubProcesses/P1_Sigma_sm_gg_ttxg -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttg/SubProcesses/P1_Sigma_sm_gg_ttxg/./CPPProcess.h -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttg/SubProcesses/P1_Sigma_sm_gg_ttxg/./CPPProcess.cc -INFO: Created files CPPProcess.h and CPPProcess.cc in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttg/SubProcesses/P1_Sigma_sm_gg_ttxg/. -Generated helas calls for 1 subprocesses (16 diagrams) in 0.037 s +INFO: Creating files in directory /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttg/SubProcesses/P1_Sigma_sm_gg_ttxg +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttg/SubProcesses/P1_Sigma_sm_gg_ttxg/./CPPProcess.h +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttg/SubProcesses/P1_Sigma_sm_gg_ttxg/./CPPProcess.cc +INFO: Created files CPPProcess.h and CPPProcess.cc in directory /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttg/SubProcesses/P1_Sigma_sm_gg_ttxg/. +Generated helas calls for 1 subprocesses (16 diagrams) in 0.015 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.323 s +ALOHA: aloha creates 5 routines in 0.148 s VVV1 VVV1 FFV1 @@ -187,17 +189,17 @@ ALOHA: aloha creates 5 routines in 0.323 s VVVV1 VVVV3 VVVV4 -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttg/src/./HelAmps_sm.h -INFO: Created file HelAmps_sm.h in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttg/src/. +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttg/src/./HelAmps_sm.h +INFO: Created file HelAmps_sm.h in directory /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_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_cudacpp_gg_ttg/src/./Parameters_sm.h -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttg/src/./Parameters_sm.cc +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttg/src/./Parameters_sm.h +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_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_cudacpp_gg_ttg/src/. and /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttg/src/. +INFO: /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttg/src/. and /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttg/src/. quit -real 0m0.791s -user 0m0.727s -sys 0m0.049s -Code generation completed in 0 seconds +real 0m1.371s +user 0m0.430s +sys 0m0.115s +Code generation completed in 1 seconds diff --git a/epochX/cudacpp/gg_ttg.sa/SubProcesses/Bridge.h b/epochX/cudacpp/gg_ttg.sa/SubProcesses/Bridge.h index 87aa648dd2..49b928db67 100644 --- a/epochX/cudacpp/gg_ttg.sa/SubProcesses/Bridge.h +++ b/epochX/cudacpp/gg_ttg.sa/SubProcesses/Bridge.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: S. Roiser (Nov 2021) for the MG5aMC CUDACPP plugin. -// Further modified by: S. Roiser, J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2021-2025) for the MG5aMC CUDACPP plugin. #ifndef BRIDGE_H #define BRIDGE_H 1 @@ -255,11 +255,15 @@ namespace mg5amcCpu throw std::logic_error( "Bridge constructor: FIXME! cannot choose gputhreads" ); // this should never happen! m_gpublocks = m_nevt / m_gputhreads; } +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Instantiate device Bridge (nevt=" << m_nevt << ", gpublocks=" << m_gpublocks << ", gputhreads=" << m_gputhreads << ", gpublocks*gputhreads=" << m_gpublocks * m_gputhreads << ")" << std::endl; +#endif m_pmek.reset( new MatrixElementKernelDevice( m_devMomentaC, m_devGs, m_devRndHel, m_devRndCol, m_devChannelIds, m_devMEs, m_devSelHel, m_devSelCol, m_gpublocks, m_gputhreads ) ); #else +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Instantiate host Bridge (nevt=" << m_nevt << ")" << std::endl; +#endif m_pmek.reset( new MatrixElementKernelHost( m_hstMomentaC, m_hstGs, m_hstRndHel, m_hstRndCol, m_hstChannelIds, m_hstMEs, m_hstSelHel, m_hstSelCol, m_nevt ) ); #endif // MGONGPUCPP_GPUIMPL // Create a process object, read param card and set parameters @@ -290,8 +294,10 @@ namespace mg5amcCpu throw std::runtime_error( "Bridge: gpublocks*gputhreads must equal m_nevt in set_gpugrid" ); m_gpublocks = gpublocks; m_gputhreads = gputhreads; +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Set grid in Bridge (nevt=" << m_nevt << ", gpublocks=" << m_gpublocks << ", gputhreads=" << m_gputhreads << ", gpublocks*gputhreads=" << m_gpublocks * m_gputhreads << ")" << std::endl; +#endif m_pmek->setGrid( m_gpublocks, m_gputhreads ); } #endif @@ -347,7 +353,9 @@ namespace mg5amcCpu if( goodHelOnly ) return; m_pmek->computeMatrixElements( useChannelIds ); copyHostFromDevice( m_hstMEs, m_devMEs ); +#ifdef MGONGPUCPP_VERBOSE flagAbnormalMEs( m_hstMEs.data(), m_nevt ); +#endif copyHostFromDevice( m_hstSelHel, m_devSelHel ); copyHostFromDevice( m_hstSelCol, m_devSelCol ); if constexpr( std::is_same_v ) @@ -400,7 +408,9 @@ namespace mg5amcCpu } if( goodHelOnly ) return; m_pmek->computeMatrixElements( useChannelIds ); +#ifdef MGONGPUCPP_VERBOSE flagAbnormalMEs( m_hstMEs.data(), m_nevt ); +#endif if constexpr( std::is_same_v ) { memcpy( mes, m_hstMEs.data(), m_hstMEs.bytes() ); diff --git a/epochX/cudacpp/gg_ttg.sa/SubProcesses/GpuRuntime.h b/epochX/cudacpp/gg_ttg.sa/SubProcesses/GpuRuntime.h index 860c7fde16..6a4b946e74 100644 --- a/epochX/cudacpp/gg_ttg.sa/SubProcesses/GpuRuntime.h +++ b/epochX/cudacpp/gg_ttg.sa/SubProcesses/GpuRuntime.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: J. Teig (Jun 2023, based on earlier work by S. Roiser) for the MG5aMC CUDACPP plugin. -// Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2025) for the MG5aMC CUDACPP plugin. #ifndef MG5AMC_GPURUNTIME_H #define MG5AMC_GPURUNTIME_H 1 @@ -50,7 +50,7 @@ namespace mg5amcGpu // Set up CUDA application // ** NB: strictly speaking this is not needed when using the CUDA runtime API ** // Calling cudaSetDevice on startup is useful to properly book-keep the time spent in CUDA initialization - static void setUp( const bool debug = true ) + static void setUp( const bool debug = false ) // ZW: changed debug default to false { // ** NB: it is useful to call cudaSetDevice, or cudaFree, to properly book-keep the time spent in CUDA initialization // ** NB: otherwise, the first CUDA operation (eg a cudaMemcpyToSymbol in CPPProcess ctor) appears to take much longer! @@ -71,7 +71,7 @@ namespace mg5amcGpu // ** NB: strictly speaking this is not needed when using the CUDA runtime API ** // Calling cudaDeviceReset on shutdown is only needed for checking memory leaks in cuda-memcheck // See https://docs.nvidia.com/cuda/cuda-memcheck/index.html#leak-checking - static void tearDown( const bool debug = true ) + static void tearDown( const bool debug = false ) // ZW: changed debug default to false { if( debug ) std::cout << "__GpuRuntime: calling GpuDeviceReset()" << std::endl; checkGpu( gpuDeviceReset() ); diff --git a/epochX/cudacpp/gg_ttg.sa/SubProcesses/MatrixElementKernels.cc b/epochX/cudacpp/gg_ttg.sa/SubProcesses/MatrixElementKernels.cc index f463977c1a..703ea3781c 100644 --- a/epochX/cudacpp/gg_ttg.sa/SubProcesses/MatrixElementKernels.cc +++ b/epochX/cudacpp/gg_ttg.sa/SubProcesses/MatrixElementKernels.cc @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: A. Valassi (Jan 2022) for the MG5aMC CUDACPP plugin. -// Further modified by: J. Teig, A. Valassi (2022-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: J. Teig, A. Valassi, Z. Wettersten (2022-2025) for the MG5aMC CUDACPP plugin. #include "MatrixElementKernels.h" @@ -60,7 +60,9 @@ namespace mg5amcCpu #ifdef MGONGPU_CHANNELID_DEBUG MatrixElementKernelBase::dumpNevtProcessedByChannel(); #endif +#ifdef MGONGPUCPP_VERBOSE MatrixElementKernelBase::dumpSignallingFPEs(); +#endif } //-------------------------------------------------------------------------- diff --git a/epochX/cudacpp/gg_ttg.sa/SubProcesses/MatrixElementKernels.h b/epochX/cudacpp/gg_ttg.sa/SubProcesses/MatrixElementKernels.h index 7acff4b308..8da04d7945 100644 --- a/epochX/cudacpp/gg_ttg.sa/SubProcesses/MatrixElementKernels.h +++ b/epochX/cudacpp/gg_ttg.sa/SubProcesses/MatrixElementKernels.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: A. Valassi (Jan 2022) for the MG5aMC CUDACPP plugin. -// Further modified by: J. Teig, A. Valassi (2022-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: J. Teig, A. Valassi, Z. Wettersten (2022-2025) for the MG5aMC CUDACPP plugin. #ifndef MATRIXELEMENTKERNELS_H #define MATRIXELEMENTKERNELS_H 1 @@ -134,7 +134,7 @@ namespace mg5amcCpu // Does this host system support the SIMD used in the matrix element calculation? // [NB: this is private, SIMD vectorization in mg5amc C++ code is currently only used in the ME calculations below MatrixElementKernelHost!] - static bool hostSupportsSIMD( const bool verbose = true ); + static bool hostSupportsSIMD( const bool verbose = false ); // ZW: default verbose false private: diff --git a/epochX/cudacpp/gg_ttg.sa/SubProcesses/MemoryAccessGs.h b/epochX/cudacpp/gg_ttg.sa/SubProcesses/MemoryAccessGs.h index 63c17a68fa..50a6aaef4d 100644 --- a/epochX/cudacpp/gg_ttg.sa/SubProcesses/MemoryAccessGs.h +++ b/epochX/cudacpp/gg_ttg.sa/SubProcesses/MemoryAccessGs.h @@ -128,6 +128,14 @@ namespace mg5amcCpu #endif } + // Locate a field (output) in a memory buffer (input) from a kernel event-indexing mechanism (internal) + // [Signature (SCALAR OR VECTOR) ===> fptype_sv* kernelAccess( fptype* buffer ) <===] + static __host__ __device__ inline fptype_sv* + kernelAccessP( fptype* buffer ) + { + return reinterpret_cast( buffer ); + } + // Locate a field (output) in a memory buffer (input) from a kernel event-indexing mechanism (internal) and the given field indexes (input) // [Signature (const, SCALAR) ===> const fptype& kernelAccessConst( const fptype* buffer ) <===] static constexpr auto kernelAccessConst_s = diff --git a/epochX/cudacpp/gg_ttg.sa/SubProcesses/MemoryBuffers.h b/epochX/cudacpp/gg_ttg.sa/SubProcesses/MemoryBuffers.h index 65a101888d..17ba7a89e5 100644 --- a/epochX/cudacpp/gg_ttg.sa/SubProcesses/MemoryBuffers.h +++ b/epochX/cudacpp/gg_ttg.sa/SubProcesses/MemoryBuffers.h @@ -13,6 +13,7 @@ #include "CPPProcess.h" #include "GpuRuntime.h" #include "Parameters_sm.h" +#include "processConfig.h" #include @@ -274,7 +275,8 @@ namespace mg5amcCpu typedef BufferBase BufferNumerators; // The size (number of elements) per event in a memory buffer for numerators - constexpr size_t sizePerEventNumerators = 1; + // (should be equal to the number of diagrams in the process) + constexpr size_t sizePerEventNumerators = processConfig::ndiagrams; #ifndef MGONGPUCPP_GPUIMPL // A class encapsulating a C++ host buffer for gs 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 bf77ac9970..c2cee023ce 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 @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -25,6 +25,7 @@ #include "MemoryAccessMatrixElements.h" #include "MemoryAccessMomenta.h" #include "MemoryAccessWavefunctions.h" +#include "processConfig.h" #ifdef MGONGPU_SUPPORTS_MULTICHANNEL #include "MemoryAccessDenominators.h" @@ -96,6 +97,69 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { +#ifdef MGONGPU_SUPPORTS_MULTICHANNEL + __device__ INLINE unsigned int getChannelId( const unsigned int* allChannelIds +#ifndef MGONGPUCPP_GPUIMPL + , + const int ievt00, + bool sanityCheckMixedPrecision = true +#endif + ) + { + unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr +#ifdef MGONGPUCPP_GPUIMPL + using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page + if( allChannelIds != nullptr ) + { + const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) + const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) + // NB: channelIds_sv is a scalar in CUDA + channelId = channelIds_sv; + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + } +#else // Cuda or C++ + using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + if( allChannelIds != nullptr ) + { + // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) + const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 + uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) +#ifndef MGONGPU_CPPSIMD + // NB: channelIds_sv is a scalar in no-SIMD C++ + channelId = channelIds_sv; +#else + // NB: channelIds_sv is a vector in SIMD C++ + channelId = channelIds_sv[0]; // element[0] + for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] + { + assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId + } +#endif + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + if( sanityCheckMixedPrecision ) + { +#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT + // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) + const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 + uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + for( int i = 0; i < neppV; ++i ) + { + assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector + } +#endif + } + } +#endif // MGONGPUCPP_GPUIMPL + return channelId; + } +#endif // MGONGPU_SUPPORTS_MULTICHANNEL + constexpr int nw6 = CPPProcess::nw6; // dimensions of each wavefunction (HELAS KEK 91-11): e.g. 6 for e+ e- -> mu+ mu- (fermions and vectors) constexpr int npar = CPPProcess::npar; // #particles in total (external = initial + final): e.g. 4 for e+ e- -> mu+ mu- constexpr int ncomb = CPPProcess::ncomb; // #helicity combinations: e.g. 16 for e+ e- -> mu+ mu- (2**4 = fermion spin up/down ** npar) @@ -305,7 +369,7 @@ namespace mg5amcCpu COUPs[ndcoup + iicoup] = allCOUPs[ndcoup + iicoup]; // independent couplings, fixed for all events fptype* MEs = E_ACCESS::ieventAccessRecord( allMEs, ievt0 ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); #endif #endif @@ -315,7 +379,7 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Numerators and denominators for the current event (CUDA) or SIMD event page (C++) - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); #endif @@ -768,7 +832,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- @@ -1138,9 +1204,6 @@ namespace mg5amcCpu #ifdef MGONGPUCPP_GPUIMPL // Remember: in CUDA this is a kernel for one event, in c++ this processes n events const int ievt = blockDim.x * blockIdx.x + threadIdx.x; // index of event (thread) in grid -#ifdef MGONGPU_SUPPORTS_MULTICHANNEL - using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events -#endif #else //assert( (size_t)(allmomenta) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] //assert( (size_t)(allMEs) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] @@ -1148,7 +1211,6 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL using NUM_ACCESS = HostAccessNumerators; // non-trivial access: buffer includes all events using DEN_ACCESS = HostAccessDenominators; // non-trivial access: buffer includes all events - using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events #endif #endif @@ -1173,11 +1235,12 @@ namespace mg5amcCpu fptype_sv& MEs_sv = E_ACCESS::kernelAccess( MEs ); MEs_sv = fptype_sv{ 0 }; #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - numerators_sv = fptype_sv{ 0 }; + for( int i = 0; i < processConfig::ndiagrams; ++i ) + numerators_sv[i] = fptype_sv{ 0 }; denominators_sv = fptype_sv{ 0 }; #endif } @@ -1190,17 +1253,7 @@ namespace mg5amcCpu // *** START OF PART 1a - CUDA (one event per GPU thread) *** #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) - const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) - // NB: channelIds_sv is a scalar in CUDA - channelId = channelIds_sv; - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) - } + unsigned int channelId = getChannelId( allChannelIds ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (for the single event processed in calculate_wavefunctions) @@ -1315,38 +1368,7 @@ namespace mg5amcCpu const int ievt00 = ipagV2 * neppV; // loop on one SIMD page (neppV events) at a time #endif #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) - const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 - uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) -#ifndef MGONGPU_CPPSIMD - // NB: channelIds_sv is a scalar in no-SIMD C++ - channelId = channelIds_sv; -#else - // NB: channelIds_sv is a vector in SIMD C++ - channelId = channelIds_sv[0]; // element[0] - for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] - { - assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId - } -#endif - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) -#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT - // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) - const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 - uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - for( int i = 0; i < neppV; ++i ) - { - assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector - } -#endif - } + unsigned int channelId = getChannelId( allChannelIds, ievt00 ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (jamp2[nParity][ncolor][neppV] for the SIMD vector - or the two SIMD vectors - of events processed in calculate_wavefunctions) @@ -1519,11 +1541,12 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( allChannelIds != nullptr ) // fix segfault #892 (not 'channelIds[0] != 0') { - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + const unsigned int channelId = getChannelId( allChannelIds, ievt0, false ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - MEs_sv *= numerators_sv / denominators_sv; + MEs_sv *= numerators_sv[channelId - 1] / denominators_sv; } #endif //for( int ieppV = 0; ieppV < neppV; ieppV++ ) diff --git a/epochX/cudacpp/gg_ttg.sa/SubProcesses/P1_Sigma_sm_gg_ttxg/CPPProcess.h b/epochX/cudacpp/gg_ttg.sa/SubProcesses/P1_Sigma_sm_gg_ttxg/CPPProcess.h index 2acfa000a7..f052d1a725 100644 --- a/epochX/cudacpp/gg_ttg.sa/SubProcesses/P1_Sigma_sm_gg_ttxg/CPPProcess.h +++ b/epochX/cudacpp/gg_ttg.sa/SubProcesses/P1_Sigma_sm_gg_ttxg/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_ttg.sa/SubProcesses/P1_Sigma_sm_gg_ttxg/processConfig.h b/epochX/cudacpp/gg_ttg.sa/SubProcesses/P1_Sigma_sm_gg_ttxg/processConfig.h new file mode 100644 index 0000000000..47044dbe6a --- /dev/null +++ b/epochX/cudacpp/gg_ttg.sa/SubProcesses/P1_Sigma_sm_gg_ttxg/processConfig.h @@ -0,0 +1,16 @@ +// Copyright (C) 2025 CERN and UCLouvain. +// Licensed under the GNU Lesser General Public License (version 3 or later). +// Created by: S. Roiser (May 2025) for the MG5aMC CUDACPP plugin. +// Further modified by: ... for the MG5aMC CUDACPP plugin. + + +#ifndef MG5_CONFIG_SIGMA_SM_GG_TTXG_H +#define MG5_CONFIG_SIGMA_SM_GG_TTXG_H 1 + +namespace processConfig { + + constexpr int ndiagrams = 16; + +} + +#endif // MG5_CONFIG_SIGMA_SM_GG_TTXG_H \ 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 ff9f0d7f00..63bc46f8b9 100644 --- a/epochX/cudacpp/gg_ttg.sa/src/HelAmps_sm.h +++ b/epochX/cudacpp/gg_ttg.sa/src/HelAmps_sm.h @@ -8,7 +8,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_ttg.sa/src/Parameters_sm.cc b/epochX/cudacpp/gg_ttg.sa/src/Parameters_sm.cc index 47a3a011b8..d17aac5b5c 100644 --- a/epochX/cudacpp/gg_ttg.sa/src/Parameters_sm.cc +++ b/epochX/cudacpp/gg_ttg.sa/src/Parameters_sm.cc @@ -7,7 +7,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_ttg.sa/src/Parameters_sm.h b/epochX/cudacpp/gg_ttg.sa/src/Parameters_sm.h index 76066c7bb1..63f7d185bd 100644 --- a/epochX/cudacpp/gg_ttg.sa/src/Parameters_sm.h +++ b/epochX/cudacpp/gg_ttg.sa/src/Parameters_sm.h @@ -7,7 +7,7 @@ // Further modified by: A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== 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 78cdfd68b2..fbb332dbfc 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 @@ -1,8 +1,11 @@ +WARNING:root:python3.12 support is still experimental. For the moment re-weighting is NOT working and do expect a LOT of syntax warning. We do not advise python3.12 for production for the moment. +Running MG5 in debug mode +Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT +Plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT has marked as NOT being validated with this version: 3.6.2. +It has been validated for the last time with version: 3.6.0 Note that this is a development version. This version is intended for development/beta testing and NOT for production. This version has not been fully tested (if at all) and might have limited user support (if at all) -Running MG5 in debug mode -Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT ************************************************************ * * * W E L C O M E to * @@ -15,7 +18,7 @@ Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT * * * * * * * * * * * * -* VERSION 3.6.0 2024-09-30 * +* VERSION 3.6.2 2025-03-19 * * * * WARNING: UNKNOWN DEVELOPMENT VERSION. * * WARNING: DO NOT USE FOR PRODUCTION * @@ -46,10 +49,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 Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt -import /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg.mg +import /shared/roiser/sw/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 @@ -58,7 +60,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.006547212600708008  +DEBUG: model prefixing takes 0.0018839836120605469  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  @@ -151,21 +153,21 @@ 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.171 s +1 processes with 123 diagrams generated in 0.078 s Total: 1 processes with 123 diagrams output madevent_simd ../TMPOUT/CODEGEN_mad_gg_ttgg --hel_recycling=False --vector_size=32 Output will be done with PLUGIN: CUDACPP_OUTPUT Addition matrix-element will be done with PLUGIN: CUDACPP_OUTPUT -DEBUG: opt['output_options']['vector_size'] =  32 [export_v4.py at line 4334]  +DEBUG: opt['output_options']['vector_size'] =  32 [export_v4.py at line 4166]  Output will be done with PLUGIN: CUDACPP_OUTPUT DEBUG: Entering PLUGIN_ProcessExporter.__init__ (initialise the exporter) [output.py at line 171]  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 176]  -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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg  +INFO: Creating subdirectories in directory /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg +WARNING: File exists /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/Cards  +WARNING: File exists /shared/roiser/sw/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 @@ -177,25 +179,25 @@ FileWriter t t~ g g WEIGHTED<=4 @1 INFO: Finding symmetric diagrams for subprocess group gg_ttxgg -DEBUG: len(subproc_diagrams_for_config) =  105 [model_handling.py at line 1527]  -DEBUG: iconfig_to_diag =  {1: 2, 2: 3, 3: 4, 4: 5, 5: 6, 6: 7, 7: 8, 8: 9, 9: 10, 10: 11, 11: 12, 12: 13, 13: 14, 14: 15, 15: 16, 16: 17, 17: 18, 18: 19, 19: 20, 20: 21, 21: 22, 22: 23, 23: 24, 24: 25, 25: 26, 26: 27, 27: 28, 28: 29, 29: 30, 30: 31, 31: 33, 32: 34, 33: 35, 34: 36, 35: 37, 36: 38, 37: 39, 38: 40, 39: 41, 40: 42, 41: 43, 42: 44, 43: 45, 44: 46, 45: 47, 46: 49, 47: 50, 48: 51, 49: 52, 50: 53, 51: 54, 52: 55, 53: 56, 54: 57, 55: 59, 56: 60, 57: 61, 58: 62, 59: 63, 60: 64, 61: 65, 62: 66, 63: 67, 64: 68, 65: 69, 66: 70, 67: 71, 68: 72, 69: 73, 70: 75, 71: 76, 72: 77, 73: 78, 74: 79, 75: 80, 76: 81, 77: 82, 78: 83, 79: 84, 80: 85, 81: 86, 82: 87, 83: 88, 84: 89, 85: 90, 86: 91, 87: 92, 88: 94, 89: 95, 90: 96, 91: 97, 92: 98, 93: 99, 94: 101, 95: 102, 96: 103, 97: 104, 98: 105, 99: 106, 100: 108, 101: 109, 102: 110, 103: 111, 104: 112, 105: 113} [model_handling.py at line 1551]  -DEBUG: diag_to_iconfig =  {2: 1, 3: 2, 4: 3, 5: 4, 6: 5, 7: 6, 8: 7, 9: 8, 10: 9, 11: 10, 12: 11, 13: 12, 14: 13, 15: 14, 16: 15, 17: 16, 18: 17, 19: 18, 20: 19, 21: 20, 22: 21, 23: 22, 24: 23, 25: 24, 26: 25, 27: 26, 28: 27, 29: 28, 30: 29, 31: 30, 33: 31, 34: 32, 35: 33, 36: 34, 37: 35, 38: 36, 39: 37, 40: 38, 41: 39, 42: 40, 43: 41, 44: 42, 45: 43, 46: 44, 47: 45, 49: 46, 50: 47, 51: 48, 52: 49, 53: 50, 54: 51, 55: 52, 56: 53, 57: 54, 59: 55, 60: 56, 61: 57, 62: 58, 63: 59, 64: 60, 65: 61, 66: 62, 67: 63, 68: 64, 69: 65, 70: 66, 71: 67, 72: 68, 73: 69, 75: 70, 76: 71, 77: 72, 78: 73, 79: 74, 80: 75, 81: 76, 82: 77, 83: 78, 84: 79, 85: 80, 86: 81, 87: 82, 88: 83, 89: 84, 90: 85, 91: 86, 92: 87, 94: 88, 95: 89, 96: 90, 97: 91, 98: 92, 99: 93, 101: 94, 102: 95, 103: 96, 104: 97, 105: 98, 106: 99, 108: 100, 109: 101, 110: 102, 111: 103, 112: 104, 113: 105} [model_handling.py at line 1552]  -Generated helas calls for 1 subprocesses (123 diagrams) in 0.423 s -Wrote files for 222 helas calls in 0.660 s +DEBUG: len(subproc_diagrams_for_config) =  105 [model_handling.py at line 1538]  +DEBUG: iconfig_to_diag =  {1: 2, 2: 3, 3: 4, 4: 5, 5: 6, 6: 7, 7: 8, 8: 9, 9: 10, 10: 11, 11: 12, 12: 13, 13: 14, 14: 15, 15: 16, 16: 17, 17: 18, 18: 19, 19: 20, 20: 21, 21: 22, 22: 23, 23: 24, 24: 25, 25: 26, 26: 27, 27: 28, 28: 29, 29: 30, 30: 31, 31: 33, 32: 34, 33: 35, 34: 36, 35: 37, 36: 38, 37: 39, 38: 40, 39: 41, 40: 42, 41: 43, 42: 44, 43: 45, 44: 46, 45: 47, 46: 49, 47: 50, 48: 51, 49: 52, 50: 53, 51: 54, 52: 55, 53: 56, 54: 57, 55: 59, 56: 60, 57: 61, 58: 62, 59: 63, 60: 64, 61: 65, 62: 66, 63: 67, 64: 68, 65: 69, 66: 70, 67: 71, 68: 72, 69: 73, 70: 75, 71: 76, 72: 77, 73: 78, 74: 79, 75: 80, 76: 81, 77: 82, 78: 83, 79: 84, 80: 85, 81: 86, 82: 87, 83: 88, 84: 89, 85: 90, 86: 91, 87: 92, 88: 94, 89: 95, 90: 96, 91: 97, 92: 98, 93: 99, 94: 101, 95: 102, 96: 103, 97: 104, 98: 105, 99: 106, 100: 108, 101: 109, 102: 110, 103: 111, 104: 112, 105: 113} [model_handling.py at line 1562]  +DEBUG: diag_to_iconfig =  {2: 1, 3: 2, 4: 3, 5: 4, 6: 5, 7: 6, 8: 7, 9: 8, 10: 9, 11: 10, 12: 11, 13: 12, 14: 13, 15: 14, 16: 15, 17: 16, 18: 17, 19: 18, 20: 19, 21: 20, 22: 21, 23: 22, 24: 23, 25: 24, 26: 25, 27: 26, 28: 27, 29: 28, 30: 29, 31: 30, 33: 31, 34: 32, 35: 33, 36: 34, 37: 35, 38: 36, 39: 37, 40: 38, 41: 39, 42: 40, 43: 41, 44: 42, 45: 43, 46: 44, 47: 45, 49: 46, 50: 47, 51: 48, 52: 49, 53: 50, 54: 51, 55: 52, 56: 53, 57: 54, 59: 55, 60: 56, 61: 57, 62: 58, 63: 59, 64: 60, 65: 61, 66: 62, 67: 63, 68: 64, 69: 65, 70: 66, 71: 67, 72: 68, 73: 69, 75: 70, 76: 71, 77: 72, 78: 73, 79: 74, 80: 75, 81: 76, 82: 77, 83: 78, 84: 79, 85: 80, 86: 81, 87: 82, 88: 83, 89: 84, 90: 85, 91: 86, 92: 87, 94: 88, 95: 89, 96: 90, 97: 91, 98: 92, 99: 93, 101: 94, 102: 95, 103: 96, 104: 97, 105: 98, 106: 99, 108: 100, 109: 101, 110: 102, 111: 103, 112: 104, 113: 105} [model_handling.py at line 1563]  +Generated helas calls for 1 subprocesses (123 diagrams) in 0.155 s +Wrote files for 222 helas calls in 3.252 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.328 s +ALOHA: aloha creates 5 routines in 0.171 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 10 routines in 0.313 s +ALOHA: aloha creates 10 routines in 0.144 s VVV1 VVV1 FFV1 @@ -208,38 +210,40 @@ ALOHA: aloha creates 10 routines in 0.313 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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/src/./HelAmps_sm.h +INFO: Created file HelAmps_sm.h in directory /shared/roiser/sw/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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/src/./Parameters_sm.h +FileWriter for /shared/roiser/sw/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: /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/src/. and /shared/roiser/sw/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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/Cards/me5_configuration.txt INFO: Use Fortran compiler gfortran INFO: Use c++ compiler g++ INFO: Generate jpeg diagrams 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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg; patch -p4 -i /shared/roiser/sw/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common patching file SubProcesses/makefile -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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/SubProcesses/P1_gg_ttxgg; patch -p6 -i /shared/roiser/sw/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file driver.f patching file matrix1.f Hunk #2 succeeded at 275 (offset 48 lines). DEBUG: p.returncode =  0 [output.py at line 263]  -Output to directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg done. +Output to directory /shared/roiser/sw/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 +/shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/README Run "open index.html" to see more information about this process. quit -real 0m4.934s -user 0m3.516s -sys 0m0.277s -Code generation completed in 5 seconds +real 0m8.933s +user 0m2.005s +sys 0m0.670s +Code generation completed in 9 seconds +/shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/bin/internal/banner.py:3309: SyntaxWarning: invalid escape sequence '\s' + function_pat = re.compile('^\s+(?:SUBROUTINE|(?:%(type)s)\s+function)\s+([a-zA-Z]\w*)' \ ************************************************************ * * * W E L C O M E to * @@ -252,7 +256,7 @@ Code generation completed in 5 seconds * * * * * * * * * * * * -* VERSION 3.6.0 * +* VERSION 3.6.2 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -260,10 +264,9 @@ Code generation completed in 5 seconds * 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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/Cards/me5_configuration.txt +INFO: load configuration from /shared/roiser/sw/madgraph4gpu/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/Cards/me5_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 @@ -282,7 +285,7 @@ launch in debug mode * * * * * * * * * * * * -* VERSION 3.6.0 * +* VERSION 3.6.2 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -290,10 +293,9 @@ 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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/Cards/me5_configuration.txt +INFO: load configuration from /shared/roiser/sw/madgraph4gpu/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttgg/Cards/me5_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 68b4c46295..a0212bfb62 100644 --- a/epochX/cudacpp/gg_ttgg.mad/Cards/me5_configuration.txt +++ b/epochX/cudacpp/gg_ttgg.mad/Cards/me5_configuration.txt @@ -235,7 +235,7 @@ # pineappl = pineappl -#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo +#mg5_path = /shared/roiser/sw/madgraph4gpu/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo +#mg5_path = /shared/roiser/sw/madgraph4gpu/MG5aMC/mg5amcnlo diff --git a/epochX/cudacpp/gg_ttgg.mad/Cards/proc_card_mg5.dat b/epochX/cudacpp/gg_ttgg.mad/Cards/proc_card_mg5.dat index 1fa5e235b3..83737ef020 100644 --- a/epochX/cudacpp/gg_ttgg.mad/Cards/proc_card_mg5.dat +++ b/epochX/cudacpp/gg_ttgg.mad/Cards/proc_card_mg5.dat @@ -8,7 +8,7 @@ #* * * * #* * #* * -#* VERSION 3.6.0 2024-09-30 * +#* VERSION 3.6.2 2025-03-19 * #* * #* WARNING: UNKNOWN DEVELOPMENT VERSION. * #* WARNING: DO NOT USE FOR PRODUCTION * diff --git a/epochX/cudacpp/gg_ttgg.mad/Cards/run_card.dat b/epochX/cudacpp/gg_ttgg.mad/Cards/run_card.dat index ecdc7fd25c..964b954d74 100644 --- a/epochX/cudacpp/gg_ttgg.mad/Cards/run_card.dat +++ b/epochX/cudacpp/gg_ttgg.mad/Cards/run_card.dat @@ -107,6 +107,7 @@ # Parton level cuts definition * #******************************* 0.0 = dsqrt_shat ! minimal shat for full process + -1 = dsqrt_shatmax ! maximum shat for full process # # #********************************************************************* diff --git a/epochX/cudacpp/gg_ttgg.mad/Cards/run_card_default.dat b/epochX/cudacpp/gg_ttgg.mad/Cards/run_card_default.dat index 7ec841d6c2..308f5bed4f 100644 --- a/epochX/cudacpp/gg_ttgg.mad/Cards/run_card_default.dat +++ b/epochX/cudacpp/gg_ttgg.mad/Cards/run_card_default.dat @@ -107,6 +107,7 @@ # Parton level cuts definition * #******************************* 0.0 = dsqrt_shat ! minimal shat for full process + -1 = dsqrt_shatmax ! maximum shat for full process # # #********************************************************************* diff --git a/epochX/cudacpp/gg_ttgg.mad/MGMEVersion.txt b/epochX/cudacpp/gg_ttgg.mad/MGMEVersion.txt index 084e244cea..77a069e39b 100644 --- a/epochX/cudacpp/gg_ttgg.mad/MGMEVersion.txt +++ b/epochX/cudacpp/gg_ttgg.mad/MGMEVersion.txt @@ -1 +1 @@ -3.6.0 \ No newline at end of file +3.6.2 \ No newline at end of file diff --git a/epochX/cudacpp/gg_ttgg.mad/Source/alfas_functions.f b/epochX/cudacpp/gg_ttgg.mad/Source/alfas_functions.f index bb69a6384e..84aeff369c 100644 --- a/epochX/cudacpp/gg_ttgg.mad/Source/alfas_functions.f +++ b/epochX/cudacpp/gg_ttgg.mad/Source/alfas_functions.f @@ -188,6 +188,10 @@ SUBROUTINE NEWTON1(T,A_IN,A_OUT,NLOOP,NF) A_OUT=A_IN/(1D0+A_IN*B0(NF)*T) IF (NLOOP .EQ. 1) RETURN + if (1D0+A_IN*B0(NF)*T.le.0d0)THEN + A_OUT = 9d98 + RETURN + ENDIF A_OUT=A_IN/(1D0+B0(NF)*A_IN*T+C1(NF)*A_IN*LOG(1D0+A_IN*B0(NF)*T)) IF (A_OUT .LT. 0D0) AS=0.3D0 30 AS=A_OUT diff --git a/epochX/cudacpp/gg_ttgg.mad/Source/cuts.inc b/epochX/cudacpp/gg_ttgg.mad/Source/cuts.inc index 23d099e5f7..a8ccc7420d 100644 --- a/epochX/cudacpp/gg_ttgg.mad/Source/cuts.inc +++ b/epochX/cudacpp/gg_ttgg.mad/Source/cuts.inc @@ -37,7 +37,7 @@ C REAL*8 misset,missetmax,ptheavy REAL*8 ptllmin,ptllmax integer maxjetflavor - REAl*8 dsqrt_shat + REAl*8 dsqrt_shat,dsqrt_shatmax COMMON /to_min_max_cuts/ & PTJmax,PTBmax,PTAmax,PTLmax, @@ -60,7 +60,7 @@ C & ht2max,ht3max,ht4max, & htjmin,htjmax,ihtmin,ihtmax, & misset,missetmax,ptheavy, - & ptllmin,ptllmax,dsqrt_shat, + & ptllmin,ptllmax,dsqrt_shat,dsqrt_shatmax, & maxjetflavor C diff --git a/epochX/cudacpp/gg_ttgg.mad/Source/make_opts b/epochX/cudacpp/gg_ttgg.mad/Source/make_opts index e4b87ee6ad..f9f7b64bb5 100644 --- a/epochX/cudacpp/gg_ttgg.mad/Source/make_opts +++ b/epochX/cudacpp/gg_ttgg.mad/Source/make_opts @@ -5,8 +5,8 @@ GLOBAL_FLAG=-O3 -ffast-math -fbounds-check MACFLAG= MG5AMC_VERSION=SpecifiedByMG5aMCAtRunTime PYTHIA8_PATH=NotInstalled -STDLIB_FLAG= STDLIB=-lstdc++ +STDLIB_FLAG= #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 291ca907ee..f9321e7a94 100644 --- a/epochX/cudacpp/gg_ttgg.mad/Source/makefile +++ b/epochX/cudacpp/gg_ttgg.mad/Source/makefile @@ -73,6 +73,7 @@ $(BINDIR)gensudgrid: $(GENSUDGRID) $(LIBDIR)libpdf.$(libext) $(LIBDIR)libgammaUP # Dependencies dsample.o: DiscreteSampler.o dsample.f genps.inc StringCast.o vector.inc +pawgraph.o: vector.inc DiscreteSampler.o: StringCast.o invarients.o: invarients.f genps.inc gen_ximprove.o: gen_ximprove.f run_config.inc run_card.inc diff --git a/epochX/cudacpp/gg_ttgg.mad/Source/run_card.inc b/epochX/cudacpp/gg_ttgg.mad/Source/run_card.inc index 1a1bc782bd..8bd5f73840 100644 --- a/epochX/cudacpp/gg_ttgg.mad/Source/run_card.inc +++ b/epochX/cudacpp/gg_ttgg.mad/Source/run_card.inc @@ -88,6 +88,8 @@ DSQRT_SHAT = 0.000000000000000D+00 + DSQRT_SHATMAX = -1 + LIMHEL = 0.000000000000000D+00 PTJ = 2.000000000000000D+01 diff --git a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/Bridge.h b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/Bridge.h index 87aa648dd2..49b928db67 100644 --- a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/Bridge.h +++ b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/Bridge.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: S. Roiser (Nov 2021) for the MG5aMC CUDACPP plugin. -// Further modified by: S. Roiser, J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2021-2025) for the MG5aMC CUDACPP plugin. #ifndef BRIDGE_H #define BRIDGE_H 1 @@ -255,11 +255,15 @@ namespace mg5amcCpu throw std::logic_error( "Bridge constructor: FIXME! cannot choose gputhreads" ); // this should never happen! m_gpublocks = m_nevt / m_gputhreads; } +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Instantiate device Bridge (nevt=" << m_nevt << ", gpublocks=" << m_gpublocks << ", gputhreads=" << m_gputhreads << ", gpublocks*gputhreads=" << m_gpublocks * m_gputhreads << ")" << std::endl; +#endif m_pmek.reset( new MatrixElementKernelDevice( m_devMomentaC, m_devGs, m_devRndHel, m_devRndCol, m_devChannelIds, m_devMEs, m_devSelHel, m_devSelCol, m_gpublocks, m_gputhreads ) ); #else +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Instantiate host Bridge (nevt=" << m_nevt << ")" << std::endl; +#endif m_pmek.reset( new MatrixElementKernelHost( m_hstMomentaC, m_hstGs, m_hstRndHel, m_hstRndCol, m_hstChannelIds, m_hstMEs, m_hstSelHel, m_hstSelCol, m_nevt ) ); #endif // MGONGPUCPP_GPUIMPL // Create a process object, read param card and set parameters @@ -290,8 +294,10 @@ namespace mg5amcCpu throw std::runtime_error( "Bridge: gpublocks*gputhreads must equal m_nevt in set_gpugrid" ); m_gpublocks = gpublocks; m_gputhreads = gputhreads; +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Set grid in Bridge (nevt=" << m_nevt << ", gpublocks=" << m_gpublocks << ", gputhreads=" << m_gputhreads << ", gpublocks*gputhreads=" << m_gpublocks * m_gputhreads << ")" << std::endl; +#endif m_pmek->setGrid( m_gpublocks, m_gputhreads ); } #endif @@ -347,7 +353,9 @@ namespace mg5amcCpu if( goodHelOnly ) return; m_pmek->computeMatrixElements( useChannelIds ); copyHostFromDevice( m_hstMEs, m_devMEs ); +#ifdef MGONGPUCPP_VERBOSE flagAbnormalMEs( m_hstMEs.data(), m_nevt ); +#endif copyHostFromDevice( m_hstSelHel, m_devSelHel ); copyHostFromDevice( m_hstSelCol, m_devSelCol ); if constexpr( std::is_same_v ) @@ -400,7 +408,9 @@ namespace mg5amcCpu } if( goodHelOnly ) return; m_pmek->computeMatrixElements( useChannelIds ); +#ifdef MGONGPUCPP_VERBOSE flagAbnormalMEs( m_hstMEs.data(), m_nevt ); +#endif if constexpr( std::is_same_v ) { memcpy( mes, m_hstMEs.data(), m_hstMEs.bytes() ); diff --git a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/GpuRuntime.h b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/GpuRuntime.h index 860c7fde16..6a4b946e74 100644 --- a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/GpuRuntime.h +++ b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/GpuRuntime.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: J. Teig (Jun 2023, based on earlier work by S. Roiser) for the MG5aMC CUDACPP plugin. -// Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2025) for the MG5aMC CUDACPP plugin. #ifndef MG5AMC_GPURUNTIME_H #define MG5AMC_GPURUNTIME_H 1 @@ -50,7 +50,7 @@ namespace mg5amcGpu // Set up CUDA application // ** NB: strictly speaking this is not needed when using the CUDA runtime API ** // Calling cudaSetDevice on startup is useful to properly book-keep the time spent in CUDA initialization - static void setUp( const bool debug = true ) + static void setUp( const bool debug = false ) // ZW: changed debug default to false { // ** NB: it is useful to call cudaSetDevice, or cudaFree, to properly book-keep the time spent in CUDA initialization // ** NB: otherwise, the first CUDA operation (eg a cudaMemcpyToSymbol in CPPProcess ctor) appears to take much longer! @@ -71,7 +71,7 @@ namespace mg5amcGpu // ** NB: strictly speaking this is not needed when using the CUDA runtime API ** // Calling cudaDeviceReset on shutdown is only needed for checking memory leaks in cuda-memcheck // See https://docs.nvidia.com/cuda/cuda-memcheck/index.html#leak-checking - static void tearDown( const bool debug = true ) + static void tearDown( const bool debug = false ) // ZW: changed debug default to false { if( debug ) std::cout << "__GpuRuntime: calling GpuDeviceReset()" << std::endl; checkGpu( gpuDeviceReset() ); diff --git a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/MGVersion.txt b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/MGVersion.txt index 084e244cea..77a069e39b 100644 --- a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/MGVersion.txt +++ b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/MGVersion.txt @@ -1 +1 @@ -3.6.0 \ No newline at end of file +3.6.2 \ No newline at end of file diff --git a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/MatrixElementKernels.cc b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/MatrixElementKernels.cc index f463977c1a..703ea3781c 100644 --- a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/MatrixElementKernels.cc +++ b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/MatrixElementKernels.cc @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: A. Valassi (Jan 2022) for the MG5aMC CUDACPP plugin. -// Further modified by: J. Teig, A. Valassi (2022-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: J. Teig, A. Valassi, Z. Wettersten (2022-2025) for the MG5aMC CUDACPP plugin. #include "MatrixElementKernels.h" @@ -60,7 +60,9 @@ namespace mg5amcCpu #ifdef MGONGPU_CHANNELID_DEBUG MatrixElementKernelBase::dumpNevtProcessedByChannel(); #endif +#ifdef MGONGPUCPP_VERBOSE MatrixElementKernelBase::dumpSignallingFPEs(); +#endif } //-------------------------------------------------------------------------- diff --git a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/MatrixElementKernels.h b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/MatrixElementKernels.h index 7acff4b308..8da04d7945 100644 --- a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/MatrixElementKernels.h +++ b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/MatrixElementKernels.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: A. Valassi (Jan 2022) for the MG5aMC CUDACPP plugin. -// Further modified by: J. Teig, A. Valassi (2022-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: J. Teig, A. Valassi, Z. Wettersten (2022-2025) for the MG5aMC CUDACPP plugin. #ifndef MATRIXELEMENTKERNELS_H #define MATRIXELEMENTKERNELS_H 1 @@ -134,7 +134,7 @@ namespace mg5amcCpu // Does this host system support the SIMD used in the matrix element calculation? // [NB: this is private, SIMD vectorization in mg5amc C++ code is currently only used in the ME calculations below MatrixElementKernelHost!] - static bool hostSupportsSIMD( const bool verbose = true ); + static bool hostSupportsSIMD( const bool verbose = false ); // ZW: default verbose false private: diff --git a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/MemoryAccessGs.h b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/MemoryAccessGs.h index 63c17a68fa..50a6aaef4d 100644 --- a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/MemoryAccessGs.h +++ b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/MemoryAccessGs.h @@ -128,6 +128,14 @@ namespace mg5amcCpu #endif } + // Locate a field (output) in a memory buffer (input) from a kernel event-indexing mechanism (internal) + // [Signature (SCALAR OR VECTOR) ===> fptype_sv* kernelAccess( fptype* buffer ) <===] + static __host__ __device__ inline fptype_sv* + kernelAccessP( fptype* buffer ) + { + return reinterpret_cast( buffer ); + } + // Locate a field (output) in a memory buffer (input) from a kernel event-indexing mechanism (internal) and the given field indexes (input) // [Signature (const, SCALAR) ===> const fptype& kernelAccessConst( const fptype* buffer ) <===] static constexpr auto kernelAccessConst_s = diff --git a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/MemoryBuffers.h b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/MemoryBuffers.h index 65a101888d..17ba7a89e5 100644 --- a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/MemoryBuffers.h +++ b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/MemoryBuffers.h @@ -13,6 +13,7 @@ #include "CPPProcess.h" #include "GpuRuntime.h" #include "Parameters_sm.h" +#include "processConfig.h" #include @@ -274,7 +275,8 @@ namespace mg5amcCpu typedef BufferBase BufferNumerators; // The size (number of elements) per event in a memory buffer for numerators - constexpr size_t sizePerEventNumerators = 1; + // (should be equal to the number of diagrams in the process) + constexpr size_t sizePerEventNumerators = processConfig::ndiagrams; #ifndef MGONGPUCPP_GPUIMPL // A class encapsulating a C++ host buffer for gs 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 c508e73f26..14cfeeef39 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 @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -25,6 +25,7 @@ #include "MemoryAccessMatrixElements.h" #include "MemoryAccessMomenta.h" #include "MemoryAccessWavefunctions.h" +#include "processConfig.h" #ifdef MGONGPU_SUPPORTS_MULTICHANNEL #include "MemoryAccessDenominators.h" @@ -96,6 +97,69 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { +#ifdef MGONGPU_SUPPORTS_MULTICHANNEL + __device__ INLINE unsigned int getChannelId( const unsigned int* allChannelIds +#ifndef MGONGPUCPP_GPUIMPL + , + const int ievt00, + bool sanityCheckMixedPrecision = true +#endif + ) + { + unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr +#ifdef MGONGPUCPP_GPUIMPL + using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page + if( allChannelIds != nullptr ) + { + const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) + const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) + // NB: channelIds_sv is a scalar in CUDA + channelId = channelIds_sv; + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + } +#else // Cuda or C++ + using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + if( allChannelIds != nullptr ) + { + // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) + const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 + uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) +#ifndef MGONGPU_CPPSIMD + // NB: channelIds_sv is a scalar in no-SIMD C++ + channelId = channelIds_sv; +#else + // NB: channelIds_sv is a vector in SIMD C++ + channelId = channelIds_sv[0]; // element[0] + for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] + { + assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId + } +#endif + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + if( sanityCheckMixedPrecision ) + { +#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT + // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) + const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 + uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + for( int i = 0; i < neppV; ++i ) + { + assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector + } +#endif + } + } +#endif // MGONGPUCPP_GPUIMPL + return channelId; + } +#endif // MGONGPU_SUPPORTS_MULTICHANNEL + constexpr int nw6 = CPPProcess::nw6; // dimensions of each wavefunction (HELAS KEK 91-11): e.g. 6 for e+ e- -> mu+ mu- (fermions and vectors) constexpr int npar = CPPProcess::npar; // #particles in total (external = initial + final): e.g. 4 for e+ e- -> mu+ mu- constexpr int ncomb = CPPProcess::ncomb; // #helicity combinations: e.g. 16 for e+ e- -> mu+ mu- (2**4 = fermion spin up/down ** npar) @@ -305,7 +369,7 @@ namespace mg5amcCpu COUPs[ndcoup + iicoup] = allCOUPs[ndcoup + iicoup]; // independent couplings, fixed for all events fptype* MEs = E_ACCESS::ieventAccessRecord( allMEs, ievt0 ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); #endif #endif @@ -315,7 +379,7 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Numerators and denominators for the current event (CUDA) or SIMD event page (C++) - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); #endif @@ -374,8 +438,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 2 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] ); + if( channelId != 0 ) + { + numerators_sv[1] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[6] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -394,8 +461,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 3 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] ); + if( channelId != 0 ) + { + numerators_sv[2] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[7] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -414,8 +484,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 4 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] ); + if( channelId != 0 ) + { + numerators_sv[3] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[1] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -435,8 +508,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 5 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] ); + if( channelId != 0 ) + { + numerators_sv[4] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[16] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[17] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -449,8 +525,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 6 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] ); + if( channelId != 0 ) + { + numerators_sv[5] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[12] += amp_sv[0]; jamp_sv[14] -= amp_sv[0]; @@ -465,8 +544,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 7 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] ); + if( channelId != 0 ) + { + numerators_sv[6] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[12] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[14] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -479,8 +561,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 8 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] ); + if( channelId != 0 ) + { + numerators_sv[7] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[22] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[23] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -493,8 +578,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 9 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] ); + if( channelId != 0 ) + { + numerators_sv[8] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[18] += amp_sv[0]; jamp_sv[20] -= amp_sv[0]; @@ -509,8 +597,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 10 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] ); + if( channelId != 0 ) + { + numerators_sv[9] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[18] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[20] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -523,8 +614,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 11 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] ); + if( channelId != 0 ) + { + numerators_sv[10] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[7] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -537,8 +631,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 12 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] ); + if( channelId != 0 ) + { + numerators_sv[11] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += amp_sv[0]; jamp_sv[7] -= amp_sv[0]; @@ -553,8 +650,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 13 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] ); + if( channelId != 0 ) + { + numerators_sv[12] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[6] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -567,8 +667,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 14 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] ); + if( channelId != 0 ) + { + numerators_sv[13] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += amp_sv[0]; jamp_sv[6] -= amp_sv[0]; @@ -583,8 +686,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 15 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] ); + if( channelId != 0 ) + { + numerators_sv[14] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += amp_sv[0]; jamp_sv[1] -= amp_sv[0]; @@ -599,8 +705,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 16 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] ); + if( channelId != 0 ) + { + numerators_sv[15] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[16] += amp_sv[0]; jamp_sv[17] -= amp_sv[0]; @@ -617,8 +726,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 17 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] ); + if( channelId != 0 ) + { + numerators_sv[16] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[3] -= amp_sv[0]; @@ -630,8 +742,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 18 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] ); + if( channelId != 0 ) + { + numerators_sv[17] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[5] -= amp_sv[0]; @@ -643,8 +758,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 19 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] ); + if( channelId != 0 ) + { + numerators_sv[18] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[3] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[5] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -658,8 +776,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 20 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] ); + if( channelId != 0 ) + { + numerators_sv[19] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += amp_sv[0]; jamp_sv[2] -= amp_sv[0]; @@ -674,8 +795,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 21 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] ); + if( channelId != 0 ) + { + numerators_sv[20] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[5] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -688,8 +812,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 22 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] ); + if( channelId != 0 ) + { + numerators_sv[21] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[2] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -702,8 +829,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 23 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] ); + if( channelId != 0 ) + { + numerators_sv[22] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += amp_sv[0]; jamp_sv[2] -= amp_sv[0]; @@ -718,8 +848,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 24 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] ); + if( channelId != 0 ) + { + numerators_sv[23] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[3] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -732,8 +865,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 25 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] ); + if( channelId != 0 ) + { + numerators_sv[24] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[4] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -746,8 +882,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 26 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] ); + if( channelId != 0 ) + { + numerators_sv[25] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] -= amp_sv[0]; @@ -759,8 +898,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 27 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] ); + if( channelId != 0 ) + { + numerators_sv[26] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] -= amp_sv[0]; @@ -772,8 +914,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 28 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] ); + if( channelId != 0 ) + { + numerators_sv[27] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= amp_sv[0]; @@ -785,8 +930,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 29 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] ); + if( channelId != 0 ) + { + numerators_sv[28] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] -= amp_sv[0]; @@ -798,8 +946,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 30 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] ); + if( channelId != 0 ) + { + numerators_sv[29] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[1] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -812,8 +963,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 31 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] ); + if( channelId != 0 ) + { + numerators_sv[30] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += amp_sv[0]; jamp_sv[1] -= amp_sv[0]; @@ -854,8 +1008,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 33 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] ); + if( channelId != 0 ) + { + numerators_sv[32] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[11] -= amp_sv[0]; @@ -867,8 +1024,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 34 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] ); + if( channelId != 0 ) + { + numerators_sv[33] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[9] -= amp_sv[0]; @@ -880,8 +1040,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 35 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] ); + if( channelId != 0 ) + { + numerators_sv[34] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[9] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[11] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -894,8 +1057,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 36 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] ); + if( channelId != 0 ) + { + numerators_sv[35] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[9] += amp_sv[0]; jamp_sv[15] -= amp_sv[0]; @@ -910,8 +1076,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 37 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] ); + if( channelId != 0 ) + { + numerators_sv[36] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[9] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[15] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -924,8 +1093,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 38 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] ); + if( channelId != 0 ) + { + numerators_sv[37] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[21] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[23] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -938,8 +1110,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 39 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] ); + if( channelId != 0 ) + { + numerators_sv[38] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[11] += amp_sv[0]; jamp_sv[15] -= amp_sv[0]; @@ -954,8 +1129,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 40 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] ); + if( channelId != 0 ) + { + numerators_sv[39] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[11] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[21] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -968,8 +1146,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 41 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] ); + if( channelId != 0 ) + { + numerators_sv[40] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[15] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[17] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -982,8 +1163,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 42 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] ); + if( channelId != 0 ) + { + numerators_sv[41] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[17] -= amp_sv[0]; @@ -995,8 +1179,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 43 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] ); + if( channelId != 0 ) + { + numerators_sv[42] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[15] -= amp_sv[0]; @@ -1008,8 +1195,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 44 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] ); + if( channelId != 0 ) + { + numerators_sv[43] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[23] -= amp_sv[0]; @@ -1021,8 +1211,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 45 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] ); + if( channelId != 0 ) + { + numerators_sv[44] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[21] -= amp_sv[0]; @@ -1034,8 +1227,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 46 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] ); + if( channelId != 0 ) + { + numerators_sv[45] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[17] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[23] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1048,8 +1244,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 47 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] ); + if( channelId != 0 ) + { + numerators_sv[46] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[9] += amp_sv[0]; jamp_sv[11] -= amp_sv[0]; @@ -1087,8 +1286,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 49 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] ); + if( channelId != 0 ) + { + numerators_sv[48] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[10] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[11] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1101,8 +1303,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 50 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] ); + if( channelId != 0 ) + { + numerators_sv[49] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[6] += amp_sv[0]; jamp_sv[8] -= amp_sv[0]; @@ -1117,8 +1322,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 51 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] ); + if( channelId != 0 ) + { + numerators_sv[50] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[6] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[8] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1131,8 +1339,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 52 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] ); + if( channelId != 0 ) + { + numerators_sv[51] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[3] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[13] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1145,8 +1356,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 53 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] ); + if( channelId != 0 ) + { + numerators_sv[52] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[3] += amp_sv[0]; jamp_sv[13] -= amp_sv[0]; @@ -1161,8 +1375,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 54 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] ); + if( channelId != 0 ) + { + numerators_sv[53] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[19] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[22] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1175,8 +1392,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 55 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] ); + if( channelId != 0 ) + { + numerators_sv[54] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] += amp_sv[0]; jamp_sv[3] -= amp_sv[0]; @@ -1191,8 +1411,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 56 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] ); + if( channelId != 0 ) + { + numerators_sv[55] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[10] += amp_sv[0]; jamp_sv[11] -= amp_sv[0]; @@ -1207,8 +1430,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 57 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] ); + if( channelId != 0 ) + { + numerators_sv[56] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[3] += cxtype( 0, 1 ) * amp_sv[0]; @@ -1261,8 +1487,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 59 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] ); + if( channelId != 0 ) + { + numerators_sv[58] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[6] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1281,8 +1510,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 60 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] ); + if( channelId != 0 ) + { + numerators_sv[59] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[3] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[6] += cxtype( 0, 1 ) * amp_sv[0]; @@ -1301,8 +1533,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 61 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] ); + if( channelId != 0 ) + { + numerators_sv[60] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[19] += amp_sv[0]; jamp_sv[20] -= amp_sv[0]; @@ -1317,8 +1552,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 62 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] ); + if( channelId != 0 ) + { + numerators_sv[61] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[20] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[21] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1331,8 +1569,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 63 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] ); + if( channelId != 0 ) + { + numerators_sv[62] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] += amp_sv[0]; jamp_sv[6] -= amp_sv[0]; @@ -1347,8 +1588,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 64 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] ); + if( channelId != 0 ) + { + numerators_sv[63] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[12] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1362,8 +1606,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 65 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] ); + if( channelId != 0 ) + { + numerators_sv[64] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[8] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[9] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1376,8 +1623,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 66 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] ); + if( channelId != 0 ) + { + numerators_sv[65] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[7] += amp_sv[0]; jamp_sv[8] -= amp_sv[0]; @@ -1392,8 +1642,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 67 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] ); + if( channelId != 0 ) + { + numerators_sv[66] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[7] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[10] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1406,8 +1659,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 68 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] ); + if( channelId != 0 ) + { + numerators_sv[67] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[5] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[19] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1420,8 +1676,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 69 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] ); + if( channelId != 0 ) + { + numerators_sv[68] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[5] += amp_sv[0]; jamp_sv[13] -= amp_sv[0]; @@ -1436,8 +1695,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 70 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] ); + if( channelId != 0 ) + { + numerators_sv[69] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[13] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[16] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1450,8 +1712,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 71 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] ); + if( channelId != 0 ) + { + numerators_sv[70] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] += amp_sv[0]; jamp_sv[5] -= amp_sv[0]; @@ -1466,8 +1731,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 72 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] ); + if( channelId != 0 ) + { + numerators_sv[71] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[8] += amp_sv[0]; jamp_sv[9] -= amp_sv[0]; @@ -1482,8 +1750,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 73 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] ); + if( channelId != 0 ) + { + numerators_sv[72] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[5] += cxtype( 0, 1 ) * amp_sv[0]; @@ -1536,8 +1807,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 75 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] ); + if( channelId != 0 ) + { + numerators_sv[74] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[7] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1556,8 +1830,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 76 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] ); + if( channelId != 0 ) + { + numerators_sv[75] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[5] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[7] += cxtype( 0, 1 ) * amp_sv[0]; @@ -1576,8 +1853,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 77 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] ); + if( channelId != 0 ) + { + numerators_sv[76] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[13] += amp_sv[0]; jamp_sv[14] -= amp_sv[0]; @@ -1592,8 +1872,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 78 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] ); + if( channelId != 0 ) + { + numerators_sv[77] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[14] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[15] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1606,8 +1889,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 79 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] ); + if( channelId != 0 ) + { + numerators_sv[78] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] += amp_sv[0]; jamp_sv[7] -= amp_sv[0]; @@ -1622,8 +1908,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 80 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] ); + if( channelId != 0 ) + { + numerators_sv[79] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[18] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1636,8 +1925,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 81 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] ); + if( channelId != 0 ) + { + numerators_sv[80] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[7] -= amp_sv[0]; @@ -1649,8 +1941,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 82 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] ); + if( channelId != 0 ) + { + numerators_sv[81] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[10] -= amp_sv[0]; @@ -1662,8 +1957,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 83 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] ); + if( channelId != 0 ) + { + numerators_sv[82] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[6] -= amp_sv[0]; @@ -1675,8 +1973,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 84 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] ); + if( channelId != 0 ) + { + numerators_sv[83] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[8] -= amp_sv[0]; @@ -1688,8 +1989,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 85 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] ); + if( channelId != 0 ) + { + numerators_sv[84] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[6] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[7] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1702,8 +2006,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 86 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] ); + if( channelId != 0 ) + { + numerators_sv[85] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[6] += amp_sv[0]; jamp_sv[7] -= amp_sv[0]; @@ -1718,8 +2025,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 87 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] ); + if( channelId != 0 ) + { + numerators_sv[86] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[16] -= amp_sv[0]; @@ -1731,8 +2041,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 88 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] ); + if( channelId != 0 ) + { + numerators_sv[87] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[13] -= amp_sv[0]; @@ -1744,8 +2057,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 89 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] ); + if( channelId != 0 ) + { + numerators_sv[88] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[22] -= amp_sv[0]; @@ -1757,8 +2073,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 90 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] ); + if( channelId != 0 ) + { + numerators_sv[89] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[19] -= amp_sv[0]; @@ -1770,8 +2089,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 91 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] ); + if( channelId != 0 ) + { + numerators_sv[90] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[16] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[22] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1784,8 +2106,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 92 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] ); + if( channelId != 0 ) + { + numerators_sv[91] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[3] += amp_sv[0]; jamp_sv[5] -= amp_sv[0]; @@ -1834,8 +2159,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 94 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] ); + if( channelId != 0 ) + { + numerators_sv[93] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[2] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1854,8 +2182,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 95 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] ); + if( channelId != 0 ) + { + numerators_sv[94] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[2] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1874,8 +2205,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 96 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] ); + if( channelId != 0 ) + { + numerators_sv[95] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[18] += amp_sv[0]; jamp_sv[19] -= amp_sv[0]; @@ -1890,8 +2224,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 97 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] ); + if( channelId != 0 ) + { + numerators_sv[96] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[18] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[19] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1904,8 +2241,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 98 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] ); + if( channelId != 0 ) + { + numerators_sv[97] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += amp_sv[0]; jamp_sv[2] -= amp_sv[0]; @@ -1920,8 +2260,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 99 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] ); + if( channelId != 0 ) + { + numerators_sv[98] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[8] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[14] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1968,8 +2311,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 101 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] ); + if( channelId != 0 ) + { + numerators_sv[100] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[4] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1988,8 +2334,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 102 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] ); + if( channelId != 0 ) + { + numerators_sv[101] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[2] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -2008,8 +2357,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 103 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] ); + if( channelId != 0 ) + { + numerators_sv[102] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[12] += amp_sv[0]; jamp_sv[13] -= amp_sv[0]; @@ -2024,8 +2376,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 104 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] ); + if( channelId != 0 ) + { + numerators_sv[103] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[12] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[13] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -2038,8 +2393,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 105 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] ); + if( channelId != 0 ) + { + numerators_sv[104] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += amp_sv[0]; jamp_sv[4] -= amp_sv[0]; @@ -2054,8 +2412,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 106 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] ); + if( channelId != 0 ) + { + numerators_sv[105] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[10] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[20] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -2102,8 +2463,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 108 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] ); + if( channelId != 0 ) + { + numerators_sv[107] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[1] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -2122,8 +2486,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 109 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] ); + if( channelId != 0 ) + { + numerators_sv[108] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[3] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[5] += cxtype( 0, 1 ) * amp_sv[0]; @@ -2142,8 +2509,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 110 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] ); + if( channelId != 0 ) + { + numerators_sv[109] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[12] -= amp_sv[0]; @@ -2155,8 +2525,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 111 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] ); + if( channelId != 0 ) + { + numerators_sv[110] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[14] -= amp_sv[0]; @@ -2168,8 +2541,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 112 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] ); + if( channelId != 0 ) + { + numerators_sv[111] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[18] -= amp_sv[0]; @@ -2181,8 +2557,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 113 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] ); + if( channelId != 0 ) + { + numerators_sv[112] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[20] -= amp_sv[0]; @@ -2718,7 +3097,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- @@ -3090,9 +3471,6 @@ namespace mg5amcCpu #ifdef MGONGPUCPP_GPUIMPL // Remember: in CUDA this is a kernel for one event, in c++ this processes n events const int ievt = blockDim.x * blockIdx.x + threadIdx.x; // index of event (thread) in grid -#ifdef MGONGPU_SUPPORTS_MULTICHANNEL - using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events -#endif #else //assert( (size_t)(allmomenta) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] //assert( (size_t)(allMEs) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] @@ -3100,7 +3478,6 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL using NUM_ACCESS = HostAccessNumerators; // non-trivial access: buffer includes all events using DEN_ACCESS = HostAccessDenominators; // non-trivial access: buffer includes all events - using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events #endif #endif @@ -3125,11 +3502,12 @@ namespace mg5amcCpu fptype_sv& MEs_sv = E_ACCESS::kernelAccess( MEs ); MEs_sv = fptype_sv{ 0 }; #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - numerators_sv = fptype_sv{ 0 }; + for( int i = 0; i < processConfig::ndiagrams; ++i ) + numerators_sv[i] = fptype_sv{ 0 }; denominators_sv = fptype_sv{ 0 }; #endif } @@ -3142,17 +3520,7 @@ namespace mg5amcCpu // *** START OF PART 1a - CUDA (one event per GPU thread) *** #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) - const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) - // NB: channelIds_sv is a scalar in CUDA - channelId = channelIds_sv; - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) - } + unsigned int channelId = getChannelId( allChannelIds ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (for the single event processed in calculate_wavefunctions) @@ -3267,38 +3635,7 @@ namespace mg5amcCpu const int ievt00 = ipagV2 * neppV; // loop on one SIMD page (neppV events) at a time #endif #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) - const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 - uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) -#ifndef MGONGPU_CPPSIMD - // NB: channelIds_sv is a scalar in no-SIMD C++ - channelId = channelIds_sv; -#else - // NB: channelIds_sv is a vector in SIMD C++ - channelId = channelIds_sv[0]; // element[0] - for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] - { - assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId - } -#endif - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) -#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT - // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) - const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 - uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - for( int i = 0; i < neppV; ++i ) - { - assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector - } -#endif - } + unsigned int channelId = getChannelId( allChannelIds, ievt00 ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (jamp2[nParity][ncolor][neppV] for the SIMD vector - or the two SIMD vectors - of events processed in calculate_wavefunctions) @@ -3471,11 +3808,12 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( allChannelIds != nullptr ) // fix segfault #892 (not 'channelIds[0] != 0') { - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + const unsigned int channelId = getChannelId( allChannelIds, ievt0, false ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - MEs_sv *= numerators_sv / denominators_sv; + MEs_sv *= numerators_sv[channelId - 1] / denominators_sv; } #endif //for( int ieppV = 0; ieppV < neppV; ieppV++ ) diff --git a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg/CPPProcess.h b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg/CPPProcess.h index 2b75e0f842..05b2f0ceaa 100644 --- a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg/CPPProcess.h +++ b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg/auto_dsig.f b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg/auto_dsig.f index c087f3f747..91f78744cf 100644 --- a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg/auto_dsig.f +++ b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C 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 ce5493be9b..d9ada568e2 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 @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -137,14 +137,14 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDDO QSCALE=QSCALE/2D0 ELSE - QSCALE=DSQRT(Q2FACT(IB(1))) + QSCALE=DSQRT(Q2FACT(1)) ENDIF G1=PDG2PDF(LPP(IB(1)),0, IB(1),XBK(IB(1)), QSCALE) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) IF (DSQRT(Q2FACT(IB(2))).NE.0D0) THEN - QSCALE=DSQRT(Q2FACT(IB(2))) + QSCALE=DSQRT(Q2FACT(2)) ENDIF G2=PDG2PDF(LPP(IB(2)),0, IB(2),XBK(IB(2)), QSCALE) ENDIF @@ -219,7 +219,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -290,6 +290,10 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, INTEGER I_EE C +C STUFF FOR UPC +C + DOUBLE PRECISION PHOTONPDFSQUARE +C C EXTERNAL FUNCTIONS C LOGICAL PASSCUTS @@ -373,12 +377,12 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, IF (ABS(LPP(IB(1))).GE.1) THEN C LP=SIGN(1,LPP(IB(1))) G1(IVEC)=PDG2PDF(LPP(IB(1)),0, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) G2(IVEC)=PDG2PDF(LPP(IB(2)),0, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) ENDIF ENDDO ! IWARP LOOP ENDDO ! CURRWARP LOOP diff --git a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg/card.png b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg/card.png new file mode 100644 index 0000000000..31ddc02e81 Binary files /dev/null and b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg/card.png differ 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 3ea53d8b21..5c9c38d121 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 @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -355,7 +355,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -398,7 +398,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C INTEGER I,J,M,N COMPLEX*16 ZTEMP, TMP_JAMP(155) - REAL*8 CF(NCOLOR,NCOLOR) + INTEGER CF(NCOLOR*(NCOLOR+1)/2) + INTEGER DENOM, CF_INDEX COMPLEX*16 AMP(NGRAPHS), JAMP(NCOLOR,NAMPSO) COMPLEX*16 W(6,NWAVEFUNCS) C Needed for v4 models @@ -441,397 +442,67 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C C COLOR DATA C - DATA (CF(I, 1),I= 1, 6) /9.481481481481481D+00, - $ -1.185185185185185D+00,-1.185185185185185D+00 - $ ,1.481481481481481D-01,1.481481481481481D-01,1.481481481481481D - $ +00/ - DATA (CF(I, 1),I= 7, 12) /-1.185185185185185D+00 - $ ,1.481481481481481D-01,1.481481481481481D-01, - $ -1.851851851851852D-02,-1.851851851851852D-02, - $ -1.851851851851852D-01/ - DATA (CF(I, 1),I= 13, 18) /1.481481481481481D-01, - $ -1.851851851851852D-02,1.481481481481481D+00, - $ -1.851851851851852D-01,1.314814814814815D+00,1.148148148148148D - $ +00/ - DATA (CF(I, 1),I= 19, 24) /-1.851851851851852D-02, - $ -1.851851851851852D-01,-1.851851851851852D-01 - $ ,1.148148148148148D+00,1.148148148148148D+00, - $ -5.185185185185185D-01/ + DATA DENOM/54/ + DATA (CF(I),I= 1, 24) /512,-128,-128,16,16,160,-128,16,16,-2,-2 + $ ,-20,16,-2,160,-20,142,124,-2,-20,-20,124,124,-56/ C 1 T(1,2,5,6,3,4) - DATA (CF(I, 2),I= 1, 6) /-1.185185185185185D+00 - $ ,9.481481481481481D+00,1.481481481481481D-01,1.481481481481481D - $ +00,-1.185185185185185D+00,1.481481481481481D-01/ - DATA (CF(I, 2),I= 7, 12) /1.481481481481481D-01, - $ -1.185185185185185D+00,-1.851851851851852D-02, - $ -1.851851851851852D-01,1.481481481481481D-01, - $ -1.851851851851852D-02/ - DATA (CF(I, 2),I= 13, 18) /-1.851851851851852D-02, - $ -1.851851851851852D-01,-1.851851851851852D-01 - $ ,1.148148148148148D+00,1.148148148148148D+00, - $ -5.185185185185185D-01/ - DATA (CF(I, 2),I= 19, 24) /1.481481481481481D-01, - $ -1.851851851851852D-02,1.481481481481481D+00, - $ -1.851851851851852D-01,1.314814814814815D+00,1.148148148148148D - $ +00/ + DATA (CF(I),I= 25, 47) /512,16,160,-128,16,16,-128,-2,-20,16,-2, + $ -2,-20,-20,124,124,-56,16,-2,160,-20,142,124/ C 1 T(1,2,6,5,3,4) - DATA (CF(I, 3),I= 1, 6) /-1.185185185185185D+00 - $ ,1.481481481481481D-01,9.481481481481481D+00, - $ -1.185185185185185D+00,1.481481481481481D+00,1.481481481481481D - $ -01/ - DATA (CF(I, 3),I= 7, 12) /1.481481481481481D-01, - $ -1.851851851851852D-02,1.481481481481481D+00, - $ -1.851851851851852D-01,1.314814814814815D+00,1.148148148148148D - $ +00/ - DATA (CF(I, 3),I= 13, 18) /-1.185185185185185D+00 - $ ,1.481481481481481D-01,1.481481481481481D-01, - $ -1.851851851851852D-02,-1.851851851851852D-02, - $ -1.851851851851852D-01/ - DATA (CF(I, 3),I= 19, 24) /-1.851851851851852D-01, - $ -1.851851851851852D-02,1.148148148148148D+00, - $ -5.185185185185185D-01,-1.851851851851852D-01 - $ ,1.148148148148148D+00/ + DATA (CF(I),I= 48, 69) /512,-128,160,16,16,-2,160,-20,142,124, + $ -128,16,16,-2,-2,-20,-20,-2,124,-56,-20,124/ C 1 T(1,5,2,6,3,4) - DATA (CF(I, 4),I= 1, 6) /1.481481481481481D-01 - $ ,1.481481481481481D+00,-1.185185185185185D+00 - $ ,9.481481481481481D+00,1.481481481481481D-01, - $ -1.185185185185185D+00/ - DATA (CF(I, 4),I= 7, 12) /-1.851851851851852D-02, - $ -1.851851851851852D-01,-1.851851851851852D-01 - $ ,1.148148148148148D+00,1.148148148148148D+00, - $ -5.185185185185185D-01/ - DATA (CF(I, 4),I= 13, 18) /1.481481481481481D-01, - $ -1.185185185185185D+00,-1.851851851851852D-02, - $ -1.851851851851852D-01,1.481481481481481D-01, - $ -1.851851851851852D-02/ - DATA (CF(I, 4),I= 19, 24) /-1.851851851851852D-02 - $ ,1.481481481481481D-01,1.314814814814815D+00,1.148148148148148D - $ +00,1.481481481481481D+00,-1.851851851851852D-01/ + DATA (CF(I),I= 70, 90) /512,16,-128,-2,-20,-20,124,124,-56,16, + $ -128,-2,-20,16,-2,-2,16,142,124,160,-20/ C 1 T(1,5,6,2,3,4) - DATA (CF(I, 5),I= 1, 6) /1.481481481481481D-01, - $ -1.185185185185185D+00,1.481481481481481D+00,1.481481481481481D - $ -01,9.481481481481481D+00,-1.185185185185185D+00/ - DATA (CF(I, 5),I= 7, 12) /-1.851851851851852D-02 - $ ,1.481481481481481D-01,1.314814814814815D+00,1.148148148148148D - $ +00,1.481481481481481D+00,-1.851851851851852D-01/ - DATA (CF(I, 5),I= 13, 18) /-1.851851851851852D-01, - $ -1.851851851851852D-02,1.148148148148148D+00, - $ -5.185185185185185D-01,-1.851851851851852D-01 - $ ,1.148148148148148D+00/ - DATA (CF(I, 5),I= 19, 24) /-1.185185185185185D+00 - $ ,1.481481481481481D-01,1.481481481481481D-01, - $ -1.851851851851852D-02,-1.851851851851852D-02, - $ -1.851851851851852D-01/ + DATA (CF(I),I= 91,110) /512,-128,-2,16,142,124,160,-20,-20,-2 + $ ,124,-56,-20,124,-128,16,16,-2,-2,-20/ C 1 T(1,6,2,5,3,4) - DATA (CF(I, 6),I= 1, 6) /1.481481481481481D+00 - $ ,1.481481481481481D-01,1.481481481481481D-01, - $ -1.185185185185185D+00,-1.185185185185185D+00 - $ ,9.481481481481481D+00/ - DATA (CF(I, 6),I= 7, 12) /-1.851851851851852D-01, - $ -1.851851851851852D-02,1.148148148148148D+00, - $ -5.185185185185185D-01,-1.851851851851852D-01 - $ ,1.148148148148148D+00/ - DATA (CF(I, 6),I= 13, 18) /-1.851851851851852D-02 - $ ,1.481481481481481D-01,1.314814814814815D+00,1.148148148148148D - $ +00,1.481481481481481D+00,-1.851851851851852D-01/ - DATA (CF(I, 6),I= 19, 24) /1.481481481481481D-01, - $ -1.185185185185185D+00,-1.851851851851852D-02, - $ -1.851851851851852D-01,1.481481481481481D-01, - $ -1.851851851851852D-02/ + DATA (CF(I),I=111,129) /512,-20,-2,124,-56,-20,124,-2,16,142,124 + $ ,160,-20,16,-128,-2,-20,16,-2/ C 1 T(1,6,5,2,3,4) - DATA (CF(I, 7),I= 1, 6) /-1.185185185185185D+00 - $ ,1.481481481481481D-01,1.481481481481481D-01, - $ -1.851851851851852D-02,-1.851851851851852D-02, - $ -1.851851851851852D-01/ - DATA (CF(I, 7),I= 7, 12) /9.481481481481481D+00, - $ -1.185185185185185D+00,-1.185185185185185D+00 - $ ,1.481481481481481D-01,1.481481481481481D-01,1.481481481481481D - $ +00/ - DATA (CF(I, 7),I= 13, 18) /1.481481481481481D+00, - $ -1.851851851851852D-01,1.481481481481481D-01, - $ -1.851851851851852D-02,1.148148148148148D+00,1.314814814814815D - $ +00/ - DATA (CF(I, 7),I= 19, 24) /-1.851851851851852D-01 - $ ,1.148148148148148D+00,-1.851851851851852D-02, - $ -1.851851851851852D-01,-5.185185185185185D-01 - $ ,1.148148148148148D+00/ + DATA (CF(I),I=130,147) /512,-128,-128,16,16,160,160,-20,16,-2 + $ ,124,142,-20,124,-2,-20,-56,124/ C 1 T(2,1,5,6,3,4) - DATA (CF(I, 8),I= 1, 6) /1.481481481481481D-01, - $ -1.185185185185185D+00,-1.851851851851852D-02, - $ -1.851851851851852D-01,1.481481481481481D-01, - $ -1.851851851851852D-02/ - DATA (CF(I, 8),I= 7, 12) /-1.185185185185185D+00 - $ ,9.481481481481481D+00,1.481481481481481D-01,1.481481481481481D - $ +00,-1.185185185185185D+00,1.481481481481481D-01/ - DATA (CF(I, 8),I= 13, 18) /-1.851851851851852D-01 - $ ,1.148148148148148D+00,-1.851851851851852D-02, - $ -1.851851851851852D-01,-5.185185185185185D-01 - $ ,1.148148148148148D+00/ - DATA (CF(I, 8),I= 19, 24) /1.481481481481481D+00, - $ -1.851851851851852D-01,1.481481481481481D-01, - $ -1.851851851851852D-02,1.148148148148148D+00,1.314814814814815D - $ +00/ + DATA (CF(I),I=148,164) /512,16,160,-128,16,-20,124,-2,-20,-56 + $ ,124,160,-20,16,-2,124,142/ C 1 T(2,1,6,5,3,4) - DATA (CF(I, 9),I= 1, 6) /1.481481481481481D-01, - $ -1.851851851851852D-02,1.481481481481481D+00, - $ -1.851851851851852D-01,1.314814814814815D+00,1.148148148148148D - $ +00/ - DATA (CF(I, 9),I= 7, 12) /-1.185185185185185D+00 - $ ,1.481481481481481D-01,9.481481481481481D+00, - $ -1.185185185185185D+00,1.481481481481481D+00,1.481481481481481D - $ -01/ - DATA (CF(I, 9),I= 13, 18) /1.481481481481481D-01, - $ -1.851851851851852D-02,-1.185185185185185D+00 - $ ,1.481481481481481D-01,-1.851851851851852D-01, - $ -1.851851851851852D-02/ - DATA (CF(I, 9),I= 19, 24) /1.148148148148148D+00, - $ -5.185185185185185D-01,-1.851851851851852D-01, - $ -1.851851851851852D-02,1.148148148148148D+00, - $ -1.851851851851852D-01/ + DATA (CF(I),I=165,180) /512,-128,160,16,16,-2,-128,16,-20,-2,124 + $ ,-56,-20,-2,124,-20/ C 1 T(2,5,1,6,3,4) - DATA (CF(I, 10),I= 1, 6) /-1.851851851851852D-02, - $ -1.851851851851852D-01,-1.851851851851852D-01 - $ ,1.148148148148148D+00,1.148148148148148D+00, - $ -5.185185185185185D-01/ - DATA (CF(I, 10),I= 7, 12) /1.481481481481481D-01 - $ ,1.481481481481481D+00,-1.185185185185185D+00 - $ ,9.481481481481481D+00,1.481481481481481D-01, - $ -1.185185185185185D+00/ - DATA (CF(I, 10),I= 13, 18) /-1.851851851851852D-02, - $ -1.851851851851852D-01,1.481481481481481D-01, - $ -1.185185185185185D+00,-1.851851851851852D-02 - $ ,1.481481481481481D-01/ - DATA (CF(I, 10),I= 19, 24) /1.314814814814815D+00 - $ ,1.148148148148148D+00,-1.851851851851852D-02 - $ ,1.481481481481481D-01,-1.851851851851852D-01 - $ ,1.481481481481481D+00/ + DATA (CF(I),I=181,195) /512,16,-128,-2,-20,16,-128,-2,16,142,124 + $ ,-2,16,-20,160/ C 1 T(2,5,6,1,3,4) - DATA (CF(I, 11),I= 1, 6) /-1.851851851851852D-02 - $ ,1.481481481481481D-01,1.314814814814815D+00,1.148148148148148D - $ +00,1.481481481481481D+00,-1.851851851851852D-01/ - DATA (CF(I, 11),I= 7, 12) /1.481481481481481D-01, - $ -1.185185185185185D+00,1.481481481481481D+00,1.481481481481481D - $ -01,9.481481481481481D+00,-1.185185185185185D+00/ - DATA (CF(I, 11),I= 13, 18) /1.148148148148148D+00, - $ -5.185185185185185D-01,-1.851851851851852D-01, - $ -1.851851851851852D-02,1.148148148148148D+00, - $ -1.851851851851852D-01/ - DATA (CF(I, 11),I= 19, 24) /1.481481481481481D-01, - $ -1.851851851851852D-02,-1.185185185185185D+00 - $ ,1.481481481481481D-01,-1.851851851851852D-01, - $ -1.851851851851852D-02/ + DATA (CF(I),I=196,209) /512,-128,124,-56,-20,-2,124,-20,16,-2, + $ -128,16,-20,-2/ C 1 T(2,6,1,5,3,4) - DATA (CF(I, 12),I= 1, 6) /-1.851851851851852D-01, - $ -1.851851851851852D-02,1.148148148148148D+00, - $ -5.185185185185185D-01,-1.851851851851852D-01 - $ ,1.148148148148148D+00/ - DATA (CF(I, 12),I= 7, 12) /1.481481481481481D+00 - $ ,1.481481481481481D-01,1.481481481481481D-01, - $ -1.185185185185185D+00,-1.185185185185185D+00 - $ ,9.481481481481481D+00/ - DATA (CF(I, 12),I= 13, 18) /1.314814814814815D+00 - $ ,1.148148148148148D+00,-1.851851851851852D-02 - $ ,1.481481481481481D-01,-1.851851851851852D-01 - $ ,1.481481481481481D+00/ - DATA (CF(I, 12),I= 19, 24) /-1.851851851851852D-02, - $ -1.851851851851852D-01,1.481481481481481D-01, - $ -1.185185185185185D+00,-1.851851851851852D-02 - $ ,1.481481481481481D-01/ + DATA (CF(I),I=210,222) /512,142,124,-2,16,-20,160,-2,-20,16,-128 + $ ,-2,16/ C 1 T(2,6,5,1,3,4) - DATA (CF(I, 13),I= 1, 6) /1.481481481481481D-01, - $ -1.851851851851852D-02,-1.185185185185185D+00 - $ ,1.481481481481481D-01,-1.851851851851852D-01, - $ -1.851851851851852D-02/ - DATA (CF(I, 13),I= 7, 12) /1.481481481481481D+00, - $ -1.851851851851852D-01,1.481481481481481D-01, - $ -1.851851851851852D-02,1.148148148148148D+00,1.314814814814815D - $ +00/ - DATA (CF(I, 13),I= 13, 18) /9.481481481481481D+00, - $ -1.185185185185185D+00,-1.185185185185185D+00 - $ ,1.481481481481481D-01,1.481481481481481D-01,1.481481481481481D - $ +00/ - DATA (CF(I, 13),I= 19, 24) /1.148148148148148D+00, - $ -1.851851851851852D-01,-5.185185185185185D-01 - $ ,1.148148148148148D+00,-1.851851851851852D-02, - $ -1.851851851851852D-01/ + DATA (CF(I),I=223,234) /512,-128,-128,16,16,160,124,-20,-56,124, + $ -2,-20/ C 1 T(5,1,2,6,3,4) - DATA (CF(I, 14),I= 1, 6) /-1.851851851851852D-02, - $ -1.851851851851852D-01,1.481481481481481D-01, - $ -1.185185185185185D+00,-1.851851851851852D-02 - $ ,1.481481481481481D-01/ - DATA (CF(I, 14),I= 7, 12) /-1.851851851851852D-01 - $ ,1.148148148148148D+00,-1.851851851851852D-02, - $ -1.851851851851852D-01,-5.185185185185185D-01 - $ ,1.148148148148148D+00/ - DATA (CF(I, 14),I= 13, 18) /-1.185185185185185D+00 - $ ,9.481481481481481D+00,1.481481481481481D-01,1.481481481481481D - $ +00,-1.185185185185185D+00,1.481481481481481D-01/ - DATA (CF(I, 14),I= 19, 24) /-1.851851851851852D-01 - $ ,1.481481481481481D+00,1.148148148148148D+00,1.314814814814815D - $ +00,1.481481481481481D-01,-1.851851851851852D-02/ + DATA (CF(I),I=235,245) /512,16,160,-128,16,-20,160,124,142,16,-2/ C 1 T(5,1,6,2,3,4) - DATA (CF(I, 15),I= 1, 6) /1.481481481481481D+00, - $ -1.851851851851852D-01,1.481481481481481D-01, - $ -1.851851851851852D-02,1.148148148148148D+00,1.314814814814815D - $ +00/ - DATA (CF(I, 15),I= 7, 12) /1.481481481481481D-01, - $ -1.851851851851852D-02,-1.185185185185185D+00 - $ ,1.481481481481481D-01,-1.851851851851852D-01, - $ -1.851851851851852D-02/ - DATA (CF(I, 15),I= 13, 18) /-1.185185185185185D+00 - $ ,1.481481481481481D-01,9.481481481481481D+00, - $ -1.185185185185185D+00,1.481481481481481D+00,1.481481481481481D - $ -01/ - DATA (CF(I, 15),I= 19, 24) /-5.185185185185185D-01 - $ ,1.148148148148148D+00,1.148148148148148D+00, - $ -1.851851851851852D-01,-1.851851851851852D-01, - $ -1.851851851851852D-02/ + DATA (CF(I),I=246,255) /512,-128,160,16,-56,124,124,-20,-20,-2/ C 1 T(5,2,1,6,3,4) - DATA (CF(I, 16),I= 1, 6) /-1.851851851851852D-01 - $ ,1.148148148148148D+00,-1.851851851851852D-02, - $ -1.851851851851852D-01,-5.185185185185185D-01 - $ ,1.148148148148148D+00/ - DATA (CF(I, 16),I= 7, 12) /-1.851851851851852D-02, - $ -1.851851851851852D-01,1.481481481481481D-01, - $ -1.185185185185185D+00,-1.851851851851852D-02 - $ ,1.481481481481481D-01/ - DATA (CF(I, 16),I= 13, 18) /1.481481481481481D-01 - $ ,1.481481481481481D+00,-1.185185185185185D+00 - $ ,9.481481481481481D+00,1.481481481481481D-01, - $ -1.185185185185185D+00/ - DATA (CF(I, 16),I= 19, 24) /1.148148148148148D+00 - $ ,1.314814814814815D+00,-1.851851851851852D-01 - $ ,1.481481481481481D+00,-1.851851851851852D-02 - $ ,1.481481481481481D-01/ + DATA (CF(I),I=256,264) /512,16,-128,124,142,-20,160,-2,16/ C 1 T(5,2,6,1,3,4) - DATA (CF(I, 17),I= 1, 6) /1.314814814814815D+00 - $ ,1.148148148148148D+00,-1.851851851851852D-02 - $ ,1.481481481481481D-01,-1.851851851851852D-01 - $ ,1.481481481481481D+00/ - DATA (CF(I, 17),I= 7, 12) /1.148148148148148D+00, - $ -5.185185185185185D-01,-1.851851851851852D-01, - $ -1.851851851851852D-02,1.148148148148148D+00, - $ -1.851851851851852D-01/ - DATA (CF(I, 17),I= 13, 18) /1.481481481481481D-01, - $ -1.185185185185185D+00,1.481481481481481D+00,1.481481481481481D - $ -01,9.481481481481481D+00,-1.185185185185185D+00/ - DATA (CF(I, 17),I= 19, 24) /-1.851851851851852D-02 - $ ,1.481481481481481D-01,-1.851851851851852D-01, - $ -1.851851851851852D-02,-1.185185185185185D+00 - $ ,1.481481481481481D-01/ + DATA (CF(I),I=265,272) /512,-128,-2,16,-20,-2,-128,16/ C 1 T(5,6,1,2,3,4) - DATA (CF(I, 18),I= 1, 6) /1.148148148148148D+00, - $ -5.185185185185185D-01,-1.851851851851852D-01, - $ -1.851851851851852D-02,1.148148148148148D+00, - $ -1.851851851851852D-01/ - DATA (CF(I, 18),I= 7, 12) /1.314814814814815D+00 - $ ,1.148148148148148D+00,-1.851851851851852D-02 - $ ,1.481481481481481D-01,-1.851851851851852D-01 - $ ,1.481481481481481D+00/ - DATA (CF(I, 18),I= 13, 18) /1.481481481481481D+00 - $ ,1.481481481481481D-01,1.481481481481481D-01, - $ -1.185185185185185D+00,-1.185185185185185D+00 - $ ,9.481481481481481D+00/ - DATA (CF(I, 18),I= 19, 24) /-1.851851851851852D-01, - $ -1.851851851851852D-02,-1.851851851851852D-02 - $ ,1.481481481481481D-01,1.481481481481481D-01, - $ -1.185185185185185D+00/ + DATA (CF(I),I=273,279) /512,-20,-2,-2,16,16,-128/ C 1 T(5,6,2,1,3,4) - DATA (CF(I, 19),I= 1, 6) /-1.851851851851852D-02 - $ ,1.481481481481481D-01,-1.851851851851852D-01, - $ -1.851851851851852D-02,-1.185185185185185D+00 - $ ,1.481481481481481D-01/ - DATA (CF(I, 19),I= 7, 12) /-1.851851851851852D-01 - $ ,1.481481481481481D+00,1.148148148148148D+00,1.314814814814815D - $ +00,1.481481481481481D-01,-1.851851851851852D-02/ - DATA (CF(I, 19),I= 13, 18) /1.148148148148148D+00, - $ -1.851851851851852D-01,-5.185185185185185D-01 - $ ,1.148148148148148D+00,-1.851851851851852D-02, - $ -1.851851851851852D-01/ - DATA (CF(I, 19),I= 19, 24) /9.481481481481481D+00, - $ -1.185185185185185D+00,-1.185185185185185D+00 - $ ,1.481481481481481D-01,1.481481481481481D-01,1.481481481481481D - $ +00/ + DATA (CF(I),I=280,285) /512,-128,-128,16,16,160/ C 1 T(6,1,2,5,3,4) - DATA (CF(I, 20),I= 1, 6) /-1.851851851851852D-01, - $ -1.851851851851852D-02,-1.851851851851852D-02 - $ ,1.481481481481481D-01,1.481481481481481D-01, - $ -1.185185185185185D+00/ - DATA (CF(I, 20),I= 7, 12) /1.148148148148148D+00, - $ -1.851851851851852D-01,-5.185185185185185D-01 - $ ,1.148148148148148D+00,-1.851851851851852D-02, - $ -1.851851851851852D-01/ - DATA (CF(I, 20),I= 13, 18) /-1.851851851851852D-01 - $ ,1.481481481481481D+00,1.148148148148148D+00,1.314814814814815D - $ +00,1.481481481481481D-01,-1.851851851851852D-02/ - DATA (CF(I, 20),I= 19, 24) /-1.185185185185185D+00 - $ ,9.481481481481481D+00,1.481481481481481D-01,1.481481481481481D - $ +00,-1.185185185185185D+00,1.481481481481481D-01/ + DATA (CF(I),I=286,290) /512,16,160,-128,16/ C 1 T(6,1,5,2,3,4) - DATA (CF(I, 21),I= 1, 6) /-1.851851851851852D-01 - $ ,1.481481481481481D+00,1.148148148148148D+00,1.314814814814815D - $ +00,1.481481481481481D-01,-1.851851851851852D-02/ - DATA (CF(I, 21),I= 7, 12) /-1.851851851851852D-02 - $ ,1.481481481481481D-01,-1.851851851851852D-01, - $ -1.851851851851852D-02,-1.185185185185185D+00 - $ ,1.481481481481481D-01/ - DATA (CF(I, 21),I= 13, 18) /-5.185185185185185D-01 - $ ,1.148148148148148D+00,1.148148148148148D+00, - $ -1.851851851851852D-01,-1.851851851851852D-01, - $ -1.851851851851852D-02/ - DATA (CF(I, 21),I= 19, 24) /-1.185185185185185D+00 - $ ,1.481481481481481D-01,9.481481481481481D+00, - $ -1.185185185185185D+00,1.481481481481481D+00,1.481481481481481D - $ -01/ + DATA (CF(I),I=291,294) /512,-128,160,16/ C 1 T(6,2,1,5,3,4) - DATA (CF(I, 22),I= 1, 6) /1.148148148148148D+00, - $ -1.851851851851852D-01,-5.185185185185185D-01 - $ ,1.148148148148148D+00,-1.851851851851852D-02, - $ -1.851851851851852D-01/ - DATA (CF(I, 22),I= 7, 12) /-1.851851851851852D-01, - $ -1.851851851851852D-02,-1.851851851851852D-02 - $ ,1.481481481481481D-01,1.481481481481481D-01, - $ -1.185185185185185D+00/ - DATA (CF(I, 22),I= 13, 18) /1.148148148148148D+00 - $ ,1.314814814814815D+00,-1.851851851851852D-01 - $ ,1.481481481481481D+00,-1.851851851851852D-02 - $ ,1.481481481481481D-01/ - DATA (CF(I, 22),I= 19, 24) /1.481481481481481D-01 - $ ,1.481481481481481D+00,-1.185185185185185D+00 - $ ,9.481481481481481D+00,1.481481481481481D-01, - $ -1.185185185185185D+00/ + DATA (CF(I),I=295,297) /512,16,-128/ C 1 T(6,2,5,1,3,4) - DATA (CF(I, 23),I= 1, 6) /1.148148148148148D+00 - $ ,1.314814814814815D+00,-1.851851851851852D-01 - $ ,1.481481481481481D+00,-1.851851851851852D-02 - $ ,1.481481481481481D-01/ - DATA (CF(I, 23),I= 7, 12) /-5.185185185185185D-01 - $ ,1.148148148148148D+00,1.148148148148148D+00, - $ -1.851851851851852D-01,-1.851851851851852D-01, - $ -1.851851851851852D-02/ - DATA (CF(I, 23),I= 13, 18) /-1.851851851851852D-02 - $ ,1.481481481481481D-01,-1.851851851851852D-01, - $ -1.851851851851852D-02,-1.185185185185185D+00 - $ ,1.481481481481481D-01/ - DATA (CF(I, 23),I= 19, 24) /1.481481481481481D-01, - $ -1.185185185185185D+00,1.481481481481481D+00,1.481481481481481D - $ -01,9.481481481481481D+00,-1.185185185185185D+00/ + DATA (CF(I),I=298,299) /512,-128/ C 1 T(6,5,1,2,3,4) - DATA (CF(I, 24),I= 1, 6) /-5.185185185185185D-01 - $ ,1.148148148148148D+00,1.148148148148148D+00, - $ -1.851851851851852D-01,-1.851851851851852D-01, - $ -1.851851851851852D-02/ - DATA (CF(I, 24),I= 7, 12) /1.148148148148148D+00 - $ ,1.314814814814815D+00,-1.851851851851852D-01 - $ ,1.481481481481481D+00,-1.851851851851852D-02 - $ ,1.481481481481481D-01/ - DATA (CF(I, 24),I= 13, 18) /-1.851851851851852D-01, - $ -1.851851851851852D-02,-1.851851851851852D-02 - $ ,1.481481481481481D-01,1.481481481481481D-01, - $ -1.185185185185185D+00/ - DATA (CF(I, 24),I= 19, 24) /1.481481481481481D+00 - $ ,1.481481481481481D-01,1.481481481481481D-01, - $ -1.185185185185185D+00,-1.185185185185185D+00 - $ ,9.481481481481481D+00/ + DATA (CF(I),I=300,300) /512/ C 1 T(6,5,2,1,3,4) C ---------- C BEGIN CODE @@ -1547,10 +1218,12 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) MATRIX1 = 0.D0 DO M = 1, NAMPSO + CF_INDEX = 0 DO I = 1, NCOLOR ZTEMP = (0.D0,0.D0) - DO J = 1, NCOLOR - ZTEMP = ZTEMP + CF(J,I)*JAMP(J,M) + DO J = I, NCOLOR + CF_INDEX = CF_INDEX + 1 + ZTEMP = ZTEMP + CF(CF_INDEX)*JAMP(J,M) ENDDO DO N = 1, NAMPSO @@ -1559,6 +1232,7 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) ENDDO ENDDO ENDDO + MATRIX1 = MATRIX1/DENOM IF(SDE_STRAT.EQ.1)THEN AMP2(2)=AMP2(2)+AMP(4)*DCONJG(AMP(4)) diff --git a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg/matrix11.png b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg/matrix11.png new file mode 100644 index 0000000000..1c6c5ea264 Binary files /dev/null and b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg/matrix11.png differ diff --git a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg/matrix12.png b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg/matrix12.png new file mode 100644 index 0000000000..db89ede876 Binary files /dev/null and b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg/matrix12.png differ diff --git a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg/processConfig.h b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg/processConfig.h new file mode 100644 index 0000000000..4f4a3c3bc0 --- /dev/null +++ b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg/processConfig.h @@ -0,0 +1,16 @@ +// Copyright (C) 2025 CERN and UCLouvain. +// Licensed under the GNU Lesser General Public License (version 3 or later). +// Created by: S. Roiser (May 2025) for the MG5aMC CUDACPP plugin. +// Further modified by: ... for the MG5aMC CUDACPP plugin. + + +#ifndef MG5_CONFIG_SIGMA_SM_GG_TTXGG_H +#define MG5_CONFIG_SIGMA_SM_GG_TTXGG_H 1 + +namespace processConfig { + + constexpr int ndiagrams = 123; + +} + +#endif // MG5_CONFIG_SIGMA_SM_GG_TTXGG_H \ No newline at end of file diff --git a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/cuts.f b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/cuts.f index 7898714201..bd50ab1357 100644 --- a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/cuts.f +++ b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/cuts.f @@ -307,12 +307,18 @@ LOGICAL FUNCTION PASSCUTS(P, VECSIZE_USED) c c Limit S_hat c - if (dsqrt_shat.ne.0d0)then - if (nincoming.eq.2.and.sumdot(p(0,1),p(0,2),1d0) .lt. dsqrt_shat**2) then - passcuts=.false. - return - endif - endif + if(nincoming.eq.2) then + if (dsqrt_shat.ne.0d0.or.dsqrt_shatmax.ne.-1d0)then + xvar = sumdot(p(0,1),p(0,2),1d0) + if (xvar .lt. dsqrt_shat**2)then + passcuts=.false. + return + else if (dsqrt_shatmax.ne.-1d0 .and. xvar .gt. dsqrt_shatmax**2)then + passcuts = .false. + return + endif + endif + endif C $B$ DESACTIVATE_CUT $E$ !This is a tag for MadWeight if(debug) write (*,*) '=============================' diff --git a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/genps.f b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/genps.f index 1c32e93f5d..8503bdbec8 100644 --- a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/genps.f +++ b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/genps.f @@ -1373,6 +1373,10 @@ subroutine gen_s(x,smin,smax,spole,swidth,s,jac,pass) double precision smin,smax,spole,swidth,s,jac double precision x logical pass + include 'maxparticles.inc' + include '../../Source/vector.inc' + include 'run.inc' + include 'cuts.inc' c c Local c @@ -1384,6 +1388,10 @@ subroutine gen_s(x,smin,smax,spole,swidth,s,jac,pass) c----- c Begin Code c----- + if (dsqrt_shatmax.ne.-1d0)then + smax = min(smax, dsqrt_shatmax**2) + endif + pass=.true. if (jac .eq. 0 .and. .not. warned0) then print*,'Input jacobian 0 in genps' @@ -1628,7 +1636,10 @@ SUBROUTINE GENCMS(S,X1,X2,X,SMIN,SJACOBI) DOUBLE PRECISION ETA,ETAMIN,ETAMAX logical warned data warned/.false./ - + include 'maxparticles.inc' + include '../../Source/vector.inc' + include 'run.inc' + include 'cuts.inc' C------------ C BEGIN CODE C------------ @@ -1645,7 +1656,11 @@ SUBROUTINE GENCMS(S,X1,X2,X,SMIN,SJACOBI) C IF THERE IS NO S CHANNEL POLE USE BELOW: TAUMIN = 0d0 !SMIN/S !keep scale fix - TAUMAX = 1D0 + if (dsqrt_shatmax.ne.-1d0)then + TAUMAX=dsqrt_shatmax**2/S + else + TAUMAX = 1D0 + endif TAU = (TAUMAX-TAUMIN)*X(1)+TAUMIN SJACOBI= sjacobi*(TAUMAX-TAUMIN) @@ -1915,7 +1930,7 @@ double precision function get_channel_cut(p, config) if(sde_strat.eq.2)then t = dot(ptemp(0,-i), ptemp(0,-i)) Mass = prmass(-i, config) - get_channel_cut = get_channel_cut / ((t-Mass)*(t+Mass)+stot*1d-10)**2 + get_channel_cut = get_channel_cut / (t-Mass**2+stot*1d-10)**2 endif c write(*,*) i, "t, Mass, fact", t, Mass, ((t-Mass)*(t+Mass))**2,get_channel_cut t = t/stot @@ -1930,9 +1945,9 @@ double precision function get_channel_cut(p, config) t = dot(ptemp(0,-i), ptemp(0,-i)) Mass = prmass(-i, config) Width = prwidth(-i, config) - tmp = (t-Mass)*(t+Mass) + tmp = (t-Mass**2) tmp2 = Mass*Width - get_channel_cut = get_channel_cut* (tmp**2 - tmp2**2)/(tmp**2 + tmp2**2)**2 + get_channel_cut = get_channel_cut/(tmp**2 + tmp2**2) endif c write(*,*) i, "s, Mass, Width, fact", t, Mass, Width, (((t-Mass)*(t+Mass) )**2 + Width**2*Mass**2), get_channel_cut endif diff --git a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/myamp.f b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/myamp.f index 9e5f8d44dd..5360566ef4 100644 --- a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/myamp.f +++ b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/myamp.f @@ -231,6 +231,7 @@ subroutine set_peaks double precision x1,x2,xk(nexternal) double precision dr,mtot,etot,xqfact double precision spmass + double precision stot ! technically the min with dsqrt_shatmax**2 with the physical one integer i, iconfig, l1, l2, j, nt, nbw, iproc, k integer iden_part(-nexternal+1:nexternal) @@ -285,8 +286,8 @@ subroutine set_peaks integer lbw(0:nexternal) !Use of B.W. common /to_BW/ lbw - double precision stot,m1,m2 - common/to_stot/stot,m1,m2 + double precision real_stot,m1,m2 + common/to_stot/real_stot,m1,m2 include 'coupl.inc' ! needs VECSIZE_MEMMAX (defined in vector.inc) include 'cuts.inc' @@ -309,6 +310,12 @@ subroutine set_peaks c----- c Begin Code c----- + if (dsqrt_shatmax.ne.-1)then + stot = min(real_stot, dsqrt_shatmax**2) + else + stot = real_stot + endif + iconfig = this_config c needs to be initialise to avoid segfault do i = -nexternal,-1 diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/Gridpack/gridrun b/epochX/cudacpp/gg_ttgg.mad/bin/internal/Gridpack/gridrun index 8c8f7d3940..01d4ab53f5 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/Gridpack/gridrun +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/Gridpack/gridrun @@ -91,7 +91,7 @@ import internal.madevent_interface as cmd_interface try: - cmd_line = cmd_interface.GridPackCmd(me_dir=root_path, nb_event=args[0], seed=args[1], gran=args[2]) + cmd_line = cmd_interface.GridPackCmd(me_dir=root_path, nb_event=args[0], seed=args[1], gran=args[2], nprocs=args[3], maxevts=args[4]) except KeyboardInterrupt: print('Quit on KeyboardInterrupt') diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/Gridpack/run.sh b/epochX/cudacpp/gg_ttgg.mad/bin/internal/Gridpack/run.sh index 20adf572c2..2d149f96be 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/Gridpack/run.sh +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/Gridpack/run.sh @@ -14,6 +14,18 @@ # USAGE : run [num_events] [iseed] ## ############################################################################# +function usage() { + local retcode="${1:-1}" # default return code is 1 + echo "Usage:" + echo " run.sh [options] [num events] [seed]" + echo " run.sh [options] [num events] [seed] [granularity]" + echo "Options:" + echo " -h, --help print this message and exit" + echo " -p, --parallel [num procs] number of processes to run in parallel" + echo " -m, --maxevts [num events] maximum number of unweighted events per job" + exit $retcode +} + if [[ -d ./madevent ]]; then DIR='./madevent' else @@ -32,23 +44,46 @@ export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${PWD}/madevent/lib:${PWD}/HELAS/lib # For Mac OS X export DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:${PWD}/madevent/lib:${PWD}/HELAS/lib +pos_args=() +nprocs=1 +maxevts=2500 -if [[ ($1 != "") && ("$2" != "") && ("$3" == "") ]]; then - num_events=$1 - seed=$2 - gran=1 -elif [[ ($1 != "") && ("$2" != "") && ("$3" != "") ]]; then - num_events=$1 - seed=$2 - gran=$3 -else - echo "Warning: input is not correct. script requires two arguments: NB_EVENT SEED" -fi +while [[ $# -gt 0 ]]; do + case $1 in + -h|--help) + usage 0 ;; + -p|--parallel) + nprocs="$2" && shift && shift ;; + -m|--maxevts) + maxevts="$2" && shift && shift ;; + -*) + echo "Error: Unknown option $1" && usage ;; + *) + pos_args+=("$1") && shift ;; + esac +done + +case `echo "${pos_args[@]}" | wc -w | tr -d " "` in + "2") + num_events=${pos_args[0]} + seed=${pos_args[1]} + gran=1 + ;; + "3") + num_events=${pos_args[0]} + seed=${pos_args[1]} + gran=${pos_args[2]} + ;; + *) + echo "Error: number of arguments is not correct" + usage + ;; +esac -echo "Now generating $num_events events with random seed $seed and granularity $gran" +echo "Now generating $num_events events with random seed $seed and granularity $gran using $nprocs processes" ############ RUN THE PYTHON CODE ##################### -${DIR}/bin/gridrun $num_events $seed $gran +${DIR}/bin/gridrun $num_events $seed $gran $nprocs $maxevts ######################################################## ########### POSTPROCESSING ##################### diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/banner.py b/epochX/cudacpp/gg_ttgg.mad/bin/internal/banner.py index 42d82818d0..022861fc31 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/banner.py +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/banner.py @@ -353,7 +353,7 @@ def modify_init_cross(self, cross, allow_zero=False): assert "init" in self cross = dict(cross) - for key in cross.keys(): + for key in list(cross.keys()): if isinstance(key, str) and key.isdigit() and int(key) not in cross: cross[int(key)] = cross[key] @@ -3318,7 +3318,6 @@ def retro_compatible_custom_fct(lines, mode=None): for i,line in enumerate(lines[:]): if search and re.search(include_pat, line): name = re.findall(include_pat, line)[0] - misc.sprint('DETECTED INCLUDE', name) if 'vector.inc' in name: search = False if 'run.inc' in name: @@ -3326,7 +3325,6 @@ def retro_compatible_custom_fct(lines, mode=None): search = False sol.append(line) if re.search(function_pat, line): - misc.sprint("DETECTED FCT") search = True return sol @@ -4201,6 +4199,7 @@ def default_setup(self): self.add_param("bwcutoff", 15.0) self.add_param("cut_decays", False, cut='d') self.add_param('dsqrt_shat',0., cut=True) + self.add_param('dsqrt_shatmax', -1, cut=True) self.add_param("nhel", 0, include=False) self.add_param("limhel", 1e-8, hidden=True, comment="threshold to determine if an helicity contributes when not MC over helicity.") #pt cut @@ -5577,6 +5576,9 @@ def default_setup(self): #technical self.add_param('folding', [1,1,1], include=False) + + #bias + self.add_param('flavour_bias',[5,1], hidden=True, comment="Example: '5,100' means that the probability to generate an event with a bottom (or anti-bottom) quark is increased by a factor 100, but the weight of those events is reduced by a factor 100. Requires that the 'event_norm' is set to 'bias'.") #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]") @@ -5790,6 +5792,17 @@ def check_validity(self): if self['mcatnlo_delta'] and not self['parton_shower'].lower() == 'pythia8': raise InvalidRunCard("MC@NLO-DELTA only possible with matching to Pythia8") + # check that the flavour_bias is consistent + if len(self['flavour_bias']) != 2: + raise InvalidRunCard("'flavour_bias' should contain exactly two numbers: the abs(PDG) of the flavour to enhance, and the enhancement multiplication factor.") + for i in self['flavour_bias']: + if i < 0: + raise InvalidRunCard("flavour and multiplication factor should be positive in the flavour_bias parameter") + if self['flavour_bias'][1] != 1 and self['event_norm'] != 'bias': + logger.warning('Non-trivial flavour enhancement factor: setting event normalisation to "bias"') + self['event_norm']='bias' + + # check that ebeam is bigger than the proton mass. for i in [1,2]: # do not for proton mass if not proton PDF (or when scan initialization) 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 bc785b5de6..a34705f6bc 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 @@ -1092,11 +1092,11 @@ def write_summary(self, path, order=None, lastline=False, nbcol=20): to_print = self.cross[-1:] for info in to_print: name = info['run_name'] - bench = info['bench'] + bench = [float(x) for x in info['bench']] data = [] for k in keys: if k in info: - data.append(info[k]) + data.append(float(info[k])) else: data.append(0.) ff.write(formatting % tuple([name] + bench + data)) 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 9ff7390cf5..541cd6294b 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 @@ -750,8 +750,8 @@ def __init__(self, me_dir, options, *args, **opts): else: self.ninitial = self.proc_characteristics['ninitial'] - def make_make_all_html_results(self, folder_names = [], jobs=[]): - return sum_html.make_all_html_results(self, folder_names, jobs) + def make_make_all_html_results(self, folder_names = [], jobs=[], get_attr=None): + return sum_html.make_all_html_results(self, folder_names, jobs, get_attr) def write_RunWeb(self, me_dir): @@ -3831,7 +3831,7 @@ def store_scan_result(self): """return the information that need to be kept for the scan summary. Auto-width are automatically added.""" - return {'cross': self.results.current['cross']} + return {'cross': self.results.current['cross'], 'error': self.results.current['error']} def add_error_log_in_html(self, errortype=None): @@ -5135,10 +5135,10 @@ def init_run(self, cards): self.special_shortcut.update( {'ebeam':([float],['run_card ebeam1 %(0)s', 'run_card ebeam2 %(0)s']), 'lpp': ([int],['run_card lpp1 %(0)s', 'run_card lpp2 %(0)s' ]), - 'lhc': ([int],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), + 'lhc': ([float],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), 'lep': ([int],['run_card lpp1 0', 'run_card lpp2 0', 'run_card ebeam1 %(0)s/2', 'run_card ebeam2 %(0)s/2']), 'ilc': ([int],['run_card lpp1 0', 'run_card lpp2 0', 'run_card ebeam1 %(0)s/2', 'run_card ebeam2 %(0)s/2']), - 'lcc': ([int],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), + 'lcc': ([float],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), 'fixed_scale': ([float],['run_card fixed_fac_scale T', 'run_card fixed_ren_scale T', 'run_card scale %(0)s', 'run_card dsqrt_q2fact1 %(0)s' ,'run_card dsqrt_q2fact2 %(0)s']), 'no_parton_cut':([],['run_card nocut T']), 'cm_velocity':([float], [lambda self :self.set_CM_velocity]), @@ -6740,7 +6740,15 @@ def postcmd(self, stop, line): return ending_question - + def help_update(self): + logger.info(""" syntax: update dependent: Change the mass/width of particles which are not free parameter for the model. + update missing: add to the current param_card missing blocks/parameters. + update to_slha1: pass SLHA2 card to SLHA1 convention. (beta) + update to_slha2: pass SLHA1 card to SLHA2 convention. (beta) + update to_full [run_card] + update XXX [where XXX correspond to a hidden block of the run_card]: + supported block are %s + """, ', '.join(self.update_block)) def do_update(self, line, timer=0): @@ -6756,6 +6764,8 @@ def do_update(self, line, timer=0): logger.warning('miss an argument (dependent or missing). Please retry') return + args[0] = args[0].lower() + if args[0] == 'dependent': if not self.mother_interface: logger.warning('Failed to update dependent parameter. This might create trouble for external program (like MadSpin/shower/...)') @@ -6805,10 +6815,11 @@ def do_update(self, line, timer=0): self.modified_card.add('run') # delay writting of the run_card logger.info('add optional block %s to the run_card', args[0]) else: - self.help_update() + self.do_help('update') logger.warning('unvalid options for update command. Please retry') + def update_to_full(self, line): """ trigger via update to_full LINE""" 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 789976beee..c321fd88e5 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/extended_cmd.py +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/extended_cmd.py @@ -1317,6 +1317,8 @@ def nice_error_handling(self, error, line): debug_file = open(self.debug_output, 'a') traceback.print_exc(file=debug_file) + if __debug__: + traceback.print_exc() if hasattr(error, 'filename'): debug_file.write("Related File: %s\n" % error.filename) # Create a nice error output @@ -1928,7 +1930,8 @@ def do_display(self, line, output=sys.stdout): for i, name in enumerate(split): try: __import__('.'.join(split[:i+1])) - exec('%s=sys.modules[\'%s\']' % (split[i], '.'.join(split[:i+1]))) + tmp = {} + exec('%s=sys.modules[\'%s\']' % (split[i], '.'.join(split[:i+1])), globals(),tmp) except ImportError: try: var = eval(args[1]) @@ -1939,7 +1942,7 @@ def do_display(self, line, output=sys.stdout): outstr += 'EXTERNAL:\n' outstr += misc.nice_representation(var, nb_space=4) else: - var = eval(args[1]) + var = eval(args[1], globals(), tmp) outstr += 'EXTERNAL:\n' outstr += misc.nice_representation(var, nb_space=4) diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/file_writers.py b/epochX/cudacpp/gg_ttgg.mad/bin/internal/file_writers.py index 526756129f..74ba0d195c 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/file_writers.py +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/file_writers.py @@ -140,10 +140,6 @@ def preprocess_template(self, input_lines, context={}): else: raise self.FileWriterError("%s not string" % repr(input_lines)) - # Setup the contextual environment - for contextual_variable, value in context.items(): - exec('%s=%s'%(str(contextual_variable),repr(value))) - res = [] # The variable below tracks the conditional statements structure if_stack = [] @@ -166,7 +162,7 @@ def preprocess_template(self, input_lines, context={}): # Treat an if statement elif preproc_command.group('command')=='if': try: - if_stack.append(eval(preproc_command.group('body'))==True) + if_stack.append(eval(preproc_command.group('body'), globals(), context)==True) except Exception as e: raise self.FilePreProcessingError('Could not evaluate'+\ "python expression '%s' given the context %s provided."%\ diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/files.py b/epochX/cudacpp/gg_ttgg.mad/bin/internal/files.py index 551b71ddb6..3061b007e7 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/files.py +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/files.py @@ -147,9 +147,14 @@ def cp(path1, path2, log=True, error=False): path2 = format_path(path2) try: shutil.copy(path1, path2) + except shutil.Error as why: + logger.debug('no cp since identical: %s', why) + return except IOError as why: import madgraph.various.misc as misc try: + if 'same file' in str(why): + return if os.path.exists(path2): path2 = os.path.join(path2, os.path.split(path1)[1]) misc.copytree(path1, path2) @@ -157,12 +162,10 @@ def cp(path1, path2, log=True, error=False): if error: raise if log: - logger.warning(why) + logger.warning("fail to cp", path1, path2, why) else: - misc.sprint("fail to cp", why) - except shutil.Error: - # idetical file - pass + misc.sprint("fail to cp",path1,path2, why) + def rm(path, log=True): """removes path, that can be a single element or a list""" diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/gen_cardhtml-pl b/epochX/cudacpp/gg_ttgg.mad/bin/internal/gen_cardhtml-pl index 1810c6c082..6e0e06533d 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/gen_cardhtml-pl +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/gen_cardhtml-pl @@ -137,7 +137,7 @@ until($listpos>$#incard){ print PAGE " Model: $model \n"; print PAGE " \n \n
\n"; print PAGE " \n"; - print PAGE "\"\" \n"; + print PAGE "\"\" \n"; print PAGE "
\n"; print PAGE " \n \n \n"; print PAGE " \n"; diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/gen_crossxhtml.py b/epochX/cudacpp/gg_ttgg.mad/bin/internal/gen_crossxhtml.py index 681bf9d09b..3114a4350c 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/gen_crossxhtml.py +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/gen_crossxhtml.py @@ -133,7 +133,7 @@ class AllResults(dict): web = False - _run_entries = ['cross', 'error','nb_event_pythia','run_mode','run_statistics', + _run_entries = ['cross', 'error','axsec','nb_event_pythia','run_mode','run_statistics', 'nb_event','cross_pythia','error_pythia', 'nb_event_pythia8','cross_pythia8','error_pythia8', 'shower_dir'] diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/gen_jpeg-pl b/epochX/cudacpp/gg_ttgg.mad/bin/internal/gen_jpeg-pl index 87d03da394..31b7e9fe55 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/gen_jpeg-pl +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/gen_jpeg-pl @@ -1,16 +1,16 @@ #!/usr/bin/perl -w #--------------------------------------------------------------------- -# Run GS to create jpeg files defined as $gs +# Run GS to create PNG files defined as $gs #--------------------------------------------------------------------- -system("/bin/bash -c \"rm -f matrix*.jpg\" "); +system("/bin/bash -c \"rm -f matrix*.png\" "); $imatrix = ""; if (! -e "matrix.ps") {$imatrix = 1;} -$max_jpg = 2; -if ($imatrix eq "") {$max_jpg = 5;} -# add 1 to max_jpg, to get max_jpg pages -$max_jpg += 1; +$max_png = 2; +if ($imatrix eq "") {$max_png = 5;} +# add 1 to max_png, to get max_png pages +$max_png += 1; open(PAGE,"> diagrams.html") || die "Error creating diagrams.html"; print PAGE "\ \n"; print PAGE "\ \n"; @@ -21,22 +21,22 @@ while ( -e "matrix$imatrix.ps"){ open(IN, "< matrix$imatrix.ps") || die "No file matrix$imatrix.ps"; open(OUT, "> matrix-1.ps") || die "Could not open file matrix-1.ps"; while () { - if ($_ =~ m/^%%Page: $max_jpg $max_jpg/) {last;} + if ($_ =~ m/^%%Page: $max_png $max_png/) {last;} else {print OUT $_, "\n";} } close(OUT); close(IN); - system "/bin/bash -c \"nice gs \-sDEVICE\=jpeg \-sOutputFile\=matrix$imatrix\%00d.jpg \-q \-dNOPAUSE \-dBATCH matrix-1.ps > /dev/null\""; + system "/bin/bash -c \"nice gs \-sDEVICE\=pngmono \-r150 \-sOutputFile\=matrix$imatrix\%00d.png \-q \-dNOPAUSE \-dBATCH matrix-1.ps > /dev/null\""; system "rm -f matrix-1.ps"; -# Determine how many jpg files we have +# Determine how many png files we have $pages=1; - while(-e "matrix$imatrix$pages.jpg"){ + while(-e "matrix$imatrix$pages.png"){ $pages++; }#end of while #reduce it by one - if ($pages > $max_jpg){ + if ($pages > $max_png){ $pages -= 1; } # Find name of process @@ -45,24 +45,24 @@ while ( -e "matrix$imatrix.ps"){ if ($proc =~ /Process: (.+?)(\s\w+=\d+)*$/) { $proc = $1; } print PAGE "

To save bandwidth not all diagrams were converted to jpeg."; + if (-e "matrix$imatrix$max_png.png" ) { + print PAGE "

To save bandwidth not all diagrams were converted to PNG."; print PAGE "

To view all diagrams click on "; print PAGE "\ postscript. \<\/A\> \ \n"; # # Delete files which aren't included in diagrams.html # - system ("/bin/bash -c \"rm -f matrix$max_jpg.jpg\" "); + system ("/bin/bash -c \"rm -f matrix$max_png.png\" "); } # -# Now create jpeg file for card +# Now create PNG file for card # - if (! -e "../../HTML/card.jpg") { + if (! -e "../../HTML/card.png") { system ("/bin/bash -c \"head -352 matrix$imatrix.ps >& junk.ps\" "); open(JUNK,">> junk.ps") || die "Error opening junk.ps"; @@ -72,7 +72,7 @@ while ( -e "matrix$imatrix.ps"){ system ("/bin/bash -c \"cat matrix$imatrix.ps | sed 1,352d >> junk.ps\" "); - system "/bin/bash -c \"nice gs \-sDEVICE\=jpeg \-sOutputFile\=card.jpg \-q \-dNOPAUSE \-dBATCH \-g180x150 ./junk.ps; rm -f junk.ps; cp -p card.jpg ../../HTML/card.jpg > /dev/null\" "; + system "/bin/bash -c \"nice gs \-sDEVICE\=pngmono \-sOutputFile\=card.png \-q \-dNOPAUSE \-dBATCH \-g180x150 ./junk.ps; rm -f junk.ps; cp -p card.png ../../HTML/card.png > /dev/null\" "; } if ($imatrix eq "") {$imatrix = 0;} $imatrix = $imatrix + 1; @@ -82,3 +82,4 @@ print PAGE "\n"; print PAGE "\<\/BODY\> \n"; print PAGE "\<\/HTML\> \n"; close(PAGE); + 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 415ecc9de0..d5d7fc8faf 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/gen_ximprove.py +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/gen_ximprove.py @@ -30,6 +30,7 @@ import stat import sys import six +import time from six.moves import range from six.moves import zip @@ -304,6 +305,7 @@ def get_helicity(self, to_submit=True, clean=True): logger.debug('(%s) nb_hel: %s zero amp: %s bad_amps_hel: %s/%s', split_file[-1], len(good_hels),len(bad_amps),len(bad_amps_perhel), len(good_hels)*nb_amp ) if len(good_hels) == 1: files.cp(matrix_file, matrix_file.replace('orig','optim')) + files.cp(matrix_file.replace('.f','.o'), matrix_file.replace('orig','optim').replace('.f','.o')) continue # avoid optimization if onlye one helicity gauge = self.cmd.proc_characteristics['gauge'] @@ -1059,6 +1061,7 @@ def __init__(self, cmd, opt=None): # parameter for the gridpack run self.nreq = 2000 self.iseed = 4321 + self.maxevts = 2500 # placeholder for information self.results = 0 #updated in launch/update_html @@ -1200,6 +1203,10 @@ def reset_multijob(self): def write_multijob(self, Channel, nb_split): """ """ if nb_split <=1: + try: + os.remove(pjoin(self.me_dir, 'SubProcesses', Channel.get('name'), 'multijob.dat')) + except OSError: + pass return f = open(pjoin(self.me_dir, 'SubProcesses', Channel.get('name'), 'multijob.dat'), 'w') f.write('%i\n' % nb_split) @@ -1828,17 +1835,17 @@ class gen_ximprove_gridpack(gen_ximprove_v4): 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 gen_events_security = 1.00 - def __new__(cls, *args, **opts): + def __new__(cls, cmd, opts): cls.force_class = 'gridpack' - return super(gen_ximprove_gridpack, cls).__new__(cls, *args, **opts) + return super(gen_ximprove_gridpack, cls).__new__(cls, cmd, opts) - def __init__(self, *args, **opts): + def __init__(self, cmd, opts): self.ngran = -1 + self.nprocs = 1 self.gscalefact = {} self.readonly = False if 'ngran' in opts: @@ -1846,9 +1853,18 @@ def __init__(self, *args, **opts): # del opts['ngran'] if 'readonly' in opts: self.readonly = opts['readonly'] - super(gen_ximprove_gridpack,self).__init__(*args, **opts) + if 'nprocs' in opts: + self.nprocs = int(opts['nprocs']) + if 'maxevts' in opts and self.nprocs > 1: + self.max_request_event = int(opts['maxevts']) + super(gen_ximprove_gridpack,self).__init__(cmd, opts) if self.ngran == -1: self.ngran = 1 + + if self.nprocs > 1: + self.combining_job = 0 + else: + self.combining_job = sys.maxsize def find_job_for_event(self): """return the list of channel that need to be improved""" @@ -1876,8 +1892,8 @@ def find_job_for_event(self): continue # no event to generate events self.gscalefact[tag] = max(1, 1/(goal_lum * C.get('axsec')/ self.ngran)) #need to generate events - logger.debug('request events for ', C.get('name'), 'cross=', - C.get('axsec'), 'needed events = ', goal_lum * C.get('axsec')) + logger.debug('request events for %s cross=%d needed events = %d', + C.get('name'), C.get('axsec'), goal_lum * C.get('axsec')) to_refine.append(C) logger.info('need to improve %s channels' % len(to_refine)) @@ -1897,8 +1913,13 @@ def get_job_for_event(self): 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 - + nb_split = int(max(1,((needed_event-1)// self.max_request_event) +1)) + if not self.split_channels: + nb_split = 1 + if nb_split > self.max_splitting: + 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')) @@ -1908,13 +1929,16 @@ def get_job_for_event(self): nevents = self.max_event_in_iter if nevents < self.min_event_in_iter: + nb_split = int(nb_split * nevents / self.min_event_in_iter) + 1 # sr dangerous? nevents = self.min_event_in_iter # # 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) - + # write the multi-job information + self.write_multijob(C, nb_split) + #create the info dict assume no splitting for the default info = {'name': self.cmd.results.current['run_name'], 'script_name': 'unknown', @@ -1925,7 +1949,7 @@ def get_job_for_event(self): 'nevents': nevents, #int(nevents*self.gen_events_security)+1, 'maxiter': self.max_iter, 'miniter': self.min_iter, - 'precision': -1*int(needed_event)/C.get('axsec'), + 'precision': -goal_lum/nb_split, # -1*int(needed_event)/C.get('axsec'), 'requested_event': needed_event, 'nhel': self.run_card['nhel'], 'channel': C.name.replace('G',''), @@ -1938,27 +1962,59 @@ def get_job_for_event(self): basedir = pjoin(os.path.dirname(__file__), '..','..','SubProcesses', info['P_dir'], info['directory']) info['base_directory'] = basedir - jobs.append(info) - + if nb_split == 1: + jobs.append(info) + else: + for i in range(nb_split): + new_info = dict(info) + new_info['offset'] = i+1 + new_info['directory'] += self.alphabet[i % 26] + str((i+1)//26) + new_info['base_directory'] = info['directory'] + jobs.append(new_info) write_dir = '.' if self.readonly else None self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), jobs, write_dir) + if self.nprocs > 1: + nprocs_cluster = cluster.MultiCore(nb_core=self.nprocs) + gridpack_start = time.time() + def gridpack_wait_monitoring(Idle, Running, Done): + if Idle+Running+Done == 0: + return + logger.info("Gridpack event generation: %s Idle, %s Running, %s Done [%s]" + % (Idle, Running, Done, misc.format_time(time.time()-gridpack_start))) + done = [] for j in jobs: - if j['P_dir'] in done: - continue - done.append(j['P_dir']) + if self.nprocs == 1: + if j['P_dir'] in done: + continue + done.append(j['P_dir']) + # Give a little status. Sometimes these jobs run very long, and having hours without any + # console output can be a bit frightening and make users think we are looping. + if len(done)%5==0: + logger.info(f"Working on job {len(done)} of {len(jobs)}") + # set the working directory path. pwd = pjoin(os.getcwd(),j['P_dir']) if self.readonly else pjoin(self.me_dir, 'SubProcesses', j['P_dir']) - exe = pjoin(pwd, 'ajob1') + exe = pjoin(pwd, j['script_name']) st = os.stat(exe) os.chmod(exe, st.st_mode | stat.S_IEXEC) # run the code\ - cluster.onecore.launch_and_wait(exe, cwd=pwd, packet_member=j['packet']) + if self.nprocs == 1: + cluster.onecore.launch_and_wait(exe, cwd=pwd, packet_member=j['packet']) + else: + nprocs_cluster.cluster_submit(exe, cwd=pwd, packet_member=j['packet']) write_dir = '.' if self.readonly else pjoin(self.me_dir, 'SubProcesses') + if self.nprocs > 1: + nprocs_cluster.wait(self.me_dir, gridpack_wait_monitoring) + + if self.readonly: + combine_runs.CombineRuns(write_dir) + else: + combine_runs.CombineRuns(self.me_dir) self.check_events(goal_lum, to_refine, jobs, write_dir) def check_events(self, goal_lum, to_refine, jobs, Sdir): diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/hel_recycle.py b/epochX/cudacpp/gg_ttgg.mad/bin/internal/hel_recycle.py index 1471de4bcb..978ba6575e 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/hel_recycle.py +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/hel_recycle.py @@ -550,7 +550,7 @@ def get_jamp_lines(self, line): def get_amp2_lines(self, line): if line.startswith(' DO I = 1, NCOLOR'): self.in_amp2 = False - elif not line.isspace(): + elif not line.isspace() and 'DENOM' not in line: self.template_dict['amp2_lines'] += f'{line[0:6]} {self.add_indices(line[6:])}' def prepare_bools(self): diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/histograms.py b/epochX/cudacpp/gg_ttgg.mad/bin/internal/histograms.py index 51ae2914fc..d68c560806 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/histograms.py +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/histograms.py @@ -1149,11 +1149,8 @@ def parse_one_histo_from_stream(self, stream, all_weight_header, boundaries = [0.0,0.0] for j, weight in \ enumerate(HwU.histo_bin_weight_re.finditer(line_bin)): - if (j == len(weight_header)): - continue - if j == len(all_weight_header): - raise HwU.ParseError("There is more bin weights"+\ - " specified than expected (%i)"%len(weight_header)) + #if (j == len(weight_header)): + # continue if selected_central_weight == all_weight_header[j]: bin_weights['central'] = float(weight.group('weight')) if all_weight_header[j] == 'boundary_xmin': @@ -2480,14 +2477,14 @@ def get_main_central_plot_lines(HwU_name, block_position, color_index, # return [template_no_stat%rep_dic]+\ # ([template%rep_dic] if show_mc_uncertainties else []) - # The use of sqrt(-1) is just a trick to prevent the line to display + # The use of 1/0 is just a trick to prevent the line to display res = [] - rep_dic['data'] = '($3 < 0 ? sqrt(-1) : $3)' + rep_dic['data'] = '($3 < 0 ? 1/0 : $3)' res.append(template_no_stat%rep_dic) rep_dic['title'] = " title ''" if show_mc_uncertainties: res.append(template%rep_dic) - rep_dic['data'] = '($3 >= 0 ? sqrt(-1) : abs($3))' + rep_dic['data'] = '($3 >= 0 ? 1/0 : abs($3))' rep_dic['ls'] = ' ls %d'%(100+color_index) res.append(template_no_stat%rep_dic) if show_mc_uncertainties: @@ -2739,13 +2736,13 @@ def ratio_no_correlations(wgtsA, wgtsB): """#-- rendering subhistograms '%(subhistogram_type)s' %(unset label)s %(set_format_y)s +%(set_yscale)s set yrange [%(ymin).4e:%(ymax).4e] set origin %(origin_x).4e, %(origin_y).4e set size %(size_x).4e, %(size_y).4e set mytics %(mytics)d %(set_ytics)s %(set_format_x)s -%(set_yscale)s %(set_ylabel)s %(set_histo_label)s plot \\""" @@ -2878,7 +2875,7 @@ def ratio_no_correlations(wgtsA, wgtsB): # We decide to show uncertainties in the main plot only if they # are part of a monocolor band. Otherwise, they will only be - # shown in the first subplot. Notice that plotting 'sqrt(-1)' + # shown in the first subplot. Notice that plotting '1/0' # is just a trick so as to have only the key printed with no # line @@ -2890,7 +2887,7 @@ def ratio_no_correlations(wgtsA, wgtsB): '%s, scale variation'%title, band='scale' in use_band) else: uncertainty_plot_lines[-1]['scale'] = \ - ["sqrt(-1) ls %d title '%s'"%(color_index+10,'%s, scale variation'%title)] + ["1/0 ls %d title '%s'"%(color_index+10,'%s, scale variation'%title)] # And now PDF_variation if available if not PDF_var_pos is None and len(PDF_var_pos)>0: if 'pdf' in use_band: @@ -2899,7 +2896,7 @@ def ratio_no_correlations(wgtsA, wgtsB): '%s, PDF variation'%title, band='pdf' in use_band) else: uncertainty_plot_lines[-1]['pdf'] = \ - ["sqrt(-1) ls %d title '%s'"%(color_index+20,'%s, PDF variation'%title)] + ["1/0 ls %d title '%s'"%(color_index+20,'%s, PDF variation'%title)] # And now merging variation if available if not merging_var_pos is None and len(merging_var_pos)>0: if 'merging_scale' in use_band: @@ -2908,7 +2905,7 @@ def ratio_no_correlations(wgtsA, wgtsB): '%s, merging scale variation'%title, band='merging_scale' in use_band) else: uncertainty_plot_lines[-1]['merging_scale'] = \ - ["sqrt(-1) ls %d title '%s'"%(color_index+30,'%s, merging scale variation'%title)] + ["1/0 ls %d title '%s'"%(color_index+30,'%s, merging scale variation'%title)] # And now alpsfact variation if available if not alpsfact_var_pos is None and len(alpsfact_var_pos)>0: if 'alpsfact' in use_band: @@ -2917,7 +2914,7 @@ def ratio_no_correlations(wgtsA, wgtsB): '%s, alpsfact variation'%title, band='alpsfact' in use_band) else: uncertainty_plot_lines[-1]['alpsfact'] = \ - ["sqrt(-1) ls %d title '%s'"%(color_index+40,'%s, alpsfact variation'%title)] + ["1/0 ls %d title '%s'"%(color_index+40,'%s, alpsfact variation'%title)] # plot_lines.append( # "'%s' index %d using (($1+$2)/2):3 ls %d title '%s'"\ diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/launch_plugin.py b/epochX/cudacpp/gg_ttgg.mad/bin/internal/launch_plugin.py index 0924927785..ba08c10340 100644 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/launch_plugin.py +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/launch_plugin.py @@ -33,7 +33,7 @@ def compile(self, *args, **opts): if 'cwd' in opts and os.path.basename(opts['cwd']) == 'Source': path = pjoin(opts['cwd'], 'make_opts') common_run_interface.CommonRunCmd.update_make_opts_full(path, - {'FPTYPE': self.run_card['floating_type'] }) + {'override FPTYPE': self.run_card['floating_type'] }) misc.sprint('FPTYPE checked') cudacpp_supported_backends = [ 'fortran', 'cuda', 'hip', 'cpp', 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z', 'cppauto' ] if args and args[0][0] == 'madevent' and hasattr(self, 'run_card'): @@ -76,7 +76,7 @@ def reset_makeopts(self, old_value, new_value, name): if not hasattr(self, 'path'): raise Exception if name == 'floating_type': - common_run_interface.CommonRunCmd.update_make_opts_full({'FPTYPE': new_value}) + common_run_interface.CommonRunCmd.update_make_opts_full({'override FPTYPE': new_value}) else: raise Exception Sourcedir = pjoin(os.path.dirname(os.path.dirname(self.path)), 'Source') diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/lhe_parser.py b/epochX/cudacpp/gg_ttgg.mad/bin/internal/lhe_parser.py index f6e47956cd..76ded329c0 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/lhe_parser.py +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/lhe_parser.py @@ -2953,8 +2953,8 @@ def pt(self): @property def pseudorapidity(self): - norm = math.sqrt(self.px**2 + self.py**2+self.pz**2) - return 0.5* math.log((norm - self.pz) / (norm + self.pz)) + norm = math.sqrt(self.px**2 + self.py**2 + self.pz**2) + return 0.5* math.log((norm + self.pz) / (norm - self.pz)) @property def rapidity(self): 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 85e5bcf5e3..2852f1d4d8 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/madevent_interface.py +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/madevent_interface.py @@ -1171,10 +1171,10 @@ def check_survey(self, args, cmd='survey'): for opt,value in self._survey_options.items(): if arg.startswith('--%s=' % opt): exec('self.opts[\'%s\'] = %s(arg.split(\'=\')[-1])' % \ - (opt, value[0])) + (opt, value[0]), globals(), {'self':self, 'arg':arg}) arg = "" if arg != "": raise Exception - except Exception: + except Exception as error: self.help_survey() raise self.InvalidCmd('invalid %s argument'% arg) @@ -3656,9 +3656,11 @@ def do_refine(self, line): else: self.refine_mode = "new" - cross, error = self.make_make_all_html_results() + cross, error, across = self.make_make_all_html_results(get_attr=('xsec','xerru','axsec')) + self.results.add_detail('cross', cross) self.results.add_detail('error', error) + self.results.add_detail('axsec', across) self.results.add_detail('run_statistics', dict(self.results.get_detail('run_statistics'))) @@ -3786,7 +3788,7 @@ def split(a, n): for i, local_G in enumerate(split(Gdirs, nb_chunk)): line = [pjoin(self.me_dir, "Events", self.run_name, "partials%d.lhe.gz" % i)] line.append(pjoin(self.me_dir, 'Events', self.run_name, '%s_%s_banner.txt' % (self.run_name, tag))) - line.append(str(self.results.current['cross'])) + line.append(str(self.results.current.get('axsec'))) line += local_G partials_info.append(self.do_combine_events_partial(' '.join(line), preprocess_only=True)) mycluster.submit(sys.executable, @@ -6749,7 +6751,7 @@ def get_subP_ids(path): class GridPackCmd(MadEventCmd): """The command for the gridpack --Those are not suppose to be use interactively--""" - def __init__(self, me_dir = None, nb_event=0, seed=0, gran=-1, *completekey, **stdin): + def __init__(self, me_dir = None, nb_event=0, seed=0, gran=-1, nprocs=1, maxevts=2500, *completekey, **stdin): """Initialize the command and directly run""" # Initialize properly @@ -6759,6 +6761,8 @@ 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.nprocs = nprocs + self.maxevts = maxevts self.options['automatic_html_opening'] = False #write the grid_card.dat on disk @@ -6874,7 +6878,7 @@ def launch(self, nb_event, seed): #misc.call([pjoin(self.me_dir,'bin','refine4grid'), # str(nb_event), '0', 'Madevent','1','GridRun_%s' % seed], # cwd=self.me_dir) - self.refine4grid(nb_event) + self.gridpack_cross = self.refine4grid(nb_event) # 3) Combine the events/pythia/... self.exec_cmd('combine_events') @@ -6902,6 +6906,8 @@ def refine4grid(self, nb_event): precision = nb_event + across= self.make_make_all_html_results(get_attr='axsec') + self.opts = dict([(key,value[1]) for (key,value) in \ self._survey_options.items()]) @@ -6915,8 +6921,9 @@ def refine4grid(self, nb_event): 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} + refine_opt = {'err_goal': nb_event, 'split_channels': True, + 'ngran':self.granularity, 'readonly': self.readonly, + 'nprocs': self.nprocs, 'maxevts': self.maxevts} 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 @@ -6926,7 +6933,7 @@ def refine4grid(self, nb_event): #print 'run combine!!!' #combine_runs.CombineRuns(self.me_dir) - return + return across #update html output Presults = sum_html.collect_result(self) cross, error = Presults.xsec, Presults.xerru @@ -7051,10 +7058,14 @@ def do_combine_events(self, line): sum_axsec += result.get('axsec')*gscalefact[Gdir] if len(AllEvent) >= 80: #perform a partial unweighting - if self.results.current['cross'] == 0 and self.run_card['gridpack']: - nb_event= self.nb_event + if not self.results.current.get('axsec'): + if self.run_card['gridpack'] and self.gridpack_cross: + nb_event = min(abs(1.05*self.nb_event*sum_axsec/self.gridpack_cross),self.nb_event) + else: + nb_event= self.nb_event else: - nb_event = min(abs(1.01*self.nb_event*sum_axsec/self.results.current['cross']),self.run_card['nevents']) + nb_event = min(abs(1.01*self.nb_event*sum_axsec/self.results.current.get('axsec')),self.run_card['nevents'], self.nb_event, self.gridpack_cross, sum_axsec) + misc.sprint(nb_event, self.results.current.get('axsec'), self.gridpack_cross) AllEvent.unweight(pjoin(outdir, self.run_name, "partials%s.lhe.gz" % partials), get_wgt, log_level=5, trunc_error=1e-2, event_target=nb_event) AllEvent = lhe_parser.MultiEventFile() @@ -7068,6 +7079,7 @@ def do_combine_events(self, line): for data in partials_info: AllEvent.add(*data) + sum_xsec += data[1] if not hasattr(self,'proc_characteristic'): self.proc_characteristic = self.get_characteristics() diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/restore_data b/epochX/cudacpp/gg_ttgg.mad/bin/internal/restore_data index 6205bb9567..407ed7aa91 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/restore_data +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/restore_data @@ -48,8 +48,17 @@ for i in `cat subproc.mg` ; do cd ../ done +# check if we are on a Mac, otherwise assume Linux +if [[ "$OSTYPE" == "darwin"* ]]; then + # no nproc on Mac, so use sysctl instead + # use -S1024 because there is a limit on the length of the command + xargs_opts="-P $(sysctl -n hw.ncpu) -S1024" +else + xargs_opts="-P $(nproc --all)" +fi + find . -mindepth 2 -maxdepth 2 -type d -name 'G*' -print0 \ - | xargs --null -P "$(nproc --all)" -I{} bash -c " + | xargs --null ${xargs_opts} -I{} bash -c " cd {} for j in $1_results.dat ; do if [[ -e \$j ]] ; then diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/sum_html.py b/epochX/cudacpp/gg_ttgg.mad/bin/internal/sum_html.py index 9dd5826f71..fb8dd3a74a 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/sum_html.py +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/sum_html.py @@ -770,7 +770,7 @@ def collect_result(cmd, folder_names=[], jobs=None, main_dir=None): return all -def make_all_html_results(cmd, folder_names = [], jobs=[]): +def make_all_html_results(cmd, folder_names = [], jobs=[], get_attr=None): """ folder_names and jobs have been added for the amcatnlo runs """ run = cmd.results.current['run_name'] if not os.path.exists(pjoin(cmd.me_dir, 'HTML', run)): @@ -794,7 +794,12 @@ def make_all_html_results(cmd, folder_names = [], jobs=[]): fsock.write('%s

' % Presults.get_html(run, unit, cmd.me_dir)) fsock.write('%s
' % P_text) - return Presults.xsec, Presults.xerru + if not get_attr: + return Presults.xsec, Presults.xerru + else: + if isinstance(get_attr, tuple): + return [getattr(Presults, _) for _ in get_attr] + return getattr(Presults, get_attr) diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/internal/ufomodel/write_param_card.py b/epochX/cudacpp/gg_ttgg.mad/bin/internal/ufomodel/write_param_card.py index 57a85b0614..33a89259f8 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/ufomodel/write_param_card.py +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/ufomodel/write_param_card.py @@ -116,9 +116,10 @@ def write_param(self, param, lhablock): def write_dep_param_block(self, lhablock): import cmath from parameters import all_parameters + param_values = {'cmath':cmath} for parameter in all_parameters: try: - exec("%s = %s" % (parameter.name, parameter.value)) + exec("%s = %s" % (parameter.name, parameter.value), globals(), param_values) except Exception: pass text = "## Not dependent paramater.\n" @@ -134,7 +135,7 @@ def write_dep_param_block(self, lhablock): prefix = "DECAY " for part, param in data: if isinstance(param.value, str): - value = complex(eval(param.value)).real + value = complex(eval(param.value, globals(), param_values)).real else: value = param.value diff --git a/epochX/cudacpp/gg_ttgg.mad/bin/madevent b/epochX/cudacpp/gg_ttgg.mad/bin/madevent index dff9711b73..9c5363e682 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/madevent +++ b/epochX/cudacpp/gg_ttgg.mad/bin/madevent @@ -178,6 +178,17 @@ force_run = False if (args and args[0] == 'treatcards'): force_run=True + +# check that madgraph is not in PYTHONPATH +try: + import madgraph +except ImportError: + pass +else: + logger.getLogger('madgraph').error('Looks like you do have madgraph in your PYTHONPATH (or you run this executable from the main MG5aMC directory). This executable will likely not work in such case.') + + + # Call the cmd interface main loop try: if '-h' in args or '--help' in args: diff --git a/epochX/cudacpp/gg_ttgg.mad/src/HelAmps_sm.h b/epochX/cudacpp/gg_ttgg.mad/src/HelAmps_sm.h index 53dd560ed6..921ace57e7 100644 --- a/epochX/cudacpp/gg_ttgg.mad/src/HelAmps_sm.h +++ b/epochX/cudacpp/gg_ttgg.mad/src/HelAmps_sm.h @@ -8,7 +8,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_ttgg.mad/src/Parameters_sm.cc b/epochX/cudacpp/gg_ttgg.mad/src/Parameters_sm.cc index 47a3a011b8..d17aac5b5c 100644 --- a/epochX/cudacpp/gg_ttgg.mad/src/Parameters_sm.cc +++ b/epochX/cudacpp/gg_ttgg.mad/src/Parameters_sm.cc @@ -7,7 +7,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_ttgg.mad/src/Parameters_sm.h b/epochX/cudacpp/gg_ttgg.mad/src/Parameters_sm.h index 76066c7bb1..63f7d185bd 100644 --- a/epochX/cudacpp/gg_ttgg.mad/src/Parameters_sm.h +++ b/epochX/cudacpp/gg_ttgg.mad/src/Parameters_sm.h @@ -7,7 +7,7 @@ // Further modified by: A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_ttgg.sa/CODEGEN_cudacpp_gg_ttgg_log.txt b/epochX/cudacpp/gg_ttgg.sa/CODEGEN_cudacpp_gg_ttgg_log.txt index 7e5a3007eb..7b2cecbb01 100644 --- a/epochX/cudacpp/gg_ttgg.sa/CODEGEN_cudacpp_gg_ttgg_log.txt +++ b/epochX/cudacpp/gg_ttgg.sa/CODEGEN_cudacpp_gg_ttgg_log.txt @@ -1,8 +1,11 @@ +WARNING:root:python3.12 support is still experimental. For the moment re-weighting is NOT working and do expect a LOT of syntax warning. We do not advise python3.12 for production for the moment. +Running MG5 in debug mode +Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT +Plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT has marked as NOT being validated with this version: 3.6.2. +It has been validated for the last time with version: 3.6.0 Note that this is a development version. This version is intended for development/beta testing and NOT for production. This version has not been fully tested (if at all) and might have limited user support (if at all) -Running MG5 in debug mode -Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT ************************************************************ * * * W E L C O M E to * @@ -15,7 +18,7 @@ Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT * * * * * * * * * * * * -* VERSION 3.6.0 2024-09-30 * +* VERSION 3.6.2 2025-03-19 * * * * WARNING: UNKNOWN DEVELOPMENT VERSION. * * WARNING: DO NOT USE FOR PRODUCTION * @@ -46,10 +49,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 Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt -import /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttgg.mg +import /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_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 @@ -58,7 +60,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.0059185028076171875  +DEBUG: model prefixing takes 0.0019252300262451172  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  @@ -151,13 +153,13 @@ 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.156 s +1 processes with 123 diagrams generated in 0.065 s Total: 1 processes with 123 diagrams output standalone_cudacpp ../TMPOUT/CODEGEN_cudacpp_gg_ttgg Output will be done with PLUGIN: CUDACPP_OUTPUT DEBUG: Entering PLUGIN_ProcessExporter.__init__ (initialise the exporter) [output.py at line 171]  DEBUG: Entering PLUGIN_ProcessExporter.copy_template (initialise the directory) [output.py at line 176]  -INFO: Creating subdirectories in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttgg +INFO: Creating subdirectories in directory /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttgg 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 @@ -166,18 +168,18 @@ INFO: Processing color information for process: g g > t t~ g g @1 DEBUG: type(fortran_model)= [output.py at line 220]  DEBUG: type(me)= me=0 [output.py at line 221]  DEBUG: "need to link", self.to_link_in_P =  need to link ['nvtx.h', 'timer.h', 'timermap.h', 'ompnumthreads.h', 'GpuRuntime.h', 'GpuAbstraction.h', 'MemoryAccessHelpers.h', 'MemoryAccessVectors.h', 'MemoryAccessMatrixElements.h', 'MemoryAccessMomenta.h', 'MemoryAccessRandomNumbers.h', 'MemoryAccessWeights.h', 'MemoryAccessAmplitudes.h', 'MemoryAccessWavefunctions.h', 'MemoryAccessGs.h', 'MemoryAccessCouplingsFixed.h', 'MemoryAccessNumerators.h', 'MemoryAccessDenominators.h', 'MemoryAccessChannelIds.h', 'EventStatistics.h', 'CommonRandomNumbers.h', 'CrossSectionKernels.cc', 'CrossSectionKernels.h', 'MatrixElementKernels.cc', 'MatrixElementKernels.h', 'RamboSamplingKernels.cc', 'RamboSamplingKernels.h', 'RandomNumberKernels.h', 'CommonRandomNumberKernel.cc', 'CurandRandomNumberKernel.cc', 'HiprandRandomNumberKernel.cc', 'Bridge.h', 'BridgeKernels.cc', 'BridgeKernels.h', 'fbridge.cc', 'fbridge.inc', 'fsampler.cc', 'fsampler.inc', 'MadgraphTest.h', 'runTest.cc', 'testmisc.cc', 'testxxx_cc_ref.txt', 'valgrind.h', 'cudacpp.mk', 'testxxx.cc', 'MemoryBuffers.h', 'MemoryAccessCouplings.h', 'perf.py', 'profile.sh'] [output.py at line 222]  -INFO: Creating files in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttgg/SubProcesses/P1_Sigma_sm_gg_ttxgg -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttgg/SubProcesses/P1_Sigma_sm_gg_ttxgg/./CPPProcess.h -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttgg/SubProcesses/P1_Sigma_sm_gg_ttxgg/./CPPProcess.cc -INFO: Created files CPPProcess.h and CPPProcess.cc in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttgg/SubProcesses/P1_Sigma_sm_gg_ttxgg/. -Generated helas calls for 1 subprocesses (123 diagrams) in 0.422 s +INFO: Creating files in directory /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttgg/SubProcesses/P1_Sigma_sm_gg_ttxgg +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttgg/SubProcesses/P1_Sigma_sm_gg_ttxgg/./CPPProcess.h +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttgg/SubProcesses/P1_Sigma_sm_gg_ttxgg/./CPPProcess.cc +INFO: Created files CPPProcess.h and CPPProcess.cc in directory /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttgg/SubProcesses/P1_Sigma_sm_gg_ttxgg/. +Generated helas calls for 1 subprocesses (123 diagrams) in 0.166 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.316 s +ALOHA: aloha creates 5 routines in 0.150 s VVV1 VVV1 FFV1 @@ -190,17 +192,17 @@ ALOHA: aloha creates 5 routines in 0.316 s VVVV3 VVVV4 VVVV4 -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttgg/src/./HelAmps_sm.h -INFO: Created file HelAmps_sm.h in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttgg/src/. +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttgg/src/./HelAmps_sm.h +INFO: Created file HelAmps_sm.h in directory /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_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_cudacpp_gg_ttgg/src/./Parameters_sm.h -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttgg/src/./Parameters_sm.cc +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttgg/src/./Parameters_sm.h +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_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_cudacpp_gg_ttgg/src/. and /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttgg/src/. +INFO: /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttgg/src/. and /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttgg/src/. quit -real 0m1.455s -user 0m1.362s -sys 0m0.060s +real 0m1.784s +user 0m0.725s +sys 0m0.134s Code generation completed in 1 seconds diff --git a/epochX/cudacpp/gg_ttgg.sa/SubProcesses/Bridge.h b/epochX/cudacpp/gg_ttgg.sa/SubProcesses/Bridge.h index 87aa648dd2..49b928db67 100644 --- a/epochX/cudacpp/gg_ttgg.sa/SubProcesses/Bridge.h +++ b/epochX/cudacpp/gg_ttgg.sa/SubProcesses/Bridge.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: S. Roiser (Nov 2021) for the MG5aMC CUDACPP plugin. -// Further modified by: S. Roiser, J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2021-2025) for the MG5aMC CUDACPP plugin. #ifndef BRIDGE_H #define BRIDGE_H 1 @@ -255,11 +255,15 @@ namespace mg5amcCpu throw std::logic_error( "Bridge constructor: FIXME! cannot choose gputhreads" ); // this should never happen! m_gpublocks = m_nevt / m_gputhreads; } +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Instantiate device Bridge (nevt=" << m_nevt << ", gpublocks=" << m_gpublocks << ", gputhreads=" << m_gputhreads << ", gpublocks*gputhreads=" << m_gpublocks * m_gputhreads << ")" << std::endl; +#endif m_pmek.reset( new MatrixElementKernelDevice( m_devMomentaC, m_devGs, m_devRndHel, m_devRndCol, m_devChannelIds, m_devMEs, m_devSelHel, m_devSelCol, m_gpublocks, m_gputhreads ) ); #else +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Instantiate host Bridge (nevt=" << m_nevt << ")" << std::endl; +#endif m_pmek.reset( new MatrixElementKernelHost( m_hstMomentaC, m_hstGs, m_hstRndHel, m_hstRndCol, m_hstChannelIds, m_hstMEs, m_hstSelHel, m_hstSelCol, m_nevt ) ); #endif // MGONGPUCPP_GPUIMPL // Create a process object, read param card and set parameters @@ -290,8 +294,10 @@ namespace mg5amcCpu throw std::runtime_error( "Bridge: gpublocks*gputhreads must equal m_nevt in set_gpugrid" ); m_gpublocks = gpublocks; m_gputhreads = gputhreads; +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Set grid in Bridge (nevt=" << m_nevt << ", gpublocks=" << m_gpublocks << ", gputhreads=" << m_gputhreads << ", gpublocks*gputhreads=" << m_gpublocks * m_gputhreads << ")" << std::endl; +#endif m_pmek->setGrid( m_gpublocks, m_gputhreads ); } #endif @@ -347,7 +353,9 @@ namespace mg5amcCpu if( goodHelOnly ) return; m_pmek->computeMatrixElements( useChannelIds ); copyHostFromDevice( m_hstMEs, m_devMEs ); +#ifdef MGONGPUCPP_VERBOSE flagAbnormalMEs( m_hstMEs.data(), m_nevt ); +#endif copyHostFromDevice( m_hstSelHel, m_devSelHel ); copyHostFromDevice( m_hstSelCol, m_devSelCol ); if constexpr( std::is_same_v ) @@ -400,7 +408,9 @@ namespace mg5amcCpu } if( goodHelOnly ) return; m_pmek->computeMatrixElements( useChannelIds ); +#ifdef MGONGPUCPP_VERBOSE flagAbnormalMEs( m_hstMEs.data(), m_nevt ); +#endif if constexpr( std::is_same_v ) { memcpy( mes, m_hstMEs.data(), m_hstMEs.bytes() ); diff --git a/epochX/cudacpp/gg_ttgg.sa/SubProcesses/GpuRuntime.h b/epochX/cudacpp/gg_ttgg.sa/SubProcesses/GpuRuntime.h index 860c7fde16..6a4b946e74 100644 --- a/epochX/cudacpp/gg_ttgg.sa/SubProcesses/GpuRuntime.h +++ b/epochX/cudacpp/gg_ttgg.sa/SubProcesses/GpuRuntime.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: J. Teig (Jun 2023, based on earlier work by S. Roiser) for the MG5aMC CUDACPP plugin. -// Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2025) for the MG5aMC CUDACPP plugin. #ifndef MG5AMC_GPURUNTIME_H #define MG5AMC_GPURUNTIME_H 1 @@ -50,7 +50,7 @@ namespace mg5amcGpu // Set up CUDA application // ** NB: strictly speaking this is not needed when using the CUDA runtime API ** // Calling cudaSetDevice on startup is useful to properly book-keep the time spent in CUDA initialization - static void setUp( const bool debug = true ) + static void setUp( const bool debug = false ) // ZW: changed debug default to false { // ** NB: it is useful to call cudaSetDevice, or cudaFree, to properly book-keep the time spent in CUDA initialization // ** NB: otherwise, the first CUDA operation (eg a cudaMemcpyToSymbol in CPPProcess ctor) appears to take much longer! @@ -71,7 +71,7 @@ namespace mg5amcGpu // ** NB: strictly speaking this is not needed when using the CUDA runtime API ** // Calling cudaDeviceReset on shutdown is only needed for checking memory leaks in cuda-memcheck // See https://docs.nvidia.com/cuda/cuda-memcheck/index.html#leak-checking - static void tearDown( const bool debug = true ) + static void tearDown( const bool debug = false ) // ZW: changed debug default to false { if( debug ) std::cout << "__GpuRuntime: calling GpuDeviceReset()" << std::endl; checkGpu( gpuDeviceReset() ); diff --git a/epochX/cudacpp/gg_ttgg.sa/SubProcesses/MatrixElementKernels.cc b/epochX/cudacpp/gg_ttgg.sa/SubProcesses/MatrixElementKernels.cc index f463977c1a..703ea3781c 100644 --- a/epochX/cudacpp/gg_ttgg.sa/SubProcesses/MatrixElementKernels.cc +++ b/epochX/cudacpp/gg_ttgg.sa/SubProcesses/MatrixElementKernels.cc @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: A. Valassi (Jan 2022) for the MG5aMC CUDACPP plugin. -// Further modified by: J. Teig, A. Valassi (2022-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: J. Teig, A. Valassi, Z. Wettersten (2022-2025) for the MG5aMC CUDACPP plugin. #include "MatrixElementKernels.h" @@ -60,7 +60,9 @@ namespace mg5amcCpu #ifdef MGONGPU_CHANNELID_DEBUG MatrixElementKernelBase::dumpNevtProcessedByChannel(); #endif +#ifdef MGONGPUCPP_VERBOSE MatrixElementKernelBase::dumpSignallingFPEs(); +#endif } //-------------------------------------------------------------------------- diff --git a/epochX/cudacpp/gg_ttgg.sa/SubProcesses/MatrixElementKernels.h b/epochX/cudacpp/gg_ttgg.sa/SubProcesses/MatrixElementKernels.h index 7acff4b308..8da04d7945 100644 --- a/epochX/cudacpp/gg_ttgg.sa/SubProcesses/MatrixElementKernels.h +++ b/epochX/cudacpp/gg_ttgg.sa/SubProcesses/MatrixElementKernels.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: A. Valassi (Jan 2022) for the MG5aMC CUDACPP plugin. -// Further modified by: J. Teig, A. Valassi (2022-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: J. Teig, A. Valassi, Z. Wettersten (2022-2025) for the MG5aMC CUDACPP plugin. #ifndef MATRIXELEMENTKERNELS_H #define MATRIXELEMENTKERNELS_H 1 @@ -134,7 +134,7 @@ namespace mg5amcCpu // Does this host system support the SIMD used in the matrix element calculation? // [NB: this is private, SIMD vectorization in mg5amc C++ code is currently only used in the ME calculations below MatrixElementKernelHost!] - static bool hostSupportsSIMD( const bool verbose = true ); + static bool hostSupportsSIMD( const bool verbose = false ); // ZW: default verbose false private: diff --git a/epochX/cudacpp/gg_ttgg.sa/SubProcesses/MemoryAccessGs.h b/epochX/cudacpp/gg_ttgg.sa/SubProcesses/MemoryAccessGs.h index 63c17a68fa..50a6aaef4d 100644 --- a/epochX/cudacpp/gg_ttgg.sa/SubProcesses/MemoryAccessGs.h +++ b/epochX/cudacpp/gg_ttgg.sa/SubProcesses/MemoryAccessGs.h @@ -128,6 +128,14 @@ namespace mg5amcCpu #endif } + // Locate a field (output) in a memory buffer (input) from a kernel event-indexing mechanism (internal) + // [Signature (SCALAR OR VECTOR) ===> fptype_sv* kernelAccess( fptype* buffer ) <===] + static __host__ __device__ inline fptype_sv* + kernelAccessP( fptype* buffer ) + { + return reinterpret_cast( buffer ); + } + // Locate a field (output) in a memory buffer (input) from a kernel event-indexing mechanism (internal) and the given field indexes (input) // [Signature (const, SCALAR) ===> const fptype& kernelAccessConst( const fptype* buffer ) <===] static constexpr auto kernelAccessConst_s = diff --git a/epochX/cudacpp/gg_ttgg.sa/SubProcesses/MemoryBuffers.h b/epochX/cudacpp/gg_ttgg.sa/SubProcesses/MemoryBuffers.h index 65a101888d..17ba7a89e5 100644 --- a/epochX/cudacpp/gg_ttgg.sa/SubProcesses/MemoryBuffers.h +++ b/epochX/cudacpp/gg_ttgg.sa/SubProcesses/MemoryBuffers.h @@ -13,6 +13,7 @@ #include "CPPProcess.h" #include "GpuRuntime.h" #include "Parameters_sm.h" +#include "processConfig.h" #include @@ -274,7 +275,8 @@ namespace mg5amcCpu typedef BufferBase BufferNumerators; // The size (number of elements) per event in a memory buffer for numerators - constexpr size_t sizePerEventNumerators = 1; + // (should be equal to the number of diagrams in the process) + constexpr size_t sizePerEventNumerators = processConfig::ndiagrams; #ifndef MGONGPUCPP_GPUIMPL // A class encapsulating a C++ host buffer for gs 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 5956559974..87e7972438 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 @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -25,6 +25,7 @@ #include "MemoryAccessMatrixElements.h" #include "MemoryAccessMomenta.h" #include "MemoryAccessWavefunctions.h" +#include "processConfig.h" #ifdef MGONGPU_SUPPORTS_MULTICHANNEL #include "MemoryAccessDenominators.h" @@ -96,6 +97,69 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { +#ifdef MGONGPU_SUPPORTS_MULTICHANNEL + __device__ INLINE unsigned int getChannelId( const unsigned int* allChannelIds +#ifndef MGONGPUCPP_GPUIMPL + , + const int ievt00, + bool sanityCheckMixedPrecision = true +#endif + ) + { + unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr +#ifdef MGONGPUCPP_GPUIMPL + using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page + if( allChannelIds != nullptr ) + { + const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) + const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) + // NB: channelIds_sv is a scalar in CUDA + channelId = channelIds_sv; + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + } +#else // Cuda or C++ + using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + if( allChannelIds != nullptr ) + { + // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) + const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 + uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) +#ifndef MGONGPU_CPPSIMD + // NB: channelIds_sv is a scalar in no-SIMD C++ + channelId = channelIds_sv; +#else + // NB: channelIds_sv is a vector in SIMD C++ + channelId = channelIds_sv[0]; // element[0] + for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] + { + assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId + } +#endif + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + if( sanityCheckMixedPrecision ) + { +#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT + // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) + const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 + uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + for( int i = 0; i < neppV; ++i ) + { + assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector + } +#endif + } + } +#endif // MGONGPUCPP_GPUIMPL + return channelId; + } +#endif // MGONGPU_SUPPORTS_MULTICHANNEL + constexpr int nw6 = CPPProcess::nw6; // dimensions of each wavefunction (HELAS KEK 91-11): e.g. 6 for e+ e- -> mu+ mu- (fermions and vectors) constexpr int npar = CPPProcess::npar; // #particles in total (external = initial + final): e.g. 4 for e+ e- -> mu+ mu- constexpr int ncomb = CPPProcess::ncomb; // #helicity combinations: e.g. 16 for e+ e- -> mu+ mu- (2**4 = fermion spin up/down ** npar) @@ -305,7 +369,7 @@ namespace mg5amcCpu COUPs[ndcoup + iicoup] = allCOUPs[ndcoup + iicoup]; // independent couplings, fixed for all events fptype* MEs = E_ACCESS::ieventAccessRecord( allMEs, ievt0 ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); #endif #endif @@ -315,7 +379,7 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Numerators and denominators for the current event (CUDA) or SIMD event page (C++) - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); #endif @@ -2775,7 +2839,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- @@ -3147,9 +3213,6 @@ namespace mg5amcCpu #ifdef MGONGPUCPP_GPUIMPL // Remember: in CUDA this is a kernel for one event, in c++ this processes n events const int ievt = blockDim.x * blockIdx.x + threadIdx.x; // index of event (thread) in grid -#ifdef MGONGPU_SUPPORTS_MULTICHANNEL - using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events -#endif #else //assert( (size_t)(allmomenta) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] //assert( (size_t)(allMEs) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] @@ -3157,7 +3220,6 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL using NUM_ACCESS = HostAccessNumerators; // non-trivial access: buffer includes all events using DEN_ACCESS = HostAccessDenominators; // non-trivial access: buffer includes all events - using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events #endif #endif @@ -3182,11 +3244,12 @@ namespace mg5amcCpu fptype_sv& MEs_sv = E_ACCESS::kernelAccess( MEs ); MEs_sv = fptype_sv{ 0 }; #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - numerators_sv = fptype_sv{ 0 }; + for( int i = 0; i < processConfig::ndiagrams; ++i ) + numerators_sv[i] = fptype_sv{ 0 }; denominators_sv = fptype_sv{ 0 }; #endif } @@ -3199,17 +3262,7 @@ namespace mg5amcCpu // *** START OF PART 1a - CUDA (one event per GPU thread) *** #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) - const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) - // NB: channelIds_sv is a scalar in CUDA - channelId = channelIds_sv; - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) - } + unsigned int channelId = getChannelId( allChannelIds ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (for the single event processed in calculate_wavefunctions) @@ -3324,38 +3377,7 @@ namespace mg5amcCpu const int ievt00 = ipagV2 * neppV; // loop on one SIMD page (neppV events) at a time #endif #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) - const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 - uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) -#ifndef MGONGPU_CPPSIMD - // NB: channelIds_sv is a scalar in no-SIMD C++ - channelId = channelIds_sv; -#else - // NB: channelIds_sv is a vector in SIMD C++ - channelId = channelIds_sv[0]; // element[0] - for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] - { - assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId - } -#endif - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) -#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT - // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) - const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 - uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - for( int i = 0; i < neppV; ++i ) - { - assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector - } -#endif - } + unsigned int channelId = getChannelId( allChannelIds, ievt00 ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (jamp2[nParity][ncolor][neppV] for the SIMD vector - or the two SIMD vectors - of events processed in calculate_wavefunctions) @@ -3528,11 +3550,12 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( allChannelIds != nullptr ) // fix segfault #892 (not 'channelIds[0] != 0') { - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + const unsigned int channelId = getChannelId( allChannelIds, ievt0, false ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - MEs_sv *= numerators_sv / denominators_sv; + MEs_sv *= numerators_sv[channelId - 1] / denominators_sv; } #endif //for( int ieppV = 0; ieppV < neppV; ieppV++ ) diff --git a/epochX/cudacpp/gg_ttgg.sa/SubProcesses/P1_Sigma_sm_gg_ttxgg/CPPProcess.h b/epochX/cudacpp/gg_ttgg.sa/SubProcesses/P1_Sigma_sm_gg_ttxgg/CPPProcess.h index 2b75e0f842..05b2f0ceaa 100644 --- a/epochX/cudacpp/gg_ttgg.sa/SubProcesses/P1_Sigma_sm_gg_ttxgg/CPPProcess.h +++ b/epochX/cudacpp/gg_ttgg.sa/SubProcesses/P1_Sigma_sm_gg_ttxgg/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_ttgg.sa/SubProcesses/P1_Sigma_sm_gg_ttxgg/processConfig.h b/epochX/cudacpp/gg_ttgg.sa/SubProcesses/P1_Sigma_sm_gg_ttxgg/processConfig.h new file mode 100644 index 0000000000..4f4a3c3bc0 --- /dev/null +++ b/epochX/cudacpp/gg_ttgg.sa/SubProcesses/P1_Sigma_sm_gg_ttxgg/processConfig.h @@ -0,0 +1,16 @@ +// Copyright (C) 2025 CERN and UCLouvain. +// Licensed under the GNU Lesser General Public License (version 3 or later). +// Created by: S. Roiser (May 2025) for the MG5aMC CUDACPP plugin. +// Further modified by: ... for the MG5aMC CUDACPP plugin. + + +#ifndef MG5_CONFIG_SIGMA_SM_GG_TTXGG_H +#define MG5_CONFIG_SIGMA_SM_GG_TTXGG_H 1 + +namespace processConfig { + + constexpr int ndiagrams = 123; + +} + +#endif // MG5_CONFIG_SIGMA_SM_GG_TTXGG_H \ 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 53dd560ed6..921ace57e7 100644 --- a/epochX/cudacpp/gg_ttgg.sa/src/HelAmps_sm.h +++ b/epochX/cudacpp/gg_ttgg.sa/src/HelAmps_sm.h @@ -8,7 +8,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_ttgg.sa/src/Parameters_sm.cc b/epochX/cudacpp/gg_ttgg.sa/src/Parameters_sm.cc index 47a3a011b8..d17aac5b5c 100644 --- a/epochX/cudacpp/gg_ttgg.sa/src/Parameters_sm.cc +++ b/epochX/cudacpp/gg_ttgg.sa/src/Parameters_sm.cc @@ -7,7 +7,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_ttgg.sa/src/Parameters_sm.h b/epochX/cudacpp/gg_ttgg.sa/src/Parameters_sm.h index 76066c7bb1..63f7d185bd 100644 --- a/epochX/cudacpp/gg_ttgg.sa/src/Parameters_sm.h +++ b/epochX/cudacpp/gg_ttgg.sa/src/Parameters_sm.h @@ -7,7 +7,7 @@ // Further modified by: A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== 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 1afa1ab2a5..be83997f88 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 @@ -1,8 +1,11 @@ +WARNING:root:python3.12 support is still experimental. For the moment re-weighting is NOT working and do expect a LOT of syntax warning. We do not advise python3.12 for production for the moment. +Running MG5 in debug mode +Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT +Plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT has marked as NOT being validated with this version: 3.6.2. +It has been validated for the last time with version: 3.6.0 Note that this is a development version. This version is intended for development/beta testing and NOT for production. This version has not been fully tested (if at all) and might have limited user support (if at all) -Running MG5 in debug mode -Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT ************************************************************ * * * W E L C O M E to * @@ -15,7 +18,7 @@ Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT * * * * * * * * * * * * -* VERSION 3.6.0 2024-09-30 * +* VERSION 3.6.2 2025-03-19 * * * * WARNING: UNKNOWN DEVELOPMENT VERSION. * * WARNING: DO NOT USE FOR PRODUCTION * @@ -46,10 +49,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 Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt -import /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg.mg +import /shared/roiser/sw/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 @@ -58,7 +60,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.005990028381347656  +DEBUG: model prefixing takes 0.0019114017486572266  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  @@ -151,27 +153,27 @@ 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.890 s +1 processes with 1240 diagrams generated in 0.749 s Total: 1 processes with 1240 diagrams output madevent_simd ../TMPOUT/CODEGEN_mad_gg_ttggg --hel_recycling=False --vector_size=32 Output will be done with PLUGIN: CUDACPP_OUTPUT Addition matrix-element will be done with PLUGIN: CUDACPP_OUTPUT -DEBUG: opt['output_options']['vector_size'] =  32 [export_v4.py at line 4334]  +DEBUG: opt['output_options']['vector_size'] =  32 [export_v4.py at line 4166]  Output will be done with PLUGIN: CUDACPP_OUTPUT DEBUG: Entering PLUGIN_ProcessExporter.__init__ (initialise the exporter) [output.py at line 171]  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 176]  -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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg  +INFO: Creating subdirectories in directory /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg +WARNING: File exists /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/Cards  +WARNING: File exists /shared/roiser/sw/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 8s. Introduce 3030 contraction +INFO: Color-Flow passed to 1630 term in 3s. Introduce 3030 contraction DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1156]  INFO: Creating files in directory . FileWriter for ././CPPProcess.h @@ -179,25 +181,25 @@ FileWriter t t~ g g g WEIGHTED<=5 @1 INFO: Finding symmetric diagrams for subprocess group gg_ttxggg -DEBUG: len(subproc_diagrams_for_config) =  945 [model_handling.py at line 1527]  -DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 4, 4: 5, 5: 7, 6: 8, 7: 14, 8: 15, 9: 16, 10: 18, 11: 19, 12: 20, 13: 22, 14: 23, 15: 24, 16: 26, 17: 27, 18: 28, 19: 29, 20: 30, 21: 31, 22: 33, 23: 34, 24: 35, 25: 36, 26: 37, 27: 38, 28: 39, 29: 40, 30: 41, 31: 42, 32: 43, 33: 44, 34: 45, 35: 46, 36: 47, 37: 49, 38: 50, 39: 51, 40: 52, 41: 53, 42: 54, 43: 55, 44: 56, 45: 57, 46: 58, 47: 59, 48: 60, 49: 61, 50: 62, 51: 63, 52: 65, 53: 66, 54: 67, 55: 68, 56: 69, 57: 70, 58: 71, 59: 72, 60: 73, 61: 74, 62: 75, 63: 76, 64: 77, 65: 78, 66: 79, 67: 81, 68: 82, 69: 83, 70: 84, 71: 85, 72: 86, 73: 87, 74: 88, 75: 89, 76: 91, 77: 92, 78: 93, 79: 94, 80: 95, 81: 96, 82: 97, 83: 98, 84: 99, 85: 101, 86: 102, 87: 103, 88: 104, 89: 105, 90: 106, 91: 107, 92: 108, 93: 109, 94: 110, 95: 111, 96: 112, 97: 113, 98: 114, 99: 115, 100: 116, 101: 117, 102: 118, 103: 119, 104: 120, 105: 121, 106: 124, 107: 125, 108: 126, 109: 127, 110: 128, 111: 129, 112: 130, 113: 131, 114: 132, 115: 133, 116: 134, 117: 135, 118: 136, 119: 137, 120: 138, 121: 140, 122: 141, 123: 143, 124: 144, 125: 145, 126: 146, 127: 147, 128: 148, 129: 149, 130: 150, 131: 151, 132: 152, 133: 153, 134: 154, 135: 155, 136: 156, 137: 157, 138: 159, 139: 160, 140: 161, 141: 162, 142: 163, 143: 164, 144: 165, 145: 166, 146: 167, 147: 168, 148: 169, 149: 170, 150: 171, 151: 172, 152: 173, 153: 175, 154: 176, 155: 177, 156: 178, 157: 179, 158: 180, 159: 181, 160: 182, 161: 183, 162: 184, 163: 185, 164: 186, 165: 187, 166: 188, 167: 189, 168: 190, 169: 191, 170: 192, 171: 193, 172: 194, 173: 195, 174: 196, 175: 197, 176: 198, 177: 199, 178: 200, 179: 201, 180: 202, 181: 203, 182: 204, 183: 205, 184: 206, 185: 207, 186: 208, 187: 209, 188: 210, 189: 211, 190: 212, 191: 213, 192: 214, 193: 215, 194: 216, 195: 217, 196: 218, 197: 220, 198: 221, 199: 222, 200: 223, 201: 224, 202: 225, 203: 227, 204: 228, 205: 229, 206: 230, 207: 231, 208: 232, 209: 234, 210: 235, 211: 247, 212: 248, 213: 249, 214: 250, 215: 251, 216: 252, 217: 253, 218: 254, 219: 255, 220: 256, 221: 257, 222: 258, 223: 259, 224: 260, 225: 261, 226: 263, 227: 264, 228: 266, 229: 267, 230: 268, 231: 269, 232: 270, 233: 271, 234: 272, 235: 273, 236: 274, 237: 275, 238: 276, 239: 277, 240: 278, 241: 279, 242: 280, 243: 282, 244: 283, 245: 284, 246: 285, 247: 286, 248: 287, 249: 288, 250: 289, 251: 290, 252: 291, 253: 292, 254: 293, 255: 294, 256: 295, 257: 296, 258: 298, 259: 299, 260: 300, 261: 301, 262: 302, 263: 303, 264: 304, 265: 305, 266: 306, 267: 307, 268: 308, 269: 309, 270: 310, 271: 311, 272: 312, 273: 313, 274: 314, 275: 315, 276: 316, 277: 317, 278: 318, 279: 319, 280: 320, 281: 321, 282: 322, 283: 323, 284: 324, 285: 325, 286: 326, 287: 327, 288: 328, 289: 329, 290: 330, 291: 331, 292: 332, 293: 333, 294: 334, 295: 335, 296: 336, 297: 337, 298: 338, 299: 339, 300: 340, 301: 341, 302: 343, 303: 344, 304: 345, 305: 346, 306: 347, 307: 348, 308: 350, 309: 351, 310: 352, 311: 353, 312: 354, 313: 355, 314: 357, 315: 358, 316: 370, 317: 371, 318: 372, 319: 373, 320: 374, 321: 375, 322: 377, 323: 378, 324: 379, 325: 380, 326: 381, 327: 382, 328: 383, 329: 384, 330: 385, 331: 386, 332: 387, 333: 388, 334: 389, 335: 390, 336: 391, 337: 393, 338: 394, 339: 395, 340: 396, 341: 397, 342: 398, 343: 399, 344: 400, 345: 401, 346: 402, 347: 403, 348: 404, 349: 405, 350: 406, 351: 407, 352: 409, 353: 410, 354: 411, 355: 412, 356: 413, 357: 414, 358: 415, 359: 416, 360: 417, 361: 418, 362: 419, 363: 420, 364: 421, 365: 422, 366: 423, 367: 425, 368: 426, 369: 427, 370: 428, 371: 429, 372: 430, 373: 431, 374: 432, 375: 433, 376: 434, 377: 435, 378: 437, 379: 438, 380: 440, 381: 441, 382: 447, 383: 448, 384: 449, 385: 450, 386: 451, 387: 452, 388: 453, 389: 454, 390: 455, 391: 457, 392: 458, 393: 459, 394: 460, 395: 461, 396: 462, 397: 463, 398: 464, 399: 465, 400: 467, 401: 468, 402: 469, 403: 470, 404: 471, 405: 472, 406: 473, 407: 474, 408: 475, 409: 477, 410: 478, 411: 479, 412: 480, 413: 481, 414: 482, 415: 484, 416: 485, 417: 486, 418: 487, 419: 488, 420: 489, 421: 493, 422: 494, 423: 495, 424: 496, 425: 497, 426: 498, 427: 500, 428: 501, 429: 502, 430: 503, 431: 504, 432: 505, 433: 506, 434: 507, 435: 508, 436: 509, 437: 510, 438: 511, 439: 512, 440: 513, 441: 514, 442: 516, 443: 517, 444: 518, 445: 519, 446: 520, 447: 521, 448: 522, 449: 523, 450: 524, 451: 525, 452: 526, 453: 527, 454: 528, 455: 529, 456: 530, 457: 532, 458: 533, 459: 534, 460: 535, 461: 536, 462: 537, 463: 538, 464: 539, 465: 540, 466: 541, 467: 542, 468: 543, 469: 544, 470: 545, 471: 546, 472: 548, 473: 549, 474: 550, 475: 551, 476: 552, 477: 553, 478: 554, 479: 555, 480: 556, 481: 557, 482: 558, 483: 560, 484: 561, 485: 563, 486: 564, 487: 570, 488: 571, 489: 572, 490: 573, 491: 574, 492: 575, 493: 576, 494: 577, 495: 578, 496: 580, 497: 581, 498: 582, 499: 583, 500: 584, 501: 585, 502: 586, 503: 587, 504: 588, 505: 590, 506: 591, 507: 592, 508: 593, 509: 594, 510: 595, 511: 596, 512: 597, 513: 598, 514: 600, 515: 601, 516: 602, 517: 603, 518: 604, 519: 605, 520: 607, 521: 608, 522: 609, 523: 610, 524: 611, 525: 612, 526: 616, 527: 617, 528: 618, 529: 619, 530: 620, 531: 621, 532: 623, 533: 624, 534: 625, 535: 626, 536: 627, 537: 628, 538: 629, 539: 630, 540: 631, 541: 632, 542: 633, 543: 634, 544: 635, 545: 636, 546: 637, 547: 639, 548: 640, 549: 641, 550: 642, 551: 643, 552: 644, 553: 645, 554: 646, 555: 647, 556: 648, 557: 649, 558: 650, 559: 651, 560: 652, 561: 653, 562: 655, 563: 656, 564: 657, 565: 658, 566: 659, 567: 660, 568: 661, 569: 662, 570: 663, 571: 664, 572: 665, 573: 666, 574: 667, 575: 668, 576: 669, 577: 671, 578: 672, 579: 673, 580: 674, 581: 675, 582: 676, 583: 677, 584: 678, 585: 679, 586: 680, 587: 681, 588: 683, 589: 684, 590: 686, 591: 687, 592: 693, 593: 694, 594: 695, 595: 696, 596: 697, 597: 698, 598: 699, 599: 700, 600: 701, 601: 703, 602: 704, 603: 705, 604: 706, 605: 707, 606: 708, 607: 709, 608: 710, 609: 711, 610: 713, 611: 714, 612: 715, 613: 716, 614: 717, 615: 718, 616: 719, 617: 720, 618: 721, 619: 723, 620: 724, 621: 725, 622: 726, 623: 727, 624: 728, 625: 730, 626: 731, 627: 732, 628: 733, 629: 734, 630: 735, 631: 739, 632: 740, 633: 741, 634: 742, 635: 743, 636: 744, 637: 745, 638: 746, 639: 747, 640: 748, 641: 749, 642: 750, 643: 751, 644: 752, 645: 753, 646: 754, 647: 755, 648: 756, 649: 757, 650: 758, 651: 759, 652: 760, 653: 761, 654: 762, 655: 763, 656: 764, 657: 765, 658: 766, 659: 767, 660: 768, 661: 769, 662: 770, 663: 771, 664: 773, 665: 774, 666: 775, 667: 776, 668: 777, 669: 778, 670: 780, 671: 781, 672: 782, 673: 783, 674: 784, 675: 785, 676: 789, 677: 790, 678: 791, 679: 792, 680: 793, 681: 794, 682: 795, 683: 796, 684: 797, 685: 798, 686: 799, 687: 800, 688: 801, 689: 802, 690: 803, 691: 804, 692: 805, 693: 806, 694: 807, 695: 808, 696: 809, 697: 810, 698: 811, 699: 812, 700: 813, 701: 814, 702: 815, 703: 816, 704: 817, 705: 818, 706: 819, 707: 820, 708: 821, 709: 823, 710: 824, 711: 825, 712: 826, 713: 827, 714: 828, 715: 830, 716: 831, 717: 832, 718: 833, 719: 834, 720: 835, 721: 839, 722: 840, 723: 842, 724: 843, 725: 845, 726: 846, 727: 852, 728: 853, 729: 854, 730: 855, 731: 856, 732: 857, 733: 858, 734: 859, 735: 860, 736: 862, 737: 863, 738: 864, 739: 865, 740: 866, 741: 867, 742: 868, 743: 869, 744: 870, 745: 872, 746: 873, 747: 874, 748: 875, 749: 876, 750: 877, 751: 878, 752: 879, 753: 880, 754: 882, 755: 883, 756: 884, 757: 885, 758: 886, 759: 887, 760: 889, 761: 890, 762: 891, 763: 892, 764: 893, 765: 894, 766: 895, 767: 896, 768: 898, 769: 899, 770: 901, 771: 902, 772: 908, 773: 909, 774: 910, 775: 911, 776: 912, 777: 913, 778: 914, 779: 915, 780: 916, 781: 918, 782: 919, 783: 920, 784: 921, 785: 922, 786: 923, 787: 924, 788: 925, 789: 926, 790: 928, 791: 929, 792: 930, 793: 931, 794: 932, 795: 933, 796: 934, 797: 935, 798: 936, 799: 938, 800: 939, 801: 940, 802: 941, 803: 942, 804: 943, 805: 945, 806: 946, 807: 947, 808: 948, 809: 949, 810: 950, 811: 951, 812: 952, 813: 954, 814: 955, 815: 957, 816: 958, 817: 964, 818: 965, 819: 966, 820: 967, 821: 968, 822: 969, 823: 970, 824: 971, 825: 972, 826: 974, 827: 975, 828: 976, 829: 977, 830: 978, 831: 979, 832: 980, 833: 981, 834: 982, 835: 984, 836: 985, 837: 986, 838: 987, 839: 988, 840: 989, 841: 990, 842: 991, 843: 992, 844: 994, 845: 995, 846: 996, 847: 997, 848: 998, 849: 999, 850: 1001, 851: 1002, 852: 1003, 853: 1004, 854: 1005, 855: 1006, 856: 1007, 857: 1008, 858: 1010, 859: 1011, 860: 1013, 861: 1014, 862: 1019, 863: 1020, 864: 1022, 865: 1023, 866: 1025, 867: 1026, 868: 1031, 869: 1032, 870: 1034, 871: 1035, 872: 1037, 873: 1038, 874: 1046, 875: 1047, 876: 1048, 877: 1049, 878: 1050, 879: 1051, 880: 1052, 881: 1053, 882: 1054, 883: 1055, 884: 1056, 885: 1057, 886: 1058, 887: 1059, 888: 1060, 889: 1061, 890: 1062, 891: 1063, 892: 1065, 893: 1066, 894: 1067, 895: 1068, 896: 1069, 897: 1070, 898: 1071, 899: 1072, 900: 1073, 901: 1074, 902: 1075, 903: 1076, 904: 1077, 905: 1078, 906: 1079, 907: 1080, 908: 1081, 909: 1082, 910: 1084, 911: 1085, 912: 1086, 913: 1087, 914: 1088, 915: 1089, 916: 1090, 917: 1091, 918: 1092, 919: 1093, 920: 1094, 921: 1095, 922: 1096, 923: 1097, 924: 1098, 925: 1099, 926: 1100, 927: 1101, 928: 1103, 929: 1104, 930: 1105, 931: 1106, 932: 1107, 933: 1108, 934: 1110, 935: 1111, 936: 1112, 937: 1113, 938: 1114, 939: 1115, 940: 1117, 941: 1118, 942: 1119, 943: 1120, 944: 1121, 945: 1122} [model_handling.py at line 1551]  -DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 4: 3, 5: 4, 7: 5, 8: 6, 14: 7, 15: 8, 16: 9, 18: 10, 19: 11, 20: 12, 22: 13, 23: 14, 24: 15, 26: 16, 27: 17, 28: 18, 29: 19, 30: 20, 31: 21, 33: 22, 34: 23, 35: 24, 36: 25, 37: 26, 38: 27, 39: 28, 40: 29, 41: 30, 42: 31, 43: 32, 44: 33, 45: 34, 46: 35, 47: 36, 49: 37, 50: 38, 51: 39, 52: 40, 53: 41, 54: 42, 55: 43, 56: 44, 57: 45, 58: 46, 59: 47, 60: 48, 61: 49, 62: 50, 63: 51, 65: 52, 66: 53, 67: 54, 68: 55, 69: 56, 70: 57, 71: 58, 72: 59, 73: 60, 74: 61, 75: 62, 76: 63, 77: 64, 78: 65, 79: 66, 81: 67, 82: 68, 83: 69, 84: 70, 85: 71, 86: 72, 87: 73, 88: 74, 89: 75, 91: 76, 92: 77, 93: 78, 94: 79, 95: 80, 96: 81, 97: 82, 98: 83, 99: 84, 101: 85, 102: 86, 103: 87, 104: 88, 105: 89, 106: 90, 107: 91, 108: 92, 109: 93, 110: 94, 111: 95, 112: 96, 113: 97, 114: 98, 115: 99, 116: 100, 117: 101, 118: 102, 119: 103, 120: 104, 121: 105, 124: 106, 125: 107, 126: 108, 127: 109, 128: 110, 129: 111, 130: 112, 131: 113, 132: 114, 133: 115, 134: 116, 135: 117, 136: 118, 137: 119, 138: 120, 140: 121, 141: 122, 143: 123, 144: 124, 145: 125, 146: 126, 147: 127, 148: 128, 149: 129, 150: 130, 151: 131, 152: 132, 153: 133, 154: 134, 155: 135, 156: 136, 157: 137, 159: 138, 160: 139, 161: 140, 162: 141, 163: 142, 164: 143, 165: 144, 166: 145, 167: 146, 168: 147, 169: 148, 170: 149, 171: 150, 172: 151, 173: 152, 175: 153, 176: 154, 177: 155, 178: 156, 179: 157, 180: 158, 181: 159, 182: 160, 183: 161, 184: 162, 185: 163, 186: 164, 187: 165, 188: 166, 189: 167, 190: 168, 191: 169, 192: 170, 193: 171, 194: 172, 195: 173, 196: 174, 197: 175, 198: 176, 199: 177, 200: 178, 201: 179, 202: 180, 203: 181, 204: 182, 205: 183, 206: 184, 207: 185, 208: 186, 209: 187, 210: 188, 211: 189, 212: 190, 213: 191, 214: 192, 215: 193, 216: 194, 217: 195, 218: 196, 220: 197, 221: 198, 222: 199, 223: 200, 224: 201, 225: 202, 227: 203, 228: 204, 229: 205, 230: 206, 231: 207, 232: 208, 234: 209, 235: 210, 247: 211, 248: 212, 249: 213, 250: 214, 251: 215, 252: 216, 253: 217, 254: 218, 255: 219, 256: 220, 257: 221, 258: 222, 259: 223, 260: 224, 261: 225, 263: 226, 264: 227, 266: 228, 267: 229, 268: 230, 269: 231, 270: 232, 271: 233, 272: 234, 273: 235, 274: 236, 275: 237, 276: 238, 277: 239, 278: 240, 279: 241, 280: 242, 282: 243, 283: 244, 284: 245, 285: 246, 286: 247, 287: 248, 288: 249, 289: 250, 290: 251, 291: 252, 292: 253, 293: 254, 294: 255, 295: 256, 296: 257, 298: 258, 299: 259, 300: 260, 301: 261, 302: 262, 303: 263, 304: 264, 305: 265, 306: 266, 307: 267, 308: 268, 309: 269, 310: 270, 311: 271, 312: 272, 313: 273, 314: 274, 315: 275, 316: 276, 317: 277, 318: 278, 319: 279, 320: 280, 321: 281, 322: 282, 323: 283, 324: 284, 325: 285, 326: 286, 327: 287, 328: 288, 329: 289, 330: 290, 331: 291, 332: 292, 333: 293, 334: 294, 335: 295, 336: 296, 337: 297, 338: 298, 339: 299, 340: 300, 341: 301, 343: 302, 344: 303, 345: 304, 346: 305, 347: 306, 348: 307, 350: 308, 351: 309, 352: 310, 353: 311, 354: 312, 355: 313, 357: 314, 358: 315, 370: 316, 371: 317, 372: 318, 373: 319, 374: 320, 375: 321, 377: 322, 378: 323, 379: 324, 380: 325, 381: 326, 382: 327, 383: 328, 384: 329, 385: 330, 386: 331, 387: 332, 388: 333, 389: 334, 390: 335, 391: 336, 393: 337, 394: 338, 395: 339, 396: 340, 397: 341, 398: 342, 399: 343, 400: 344, 401: 345, 402: 346, 403: 347, 404: 348, 405: 349, 406: 350, 407: 351, 409: 352, 410: 353, 411: 354, 412: 355, 413: 356, 414: 357, 415: 358, 416: 359, 417: 360, 418: 361, 419: 362, 420: 363, 421: 364, 422: 365, 423: 366, 425: 367, 426: 368, 427: 369, 428: 370, 429: 371, 430: 372, 431: 373, 432: 374, 433: 375, 434: 376, 435: 377, 437: 378, 438: 379, 440: 380, 441: 381, 447: 382, 448: 383, 449: 384, 450: 385, 451: 386, 452: 387, 453: 388, 454: 389, 455: 390, 457: 391, 458: 392, 459: 393, 460: 394, 461: 395, 462: 396, 463: 397, 464: 398, 465: 399, 467: 400, 468: 401, 469: 402, 470: 403, 471: 404, 472: 405, 473: 406, 474: 407, 475: 408, 477: 409, 478: 410, 479: 411, 480: 412, 481: 413, 482: 414, 484: 415, 485: 416, 486: 417, 487: 418, 488: 419, 489: 420, 493: 421, 494: 422, 495: 423, 496: 424, 497: 425, 498: 426, 500: 427, 501: 428, 502: 429, 503: 430, 504: 431, 505: 432, 506: 433, 507: 434, 508: 435, 509: 436, 510: 437, 511: 438, 512: 439, 513: 440, 514: 441, 516: 442, 517: 443, 518: 444, 519: 445, 520: 446, 521: 447, 522: 448, 523: 449, 524: 450, 525: 451, 526: 452, 527: 453, 528: 454, 529: 455, 530: 456, 532: 457, 533: 458, 534: 459, 535: 460, 536: 461, 537: 462, 538: 463, 539: 464, 540: 465, 541: 466, 542: 467, 543: 468, 544: 469, 545: 470, 546: 471, 548: 472, 549: 473, 550: 474, 551: 475, 552: 476, 553: 477, 554: 478, 555: 479, 556: 480, 557: 481, 558: 482, 560: 483, 561: 484, 563: 485, 564: 486, 570: 487, 571: 488, 572: 489, 573: 490, 574: 491, 575: 492, 576: 493, 577: 494, 578: 495, 580: 496, 581: 497, 582: 498, 583: 499, 584: 500, 585: 501, 586: 502, 587: 503, 588: 504, 590: 505, 591: 506, 592: 507, 593: 508, 594: 509, 595: 510, 596: 511, 597: 512, 598: 513, 600: 514, 601: 515, 602: 516, 603: 517, 604: 518, 605: 519, 607: 520, 608: 521, 609: 522, 610: 523, 611: 524, 612: 525, 616: 526, 617: 527, 618: 528, 619: 529, 620: 530, 621: 531, 623: 532, 624: 533, 625: 534, 626: 535, 627: 536, 628: 537, 629: 538, 630: 539, 631: 540, 632: 541, 633: 542, 634: 543, 635: 544, 636: 545, 637: 546, 639: 547, 640: 548, 641: 549, 642: 550, 643: 551, 644: 552, 645: 553, 646: 554, 647: 555, 648: 556, 649: 557, 650: 558, 651: 559, 652: 560, 653: 561, 655: 562, 656: 563, 657: 564, 658: 565, 659: 566, 660: 567, 661: 568, 662: 569, 663: 570, 664: 571, 665: 572, 666: 573, 667: 574, 668: 575, 669: 576, 671: 577, 672: 578, 673: 579, 674: 580, 675: 581, 676: 582, 677: 583, 678: 584, 679: 585, 680: 586, 681: 587, 683: 588, 684: 589, 686: 590, 687: 591, 693: 592, 694: 593, 695: 594, 696: 595, 697: 596, 698: 597, 699: 598, 700: 599, 701: 600, 703: 601, 704: 602, 705: 603, 706: 604, 707: 605, 708: 606, 709: 607, 710: 608, 711: 609, 713: 610, 714: 611, 715: 612, 716: 613, 717: 614, 718: 615, 719: 616, 720: 617, 721: 618, 723: 619, 724: 620, 725: 621, 726: 622, 727: 623, 728: 624, 730: 625, 731: 626, 732: 627, 733: 628, 734: 629, 735: 630, 739: 631, 740: 632, 741: 633, 742: 634, 743: 635, 744: 636, 745: 637, 746: 638, 747: 639, 748: 640, 749: 641, 750: 642, 751: 643, 752: 644, 753: 645, 754: 646, 755: 647, 756: 648, 757: 649, 758: 650, 759: 651, 760: 652, 761: 653, 762: 654, 763: 655, 764: 656, 765: 657, 766: 658, 767: 659, 768: 660, 769: 661, 770: 662, 771: 663, 773: 664, 774: 665, 775: 666, 776: 667, 777: 668, 778: 669, 780: 670, 781: 671, 782: 672, 783: 673, 784: 674, 785: 675, 789: 676, 790: 677, 791: 678, 792: 679, 793: 680, 794: 681, 795: 682, 796: 683, 797: 684, 798: 685, 799: 686, 800: 687, 801: 688, 802: 689, 803: 690, 804: 691, 805: 692, 806: 693, 807: 694, 808: 695, 809: 696, 810: 697, 811: 698, 812: 699, 813: 700, 814: 701, 815: 702, 816: 703, 817: 704, 818: 705, 819: 706, 820: 707, 821: 708, 823: 709, 824: 710, 825: 711, 826: 712, 827: 713, 828: 714, 830: 715, 831: 716, 832: 717, 833: 718, 834: 719, 835: 720, 839: 721, 840: 722, 842: 723, 843: 724, 845: 725, 846: 726, 852: 727, 853: 728, 854: 729, 855: 730, 856: 731, 857: 732, 858: 733, 859: 734, 860: 735, 862: 736, 863: 737, 864: 738, 865: 739, 866: 740, 867: 741, 868: 742, 869: 743, 870: 744, 872: 745, 873: 746, 874: 747, 875: 748, 876: 749, 877: 750, 878: 751, 879: 752, 880: 753, 882: 754, 883: 755, 884: 756, 885: 757, 886: 758, 887: 759, 889: 760, 890: 761, 891: 762, 892: 763, 893: 764, 894: 765, 895: 766, 896: 767, 898: 768, 899: 769, 901: 770, 902: 771, 908: 772, 909: 773, 910: 774, 911: 775, 912: 776, 913: 777, 914: 778, 915: 779, 916: 780, 918: 781, 919: 782, 920: 783, 921: 784, 922: 785, 923: 786, 924: 787, 925: 788, 926: 789, 928: 790, 929: 791, 930: 792, 931: 793, 932: 794, 933: 795, 934: 796, 935: 797, 936: 798, 938: 799, 939: 800, 940: 801, 941: 802, 942: 803, 943: 804, 945: 805, 946: 806, 947: 807, 948: 808, 949: 809, 950: 810, 951: 811, 952: 812, 954: 813, 955: 814, 957: 815, 958: 816, 964: 817, 965: 818, 966: 819, 967: 820, 968: 821, 969: 822, 970: 823, 971: 824, 972: 825, 974: 826, 975: 827, 976: 828, 977: 829, 978: 830, 979: 831, 980: 832, 981: 833, 982: 834, 984: 835, 985: 836, 986: 837, 987: 838, 988: 839, 989: 840, 990: 841, 991: 842, 992: 843, 994: 844, 995: 845, 996: 846, 997: 847, 998: 848, 999: 849, 1001: 850, 1002: 851, 1003: 852, 1004: 853, 1005: 854, 1006: 855, 1007: 856, 1008: 857, 1010: 858, 1011: 859, 1013: 860, 1014: 861, 1019: 862, 1020: 863, 1022: 864, 1023: 865, 1025: 866, 1026: 867, 1031: 868, 1032: 869, 1034: 870, 1035: 871, 1037: 872, 1038: 873, 1046: 874, 1047: 875, 1048: 876, 1049: 877, 1050: 878, 1051: 879, 1052: 880, 1053: 881, 1054: 882, 1055: 883, 1056: 884, 1057: 885, 1058: 886, 1059: 887, 1060: 888, 1061: 889, 1062: 890, 1063: 891, 1065: 892, 1066: 893, 1067: 894, 1068: 895, 1069: 896, 1070: 897, 1071: 898, 1072: 899, 1073: 900, 1074: 901, 1075: 902, 1076: 903, 1077: 904, 1078: 905, 1079: 906, 1080: 907, 1081: 908, 1082: 909, 1084: 910, 1085: 911, 1086: 912, 1087: 913, 1088: 914, 1089: 915, 1090: 916, 1091: 917, 1092: 918, 1093: 919, 1094: 920, 1095: 921, 1096: 922, 1097: 923, 1098: 924, 1099: 925, 1100: 926, 1101: 927, 1103: 928, 1104: 929, 1105: 930, 1106: 931, 1107: 932, 1108: 933, 1110: 934, 1111: 935, 1112: 936, 1113: 937, 1114: 938, 1115: 939, 1117: 940, 1118: 941, 1119: 942, 1120: 943, 1121: 944, 1122: 945} [model_handling.py at line 1552]  -Generated helas calls for 1 subprocesses (1240 diagrams) in 6.565 s -Wrote files for 2281 helas calls in 18.614 s +DEBUG: len(subproc_diagrams_for_config) =  945 [model_handling.py at line 1538]  +DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 4, 4: 5, 5: 7, 6: 8, 7: 14, 8: 15, 9: 16, 10: 18, 11: 19, 12: 20, 13: 22, 14: 23, 15: 24, 16: 26, 17: 27, 18: 28, 19: 29, 20: 30, 21: 31, 22: 33, 23: 34, 24: 35, 25: 36, 26: 37, 27: 38, 28: 39, 29: 40, 30: 41, 31: 42, 32: 43, 33: 44, 34: 45, 35: 46, 36: 47, 37: 49, 38: 50, 39: 51, 40: 52, 41: 53, 42: 54, 43: 55, 44: 56, 45: 57, 46: 58, 47: 59, 48: 60, 49: 61, 50: 62, 51: 63, 52: 65, 53: 66, 54: 67, 55: 68, 56: 69, 57: 70, 58: 71, 59: 72, 60: 73, 61: 74, 62: 75, 63: 76, 64: 77, 65: 78, 66: 79, 67: 81, 68: 82, 69: 83, 70: 84, 71: 85, 72: 86, 73: 87, 74: 88, 75: 89, 76: 91, 77: 92, 78: 93, 79: 94, 80: 95, 81: 96, 82: 97, 83: 98, 84: 99, 85: 101, 86: 102, 87: 103, 88: 104, 89: 105, 90: 106, 91: 107, 92: 108, 93: 109, 94: 110, 95: 111, 96: 112, 97: 113, 98: 114, 99: 115, 100: 116, 101: 117, 102: 118, 103: 119, 104: 120, 105: 121, 106: 124, 107: 125, 108: 126, 109: 127, 110: 128, 111: 129, 112: 130, 113: 131, 114: 132, 115: 133, 116: 134, 117: 135, 118: 136, 119: 137, 120: 138, 121: 140, 122: 141, 123: 143, 124: 144, 125: 145, 126: 146, 127: 147, 128: 148, 129: 149, 130: 150, 131: 151, 132: 152, 133: 153, 134: 154, 135: 155, 136: 156, 137: 157, 138: 159, 139: 160, 140: 161, 141: 162, 142: 163, 143: 164, 144: 165, 145: 166, 146: 167, 147: 168, 148: 169, 149: 170, 150: 171, 151: 172, 152: 173, 153: 175, 154: 176, 155: 177, 156: 178, 157: 179, 158: 180, 159: 181, 160: 182, 161: 183, 162: 184, 163: 185, 164: 186, 165: 187, 166: 188, 167: 189, 168: 190, 169: 191, 170: 192, 171: 193, 172: 194, 173: 195, 174: 196, 175: 197, 176: 198, 177: 199, 178: 200, 179: 201, 180: 202, 181: 203, 182: 204, 183: 205, 184: 206, 185: 207, 186: 208, 187: 209, 188: 210, 189: 211, 190: 212, 191: 213, 192: 214, 193: 215, 194: 216, 195: 217, 196: 218, 197: 220, 198: 221, 199: 222, 200: 223, 201: 224, 202: 225, 203: 227, 204: 228, 205: 229, 206: 230, 207: 231, 208: 232, 209: 234, 210: 235, 211: 247, 212: 248, 213: 249, 214: 250, 215: 251, 216: 252, 217: 253, 218: 254, 219: 255, 220: 256, 221: 257, 222: 258, 223: 259, 224: 260, 225: 261, 226: 263, 227: 264, 228: 266, 229: 267, 230: 268, 231: 269, 232: 270, 233: 271, 234: 272, 235: 273, 236: 274, 237: 275, 238: 276, 239: 277, 240: 278, 241: 279, 242: 280, 243: 282, 244: 283, 245: 284, 246: 285, 247: 286, 248: 287, 249: 288, 250: 289, 251: 290, 252: 291, 253: 292, 254: 293, 255: 294, 256: 295, 257: 296, 258: 298, 259: 299, 260: 300, 261: 301, 262: 302, 263: 303, 264: 304, 265: 305, 266: 306, 267: 307, 268: 308, 269: 309, 270: 310, 271: 311, 272: 312, 273: 313, 274: 314, 275: 315, 276: 316, 277: 317, 278: 318, 279: 319, 280: 320, 281: 321, 282: 322, 283: 323, 284: 324, 285: 325, 286: 326, 287: 327, 288: 328, 289: 329, 290: 330, 291: 331, 292: 332, 293: 333, 294: 334, 295: 335, 296: 336, 297: 337, 298: 338, 299: 339, 300: 340, 301: 341, 302: 343, 303: 344, 304: 345, 305: 346, 306: 347, 307: 348, 308: 350, 309: 351, 310: 352, 311: 353, 312: 354, 313: 355, 314: 357, 315: 358, 316: 370, 317: 371, 318: 372, 319: 373, 320: 374, 321: 375, 322: 377, 323: 378, 324: 379, 325: 380, 326: 381, 327: 382, 328: 383, 329: 384, 330: 385, 331: 386, 332: 387, 333: 388, 334: 389, 335: 390, 336: 391, 337: 393, 338: 394, 339: 395, 340: 396, 341: 397, 342: 398, 343: 399, 344: 400, 345: 401, 346: 402, 347: 403, 348: 404, 349: 405, 350: 406, 351: 407, 352: 409, 353: 410, 354: 411, 355: 412, 356: 413, 357: 414, 358: 415, 359: 416, 360: 417, 361: 418, 362: 419, 363: 420, 364: 421, 365: 422, 366: 423, 367: 425, 368: 426, 369: 427, 370: 428, 371: 429, 372: 430, 373: 431, 374: 432, 375: 433, 376: 434, 377: 435, 378: 437, 379: 438, 380: 440, 381: 441, 382: 447, 383: 448, 384: 449, 385: 450, 386: 451, 387: 452, 388: 453, 389: 454, 390: 455, 391: 457, 392: 458, 393: 459, 394: 460, 395: 461, 396: 462, 397: 463, 398: 464, 399: 465, 400: 467, 401: 468, 402: 469, 403: 470, 404: 471, 405: 472, 406: 473, 407: 474, 408: 475, 409: 477, 410: 478, 411: 479, 412: 480, 413: 481, 414: 482, 415: 484, 416: 485, 417: 486, 418: 487, 419: 488, 420: 489, 421: 493, 422: 494, 423: 495, 424: 496, 425: 497, 426: 498, 427: 500, 428: 501, 429: 502, 430: 503, 431: 504, 432: 505, 433: 506, 434: 507, 435: 508, 436: 509, 437: 510, 438: 511, 439: 512, 440: 513, 441: 514, 442: 516, 443: 517, 444: 518, 445: 519, 446: 520, 447: 521, 448: 522, 449: 523, 450: 524, 451: 525, 452: 526, 453: 527, 454: 528, 455: 529, 456: 530, 457: 532, 458: 533, 459: 534, 460: 535, 461: 536, 462: 537, 463: 538, 464: 539, 465: 540, 466: 541, 467: 542, 468: 543, 469: 544, 470: 545, 471: 546, 472: 548, 473: 549, 474: 550, 475: 551, 476: 552, 477: 553, 478: 554, 479: 555, 480: 556, 481: 557, 482: 558, 483: 560, 484: 561, 485: 563, 486: 564, 487: 570, 488: 571, 489: 572, 490: 573, 491: 574, 492: 575, 493: 576, 494: 577, 495: 578, 496: 580, 497: 581, 498: 582, 499: 583, 500: 584, 501: 585, 502: 586, 503: 587, 504: 588, 505: 590, 506: 591, 507: 592, 508: 593, 509: 594, 510: 595, 511: 596, 512: 597, 513: 598, 514: 600, 515: 601, 516: 602, 517: 603, 518: 604, 519: 605, 520: 607, 521: 608, 522: 609, 523: 610, 524: 611, 525: 612, 526: 616, 527: 617, 528: 618, 529: 619, 530: 620, 531: 621, 532: 623, 533: 624, 534: 625, 535: 626, 536: 627, 537: 628, 538: 629, 539: 630, 540: 631, 541: 632, 542: 633, 543: 634, 544: 635, 545: 636, 546: 637, 547: 639, 548: 640, 549: 641, 550: 642, 551: 643, 552: 644, 553: 645, 554: 646, 555: 647, 556: 648, 557: 649, 558: 650, 559: 651, 560: 652, 561: 653, 562: 655, 563: 656, 564: 657, 565: 658, 566: 659, 567: 660, 568: 661, 569: 662, 570: 663, 571: 664, 572: 665, 573: 666, 574: 667, 575: 668, 576: 669, 577: 671, 578: 672, 579: 673, 580: 674, 581: 675, 582: 676, 583: 677, 584: 678, 585: 679, 586: 680, 587: 681, 588: 683, 589: 684, 590: 686, 591: 687, 592: 693, 593: 694, 594: 695, 595: 696, 596: 697, 597: 698, 598: 699, 599: 700, 600: 701, 601: 703, 602: 704, 603: 705, 604: 706, 605: 707, 606: 708, 607: 709, 608: 710, 609: 711, 610: 713, 611: 714, 612: 715, 613: 716, 614: 717, 615: 718, 616: 719, 617: 720, 618: 721, 619: 723, 620: 724, 621: 725, 622: 726, 623: 727, 624: 728, 625: 730, 626: 731, 627: 732, 628: 733, 629: 734, 630: 735, 631: 739, 632: 740, 633: 741, 634: 742, 635: 743, 636: 744, 637: 745, 638: 746, 639: 747, 640: 748, 641: 749, 642: 750, 643: 751, 644: 752, 645: 753, 646: 754, 647: 755, 648: 756, 649: 757, 650: 758, 651: 759, 652: 760, 653: 761, 654: 762, 655: 763, 656: 764, 657: 765, 658: 766, 659: 767, 660: 768, 661: 769, 662: 770, 663: 771, 664: 773, 665: 774, 666: 775, 667: 776, 668: 777, 669: 778, 670: 780, 671: 781, 672: 782, 673: 783, 674: 784, 675: 785, 676: 789, 677: 790, 678: 791, 679: 792, 680: 793, 681: 794, 682: 795, 683: 796, 684: 797, 685: 798, 686: 799, 687: 800, 688: 801, 689: 802, 690: 803, 691: 804, 692: 805, 693: 806, 694: 807, 695: 808, 696: 809, 697: 810, 698: 811, 699: 812, 700: 813, 701: 814, 702: 815, 703: 816, 704: 817, 705: 818, 706: 819, 707: 820, 708: 821, 709: 823, 710: 824, 711: 825, 712: 826, 713: 827, 714: 828, 715: 830, 716: 831, 717: 832, 718: 833, 719: 834, 720: 835, 721: 839, 722: 840, 723: 842, 724: 843, 725: 845, 726: 846, 727: 852, 728: 853, 729: 854, 730: 855, 731: 856, 732: 857, 733: 858, 734: 859, 735: 860, 736: 862, 737: 863, 738: 864, 739: 865, 740: 866, 741: 867, 742: 868, 743: 869, 744: 870, 745: 872, 746: 873, 747: 874, 748: 875, 749: 876, 750: 877, 751: 878, 752: 879, 753: 880, 754: 882, 755: 883, 756: 884, 757: 885, 758: 886, 759: 887, 760: 889, 761: 890, 762: 891, 763: 892, 764: 893, 765: 894, 766: 895, 767: 896, 768: 898, 769: 899, 770: 901, 771: 902, 772: 908, 773: 909, 774: 910, 775: 911, 776: 912, 777: 913, 778: 914, 779: 915, 780: 916, 781: 918, 782: 919, 783: 920, 784: 921, 785: 922, 786: 923, 787: 924, 788: 925, 789: 926, 790: 928, 791: 929, 792: 930, 793: 931, 794: 932, 795: 933, 796: 934, 797: 935, 798: 936, 799: 938, 800: 939, 801: 940, 802: 941, 803: 942, 804: 943, 805: 945, 806: 946, 807: 947, 808: 948, 809: 949, 810: 950, 811: 951, 812: 952, 813: 954, 814: 955, 815: 957, 816: 958, 817: 964, 818: 965, 819: 966, 820: 967, 821: 968, 822: 969, 823: 970, 824: 971, 825: 972, 826: 974, 827: 975, 828: 976, 829: 977, 830: 978, 831: 979, 832: 980, 833: 981, 834: 982, 835: 984, 836: 985, 837: 986, 838: 987, 839: 988, 840: 989, 841: 990, 842: 991, 843: 992, 844: 994, 845: 995, 846: 996, 847: 997, 848: 998, 849: 999, 850: 1001, 851: 1002, 852: 1003, 853: 1004, 854: 1005, 855: 1006, 856: 1007, 857: 1008, 858: 1010, 859: 1011, 860: 1013, 861: 1014, 862: 1019, 863: 1020, 864: 1022, 865: 1023, 866: 1025, 867: 1026, 868: 1031, 869: 1032, 870: 1034, 871: 1035, 872: 1037, 873: 1038, 874: 1046, 875: 1047, 876: 1048, 877: 1049, 878: 1050, 879: 1051, 880: 1052, 881: 1053, 882: 1054, 883: 1055, 884: 1056, 885: 1057, 886: 1058, 887: 1059, 888: 1060, 889: 1061, 890: 1062, 891: 1063, 892: 1065, 893: 1066, 894: 1067, 895: 1068, 896: 1069, 897: 1070, 898: 1071, 899: 1072, 900: 1073, 901: 1074, 902: 1075, 903: 1076, 904: 1077, 905: 1078, 906: 1079, 907: 1080, 908: 1081, 909: 1082, 910: 1084, 911: 1085, 912: 1086, 913: 1087, 914: 1088, 915: 1089, 916: 1090, 917: 1091, 918: 1092, 919: 1093, 920: 1094, 921: 1095, 922: 1096, 923: 1097, 924: 1098, 925: 1099, 926: 1100, 927: 1101, 928: 1103, 929: 1104, 930: 1105, 931: 1106, 932: 1107, 933: 1108, 934: 1110, 935: 1111, 936: 1112, 937: 1113, 938: 1114, 939: 1115, 940: 1117, 941: 1118, 942: 1119, 943: 1120, 944: 1121, 945: 1122} [model_handling.py at line 1562]  +DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 4: 3, 5: 4, 7: 5, 8: 6, 14: 7, 15: 8, 16: 9, 18: 10, 19: 11, 20: 12, 22: 13, 23: 14, 24: 15, 26: 16, 27: 17, 28: 18, 29: 19, 30: 20, 31: 21, 33: 22, 34: 23, 35: 24, 36: 25, 37: 26, 38: 27, 39: 28, 40: 29, 41: 30, 42: 31, 43: 32, 44: 33, 45: 34, 46: 35, 47: 36, 49: 37, 50: 38, 51: 39, 52: 40, 53: 41, 54: 42, 55: 43, 56: 44, 57: 45, 58: 46, 59: 47, 60: 48, 61: 49, 62: 50, 63: 51, 65: 52, 66: 53, 67: 54, 68: 55, 69: 56, 70: 57, 71: 58, 72: 59, 73: 60, 74: 61, 75: 62, 76: 63, 77: 64, 78: 65, 79: 66, 81: 67, 82: 68, 83: 69, 84: 70, 85: 71, 86: 72, 87: 73, 88: 74, 89: 75, 91: 76, 92: 77, 93: 78, 94: 79, 95: 80, 96: 81, 97: 82, 98: 83, 99: 84, 101: 85, 102: 86, 103: 87, 104: 88, 105: 89, 106: 90, 107: 91, 108: 92, 109: 93, 110: 94, 111: 95, 112: 96, 113: 97, 114: 98, 115: 99, 116: 100, 117: 101, 118: 102, 119: 103, 120: 104, 121: 105, 124: 106, 125: 107, 126: 108, 127: 109, 128: 110, 129: 111, 130: 112, 131: 113, 132: 114, 133: 115, 134: 116, 135: 117, 136: 118, 137: 119, 138: 120, 140: 121, 141: 122, 143: 123, 144: 124, 145: 125, 146: 126, 147: 127, 148: 128, 149: 129, 150: 130, 151: 131, 152: 132, 153: 133, 154: 134, 155: 135, 156: 136, 157: 137, 159: 138, 160: 139, 161: 140, 162: 141, 163: 142, 164: 143, 165: 144, 166: 145, 167: 146, 168: 147, 169: 148, 170: 149, 171: 150, 172: 151, 173: 152, 175: 153, 176: 154, 177: 155, 178: 156, 179: 157, 180: 158, 181: 159, 182: 160, 183: 161, 184: 162, 185: 163, 186: 164, 187: 165, 188: 166, 189: 167, 190: 168, 191: 169, 192: 170, 193: 171, 194: 172, 195: 173, 196: 174, 197: 175, 198: 176, 199: 177, 200: 178, 201: 179, 202: 180, 203: 181, 204: 182, 205: 183, 206: 184, 207: 185, 208: 186, 209: 187, 210: 188, 211: 189, 212: 190, 213: 191, 214: 192, 215: 193, 216: 194, 217: 195, 218: 196, 220: 197, 221: 198, 222: 199, 223: 200, 224: 201, 225: 202, 227: 203, 228: 204, 229: 205, 230: 206, 231: 207, 232: 208, 234: 209, 235: 210, 247: 211, 248: 212, 249: 213, 250: 214, 251: 215, 252: 216, 253: 217, 254: 218, 255: 219, 256: 220, 257: 221, 258: 222, 259: 223, 260: 224, 261: 225, 263: 226, 264: 227, 266: 228, 267: 229, 268: 230, 269: 231, 270: 232, 271: 233, 272: 234, 273: 235, 274: 236, 275: 237, 276: 238, 277: 239, 278: 240, 279: 241, 280: 242, 282: 243, 283: 244, 284: 245, 285: 246, 286: 247, 287: 248, 288: 249, 289: 250, 290: 251, 291: 252, 292: 253, 293: 254, 294: 255, 295: 256, 296: 257, 298: 258, 299: 259, 300: 260, 301: 261, 302: 262, 303: 263, 304: 264, 305: 265, 306: 266, 307: 267, 308: 268, 309: 269, 310: 270, 311: 271, 312: 272, 313: 273, 314: 274, 315: 275, 316: 276, 317: 277, 318: 278, 319: 279, 320: 280, 321: 281, 322: 282, 323: 283, 324: 284, 325: 285, 326: 286, 327: 287, 328: 288, 329: 289, 330: 290, 331: 291, 332: 292, 333: 293, 334: 294, 335: 295, 336: 296, 337: 297, 338: 298, 339: 299, 340: 300, 341: 301, 343: 302, 344: 303, 345: 304, 346: 305, 347: 306, 348: 307, 350: 308, 351: 309, 352: 310, 353: 311, 354: 312, 355: 313, 357: 314, 358: 315, 370: 316, 371: 317, 372: 318, 373: 319, 374: 320, 375: 321, 377: 322, 378: 323, 379: 324, 380: 325, 381: 326, 382: 327, 383: 328, 384: 329, 385: 330, 386: 331, 387: 332, 388: 333, 389: 334, 390: 335, 391: 336, 393: 337, 394: 338, 395: 339, 396: 340, 397: 341, 398: 342, 399: 343, 400: 344, 401: 345, 402: 346, 403: 347, 404: 348, 405: 349, 406: 350, 407: 351, 409: 352, 410: 353, 411: 354, 412: 355, 413: 356, 414: 357, 415: 358, 416: 359, 417: 360, 418: 361, 419: 362, 420: 363, 421: 364, 422: 365, 423: 366, 425: 367, 426: 368, 427: 369, 428: 370, 429: 371, 430: 372, 431: 373, 432: 374, 433: 375, 434: 376, 435: 377, 437: 378, 438: 379, 440: 380, 441: 381, 447: 382, 448: 383, 449: 384, 450: 385, 451: 386, 452: 387, 453: 388, 454: 389, 455: 390, 457: 391, 458: 392, 459: 393, 460: 394, 461: 395, 462: 396, 463: 397, 464: 398, 465: 399, 467: 400, 468: 401, 469: 402, 470: 403, 471: 404, 472: 405, 473: 406, 474: 407, 475: 408, 477: 409, 478: 410, 479: 411, 480: 412, 481: 413, 482: 414, 484: 415, 485: 416, 486: 417, 487: 418, 488: 419, 489: 420, 493: 421, 494: 422, 495: 423, 496: 424, 497: 425, 498: 426, 500: 427, 501: 428, 502: 429, 503: 430, 504: 431, 505: 432, 506: 433, 507: 434, 508: 435, 509: 436, 510: 437, 511: 438, 512: 439, 513: 440, 514: 441, 516: 442, 517: 443, 518: 444, 519: 445, 520: 446, 521: 447, 522: 448, 523: 449, 524: 450, 525: 451, 526: 452, 527: 453, 528: 454, 529: 455, 530: 456, 532: 457, 533: 458, 534: 459, 535: 460, 536: 461, 537: 462, 538: 463, 539: 464, 540: 465, 541: 466, 542: 467, 543: 468, 544: 469, 545: 470, 546: 471, 548: 472, 549: 473, 550: 474, 551: 475, 552: 476, 553: 477, 554: 478, 555: 479, 556: 480, 557: 481, 558: 482, 560: 483, 561: 484, 563: 485, 564: 486, 570: 487, 571: 488, 572: 489, 573: 490, 574: 491, 575: 492, 576: 493, 577: 494, 578: 495, 580: 496, 581: 497, 582: 498, 583: 499, 584: 500, 585: 501, 586: 502, 587: 503, 588: 504, 590: 505, 591: 506, 592: 507, 593: 508, 594: 509, 595: 510, 596: 511, 597: 512, 598: 513, 600: 514, 601: 515, 602: 516, 603: 517, 604: 518, 605: 519, 607: 520, 608: 521, 609: 522, 610: 523, 611: 524, 612: 525, 616: 526, 617: 527, 618: 528, 619: 529, 620: 530, 621: 531, 623: 532, 624: 533, 625: 534, 626: 535, 627: 536, 628: 537, 629: 538, 630: 539, 631: 540, 632: 541, 633: 542, 634: 543, 635: 544, 636: 545, 637: 546, 639: 547, 640: 548, 641: 549, 642: 550, 643: 551, 644: 552, 645: 553, 646: 554, 647: 555, 648: 556, 649: 557, 650: 558, 651: 559, 652: 560, 653: 561, 655: 562, 656: 563, 657: 564, 658: 565, 659: 566, 660: 567, 661: 568, 662: 569, 663: 570, 664: 571, 665: 572, 666: 573, 667: 574, 668: 575, 669: 576, 671: 577, 672: 578, 673: 579, 674: 580, 675: 581, 676: 582, 677: 583, 678: 584, 679: 585, 680: 586, 681: 587, 683: 588, 684: 589, 686: 590, 687: 591, 693: 592, 694: 593, 695: 594, 696: 595, 697: 596, 698: 597, 699: 598, 700: 599, 701: 600, 703: 601, 704: 602, 705: 603, 706: 604, 707: 605, 708: 606, 709: 607, 710: 608, 711: 609, 713: 610, 714: 611, 715: 612, 716: 613, 717: 614, 718: 615, 719: 616, 720: 617, 721: 618, 723: 619, 724: 620, 725: 621, 726: 622, 727: 623, 728: 624, 730: 625, 731: 626, 732: 627, 733: 628, 734: 629, 735: 630, 739: 631, 740: 632, 741: 633, 742: 634, 743: 635, 744: 636, 745: 637, 746: 638, 747: 639, 748: 640, 749: 641, 750: 642, 751: 643, 752: 644, 753: 645, 754: 646, 755: 647, 756: 648, 757: 649, 758: 650, 759: 651, 760: 652, 761: 653, 762: 654, 763: 655, 764: 656, 765: 657, 766: 658, 767: 659, 768: 660, 769: 661, 770: 662, 771: 663, 773: 664, 774: 665, 775: 666, 776: 667, 777: 668, 778: 669, 780: 670, 781: 671, 782: 672, 783: 673, 784: 674, 785: 675, 789: 676, 790: 677, 791: 678, 792: 679, 793: 680, 794: 681, 795: 682, 796: 683, 797: 684, 798: 685, 799: 686, 800: 687, 801: 688, 802: 689, 803: 690, 804: 691, 805: 692, 806: 693, 807: 694, 808: 695, 809: 696, 810: 697, 811: 698, 812: 699, 813: 700, 814: 701, 815: 702, 816: 703, 817: 704, 818: 705, 819: 706, 820: 707, 821: 708, 823: 709, 824: 710, 825: 711, 826: 712, 827: 713, 828: 714, 830: 715, 831: 716, 832: 717, 833: 718, 834: 719, 835: 720, 839: 721, 840: 722, 842: 723, 843: 724, 845: 725, 846: 726, 852: 727, 853: 728, 854: 729, 855: 730, 856: 731, 857: 732, 858: 733, 859: 734, 860: 735, 862: 736, 863: 737, 864: 738, 865: 739, 866: 740, 867: 741, 868: 742, 869: 743, 870: 744, 872: 745, 873: 746, 874: 747, 875: 748, 876: 749, 877: 750, 878: 751, 879: 752, 880: 753, 882: 754, 883: 755, 884: 756, 885: 757, 886: 758, 887: 759, 889: 760, 890: 761, 891: 762, 892: 763, 893: 764, 894: 765, 895: 766, 896: 767, 898: 768, 899: 769, 901: 770, 902: 771, 908: 772, 909: 773, 910: 774, 911: 775, 912: 776, 913: 777, 914: 778, 915: 779, 916: 780, 918: 781, 919: 782, 920: 783, 921: 784, 922: 785, 923: 786, 924: 787, 925: 788, 926: 789, 928: 790, 929: 791, 930: 792, 931: 793, 932: 794, 933: 795, 934: 796, 935: 797, 936: 798, 938: 799, 939: 800, 940: 801, 941: 802, 942: 803, 943: 804, 945: 805, 946: 806, 947: 807, 948: 808, 949: 809, 950: 810, 951: 811, 952: 812, 954: 813, 955: 814, 957: 815, 958: 816, 964: 817, 965: 818, 966: 819, 967: 820, 968: 821, 969: 822, 970: 823, 971: 824, 972: 825, 974: 826, 975: 827, 976: 828, 977: 829, 978: 830, 979: 831, 980: 832, 981: 833, 982: 834, 984: 835, 985: 836, 986: 837, 987: 838, 988: 839, 989: 840, 990: 841, 991: 842, 992: 843, 994: 844, 995: 845, 996: 846, 997: 847, 998: 848, 999: 849, 1001: 850, 1002: 851, 1003: 852, 1004: 853, 1005: 854, 1006: 855, 1007: 856, 1008: 857, 1010: 858, 1011: 859, 1013: 860, 1014: 861, 1019: 862, 1020: 863, 1022: 864, 1023: 865, 1025: 866, 1026: 867, 1031: 868, 1032: 869, 1034: 870, 1035: 871, 1037: 872, 1038: 873, 1046: 874, 1047: 875, 1048: 876, 1049: 877, 1050: 878, 1051: 879, 1052: 880, 1053: 881, 1054: 882, 1055: 883, 1056: 884, 1057: 885, 1058: 886, 1059: 887, 1060: 888, 1061: 889, 1062: 890, 1063: 891, 1065: 892, 1066: 893, 1067: 894, 1068: 895, 1069: 896, 1070: 897, 1071: 898, 1072: 899, 1073: 900, 1074: 901, 1075: 902, 1076: 903, 1077: 904, 1078: 905, 1079: 906, 1080: 907, 1081: 908, 1082: 909, 1084: 910, 1085: 911, 1086: 912, 1087: 913, 1088: 914, 1089: 915, 1090: 916, 1091: 917, 1092: 918, 1093: 919, 1094: 920, 1095: 921, 1096: 922, 1097: 923, 1098: 924, 1099: 925, 1100: 926, 1101: 927, 1103: 928, 1104: 929, 1105: 930, 1106: 931, 1107: 932, 1108: 933, 1110: 934, 1111: 935, 1112: 936, 1113: 937, 1114: 938, 1115: 939, 1117: 940, 1118: 941, 1119: 942, 1120: 943, 1121: 944, 1122: 945} [model_handling.py at line 1563]  +Generated helas calls for 1 subprocesses (1240 diagrams) in 2.674 s +Wrote files for 2281 helas calls in 26.853 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.373 s +ALOHA: aloha creates 5 routines in 0.172 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 10 routines in 0.313 s +ALOHA: aloha creates 10 routines in 0.164 s VVV1 VVV1 FFV1 @@ -210,38 +212,40 @@ ALOHA: aloha creates 10 routines in 0.313 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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/src/./HelAmps_sm.h +INFO: Created file HelAmps_sm.h in directory /shared/roiser/sw/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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/src/./Parameters_sm.h +FileWriter for /shared/roiser/sw/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: /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/src/. and /shared/roiser/sw/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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/Cards/me5_configuration.txt INFO: Use Fortran compiler gfortran INFO: Use c++ compiler g++ INFO: Generate jpeg diagrams 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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg; patch -p4 -i /shared/roiser/sw/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common patching file SubProcesses/makefile -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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/SubProcesses/P1_gg_ttxggg; patch -p6 -i /shared/roiser/sw/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file driver.f patching file matrix1.f Hunk #2 succeeded at 339 (offset 112 lines). DEBUG: p.returncode =  0 [output.py at line 263]  -Output to directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg done. +Output to directory /shared/roiser/sw/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 +/shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/README Run "open index.html" to see more information about this process. quit -real 0m33.065s -user 0m32.263s -sys 0m0.459s -Code generation completed in 33 seconds +real 0m37.728s +user 0m14.343s +sys 0m1.293s +Code generation completed in 38 seconds +/shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/bin/internal/banner.py:3309: SyntaxWarning: invalid escape sequence '\s' + function_pat = re.compile('^\s+(?:SUBROUTINE|(?:%(type)s)\s+function)\s+([a-zA-Z]\w*)' \ ************************************************************ * * * W E L C O M E to * @@ -254,7 +258,7 @@ Code generation completed in 33 seconds * * * * * * * * * * * * -* VERSION 3.6.0 * +* VERSION 3.6.2 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -262,10 +266,9 @@ Code generation completed in 33 seconds * 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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/Cards/me5_configuration.txt +INFO: load configuration from /shared/roiser/sw/madgraph4gpu/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/Cards/me5_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 @@ -284,7 +287,7 @@ launch in debug mode * * * * * * * * * * * * -* VERSION 3.6.0 * +* VERSION 3.6.2 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -292,10 +295,9 @@ 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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/Cards/me5_configuration.txt +INFO: load configuration from /shared/roiser/sw/madgraph4gpu/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gg_ttggg/Cards/me5_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 68b4c46295..a0212bfb62 100644 --- a/epochX/cudacpp/gg_ttggg.mad/Cards/me5_configuration.txt +++ b/epochX/cudacpp/gg_ttggg.mad/Cards/me5_configuration.txt @@ -235,7 +235,7 @@ # pineappl = pineappl -#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo +#mg5_path = /shared/roiser/sw/madgraph4gpu/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo +#mg5_path = /shared/roiser/sw/madgraph4gpu/MG5aMC/mg5amcnlo diff --git a/epochX/cudacpp/gg_ttggg.mad/Cards/proc_card_mg5.dat b/epochX/cudacpp/gg_ttggg.mad/Cards/proc_card_mg5.dat index cdd9d43b05..d6aed6685e 100644 --- a/epochX/cudacpp/gg_ttggg.mad/Cards/proc_card_mg5.dat +++ b/epochX/cudacpp/gg_ttggg.mad/Cards/proc_card_mg5.dat @@ -8,7 +8,7 @@ #* * * * #* * #* * -#* VERSION 3.6.0 2024-09-30 * +#* VERSION 3.6.2 2025-03-19 * #* * #* WARNING: UNKNOWN DEVELOPMENT VERSION. * #* WARNING: DO NOT USE FOR PRODUCTION * diff --git a/epochX/cudacpp/gg_ttggg.mad/Cards/run_card.dat b/epochX/cudacpp/gg_ttggg.mad/Cards/run_card.dat index a08f93d92b..596243d42e 100644 --- a/epochX/cudacpp/gg_ttggg.mad/Cards/run_card.dat +++ b/epochX/cudacpp/gg_ttggg.mad/Cards/run_card.dat @@ -107,6 +107,7 @@ # Parton level cuts definition * #******************************* 0.0 = dsqrt_shat ! minimal shat for full process + -1 = dsqrt_shatmax ! maximum shat for full process # # #********************************************************************* diff --git a/epochX/cudacpp/gg_ttggg.mad/Cards/run_card_default.dat b/epochX/cudacpp/gg_ttggg.mad/Cards/run_card_default.dat index 48050a5fd7..377d5bc1c7 100644 --- a/epochX/cudacpp/gg_ttggg.mad/Cards/run_card_default.dat +++ b/epochX/cudacpp/gg_ttggg.mad/Cards/run_card_default.dat @@ -107,6 +107,7 @@ # Parton level cuts definition * #******************************* 0.0 = dsqrt_shat ! minimal shat for full process + -1 = dsqrt_shatmax ! maximum shat for full process # # #********************************************************************* diff --git a/epochX/cudacpp/gg_ttggg.mad/MGMEVersion.txt b/epochX/cudacpp/gg_ttggg.mad/MGMEVersion.txt index 084e244cea..77a069e39b 100644 --- a/epochX/cudacpp/gg_ttggg.mad/MGMEVersion.txt +++ b/epochX/cudacpp/gg_ttggg.mad/MGMEVersion.txt @@ -1 +1 @@ -3.6.0 \ No newline at end of file +3.6.2 \ No newline at end of file diff --git a/epochX/cudacpp/gg_ttggg.mad/Source/alfas_functions.f b/epochX/cudacpp/gg_ttggg.mad/Source/alfas_functions.f index bb69a6384e..84aeff369c 100644 --- a/epochX/cudacpp/gg_ttggg.mad/Source/alfas_functions.f +++ b/epochX/cudacpp/gg_ttggg.mad/Source/alfas_functions.f @@ -188,6 +188,10 @@ SUBROUTINE NEWTON1(T,A_IN,A_OUT,NLOOP,NF) A_OUT=A_IN/(1D0+A_IN*B0(NF)*T) IF (NLOOP .EQ. 1) RETURN + if (1D0+A_IN*B0(NF)*T.le.0d0)THEN + A_OUT = 9d98 + RETURN + ENDIF A_OUT=A_IN/(1D0+B0(NF)*A_IN*T+C1(NF)*A_IN*LOG(1D0+A_IN*B0(NF)*T)) IF (A_OUT .LT. 0D0) AS=0.3D0 30 AS=A_OUT diff --git a/epochX/cudacpp/gg_ttggg.mad/Source/cuts.inc b/epochX/cudacpp/gg_ttggg.mad/Source/cuts.inc index 23d099e5f7..a8ccc7420d 100644 --- a/epochX/cudacpp/gg_ttggg.mad/Source/cuts.inc +++ b/epochX/cudacpp/gg_ttggg.mad/Source/cuts.inc @@ -37,7 +37,7 @@ C REAL*8 misset,missetmax,ptheavy REAL*8 ptllmin,ptllmax integer maxjetflavor - REAl*8 dsqrt_shat + REAl*8 dsqrt_shat,dsqrt_shatmax COMMON /to_min_max_cuts/ & PTJmax,PTBmax,PTAmax,PTLmax, @@ -60,7 +60,7 @@ C & ht2max,ht3max,ht4max, & htjmin,htjmax,ihtmin,ihtmax, & misset,missetmax,ptheavy, - & ptllmin,ptllmax,dsqrt_shat, + & ptllmin,ptllmax,dsqrt_shat,dsqrt_shatmax, & maxjetflavor C diff --git a/epochX/cudacpp/gg_ttggg.mad/Source/make_opts b/epochX/cudacpp/gg_ttggg.mad/Source/make_opts index e4b87ee6ad..f9f7b64bb5 100644 --- a/epochX/cudacpp/gg_ttggg.mad/Source/make_opts +++ b/epochX/cudacpp/gg_ttggg.mad/Source/make_opts @@ -5,8 +5,8 @@ GLOBAL_FLAG=-O3 -ffast-math -fbounds-check MACFLAG= MG5AMC_VERSION=SpecifiedByMG5aMCAtRunTime PYTHIA8_PATH=NotInstalled -STDLIB_FLAG= STDLIB=-lstdc++ +STDLIB_FLAG= #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 291ca907ee..f9321e7a94 100644 --- a/epochX/cudacpp/gg_ttggg.mad/Source/makefile +++ b/epochX/cudacpp/gg_ttggg.mad/Source/makefile @@ -73,6 +73,7 @@ $(BINDIR)gensudgrid: $(GENSUDGRID) $(LIBDIR)libpdf.$(libext) $(LIBDIR)libgammaUP # Dependencies dsample.o: DiscreteSampler.o dsample.f genps.inc StringCast.o vector.inc +pawgraph.o: vector.inc DiscreteSampler.o: StringCast.o invarients.o: invarients.f genps.inc gen_ximprove.o: gen_ximprove.f run_config.inc run_card.inc diff --git a/epochX/cudacpp/gg_ttggg.mad/Source/run_card.inc b/epochX/cudacpp/gg_ttggg.mad/Source/run_card.inc index 1a1bc782bd..8bd5f73840 100644 --- a/epochX/cudacpp/gg_ttggg.mad/Source/run_card.inc +++ b/epochX/cudacpp/gg_ttggg.mad/Source/run_card.inc @@ -88,6 +88,8 @@ DSQRT_SHAT = 0.000000000000000D+00 + DSQRT_SHATMAX = -1 + LIMHEL = 0.000000000000000D+00 PTJ = 2.000000000000000D+01 diff --git a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/Bridge.h b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/Bridge.h index 87aa648dd2..49b928db67 100644 --- a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/Bridge.h +++ b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/Bridge.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: S. Roiser (Nov 2021) for the MG5aMC CUDACPP plugin. -// Further modified by: S. Roiser, J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2021-2025) for the MG5aMC CUDACPP plugin. #ifndef BRIDGE_H #define BRIDGE_H 1 @@ -255,11 +255,15 @@ namespace mg5amcCpu throw std::logic_error( "Bridge constructor: FIXME! cannot choose gputhreads" ); // this should never happen! m_gpublocks = m_nevt / m_gputhreads; } +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Instantiate device Bridge (nevt=" << m_nevt << ", gpublocks=" << m_gpublocks << ", gputhreads=" << m_gputhreads << ", gpublocks*gputhreads=" << m_gpublocks * m_gputhreads << ")" << std::endl; +#endif m_pmek.reset( new MatrixElementKernelDevice( m_devMomentaC, m_devGs, m_devRndHel, m_devRndCol, m_devChannelIds, m_devMEs, m_devSelHel, m_devSelCol, m_gpublocks, m_gputhreads ) ); #else +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Instantiate host Bridge (nevt=" << m_nevt << ")" << std::endl; +#endif m_pmek.reset( new MatrixElementKernelHost( m_hstMomentaC, m_hstGs, m_hstRndHel, m_hstRndCol, m_hstChannelIds, m_hstMEs, m_hstSelHel, m_hstSelCol, m_nevt ) ); #endif // MGONGPUCPP_GPUIMPL // Create a process object, read param card and set parameters @@ -290,8 +294,10 @@ namespace mg5amcCpu throw std::runtime_error( "Bridge: gpublocks*gputhreads must equal m_nevt in set_gpugrid" ); m_gpublocks = gpublocks; m_gputhreads = gputhreads; +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Set grid in Bridge (nevt=" << m_nevt << ", gpublocks=" << m_gpublocks << ", gputhreads=" << m_gputhreads << ", gpublocks*gputhreads=" << m_gpublocks * m_gputhreads << ")" << std::endl; +#endif m_pmek->setGrid( m_gpublocks, m_gputhreads ); } #endif @@ -347,7 +353,9 @@ namespace mg5amcCpu if( goodHelOnly ) return; m_pmek->computeMatrixElements( useChannelIds ); copyHostFromDevice( m_hstMEs, m_devMEs ); +#ifdef MGONGPUCPP_VERBOSE flagAbnormalMEs( m_hstMEs.data(), m_nevt ); +#endif copyHostFromDevice( m_hstSelHel, m_devSelHel ); copyHostFromDevice( m_hstSelCol, m_devSelCol ); if constexpr( std::is_same_v ) @@ -400,7 +408,9 @@ namespace mg5amcCpu } if( goodHelOnly ) return; m_pmek->computeMatrixElements( useChannelIds ); +#ifdef MGONGPUCPP_VERBOSE flagAbnormalMEs( m_hstMEs.data(), m_nevt ); +#endif if constexpr( std::is_same_v ) { memcpy( mes, m_hstMEs.data(), m_hstMEs.bytes() ); diff --git a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/GpuRuntime.h b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/GpuRuntime.h index 860c7fde16..6a4b946e74 100644 --- a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/GpuRuntime.h +++ b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/GpuRuntime.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: J. Teig (Jun 2023, based on earlier work by S. Roiser) for the MG5aMC CUDACPP plugin. -// Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2025) for the MG5aMC CUDACPP plugin. #ifndef MG5AMC_GPURUNTIME_H #define MG5AMC_GPURUNTIME_H 1 @@ -50,7 +50,7 @@ namespace mg5amcGpu // Set up CUDA application // ** NB: strictly speaking this is not needed when using the CUDA runtime API ** // Calling cudaSetDevice on startup is useful to properly book-keep the time spent in CUDA initialization - static void setUp( const bool debug = true ) + static void setUp( const bool debug = false ) // ZW: changed debug default to false { // ** NB: it is useful to call cudaSetDevice, or cudaFree, to properly book-keep the time spent in CUDA initialization // ** NB: otherwise, the first CUDA operation (eg a cudaMemcpyToSymbol in CPPProcess ctor) appears to take much longer! @@ -71,7 +71,7 @@ namespace mg5amcGpu // ** NB: strictly speaking this is not needed when using the CUDA runtime API ** // Calling cudaDeviceReset on shutdown is only needed for checking memory leaks in cuda-memcheck // See https://docs.nvidia.com/cuda/cuda-memcheck/index.html#leak-checking - static void tearDown( const bool debug = true ) + static void tearDown( const bool debug = false ) // ZW: changed debug default to false { if( debug ) std::cout << "__GpuRuntime: calling GpuDeviceReset()" << std::endl; checkGpu( gpuDeviceReset() ); diff --git a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/MGVersion.txt b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/MGVersion.txt index 084e244cea..77a069e39b 100644 --- a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/MGVersion.txt +++ b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/MGVersion.txt @@ -1 +1 @@ -3.6.0 \ No newline at end of file +3.6.2 \ No newline at end of file diff --git a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/MatrixElementKernels.cc b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/MatrixElementKernels.cc index f463977c1a..703ea3781c 100644 --- a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/MatrixElementKernels.cc +++ b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/MatrixElementKernels.cc @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: A. Valassi (Jan 2022) for the MG5aMC CUDACPP plugin. -// Further modified by: J. Teig, A. Valassi (2022-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: J. Teig, A. Valassi, Z. Wettersten (2022-2025) for the MG5aMC CUDACPP plugin. #include "MatrixElementKernels.h" @@ -60,7 +60,9 @@ namespace mg5amcCpu #ifdef MGONGPU_CHANNELID_DEBUG MatrixElementKernelBase::dumpNevtProcessedByChannel(); #endif +#ifdef MGONGPUCPP_VERBOSE MatrixElementKernelBase::dumpSignallingFPEs(); +#endif } //-------------------------------------------------------------------------- diff --git a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/MatrixElementKernels.h b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/MatrixElementKernels.h index 7acff4b308..8da04d7945 100644 --- a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/MatrixElementKernels.h +++ b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/MatrixElementKernels.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: A. Valassi (Jan 2022) for the MG5aMC CUDACPP plugin. -// Further modified by: J. Teig, A. Valassi (2022-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: J. Teig, A. Valassi, Z. Wettersten (2022-2025) for the MG5aMC CUDACPP plugin. #ifndef MATRIXELEMENTKERNELS_H #define MATRIXELEMENTKERNELS_H 1 @@ -134,7 +134,7 @@ namespace mg5amcCpu // Does this host system support the SIMD used in the matrix element calculation? // [NB: this is private, SIMD vectorization in mg5amc C++ code is currently only used in the ME calculations below MatrixElementKernelHost!] - static bool hostSupportsSIMD( const bool verbose = true ); + static bool hostSupportsSIMD( const bool verbose = false ); // ZW: default verbose false private: diff --git a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/MemoryAccessGs.h b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/MemoryAccessGs.h index 63c17a68fa..50a6aaef4d 100644 --- a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/MemoryAccessGs.h +++ b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/MemoryAccessGs.h @@ -128,6 +128,14 @@ namespace mg5amcCpu #endif } + // Locate a field (output) in a memory buffer (input) from a kernel event-indexing mechanism (internal) + // [Signature (SCALAR OR VECTOR) ===> fptype_sv* kernelAccess( fptype* buffer ) <===] + static __host__ __device__ inline fptype_sv* + kernelAccessP( fptype* buffer ) + { + return reinterpret_cast( buffer ); + } + // Locate a field (output) in a memory buffer (input) from a kernel event-indexing mechanism (internal) and the given field indexes (input) // [Signature (const, SCALAR) ===> const fptype& kernelAccessConst( const fptype* buffer ) <===] static constexpr auto kernelAccessConst_s = diff --git a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/MemoryBuffers.h b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/MemoryBuffers.h index 65a101888d..17ba7a89e5 100644 --- a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/MemoryBuffers.h +++ b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/MemoryBuffers.h @@ -13,6 +13,7 @@ #include "CPPProcess.h" #include "GpuRuntime.h" #include "Parameters_sm.h" +#include "processConfig.h" #include @@ -274,7 +275,8 @@ namespace mg5amcCpu typedef BufferBase BufferNumerators; // The size (number of elements) per event in a memory buffer for numerators - constexpr size_t sizePerEventNumerators = 1; + // (should be equal to the number of diagrams in the process) + constexpr size_t sizePerEventNumerators = processConfig::ndiagrams; #ifndef MGONGPUCPP_GPUIMPL // A class encapsulating a C++ host buffer for gs 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 ba06f6ff44..a1dd41846a 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 @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -25,6 +25,7 @@ #include "MemoryAccessMatrixElements.h" #include "MemoryAccessMomenta.h" #include "MemoryAccessWavefunctions.h" +#include "processConfig.h" #ifdef MGONGPU_SUPPORTS_MULTICHANNEL #include "MemoryAccessDenominators.h" @@ -96,6 +97,69 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { +#ifdef MGONGPU_SUPPORTS_MULTICHANNEL + __device__ INLINE unsigned int getChannelId( const unsigned int* allChannelIds +#ifndef MGONGPUCPP_GPUIMPL + , + const int ievt00, + bool sanityCheckMixedPrecision = true +#endif + ) + { + unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr +#ifdef MGONGPUCPP_GPUIMPL + using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page + if( allChannelIds != nullptr ) + { + const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) + const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) + // NB: channelIds_sv is a scalar in CUDA + channelId = channelIds_sv; + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + } +#else // Cuda or C++ + using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + if( allChannelIds != nullptr ) + { + // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) + const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 + uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) +#ifndef MGONGPU_CPPSIMD + // NB: channelIds_sv is a scalar in no-SIMD C++ + channelId = channelIds_sv; +#else + // NB: channelIds_sv is a vector in SIMD C++ + channelId = channelIds_sv[0]; // element[0] + for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] + { + assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId + } +#endif + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + if( sanityCheckMixedPrecision ) + { +#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT + // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) + const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 + uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + for( int i = 0; i < neppV; ++i ) + { + assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector + } +#endif + } + } +#endif // MGONGPUCPP_GPUIMPL + return channelId; + } +#endif // MGONGPU_SUPPORTS_MULTICHANNEL + constexpr int nw6 = CPPProcess::nw6; // dimensions of each wavefunction (HELAS KEK 91-11): e.g. 6 for e+ e- -> mu+ mu- (fermions and vectors) constexpr int npar = CPPProcess::npar; // #particles in total (external = initial + final): e.g. 4 for e+ e- -> mu+ mu- constexpr int ncomb = CPPProcess::ncomb; // #helicity combinations: e.g. 16 for e+ e- -> mu+ mu- (2**4 = fermion spin up/down ** npar) @@ -305,7 +369,7 @@ namespace mg5amcCpu COUPs[ndcoup + iicoup] = allCOUPs[ndcoup + iicoup]; // independent couplings, fixed for all events fptype* MEs = E_ACCESS::ieventAccessRecord( allMEs, ievt0 ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); #endif #endif @@ -315,7 +379,7 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Numerators and denominators for the current event (CUDA) or SIMD event page (C++) - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); #endif @@ -344,8 +408,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1 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] ); + if( channelId != 0 ) + { + numerators_sv[0] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] -= amp_sv[0]; jamp_sv[25] += amp_sv[0]; @@ -372,8 +439,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 2 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] ); + if( channelId != 0 ) + { + numerators_sv[1] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= amp_sv[0]; jamp_sv[24] += amp_sv[0]; @@ -459,8 +529,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 4 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] ); + if( channelId != 0 ) + { + numerators_sv[3] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[3] -= amp_sv[0]; jamp_sv[27] += amp_sv[0]; @@ -487,8 +560,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 5 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] ); + if( channelId != 0 ) + { + numerators_sv[4] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] -= amp_sv[0]; jamp_sv[26] += amp_sv[0]; @@ -573,8 +649,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 7 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] ); + if( channelId != 0 ) + { + numerators_sv[6] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[5] -= amp_sv[0]; jamp_sv[29] += amp_sv[0]; @@ -601,8 +680,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 8 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] ); + if( channelId != 0 ) + { + numerators_sv[7] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] -= amp_sv[0]; jamp_sv[28] += amp_sv[0]; @@ -925,8 +1007,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 14 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] ); + if( channelId != 0 ) + { + numerators_sv[13] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += amp_sv[0]; jamp_sv[2] -= amp_sv[0]; @@ -953,8 +1038,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 15 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] ); + if( channelId != 0 ) + { + numerators_sv[14] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += amp_sv[0]; jamp_sv[2] -= amp_sv[0]; @@ -981,8 +1069,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 16 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] ); + if( channelId != 0 ) + { + numerators_sv[15] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] += amp_sv[0]; jamp_sv[5] -= amp_sv[0]; @@ -1067,8 +1158,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 18 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] ); + if( channelId != 0 ) + { + numerators_sv[17] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += amp_sv[0]; jamp_sv[2] -= amp_sv[0]; @@ -1095,8 +1189,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 19 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] ); + if( channelId != 0 ) + { + numerators_sv[18] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += amp_sv[0]; jamp_sv[4] -= amp_sv[0]; @@ -1123,8 +1220,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 20 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] ); + if( channelId != 0 ) + { + numerators_sv[19] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] += amp_sv[0]; jamp_sv[3] -= amp_sv[0]; @@ -1209,8 +1309,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 22 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] ); + if( channelId != 0 ) + { + numerators_sv[21] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += amp_sv[0]; jamp_sv[1] -= amp_sv[0]; @@ -1237,8 +1340,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 23 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] ); + if( channelId != 0 ) + { + numerators_sv[22] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += amp_sv[0]; jamp_sv[1] -= amp_sv[0]; @@ -1265,8 +1371,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 24 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] ); + if( channelId != 0 ) + { + numerators_sv[23] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[3] += amp_sv[0]; jamp_sv[5] -= amp_sv[0]; @@ -1355,8 +1464,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 26 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] ); + if( channelId != 0 ) + { + numerators_sv[25] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[64] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[65] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1369,8 +1481,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 27 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] ); + if( channelId != 0 ) + { + numerators_sv[26] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[70] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[71] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1383,8 +1498,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 28 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] ); + if( channelId != 0 ) + { + numerators_sv[27] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[48] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[54] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1403,8 +1521,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 29 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] ); + if( channelId != 0 ) + { + numerators_sv[28] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[66] += amp_sv[0]; jamp_sv[68] -= amp_sv[0]; @@ -1419,8 +1540,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 30 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] ); + if( channelId != 0 ) + { + numerators_sv[29] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[49] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[55] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1439,8 +1563,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 31 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] ); + if( channelId != 0 ) + { + numerators_sv[30] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[60] += amp_sv[0]; jamp_sv[62] -= amp_sv[0]; @@ -1490,8 +1617,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 33 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] ); + if( channelId != 0 ) + { + numerators_sv[32] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[49] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[55] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1504,8 +1634,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 34 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] ); + if( channelId != 0 ) + { + numerators_sv[33] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[66] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[68] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1518,8 +1651,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 35 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] ); + if( channelId != 0 ) + { + numerators_sv[34] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[49] += amp_sv[0]; jamp_sv[55] -= amp_sv[0]; @@ -1534,8 +1670,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 36 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] ); + if( channelId != 0 ) + { + numerators_sv[35] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[48] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[54] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1548,8 +1687,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 37 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] ); + if( channelId != 0 ) + { + numerators_sv[36] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[60] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[62] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1562,8 +1704,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 38 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] ); + if( channelId != 0 ) + { + numerators_sv[37] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[48] += amp_sv[0]; jamp_sv[54] -= amp_sv[0]; @@ -1578,8 +1723,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 39 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] ); + if( channelId != 0 ) + { + numerators_sv[38] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[48] += amp_sv[0]; jamp_sv[49] -= amp_sv[0]; @@ -1594,8 +1742,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 40 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] ); + if( channelId != 0 ) + { + numerators_sv[39] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[64] += amp_sv[0]; jamp_sv[65] -= amp_sv[0]; @@ -1610,8 +1761,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 41 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] ); + if( channelId != 0 ) + { + numerators_sv[40] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[48] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[49] += cxtype( 0, 1 ) * amp_sv[0]; @@ -1631,8 +1785,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 42 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] ); + if( channelId != 0 ) + { + numerators_sv[41] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[88] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[89] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1645,8 +1802,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 43 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] ); + if( channelId != 0 ) + { + numerators_sv[42] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[94] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[95] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1659,8 +1819,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 44 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] ); + if( channelId != 0 ) + { + numerators_sv[43] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[72] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[78] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1679,8 +1842,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 45 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] ); + if( channelId != 0 ) + { + numerators_sv[44] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[90] += amp_sv[0]; jamp_sv[92] -= amp_sv[0]; @@ -1695,8 +1861,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 46 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] ); + if( channelId != 0 ) + { + numerators_sv[45] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[73] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[79] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1715,8 +1884,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 47 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] ); + if( channelId != 0 ) + { + numerators_sv[46] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[84] += amp_sv[0]; jamp_sv[86] -= amp_sv[0]; @@ -1766,8 +1938,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 49 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] ); + if( channelId != 0 ) + { + numerators_sv[48] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[73] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[79] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1780,8 +1955,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 50 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] ); + if( channelId != 0 ) + { + numerators_sv[49] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[90] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[92] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1794,8 +1972,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 51 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] ); + if( channelId != 0 ) + { + numerators_sv[50] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[73] += amp_sv[0]; jamp_sv[79] -= amp_sv[0]; @@ -1810,8 +1991,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 52 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] ); + if( channelId != 0 ) + { + numerators_sv[51] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[72] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[78] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1824,8 +2008,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 53 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] ); + if( channelId != 0 ) + { + numerators_sv[52] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[84] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[86] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1838,8 +2025,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 54 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] ); + if( channelId != 0 ) + { + numerators_sv[53] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[72] += amp_sv[0]; jamp_sv[78] -= amp_sv[0]; @@ -1854,8 +2044,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 55 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] ); + if( channelId != 0 ) + { + numerators_sv[54] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[72] += amp_sv[0]; jamp_sv[73] -= amp_sv[0]; @@ -1870,8 +2063,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 56 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] ); + if( channelId != 0 ) + { + numerators_sv[55] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[88] += amp_sv[0]; jamp_sv[89] -= amp_sv[0]; @@ -1886,8 +2082,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 57 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] ); + if( channelId != 0 ) + { + numerators_sv[56] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[72] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[73] += cxtype( 0, 1 ) * amp_sv[0]; @@ -1907,8 +2106,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 58 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] ); + if( channelId != 0 ) + { + numerators_sv[57] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[112] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[113] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1921,8 +2123,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 59 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] ); + if( channelId != 0 ) + { + numerators_sv[58] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[118] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[119] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1935,8 +2140,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 60 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] ); + if( channelId != 0 ) + { + numerators_sv[59] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[96] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[102] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1955,8 +2163,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 61 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] ); + if( channelId != 0 ) + { + numerators_sv[60] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[114] += amp_sv[0]; jamp_sv[116] -= amp_sv[0]; @@ -1971,8 +2182,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 62 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] ); + if( channelId != 0 ) + { + numerators_sv[61] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[97] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[103] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1991,8 +2205,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 63 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] ); + if( channelId != 0 ) + { + numerators_sv[62] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[108] += amp_sv[0]; jamp_sv[110] -= amp_sv[0]; @@ -2041,8 +2258,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 65 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] ); + if( channelId != 0 ) + { + numerators_sv[64] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[97] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[103] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -2055,8 +2275,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 66 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] ); + if( channelId != 0 ) + { + numerators_sv[65] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[114] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[116] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -2069,8 +2292,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 67 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] ); + if( channelId != 0 ) + { + numerators_sv[66] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[97] += amp_sv[0]; jamp_sv[103] -= amp_sv[0]; @@ -2085,8 +2311,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 68 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] ); + if( channelId != 0 ) + { + numerators_sv[67] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[96] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[102] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -2099,8 +2328,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 69 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] ); + if( channelId != 0 ) + { + numerators_sv[68] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[108] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[110] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -2113,8 +2345,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 70 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] ); + if( channelId != 0 ) + { + numerators_sv[69] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[96] += amp_sv[0]; jamp_sv[102] -= amp_sv[0]; @@ -2129,8 +2364,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 71 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] ); + if( channelId != 0 ) + { + numerators_sv[70] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[96] += amp_sv[0]; jamp_sv[97] -= amp_sv[0]; @@ -2145,8 +2383,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 72 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] ); + if( channelId != 0 ) + { + numerators_sv[71] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[112] += amp_sv[0]; jamp_sv[113] -= amp_sv[0]; @@ -2161,8 +2402,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 73 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] ); + if( channelId != 0 ) + { + numerators_sv[72] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[96] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[97] += cxtype( 0, 1 ) * amp_sv[0]; @@ -2182,8 +2426,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 74 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] ); + if( channelId != 0 ) + { + numerators_sv[73] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[5] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[29] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -2196,8 +2443,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 75 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] ); + if( channelId != 0 ) + { + numerators_sv[74] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[3] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[27] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -2210,8 +2460,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 76 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] ); + if( channelId != 0 ) + { + numerators_sv[75] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[3] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[27] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -2230,8 +2483,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 77 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] ); + if( channelId != 0 ) + { + numerators_sv[76] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[3] += amp_sv[0]; jamp_sv[27] -= amp_sv[0]; @@ -2246,8 +2502,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 78 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] ); + if( channelId != 0 ) + { + numerators_sv[77] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[5] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[29] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -2266,8 +2525,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 79 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] ); + if( channelId != 0 ) + { + numerators_sv[78] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[5] += amp_sv[0]; jamp_sv[29] -= amp_sv[0]; @@ -2316,8 +2578,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 81 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] ); + if( channelId != 0 ) + { + numerators_sv[80] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[3] += amp_sv[0]; jamp_sv[5] -= amp_sv[0]; @@ -2332,8 +2597,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 82 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] ); + if( channelId != 0 ) + { + numerators_sv[81] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[90] += amp_sv[0]; jamp_sv[92] -= amp_sv[0]; @@ -2348,8 +2616,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 83 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] ); + if( channelId != 0 ) + { + numerators_sv[82] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[3] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[5] += cxtype( 0, 1 ) * amp_sv[0]; @@ -2368,8 +2639,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 84 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] ); + if( channelId != 0 ) + { + numerators_sv[83] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[28] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -2382,8 +2656,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 85 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] ); + if( channelId != 0 ) + { + numerators_sv[84] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[25] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -2396,8 +2673,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 86 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] ); + if( channelId != 0 ) + { + numerators_sv[85] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[25] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -2416,8 +2696,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 87 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] ); + if( channelId != 0 ) + { + numerators_sv[86] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += amp_sv[0]; jamp_sv[25] -= amp_sv[0]; @@ -2432,8 +2715,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 88 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] ); + if( channelId != 0 ) + { + numerators_sv[87] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[28] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -2452,8 +2738,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 89 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] ); + if( channelId != 0 ) + { + numerators_sv[88] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] += amp_sv[0]; jamp_sv[28] -= amp_sv[0]; @@ -2502,8 +2791,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 91 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] ); + if( channelId != 0 ) + { + numerators_sv[90] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += amp_sv[0]; jamp_sv[4] -= amp_sv[0]; @@ -2518,8 +2810,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 92 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] ); + if( channelId != 0 ) + { + numerators_sv[91] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[66] += amp_sv[0]; jamp_sv[68] -= amp_sv[0]; @@ -2534,8 +2829,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 93 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] ); + if( channelId != 0 ) + { + numerators_sv[92] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[4] += cxtype( 0, 1 ) * amp_sv[0]; @@ -2554,8 +2852,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 94 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] ); + if( channelId != 0 ) + { + numerators_sv[93] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[26] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -2568,8 +2869,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 95 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] ); + if( channelId != 0 ) + { + numerators_sv[94] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[24] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -2582,8 +2886,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 96 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] ); + if( channelId != 0 ) + { + numerators_sv[95] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[24] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -2602,8 +2909,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 97 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] ); + if( channelId != 0 ) + { + numerators_sv[96] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += amp_sv[0]; jamp_sv[24] -= amp_sv[0]; @@ -2618,8 +2928,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 98 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] ); + if( channelId != 0 ) + { + numerators_sv[97] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[26] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -2638,8 +2951,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 99 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] ); + if( channelId != 0 ) + { + numerators_sv[98] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] += amp_sv[0]; jamp_sv[26] -= amp_sv[0]; @@ -2688,8 +3004,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 101 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] ); + if( channelId != 0 ) + { + numerators_sv[100] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += amp_sv[0]; jamp_sv[2] -= amp_sv[0]; @@ -2704,8 +3023,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 102 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] ); + if( channelId != 0 ) + { + numerators_sv[101] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[60] += amp_sv[0]; jamp_sv[62] -= amp_sv[0]; @@ -2720,8 +3042,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 103 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] ); + if( channelId != 0 ) + { + numerators_sv[102] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[2] += cxtype( 0, 1 ) * amp_sv[0]; @@ -2740,8 +3065,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 104 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] ); + if( channelId != 0 ) + { + numerators_sv[103] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] += amp_sv[0]; jamp_sv[5] -= amp_sv[0]; @@ -2756,8 +3084,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 105 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] ); + if( channelId != 0 ) + { + numerators_sv[104] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[2] += cxtype( 0, 1 ) * amp_sv[0]; @@ -2776,8 +3107,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 106 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] ); + if( channelId != 0 ) + { + numerators_sv[105] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[64] += amp_sv[0]; jamp_sv[65] -= amp_sv[0]; @@ -2792,8 +3126,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 107 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] ); + if( channelId != 0 ) + { + numerators_sv[106] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[64] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[65] += cxtype( 0, 1 ) * amp_sv[0]; @@ -2812,8 +3149,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 108 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] ); + if( channelId != 0 ) + { + numerators_sv[107] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[60] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[62] += cxtype( 0, 1 ) * amp_sv[0]; @@ -2832,8 +3172,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 109 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] ); + if( channelId != 0 ) + { + numerators_sv[108] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[5] += cxtype( 0, 1 ) * amp_sv[0]; @@ -2852,8 +3195,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 110 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] ); + if( channelId != 0 ) + { + numerators_sv[109] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] += amp_sv[0]; jamp_sv[3] -= amp_sv[0]; @@ -2868,8 +3214,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 111 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] ); + if( channelId != 0 ) + { + numerators_sv[110] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[2] += cxtype( 0, 1 ) * amp_sv[0]; @@ -2888,8 +3237,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 112 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] ); + if( channelId != 0 ) + { + numerators_sv[111] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[70] += amp_sv[0]; jamp_sv[71] -= amp_sv[0]; @@ -2904,8 +3256,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 113 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] ); + if( channelId != 0 ) + { + numerators_sv[112] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[70] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[71] += cxtype( 0, 1 ) * amp_sv[0]; @@ -2924,8 +3279,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 114 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] ); + if( channelId != 0 ) + { + numerators_sv[113] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[66] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[68] += cxtype( 0, 1 ) * amp_sv[0]; @@ -2944,8 +3302,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 115 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] ); + if( channelId != 0 ) + { + numerators_sv[114] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[3] += cxtype( 0, 1 ) * amp_sv[0]; @@ -2964,8 +3325,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 116 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] ); + if( channelId != 0 ) + { + numerators_sv[115] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += amp_sv[0]; jamp_sv[1] -= amp_sv[0]; @@ -2980,8 +3344,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 117 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] ); + if( channelId != 0 ) + { + numerators_sv[116] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[1] += cxtype( 0, 1 ) * amp_sv[0]; @@ -3000,8 +3367,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 118 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] ); + if( channelId != 0 ) + { + numerators_sv[117] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[94] += amp_sv[0]; jamp_sv[95] -= amp_sv[0]; @@ -3016,8 +3386,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 119 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] ); + if( channelId != 0 ) + { + numerators_sv[118] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[64] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[65] += cxtype( 0, 1 ) * amp_sv[0]; @@ -3036,8 +3409,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 120 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] ); + if( channelId != 0 ) + { + numerators_sv[119] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[90] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[92] += cxtype( 0, 1 ) * amp_sv[0]; @@ -3056,8 +3432,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 121 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] ); + if( channelId != 0 ) + { + numerators_sv[120] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[1] += cxtype( 0, 1 ) * amp_sv[0]; @@ -3147,8 +3526,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 124 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] ); + if( channelId != 0 ) + { + numerators_sv[123] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[11] -= amp_sv[0]; @@ -3160,8 +3542,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 125 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] ); + if( channelId != 0 ) + { + numerators_sv[124] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[9] -= amp_sv[0]; @@ -3174,9 +3559,12 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 126 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] ); -#endif + if( channelId != 0 ) + { + numerators_sv[125] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } +#endif jamp_sv[17] -= amp_sv[0]; // *** DIAGRAM 127 OF 1240 *** @@ -3187,8 +3575,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 127 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] ); + if( channelId != 0 ) + { + numerators_sv[126] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[15] -= amp_sv[0]; @@ -3200,8 +3591,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 128 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] ); + if( channelId != 0 ) + { + numerators_sv[127] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[23] -= amp_sv[0]; @@ -3213,8 +3607,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 129 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] ); + if( channelId != 0 ) + { + numerators_sv[128] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[21] -= amp_sv[0]; @@ -3226,8 +3623,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 130 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] ); + if( channelId != 0 ) + { + numerators_sv[129] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[9] += amp_sv[0]; jamp_sv[15] -= amp_sv[0]; @@ -3242,8 +3642,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 131 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] ); + if( channelId != 0 ) + { + numerators_sv[130] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[9] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[15] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -3256,8 +3659,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 132 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] ); + if( channelId != 0 ) + { + numerators_sv[131] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[21] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[23] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -3270,8 +3676,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 133 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] ); + if( channelId != 0 ) + { + numerators_sv[132] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[11] += amp_sv[0]; jamp_sv[15] -= amp_sv[0]; @@ -3286,8 +3695,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 134 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] ); + if( channelId != 0 ) + { + numerators_sv[133] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[11] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[21] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -3300,8 +3712,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 135 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] ); + if( channelId != 0 ) + { + numerators_sv[134] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[15] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[17] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -3314,8 +3729,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 136 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] ); + if( channelId != 0 ) + { + numerators_sv[135] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[9] += amp_sv[0]; jamp_sv[11] -= amp_sv[0]; @@ -3330,8 +3748,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 137 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] ); + if( channelId != 0 ) + { + numerators_sv[136] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[9] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[11] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -3344,8 +3765,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 138 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] ); + if( channelId != 0 ) + { + numerators_sv[137] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[17] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[23] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -3382,8 +3806,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 140 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] ); + if( channelId != 0 ) + { + numerators_sv[139] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[6] += cxtype( 0, 1 ) * amp_sv[0]; @@ -3402,8 +3829,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 141 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] ); + if( channelId != 0 ) + { + numerators_sv[140] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[7] += cxtype( 0, 1 ) * amp_sv[0]; @@ -3456,8 +3886,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 143 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] ); + if( channelId != 0 ) + { + numerators_sv[142] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[16] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[17] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -3470,8 +3903,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 144 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] ); + if( channelId != 0 ) + { + numerators_sv[143] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[12] += amp_sv[0]; jamp_sv[14] -= amp_sv[0]; @@ -3486,8 +3922,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 145 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] ); + if( channelId != 0 ) + { + numerators_sv[144] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[22] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[23] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -3500,8 +3939,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 146 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] ); + if( channelId != 0 ) + { + numerators_sv[145] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[18] += amp_sv[0]; jamp_sv[20] -= amp_sv[0]; @@ -3516,8 +3958,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 147 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] ); + if( channelId != 0 ) + { + numerators_sv[146] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[7] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -3530,8 +3975,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 148 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] ); + if( channelId != 0 ) + { + numerators_sv[147] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += amp_sv[0]; jamp_sv[7] -= amp_sv[0]; @@ -3546,8 +3994,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 149 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] ); + if( channelId != 0 ) + { + numerators_sv[148] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[18] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[20] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -3560,8 +4011,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 150 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] ); + if( channelId != 0 ) + { + numerators_sv[149] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[6] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -3574,8 +4028,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 151 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] ); + if( channelId != 0 ) + { + numerators_sv[150] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += amp_sv[0]; jamp_sv[6] -= amp_sv[0]; @@ -3590,8 +4047,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 152 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] ); + if( channelId != 0 ) + { + numerators_sv[151] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[12] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[14] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -3604,8 +4064,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 153 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] ); + if( channelId != 0 ) + { + numerators_sv[152] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += amp_sv[0]; jamp_sv[1] -= amp_sv[0]; @@ -3620,8 +4083,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 154 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] ); + if( channelId != 0 ) + { + numerators_sv[153] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[1] += cxtype( 0, 1 ) * amp_sv[0]; @@ -3640,8 +4106,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 155 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] ); + if( channelId != 0 ) + { + numerators_sv[154] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[16] += amp_sv[0]; jamp_sv[17] -= amp_sv[0]; @@ -3657,8 +4126,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 156 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] ); + if( channelId != 0 ) + { + numerators_sv[155] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[6] += cxtype( 0, 1 ) * amp_sv[0]; @@ -3677,8 +4149,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 157 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] ); + if( channelId != 0 ) + { + numerators_sv[156] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[3] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[6] += cxtype( 0, 1 ) * amp_sv[0]; @@ -3731,8 +4206,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 159 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] ); + if( channelId != 0 ) + { + numerators_sv[158] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[10] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[11] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -3745,8 +4223,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 160 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] ); + if( channelId != 0 ) + { + numerators_sv[159] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[6] += amp_sv[0]; jamp_sv[8] -= amp_sv[0]; @@ -3761,8 +4242,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 161 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] ); + if( channelId != 0 ) + { + numerators_sv[160] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[20] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[21] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -3775,8 +4259,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 162 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] ); + if( channelId != 0 ) + { + numerators_sv[161] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[19] += amp_sv[0]; jamp_sv[20] -= amp_sv[0]; @@ -3791,8 +4278,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 163 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] ); + if( channelId != 0 ) + { + numerators_sv[162] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[3] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[13] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -3805,8 +4295,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 164 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] ); + if( channelId != 0 ) + { + numerators_sv[163] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[3] += amp_sv[0]; jamp_sv[13] -= amp_sv[0]; @@ -3821,8 +4314,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 165 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] ); + if( channelId != 0 ) + { + numerators_sv[164] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[19] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[22] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -3835,8 +4331,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 166 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] ); + if( channelId != 0 ) + { + numerators_sv[165] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[12] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -3849,8 +4348,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 167 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] ); + if( channelId != 0 ) + { + numerators_sv[166] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] += amp_sv[0]; jamp_sv[6] -= amp_sv[0]; @@ -3865,8 +4367,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 168 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] ); + if( channelId != 0 ) + { + numerators_sv[167] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[6] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[8] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -3879,8 +4384,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 169 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] ); + if( channelId != 0 ) + { + numerators_sv[168] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] += amp_sv[0]; jamp_sv[3] -= amp_sv[0]; @@ -3895,8 +4403,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 170 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] ); + if( channelId != 0 ) + { + numerators_sv[169] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[3] += cxtype( 0, 1 ) * amp_sv[0]; @@ -3915,8 +4426,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 171 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] ); + if( channelId != 0 ) + { + numerators_sv[170] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[10] += amp_sv[0]; jamp_sv[11] -= amp_sv[0]; @@ -3932,8 +4446,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 172 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] ); + if( channelId != 0 ) + { + numerators_sv[171] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[7] += cxtype( 0, 1 ) * amp_sv[0]; @@ -3952,8 +4469,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 173 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] ); + if( channelId != 0 ) + { + numerators_sv[172] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[5] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[7] += cxtype( 0, 1 ) * amp_sv[0]; @@ -4006,8 +4526,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 175 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] ); + if( channelId != 0 ) + { + numerators_sv[174] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[8] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[9] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -4020,8 +4543,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 176 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] ); + if( channelId != 0 ) + { + numerators_sv[175] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[7] += amp_sv[0]; jamp_sv[8] -= amp_sv[0]; @@ -4036,8 +4562,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 177 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] ); + if( channelId != 0 ) + { + numerators_sv[176] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[14] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[15] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -4050,8 +4579,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 178 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] ); + if( channelId != 0 ) + { + numerators_sv[177] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[13] += amp_sv[0]; jamp_sv[14] -= amp_sv[0]; @@ -4066,8 +4598,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 179 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] ); + if( channelId != 0 ) + { + numerators_sv[178] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[5] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[19] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -4080,8 +4615,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 180 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] ); + if( channelId != 0 ) + { + numerators_sv[179] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[5] += amp_sv[0]; jamp_sv[13] -= amp_sv[0]; @@ -4096,8 +4634,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 181 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] ); + if( channelId != 0 ) + { + numerators_sv[180] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[13] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[16] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -4110,8 +4651,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 182 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] ); + if( channelId != 0 ) + { + numerators_sv[181] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[18] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -4124,8 +4668,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 183 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] ); + if( channelId != 0 ) + { + numerators_sv[182] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] += amp_sv[0]; jamp_sv[7] -= amp_sv[0]; @@ -4140,8 +4687,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 184 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] ); + if( channelId != 0 ) + { + numerators_sv[183] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[7] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[10] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -4154,8 +4704,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 185 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] ); + if( channelId != 0 ) + { + numerators_sv[184] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] += amp_sv[0]; jamp_sv[5] -= amp_sv[0]; @@ -4170,8 +4723,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 186 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] ); + if( channelId != 0 ) + { + numerators_sv[185] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[5] += cxtype( 0, 1 ) * amp_sv[0]; @@ -4190,8 +4746,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 187 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] ); + if( channelId != 0 ) + { + numerators_sv[186] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[8] += amp_sv[0]; jamp_sv[9] -= amp_sv[0]; @@ -4206,8 +4765,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 188 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] ); + if( channelId != 0 ) + { + numerators_sv[187] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[5] -= amp_sv[0]; @@ -4219,8 +4781,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 189 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] ); + if( channelId != 0 ) + { + numerators_sv[188] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[3] -= amp_sv[0]; @@ -4232,8 +4797,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 190 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] ); + if( channelId != 0 ) + { + numerators_sv[189] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[16] -= amp_sv[0]; @@ -4245,8 +4813,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 191 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] ); + if( channelId != 0 ) + { + numerators_sv[190] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[13] -= amp_sv[0]; @@ -4258,8 +4829,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 192 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] ); + if( channelId != 0 ) + { + numerators_sv[191] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[22] -= amp_sv[0]; @@ -4271,8 +4845,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 193 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] ); + if( channelId != 0 ) + { + numerators_sv[192] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[19] -= amp_sv[0]; @@ -4284,8 +4861,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 194 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] ); + if( channelId != 0 ) + { + numerators_sv[193] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[3] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[5] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -4298,8 +4878,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 195 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] ); + if( channelId != 0 ) + { + numerators_sv[194] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[3] += amp_sv[0]; jamp_sv[5] -= amp_sv[0]; @@ -4314,8 +4897,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 196 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] ); + if( channelId != 0 ) + { + numerators_sv[195] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[16] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[22] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -4328,8 +4914,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 197 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] ); + if( channelId != 0 ) + { + numerators_sv[196] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] -= amp_sv[0]; @@ -4341,8 +4930,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 198 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] ); + if( channelId != 0 ) + { + numerators_sv[197] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] -= amp_sv[0]; @@ -4354,8 +4946,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 199 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] ); + if( channelId != 0 ) + { + numerators_sv[198] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[10] -= amp_sv[0]; @@ -4367,8 +4962,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 200 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] ); + if( channelId != 0 ) + { + numerators_sv[199] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[7] -= amp_sv[0]; @@ -4380,8 +4978,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 201 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] ); + if( channelId != 0 ) + { + numerators_sv[200] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[20] -= amp_sv[0]; @@ -4393,8 +4994,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 202 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] ); + if( channelId != 0 ) + { + numerators_sv[201] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[18] -= amp_sv[0]; @@ -4406,8 +5010,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 203 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] ); + if( channelId != 0 ) + { + numerators_sv[202] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[4] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -4420,8 +5027,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 204 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] ); + if( channelId != 0 ) + { + numerators_sv[203] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += amp_sv[0]; jamp_sv[4] -= amp_sv[0]; @@ -4436,8 +5046,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 205 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] ); + if( channelId != 0 ) + { + numerators_sv[204] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[10] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[20] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -4450,8 +5063,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 206 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] ); + if( channelId != 0 ) + { + numerators_sv[205] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] -= amp_sv[0]; @@ -4463,8 +5079,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 207 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] ); + if( channelId != 0 ) + { + numerators_sv[206] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= amp_sv[0]; @@ -4476,8 +5095,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 208 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] ); + if( channelId != 0 ) + { + numerators_sv[207] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[8] -= amp_sv[0]; @@ -4489,8 +5111,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 209 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] ); + if( channelId != 0 ) + { + numerators_sv[208] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[6] -= amp_sv[0]; @@ -4502,8 +5127,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 210 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] ); + if( channelId != 0 ) + { + numerators_sv[209] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[14] -= amp_sv[0]; @@ -4515,8 +5143,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 211 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] ); + if( channelId != 0 ) + { + numerators_sv[210] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[12] -= amp_sv[0]; @@ -4528,8 +5159,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 212 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] ); + if( channelId != 0 ) + { + numerators_sv[211] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[2] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -4542,8 +5176,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 213 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] ); + if( channelId != 0 ) + { + numerators_sv[212] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += amp_sv[0]; jamp_sv[2] -= amp_sv[0]; @@ -4558,8 +5195,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 214 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] ); + if( channelId != 0 ) + { + numerators_sv[213] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[8] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[14] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -4572,8 +5212,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 215 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] ); + if( channelId != 0 ) + { + numerators_sv[214] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[5] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -4586,8 +5229,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 216 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] ); + if( channelId != 0 ) + { + numerators_sv[215] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += amp_sv[0]; jamp_sv[2] -= amp_sv[0]; @@ -4602,8 +5248,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 217 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] ); + if( channelId != 0 ) + { + numerators_sv[216] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[2] += cxtype( 0, 1 ) * amp_sv[0]; @@ -4622,8 +5271,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 218 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] ); + if( channelId != 0 ) + { + numerators_sv[217] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[2] += cxtype( 0, 1 ) * amp_sv[0]; @@ -4676,8 +5328,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 220 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] ); + if( channelId != 0 ) + { + numerators_sv[219] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[18] += amp_sv[0]; jamp_sv[19] -= amp_sv[0]; @@ -4692,8 +5347,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 221 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] ); + if( channelId != 0 ) + { + numerators_sv[220] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[18] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[19] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -4706,8 +5364,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 222 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] ); + if( channelId != 0 ) + { + numerators_sv[221] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[3] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -4720,8 +5381,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 223 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] ); + if( channelId != 0 ) + { + numerators_sv[222] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += amp_sv[0]; jamp_sv[2] -= amp_sv[0]; @@ -4736,8 +5400,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 224 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] ); + if( channelId != 0 ) + { + numerators_sv[223] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[4] += cxtype( 0, 1 ) * amp_sv[0]; @@ -4756,8 +5423,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 225 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] ); + if( channelId != 0 ) + { + numerators_sv[224] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[2] += cxtype( 0, 1 ) * amp_sv[0]; @@ -4810,8 +5480,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 227 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] ); + if( channelId != 0 ) + { + numerators_sv[226] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[12] += amp_sv[0]; jamp_sv[13] -= amp_sv[0]; @@ -4826,8 +5499,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 228 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] ); + if( channelId != 0 ) + { + numerators_sv[227] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[12] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[13] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -4840,8 +5516,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 229 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] ); + if( channelId != 0 ) + { + numerators_sv[228] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[1] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -4854,8 +5533,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 230 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] ); + if( channelId != 0 ) + { + numerators_sv[229] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += amp_sv[0]; jamp_sv[1] -= amp_sv[0]; @@ -4870,8 +5552,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 231 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] ); + if( channelId != 0 ) + { + numerators_sv[230] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[3] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[5] += cxtype( 0, 1 ) * amp_sv[0]; @@ -4890,8 +5575,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 232 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] ); + if( channelId != 0 ) + { + numerators_sv[231] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[1] += cxtype( 0, 1 ) * amp_sv[0]; @@ -4944,8 +5632,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 234 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] ); + if( channelId != 0 ) + { + numerators_sv[233] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[6] += amp_sv[0]; jamp_sv[7] -= amp_sv[0]; @@ -4960,8 +5651,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 235 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] ); + if( channelId != 0 ) + { + numerators_sv[234] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[6] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[7] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -5273,8 +5967,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 247 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] ); + if( channelId != 0 ) + { + numerators_sv[246] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[41] -= amp_sv[0]; @@ -5286,8 +5983,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 248 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] ); + if( channelId != 0 ) + { + numerators_sv[247] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[47] -= amp_sv[0]; @@ -5300,8 +6000,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 249 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] ); + if( channelId != 0 ) + { + numerators_sv[248] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[35] -= amp_sv[0]; @@ -5313,8 +6016,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 250 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] ); + if( channelId != 0 ) + { + numerators_sv[249] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[45] -= amp_sv[0]; @@ -5326,8 +6032,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 251 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] ); + if( channelId != 0 ) + { + numerators_sv[250] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[33] -= amp_sv[0]; @@ -5339,8 +6048,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 252 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] ); + if( channelId != 0 ) + { + numerators_sv[251] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[39] -= amp_sv[0]; @@ -5352,8 +6064,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 253 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] ); + if( channelId != 0 ) + { + numerators_sv[252] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[33] += amp_sv[0]; jamp_sv[39] -= amp_sv[0]; @@ -5368,8 +6083,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 254 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] ); + if( channelId != 0 ) + { + numerators_sv[253] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[45] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[47] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -5382,8 +6100,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 255 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] ); + if( channelId != 0 ) + { + numerators_sv[254] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[33] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[39] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -5396,8 +6117,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 256 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] ); + if( channelId != 0 ) + { + numerators_sv[255] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[35] += amp_sv[0]; jamp_sv[39] -= amp_sv[0]; @@ -5412,8 +6136,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 257 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] ); + if( channelId != 0 ) + { + numerators_sv[256] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[39] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[41] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -5426,8 +6153,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 258 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] ); + if( channelId != 0 ) + { + numerators_sv[257] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[35] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[45] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -5440,8 +6170,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 259 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] ); + if( channelId != 0 ) + { + numerators_sv[258] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[33] += amp_sv[0]; jamp_sv[35] -= amp_sv[0]; @@ -5456,8 +6189,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 260 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] ); + if( channelId != 0 ) + { + numerators_sv[259] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[41] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[47] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -5470,8 +6206,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 261 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] ); + if( channelId != 0 ) + { + numerators_sv[260] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[33] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[35] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -5506,8 +6245,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 263 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] ); + if( channelId != 0 ) + { + numerators_sv[262] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[33] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[57] += cxtype( 0, 1 ) * amp_sv[0]; @@ -5526,8 +6268,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 264 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] ); + if( channelId != 0 ) + { + numerators_sv[263] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[35] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[59] += cxtype( 0, 1 ) * amp_sv[0]; @@ -5580,8 +6325,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 266 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] ); + if( channelId != 0 ) + { + numerators_sv[265] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[35] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[59] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -5594,8 +6342,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 267 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] ); + if( channelId != 0 ) + { + numerators_sv[266] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[35] += amp_sv[0]; jamp_sv[59] -= amp_sv[0]; @@ -5610,8 +6361,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 268 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] ); + if( channelId != 0 ) + { + numerators_sv[267] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[33] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[57] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -5624,8 +6378,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 269 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] ); + if( channelId != 0 ) + { + numerators_sv[268] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[33] += amp_sv[0]; jamp_sv[57] -= amp_sv[0]; @@ -5640,8 +6397,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 270 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] ); + if( channelId != 0 ) + { + numerators_sv[269] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[93] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[95] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -5654,8 +6414,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 271 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] ); + if( channelId != 0 ) + { + numerators_sv[270] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[81] += amp_sv[0]; jamp_sv[87] -= amp_sv[0]; @@ -5670,8 +6433,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 272 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] ); + if( channelId != 0 ) + { + numerators_sv[271] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[81] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[87] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -5684,8 +6450,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 273 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] ); + if( channelId != 0 ) + { + numerators_sv[272] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[117] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[119] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -5698,8 +6467,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 274 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] ); + if( channelId != 0 ) + { + numerators_sv[273] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[105] += amp_sv[0]; jamp_sv[111] -= amp_sv[0]; @@ -5714,8 +6486,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 275 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] ); + if( channelId != 0 ) + { + numerators_sv[274] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[105] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[111] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -5728,8 +6503,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 276 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] ); + if( channelId != 0 ) + { + numerators_sv[275] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[93] += amp_sv[0]; jamp_sv[95] -= amp_sv[0]; @@ -5744,8 +6522,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 277 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] ); + if( channelId != 0 ) + { + numerators_sv[276] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[33] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[35] += cxtype( 0, 1 ) * amp_sv[0]; @@ -5764,8 +6545,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 278 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] ); + if( channelId != 0 ) + { + numerators_sv[277] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[33] += amp_sv[0]; jamp_sv[35] -= amp_sv[0]; @@ -5780,8 +6564,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 279 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] ); + if( channelId != 0 ) + { + numerators_sv[278] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[39] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[57] += cxtype( 0, 1 ) * amp_sv[0]; @@ -5800,8 +6587,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 280 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] ); + if( channelId != 0 ) + { + numerators_sv[279] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[41] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[57] += cxtype( 0, 1 ) * amp_sv[0]; @@ -5854,8 +6644,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 282 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] ); + if( channelId != 0 ) + { + numerators_sv[281] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[41] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[83] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -5868,8 +6661,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 283 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] ); + if( channelId != 0 ) + { + numerators_sv[282] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[41] += amp_sv[0]; jamp_sv[83] -= amp_sv[0]; @@ -5884,8 +6680,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 284 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] ); + if( channelId != 0 ) + { + numerators_sv[283] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[39] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[81] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -5898,8 +6697,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 285 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] ); + if( channelId != 0 ) + { + numerators_sv[284] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[39] += amp_sv[0]; jamp_sv[57] -= amp_sv[0]; @@ -5914,8 +6716,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 286 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] ); + if( channelId != 0 ) + { + numerators_sv[285] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[69] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[71] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -5928,8 +6733,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 287 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] ); + if( channelId != 0 ) + { + numerators_sv[286] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[57] += amp_sv[0]; jamp_sv[63] -= amp_sv[0]; @@ -5944,8 +6752,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 288 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] ); + if( channelId != 0 ) + { + numerators_sv[287] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[57] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[63] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -5958,8 +6769,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 289 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] ); + if( channelId != 0 ) + { + numerators_sv[288] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[111] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[113] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -5972,8 +6786,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 290 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] ); + if( channelId != 0 ) + { + numerators_sv[289] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[107] += amp_sv[0]; jamp_sv[111] -= amp_sv[0]; @@ -5988,8 +6805,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 291 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] ); + if( channelId != 0 ) + { + numerators_sv[290] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[107] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[117] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -6002,8 +6822,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 292 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] ); + if( channelId != 0 ) + { + numerators_sv[291] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[69] += amp_sv[0]; jamp_sv[71] -= amp_sv[0]; @@ -6018,8 +6841,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 293 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] ); + if( channelId != 0 ) + { + numerators_sv[292] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[39] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[41] += cxtype( 0, 1 ) * amp_sv[0]; @@ -6038,8 +6864,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 294 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] ); + if( channelId != 0 ) + { + numerators_sv[293] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[39] += amp_sv[0]; jamp_sv[41] -= amp_sv[0]; @@ -6054,8 +6883,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 295 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] ); + if( channelId != 0 ) + { + numerators_sv[294] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[45] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[59] += cxtype( 0, 1 ) * amp_sv[0]; @@ -6074,8 +6906,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 296 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] ); + if( channelId != 0 ) + { + numerators_sv[295] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[47] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[59] += cxtype( 0, 1 ) * amp_sv[0]; @@ -6128,8 +6963,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 298 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] ); + if( channelId != 0 ) + { + numerators_sv[297] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[47] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[107] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -6142,8 +6980,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 299 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] ); + if( channelId != 0 ) + { + numerators_sv[298] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[47] += amp_sv[0]; jamp_sv[83] -= amp_sv[0]; @@ -6158,8 +6999,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 300 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] ); + if( channelId != 0 ) + { + numerators_sv[299] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[45] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[105] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -6172,8 +7016,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 301 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] ); + if( channelId != 0 ) + { + numerators_sv[300] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[45] += amp_sv[0]; jamp_sv[59] -= amp_sv[0]; @@ -6188,8 +7035,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 302 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] ); + if( channelId != 0 ) + { + numerators_sv[301] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[63] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[65] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -6202,8 +7052,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 303 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] ); + if( channelId != 0 ) + { + numerators_sv[302] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[59] += amp_sv[0]; jamp_sv[63] -= amp_sv[0]; @@ -6218,8 +7071,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 304 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] ); + if( channelId != 0 ) + { + numerators_sv[303] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[59] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[69] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -6232,8 +7088,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 305 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] ); + if( channelId != 0 ) + { + numerators_sv[304] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[87] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[89] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -6246,8 +7105,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 306 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] ); + if( channelId != 0 ) + { + numerators_sv[305] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[83] += amp_sv[0]; jamp_sv[87] -= amp_sv[0]; @@ -6262,8 +7124,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 307 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] ); + if( channelId != 0 ) + { + numerators_sv[306] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[83] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[93] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -6276,8 +7141,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 308 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] ); + if( channelId != 0 ) + { + numerators_sv[307] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[63] += amp_sv[0]; jamp_sv[65] -= amp_sv[0]; @@ -6292,8 +7160,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 309 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] ); + if( channelId != 0 ) + { + numerators_sv[308] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[45] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[47] += cxtype( 0, 1 ) * amp_sv[0]; @@ -6312,8 +7183,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 310 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] ); + if( channelId != 0 ) + { + numerators_sv[309] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[45] += amp_sv[0]; jamp_sv[47] -= amp_sv[0]; @@ -6328,8 +7202,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 311 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] ); + if( channelId != 0 ) + { + numerators_sv[310] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[65] -= amp_sv[0]; @@ -6341,8 +7218,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 312 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] ); + if( channelId != 0 ) + { + numerators_sv[311] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[71] -= amp_sv[0]; @@ -6354,8 +7234,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 313 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] ); + if( channelId != 0 ) + { + numerators_sv[312] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[59] -= amp_sv[0]; @@ -6367,8 +7250,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 314 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] ); + if( channelId != 0 ) + { + numerators_sv[313] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[69] -= amp_sv[0]; @@ -6380,8 +7266,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 315 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] ); + if( channelId != 0 ) + { + numerators_sv[314] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[57] -= amp_sv[0]; @@ -6393,8 +7282,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 316 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] ); + if( channelId != 0 ) + { + numerators_sv[315] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[63] -= amp_sv[0]; @@ -6406,8 +7298,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 317 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] ); + if( channelId != 0 ) + { + numerators_sv[316] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[65] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[71] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -6420,8 +7315,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 318 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] ); + if( channelId != 0 ) + { + numerators_sv[317] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[57] += amp_sv[0]; jamp_sv[59] -= amp_sv[0]; @@ -6436,8 +7334,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 319 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] ); + if( channelId != 0 ) + { + numerators_sv[318] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[57] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[59] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -6450,8 +7351,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 320 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] ); + if( channelId != 0 ) + { + numerators_sv[319] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[89] -= amp_sv[0]; @@ -6463,8 +7367,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 321 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] ); + if( channelId != 0 ) + { + numerators_sv[320] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[95] -= amp_sv[0]; @@ -6476,8 +7383,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 322 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] ); + if( channelId != 0 ) + { + numerators_sv[321] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[83] -= amp_sv[0]; @@ -6489,8 +7399,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 323 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] ); + if( channelId != 0 ) + { + numerators_sv[322] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[93] -= amp_sv[0]; @@ -6502,8 +7415,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 324 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] ); + if( channelId != 0 ) + { + numerators_sv[323] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[81] -= amp_sv[0]; @@ -6515,8 +7431,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 325 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] ); + if( channelId != 0 ) + { + numerators_sv[324] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[87] -= amp_sv[0]; @@ -6528,8 +7447,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 326 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] ); + if( channelId != 0 ) + { + numerators_sv[325] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[89] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[95] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -6542,8 +7464,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 327 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] ); + if( channelId != 0 ) + { + numerators_sv[326] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[81] += amp_sv[0]; jamp_sv[83] -= amp_sv[0]; @@ -6558,8 +7483,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 328 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] ); + if( channelId != 0 ) + { + numerators_sv[327] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[81] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[83] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -6572,8 +7500,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 329 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] ); + if( channelId != 0 ) + { + numerators_sv[328] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[113] -= amp_sv[0]; @@ -6585,8 +7516,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 330 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] ); + if( channelId != 0 ) + { + numerators_sv[329] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[119] -= amp_sv[0]; @@ -6598,8 +7532,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 331 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] ); + if( channelId != 0 ) + { + numerators_sv[330] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[107] -= amp_sv[0]; @@ -6611,8 +7548,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 332 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] ); + if( channelId != 0 ) + { + numerators_sv[331] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[117] -= amp_sv[0]; @@ -6624,8 +7564,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 333 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] ); + if( channelId != 0 ) + { + numerators_sv[332] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[105] -= amp_sv[0]; @@ -6637,8 +7580,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 334 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] ); + if( channelId != 0 ) + { + numerators_sv[333] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[111] -= amp_sv[0]; @@ -6650,8 +7596,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 335 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] ); + if( channelId != 0 ) + { + numerators_sv[334] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[113] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[119] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -6664,8 +7613,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 336 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] ); + if( channelId != 0 ) + { + numerators_sv[335] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[105] += amp_sv[0]; jamp_sv[107] -= amp_sv[0]; @@ -6680,8 +7632,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 337 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] ); + if( channelId != 0 ) + { + numerators_sv[336] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[105] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[107] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -6694,8 +7649,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 338 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] ); + if( channelId != 0 ) + { + numerators_sv[337] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[65] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[89] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -6708,8 +7666,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 339 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] ); + if( channelId != 0 ) + { + numerators_sv[338] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[65] += amp_sv[0]; jamp_sv[89] -= amp_sv[0]; @@ -6724,8 +7685,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 340 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] ); + if( channelId != 0 ) + { + numerators_sv[339] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[33] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[39] += cxtype( 0, 1 ) * amp_sv[0]; @@ -6744,8 +7708,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 341 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] ); + if( channelId != 0 ) + { + numerators_sv[340] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[33] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[39] += cxtype( 0, 1 ) * amp_sv[0]; @@ -6798,8 +7765,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 343 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] ); + if( channelId != 0 ) + { + numerators_sv[342] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[33] += amp_sv[0]; jamp_sv[39] -= amp_sv[0]; @@ -6814,8 +7784,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 344 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] ); + if( channelId != 0 ) + { + numerators_sv[343] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[63] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[87] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -6828,8 +7801,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 345 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] ); + if( channelId != 0 ) + { + numerators_sv[344] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[71] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[113] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -6842,8 +7818,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 346 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] ); + if( channelId != 0 ) + { + numerators_sv[345] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[71] += amp_sv[0]; jamp_sv[89] -= amp_sv[0]; @@ -6858,8 +7837,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 347 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] ); + if( channelId != 0 ) + { + numerators_sv[346] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[35] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[45] += cxtype( 0, 1 ) * amp_sv[0]; @@ -6878,8 +7860,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 348 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] ); + if( channelId != 0 ) + { + numerators_sv[347] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[35] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[39] += cxtype( 0, 1 ) * amp_sv[0]; @@ -6932,8 +7917,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 350 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] ); + if( channelId != 0 ) + { + numerators_sv[349] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[35] += amp_sv[0]; jamp_sv[45] -= amp_sv[0]; @@ -6948,8 +7936,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 351 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] ); + if( channelId != 0 ) + { + numerators_sv[350] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[69] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[111] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -6962,8 +7953,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 352 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] ); + if( channelId != 0 ) + { + numerators_sv[351] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[95] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[119] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -6976,8 +7970,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 353 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] ); + if( channelId != 0 ) + { + numerators_sv[352] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[65] += amp_sv[0]; jamp_sv[71] -= amp_sv[0]; @@ -6992,8 +7989,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 354 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] ); + if( channelId != 0 ) + { + numerators_sv[353] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[41] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[47] += cxtype( 0, 1 ) * amp_sv[0]; @@ -7012,8 +8012,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 355 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] ); + if( channelId != 0 ) + { + numerators_sv[354] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[33] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[35] += cxtype( 0, 1 ) * amp_sv[0]; @@ -7066,8 +8069,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 357 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] ); + if( channelId != 0 ) + { + numerators_sv[356] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[41] += amp_sv[0]; jamp_sv[47] -= amp_sv[0]; @@ -7082,8 +8088,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 358 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] ); + if( channelId != 0 ) + { + numerators_sv[357] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[93] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[117] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -7387,8 +8396,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 370 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] ); + if( channelId != 0 ) + { + numerators_sv[369] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[40] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[41] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -7401,8 +8413,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 371 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] ); + if( channelId != 0 ) + { + numerators_sv[370] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[46] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[47] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -7416,8 +8431,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 372 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] ); + if( channelId != 0 ) + { + numerators_sv[371] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[24] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[30] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -7436,8 +8454,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 373 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] ); + if( channelId != 0 ) + { + numerators_sv[372] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[42] += amp_sv[0]; jamp_sv[44] -= amp_sv[0]; @@ -7452,8 +8473,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 374 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] ); + if( channelId != 0 ) + { + numerators_sv[373] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[25] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[31] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -7472,8 +8496,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 375 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] ); + if( channelId != 0 ) + { + numerators_sv[374] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[36] += amp_sv[0]; jamp_sv[38] -= amp_sv[0]; @@ -7524,8 +8551,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 377 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] ); + if( channelId != 0 ) + { + numerators_sv[376] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[25] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[31] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -7538,8 +8568,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 378 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] ); + if( channelId != 0 ) + { + numerators_sv[377] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[42] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[44] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -7552,8 +8585,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 379 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] ); + if( channelId != 0 ) + { + numerators_sv[378] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[25] += amp_sv[0]; jamp_sv[31] -= amp_sv[0]; @@ -7568,8 +8604,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 380 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] ); + if( channelId != 0 ) + { + numerators_sv[379] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[24] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[30] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -7582,8 +8621,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 381 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] ); + if( channelId != 0 ) + { + numerators_sv[380] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[36] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[38] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -7596,8 +8638,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 382 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] ); + if( channelId != 0 ) + { + numerators_sv[381] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[24] += amp_sv[0]; jamp_sv[30] -= amp_sv[0]; @@ -7612,8 +8657,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 383 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] ); + if( channelId != 0 ) + { + numerators_sv[382] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[24] += amp_sv[0]; jamp_sv[25] -= amp_sv[0]; @@ -7628,8 +8676,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 384 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] ); + if( channelId != 0 ) + { + numerators_sv[383] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[40] += amp_sv[0]; jamp_sv[41] -= amp_sv[0]; @@ -7644,8 +8695,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 385 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] ); + if( channelId != 0 ) + { + numerators_sv[384] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[24] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[25] += cxtype( 0, 1 ) * amp_sv[0]; @@ -7664,8 +8718,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 386 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] ); + if( channelId != 0 ) + { + numerators_sv[385] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[11] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[53] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -7678,8 +8735,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 387 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] ); + if( channelId != 0 ) + { + numerators_sv[386] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[9] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[51] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -7692,8 +8752,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 388 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] ); + if( channelId != 0 ) + { + numerators_sv[387] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[9] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[51] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -7712,8 +8775,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 389 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] ); + if( channelId != 0 ) + { + numerators_sv[388] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[9] += amp_sv[0]; jamp_sv[51] -= amp_sv[0]; @@ -7728,8 +8794,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 390 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] ); + if( channelId != 0 ) + { + numerators_sv[389] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[11] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[53] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -7748,8 +8817,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 391 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] ); + if( channelId != 0 ) + { + numerators_sv[390] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[11] += amp_sv[0]; jamp_sv[53] -= amp_sv[0]; @@ -7798,8 +8870,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 393 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] ); + if( channelId != 0 ) + { + numerators_sv[392] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[91] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[94] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -7812,8 +8887,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 394 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] ); + if( channelId != 0 ) + { + numerators_sv[393] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[75] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[85] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -7826,8 +8904,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 395 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] ); + if( channelId != 0 ) + { + numerators_sv[394] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[75] += amp_sv[0]; jamp_sv[85] -= amp_sv[0]; @@ -7842,8 +8923,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 396 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] ); + if( channelId != 0 ) + { + numerators_sv[395] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[115] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[118] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -7856,8 +8940,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 397 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] ); + if( channelId != 0 ) + { + numerators_sv[396] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[99] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[109] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -7870,8 +8957,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 398 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] ); + if( channelId != 0 ) + { + numerators_sv[397] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[99] += amp_sv[0]; jamp_sv[109] -= amp_sv[0]; @@ -7886,8 +8976,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 399 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] ); + if( channelId != 0 ) + { + numerators_sv[398] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[91] += amp_sv[0]; jamp_sv[94] -= amp_sv[0]; @@ -7902,8 +8995,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 400 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] ); + if( channelId != 0 ) + { + numerators_sv[399] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[9] += amp_sv[0]; jamp_sv[11] -= amp_sv[0]; @@ -7918,8 +9014,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 401 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] ); + if( channelId != 0 ) + { + numerators_sv[400] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[9] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[11] += cxtype( 0, 1 ) * amp_sv[0]; @@ -7938,8 +9037,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 402 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] ); + if( channelId != 0 ) + { + numerators_sv[401] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[10] += amp_sv[0]; jamp_sv[11] -= amp_sv[0]; @@ -7954,8 +9056,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 403 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] ); + if( channelId != 0 ) + { + numerators_sv[402] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[6] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[8] += cxtype( 0, 1 ) * amp_sv[0]; @@ -7974,8 +9079,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 404 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] ); + if( channelId != 0 ) + { + numerators_sv[403] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[40] += amp_sv[0]; jamp_sv[41] -= amp_sv[0]; @@ -7990,8 +9098,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 405 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] ); + if( channelId != 0 ) + { + numerators_sv[404] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[40] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[41] += cxtype( 0, 1 ) * amp_sv[0]; @@ -8010,8 +9121,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 406 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] ); + if( channelId != 0 ) + { + numerators_sv[405] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[36] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[38] += cxtype( 0, 1 ) * amp_sv[0]; @@ -8030,8 +9144,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 407 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] ); + if( channelId != 0 ) + { + numerators_sv[406] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[10] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[11] += cxtype( 0, 1 ) * amp_sv[0]; @@ -8108,8 +9225,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 409 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] ); + if( channelId != 0 ) + { + numerators_sv[408] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[6] += amp_sv[0]; jamp_sv[8] -= amp_sv[0]; @@ -8136,8 +9256,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 410 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] ); + if( channelId != 0 ) + { + numerators_sv[409] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[6] += amp_sv[0]; jamp_sv[8] -= amp_sv[0]; @@ -8164,8 +9287,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 411 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] ); + if( channelId != 0 ) + { + numerators_sv[410] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[10] -= amp_sv[0]; jamp_sv[11] += amp_sv[0]; @@ -8192,8 +9318,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 412 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] ); + if( channelId != 0 ) + { + numerators_sv[411] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[98] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[99] += cxtype( 0, 1 ) * amp_sv[0]; @@ -8212,8 +9341,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 413 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] ); + if( channelId != 0 ) + { + numerators_sv[412] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[98] += amp_sv[0]; jamp_sv[99] -= amp_sv[0]; @@ -8228,8 +9360,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 414 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] ); + if( channelId != 0 ) + { + numerators_sv[413] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[106] += amp_sv[0]; jamp_sv[107] -= amp_sv[0]; @@ -8244,8 +9379,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 415 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] ); + if( channelId != 0 ) + { + numerators_sv[414] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[6] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[8] += cxtype( 0, 1 ) * amp_sv[0]; @@ -8264,8 +9402,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 416 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] ); + if( channelId != 0 ) + { + numerators_sv[415] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[6] += amp_sv[0]; jamp_sv[8] -= amp_sv[0]; @@ -8280,8 +9421,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 417 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] ); + if( channelId != 0 ) + { + numerators_sv[416] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[36] += amp_sv[0]; jamp_sv[38] -= amp_sv[0]; @@ -8296,8 +9440,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 418 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] ); + if( channelId != 0 ) + { + numerators_sv[417] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[8] += amp_sv[0]; jamp_sv[9] -= amp_sv[0]; @@ -8312,8 +9459,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 419 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] ); + if( channelId != 0 ) + { + numerators_sv[418] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[7] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[8] += cxtype( 0, 1 ) * amp_sv[0]; @@ -8332,8 +9482,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 420 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] ); + if( channelId != 0 ) + { + numerators_sv[419] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[46] += amp_sv[0]; jamp_sv[47] -= amp_sv[0]; @@ -8348,8 +9501,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 421 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] ); + if( channelId != 0 ) + { + numerators_sv[420] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[46] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[47] += cxtype( 0, 1 ) * amp_sv[0]; @@ -8368,8 +9524,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 422 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] ); + if( channelId != 0 ) + { + numerators_sv[421] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[42] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[44] += cxtype( 0, 1 ) * amp_sv[0]; @@ -8388,8 +9547,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 423 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] ); + if( channelId != 0 ) + { + numerators_sv[422] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[8] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[9] += cxtype( 0, 1 ) * amp_sv[0]; @@ -8466,8 +9628,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 425 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] ); + if( channelId != 0 ) + { + numerators_sv[424] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[7] += amp_sv[0]; jamp_sv[10] -= amp_sv[0]; @@ -8494,8 +9659,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 426 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] ); + if( channelId != 0 ) + { + numerators_sv[425] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[7] += amp_sv[0]; jamp_sv[8] -= amp_sv[0]; @@ -8522,8 +9690,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 427 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] ); + if( channelId != 0 ) + { + numerators_sv[426] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[8] -= amp_sv[0]; jamp_sv[9] += amp_sv[0]; @@ -8550,8 +9721,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 428 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] ); + if( channelId != 0 ) + { + numerators_sv[427] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[74] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[75] += cxtype( 0, 1 ) * amp_sv[0]; @@ -8570,8 +9744,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 429 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] ); + if( channelId != 0 ) + { + numerators_sv[428] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[74] += amp_sv[0]; jamp_sv[75] -= amp_sv[0]; @@ -8586,8 +9763,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 430 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] ); + if( channelId != 0 ) + { + numerators_sv[429] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[82] += amp_sv[0]; jamp_sv[83] -= amp_sv[0]; @@ -8602,8 +9782,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 431 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] ); + if( channelId != 0 ) + { + numerators_sv[430] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[7] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[10] += cxtype( 0, 1 ) * amp_sv[0]; @@ -8622,8 +9805,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 432 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] ); + if( channelId != 0 ) + { + numerators_sv[431] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[7] += amp_sv[0]; jamp_sv[10] -= amp_sv[0]; @@ -8638,8 +9824,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 433 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] ); + if( channelId != 0 ) + { + numerators_sv[432] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[42] += amp_sv[0]; jamp_sv[44] -= amp_sv[0]; @@ -8654,8 +9843,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 434 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] ); + if( channelId != 0 ) + { + numerators_sv[433] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[7] -= amp_sv[0]; jamp_sv[25] += amp_sv[0]; @@ -8682,8 +9874,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 435 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] ); + if( channelId != 0 ) + { + numerators_sv[434] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[6] -= amp_sv[0]; jamp_sv[24] += amp_sv[0]; @@ -8768,8 +9963,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 437 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] ); + if( channelId != 0 ) + { + numerators_sv[436] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[9] += amp_sv[0]; jamp_sv[24] -= amp_sv[0]; @@ -8796,8 +9994,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 438 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] ); + if( channelId != 0 ) + { + numerators_sv[437] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[8] += amp_sv[0]; jamp_sv[24] -= amp_sv[0]; @@ -8882,8 +10083,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 440 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] ); + if( channelId != 0 ) + { + numerators_sv[439] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[11] += amp_sv[0]; jamp_sv[25] -= amp_sv[0]; @@ -8910,8 +10114,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 441 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] ); + if( channelId != 0 ) + { + numerators_sv[440] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[10] += amp_sv[0]; jamp_sv[25] -= amp_sv[0]; @@ -9232,8 +10439,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 447 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] ); + if( channelId != 0 ) + { + numerators_sv[446] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[6] += amp_sv[0]; jamp_sv[7] -= amp_sv[0]; @@ -9260,8 +10470,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 448 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] ); + if( channelId != 0 ) + { + numerators_sv[447] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[6] += amp_sv[0]; jamp_sv[7] -= amp_sv[0]; @@ -9288,8 +10501,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 449 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] ); + if( channelId != 0 ) + { + numerators_sv[448] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[9] -= amp_sv[0]; jamp_sv[11] += amp_sv[0]; @@ -9316,8 +10532,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 450 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] ); + if( channelId != 0 ) + { + numerators_sv[449] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[74] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[78] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -9336,8 +10555,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 451 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] ); + if( channelId != 0 ) + { + numerators_sv[450] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[91] += amp_sv[0]; jamp_sv[92] -= amp_sv[0]; @@ -9352,8 +10574,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 452 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] ); + if( channelId != 0 ) + { + numerators_sv[451] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[82] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[83] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -9366,8 +10591,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 453 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] ); + if( channelId != 0 ) + { + numerators_sv[452] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[92] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[93] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -9380,8 +10608,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 454 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] ); + if( channelId != 0 ) + { + numerators_sv[453] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[78] += amp_sv[0]; jamp_sv[80] -= amp_sv[0]; @@ -9396,8 +10627,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 455 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] ); + if( channelId != 0 ) + { + numerators_sv[454] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[75] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[78] += cxtype( 0, 1 ) * amp_sv[0]; @@ -9450,8 +10684,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 457 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] ); + if( channelId != 0 ) + { + numerators_sv[456] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[74] += amp_sv[0]; jamp_sv[78] -= amp_sv[0]; @@ -9466,8 +10703,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 458 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] ); + if( channelId != 0 ) + { + numerators_sv[457] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[74] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[84] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -9480,8 +10720,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 459 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] ); + if( channelId != 0 ) + { + numerators_sv[458] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[78] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[80] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -9494,8 +10737,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 460 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] ); + if( channelId != 0 ) + { + numerators_sv[459] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[98] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[102] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -9514,8 +10760,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 461 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] ); + if( channelId != 0 ) + { + numerators_sv[460] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[115] += amp_sv[0]; jamp_sv[116] -= amp_sv[0]; @@ -9530,8 +10779,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 462 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] ); + if( channelId != 0 ) + { + numerators_sv[461] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[106] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[107] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -9544,8 +10796,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 463 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] ); + if( channelId != 0 ) + { + numerators_sv[462] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[116] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[117] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -9558,8 +10813,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 464 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] ); + if( channelId != 0 ) + { + numerators_sv[463] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[102] += amp_sv[0]; jamp_sv[104] -= amp_sv[0]; @@ -9574,8 +10832,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 465 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] ); + if( channelId != 0 ) + { + numerators_sv[464] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[99] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[102] += cxtype( 0, 1 ) * amp_sv[0]; @@ -9628,8 +10889,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 467 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] ); + if( channelId != 0 ) + { + numerators_sv[466] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[98] += amp_sv[0]; jamp_sv[102] -= amp_sv[0]; @@ -9644,8 +10908,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 468 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] ); + if( channelId != 0 ) + { + numerators_sv[467] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[98] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[108] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -9658,8 +10925,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 469 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] ); + if( channelId != 0 ) + { + numerators_sv[468] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[102] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[104] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -9672,8 +10942,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 470 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] ); + if( channelId != 0 ) + { + numerators_sv[469] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[7] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[25] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -9692,8 +10965,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 471 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] ); + if( channelId != 0 ) + { + numerators_sv[470] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[7] += amp_sv[0]; jamp_sv[25] -= amp_sv[0]; @@ -9708,8 +10984,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 472 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] ); + if( channelId != 0 ) + { + numerators_sv[471] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[10] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[52] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -9722,8 +11001,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 473 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] ); + if( channelId != 0 ) + { + numerators_sv[472] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[7] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[49] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -9736,8 +11018,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 474 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] ); + if( channelId != 0 ) + { + numerators_sv[473] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[10] += amp_sv[0]; jamp_sv[52] -= amp_sv[0]; @@ -9752,8 +11037,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 475 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] ); + if( channelId != 0 ) + { + numerators_sv[474] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[10] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[25] += cxtype( 0, 1 ) * amp_sv[0]; @@ -9806,8 +11094,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 477 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] ); + if( channelId != 0 ) + { + numerators_sv[476] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[6] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[24] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -9826,8 +11117,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 478 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] ); + if( channelId != 0 ) + { + numerators_sv[477] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[6] += amp_sv[0]; jamp_sv[24] -= amp_sv[0]; @@ -9842,8 +11136,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 479 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] ); + if( channelId != 0 ) + { + numerators_sv[478] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[8] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[50] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -9856,8 +11153,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 480 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] ); + if( channelId != 0 ) + { + numerators_sv[479] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[6] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[48] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -9870,8 +11170,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 481 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] ); + if( channelId != 0 ) + { + numerators_sv[480] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[8] += amp_sv[0]; jamp_sv[50] -= amp_sv[0]; @@ -9886,8 +11189,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 482 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] ); + if( channelId != 0 ) + { + numerators_sv[481] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[8] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[24] += cxtype( 0, 1 ) * amp_sv[0]; @@ -9940,8 +11246,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 484 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] ); + if( channelId != 0 ) + { + numerators_sv[483] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[91] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[92] += cxtype( 0, 1 ) * amp_sv[0]; @@ -9960,8 +11269,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 485 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] ); + if( channelId != 0 ) + { + numerators_sv[484] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[6] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[7] += cxtype( 0, 1 ) * amp_sv[0]; @@ -9980,8 +11292,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 486 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] ); + if( channelId != 0 ) + { + numerators_sv[485] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[6] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[7] += cxtype( 0, 1 ) * amp_sv[0]; @@ -10000,8 +11315,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 487 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] ); + if( channelId != 0 ) + { + numerators_sv[486] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[6] += amp_sv[0]; jamp_sv[7] -= amp_sv[0]; @@ -10016,8 +11334,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 488 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] ); + if( channelId != 0 ) + { + numerators_sv[487] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[40] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[41] += cxtype( 0, 1 ) * amp_sv[0]; @@ -10036,8 +11357,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 489 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] ); + if( channelId != 0 ) + { + numerators_sv[488] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[92] += amp_sv[0]; jamp_sv[93] -= amp_sv[0]; @@ -10179,8 +11503,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 493 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] ); + if( channelId != 0 ) + { + numerators_sv[492] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[34] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[35] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -10193,8 +11520,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 494 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] ); + if( channelId != 0 ) + { + numerators_sv[493] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[44] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[45] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -10207,8 +11537,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 495 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] ); + if( channelId != 0 ) + { + numerators_sv[494] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[26] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[30] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -10227,8 +11560,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 496 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] ); + if( channelId != 0 ) + { + numerators_sv[495] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[43] += amp_sv[0]; jamp_sv[44] -= amp_sv[0]; @@ -10243,8 +11579,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 497 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] ); + if( channelId != 0 ) + { + numerators_sv[496] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[27] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[30] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -10263,8 +11602,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 498 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] ); + if( channelId != 0 ) + { + numerators_sv[497] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[30] += amp_sv[0]; jamp_sv[32] -= amp_sv[0]; @@ -10315,8 +11657,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 500 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] ); + if( channelId != 0 ) + { + numerators_sv[499] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[27] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[37] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -10329,8 +11674,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 501 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] ); + if( channelId != 0 ) + { + numerators_sv[500] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[43] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[46] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -10343,8 +11691,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 502 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] ); + if( channelId != 0 ) + { + numerators_sv[501] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[27] += amp_sv[0]; jamp_sv[37] -= amp_sv[0]; @@ -10359,8 +11710,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 503 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] ); + if( channelId != 0 ) + { + numerators_sv[502] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[26] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[36] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -10373,8 +11727,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 504 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] ); + if( channelId != 0 ) + { + numerators_sv[503] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[30] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[32] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -10387,8 +11744,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 505 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] ); + if( channelId != 0 ) + { + numerators_sv[504] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[26] += amp_sv[0]; jamp_sv[30] -= amp_sv[0]; @@ -10403,8 +11763,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 506 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] ); + if( channelId != 0 ) + { + numerators_sv[505] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[26] += amp_sv[0]; jamp_sv[27] -= amp_sv[0]; @@ -10419,8 +11782,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 507 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] ); + if( channelId != 0 ) + { + numerators_sv[506] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[34] += amp_sv[0]; jamp_sv[35] -= amp_sv[0]; @@ -10435,8 +11801,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 508 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] ); + if( channelId != 0 ) + { + numerators_sv[507] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[26] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[27] += cxtype( 0, 1 ) * amp_sv[0]; @@ -10455,8 +11824,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 509 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] ); + if( channelId != 0 ) + { + numerators_sv[508] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[17] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[77] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -10469,8 +11841,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 510 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] ); + if( channelId != 0 ) + { + numerators_sv[509] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[15] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[75] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -10483,8 +11858,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 511 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] ); + if( channelId != 0 ) + { + numerators_sv[510] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[15] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[51] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -10503,8 +11881,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 512 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] ); + if( channelId != 0 ) + { + numerators_sv[511] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[15] += amp_sv[0]; jamp_sv[51] -= amp_sv[0]; @@ -10519,8 +11900,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 513 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] ); + if( channelId != 0 ) + { + numerators_sv[512] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[17] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[51] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -10539,8 +11923,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 514 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] ); + if( channelId != 0 ) + { + numerators_sv[513] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[17] += amp_sv[0]; jamp_sv[77] -= amp_sv[0]; @@ -10589,8 +11976,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 516 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] ); + if( channelId != 0 ) + { + numerators_sv[515] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[67] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[70] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -10603,8 +11993,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 517 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] ); + if( channelId != 0 ) + { + numerators_sv[516] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[51] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[61] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -10617,8 +12010,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 518 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] ); + if( channelId != 0 ) + { + numerators_sv[517] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[51] += amp_sv[0]; jamp_sv[61] -= amp_sv[0]; @@ -10633,8 +12029,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 519 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] ); + if( channelId != 0 ) + { + numerators_sv[518] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[109] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[112] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -10647,8 +12046,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 520 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] ); + if( channelId != 0 ) + { + numerators_sv[519] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[101] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[115] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -10661,8 +12063,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 521 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] ); + if( channelId != 0 ) + { + numerators_sv[520] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[101] += amp_sv[0]; jamp_sv[109] -= amp_sv[0]; @@ -10677,8 +12082,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 522 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] ); + if( channelId != 0 ) + { + numerators_sv[521] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[67] += amp_sv[0]; jamp_sv[70] -= amp_sv[0]; @@ -10693,8 +12101,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 523 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] ); + if( channelId != 0 ) + { + numerators_sv[522] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[15] += amp_sv[0]; jamp_sv[17] -= amp_sv[0]; @@ -10709,8 +12120,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 524 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] ); + if( channelId != 0 ) + { + numerators_sv[523] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[15] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[17] += cxtype( 0, 1 ) * amp_sv[0]; @@ -10729,8 +12143,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 525 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] ); + if( channelId != 0 ) + { + numerators_sv[524] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[16] += amp_sv[0]; jamp_sv[17] -= amp_sv[0]; @@ -10745,8 +12162,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 526 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] ); + if( channelId != 0 ) + { + numerators_sv[525] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[12] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[14] += cxtype( 0, 1 ) * amp_sv[0]; @@ -10765,8 +12185,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 527 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] ); + if( channelId != 0 ) + { + numerators_sv[526] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[34] += amp_sv[0]; jamp_sv[35] -= amp_sv[0]; @@ -10781,8 +12204,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 528 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] ); + if( channelId != 0 ) + { + numerators_sv[527] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[34] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[35] += cxtype( 0, 1 ) * amp_sv[0]; @@ -10801,8 +12227,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 529 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] ); + if( channelId != 0 ) + { + numerators_sv[528] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[30] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[32] += cxtype( 0, 1 ) * amp_sv[0]; @@ -10821,8 +12250,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 530 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] ); + if( channelId != 0 ) + { + numerators_sv[529] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[16] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[17] += cxtype( 0, 1 ) * amp_sv[0]; @@ -10899,8 +12331,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 532 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] ); + if( channelId != 0 ) + { + numerators_sv[531] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[12] += amp_sv[0]; jamp_sv[14] -= amp_sv[0]; @@ -10927,8 +12362,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 533 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] ); + if( channelId != 0 ) + { + numerators_sv[532] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[12] += amp_sv[0]; jamp_sv[14] -= amp_sv[0]; @@ -10955,8 +12393,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 534 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] ); + if( channelId != 0 ) + { + numerators_sv[533] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[16] -= amp_sv[0]; jamp_sv[17] += amp_sv[0]; @@ -10983,8 +12424,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 535 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] ); + if( channelId != 0 ) + { + numerators_sv[534] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[100] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[101] += cxtype( 0, 1 ) * amp_sv[0]; @@ -11003,8 +12447,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 536 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] ); + if( channelId != 0 ) + { + numerators_sv[535] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[100] += amp_sv[0]; jamp_sv[101] -= amp_sv[0]; @@ -11019,8 +12466,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 537 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] ); + if( channelId != 0 ) + { + numerators_sv[536] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[104] += amp_sv[0]; jamp_sv[105] -= amp_sv[0]; @@ -11035,8 +12485,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 538 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] ); + if( channelId != 0 ) + { + numerators_sv[537] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[12] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[14] += cxtype( 0, 1 ) * amp_sv[0]; @@ -11055,8 +12508,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 539 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] ); + if( channelId != 0 ) + { + numerators_sv[538] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[12] += amp_sv[0]; jamp_sv[14] -= amp_sv[0]; @@ -11071,8 +12527,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 540 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] ); + if( channelId != 0 ) + { + numerators_sv[539] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[30] += amp_sv[0]; jamp_sv[32] -= amp_sv[0]; @@ -11087,8 +12546,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 541 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] ); + if( channelId != 0 ) + { + numerators_sv[540] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[14] += amp_sv[0]; jamp_sv[15] -= amp_sv[0]; @@ -11103,8 +12565,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 542 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] ); + if( channelId != 0 ) + { + numerators_sv[541] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[13] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[14] += cxtype( 0, 1 ) * amp_sv[0]; @@ -11123,8 +12588,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 543 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] ); + if( channelId != 0 ) + { + numerators_sv[542] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[44] += amp_sv[0]; jamp_sv[45] -= amp_sv[0]; @@ -11139,8 +12607,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 544 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] ); + if( channelId != 0 ) + { + numerators_sv[543] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[44] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[45] += cxtype( 0, 1 ) * amp_sv[0]; @@ -11159,8 +12630,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 545 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] ); + if( channelId != 0 ) + { + numerators_sv[544] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[43] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[44] += cxtype( 0, 1 ) * amp_sv[0]; @@ -11179,8 +12653,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 546 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] ); + if( channelId != 0 ) + { + numerators_sv[545] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[14] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[15] += cxtype( 0, 1 ) * amp_sv[0]; @@ -11257,8 +12734,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 548 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] ); + if( channelId != 0 ) + { + numerators_sv[547] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[13] += amp_sv[0]; jamp_sv[16] -= amp_sv[0]; @@ -11285,8 +12765,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 549 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] ); + if( channelId != 0 ) + { + numerators_sv[548] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[13] += amp_sv[0]; jamp_sv[14] -= amp_sv[0]; @@ -11313,8 +12796,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 550 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] ); + if( channelId != 0 ) + { + numerators_sv[549] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[14] -= amp_sv[0]; jamp_sv[15] += amp_sv[0]; @@ -11341,8 +12827,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 551 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] ); + if( channelId != 0 ) + { + numerators_sv[550] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[50] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[51] += cxtype( 0, 1 ) * amp_sv[0]; @@ -11361,8 +12850,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 552 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] ); + if( channelId != 0 ) + { + numerators_sv[551] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[50] += amp_sv[0]; jamp_sv[51] -= amp_sv[0]; @@ -11377,8 +12869,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 553 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] ); + if( channelId != 0 ) + { + numerators_sv[552] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[58] += amp_sv[0]; jamp_sv[59] -= amp_sv[0]; @@ -11393,8 +12888,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 554 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] ); + if( channelId != 0 ) + { + numerators_sv[553] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[13] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[16] += cxtype( 0, 1 ) * amp_sv[0]; @@ -11413,8 +12911,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 555 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] ); + if( channelId != 0 ) + { + numerators_sv[554] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[13] += amp_sv[0]; jamp_sv[16] -= amp_sv[0]; @@ -11429,8 +12930,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 556 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] ); + if( channelId != 0 ) + { + numerators_sv[555] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[43] += amp_sv[0]; jamp_sv[46] -= amp_sv[0]; @@ -11445,8 +12949,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 557 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] ); + if( channelId != 0 ) + { + numerators_sv[556] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[13] -= amp_sv[0]; jamp_sv[27] += amp_sv[0]; @@ -11473,8 +12980,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 558 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] ); + if( channelId != 0 ) + { + numerators_sv[557] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[12] -= amp_sv[0]; jamp_sv[26] += amp_sv[0]; @@ -11559,8 +13069,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 560 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] ); + if( channelId != 0 ) + { + numerators_sv[559] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[15] += amp_sv[0]; jamp_sv[26] -= amp_sv[0]; @@ -11587,8 +13100,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 561 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] ); + if( channelId != 0 ) + { + numerators_sv[560] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[14] += amp_sv[0]; jamp_sv[26] -= amp_sv[0]; @@ -11673,8 +13189,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 563 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] ); + if( channelId != 0 ) + { + numerators_sv[562] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[17] += amp_sv[0]; jamp_sv[27] -= amp_sv[0]; @@ -11701,8 +13220,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 564 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] ); + if( channelId != 0 ) + { + numerators_sv[563] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[16] += amp_sv[0]; jamp_sv[27] -= amp_sv[0]; @@ -12023,8 +13545,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 570 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] ); + if( channelId != 0 ) + { + numerators_sv[569] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[12] += amp_sv[0]; jamp_sv[13] -= amp_sv[0]; @@ -12051,8 +13576,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 571 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] ); + if( channelId != 0 ) + { + numerators_sv[570] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[12] += amp_sv[0]; jamp_sv[13] -= amp_sv[0]; @@ -12079,8 +13607,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 572 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] ); + if( channelId != 0 ) + { + numerators_sv[571] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[15] -= amp_sv[0]; jamp_sv[17] += amp_sv[0]; @@ -12107,8 +13638,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 573 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] ); + if( channelId != 0 ) + { + numerators_sv[572] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[50] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[54] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -12127,8 +13661,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 574 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] ); + if( channelId != 0 ) + { + numerators_sv[573] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[67] += amp_sv[0]; jamp_sv[68] -= amp_sv[0]; @@ -12143,8 +13680,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 575 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] ); + if( channelId != 0 ) + { + numerators_sv[574] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[58] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[59] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -12157,8 +13697,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 576 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] ); + if( channelId != 0 ) + { + numerators_sv[575] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[68] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[69] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -12171,8 +13714,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 577 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] ); + if( channelId != 0 ) + { + numerators_sv[576] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[54] += amp_sv[0]; jamp_sv[56] -= amp_sv[0]; @@ -12187,8 +13733,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 578 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] ); + if( channelId != 0 ) + { + numerators_sv[577] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[51] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[54] += cxtype( 0, 1 ) * amp_sv[0]; @@ -12241,8 +13790,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 580 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] ); + if( channelId != 0 ) + { + numerators_sv[579] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[50] += amp_sv[0]; jamp_sv[54] -= amp_sv[0]; @@ -12257,8 +13809,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 581 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] ); + if( channelId != 0 ) + { + numerators_sv[580] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[50] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[60] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -12271,8 +13826,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 582 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] ); + if( channelId != 0 ) + { + numerators_sv[581] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[54] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[56] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -12285,8 +13843,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 583 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] ); + if( channelId != 0 ) + { + numerators_sv[582] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[100] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[103] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -12305,8 +13866,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 584 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] ); + if( channelId != 0 ) + { + numerators_sv[583] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[109] += amp_sv[0]; jamp_sv[110] -= amp_sv[0]; @@ -12321,8 +13885,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 585 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] ); + if( channelId != 0 ) + { + numerators_sv[584] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[104] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[105] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -12335,8 +13902,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 586 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] ); + if( channelId != 0 ) + { + numerators_sv[585] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[110] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[111] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -12349,8 +13919,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 587 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] ); + if( channelId != 0 ) + { + numerators_sv[586] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[103] += amp_sv[0]; jamp_sv[104] -= amp_sv[0]; @@ -12365,8 +13938,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 588 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] ); + if( channelId != 0 ) + { + numerators_sv[587] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[101] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[103] += cxtype( 0, 1 ) * amp_sv[0]; @@ -12419,8 +13995,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 590 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] ); + if( channelId != 0 ) + { + numerators_sv[589] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[100] += amp_sv[0]; jamp_sv[103] -= amp_sv[0]; @@ -12435,8 +14014,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 591 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] ); + if( channelId != 0 ) + { + numerators_sv[590] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[100] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[114] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -12449,8 +14031,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 592 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] ); + if( channelId != 0 ) + { + numerators_sv[591] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[103] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[106] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -12463,8 +14048,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 593 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] ); + if( channelId != 0 ) + { + numerators_sv[592] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[13] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[27] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -12483,8 +14071,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 594 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] ); + if( channelId != 0 ) + { + numerators_sv[593] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[13] += amp_sv[0]; jamp_sv[27] -= amp_sv[0]; @@ -12499,8 +14090,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 595 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] ); + if( channelId != 0 ) + { + numerators_sv[594] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[16] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[76] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -12513,8 +14107,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 596 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] ); + if( channelId != 0 ) + { + numerators_sv[595] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[13] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[73] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -12527,8 +14124,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 597 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] ); + if( channelId != 0 ) + { + numerators_sv[596] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[16] += amp_sv[0]; jamp_sv[76] -= amp_sv[0]; @@ -12543,8 +14143,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 598 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] ); + if( channelId != 0 ) + { + numerators_sv[597] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[16] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[27] += cxtype( 0, 1 ) * amp_sv[0]; @@ -12597,8 +14200,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 600 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] ); + if( channelId != 0 ) + { + numerators_sv[599] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[12] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[26] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -12617,8 +14223,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 601 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] ); + if( channelId != 0 ) + { + numerators_sv[600] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[12] += amp_sv[0]; jamp_sv[26] -= amp_sv[0]; @@ -12633,8 +14242,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 602 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] ); + if( channelId != 0 ) + { + numerators_sv[601] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[14] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[74] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -12647,8 +14259,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 603 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] ); + if( channelId != 0 ) + { + numerators_sv[602] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[12] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[72] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -12661,8 +14276,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 604 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] ); + if( channelId != 0 ) + { + numerators_sv[603] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[14] += amp_sv[0]; jamp_sv[50] -= amp_sv[0]; @@ -12677,8 +14295,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 605 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] ); + if( channelId != 0 ) + { + numerators_sv[604] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[14] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[26] += cxtype( 0, 1 ) * amp_sv[0]; @@ -12731,8 +14352,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 607 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] ); + if( channelId != 0 ) + { + numerators_sv[606] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[67] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[68] += cxtype( 0, 1 ) * amp_sv[0]; @@ -12751,8 +14375,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 608 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] ); + if( channelId != 0 ) + { + numerators_sv[607] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[12] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[13] += cxtype( 0, 1 ) * amp_sv[0]; @@ -12771,8 +14398,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 609 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] ); + if( channelId != 0 ) + { + numerators_sv[608] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[12] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[13] += cxtype( 0, 1 ) * amp_sv[0]; @@ -12791,8 +14421,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 610 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] ); + if( channelId != 0 ) + { + numerators_sv[609] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[12] += amp_sv[0]; jamp_sv[13] -= amp_sv[0]; @@ -12807,8 +14440,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 611 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] ); + if( channelId != 0 ) + { + numerators_sv[610] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[34] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[35] += cxtype( 0, 1 ) * amp_sv[0]; @@ -12827,8 +14463,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 612 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] ); + if( channelId != 0 ) + { + numerators_sv[611] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[68] += amp_sv[0]; jamp_sv[69] -= amp_sv[0]; @@ -12970,8 +14609,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 616 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] ); + if( channelId != 0 ) + { + numerators_sv[615] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[32] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[33] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -12984,8 +14626,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 617 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] ); + if( channelId != 0 ) + { + numerators_sv[616] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[38] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[39] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -12998,8 +14643,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 618 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] ); + if( channelId != 0 ) + { + numerators_sv[617] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[28] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[31] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -13018,8 +14666,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 619 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] ); + if( channelId != 0 ) + { + numerators_sv[618] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[37] += amp_sv[0]; jamp_sv[38] -= amp_sv[0]; @@ -13034,8 +14685,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 620 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] ); + if( channelId != 0 ) + { + numerators_sv[619] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[29] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[31] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -13054,8 +14708,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 621 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] ); + if( channelId != 0 ) + { + numerators_sv[620] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[31] += amp_sv[0]; jamp_sv[32] -= amp_sv[0]; @@ -13106,8 +14763,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 623 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] ); + if( channelId != 0 ) + { + numerators_sv[622] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[29] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[43] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -13120,8 +14780,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 624 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] ); + if( channelId != 0 ) + { + numerators_sv[623] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[37] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[40] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -13134,8 +14797,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 625 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] ); + if( channelId != 0 ) + { + numerators_sv[624] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[29] += amp_sv[0]; jamp_sv[37] -= amp_sv[0]; @@ -13150,8 +14816,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 626 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] ); + if( channelId != 0 ) + { + numerators_sv[625] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[28] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[42] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -13164,8 +14833,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 627 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] ); + if( channelId != 0 ) + { + numerators_sv[626] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[31] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[34] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -13178,8 +14850,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 628 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] ); + if( channelId != 0 ) + { + numerators_sv[627] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[28] += amp_sv[0]; jamp_sv[31] -= amp_sv[0]; @@ -13194,8 +14869,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 629 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] ); + if( channelId != 0 ) + { + numerators_sv[628] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[28] += amp_sv[0]; jamp_sv[29] -= amp_sv[0]; @@ -13210,8 +14888,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 630 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] ); + if( channelId != 0 ) + { + numerators_sv[629] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[32] += amp_sv[0]; jamp_sv[33] -= amp_sv[0]; @@ -13226,8 +14907,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 631 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] ); + if( channelId != 0 ) + { + numerators_sv[630] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[28] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[29] += cxtype( 0, 1 ) * amp_sv[0]; @@ -13246,8 +14930,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 632 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] ); + if( channelId != 0 ) + { + numerators_sv[631] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[23] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[101] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -13260,8 +14947,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 633 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] ); + if( channelId != 0 ) + { + numerators_sv[632] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[21] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[99] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -13274,8 +14964,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 634 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] ); + if( channelId != 0 ) + { + numerators_sv[633] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[21] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[53] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -13294,8 +14987,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 635 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] ); + if( channelId != 0 ) + { + numerators_sv[634] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[21] += amp_sv[0]; jamp_sv[53] -= amp_sv[0]; @@ -13310,8 +15006,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 636 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] ); + if( channelId != 0 ) + { + numerators_sv[635] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[23] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[53] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -13330,8 +15029,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 637 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] ); + if( channelId != 0 ) + { + numerators_sv[636] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[23] += amp_sv[0]; jamp_sv[77] -= amp_sv[0]; @@ -13380,8 +15082,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 639 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] ); + if( channelId != 0 ) + { + numerators_sv[638] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[61] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[64] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -13394,8 +15099,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 640 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] ); + if( channelId != 0 ) + { + numerators_sv[639] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[53] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[67] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -13408,8 +15116,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 641 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] ); + if( channelId != 0 ) + { + numerators_sv[640] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[53] += amp_sv[0]; jamp_sv[61] -= amp_sv[0]; @@ -13424,8 +15135,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 642 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] ); + if( channelId != 0 ) + { + numerators_sv[641] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[85] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[88] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -13438,8 +15152,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 643 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] ); + if( channelId != 0 ) + { + numerators_sv[642] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[77] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[91] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -13452,8 +15169,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 644 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] ); + if( channelId != 0 ) + { + numerators_sv[643] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[77] += amp_sv[0]; jamp_sv[85] -= amp_sv[0]; @@ -13468,8 +15188,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 645 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] ); + if( channelId != 0 ) + { + numerators_sv[644] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[61] += amp_sv[0]; jamp_sv[64] -= amp_sv[0]; @@ -13484,8 +15207,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 646 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] ); + if( channelId != 0 ) + { + numerators_sv[645] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[21] += amp_sv[0]; jamp_sv[23] -= amp_sv[0]; @@ -13500,8 +15226,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 647 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] ); + if( channelId != 0 ) + { + numerators_sv[646] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[21] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[23] += cxtype( 0, 1 ) * amp_sv[0]; @@ -13520,8 +15249,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 648 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] ); + if( channelId != 0 ) + { + numerators_sv[647] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[22] += amp_sv[0]; jamp_sv[23] -= amp_sv[0]; @@ -13536,8 +15268,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 649 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] ); + if( channelId != 0 ) + { + numerators_sv[648] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[18] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[20] += cxtype( 0, 1 ) * amp_sv[0]; @@ -13556,8 +15291,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 650 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] ); + if( channelId != 0 ) + { + numerators_sv[649] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[32] += amp_sv[0]; jamp_sv[33] -= amp_sv[0]; @@ -13572,8 +15310,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 651 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] ); + if( channelId != 0 ) + { + numerators_sv[650] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[32] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[33] += cxtype( 0, 1 ) * amp_sv[0]; @@ -13592,8 +15333,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 652 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] ); + if( channelId != 0 ) + { + numerators_sv[651] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[31] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[32] += cxtype( 0, 1 ) * amp_sv[0]; @@ -13612,8 +15356,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 653 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] ); + if( channelId != 0 ) + { + numerators_sv[652] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[22] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[23] += cxtype( 0, 1 ) * amp_sv[0]; @@ -13690,8 +15437,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 655 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] ); + if( channelId != 0 ) + { + numerators_sv[654] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[18] += amp_sv[0]; jamp_sv[20] -= amp_sv[0]; @@ -13718,8 +15468,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 656 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] ); + if( channelId != 0 ) + { + numerators_sv[655] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[18] += amp_sv[0]; jamp_sv[20] -= amp_sv[0]; @@ -13746,8 +15499,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 657 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] ); + if( channelId != 0 ) + { + numerators_sv[656] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[22] -= amp_sv[0]; jamp_sv[23] += amp_sv[0]; @@ -13774,8 +15530,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 658 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] ); + if( channelId != 0 ) + { + numerators_sv[657] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[76] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[77] += cxtype( 0, 1 ) * amp_sv[0]; @@ -13794,8 +15553,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 659 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] ); + if( channelId != 0 ) + { + numerators_sv[658] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[76] += amp_sv[0]; jamp_sv[77] -= amp_sv[0]; @@ -13810,8 +15572,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 660 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] ); + if( channelId != 0 ) + { + numerators_sv[659] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[80] += amp_sv[0]; jamp_sv[81] -= amp_sv[0]; @@ -13826,8 +15591,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 661 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] ); + if( channelId != 0 ) + { + numerators_sv[660] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[18] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[20] += cxtype( 0, 1 ) * amp_sv[0]; @@ -13846,8 +15614,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 662 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] ); + if( channelId != 0 ) + { + numerators_sv[661] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[18] += amp_sv[0]; jamp_sv[20] -= amp_sv[0]; @@ -13862,8 +15633,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 663 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] ); + if( channelId != 0 ) + { + numerators_sv[662] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[31] += amp_sv[0]; jamp_sv[34] -= amp_sv[0]; @@ -13878,8 +15652,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 664 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] ); + if( channelId != 0 ) + { + numerators_sv[663] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[20] += amp_sv[0]; jamp_sv[21] -= amp_sv[0]; @@ -13894,8 +15671,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 665 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] ); + if( channelId != 0 ) + { + numerators_sv[664] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[19] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[20] += cxtype( 0, 1 ) * amp_sv[0]; @@ -13914,8 +15694,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 666 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] ); + if( channelId != 0 ) + { + numerators_sv[665] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[38] += amp_sv[0]; jamp_sv[39] -= amp_sv[0]; @@ -13930,8 +15713,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 667 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] ); + if( channelId != 0 ) + { + numerators_sv[666] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[38] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[39] += cxtype( 0, 1 ) * amp_sv[0]; @@ -13950,8 +15736,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 668 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] ); + if( channelId != 0 ) + { + numerators_sv[667] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[37] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[38] += cxtype( 0, 1 ) * amp_sv[0]; @@ -13970,8 +15759,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 669 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] ); + if( channelId != 0 ) + { + numerators_sv[668] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[20] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[21] += cxtype( 0, 1 ) * amp_sv[0]; @@ -14048,8 +15840,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 671 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] ); + if( channelId != 0 ) + { + numerators_sv[670] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[19] += amp_sv[0]; jamp_sv[22] -= amp_sv[0]; @@ -14076,8 +15871,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 672 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] ); + if( channelId != 0 ) + { + numerators_sv[671] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[19] += amp_sv[0]; jamp_sv[20] -= amp_sv[0]; @@ -14104,8 +15902,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 673 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] ); + if( channelId != 0 ) + { + numerators_sv[672] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[20] -= amp_sv[0]; jamp_sv[21] += amp_sv[0]; @@ -14132,8 +15933,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 674 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] ); + if( channelId != 0 ) + { + numerators_sv[673] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[52] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[53] += cxtype( 0, 1 ) * amp_sv[0]; @@ -14152,8 +15956,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 675 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] ); + if( channelId != 0 ) + { + numerators_sv[674] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[52] += amp_sv[0]; jamp_sv[53] -= amp_sv[0]; @@ -14168,8 +15975,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 676 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] ); + if( channelId != 0 ) + { + numerators_sv[675] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[56] += amp_sv[0]; jamp_sv[57] -= amp_sv[0]; @@ -14184,8 +15994,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 677 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] ); + if( channelId != 0 ) + { + numerators_sv[676] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[19] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[22] += cxtype( 0, 1 ) * amp_sv[0]; @@ -14204,8 +16017,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 678 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] ); + if( channelId != 0 ) + { + numerators_sv[677] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[19] += amp_sv[0]; jamp_sv[22] -= amp_sv[0]; @@ -14220,8 +16036,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 679 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] ); + if( channelId != 0 ) + { + numerators_sv[678] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[37] += amp_sv[0]; jamp_sv[40] -= amp_sv[0]; @@ -14236,8 +16055,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 680 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] ); + if( channelId != 0 ) + { + numerators_sv[679] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[19] -= amp_sv[0]; jamp_sv[29] += amp_sv[0]; @@ -14264,8 +16086,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 681 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] ); + if( channelId != 0 ) + { + numerators_sv[680] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[18] -= amp_sv[0]; jamp_sv[28] += amp_sv[0]; @@ -14350,8 +16175,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 683 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] ); + if( channelId != 0 ) + { + numerators_sv[682] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[21] += amp_sv[0]; jamp_sv[28] -= amp_sv[0]; @@ -14378,8 +16206,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 684 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] ); + if( channelId != 0 ) + { + numerators_sv[683] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[20] += amp_sv[0]; jamp_sv[28] -= amp_sv[0]; @@ -14464,8 +16295,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 686 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] ); + if( channelId != 0 ) + { + numerators_sv[685] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[23] += amp_sv[0]; jamp_sv[29] -= amp_sv[0]; @@ -14492,8 +16326,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 687 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] ); + if( channelId != 0 ) + { + numerators_sv[686] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[22] += amp_sv[0]; jamp_sv[29] -= amp_sv[0]; @@ -14814,8 +16651,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 693 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] ); + if( channelId != 0 ) + { + numerators_sv[692] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[18] += amp_sv[0]; jamp_sv[19] -= amp_sv[0]; @@ -14842,8 +16682,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 694 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] ); + if( channelId != 0 ) + { + numerators_sv[693] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[18] += amp_sv[0]; jamp_sv[19] -= amp_sv[0]; @@ -14870,8 +16713,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 695 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] ); + if( channelId != 0 ) + { + numerators_sv[694] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[21] -= amp_sv[0]; jamp_sv[23] += amp_sv[0]; @@ -14898,8 +16744,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 696 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] ); + if( channelId != 0 ) + { + numerators_sv[695] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[52] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[55] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -14918,8 +16767,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 697 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] ); + if( channelId != 0 ) + { + numerators_sv[696] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[61] += amp_sv[0]; jamp_sv[62] -= amp_sv[0]; @@ -14934,8 +16786,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 698 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] ); + if( channelId != 0 ) + { + numerators_sv[697] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[56] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[57] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -14948,8 +16803,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 699 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] ); + if( channelId != 0 ) + { + numerators_sv[698] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[62] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[63] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -14962,8 +16820,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 700 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] ); + if( channelId != 0 ) + { + numerators_sv[699] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[55] += amp_sv[0]; jamp_sv[56] -= amp_sv[0]; @@ -14978,8 +16839,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 701 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] ); + if( channelId != 0 ) + { + numerators_sv[700] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[53] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[55] += cxtype( 0, 1 ) * amp_sv[0]; @@ -15032,8 +16896,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 703 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] ); + if( channelId != 0 ) + { + numerators_sv[702] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[52] += amp_sv[0]; jamp_sv[55] -= amp_sv[0]; @@ -15048,8 +16915,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 704 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] ); + if( channelId != 0 ) + { + numerators_sv[703] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[52] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[66] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -15062,8 +16932,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 705 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] ); + if( channelId != 0 ) + { + numerators_sv[704] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[55] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[58] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -15076,8 +16949,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 706 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] ); + if( channelId != 0 ) + { + numerators_sv[705] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[76] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[79] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -15096,8 +16972,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 707 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] ); + if( channelId != 0 ) + { + numerators_sv[706] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[85] += amp_sv[0]; jamp_sv[86] -= amp_sv[0]; @@ -15112,8 +16991,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 708 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] ); + if( channelId != 0 ) + { + numerators_sv[707] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[80] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[81] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -15126,8 +17008,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 709 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] ); + if( channelId != 0 ) + { + numerators_sv[708] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[86] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[87] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -15140,8 +17025,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 710 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] ); + if( channelId != 0 ) + { + numerators_sv[709] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[79] += amp_sv[0]; jamp_sv[80] -= amp_sv[0]; @@ -15156,8 +17044,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 711 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] ); + if( channelId != 0 ) + { + numerators_sv[710] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[77] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[79] += cxtype( 0, 1 ) * amp_sv[0]; @@ -15210,8 +17101,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 713 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] ); + if( channelId != 0 ) + { + numerators_sv[712] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[76] += amp_sv[0]; jamp_sv[79] -= amp_sv[0]; @@ -15226,8 +17120,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 714 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] ); + if( channelId != 0 ) + { + numerators_sv[713] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[76] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[90] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -15240,8 +17137,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 715 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] ); + if( channelId != 0 ) + { + numerators_sv[714] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[79] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[82] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -15254,8 +17154,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 716 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] ); + if( channelId != 0 ) + { + numerators_sv[715] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[19] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[29] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -15274,8 +17177,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 717 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] ); + if( channelId != 0 ) + { + numerators_sv[716] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[19] += amp_sv[0]; jamp_sv[29] -= amp_sv[0]; @@ -15290,8 +17196,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 718 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] ); + if( channelId != 0 ) + { + numerators_sv[717] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[22] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[100] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -15304,8 +17213,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 719 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] ); + if( channelId != 0 ) + { + numerators_sv[718] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[19] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[97] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -15318,8 +17230,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 720 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] ); + if( channelId != 0 ) + { + numerators_sv[719] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[22] += amp_sv[0]; jamp_sv[76] -= amp_sv[0]; @@ -15334,8 +17249,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 721 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] ); + if( channelId != 0 ) + { + numerators_sv[720] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[22] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[29] += cxtype( 0, 1 ) * amp_sv[0]; @@ -15388,8 +17306,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 723 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] ); + if( channelId != 0 ) + { + numerators_sv[722] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[18] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[28] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -15408,8 +17329,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 724 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] ); + if( channelId != 0 ) + { + numerators_sv[723] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[18] += amp_sv[0]; jamp_sv[28] -= amp_sv[0]; @@ -15424,8 +17348,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 725 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] ); + if( channelId != 0 ) + { + numerators_sv[724] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[20] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[98] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -15438,8 +17365,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 726 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] ); + if( channelId != 0 ) + { + numerators_sv[725] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[18] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[96] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -15452,8 +17382,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 727 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] ); + if( channelId != 0 ) + { + numerators_sv[726] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[20] += amp_sv[0]; jamp_sv[52] -= amp_sv[0]; @@ -15468,8 +17401,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 728 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] ); + if( channelId != 0 ) + { + numerators_sv[727] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[20] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[28] += cxtype( 0, 1 ) * amp_sv[0]; @@ -15522,8 +17458,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 730 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] ); + if( channelId != 0 ) + { + numerators_sv[729] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[61] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[62] += cxtype( 0, 1 ) * amp_sv[0]; @@ -15542,8 +17481,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 731 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] ); + if( channelId != 0 ) + { + numerators_sv[730] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[18] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[19] += cxtype( 0, 1 ) * amp_sv[0]; @@ -15562,8 +17504,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 732 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] ); + if( channelId != 0 ) + { + numerators_sv[731] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[18] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[19] += cxtype( 0, 1 ) * amp_sv[0]; @@ -15582,8 +17527,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 733 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] ); + if( channelId != 0 ) + { + numerators_sv[732] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[18] += amp_sv[0]; jamp_sv[19] -= amp_sv[0]; @@ -15598,8 +17546,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 734 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] ); + if( channelId != 0 ) + { + numerators_sv[733] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[32] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[33] += cxtype( 0, 1 ) * amp_sv[0]; @@ -15618,8 +17569,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 735 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] ); + if( channelId != 0 ) + { + numerators_sv[734] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[62] += amp_sv[0]; jamp_sv[63] -= amp_sv[0]; @@ -15760,8 +17714,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 739 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] ); + if( channelId != 0 ) + { + numerators_sv[738] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[29] -= amp_sv[0]; @@ -15773,8 +17730,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 740 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] ); + if( channelId != 0 ) + { + numerators_sv[739] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[27] -= amp_sv[0]; @@ -15786,8 +17746,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 741 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] ); + if( channelId != 0 ) + { + numerators_sv[740] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[40] -= amp_sv[0]; @@ -15799,8 +17762,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 742 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] ); + if( channelId != 0 ) + { + numerators_sv[741] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[46] -= amp_sv[0]; @@ -15812,8 +17778,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 743 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] ); + if( channelId != 0 ) + { + numerators_sv[742] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[37] -= amp_sv[0]; @@ -15825,8 +17794,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 744 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] ); + if( channelId != 0 ) + { + numerators_sv[743] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[43] -= amp_sv[0]; @@ -15838,8 +17810,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 745 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] ); + if( channelId != 0 ) + { + numerators_sv[744] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[27] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[29] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -15852,8 +17827,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 746 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] ); + if( channelId != 0 ) + { + numerators_sv[745] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[40] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[46] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -15866,8 +17844,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 747 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] ); + if( channelId != 0 ) + { + numerators_sv[746] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[27] += amp_sv[0]; jamp_sv[29] -= amp_sv[0]; @@ -15882,8 +17863,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 748 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] ); + if( channelId != 0 ) + { + numerators_sv[747] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[28] -= amp_sv[0]; @@ -15895,8 +17879,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 749 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] ); + if( channelId != 0 ) + { + numerators_sv[748] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[25] -= amp_sv[0]; @@ -15908,8 +17895,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 750 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] ); + if( channelId != 0 ) + { + numerators_sv[749] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[34] -= amp_sv[0]; @@ -15921,8 +17911,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 751 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] ); + if( channelId != 0 ) + { + numerators_sv[750] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[44] -= amp_sv[0]; @@ -15934,8 +17927,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 752 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] ); + if( channelId != 0 ) + { + numerators_sv[751] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[31] -= amp_sv[0]; @@ -15947,8 +17943,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 753 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] ); + if( channelId != 0 ) + { + numerators_sv[752] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[42] -= amp_sv[0]; @@ -15960,8 +17959,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 754 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] ); + if( channelId != 0 ) + { + numerators_sv[753] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[25] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[28] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -15974,8 +17976,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 755 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] ); + if( channelId != 0 ) + { + numerators_sv[754] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[34] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[44] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -15988,8 +17993,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 756 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] ); + if( channelId != 0 ) + { + numerators_sv[755] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[25] += amp_sv[0]; jamp_sv[28] -= amp_sv[0]; @@ -16004,8 +18012,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 757 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] ); + if( channelId != 0 ) + { + numerators_sv[756] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[26] -= amp_sv[0]; @@ -16017,8 +18028,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 758 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] ); + if( channelId != 0 ) + { + numerators_sv[757] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[24] -= amp_sv[0]; @@ -16030,8 +18044,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 759 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] ); + if( channelId != 0 ) + { + numerators_sv[758] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[32] -= amp_sv[0]; @@ -16043,8 +18060,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 760 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] ); + if( channelId != 0 ) + { + numerators_sv[759] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[38] -= amp_sv[0]; @@ -16056,8 +18076,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 761 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] ); + if( channelId != 0 ) + { + numerators_sv[760] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[30] -= amp_sv[0]; @@ -16069,8 +18092,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 762 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] ); + if( channelId != 0 ) + { + numerators_sv[761] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[36] -= amp_sv[0]; @@ -16082,8 +18108,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 763 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] ); + if( channelId != 0 ) + { + numerators_sv[762] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[24] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[26] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -16096,8 +18125,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 764 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] ); + if( channelId != 0 ) + { + numerators_sv[763] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[32] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[38] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -16110,8 +18142,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 765 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] ); + if( channelId != 0 ) + { + numerators_sv[764] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[24] += amp_sv[0]; jamp_sv[26] -= amp_sv[0]; @@ -16126,8 +18161,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 766 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] ); + if( channelId != 0 ) + { + numerators_sv[765] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[28] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[29] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -16140,8 +18178,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 767 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] ); + if( channelId != 0 ) + { + numerators_sv[766] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[24] += amp_sv[0]; jamp_sv[26] -= amp_sv[0]; @@ -16156,8 +18197,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 768 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] ); + if( channelId != 0 ) + { + numerators_sv[767] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[24] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[26] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -16176,8 +18220,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 769 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] ); + if( channelId != 0 ) + { + numerators_sv[768] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[42] += amp_sv[0]; jamp_sv[43] -= amp_sv[0]; @@ -16192,8 +18239,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 770 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] ); + if( channelId != 0 ) + { + numerators_sv[769] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[24] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[26] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -16212,8 +18262,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 771 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] ); + if( channelId != 0 ) + { + numerators_sv[770] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[42] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[43] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -16262,8 +18315,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 773 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] ); + if( channelId != 0 ) + { + numerators_sv[772] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[26] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[27] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -16276,8 +18332,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 774 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] ); + if( channelId != 0 ) + { + numerators_sv[773] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[25] += amp_sv[0]; jamp_sv[26] -= amp_sv[0]; @@ -16292,8 +18351,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 775 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] ); + if( channelId != 0 ) + { + numerators_sv[774] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[25] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[28] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -16312,8 +18374,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 776 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] ); + if( channelId != 0 ) + { + numerators_sv[775] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[36] += amp_sv[0]; jamp_sv[37] -= amp_sv[0]; @@ -16328,8 +18393,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 777 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] ); + if( channelId != 0 ) + { + numerators_sv[776] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[25] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[26] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -16348,8 +18416,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 778 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] ); + if( channelId != 0 ) + { + numerators_sv[777] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[36] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[37] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -16398,8 +18469,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 780 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] ); + if( channelId != 0 ) + { + numerators_sv[779] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[24] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[25] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -16412,8 +18486,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 781 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] ); + if( channelId != 0 ) + { + numerators_sv[780] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[24] += amp_sv[0]; jamp_sv[25] -= amp_sv[0]; @@ -16428,8 +18505,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 782 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] ); + if( channelId != 0 ) + { + numerators_sv[781] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[27] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[29] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -16448,8 +18528,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 783 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] ); + if( channelId != 0 ) + { + numerators_sv[782] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[30] += amp_sv[0]; jamp_sv[31] -= amp_sv[0]; @@ -16464,8 +18547,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 784 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] ); + if( channelId != 0 ) + { + numerators_sv[783] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[24] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[25] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -16484,8 +18570,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 785 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] ); + if( channelId != 0 ) + { + numerators_sv[784] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[30] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[31] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -16592,8 +18681,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 789 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] ); + if( channelId != 0 ) + { + numerators_sv[788] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[64] -= amp_sv[0]; @@ -16605,8 +18697,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 790 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] ); + if( channelId != 0 ) + { + numerators_sv[789] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[70] -= amp_sv[0]; @@ -16618,8 +18713,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 791 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] ); + if( channelId != 0 ) + { + numerators_sv[790] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[53] -= amp_sv[0]; @@ -16631,8 +18729,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 792 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] ); + if( channelId != 0 ) + { + numerators_sv[791] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[51] -= amp_sv[0]; @@ -16644,8 +18745,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 793 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] ); + if( channelId != 0 ) + { + numerators_sv[792] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[67] -= amp_sv[0]; @@ -16657,8 +18761,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 794 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] ); + if( channelId != 0 ) + { + numerators_sv[793] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[61] -= amp_sv[0]; @@ -16670,8 +18777,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 795 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] ); + if( channelId != 0 ) + { + numerators_sv[794] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[64] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[70] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -16684,8 +18794,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 796 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] ); + if( channelId != 0 ) + { + numerators_sv[795] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[51] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[53] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -16698,8 +18811,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 797 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] ); + if( channelId != 0 ) + { + numerators_sv[796] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[51] += amp_sv[0]; jamp_sv[53] -= amp_sv[0]; @@ -16714,8 +18830,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 798 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] ); + if( channelId != 0 ) + { + numerators_sv[797] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[88] -= amp_sv[0]; @@ -16727,8 +18846,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 799 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] ); + if( channelId != 0 ) + { + numerators_sv[798] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[94] -= amp_sv[0]; @@ -16740,8 +18862,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 800 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] ); + if( channelId != 0 ) + { + numerators_sv[799] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[77] -= amp_sv[0]; @@ -16753,8 +18878,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 801 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] ); + if( channelId != 0 ) + { + numerators_sv[800] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[75] -= amp_sv[0]; @@ -16766,8 +18894,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 802 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] ); + if( channelId != 0 ) + { + numerators_sv[801] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[91] -= amp_sv[0]; @@ -16779,8 +18910,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 803 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] ); + if( channelId != 0 ) + { + numerators_sv[802] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[85] -= amp_sv[0]; @@ -16792,8 +18926,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 804 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] ); + if( channelId != 0 ) + { + numerators_sv[803] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[88] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[94] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -16806,8 +18943,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 805 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] ); + if( channelId != 0 ) + { + numerators_sv[804] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[75] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[77] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -16820,8 +18960,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 806 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] ); + if( channelId != 0 ) + { + numerators_sv[805] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[75] += amp_sv[0]; jamp_sv[77] -= amp_sv[0]; @@ -16836,8 +18979,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 807 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] ); + if( channelId != 0 ) + { + numerators_sv[806] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[112] -= amp_sv[0]; @@ -16849,8 +18995,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 808 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] ); + if( channelId != 0 ) + { + numerators_sv[807] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[118] -= amp_sv[0]; @@ -16862,8 +19011,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 809 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] ); + if( channelId != 0 ) + { + numerators_sv[808] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[101] -= amp_sv[0]; @@ -16875,8 +19027,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 810 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] ); + if( channelId != 0 ) + { + numerators_sv[809] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[99] -= amp_sv[0]; @@ -16888,8 +19043,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 811 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] ); + if( channelId != 0 ) + { + numerators_sv[810] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[115] -= amp_sv[0]; @@ -16901,8 +19059,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 812 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] ); + if( channelId != 0 ) + { + numerators_sv[811] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[109] -= amp_sv[0]; @@ -16914,8 +19075,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 813 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] ); + if( channelId != 0 ) + { + numerators_sv[812] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[112] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[118] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -16928,8 +19092,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 814 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] ); + if( channelId != 0 ) + { + numerators_sv[813] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[99] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[101] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -16942,8 +19109,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 815 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] ); + if( channelId != 0 ) + { + numerators_sv[814] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[99] += amp_sv[0]; jamp_sv[101] -= amp_sv[0]; @@ -16958,8 +19128,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 816 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] ); + if( channelId != 0 ) + { + numerators_sv[815] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[64] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[88] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -16972,8 +19145,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 817 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] ); + if( channelId != 0 ) + { + numerators_sv[816] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[64] += amp_sv[0]; jamp_sv[88] -= amp_sv[0]; @@ -16988,8 +19164,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 818 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] ); + if( channelId != 0 ) + { + numerators_sv[817] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[9] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[15] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -17008,8 +19187,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 819 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] ); + if( channelId != 0 ) + { + numerators_sv[818] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[9] += amp_sv[0]; jamp_sv[15] -= amp_sv[0]; @@ -17024,8 +19206,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 820 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] ); + if( channelId != 0 ) + { + numerators_sv[819] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[9] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[15] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -17044,8 +19229,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 821 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] ); + if( channelId != 0 ) + { + numerators_sv[820] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[61] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[85] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -17092,8 +19280,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 823 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] ); + if( channelId != 0 ) + { + numerators_sv[822] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[70] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[112] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -17106,8 +19297,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 824 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] ); + if( channelId != 0 ) + { + numerators_sv[823] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[70] += amp_sv[0]; jamp_sv[88] -= amp_sv[0]; @@ -17122,8 +19316,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 825 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] ); + if( channelId != 0 ) + { + numerators_sv[824] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[11] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[21] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -17142,8 +19339,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 826 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] ); + if( channelId != 0 ) + { + numerators_sv[825] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[11] += amp_sv[0]; jamp_sv[21] -= amp_sv[0]; @@ -17158,8 +19358,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 827 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] ); + if( channelId != 0 ) + { + numerators_sv[826] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[11] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[15] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -17178,8 +19381,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 828 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] ); + if( channelId != 0 ) + { + numerators_sv[827] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[67] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[109] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -17226,8 +19432,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 830 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] ); + if( channelId != 0 ) + { + numerators_sv[829] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[94] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[118] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -17240,8 +19449,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 831 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] ); + if( channelId != 0 ) + { + numerators_sv[830] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[64] += amp_sv[0]; jamp_sv[70] -= amp_sv[0]; @@ -17256,8 +19468,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 832 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] ); + if( channelId != 0 ) + { + numerators_sv[831] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[17] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[23] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -17276,8 +19491,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 833 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] ); + if( channelId != 0 ) + { + numerators_sv[832] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[17] += amp_sv[0]; jamp_sv[23] -= amp_sv[0]; @@ -17292,8 +19510,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 834 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] ); + if( channelId != 0 ) + { + numerators_sv[833] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[9] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[11] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -17312,8 +19533,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 835 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] ); + if( channelId != 0 ) + { + numerators_sv[834] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[91] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[115] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -17416,8 +19640,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 839 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] ); + if( channelId != 0 ) + { + numerators_sv[838] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] -= amp_sv[0]; jamp_sv[7] += amp_sv[0]; @@ -17444,8 +19671,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 840 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] ); + if( channelId != 0 ) + { + numerators_sv[839] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= amp_sv[0]; jamp_sv[6] += amp_sv[0]; @@ -17530,8 +19760,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 842 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] ); + if( channelId != 0 ) + { + numerators_sv[841] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += amp_sv[0]; jamp_sv[6] -= amp_sv[0]; @@ -17558,8 +19791,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 843 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] ); + if( channelId != 0 ) + { + numerators_sv[842] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += amp_sv[0]; jamp_sv[7] -= amp_sv[0]; @@ -17644,8 +19880,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 845 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] ); + if( channelId != 0 ) + { + numerators_sv[844] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += amp_sv[0]; jamp_sv[6] -= amp_sv[0]; @@ -17672,8 +19911,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 846 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] ); + if( channelId != 0 ) + { + numerators_sv[845] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += amp_sv[0]; jamp_sv[7] -= amp_sv[0]; @@ -17998,8 +20240,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 852 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] ); + if( channelId != 0 ) + { + numerators_sv[851] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += amp_sv[0]; jamp_sv[1] -= amp_sv[0]; @@ -18026,8 +20271,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 853 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] ); + if( channelId != 0 ) + { + numerators_sv[852] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += amp_sv[0]; jamp_sv[1] -= amp_sv[0]; @@ -18054,8 +20302,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 854 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] ); + if( channelId != 0 ) + { + numerators_sv[853] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[16] -= amp_sv[0]; jamp_sv[17] += amp_sv[0]; @@ -18082,8 +20333,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 855 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] ); + if( channelId != 0 ) + { + numerators_sv[854] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[72] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[74] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -18102,8 +20356,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 856 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] ); + if( channelId != 0 ) + { + numerators_sv[855] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[90] += amp_sv[0]; jamp_sv[91] -= amp_sv[0]; @@ -18118,8 +20375,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 857 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] ); + if( channelId != 0 ) + { + numerators_sv[856] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[76] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[77] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -18132,8 +20392,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 858 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] ); + if( channelId != 0 ) + { + numerators_sv[857] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[72] += amp_sv[0]; jamp_sv[74] -= amp_sv[0]; @@ -18148,8 +20411,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 859 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] ); + if( channelId != 0 ) + { + numerators_sv[858] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[90] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[91] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -18162,8 +20428,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 860 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] ); + if( channelId != 0 ) + { + numerators_sv[859] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[72] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[74] += cxtype( 0, 1 ) * amp_sv[0]; @@ -18216,8 +20485,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 862 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] ); + if( channelId != 0 ) + { + numerators_sv[861] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[72] += amp_sv[0]; jamp_sv[74] -= amp_sv[0]; @@ -18232,8 +20504,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 863 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] ); + if( channelId != 0 ) + { + numerators_sv[862] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[72] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[74] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -18246,8 +20521,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 864 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] ); + if( channelId != 0 ) + { + numerators_sv[863] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[80] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[86] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -18260,8 +20538,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 865 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] ); + if( channelId != 0 ) + { + numerators_sv[864] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[96] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[98] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -18280,8 +20561,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 866 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] ); + if( channelId != 0 ) + { + numerators_sv[865] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[114] += amp_sv[0]; jamp_sv[115] -= amp_sv[0]; @@ -18296,8 +20580,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 867 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] ); + if( channelId != 0 ) + { + numerators_sv[866] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[100] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[101] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -18310,8 +20597,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 868 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] ); + if( channelId != 0 ) + { + numerators_sv[867] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[96] += amp_sv[0]; jamp_sv[98] -= amp_sv[0]; @@ -18326,8 +20616,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 869 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] ); + if( channelId != 0 ) + { + numerators_sv[868] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[114] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[115] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -18340,8 +20633,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 870 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] ); + if( channelId != 0 ) + { + numerators_sv[869] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[96] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[98] += cxtype( 0, 1 ) * amp_sv[0]; @@ -18394,8 +20690,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 872 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] ); + if( channelId != 0 ) + { + numerators_sv[871] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[96] += amp_sv[0]; jamp_sv[98] -= amp_sv[0]; @@ -18410,8 +20709,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 873 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] ); + if( channelId != 0 ) + { + numerators_sv[872] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[96] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[98] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -18424,8 +20726,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 874 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] ); + if( channelId != 0 ) + { + numerators_sv[873] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[104] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[110] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -18438,8 +20743,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 875 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] ); + if( channelId != 0 ) + { + numerators_sv[874] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[7] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -18458,8 +20766,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 876 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] ); + if( channelId != 0 ) + { + numerators_sv[875] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += amp_sv[0]; jamp_sv[7] -= amp_sv[0]; @@ -18474,8 +20785,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 877 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] ); + if( channelId != 0 ) + { + numerators_sv[876] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[34] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[58] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -18488,8 +20802,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 878 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] ); + if( channelId != 0 ) + { + numerators_sv[877] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[34] += amp_sv[0]; jamp_sv[58] -= amp_sv[0]; @@ -18504,8 +20821,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 879 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] ); + if( channelId != 0 ) + { + numerators_sv[878] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[31] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[55] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -18518,8 +20838,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 880 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] ); + if( channelId != 0 ) + { + numerators_sv[879] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[7] += cxtype( 0, 1 ) * amp_sv[0]; @@ -18572,8 +20895,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 882 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] ); + if( channelId != 0 ) + { + numerators_sv[881] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[6] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -18592,8 +20918,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 883 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] ); + if( channelId != 0 ) + { + numerators_sv[882] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += amp_sv[0]; jamp_sv[6] -= amp_sv[0]; @@ -18608,8 +20937,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 884 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] ); + if( channelId != 0 ) + { + numerators_sv[883] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[32] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[56] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -18622,8 +20954,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 885 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] ); + if( channelId != 0 ) + { + numerators_sv[884] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[32] += amp_sv[0]; jamp_sv[56] -= amp_sv[0]; @@ -18638,8 +20973,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 886 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] ); + if( channelId != 0 ) + { + numerators_sv[885] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[30] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[54] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -18652,8 +20990,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 887 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] ); + if( channelId != 0 ) + { + numerators_sv[886] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[6] += cxtype( 0, 1 ) * amp_sv[0]; @@ -18706,8 +21047,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 889 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] ); + if( channelId != 0 ) + { + numerators_sv[888] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[90] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[91] += cxtype( 0, 1 ) * amp_sv[0]; @@ -18726,8 +21070,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 890 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] ); + if( channelId != 0 ) + { + numerators_sv[889] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[1] += cxtype( 0, 1 ) * amp_sv[0]; @@ -18746,8 +21093,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 891 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] ); + if( channelId != 0 ) + { + numerators_sv[890] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[30] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[31] += cxtype( 0, 1 ) * amp_sv[0]; @@ -18766,8 +21116,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 892 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] ); + if( channelId != 0 ) + { + numerators_sv[891] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[16] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[17] += cxtype( 0, 1 ) * amp_sv[0]; @@ -18786,8 +21139,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 893 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] ); + if( channelId != 0 ) + { + numerators_sv[892] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[30] += amp_sv[0]; jamp_sv[31] -= amp_sv[0]; @@ -18802,8 +21158,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 894 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] ); + if( channelId != 0 ) + { + numerators_sv[893] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[90] += amp_sv[0]; jamp_sv[91] -= amp_sv[0]; @@ -18818,8 +21177,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 895 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] ); + if( channelId != 0 ) + { + numerators_sv[894] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[3] -= amp_sv[0]; jamp_sv[13] += amp_sv[0]; @@ -18846,8 +21208,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 896 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] ); + if( channelId != 0 ) + { + numerators_sv[895] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] -= amp_sv[0]; jamp_sv[12] += amp_sv[0]; @@ -18932,8 +21297,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 898 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] ); + if( channelId != 0 ) + { + numerators_sv[897] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] += amp_sv[0]; jamp_sv[6] -= amp_sv[0]; @@ -18960,8 +21328,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 899 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] ); + if( channelId != 0 ) + { + numerators_sv[898] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[3] += amp_sv[0]; jamp_sv[6] -= amp_sv[0]; @@ -19046,8 +21417,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 901 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] ); + if( channelId != 0 ) + { + numerators_sv[900] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] += amp_sv[0]; jamp_sv[6] -= amp_sv[0]; @@ -19074,8 +21448,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 902 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] ); + if( channelId != 0 ) + { + numerators_sv[901] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[3] += amp_sv[0]; jamp_sv[13] -= amp_sv[0]; @@ -19398,8 +21775,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 908 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] ); + if( channelId != 0 ) + { + numerators_sv[907] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] += amp_sv[0]; jamp_sv[3] -= amp_sv[0]; @@ -19426,8 +21806,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 909 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] ); + if( channelId != 0 ) + { + numerators_sv[908] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] += amp_sv[0]; jamp_sv[3] -= amp_sv[0]; @@ -19454,8 +21837,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 910 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] ); + if( channelId != 0 ) + { + numerators_sv[909] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[10] -= amp_sv[0]; jamp_sv[11] += amp_sv[0]; @@ -19482,8 +21868,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 911 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] ); + if( channelId != 0 ) + { + numerators_sv[910] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[48] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[50] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -19502,8 +21891,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 912 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] ); + if( channelId != 0 ) + { + numerators_sv[911] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[66] += amp_sv[0]; jamp_sv[67] -= amp_sv[0]; @@ -19518,8 +21910,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 913 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] ); + if( channelId != 0 ) + { + numerators_sv[912] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[52] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[53] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -19532,8 +21927,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 914 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] ); + if( channelId != 0 ) + { + numerators_sv[913] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[48] += amp_sv[0]; jamp_sv[50] -= amp_sv[0]; @@ -19548,8 +21946,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 915 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] ); + if( channelId != 0 ) + { + numerators_sv[914] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[66] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[67] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -19562,8 +21963,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 916 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] ); + if( channelId != 0 ) + { + numerators_sv[915] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[48] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[50] += cxtype( 0, 1 ) * amp_sv[0]; @@ -19616,8 +22020,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 918 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] ); + if( channelId != 0 ) + { + numerators_sv[917] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[48] += amp_sv[0]; jamp_sv[50] -= amp_sv[0]; @@ -19632,8 +22039,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 919 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] ); + if( channelId != 0 ) + { + numerators_sv[918] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[48] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[50] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -19646,8 +22056,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 920 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] ); + if( channelId != 0 ) + { + numerators_sv[919] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[56] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[62] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -19660,8 +22073,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 921 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] ); + if( channelId != 0 ) + { + numerators_sv[920] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[97] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[100] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -19680,8 +22096,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 922 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] ); + if( channelId != 0 ) + { + numerators_sv[921] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[108] += amp_sv[0]; jamp_sv[109] -= amp_sv[0]; @@ -19696,8 +22115,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 923 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] ); + if( channelId != 0 ) + { + numerators_sv[922] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[98] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[99] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -19710,8 +22132,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 924 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] ); + if( channelId != 0 ) + { + numerators_sv[923] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[97] += amp_sv[0]; jamp_sv[98] -= amp_sv[0]; @@ -19726,8 +22151,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 925 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] ); + if( channelId != 0 ) + { + numerators_sv[924] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[108] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[109] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -19740,8 +22168,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 926 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] ); + if( channelId != 0 ) + { + numerators_sv[925] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[97] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[98] += cxtype( 0, 1 ) * amp_sv[0]; @@ -19794,8 +22225,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 928 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] ); + if( channelId != 0 ) + { + numerators_sv[927] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[97] += amp_sv[0]; jamp_sv[100] -= amp_sv[0]; @@ -19810,8 +22244,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 929 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] ); + if( channelId != 0 ) + { + numerators_sv[928] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[97] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[100] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -19824,8 +22261,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 930 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] ); + if( channelId != 0 ) + { + numerators_sv[929] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[106] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[116] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -19838,8 +22278,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 931 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] ); + if( channelId != 0 ) + { + numerators_sv[930] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[3] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[13] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -19858,8 +22301,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 932 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] ); + if( channelId != 0 ) + { + numerators_sv[931] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[3] += amp_sv[0]; jamp_sv[13] -= amp_sv[0]; @@ -19874,8 +22320,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 933 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] ); + if( channelId != 0 ) + { + numerators_sv[932] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[40] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[82] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -19888,8 +22337,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 934 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] ); + if( channelId != 0 ) + { + numerators_sv[933] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[40] += amp_sv[0]; jamp_sv[82] -= amp_sv[0]; @@ -19904,8 +22356,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 935 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] ); + if( channelId != 0 ) + { + numerators_sv[934] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[37] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[79] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -19918,8 +22373,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 936 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] ); + if( channelId != 0 ) + { + numerators_sv[935] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[3] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[13] += cxtype( 0, 1 ) * amp_sv[0]; @@ -19972,8 +22430,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 938 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] ); + if( channelId != 0 ) + { + numerators_sv[937] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[12] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -19992,8 +22453,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 939 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] ); + if( channelId != 0 ) + { + numerators_sv[938] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] += amp_sv[0]; jamp_sv[12] -= amp_sv[0]; @@ -20008,8 +22472,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 940 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] ); + if( channelId != 0 ) + { + numerators_sv[939] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[38] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[80] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -20022,8 +22489,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 941 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] ); + if( channelId != 0 ) + { + numerators_sv[940] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[38] += amp_sv[0]; jamp_sv[56] -= amp_sv[0]; @@ -20038,8 +22508,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 942 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] ); + if( channelId != 0 ) + { + numerators_sv[941] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[36] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[78] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -20052,8 +22525,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 943 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] ); + if( channelId != 0 ) + { + numerators_sv[942] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[6] += cxtype( 0, 1 ) * amp_sv[0]; @@ -20106,8 +22582,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 945 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] ); + if( channelId != 0 ) + { + numerators_sv[944] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[66] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[67] += cxtype( 0, 1 ) * amp_sv[0]; @@ -20126,8 +22605,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 946 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] ); + if( channelId != 0 ) + { + numerators_sv[945] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[3] += cxtype( 0, 1 ) * amp_sv[0]; @@ -20146,8 +22628,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 947 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] ); + if( channelId != 0 ) + { + numerators_sv[946] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[36] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[37] += cxtype( 0, 1 ) * amp_sv[0]; @@ -20166,8 +22651,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 948 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] ); + if( channelId != 0 ) + { + numerators_sv[947] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[10] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[11] += cxtype( 0, 1 ) * amp_sv[0]; @@ -20186,8 +22674,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 949 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] ); + if( channelId != 0 ) + { + numerators_sv[948] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[36] += amp_sv[0]; jamp_sv[37] -= amp_sv[0]; @@ -20202,8 +22693,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 950 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] ); + if( channelId != 0 ) + { + numerators_sv[949] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[66] += amp_sv[0]; jamp_sv[67] -= amp_sv[0]; @@ -20218,8 +22712,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 951 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] ); + if( channelId != 0 ) + { + numerators_sv[950] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[5] -= amp_sv[0]; jamp_sv[19] += amp_sv[0]; @@ -20246,8 +22743,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 952 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] ); + if( channelId != 0 ) + { + numerators_sv[951] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] -= amp_sv[0]; jamp_sv[18] += amp_sv[0]; @@ -20332,8 +22832,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 954 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] ); + if( channelId != 0 ) + { + numerators_sv[953] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] += amp_sv[0]; jamp_sv[7] -= amp_sv[0]; @@ -20360,8 +22863,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 955 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] ); + if( channelId != 0 ) + { + numerators_sv[954] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[5] += amp_sv[0]; jamp_sv[7] -= amp_sv[0]; @@ -20446,8 +22952,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 957 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] ); + if( channelId != 0 ) + { + numerators_sv[956] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] += amp_sv[0]; jamp_sv[7] -= amp_sv[0]; @@ -20474,8 +22983,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 958 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] ); + if( channelId != 0 ) + { + numerators_sv[957] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[5] += amp_sv[0]; jamp_sv[13] -= amp_sv[0]; @@ -20796,8 +23308,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 964 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] ); + if( channelId != 0 ) + { + numerators_sv[963] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] += amp_sv[0]; jamp_sv[5] -= amp_sv[0]; @@ -20824,8 +23339,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 965 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] ); + if( channelId != 0 ) + { + numerators_sv[964] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] += amp_sv[0]; jamp_sv[5] -= amp_sv[0]; @@ -20852,8 +23370,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 966 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] ); + if( channelId != 0 ) + { + numerators_sv[965] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[8] -= amp_sv[0]; jamp_sv[9] += amp_sv[0]; @@ -20880,8 +23401,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 967 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] ); + if( channelId != 0 ) + { + numerators_sv[966] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[49] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[52] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -20900,8 +23424,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 968 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] ); + if( channelId != 0 ) + { + numerators_sv[967] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[60] += amp_sv[0]; jamp_sv[61] -= amp_sv[0]; @@ -20916,8 +23443,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 969 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] ); + if( channelId != 0 ) + { + numerators_sv[968] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[50] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[51] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -20930,8 +23460,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 970 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] ); + if( channelId != 0 ) + { + numerators_sv[969] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[49] += amp_sv[0]; jamp_sv[50] -= amp_sv[0]; @@ -20946,8 +23479,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 971 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] ); + if( channelId != 0 ) + { + numerators_sv[970] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[60] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[61] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -20960,8 +23496,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 972 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] ); + if( channelId != 0 ) + { + numerators_sv[971] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[49] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[50] += cxtype( 0, 1 ) * amp_sv[0]; @@ -21014,8 +23553,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 974 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] ); + if( channelId != 0 ) + { + numerators_sv[973] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[49] += amp_sv[0]; jamp_sv[52] -= amp_sv[0]; @@ -21030,8 +23572,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 975 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] ); + if( channelId != 0 ) + { + numerators_sv[974] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[49] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[52] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -21044,8 +23589,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 976 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] ); + if( channelId != 0 ) + { + numerators_sv[975] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[58] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[68] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -21058,8 +23606,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 977 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] ); + if( channelId != 0 ) + { + numerators_sv[976] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[73] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[76] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -21078,8 +23629,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 978 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] ); + if( channelId != 0 ) + { + numerators_sv[977] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[84] += amp_sv[0]; jamp_sv[85] -= amp_sv[0]; @@ -21094,8 +23648,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 979 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] ); + if( channelId != 0 ) + { + numerators_sv[978] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[74] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[75] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -21108,8 +23665,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 980 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] ); + if( channelId != 0 ) + { + numerators_sv[979] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[73] += amp_sv[0]; jamp_sv[74] -= amp_sv[0]; @@ -21124,8 +23684,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 981 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] ); + if( channelId != 0 ) + { + numerators_sv[980] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[84] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[85] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -21138,8 +23701,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 982 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] ); + if( channelId != 0 ) + { + numerators_sv[981] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[73] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[74] += cxtype( 0, 1 ) * amp_sv[0]; @@ -21192,8 +23758,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 984 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] ); + if( channelId != 0 ) + { + numerators_sv[983] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[73] += amp_sv[0]; jamp_sv[76] -= amp_sv[0]; @@ -21208,8 +23777,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 985 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] ); + if( channelId != 0 ) + { + numerators_sv[984] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[73] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[76] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -21222,8 +23794,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 986 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] ); + if( channelId != 0 ) + { + numerators_sv[985] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[82] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[92] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -21236,8 +23811,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 987 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] ); + if( channelId != 0 ) + { + numerators_sv[986] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[5] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[19] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -21256,8 +23834,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 988 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] ); + if( channelId != 0 ) + { + numerators_sv[987] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[5] += amp_sv[0]; jamp_sv[19] -= amp_sv[0]; @@ -21272,8 +23853,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 989 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] ); + if( channelId != 0 ) + { + numerators_sv[988] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[46] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[106] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -21286,8 +23870,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 990 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] ); + if( channelId != 0 ) + { + numerators_sv[989] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[46] += amp_sv[0]; jamp_sv[82] -= amp_sv[0]; @@ -21302,8 +23889,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 991 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] ); + if( channelId != 0 ) + { + numerators_sv[990] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[43] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[103] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -21316,8 +23906,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 992 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] ); + if( channelId != 0 ) + { + numerators_sv[991] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[5] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[13] += cxtype( 0, 1 ) * amp_sv[0]; @@ -21370,8 +23963,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 994 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] ); + if( channelId != 0 ) + { + numerators_sv[993] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[18] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -21390,8 +23986,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 995 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] ); + if( channelId != 0 ) + { + numerators_sv[994] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] += amp_sv[0]; jamp_sv[18] -= amp_sv[0]; @@ -21406,8 +24005,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 996 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] ); + if( channelId != 0 ) + { + numerators_sv[995] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[44] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[104] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -21420,8 +24022,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 997 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] ); + if( channelId != 0 ) + { + numerators_sv[996] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[44] += amp_sv[0]; jamp_sv[58] -= amp_sv[0]; @@ -21436,8 +24041,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 998 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] ); + if( channelId != 0 ) + { + numerators_sv[997] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[42] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[102] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -21450,8 +24058,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 999 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] ); + if( channelId != 0 ) + { + numerators_sv[998] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[7] += cxtype( 0, 1 ) * amp_sv[0]; @@ -21504,8 +24115,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1001 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] ); + if( channelId != 0 ) + { + numerators_sv[1000] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[60] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[61] += cxtype( 0, 1 ) * amp_sv[0]; @@ -21524,8 +24138,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1002 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] ); + if( channelId != 0 ) + { + numerators_sv[1001] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[5] += cxtype( 0, 1 ) * amp_sv[0]; @@ -21544,8 +24161,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1003 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] ); + if( channelId != 0 ) + { + numerators_sv[1002] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[42] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[43] += cxtype( 0, 1 ) * amp_sv[0]; @@ -21564,8 +24184,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1004 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] ); + if( channelId != 0 ) + { + numerators_sv[1003] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[8] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[9] += cxtype( 0, 1 ) * amp_sv[0]; @@ -21584,8 +24207,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1005 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] ); + if( channelId != 0 ) + { + numerators_sv[1004] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[42] += amp_sv[0]; jamp_sv[43] -= amp_sv[0]; @@ -21600,8 +24226,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1006 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] ); + if( channelId != 0 ) + { + numerators_sv[1005] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[60] += amp_sv[0]; jamp_sv[61] -= amp_sv[0]; @@ -21616,8 +24245,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1007 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] ); + if( channelId != 0 ) + { + numerators_sv[1006] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += amp_sv[0]; jamp_sv[2] -= amp_sv[0]; @@ -21644,8 +24276,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1008 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] ); + if( channelId != 0 ) + { + numerators_sv[1007] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += amp_sv[0]; jamp_sv[2] -= amp_sv[0]; @@ -21730,8 +24365,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1010 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] ); + if( channelId != 0 ) + { + numerators_sv[1009] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[9] += amp_sv[0]; jamp_sv[15] -= amp_sv[0]; @@ -21758,8 +24396,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1011 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] ); + if( channelId != 0 ) + { + numerators_sv[1010] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[8] += amp_sv[0]; jamp_sv[14] -= amp_sv[0]; @@ -21844,8 +24485,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1013 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] ); + if( channelId != 0 ) + { + numerators_sv[1012] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[9] += amp_sv[0]; jamp_sv[15] -= amp_sv[0]; @@ -21872,8 +24516,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1014 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] ); + if( channelId != 0 ) + { + numerators_sv[1013] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += amp_sv[0]; jamp_sv[2] -= amp_sv[0]; @@ -22136,8 +24783,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1019 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] ); + if( channelId != 0 ) + { + numerators_sv[1018] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += amp_sv[0]; jamp_sv[4] -= amp_sv[0]; @@ -22164,8 +24814,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1020 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] ); + if( channelId != 0 ) + { + numerators_sv[1019] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += amp_sv[0]; jamp_sv[2] -= amp_sv[0]; @@ -22250,8 +24903,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1022 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] ); + if( channelId != 0 ) + { + numerators_sv[1021] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[11] += amp_sv[0]; jamp_sv[21] -= amp_sv[0]; @@ -22278,8 +24934,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1023 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] ); + if( channelId != 0 ) + { + numerators_sv[1022] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[10] += amp_sv[0]; jamp_sv[20] -= amp_sv[0]; @@ -22364,8 +25023,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1025 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] ); + if( channelId != 0 ) + { + numerators_sv[1024] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[11] += amp_sv[0]; jamp_sv[15] -= amp_sv[0]; @@ -22392,8 +25054,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1026 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] ); + if( channelId != 0 ) + { + numerators_sv[1025] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += amp_sv[0]; jamp_sv[4] -= amp_sv[0]; @@ -22654,8 +25319,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1031 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] ); + if( channelId != 0 ) + { + numerators_sv[1030] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[3] += amp_sv[0]; jamp_sv[5] -= amp_sv[0]; @@ -22682,8 +25350,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1032 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] ); + if( channelId != 0 ) + { + numerators_sv[1031] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += amp_sv[0]; jamp_sv[1] -= amp_sv[0]; @@ -22768,8 +25439,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1034 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] ); + if( channelId != 0 ) + { + numerators_sv[1033] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[17] += amp_sv[0]; jamp_sv[23] -= amp_sv[0]; @@ -22796,8 +25470,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1035 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] ); + if( channelId != 0 ) + { + numerators_sv[1034] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[16] += amp_sv[0]; jamp_sv[22] -= amp_sv[0]; @@ -22882,8 +25559,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1037 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] ); + if( channelId != 0 ) + { + numerators_sv[1036] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[9] += amp_sv[0]; jamp_sv[11] -= amp_sv[0]; @@ -22910,8 +25590,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1038 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] ); + if( channelId != 0 ) + { + numerators_sv[1037] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[3] += amp_sv[0]; jamp_sv[5] -= amp_sv[0]; @@ -23448,8 +26131,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1046 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] ); + if( channelId != 0 ) + { + numerators_sv[1045] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[52] -= amp_sv[0]; @@ -23461,8 +26147,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1047 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] ); + if( channelId != 0 ) + { + numerators_sv[1046] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[49] -= amp_sv[0]; @@ -23474,8 +26163,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1048 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] ); + if( channelId != 0 ) + { + numerators_sv[1047] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[58] -= amp_sv[0]; @@ -23487,8 +26179,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1049 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] ); + if( channelId != 0 ) + { + numerators_sv[1048] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[68] -= amp_sv[0]; @@ -23500,8 +26195,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1050 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] ); + if( channelId != 0 ) + { + numerators_sv[1049] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[55] -= amp_sv[0]; @@ -23513,8 +26211,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1051 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] ); + if( channelId != 0 ) + { + numerators_sv[1050] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[66] -= amp_sv[0]; @@ -23526,8 +26227,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1052 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] ); + if( channelId != 0 ) + { + numerators_sv[1051] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[50] -= amp_sv[0]; @@ -23539,8 +26243,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1053 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] ); + if( channelId != 0 ) + { + numerators_sv[1052] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[48] -= amp_sv[0]; @@ -23552,8 +26259,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1054 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] ); + if( channelId != 0 ) + { + numerators_sv[1053] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[56] -= amp_sv[0]; @@ -23565,8 +26275,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1055 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] ); + if( channelId != 0 ) + { + numerators_sv[1054] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[62] -= amp_sv[0]; @@ -23578,8 +26291,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1056 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] ); + if( channelId != 0 ) + { + numerators_sv[1055] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[54] -= amp_sv[0]; @@ -23591,8 +26307,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1057 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] ); + if( channelId != 0 ) + { + numerators_sv[1056] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[60] -= amp_sv[0]; @@ -23604,8 +26323,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1058 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] ); + if( channelId != 0 ) + { + numerators_sv[1057] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[48] += amp_sv[0]; jamp_sv[49] -= amp_sv[0]; @@ -23620,8 +26342,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1059 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] ); + if( channelId != 0 ) + { + numerators_sv[1058] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[48] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[49] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -23634,8 +26359,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1060 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] ); + if( channelId != 0 ) + { + numerators_sv[1059] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[54] += amp_sv[0]; jamp_sv[55] -= amp_sv[0]; @@ -23650,8 +26378,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1061 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] ); + if( channelId != 0 ) + { + numerators_sv[1060] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[51] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[53] += cxtype( 0, 1 ) * amp_sv[0]; @@ -23670,8 +26401,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1062 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] ); + if( channelId != 0 ) + { + numerators_sv[1061] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[54] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[55] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -23684,8 +26418,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1063 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] ); + if( channelId != 0 ) + { + numerators_sv[1062] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[48] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[49] += cxtype( 0, 1 ) * amp_sv[0]; @@ -23738,8 +26475,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1065 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] ); + if( channelId != 0 ) + { + numerators_sv[1064] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[76] -= amp_sv[0]; @@ -23751,8 +26491,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1066 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] ); + if( channelId != 0 ) + { + numerators_sv[1065] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[73] -= amp_sv[0]; @@ -23764,8 +26507,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1067 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] ); + if( channelId != 0 ) + { + numerators_sv[1066] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[82] -= amp_sv[0]; @@ -23777,8 +26523,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1068 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] ); + if( channelId != 0 ) + { + numerators_sv[1067] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[92] -= amp_sv[0]; @@ -23790,8 +26539,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1069 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] ); + if( channelId != 0 ) + { + numerators_sv[1068] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[79] -= amp_sv[0]; @@ -23803,8 +26555,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1070 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] ); + if( channelId != 0 ) + { + numerators_sv[1069] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[90] -= amp_sv[0]; @@ -23816,8 +26571,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1071 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] ); + if( channelId != 0 ) + { + numerators_sv[1070] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[74] -= amp_sv[0]; @@ -23829,8 +26587,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1072 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] ); + if( channelId != 0 ) + { + numerators_sv[1071] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[72] -= amp_sv[0]; @@ -23842,8 +26603,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1073 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] ); + if( channelId != 0 ) + { + numerators_sv[1072] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[80] -= amp_sv[0]; @@ -23855,8 +26619,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1074 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] ); + if( channelId != 0 ) + { + numerators_sv[1073] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[86] -= amp_sv[0]; @@ -23868,8 +26635,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1075 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] ); + if( channelId != 0 ) + { + numerators_sv[1074] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[78] -= amp_sv[0]; @@ -23881,8 +26651,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1076 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] ); + if( channelId != 0 ) + { + numerators_sv[1075] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[84] -= amp_sv[0]; @@ -23894,8 +26667,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1077 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] ); + if( channelId != 0 ) + { + numerators_sv[1076] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[72] += amp_sv[0]; jamp_sv[73] -= amp_sv[0]; @@ -23910,8 +26686,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1078 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] ); + if( channelId != 0 ) + { + numerators_sv[1077] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[72] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[73] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -23924,8 +26703,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1079 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] ); + if( channelId != 0 ) + { + numerators_sv[1078] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[78] += amp_sv[0]; jamp_sv[79] -= amp_sv[0]; @@ -23940,8 +26722,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1080 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] ); + if( channelId != 0 ) + { + numerators_sv[1079] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[75] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[77] += cxtype( 0, 1 ) * amp_sv[0]; @@ -23960,8 +26745,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1081 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] ); + if( channelId != 0 ) + { + numerators_sv[1080] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[78] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[79] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -23974,8 +26762,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1082 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] ); + if( channelId != 0 ) + { + numerators_sv[1081] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[72] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[73] += cxtype( 0, 1 ) * amp_sv[0]; @@ -24028,8 +26819,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1084 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] ); + if( channelId != 0 ) + { + numerators_sv[1083] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[100] -= amp_sv[0]; @@ -24041,8 +26835,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1085 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] ); + if( channelId != 0 ) + { + numerators_sv[1084] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[97] -= amp_sv[0]; @@ -24054,8 +26851,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1086 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] ); + if( channelId != 0 ) + { + numerators_sv[1085] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[106] -= amp_sv[0]; @@ -24067,8 +26867,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1087 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] ); + if( channelId != 0 ) + { + numerators_sv[1086] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[116] -= amp_sv[0]; @@ -24080,8 +26883,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1088 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] ); + if( channelId != 0 ) + { + numerators_sv[1087] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[103] -= amp_sv[0]; @@ -24093,8 +26899,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1089 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] ); + if( channelId != 0 ) + { + numerators_sv[1088] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[114] -= amp_sv[0]; @@ -24106,8 +26915,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1090 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] ); + if( channelId != 0 ) + { + numerators_sv[1089] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[98] -= amp_sv[0]; @@ -24119,8 +26931,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1091 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] ); + if( channelId != 0 ) + { + numerators_sv[1090] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[96] -= amp_sv[0]; @@ -24132,8 +26947,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1092 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] ); + if( channelId != 0 ) + { + numerators_sv[1091] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[104] -= amp_sv[0]; @@ -24145,8 +26963,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1093 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] ); + if( channelId != 0 ) + { + numerators_sv[1092] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[110] -= amp_sv[0]; @@ -24158,8 +26979,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1094 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] ); + if( channelId != 0 ) + { + numerators_sv[1093] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[102] -= amp_sv[0]; @@ -24171,8 +26995,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1095 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] ); + if( channelId != 0 ) + { + numerators_sv[1094] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[108] -= amp_sv[0]; @@ -24184,8 +27011,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1096 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] ); + if( channelId != 0 ) + { + numerators_sv[1095] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[96] += amp_sv[0]; jamp_sv[97] -= amp_sv[0]; @@ -24200,8 +27030,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1097 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] ); + if( channelId != 0 ) + { + numerators_sv[1096] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[96] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[97] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -24214,8 +27047,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1098 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] ); + if( channelId != 0 ) + { + numerators_sv[1097] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[102] += amp_sv[0]; jamp_sv[103] -= amp_sv[0]; @@ -24230,8 +27066,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1099 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] ); + if( channelId != 0 ) + { + numerators_sv[1098] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[99] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[101] += cxtype( 0, 1 ) * amp_sv[0]; @@ -24250,8 +27089,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1100 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] ); + if( channelId != 0 ) + { + numerators_sv[1099] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[102] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[103] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -24264,8 +27106,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1101 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] ); + if( channelId != 0 ) + { + numerators_sv[1100] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[96] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[97] += cxtype( 0, 1 ) * amp_sv[0]; @@ -24318,8 +27163,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1103 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] ); + if( channelId != 0 ) + { + numerators_sv[1102] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[40] += amp_sv[0]; jamp_sv[46] -= amp_sv[0]; @@ -24334,8 +27182,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1104 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] ); + if( channelId != 0 ) + { + numerators_sv[1103] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[92] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[116] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -24348,8 +27199,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1105 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] ); + if( channelId != 0 ) + { + numerators_sv[1104] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[16] += amp_sv[0]; jamp_sv[22] -= amp_sv[0]; @@ -24364,8 +27218,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1106 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] ); + if( channelId != 0 ) + { + numerators_sv[1105] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[16] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[22] += cxtype( 0, 1 ) * amp_sv[0]; @@ -24384,8 +27241,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1107 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] ); + if( channelId != 0 ) + { + numerators_sv[1106] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[90] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[114] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -24398,8 +27258,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1108 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] ); + if( channelId != 0 ) + { + numerators_sv[1107] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[3] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[5] += cxtype( 0, 1 ) * amp_sv[0]; @@ -24452,8 +27315,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1110 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] ); + if( channelId != 0 ) + { + numerators_sv[1109] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[34] += amp_sv[0]; jamp_sv[44] -= amp_sv[0]; @@ -24468,8 +27334,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1111 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] ); + if( channelId != 0 ) + { + numerators_sv[1110] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[68] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[110] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -24482,8 +27351,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1112 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] ); + if( channelId != 0 ) + { + numerators_sv[1111] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[10] += amp_sv[0]; jamp_sv[20] -= amp_sv[0]; @@ -24498,8 +27370,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1113 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] ); + if( channelId != 0 ) + { + numerators_sv[1112] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[10] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[20] += cxtype( 0, 1 ) * amp_sv[0]; @@ -24518,8 +27393,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1114 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] ); + if( channelId != 0 ) + { + numerators_sv[1113] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[66] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[108] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -24532,8 +27410,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1115 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] ); + if( channelId != 0 ) + { + numerators_sv[1114] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[4] += cxtype( 0, 1 ) * amp_sv[0]; @@ -24586,8 +27467,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1117 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] ); + if( channelId != 0 ) + { + numerators_sv[1116] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[32] += amp_sv[0]; jamp_sv[38] -= amp_sv[0]; @@ -24602,8 +27486,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1118 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] ); + if( channelId != 0 ) + { + numerators_sv[1117] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[62] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[86] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -24616,8 +27503,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1119 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] ); + if( channelId != 0 ) + { + numerators_sv[1118] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[8] += amp_sv[0]; jamp_sv[14] -= amp_sv[0]; @@ -24632,8 +27522,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1120 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] ); + if( channelId != 0 ) + { + numerators_sv[1119] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[8] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[14] += cxtype( 0, 1 ) * amp_sv[0]; @@ -24652,8 +27545,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1121 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] ); + if( channelId != 0 ) + { + numerators_sv[1120] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[60] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[84] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -24666,8 +27562,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1122 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] ); + if( channelId != 0 ) + { + numerators_sv[1121] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[2] += cxtype( 0, 1 ) * amp_sv[0]; @@ -30383,7 +33282,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- @@ -30757,9 +33658,6 @@ namespace mg5amcCpu #ifdef MGONGPUCPP_GPUIMPL // Remember: in CUDA this is a kernel for one event, in c++ this processes n events const int ievt = blockDim.x * blockIdx.x + threadIdx.x; // index of event (thread) in grid -#ifdef MGONGPU_SUPPORTS_MULTICHANNEL - using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events -#endif #else //assert( (size_t)(allmomenta) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] //assert( (size_t)(allMEs) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] @@ -30767,7 +33665,6 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL using NUM_ACCESS = HostAccessNumerators; // non-trivial access: buffer includes all events using DEN_ACCESS = HostAccessDenominators; // non-trivial access: buffer includes all events - using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events #endif #endif @@ -30792,11 +33689,12 @@ namespace mg5amcCpu fptype_sv& MEs_sv = E_ACCESS::kernelAccess( MEs ); MEs_sv = fptype_sv{ 0 }; #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - numerators_sv = fptype_sv{ 0 }; + for( int i = 0; i < processConfig::ndiagrams; ++i ) + numerators_sv[i] = fptype_sv{ 0 }; denominators_sv = fptype_sv{ 0 }; #endif } @@ -30809,17 +33707,7 @@ namespace mg5amcCpu // *** START OF PART 1a - CUDA (one event per GPU thread) *** #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) - const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) - // NB: channelIds_sv is a scalar in CUDA - channelId = channelIds_sv; - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) - } + unsigned int channelId = getChannelId( allChannelIds ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (for the single event processed in calculate_wavefunctions) @@ -30934,38 +33822,7 @@ namespace mg5amcCpu const int ievt00 = ipagV2 * neppV; // loop on one SIMD page (neppV events) at a time #endif #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) - const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 - uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) -#ifndef MGONGPU_CPPSIMD - // NB: channelIds_sv is a scalar in no-SIMD C++ - channelId = channelIds_sv; -#else - // NB: channelIds_sv is a vector in SIMD C++ - channelId = channelIds_sv[0]; // element[0] - for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] - { - assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId - } -#endif - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) -#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT - // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) - const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 - uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - for( int i = 0; i < neppV; ++i ) - { - assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector - } -#endif - } + unsigned int channelId = getChannelId( allChannelIds, ievt00 ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (jamp2[nParity][ncolor][neppV] for the SIMD vector - or the two SIMD vectors - of events processed in calculate_wavefunctions) @@ -31138,11 +33995,12 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( allChannelIds != nullptr ) // fix segfault #892 (not 'channelIds[0] != 0') { - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + const unsigned int channelId = getChannelId( allChannelIds, ievt0, false ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - MEs_sv *= numerators_sv / denominators_sv; + MEs_sv *= numerators_sv[channelId - 1] / denominators_sv; } #endif //for( int ieppV = 0; ieppV < neppV; ieppV++ ) diff --git a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/P1_gg_ttxggg/CPPProcess.h b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/P1_gg_ttxggg/CPPProcess.h index 2eb1e066ff..a89060a269 100644 --- a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/P1_gg_ttxggg/CPPProcess.h +++ b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/P1_gg_ttxggg/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/P1_gg_ttxggg/auto_dsig.f b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/P1_gg_ttxggg/auto_dsig.f index 523ef1948b..b68e24f4b8 100644 --- a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/P1_gg_ttxggg/auto_dsig.f +++ b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/P1_gg_ttxggg/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C 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 3152176aa0..e2d2f5526b 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 @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -137,14 +137,14 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDDO QSCALE=QSCALE/2D0 ELSE - QSCALE=DSQRT(Q2FACT(IB(1))) + QSCALE=DSQRT(Q2FACT(1)) ENDIF G1=PDG2PDF(LPP(IB(1)),0, IB(1),XBK(IB(1)), QSCALE) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) IF (DSQRT(Q2FACT(IB(2))).NE.0D0) THEN - QSCALE=DSQRT(Q2FACT(IB(2))) + QSCALE=DSQRT(Q2FACT(2)) ENDIF G2=PDG2PDF(LPP(IB(2)),0, IB(2),XBK(IB(2)), QSCALE) ENDIF @@ -219,7 +219,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -290,6 +290,10 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, INTEGER I_EE C +C STUFF FOR UPC +C + DOUBLE PRECISION PHOTONPDFSQUARE +C C EXTERNAL FUNCTIONS C LOGICAL PASSCUTS @@ -373,12 +377,12 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, IF (ABS(LPP(IB(1))).GE.1) THEN C LP=SIGN(1,LPP(IB(1))) G1(IVEC)=PDG2PDF(LPP(IB(1)),0, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) G2(IVEC)=PDG2PDF(LPP(IB(2)),0, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) ENDIF ENDDO ! IWARP LOOP ENDDO ! CURRWARP LOOP diff --git a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/P1_gg_ttxggg/card.png b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/P1_gg_ttxggg/card.png new file mode 100644 index 0000000000..596d1e3f98 Binary files /dev/null and b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/P1_gg_ttxggg/card.png differ 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 07ccd4d1a4..2023c1edcf 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 @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -419,7 +419,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -462,7 +462,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C INTEGER I,J,M,N COMPLEX*16 ZTEMP, TMP_JAMP(3030) - REAL*8 CF(NCOLOR,NCOLOR) + INTEGER CF(NCOLOR*(NCOLOR+1)/2) + INTEGER DENOM, CF_INDEX COMPLEX*16 AMP(NGRAPHS), JAMP(NCOLOR,NAMPSO) COMPLEX*16 W(6,NWAVEFUNCS) C Needed for v4 models @@ -505,9365 +506,724 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C C COLOR DATA C - DATA (CF(I, 1),I= 1, 6) /1.264197530864197D+01, - $ -1.580246913580247D+00,-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01,1.975308641975309D - $ +00/ - DATA (CF(I, 1),I= 7, 12) /-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 1),I= 13, 18) /1.975308641975309D-01, - $ -2.469135802469136D-02,1.975308641975309D+00, - $ -2.469135802469136D-01,1.753086419753086D+00,1.530864197530864D - $ +00/ - DATA (CF(I, 1),I= 19, 24) /-2.469135802469136D-02, - $ -2.469135802469136D-01,-2.469135802469136D-01 - $ ,1.530864197530864D+00,1.530864197530864D+00, - $ -6.913580246913580D-01/ - DATA (CF(I, 1),I= 25, 30) /-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 1),I= 31, 36) /1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I, 1),I= 37, 42) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01/ - DATA (CF(I, 1),I= 43, 48) /3.086419753086420D-03 - $ ,3.086419753086420D-02,3.086419753086420D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 1),I= 49, 54) /1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I, 1),I= 55, 60) /1.975308641975309D+00, - $ -2.469135802469136D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02,3.086419753086420D - $ -01/ - DATA (CF(I, 1),I= 61, 66) /1.753086419753086D+00, - $ -2.191358024691358D-01,1.530864197530864D+00, - $ -1.913580246913580D-01,1.558641975308642D+00,1.586419753086420D - $ +00/ - DATA (CF(I, 1),I= 67, 72) /-2.191358024691358D-01 - $ ,5.864197530864197D-02,-1.913580246913580D-01, - $ -1.635802469135803D-01,-4.135802469135803D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 1),I= 73, 78) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01/ - DATA (CF(I, 1),I= 79, 84) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,1.530864197530864D+00, - $ -1.913580246913580D-01,5.864197530864197D-02, - $ -1.635802469135803D-01/ - DATA (CF(I, 1),I= 85, 90) /1.530864197530864D+00, - $ -1.913580246913580D-01,-6.913580246913580D-01 - $ ,8.641975308641975D-02,-4.135802469135803D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 1),I= 91, 96) /1.558641975308642D+00, - $ -4.135802469135803D-01,-4.135802469135803D-01 - $ ,1.364197530864198D+00,1.364197530864198D+00, - $ -3.580246913580247D-01/ - DATA (CF(I, 1),I= 97,102) /3.086419753086420D-03 - $ ,3.086419753086420D-02,3.086419753086420D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 1),I=103,108) /3.086419753086420D-02 - $ ,3.086419753086420D-01,-1.913580246913580D-01 - $ ,1.586419753086420D+00,-1.635802469135803D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 1),I=109,114) /-1.913580246913580D-01, - $ -1.635802469135803D-01,8.641975308641975D-02, - $ -1.358024691358025D-01,1.364197530864198D+00, - $ -3.580246913580247D-01/ - DATA (CF(I, 1),I=115,120) /1.586419753086420D+00, - $ -1.358024691358025D-01,-1.358024691358025D-01, - $ -3.580246913580247D-01,-3.580246913580247D-01 - $ ,4.197530864197531D-01/ + DATA DENOM/324/ + DATA (CF(I),I= 1,120) /4096,-1024,-1024,128,128,1280,-1024,128 + $ ,128,-16,-16,-160,128,-16,1280,-160,1136,992,-16,-160,-160,992 + $ ,992,-448,-1024,128,128,-16,-16,-160,128,-16,-16,2,2,20,-16,2, + $ -160,20,-142,-124,2,20,20,-124,-124,56,128,-16,-16,2,2,20,1280, + $ -160,-160,20,20,200,1136,-142,992,-124,1010,1028,-142,38,-124, + $ -106,-268,-88,-16,2,-160,20,-142,-124,-160,20,992,-124,38,-106 + $ ,992,-124,-448,56,-268,-88,1010,-268,-268,884,884,-232,2,20,20, + $ -124,-124,56,20,200,-124,1028,-106,-88,-124,-106,56,-88,884, + $ -232,1028,-88,-88,-232,-232,272/ C 1 T(1,2,5,6,7,3,4) - DATA (CF(I, 2),I= 1, 6) /-1.580246913580247D+00 - $ ,1.264197530864197D+01,1.975308641975309D-01,1.975308641975309D - $ +00,-1.580246913580247D+00,1.975308641975309D-01/ - DATA (CF(I, 2),I= 7, 12) /1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 2),I= 13, 18) /-2.469135802469136D-02, - $ -2.469135802469136D-01,-2.469135802469136D-01 - $ ,1.530864197530864D+00,1.530864197530864D+00, - $ -6.913580246913580D-01/ - DATA (CF(I, 2),I= 19, 24) /1.975308641975309D-01, - $ -2.469135802469136D-02,1.975308641975309D+00, - $ -2.469135802469136D-01,1.753086419753086D+00,1.530864197530864D - $ +00/ - DATA (CF(I, 2),I= 25, 30) /1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 2),I= 31, 36) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03,3.086419753086420D - $ -02,-2.469135802469136D-02,3.086419753086420D-03/ - DATA (CF(I, 2),I= 37, 42) /3.086419753086420D-03 - $ ,3.086419753086420D-02,3.086419753086420D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 2),I= 43, 48) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01/ - DATA (CF(I, 2),I= 49, 54) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03,3.086419753086420D - $ -02,-2.469135802469136D-02,3.086419753086420D-03/ - DATA (CF(I, 2),I= 55, 60) /-2.469135802469136D-01 - $ ,1.975308641975309D+00,3.086419753086420D-02,3.086419753086420D - $ -01,-2.469135802469136D-01,3.086419753086420D-02/ - DATA (CF(I, 2),I= 61, 66) /-2.191358024691358D-01 - $ ,5.864197530864197D-02,-1.913580246913580D-01, - $ -1.635802469135803D-01,-4.135802469135803D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 2),I= 67, 72) /1.753086419753086D+00, - $ -2.191358024691358D-01,1.530864197530864D+00, - $ -1.913580246913580D-01,1.558641975308642D+00,1.586419753086420D - $ +00/ - DATA (CF(I, 2),I= 73, 78) /3.086419753086420D-03 - $ ,3.086419753086420D-02,3.086419753086420D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 2),I= 79, 84) /3.086419753086420D-02 - $ ,3.086419753086420D-01,-1.913580246913580D-01 - $ ,1.586419753086420D+00,-1.635802469135803D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 2),I= 85, 90) /-1.913580246913580D-01, - $ -1.635802469135803D-01,8.641975308641975D-02, - $ -1.358024691358025D-01,1.364197530864198D+00, - $ -3.580246913580247D-01/ - DATA (CF(I, 2),I= 91, 96) /1.586419753086420D+00, - $ -1.358024691358025D-01,-1.358024691358025D-01, - $ -3.580246913580247D-01,-3.580246913580247D-01 - $ ,4.197530864197531D-01/ - DATA (CF(I, 2),I= 97,102) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01/ - DATA (CF(I, 2),I=103,108) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,1.530864197530864D+00, - $ -1.913580246913580D-01,5.864197530864197D-02, - $ -1.635802469135803D-01/ - DATA (CF(I, 2),I=109,114) /1.530864197530864D+00, - $ -1.913580246913580D-01,-6.913580246913580D-01 - $ ,8.641975308641975D-02,-4.135802469135803D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 2),I=115,120) /1.558641975308642D+00, - $ -4.135802469135803D-01,-4.135802469135803D-01 - $ ,1.364197530864198D+00,1.364197530864198D+00, - $ -3.580246913580247D-01/ + DATA (CF(I),I=121,239) /4096,128,1280,-1024,128,128,-1024,-16, + $ -160,128,-16,-16,-160,-160,992,992,-448,128,-16,1280,-160,1136 + $ ,992,128,-1024,-16,-160,128,-16,-16,128,2,20,-16,2,2,20,20,-124 + $ ,-124,56,-16,2,-160,20,-142,-124,-16,128,2,20,-16,2,-160,1280 + $ ,20,200,-160,20,-142,38,-124,-106,-268,-88,1136,-142,992,-124 + $ ,1010,1028,2,20,20,-124,-124,56,20,200,-124,1028,-106,-88,-124, + $ -106,56,-88,884,-232,1028,-88,-88,-232,-232,272,-16,2,-160,20, + $ -142,-124,-160,20,992,-124,38,-106,992,-124,-448,56,-268,-88 + $ ,1010,-268,-268,884,884,-232/ C 1 T(1,2,5,7,6,3,4) - DATA (CF(I, 3),I= 1, 6) /-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.264197530864197D+01, - $ -1.580246913580247D+00,1.975308641975309D+00,1.975308641975309D - $ -01/ - DATA (CF(I, 3),I= 7, 12) /1.975308641975309D-01, - $ -2.469135802469136D-02,1.975308641975309D+00, - $ -2.469135802469136D-01,1.753086419753086D+00,1.530864197530864D - $ +00/ - DATA (CF(I, 3),I= 13, 18) /-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 3),I= 19, 24) /-2.469135802469136D-01, - $ -2.469135802469136D-02,1.530864197530864D+00, - $ -6.913580246913580D-01,-2.469135802469136D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 3),I= 25, 30) /1.975308641975309D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 3),I= 31, 36) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01/ - DATA (CF(I, 3),I= 37, 42) /1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I, 3),I= 43, 48) /3.086419753086420D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02, - $ -1.913580246913580D-01/ - DATA (CF(I, 3),I= 49, 54) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01/ - DATA (CF(I, 3),I= 55, 60) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,1.530864197530864D+00, - $ -1.913580246913580D-01,5.864197530864197D-02, - $ -1.635802469135803D-01/ - DATA (CF(I, 3),I= 61, 66) /1.530864197530864D+00, - $ -1.913580246913580D-01,-6.913580246913580D-01 - $ ,8.641975308641975D-02,-4.135802469135803D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 3),I= 67, 72) /1.558641975308642D+00, - $ -4.135802469135803D-01,-4.135802469135803D-01 - $ ,1.364197530864198D+00,1.364197530864198D+00, - $ -3.580246913580247D-01/ - DATA (CF(I, 3),I= 73, 78) /1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I, 3),I= 79, 84) /1.975308641975309D+00, - $ -2.469135802469136D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02,3.086419753086420D - $ -01/ - DATA (CF(I, 3),I= 85, 90) /1.753086419753086D+00, - $ -2.191358024691358D-01,1.530864197530864D+00, - $ -1.913580246913580D-01,1.558641975308642D+00,1.586419753086420D - $ +00/ - DATA (CF(I, 3),I= 91, 96) /-2.191358024691358D-01 - $ ,5.864197530864197D-02,-1.913580246913580D-01, - $ -1.635802469135803D-01,-4.135802469135803D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 3),I= 97,102) /3.086419753086420D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02, - $ -1.913580246913580D-01/ - DATA (CF(I, 3),I=103,108) /3.086419753086420D-01 - $ ,3.086419753086420D-02,-1.635802469135803D-01, - $ -1.358024691358025D-01,-1.913580246913580D-01 - $ ,1.586419753086420D+00/ - DATA (CF(I, 3),I=109,114) /1.586419753086420D+00, - $ -1.358024691358025D-01,-1.358024691358025D-01, - $ -3.580246913580247D-01,-3.580246913580247D-01 - $ ,4.197530864197531D-01/ - DATA (CF(I, 3),I=115,120) /-1.913580246913580D-01, - $ -1.635802469135803D-01,8.641975308641975D-02, - $ -1.358024691358025D-01,1.364197530864198D+00, - $ -3.580246913580247D-01/ + DATA (CF(I),I=240,357) /4096,-1024,1280,128,128,-16,1280,-160 + $ ,1136,992,-1024,128,128,-16,-16,-160,-160,-16,992,-448,-160,992 + $ ,128,-16,-1024,128,-160,-16,-16,2,-160,20,-142,-124,128,-16,-16 + $ ,2,2,20,20,2,-124,56,20,-124,-16,2,-160,20,-142,-124,-160,20 + $ ,992,-124,38,-106,992,-124,-448,56,-268,-88,1010,-268,-268,884 + $ ,884,-232,128,-16,-16,2,2,20,1280,-160,-160,20,20,200,1136,-142 + $ ,992,-124,1010,1028,-142,38,-124,-106,-268,-88,20,2,-124,56,20, + $ -124,200,20,-106,-88,-124,1028,1028,-88,-88,-232,-232,272,-124, + $ -106,56,-88,884,-232/ C 1 T(1,2,6,5,7,3,4) - DATA (CF(I, 4),I= 1, 6) /1.975308641975309D-01 - $ ,1.975308641975309D+00,-1.580246913580247D+00 - $ ,1.264197530864197D+01,1.975308641975309D-01, - $ -1.580246913580247D+00/ - DATA (CF(I, 4),I= 7, 12) /-2.469135802469136D-02, - $ -2.469135802469136D-01,-2.469135802469136D-01 - $ ,1.530864197530864D+00,1.530864197530864D+00, - $ -6.913580246913580D-01/ - DATA (CF(I, 4),I= 13, 18) /1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 4),I= 19, 24) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,1.753086419753086D+00,1.530864197530864D - $ +00,1.975308641975309D+00,-2.469135802469136D-01/ - DATA (CF(I, 4),I= 25, 30) /-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 4),I= 31, 36) /3.086419753086420D-03 - $ ,3.086419753086420D-02,3.086419753086420D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 4),I= 37, 42) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03,3.086419753086420D - $ -02,-2.469135802469136D-02,3.086419753086420D-03/ - DATA (CF(I, 4),I= 43, 48) /3.086419753086420D-03, - $ -2.469135802469136D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02/ - DATA (CF(I, 4),I= 49, 54) /3.086419753086420D-03 - $ ,3.086419753086420D-02,3.086419753086420D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 4),I= 55, 60) /3.086419753086420D-02 - $ ,3.086419753086420D-01,-1.913580246913580D-01 - $ ,1.586419753086420D+00,-1.635802469135803D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 4),I= 61, 66) /-1.913580246913580D-01, - $ -1.635802469135803D-01,8.641975308641975D-02, - $ -1.358024691358025D-01,1.364197530864198D+00, - $ -3.580246913580247D-01/ - DATA (CF(I, 4),I= 67, 72) /1.586419753086420D+00, - $ -1.358024691358025D-01,-1.358024691358025D-01, - $ -3.580246913580247D-01,-3.580246913580247D-01 - $ ,4.197530864197531D-01/ - DATA (CF(I, 4),I= 73, 78) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03,3.086419753086420D - $ -02,-2.469135802469136D-02,3.086419753086420D-03/ - DATA (CF(I, 4),I= 79, 84) /-2.469135802469136D-01 - $ ,1.975308641975309D+00,3.086419753086420D-02,3.086419753086420D - $ -01,-2.469135802469136D-01,3.086419753086420D-02/ - DATA (CF(I, 4),I= 85, 90) /-2.191358024691358D-01 - $ ,5.864197530864197D-02,-1.913580246913580D-01, - $ -1.635802469135803D-01,-4.135802469135803D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 4),I= 91, 96) /1.753086419753086D+00, - $ -2.191358024691358D-01,1.530864197530864D+00, - $ -1.913580246913580D-01,1.558641975308642D+00,1.586419753086420D - $ +00/ - DATA (CF(I, 4),I= 97,102) /3.086419753086420D-03, - $ -2.469135802469136D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02/ - DATA (CF(I, 4),I=103,108) /3.086419753086420D-02, - $ -2.469135802469136D-01,5.864197530864197D-02, - $ -1.635802469135803D-01,1.530864197530864D+00, - $ -1.913580246913580D-01/ - DATA (CF(I, 4),I=109,114) /1.558641975308642D+00, - $ -4.135802469135803D-01,-4.135802469135803D-01 - $ ,1.364197530864198D+00,1.364197530864198D+00, - $ -3.580246913580247D-01/ - DATA (CF(I, 4),I=115,120) /1.530864197530864D+00, - $ -1.913580246913580D-01,-6.913580246913580D-01 - $ ,8.641975308641975D-02,-4.135802469135803D-01, - $ -1.358024691358025D-01/ + DATA (CF(I),I=358,474) /4096,128,-1024,-16,-160,-160,992,992, + $ -448,128,-1024,-16,-160,128,-16,-16,128,1136,992,1280,-160,-16, + $ -160,128,-1024,-16,128,2,20,20,-124,-124,56,-16,128,2,20,-16,2 + $ ,2,-16,-142,-124,-160,20,2,20,20,-124,-124,56,20,200,-124,1028, + $ -106,-88,-124,-106,56,-88,884,-232,1028,-88,-88,-232,-232,272, + $ -16,128,2,20,-16,2,-160,1280,20,200,-160,20,-142,38,-124,-106, + $ -268,-88,1136,-142,992,-124,1010,1028,2,-16,-142,-124,-160,20 + $ ,20,-160,38,-106,992,-124,1010,-268,-268,884,884,-232,992,-124, + $ -448,56,-268,-88/ C 1 T(1,2,6,7,5,3,4) - DATA (CF(I, 5),I= 1, 6) /1.975308641975309D-01, - $ -1.580246913580247D+00,1.975308641975309D+00,1.975308641975309D - $ -01,1.264197530864197D+01,-1.580246913580247D+00/ - DATA (CF(I, 5),I= 7, 12) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,1.753086419753086D+00,1.530864197530864D - $ +00,1.975308641975309D+00,-2.469135802469136D-01/ - DATA (CF(I, 5),I= 13, 18) /-2.469135802469136D-01, - $ -2.469135802469136D-02,1.530864197530864D+00, - $ -6.913580246913580D-01,-2.469135802469136D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 5),I= 19, 24) /-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 5),I= 25, 30) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01/ - DATA (CF(I, 5),I= 31, 36) /3.086419753086420D-03, - $ -2.469135802469136D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02/ - DATA (CF(I, 5),I= 37, 42) /3.086419753086420D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02, - $ -1.913580246913580D-01/ - DATA (CF(I, 5),I= 43, 48) /1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I, 5),I= 49, 54) /3.086419753086420D-03, - $ -2.469135802469136D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02/ - DATA (CF(I, 5),I= 55, 60) /3.086419753086420D-02, - $ -2.469135802469136D-01,5.864197530864197D-02, - $ -1.635802469135803D-01,1.530864197530864D+00, - $ -1.913580246913580D-01/ - DATA (CF(I, 5),I= 61, 66) /1.558641975308642D+00, - $ -4.135802469135803D-01,-4.135802469135803D-01 - $ ,1.364197530864198D+00,1.364197530864198D+00, - $ -3.580246913580247D-01/ - DATA (CF(I, 5),I= 67, 72) /1.530864197530864D+00, - $ -1.913580246913580D-01,-6.913580246913580D-01 - $ ,8.641975308641975D-02,-4.135802469135803D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 5),I= 73, 78) /3.086419753086420D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02, - $ -1.913580246913580D-01/ - DATA (CF(I, 5),I= 79, 84) /3.086419753086420D-01 - $ ,3.086419753086420D-02,-1.635802469135803D-01, - $ -1.358024691358025D-01,-1.913580246913580D-01 - $ ,1.586419753086420D+00/ - DATA (CF(I, 5),I= 85, 90) /1.586419753086420D+00, - $ -1.358024691358025D-01,-1.358024691358025D-01, - $ -3.580246913580247D-01,-3.580246913580247D-01 - $ ,4.197530864197531D-01/ - DATA (CF(I, 5),I= 91, 96) /-1.913580246913580D-01, - $ -1.635802469135803D-01,8.641975308641975D-02, - $ -1.358024691358025D-01,1.364197530864198D+00, - $ -3.580246913580247D-01/ - DATA (CF(I, 5),I= 97,102) /1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I, 5),I=103,108) /1.975308641975309D+00, - $ -2.469135802469136D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02,3.086419753086420D - $ -01/ - DATA (CF(I, 5),I=109,114) /1.753086419753086D+00, - $ -2.191358024691358D-01,1.530864197530864D+00, - $ -1.913580246913580D-01,1.558641975308642D+00,1.586419753086420D - $ +00/ - DATA (CF(I, 5),I=115,120) /-2.191358024691358D-01 - $ ,5.864197530864197D-02,-1.913580246913580D-01, - $ -1.635802469135803D-01,-4.135802469135803D-01, - $ -1.358024691358025D-01/ + DATA (CF(I),I=475,590) /4096,-1024,-16,128,1136,992,1280,-160, + $ -160,-16,992,-448,-160,992,-1024,128,128,-16,-16,-160,-16,128, + $ -160,-16,-1024,128,2,-16,-142,-124,-160,20,20,2,-124,56,20,-124 + $ ,128,-16,-16,2,2,20,2,-16,-142,-124,-160,20,20,-160,38,-106,992 + $ ,-124,1010,-268,-268,884,884,-232,992,-124,-448,56,-268,-88,20 + $ ,2,-124,56,20,-124,200,20,-106,-88,-124,1028,1028,-88,-88,-232, + $ -232,272,-124,-106,56,-88,884,-232,128,-16,-16,2,2,20,1280,-160 + $ ,-160,20,20,200,1136,-142,992,-124,1010,1028,-142,38,-124,-106, + $ -268,-88/ C 1 T(1,2,7,5,6,3,4) - DATA (CF(I, 6),I= 1, 6) /1.975308641975309D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -1.580246913580247D+00,-1.580246913580247D+00 - $ ,1.264197530864197D+01/ - DATA (CF(I, 6),I= 7, 12) /-2.469135802469136D-01, - $ -2.469135802469136D-02,1.530864197530864D+00, - $ -6.913580246913580D-01,-2.469135802469136D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 6),I= 13, 18) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,1.753086419753086D+00,1.530864197530864D - $ +00,1.975308641975309D+00,-2.469135802469136D-01/ - DATA (CF(I, 6),I= 19, 24) /1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 6),I= 25, 30) /-2.469135802469136D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -1.580246913580247D+00/ - DATA (CF(I, 6),I= 31, 36) /3.086419753086420D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02, - $ -1.913580246913580D-01/ - DATA (CF(I, 6),I= 37, 42) /3.086419753086420D-03, - $ -2.469135802469136D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02/ - DATA (CF(I, 6),I= 43, 48) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03,3.086419753086420D - $ -02,-2.469135802469136D-02,3.086419753086420D-03/ - DATA (CF(I, 6),I= 49, 54) /3.086419753086420D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02, - $ -1.913580246913580D-01/ - DATA (CF(I, 6),I= 55, 60) /3.086419753086420D-01 - $ ,3.086419753086420D-02,-1.635802469135803D-01, - $ -1.358024691358025D-01,-1.913580246913580D-01 - $ ,1.586419753086420D+00/ - DATA (CF(I, 6),I= 61, 66) /1.586419753086420D+00, - $ -1.358024691358025D-01,-1.358024691358025D-01, - $ -3.580246913580247D-01,-3.580246913580247D-01 - $ ,4.197530864197531D-01/ - DATA (CF(I, 6),I= 67, 72) /-1.913580246913580D-01, - $ -1.635802469135803D-01,8.641975308641975D-02, - $ -1.358024691358025D-01,1.364197530864198D+00, - $ -3.580246913580247D-01/ - DATA (CF(I, 6),I= 73, 78) /3.086419753086420D-03, - $ -2.469135802469136D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02/ - DATA (CF(I, 6),I= 79, 84) /3.086419753086420D-02, - $ -2.469135802469136D-01,5.864197530864197D-02, - $ -1.635802469135803D-01,1.530864197530864D+00, - $ -1.913580246913580D-01/ - DATA (CF(I, 6),I= 85, 90) /1.558641975308642D+00, - $ -4.135802469135803D-01,-4.135802469135803D-01 - $ ,1.364197530864198D+00,1.364197530864198D+00, - $ -3.580246913580247D-01/ - DATA (CF(I, 6),I= 91, 96) /1.530864197530864D+00, - $ -1.913580246913580D-01,-6.913580246913580D-01 - $ ,8.641975308641975D-02,-4.135802469135803D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 6),I= 97,102) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03,3.086419753086420D - $ -02,-2.469135802469136D-02,3.086419753086420D-03/ - DATA (CF(I, 6),I=103,108) /-2.469135802469136D-01 - $ ,1.975308641975309D+00,3.086419753086420D-02,3.086419753086420D - $ -01,-2.469135802469136D-01,3.086419753086420D-02/ - DATA (CF(I, 6),I=109,114) /-2.191358024691358D-01 - $ ,5.864197530864197D-02,-1.913580246913580D-01, - $ -1.635802469135803D-01,-4.135802469135803D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 6),I=115,120) /1.753086419753086D+00, - $ -2.191358024691358D-01,1.530864197530864D+00, - $ -1.913580246913580D-01,1.558641975308642D+00,1.586419753086420D - $ +00/ + DATA (CF(I),I=591,705) /4096,-160,-16,992,-448,-160,992,-16,128 + $ ,1136,992,1280,-160,128,-1024,-16,-160,128,-16,-160,-16,-16,128 + $ ,128,-1024,20,2,-124,56,20,-124,2,-16,-142,-124,-160,20,-16,128 + $ ,2,20,-16,2,20,2,-124,56,20,-124,200,20,-106,-88,-124,1028,1028 + $ ,-88,-88,-232,-232,272,-124,-106,56,-88,884,-232,2,-16,-142, + $ -124,-160,20,20,-160,38,-106,992,-124,1010,-268,-268,884,884, + $ -232,992,-124,-448,56,-268,-88,-16,128,2,20,-16,2,-160,1280,20 + $ ,200,-160,20,-142,38,-124,-106,-268,-88,1136,-142,992,-124,1010 + $ ,1028/ C 1 T(1,2,7,6,5,3,4) - DATA (CF(I, 7),I= 1, 6) /-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 7),I= 7, 12) /1.264197530864197D+01, - $ -1.580246913580247D+00,-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01,1.975308641975309D - $ +00/ - DATA (CF(I, 7),I= 13, 18) /1.975308641975309D+00, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -2.469135802469136D-02,1.530864197530864D+00,1.753086419753086D - $ +00/ - DATA (CF(I, 7),I= 19, 24) /-2.469135802469136D-01 - $ ,1.530864197530864D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01,-6.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 7),I= 25, 30) /1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I, 7),I= 31, 36) /1.975308641975309D+00, - $ -2.469135802469136D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02,3.086419753086420D - $ -01/ - DATA (CF(I, 7),I= 37, 42) /1.753086419753086D+00, - $ -2.191358024691358D-01,1.530864197530864D+00, - $ -1.913580246913580D-01,1.558641975308642D+00,1.586419753086420D - $ +00/ - DATA (CF(I, 7),I= 43, 48) /-2.191358024691358D-01 - $ ,5.864197530864197D-02,-1.913580246913580D-01, - $ -1.635802469135803D-01,-4.135802469135803D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 7),I= 49, 54) /-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 7),I= 55, 60) /1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I, 7),I= 61, 66) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01/ - DATA (CF(I, 7),I= 67, 72) /3.086419753086420D-03 - $ ,3.086419753086420D-02,3.086419753086420D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 7),I= 73, 78) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01, - $ -2.191358024691358D-01/ - DATA (CF(I, 7),I= 79, 84) /1.530864197530864D+00, - $ -1.913580246913580D-01,-6.913580246913580D-01 - $ ,8.641975308641975D-02,-4.135802469135803D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 7),I= 85, 90) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,1.530864197530864D+00, - $ -1.913580246913580D-01,5.864197530864197D-02, - $ -1.635802469135803D-01/ - DATA (CF(I, 7),I= 91, 96) /-4.135802469135803D-01 - $ ,1.558641975308642D+00,1.364197530864198D+00, - $ -3.580246913580247D-01,-4.135802469135803D-01 - $ ,1.364197530864198D+00/ - DATA (CF(I, 7),I= 97,102) /3.086419753086420D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02,8.641975308641975D-02,-1.913580246913580D-01/ - DATA (CF(I, 7),I=103,108) /-1.913580246913580D-01, - $ -1.635802469135803D-01,8.641975308641975D-02, - $ -1.358024691358025D-01,1.364197530864198D+00, - $ -3.580246913580247D-01/ - DATA (CF(I, 7),I=109,114) /3.086419753086420D-02 - $ ,3.086419753086420D-01,-1.913580246913580D-01 - $ ,1.586419753086420D+00,-1.635802469135803D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 7),I=115,120) /-1.358024691358025D-01 - $ ,1.586419753086420D+00,-3.580246913580247D-01 - $ ,4.197530864197531D-01,-1.358024691358025D-01, - $ -3.580246913580247D-01/ + DATA (CF(I),I=706,819) /4096,-1024,-1024,128,128,1280,1280,-160 + $ ,128,-16,992,1136,-160,992,-16,-160,-448,992,128,-16,-16,2,2,20 + $ ,1280,-160,-160,20,20,200,1136,-142,992,-124,1010,1028,-142,38, + $ -124,-106,-268,-88,-1024,128,128,-16,-16,-160,128,-16,-16,2,2 + $ ,20,-16,2,-160,20,-142,-124,2,20,20,-124,-124,56,-160,20,-16,2, + $ -124,-142,992,-124,-448,56,-268,-88,-160,20,992,-124,38,-106, + $ -268,1010,884,-232,-268,884,20,-124,2,20,56,-124,-124,-106,56, + $ -88,884,-232,20,200,-124,1028,-106,-88,-88,1028,-232,272,-88, + $ -232/ C 1 T(1,5,2,6,7,3,4) - DATA (CF(I, 8),I= 1, 6) /1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 8),I= 7, 12) /-1.580246913580247D+00 - $ ,1.264197530864197D+01,1.975308641975309D-01,1.975308641975309D - $ +00,-1.580246913580247D+00,1.975308641975309D-01/ - DATA (CF(I, 8),I= 13, 18) /-2.469135802469136D-01 - $ ,1.530864197530864D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01,-6.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 8),I= 19, 24) /1.975308641975309D+00, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -2.469135802469136D-02,1.530864197530864D+00,1.753086419753086D - $ +00/ - DATA (CF(I, 8),I= 25, 30) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03,3.086419753086420D - $ -02,-2.469135802469136D-02,3.086419753086420D-03/ - DATA (CF(I, 8),I= 31, 36) /-2.469135802469136D-01 - $ ,1.975308641975309D+00,3.086419753086420D-02,3.086419753086420D - $ -01,-2.469135802469136D-01,3.086419753086420D-02/ - DATA (CF(I, 8),I= 37, 42) /-2.191358024691358D-01 - $ ,5.864197530864197D-02,-1.913580246913580D-01, - $ -1.635802469135803D-01,-4.135802469135803D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 8),I= 43, 48) /1.753086419753086D+00, - $ -2.191358024691358D-01,1.530864197530864D+00, - $ -1.913580246913580D-01,1.558641975308642D+00,1.586419753086420D - $ +00/ - DATA (CF(I, 8),I= 49, 54) /1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 8),I= 55, 60) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03,3.086419753086420D - $ -02,-2.469135802469136D-02,3.086419753086420D-03/ - DATA (CF(I, 8),I= 61, 66) /3.086419753086420D-03 - $ ,3.086419753086420D-02,3.086419753086420D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 8),I= 67, 72) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01/ - DATA (CF(I, 8),I= 73, 78) /3.086419753086420D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02,8.641975308641975D-02,-1.913580246913580D-01/ - DATA (CF(I, 8),I= 79, 84) /-1.913580246913580D-01, - $ -1.635802469135803D-01,8.641975308641975D-02, - $ -1.358024691358025D-01,1.364197530864198D+00, - $ -3.580246913580247D-01/ - DATA (CF(I, 8),I= 85, 90) /3.086419753086420D-02 - $ ,3.086419753086420D-01,-1.913580246913580D-01 - $ ,1.586419753086420D+00,-1.635802469135803D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 8),I= 91, 96) /-1.358024691358025D-01 - $ ,1.586419753086420D+00,-3.580246913580247D-01 - $ ,4.197530864197531D-01,-1.358024691358025D-01, - $ -3.580246913580247D-01/ - DATA (CF(I, 8),I= 97,102) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01, - $ -2.191358024691358D-01/ - DATA (CF(I, 8),I=103,108) /1.530864197530864D+00, - $ -1.913580246913580D-01,-6.913580246913580D-01 - $ ,8.641975308641975D-02,-4.135802469135803D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 8),I=109,114) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,1.530864197530864D+00, - $ -1.913580246913580D-01,5.864197530864197D-02, - $ -1.635802469135803D-01/ - DATA (CF(I, 8),I=115,120) /-4.135802469135803D-01 - $ ,1.558641975308642D+00,1.364197530864198D+00, - $ -3.580246913580247D-01,-4.135802469135803D-01 - $ ,1.364197530864198D+00/ + DATA (CF(I),I=820,932) /4096,128,1280,-1024,128,-160,992,-16, + $ -160,-448,992,1280,-160,128,-16,992,1136,-16,128,2,20,-16,2, + $ -160,1280,20,200,-160,20,-142,38,-124,-106,-268,-88,1136,-142 + $ ,992,-124,1010,1028,128,-1024,-16,-160,128,-16,-16,128,2,20,-16 + $ ,2,2,20,20,-124,-124,56,-16,2,-160,20,-142,-124,20,-124,2,20,56 + $ ,-124,-124,-106,56,-88,884,-232,20,200,-124,1028,-106,-88,-88 + $ ,1028,-232,272,-88,-232,-160,20,-16,2,-124,-142,992,-124,-448 + $ ,56,-268,-88,-160,20,992,-124,38,-106,-268,1010,884,-232,-268 + $ ,884/ C 1 T(1,5,2,7,6,3,4) - DATA (CF(I, 9),I= 1, 6) /1.975308641975309D-01, - $ -2.469135802469136D-02,1.975308641975309D+00, - $ -2.469135802469136D-01,1.753086419753086D+00,1.530864197530864D - $ +00/ - DATA (CF(I, 9),I= 7, 12) /-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.264197530864197D+01, - $ -1.580246913580247D+00,1.975308641975309D+00,1.975308641975309D - $ -01/ - DATA (CF(I, 9),I= 13, 18) /1.975308641975309D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 9),I= 19, 24) /1.530864197530864D+00, - $ -6.913580246913580D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02,1.530864197530864D+00, - $ -2.469135802469136D-01/ - DATA (CF(I, 9),I= 25, 30) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01/ - DATA (CF(I, 9),I= 31, 36) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,1.530864197530864D+00, - $ -1.913580246913580D-01,5.864197530864197D-02, - $ -1.635802469135803D-01/ - DATA (CF(I, 9),I= 37, 42) /1.530864197530864D+00, - $ -1.913580246913580D-01,-6.913580246913580D-01 - $ ,8.641975308641975D-02,-4.135802469135803D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 9),I= 43, 48) /1.558641975308642D+00, - $ -4.135802469135803D-01,-4.135802469135803D-01 - $ ,1.364197530864198D+00,1.364197530864198D+00, - $ -3.580246913580247D-01/ - DATA (CF(I, 9),I= 49, 54) /1.975308641975309D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 9),I= 55, 60) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01/ - DATA (CF(I, 9),I= 61, 66) /1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I, 9),I= 67, 72) /3.086419753086420D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02, - $ -1.913580246913580D-01/ - DATA (CF(I, 9),I= 73, 78) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,1.975308641975309D-01, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I, 9),I= 79, 84) /1.753086419753086D+00, - $ -2.191358024691358D-01,1.530864197530864D+00, - $ -1.913580246913580D-01,1.558641975308642D+00,1.586419753086420D - $ +00/ - DATA (CF(I, 9),I= 85, 90) /1.975308641975309D+00, - $ -2.469135802469136D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02,3.086419753086420D - $ -01/ - DATA (CF(I, 9),I= 91, 96) /5.864197530864197D-02, - $ -2.191358024691358D-01,-4.135802469135803D-01, - $ -1.358024691358025D-01,-1.913580246913580D-01, - $ -1.635802469135803D-01/ - DATA (CF(I, 9),I= 97,102) /-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02,3.086419753086420D - $ -03,-1.913580246913580D-01,3.086419753086420D-02/ - DATA (CF(I, 9),I=103,108) /1.586419753086420D+00, - $ -1.358024691358025D-01,-1.358024691358025D-01, - $ -3.580246913580247D-01,-3.580246913580247D-01 - $ ,4.197530864197531D-01/ - DATA (CF(I, 9),I=109,114) /3.086419753086420D-01 - $ ,3.086419753086420D-02,-1.635802469135803D-01, - $ -1.358024691358025D-01,-1.913580246913580D-01 - $ ,1.586419753086420D+00/ - DATA (CF(I, 9),I=115,120) /-1.635802469135803D-01, - $ -1.913580246913580D-01,1.364197530864198D+00, - $ -3.580246913580247D-01,8.641975308641975D-02, - $ -1.358024691358025D-01/ + DATA (CF(I),I=933,1044) /4096,-1024,1280,128,128,-16,-1024,128, + $ -160,-16,992,-448,-160,-16,992,-160,-16,2,-160,20,-142,-124, + $ -160,20,992,-124,38,-106,992,-124,-448,56,-268,-88,1010,-268, + $ -268,884,884,-232,128,-16,-1024,128,-160,-16,-16,2,-160,20,-142 + $ ,-124,128,-16,-16,2,2,20,20,2,-124,56,20,-124,-16,2,128,-16,20 + $ ,2,1136,-142,992,-124,1010,1028,1280,-160,-160,20,20,200,38, + $ -142,-268,-88,-124,-106,-124,56,20,2,-124,20,1028,-88,-88,-232, + $ -232,272,200,20,-106,-88,-124,1028,-106,-124,884,-232,56,-88/ C 1 T(1,5,6,2,7,3,4) - DATA (CF(I, 10),I= 1, 6) /-2.469135802469136D-02, - $ -2.469135802469136D-01,-2.469135802469136D-01 - $ ,1.530864197530864D+00,1.530864197530864D+00, - $ -6.913580246913580D-01/ - DATA (CF(I, 10),I= 7, 12) /1.975308641975309D-01 - $ ,1.975308641975309D+00,-1.580246913580247D+00 - $ ,1.264197530864197D+01,1.975308641975309D-01, - $ -1.580246913580247D+00/ - DATA (CF(I, 10),I= 13, 18) /-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 10),I= 19, 24) /1.753086419753086D+00 - $ ,1.530864197530864D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01,-2.469135802469136D-01 - $ ,1.975308641975309D+00/ - DATA (CF(I, 10),I= 25, 30) /3.086419753086420D-03 - $ ,3.086419753086420D-02,3.086419753086420D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 10),I= 31, 36) /3.086419753086420D-02 - $ ,3.086419753086420D-01,-1.913580246913580D-01 - $ ,1.586419753086420D+00,-1.635802469135803D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 10),I= 37, 42) /-1.913580246913580D-01, - $ -1.635802469135803D-01,8.641975308641975D-02, - $ -1.358024691358025D-01,1.364197530864198D+00, - $ -3.580246913580247D-01/ - DATA (CF(I, 10),I= 43, 48) /1.586419753086420D+00, - $ -1.358024691358025D-01,-1.358024691358025D-01, - $ -3.580246913580247D-01,-3.580246913580247D-01 - $ ,4.197530864197531D-01/ - DATA (CF(I, 10),I= 49, 54) /-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 10),I= 55, 60) /3.086419753086420D-03 - $ ,3.086419753086420D-02,3.086419753086420D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 10),I= 61, 66) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03,3.086419753086420D - $ -02,-2.469135802469136D-02,3.086419753086420D-03/ - DATA (CF(I, 10),I= 67, 72) /3.086419753086420D-03, - $ -2.469135802469136D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02/ - DATA (CF(I, 10),I= 73, 78) /3.086419753086420D-03 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I, 10),I= 79, 84) /-2.191358024691358D-01 - $ ,5.864197530864197D-02,-1.913580246913580D-01, - $ -1.635802469135803D-01,-4.135802469135803D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 10),I= 85, 90) /-2.469135802469136D-01 - $ ,1.975308641975309D+00,3.086419753086420D-02,3.086419753086420D - $ -01,-2.469135802469136D-01,3.086419753086420D-02/ - DATA (CF(I, 10),I= 91, 96) /-2.191358024691358D-01 - $ ,1.753086419753086D+00,1.558641975308642D+00,1.586419753086420D - $ +00,1.530864197530864D+00,-1.913580246913580D-01/ - DATA (CF(I, 10),I= 97,102) /-2.191358024691358D-01, - $ -1.913580246913580D-01,3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 10),I=103,108) /1.558641975308642D+00, - $ -4.135802469135803D-01,-4.135802469135803D-01 - $ ,1.364197530864198D+00,1.364197530864198D+00, - $ -3.580246913580247D-01/ - DATA (CF(I, 10),I=109,114) /3.086419753086420D-02, - $ -2.469135802469136D-01,5.864197530864197D-02, - $ -1.635802469135803D-01,1.530864197530864D+00, - $ -1.913580246913580D-01/ - DATA (CF(I, 10),I=115,120) /-1.913580246913580D-01 - $ ,1.530864197530864D+00,-4.135802469135803D-01, - $ -1.358024691358025D-01,-6.913580246913580D-01 - $ ,8.641975308641975D-02/ + DATA (CF(I),I=1045,1155) /4096,128,-1024,-16,-160,128,-1024,-16 + $ ,128,1136,992,-16,128,-160,1280,2,20,20,-124,-124,56,20,200, + $ -124,1028,-106,-88,-124,-106,56,-88,884,-232,1028,-88,-88,-232, + $ -232,272,-16,-160,128,-1024,-16,128,2,20,20,-124,-124,56,-16 + $ ,128,2,20,-16,2,2,-16,-142,-124,-160,20,2,20,-16,128,2,-16,-142 + $ ,38,-124,-106,-268,-88,-160,1280,20,200,-160,20,-142,1136,1010 + $ ,1028,992,-124,-142,-124,2,-16,20,-160,1010,-268,-268,884,884, + $ -232,20,-160,38,-106,992,-124,-124,992,-268,-88,-448,56/ C 1 T(1,5,6,7,2,3,4) - DATA (CF(I, 11),I= 1, 6) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,1.753086419753086D+00,1.530864197530864D - $ +00,1.975308641975309D+00,-2.469135802469136D-01/ - DATA (CF(I, 11),I= 7, 12) /1.975308641975309D-01, - $ -1.580246913580247D+00,1.975308641975309D+00,1.975308641975309D - $ -01,1.264197530864197D+01,-1.580246913580247D+00/ - DATA (CF(I, 11),I= 13, 18) /1.530864197530864D+00, - $ -6.913580246913580D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02,1.530864197530864D+00, - $ -2.469135802469136D-01/ - DATA (CF(I, 11),I= 19, 24) /1.975308641975309D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 11),I= 25, 30) /3.086419753086420D-03, - $ -2.469135802469136D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02/ - DATA (CF(I, 11),I= 31, 36) /3.086419753086420D-02, - $ -2.469135802469136D-01,5.864197530864197D-02, - $ -1.635802469135803D-01,1.530864197530864D+00, - $ -1.913580246913580D-01/ - DATA (CF(I, 11),I= 37, 42) /1.558641975308642D+00, - $ -4.135802469135803D-01,-4.135802469135803D-01 - $ ,1.364197530864198D+00,1.364197530864198D+00, - $ -3.580246913580247D-01/ - DATA (CF(I, 11),I= 43, 48) /1.530864197530864D+00, - $ -1.913580246913580D-01,-6.913580246913580D-01 - $ ,8.641975308641975D-02,-4.135802469135803D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 11),I= 49, 54) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01/ - DATA (CF(I, 11),I= 55, 60) /3.086419753086420D-03, - $ -2.469135802469136D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02/ - DATA (CF(I, 11),I= 61, 66) /3.086419753086420D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02, - $ -1.913580246913580D-01/ - DATA (CF(I, 11),I= 67, 72) /1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I, 11),I= 73, 78) /-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02,3.086419753086420D - $ -03,-1.913580246913580D-01,3.086419753086420D-02/ - DATA (CF(I, 11),I= 79, 84) /1.586419753086420D+00, - $ -1.358024691358025D-01,-1.358024691358025D-01, - $ -3.580246913580247D-01,-3.580246913580247D-01 - $ ,4.197530864197531D-01/ - DATA (CF(I, 11),I= 85, 90) /3.086419753086420D-01 - $ ,3.086419753086420D-02,-1.635802469135803D-01, - $ -1.358024691358025D-01,-1.913580246913580D-01 - $ ,1.586419753086420D+00/ - DATA (CF(I, 11),I= 91, 96) /-1.635802469135803D-01, - $ -1.913580246913580D-01,1.364197530864198D+00, - $ -3.580246913580247D-01,8.641975308641975D-02, - $ -1.358024691358025D-01/ - DATA (CF(I, 11),I= 97,102) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,1.975308641975309D-01, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I, 11),I=103,108) /1.753086419753086D+00, - $ -2.191358024691358D-01,1.530864197530864D+00, - $ -1.913580246913580D-01,1.558641975308642D+00,1.586419753086420D - $ +00/ - DATA (CF(I, 11),I=109,114) /1.975308641975309D+00, - $ -2.469135802469136D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02,3.086419753086420D - $ -01/ - DATA (CF(I, 11),I=115,120) /5.864197530864197D-02, - $ -2.191358024691358D-01,-4.135802469135803D-01, - $ -1.358024691358025D-01,-1.913580246913580D-01, - $ -1.635802469135803D-01/ + DATA (CF(I),I=1156,1265) /4096,-1024,992,-448,-160,-16,992,-160 + $ ,128,-16,-1024,128,-160,-16,2,-16,-142,-124,-160,20,20,-160,38, + $ -106,992,-124,1010,-268,-268,884,884,-232,992,-124,-448,56,-268 + $ ,-88,-16,128,-160,-16,-1024,128,2,-16,-142,-124,-160,20,20,2, + $ -124,56,20,-124,128,-16,-16,2,2,20,-124,56,20,2,-124,20,1028, + $ -88,-88,-232,-232,272,200,20,-106,-88,-124,1028,-106,-124,884, + $ -232,56,-88,-16,2,128,-16,20,2,1136,-142,992,-124,1010,1028 + $ ,1280,-160,-160,20,20,200,38,-142,-268,-88,-124,-106/ C 1 T(1,5,7,2,6,3,4) - DATA (CF(I, 12),I= 1, 6) /-2.469135802469136D-01, - $ -2.469135802469136D-02,1.530864197530864D+00, - $ -6.913580246913580D-01,-2.469135802469136D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 12),I= 7, 12) /1.975308641975309D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -1.580246913580247D+00,-1.580246913580247D+00 - $ ,1.264197530864197D+01/ - DATA (CF(I, 12),I= 13, 18) /1.753086419753086D+00 - $ ,1.530864197530864D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01,-2.469135802469136D-01 - $ ,1.975308641975309D+00/ - DATA (CF(I, 12),I= 19, 24) /-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 12),I= 25, 30) /3.086419753086420D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02, - $ -1.913580246913580D-01/ - DATA (CF(I, 12),I= 31, 36) /3.086419753086420D-01 - $ ,3.086419753086420D-02,-1.635802469135803D-01, - $ -1.358024691358025D-01,-1.913580246913580D-01 - $ ,1.586419753086420D+00/ - DATA (CF(I, 12),I= 37, 42) /1.586419753086420D+00, - $ -1.358024691358025D-01,-1.358024691358025D-01, - $ -3.580246913580247D-01,-3.580246913580247D-01 - $ ,4.197530864197531D-01/ - DATA (CF(I, 12),I= 43, 48) /-1.913580246913580D-01, - $ -1.635802469135803D-01,8.641975308641975D-02, - $ -1.358024691358025D-01,1.364197530864198D+00, - $ -3.580246913580247D-01/ - DATA (CF(I, 12),I= 49, 54) /-2.469135802469136D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -1.580246913580247D+00/ - DATA (CF(I, 12),I= 55, 60) /3.086419753086420D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02, - $ -1.913580246913580D-01/ - DATA (CF(I, 12),I= 61, 66) /3.086419753086420D-03, - $ -2.469135802469136D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02/ - DATA (CF(I, 12),I= 67, 72) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03,3.086419753086420D - $ -02,-2.469135802469136D-02,3.086419753086420D-03/ - DATA (CF(I, 12),I= 73, 78) /-2.191358024691358D-01, - $ -1.913580246913580D-01,3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 12),I= 79, 84) /1.558641975308642D+00, - $ -4.135802469135803D-01,-4.135802469135803D-01 - $ ,1.364197530864198D+00,1.364197530864198D+00, - $ -3.580246913580247D-01/ - DATA (CF(I, 12),I= 85, 90) /3.086419753086420D-02, - $ -2.469135802469136D-01,5.864197530864197D-02, - $ -1.635802469135803D-01,1.530864197530864D+00, - $ -1.913580246913580D-01/ - DATA (CF(I, 12),I= 91, 96) /-1.913580246913580D-01 - $ ,1.530864197530864D+00,-4.135802469135803D-01, - $ -1.358024691358025D-01,-6.913580246913580D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 12),I= 97,102) /3.086419753086420D-03 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I, 12),I=103,108) /-2.191358024691358D-01 - $ ,5.864197530864197D-02,-1.913580246913580D-01, - $ -1.635802469135803D-01,-4.135802469135803D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 12),I=109,114) /-2.469135802469136D-01 - $ ,1.975308641975309D+00,3.086419753086420D-02,3.086419753086420D - $ -01,-2.469135802469136D-01,3.086419753086420D-02/ - DATA (CF(I, 12),I=115,120) /-2.191358024691358D-01 - $ ,1.753086419753086D+00,1.558641975308642D+00,1.586419753086420D - $ +00,1.530864197530864D+00,-1.913580246913580D-01/ + DATA (CF(I),I=1266,1374) /4096,1136,992,-16,128,-160,1280,-16, + $ -160,128,-1024,-16,128,20,2,-124,56,20,-124,200,20,-106,-88, + $ -124,1028,1028,-88,-88,-232,-232,272,-124,-106,56,-88,884,-232, + $ -160,-16,-16,128,128,-1024,20,2,-124,56,20,-124,2,-16,-142,-124 + $ ,-160,20,-16,128,2,20,-16,2,-142,-124,2,-16,20,-160,1010,-268, + $ -268,884,884,-232,20,-160,38,-106,992,-124,-124,992,-268,-88, + $ -448,56,2,20,-16,128,2,-16,-142,38,-124,-106,-268,-88,-160,1280 + $ ,20,200,-160,20,-142,1136,1010,1028,992,-124/ C 1 T(1,5,7,6,2,3,4) - DATA (CF(I, 13),I= 1, 6) /1.975308641975309D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 13),I= 7, 12) /1.975308641975309D+00, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -2.469135802469136D-02,1.530864197530864D+00,1.753086419753086D - $ +00/ - DATA (CF(I, 13),I= 13, 18) /1.264197530864197D+01, - $ -1.580246913580247D+00,-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01,1.975308641975309D - $ +00/ - DATA (CF(I, 13),I= 19, 24) /1.530864197530864D+00, - $ -2.469135802469136D-01,-6.913580246913580D-01 - $ ,1.530864197530864D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 13),I= 25, 30) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,1.975308641975309D-01, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I, 13),I= 31, 36) /1.753086419753086D+00, - $ -2.191358024691358D-01,1.530864197530864D+00, - $ -1.913580246913580D-01,1.558641975308642D+00,1.586419753086420D - $ +00/ - DATA (CF(I, 13),I= 37, 42) /1.975308641975309D+00, - $ -2.469135802469136D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02,3.086419753086420D - $ -01/ - DATA (CF(I, 13),I= 43, 48) /5.864197530864197D-02, - $ -2.191358024691358D-01,-4.135802469135803D-01, - $ -1.358024691358025D-01,-1.913580246913580D-01, - $ -1.635802469135803D-01/ - DATA (CF(I, 13),I= 49, 54) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01, - $ -2.191358024691358D-01/ - DATA (CF(I, 13),I= 55, 60) /1.530864197530864D+00, - $ -1.913580246913580D-01,-6.913580246913580D-01 - $ ,8.641975308641975D-02,-4.135802469135803D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 13),I= 61, 66) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,1.530864197530864D+00, - $ -1.913580246913580D-01,5.864197530864197D-02, - $ -1.635802469135803D-01/ - DATA (CF(I, 13),I= 67, 72) /-4.135802469135803D-01 - $ ,1.558641975308642D+00,1.364197530864198D+00, - $ -3.580246913580247D-01,-4.135802469135803D-01 - $ ,1.364197530864198D+00/ - DATA (CF(I, 13),I= 73, 78) /-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 13),I= 79, 84) /1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I, 13),I= 85, 90) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01/ - DATA (CF(I, 13),I= 91, 96) /3.086419753086420D-03 - $ ,3.086419753086420D-02,3.086419753086420D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 13),I= 97,102) /-1.913580246913580D-01 - $ ,3.086419753086420D-02,8.641975308641975D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I, 13),I=103,108) /-1.635802469135803D-01, - $ -1.913580246913580D-01,1.364197530864198D+00, - $ -3.580246913580247D-01,8.641975308641975D-02, - $ -1.358024691358025D-01/ - DATA (CF(I, 13),I=109,114) /-1.358024691358025D-01 - $ ,1.586419753086420D+00,-3.580246913580247D-01 - $ ,4.197530864197531D-01,-1.358024691358025D-01, - $ -3.580246913580247D-01/ - DATA (CF(I, 13),I=115,120) /3.086419753086420D-02 - $ ,3.086419753086420D-01,-1.913580246913580D-01 - $ ,1.586419753086420D+00,-1.635802469135803D-01, - $ -1.358024691358025D-01/ + DATA (CF(I),I=1375,1482) /4096,-1024,-1024,128,128,1280,992,-160 + $ ,-448,992,-16,-160,-16,2,128,-16,20,2,1136,-142,992,-124,1010 + $ ,1028,1280,-160,-160,20,20,200,38,-142,-268,-88,-124,-106,-160 + $ ,20,-16,2,-124,-142,992,-124,-448,56,-268,-88,-160,20,992,-124 + $ ,38,-106,-268,1010,884,-232,-268,884,-1024,128,128,-16,-16,-160 + $ ,128,-16,-16,2,2,20,-16,2,-160,20,-142,-124,2,20,20,-124,-124 + $ ,56,-124,20,56,-124,2,20,-106,-124,884,-232,56,-88,-88,1028, + $ -232,272,-88,-232,20,200,-124,1028,-106,-88/ C 1 T(1,6,2,5,7,3,4) - DATA (CF(I, 14),I= 1, 6) /-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 14),I= 7, 12) /-2.469135802469136D-01 - $ ,1.530864197530864D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01,-6.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 14),I= 13, 18) /-1.580246913580247D+00 - $ ,1.264197530864197D+01,1.975308641975309D-01,1.975308641975309D - $ +00,-1.580246913580247D+00,1.975308641975309D-01/ - DATA (CF(I, 14),I= 19, 24) /-2.469135802469136D-01 - $ ,1.975308641975309D+00,1.530864197530864D+00,1.753086419753086D - $ +00,1.975308641975309D-01,-2.469135802469136D-02/ - DATA (CF(I, 14),I= 25, 30) /3.086419753086420D-03 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I, 14),I= 31, 36) /-2.191358024691358D-01 - $ ,5.864197530864197D-02,-1.913580246913580D-01, - $ -1.635802469135803D-01,-4.135802469135803D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 14),I= 37, 42) /-2.469135802469136D-01 - $ ,1.975308641975309D+00,3.086419753086420D-02,3.086419753086420D - $ -01,-2.469135802469136D-01,3.086419753086420D-02/ - DATA (CF(I, 14),I= 43, 48) /-2.191358024691358D-01 - $ ,1.753086419753086D+00,1.558641975308642D+00,1.586419753086420D - $ +00,1.530864197530864D+00,-1.913580246913580D-01/ - DATA (CF(I, 14),I= 49, 54) /3.086419753086420D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02,8.641975308641975D-02,-1.913580246913580D-01/ - DATA (CF(I, 14),I= 55, 60) /-1.913580246913580D-01, - $ -1.635802469135803D-01,8.641975308641975D-02, - $ -1.358024691358025D-01,1.364197530864198D+00, - $ -3.580246913580247D-01/ - DATA (CF(I, 14),I= 61, 66) /3.086419753086420D-02 - $ ,3.086419753086420D-01,-1.913580246913580D-01 - $ ,1.586419753086420D+00,-1.635802469135803D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 14),I= 67, 72) /-1.358024691358025D-01 - $ ,1.586419753086420D+00,-3.580246913580247D-01 - $ ,4.197530864197531D-01,-1.358024691358025D-01, - $ -3.580246913580247D-01/ - DATA (CF(I, 14),I= 73, 78) /1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 14),I= 79, 84) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03,3.086419753086420D - $ -02,-2.469135802469136D-02,3.086419753086420D-03/ - DATA (CF(I, 14),I= 85, 90) /3.086419753086420D-03 - $ ,3.086419753086420D-02,3.086419753086420D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 14),I= 91, 96) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01/ - DATA (CF(I, 14),I= 97,102) /3.086419753086420D-02, - $ -2.469135802469136D-01,-1.913580246913580D-01, - $ -2.191358024691358D-01,-2.469135802469136D-02 - $ ,3.086419753086420D-03/ - DATA (CF(I, 14),I=103,108) /-1.913580246913580D-01 - $ ,1.530864197530864D+00,-4.135802469135803D-01, - $ -1.358024691358025D-01,-6.913580246913580D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 14),I=109,114) /-4.135802469135803D-01 - $ ,1.558641975308642D+00,1.364197530864198D+00, - $ -3.580246913580247D-01,-4.135802469135803D-01 - $ ,1.364197530864198D+00/ - DATA (CF(I, 14),I=115,120) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,1.530864197530864D+00, - $ -1.913580246913580D-01,5.864197530864197D-02, - $ -1.635802469135803D-01/ + DATA (CF(I),I=1483,1589) /4096,128,1280,-1024,128,-160,1280,992 + $ ,1136,128,-16,2,20,-16,128,2,-16,-142,38,-124,-106,-268,-88, + $ -160,1280,20,200,-160,20,-142,1136,1010,1028,992,-124,20,-124,2 + $ ,20,56,-124,-124,-106,56,-88,884,-232,20,200,-124,1028,-106,-88 + $ ,-88,1028,-232,272,-88,-232,128,-1024,-16,-160,128,-16,-16,128 + $ ,2,20,-16,2,2,20,20,-124,-124,56,-16,2,-160,20,-142,-124,20, + $ -160,-124,-142,-16,2,-124,992,-268,-88,-448,56,-268,1010,884, + $ -232,-268,884,-160,20,992,-124,38,-106/ C 1 T(1,6,2,7,5,3,4) - DATA (CF(I, 15),I= 1, 6) /1.975308641975309D+00, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -2.469135802469136D-02,1.530864197530864D+00,1.753086419753086D - $ +00/ - DATA (CF(I, 15),I= 7, 12) /1.975308641975309D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 15),I= 13, 18) /-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.264197530864197D+01, - $ -1.580246913580247D+00,1.975308641975309D+00,1.975308641975309D - $ -01/ - DATA (CF(I, 15),I= 19, 24) /-6.913580246913580D-01 - $ ,1.530864197530864D+00,1.530864197530864D+00, - $ -2.469135802469136D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 15),I= 25, 30) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01, - $ -2.191358024691358D-01/ - DATA (CF(I, 15),I= 31, 36) /1.530864197530864D+00, - $ -1.913580246913580D-01,-6.913580246913580D-01 - $ ,8.641975308641975D-02,-4.135802469135803D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 15),I= 37, 42) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,1.530864197530864D+00, - $ -1.913580246913580D-01,5.864197530864197D-02, - $ -1.635802469135803D-01/ - DATA (CF(I, 15),I= 43, 48) /-4.135802469135803D-01 - $ ,1.558641975308642D+00,1.364197530864198D+00, - $ -3.580246913580247D-01,-4.135802469135803D-01 - $ ,1.364197530864198D+00/ - DATA (CF(I, 15),I= 49, 54) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,1.975308641975309D-01, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I, 15),I= 55, 60) /1.753086419753086D+00, - $ -2.191358024691358D-01,1.530864197530864D+00, - $ -1.913580246913580D-01,1.558641975308642D+00,1.586419753086420D - $ +00/ - DATA (CF(I, 15),I= 61, 66) /1.975308641975309D+00, - $ -2.469135802469136D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02,3.086419753086420D - $ -01/ - DATA (CF(I, 15),I= 67, 72) /5.864197530864197D-02, - $ -2.191358024691358D-01,-4.135802469135803D-01, - $ -1.358024691358025D-01,-1.913580246913580D-01, - $ -1.635802469135803D-01/ - DATA (CF(I, 15),I= 73, 78) /1.975308641975309D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 15),I= 79, 84) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01/ - DATA (CF(I, 15),I= 85, 90) /1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I, 15),I= 91, 96) /3.086419753086420D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02, - $ -1.913580246913580D-01/ - DATA (CF(I, 15),I= 97,102) /8.641975308641975D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I, 15),I=103,108) /-1.358024691358025D-01 - $ ,1.586419753086420D+00,-3.580246913580247D-01 - $ ,4.197530864197531D-01,-1.358024691358025D-01, - $ -3.580246913580247D-01/ - DATA (CF(I, 15),I=109,114) /-1.635802469135803D-01, - $ -1.913580246913580D-01,1.364197530864198D+00, - $ -3.580246913580247D-01,8.641975308641975D-02, - $ -1.358024691358025D-01/ - DATA (CF(I, 15),I=115,120) /3.086419753086420D-01 - $ ,3.086419753086420D-02,-1.635802469135803D-01, - $ -1.358024691358025D-01,-1.913580246913580D-01 - $ ,1.586419753086420D+00/ + DATA (CF(I),I=1590,1695) /4096,-1024,1280,128,-448,992,992,-160, + $ -160,-16,-160,20,-16,2,-124,-142,992,-124,-448,56,-268,-88,-160 + $ ,20,992,-124,38,-106,-268,1010,884,-232,-268,884,-16,2,128,-16 + $ ,20,2,1136,-142,992,-124,1010,1028,1280,-160,-160,20,20,200,38, + $ -142,-268,-88,-124,-106,128,-16,-1024,128,-160,-16,-16,2,-160 + $ ,20,-142,-124,128,-16,-16,2,2,20,20,2,-124,56,20,-124,56,-124, + $ -124,20,20,2,-88,1028,-232,272,-88,-232,-106,-124,884,-232,56, + $ -88,200,20,-106,-88,-124,1028/ C 1 T(1,6,5,2,7,3,4) - DATA (CF(I, 16),I= 1, 6) /-2.469135802469136D-01 - $ ,1.530864197530864D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01,-6.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 16),I= 7, 12) /-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 16),I= 13, 18) /1.975308641975309D-01 - $ ,1.975308641975309D+00,-1.580246913580247D+00 - $ ,1.264197530864197D+01,1.975308641975309D-01, - $ -1.580246913580247D+00/ - DATA (CF(I, 16),I= 19, 24) /1.530864197530864D+00 - $ ,1.753086419753086D+00,-2.469135802469136D-01 - $ ,1.975308641975309D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 16),I= 25, 30) /3.086419753086420D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02,8.641975308641975D-02,-1.913580246913580D-01/ - DATA (CF(I, 16),I= 31, 36) /-1.913580246913580D-01, - $ -1.635802469135803D-01,8.641975308641975D-02, - $ -1.358024691358025D-01,1.364197530864198D+00, - $ -3.580246913580247D-01/ - DATA (CF(I, 16),I= 37, 42) /3.086419753086420D-02 - $ ,3.086419753086420D-01,-1.913580246913580D-01 - $ ,1.586419753086420D+00,-1.635802469135803D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 16),I= 43, 48) /-1.358024691358025D-01 - $ ,1.586419753086420D+00,-3.580246913580247D-01 - $ ,4.197530864197531D-01,-1.358024691358025D-01, - $ -3.580246913580247D-01/ - DATA (CF(I, 16),I= 49, 54) /3.086419753086420D-03 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I, 16),I= 55, 60) /-2.191358024691358D-01 - $ ,5.864197530864197D-02,-1.913580246913580D-01, - $ -1.635802469135803D-01,-4.135802469135803D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 16),I= 61, 66) /-2.469135802469136D-01 - $ ,1.975308641975309D+00,3.086419753086420D-02,3.086419753086420D - $ -01,-2.469135802469136D-01,3.086419753086420D-02/ - DATA (CF(I, 16),I= 67, 72) /-2.191358024691358D-01 - $ ,1.753086419753086D+00,1.558641975308642D+00,1.586419753086420D - $ +00,1.530864197530864D+00,-1.913580246913580D-01/ - DATA (CF(I, 16),I= 73, 78) /-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 16),I= 79, 84) /3.086419753086420D-03 - $ ,3.086419753086420D-02,3.086419753086420D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 16),I= 85, 90) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03,3.086419753086420D - $ -02,-2.469135802469136D-02,3.086419753086420D-03/ - DATA (CF(I, 16),I= 91, 96) /3.086419753086420D-03, - $ -2.469135802469136D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02/ - DATA (CF(I, 16),I= 97,102) /-1.913580246913580D-01, - $ -2.191358024691358D-01,3.086419753086420D-02, - $ -2.469135802469136D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I, 16),I=103,108) /-4.135802469135803D-01 - $ ,1.558641975308642D+00,1.364197530864198D+00, - $ -3.580246913580247D-01,-4.135802469135803D-01 - $ ,1.364197530864198D+00/ - DATA (CF(I, 16),I=109,114) /-1.913580246913580D-01 - $ ,1.530864197530864D+00,-4.135802469135803D-01, - $ -1.358024691358025D-01,-6.913580246913580D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 16),I=115,120) /3.086419753086420D-02, - $ -2.469135802469136D-01,5.864197530864197D-02, - $ -1.635802469135803D-01,1.530864197530864D+00, - $ -1.913580246913580D-01/ + DATA (CF(I),I=1696,1800) /4096,128,-1024,992,1136,-160,1280,-16 + $ ,128,20,-124,2,20,56,-124,-124,-106,56,-88,884,-232,20,200,-124 + $ ,1028,-106,-88,-88,1028,-232,272,-88,-232,2,20,-16,128,2,-16, + $ -142,38,-124,-106,-268,-88,-160,1280,20,200,-160,20,-142,1136 + $ ,1010,1028,992,-124,-16,-160,128,-1024,-16,128,2,20,20,-124, + $ -124,56,-16,128,2,20,-16,2,2,-16,-142,-124,-160,20,-124,-142,20 + $ ,-160,2,-16,-268,1010,884,-232,-268,884,-124,992,-268,-88,-448 + $ ,56,20,-160,38,-106,992,-124/ C 1 T(1,6,5,7,2,3,4) - DATA (CF(I, 17),I= 1, 6) /1.753086419753086D+00 - $ ,1.530864197530864D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01,-2.469135802469136D-01 - $ ,1.975308641975309D+00/ - DATA (CF(I, 17),I= 7, 12) /1.530864197530864D+00, - $ -6.913580246913580D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02,1.530864197530864D+00, - $ -2.469135802469136D-01/ - DATA (CF(I, 17),I= 13, 18) /1.975308641975309D-01, - $ -1.580246913580247D+00,1.975308641975309D+00,1.975308641975309D - $ -01,1.264197530864197D+01,-1.580246913580247D+00/ - DATA (CF(I, 17),I= 19, 24) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01/ - DATA (CF(I, 17),I= 25, 30) /-2.191358024691358D-01, - $ -1.913580246913580D-01,3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 17),I= 31, 36) /1.558641975308642D+00, - $ -4.135802469135803D-01,-4.135802469135803D-01 - $ ,1.364197530864198D+00,1.364197530864198D+00, - $ -3.580246913580247D-01/ - DATA (CF(I, 17),I= 37, 42) /3.086419753086420D-02, - $ -2.469135802469136D-01,5.864197530864197D-02, - $ -1.635802469135803D-01,1.530864197530864D+00, - $ -1.913580246913580D-01/ - DATA (CF(I, 17),I= 43, 48) /-1.913580246913580D-01 - $ ,1.530864197530864D+00,-4.135802469135803D-01, - $ -1.358024691358025D-01,-6.913580246913580D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 17),I= 49, 54) /-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02,3.086419753086420D - $ -03,-1.913580246913580D-01,3.086419753086420D-02/ - DATA (CF(I, 17),I= 55, 60) /1.586419753086420D+00, - $ -1.358024691358025D-01,-1.358024691358025D-01, - $ -3.580246913580247D-01,-3.580246913580247D-01 - $ ,4.197530864197531D-01/ - DATA (CF(I, 17),I= 61, 66) /3.086419753086420D-01 - $ ,3.086419753086420D-02,-1.635802469135803D-01, - $ -1.358024691358025D-01,-1.913580246913580D-01 - $ ,1.586419753086420D+00/ - DATA (CF(I, 17),I= 67, 72) /-1.635802469135803D-01, - $ -1.913580246913580D-01,1.364197530864198D+00, - $ -3.580246913580247D-01,8.641975308641975D-02, - $ -1.358024691358025D-01/ - DATA (CF(I, 17),I= 73, 78) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01/ - DATA (CF(I, 17),I= 79, 84) /3.086419753086420D-03, - $ -2.469135802469136D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02/ - DATA (CF(I, 17),I= 85, 90) /3.086419753086420D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02, - $ -1.913580246913580D-01/ - DATA (CF(I, 17),I= 91, 96) /1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I, 17),I= 97,102) /3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03,1.975308641975309D-01,-2.469135802469136D-02/ - DATA (CF(I, 17),I=103,108) /-2.191358024691358D-01 - $ ,1.753086419753086D+00,1.558641975308642D+00,1.586419753086420D - $ +00,1.530864197530864D+00,-1.913580246913580D-01/ - DATA (CF(I, 17),I=109,114) /5.864197530864197D-02, - $ -2.191358024691358D-01,-4.135802469135803D-01, - $ -1.358024691358025D-01,-1.913580246913580D-01, - $ -1.635802469135803D-01/ - DATA (CF(I, 17),I=115,120) /1.975308641975309D+00, - $ -2.469135802469136D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02,3.086419753086420D - $ -01/ + DATA (CF(I),I=1801,1904) /4096,-1024,-16,128,-160,-16,-1024,128, + $ -142,-124,2,-16,20,-160,1010,-268,-268,884,884,-232,20,-160,38, + $ -106,992,-124,-124,992,-268,-88,-448,56,-124,56,20,2,-124,20 + $ ,1028,-88,-88,-232,-232,272,200,20,-106,-88,-124,1028,-106,-124 + $ ,884,-232,56,-88,-16,128,-160,-16,-1024,128,2,-16,-142,-124, + $ -160,20,20,2,-124,56,20,-124,128,-16,-16,2,2,20,2,-16,20,2,128, + $ -16,-142,1136,1010,1028,992,-124,38,-142,-268,-88,-124,-106 + $ ,1280,-160,-160,20,20,200/ C 1 T(1,6,7,2,5,3,4) - DATA (CF(I, 18),I= 1, 6) /1.530864197530864D+00, - $ -6.913580246913580D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02,1.530864197530864D+00, - $ -2.469135802469136D-01/ - DATA (CF(I, 18),I= 7, 12) /1.753086419753086D+00 - $ ,1.530864197530864D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01,-2.469135802469136D-01 - $ ,1.975308641975309D+00/ - DATA (CF(I, 18),I= 13, 18) /1.975308641975309D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -1.580246913580247D+00,-1.580246913580247D+00 - $ ,1.264197530864197D+01/ - DATA (CF(I, 18),I= 19, 24) /-2.469135802469136D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -1.580246913580247D+00/ - DATA (CF(I, 18),I= 25, 30) /-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02,3.086419753086420D - $ -03,-1.913580246913580D-01,3.086419753086420D-02/ - DATA (CF(I, 18),I= 31, 36) /1.586419753086420D+00, - $ -1.358024691358025D-01,-1.358024691358025D-01, - $ -3.580246913580247D-01,-3.580246913580247D-01 - $ ,4.197530864197531D-01/ - DATA (CF(I, 18),I= 37, 42) /3.086419753086420D-01 - $ ,3.086419753086420D-02,-1.635802469135803D-01, - $ -1.358024691358025D-01,-1.913580246913580D-01 - $ ,1.586419753086420D+00/ - DATA (CF(I, 18),I= 43, 48) /-1.635802469135803D-01, - $ -1.913580246913580D-01,1.364197530864198D+00, - $ -3.580246913580247D-01,8.641975308641975D-02, - $ -1.358024691358025D-01/ - DATA (CF(I, 18),I= 49, 54) /-2.191358024691358D-01, - $ -1.913580246913580D-01,3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 18),I= 55, 60) /1.558641975308642D+00, - $ -4.135802469135803D-01,-4.135802469135803D-01 - $ ,1.364197530864198D+00,1.364197530864198D+00, - $ -3.580246913580247D-01/ - DATA (CF(I, 18),I= 61, 66) /3.086419753086420D-02, - $ -2.469135802469136D-01,5.864197530864197D-02, - $ -1.635802469135803D-01,1.530864197530864D+00, - $ -1.913580246913580D-01/ - DATA (CF(I, 18),I= 67, 72) /-1.913580246913580D-01 - $ ,1.530864197530864D+00,-4.135802469135803D-01, - $ -1.358024691358025D-01,-6.913580246913580D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 18),I= 73, 78) /-2.469135802469136D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -1.580246913580247D+00/ - DATA (CF(I, 18),I= 79, 84) /3.086419753086420D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02, - $ -1.913580246913580D-01/ - DATA (CF(I, 18),I= 85, 90) /3.086419753086420D-03, - $ -2.469135802469136D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02/ - DATA (CF(I, 18),I= 91, 96) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03,3.086419753086420D - $ -02,-2.469135802469136D-02,3.086419753086420D-03/ - DATA (CF(I, 18),I= 97,102) /3.086419753086420D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 18),I=103,108) /5.864197530864197D-02, - $ -2.191358024691358D-01,-4.135802469135803D-01, - $ -1.358024691358025D-01,-1.913580246913580D-01, - $ -1.635802469135803D-01/ - DATA (CF(I, 18),I=109,114) /-2.191358024691358D-01 - $ ,1.753086419753086D+00,1.558641975308642D+00,1.586419753086420D - $ +00,1.530864197530864D+00,-1.913580246913580D-01/ - DATA (CF(I, 18),I=115,120) /-2.469135802469136D-01 - $ ,1.975308641975309D+00,3.086419753086420D-02,3.086419753086420D - $ -01,-2.469135802469136D-01,3.086419753086420D-02/ + DATA (CF(I),I=1905,2007) /4096,-160,-16,-16,128,128,-1024,-124 + $ ,56,20,2,-124,20,1028,-88,-88,-232,-232,272,200,20,-106,-88, + $ -124,1028,-106,-124,884,-232,56,-88,-142,-124,2,-16,20,-160 + $ ,1010,-268,-268,884,884,-232,20,-160,38,-106,992,-124,-124,992, + $ -268,-88,-448,56,-160,-16,-16,128,128,-1024,20,2,-124,56,20, + $ -124,2,-16,-142,-124,-160,20,-16,128,2,20,-16,2,20,2,2,-16,-16 + $ ,128,38,-142,-268,-88,-124,-106,-142,1136,1010,1028,992,-124, + $ -160,1280,20,200,-160,20/ C 1 T(1,6,7,5,2,3,4) - DATA (CF(I, 19),I= 1, 6) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01/ - DATA (CF(I, 19),I= 7, 12) /-2.469135802469136D-01 - $ ,1.975308641975309D+00,1.530864197530864D+00,1.753086419753086D - $ +00,1.975308641975309D-01,-2.469135802469136D-02/ - DATA (CF(I, 19),I= 13, 18) /1.530864197530864D+00, - $ -2.469135802469136D-01,-6.913580246913580D-01 - $ ,1.530864197530864D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 19),I= 19, 24) /1.264197530864197D+01, - $ -1.580246913580247D+00,-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01,1.975308641975309D - $ +00/ - DATA (CF(I, 19),I= 25, 30) /3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03,1.975308641975309D-01,-2.469135802469136D-02/ - DATA (CF(I, 19),I= 31, 36) /-2.191358024691358D-01 - $ ,1.753086419753086D+00,1.558641975308642D+00,1.586419753086420D - $ +00,1.530864197530864D+00,-1.913580246913580D-01/ - DATA (CF(I, 19),I= 37, 42) /5.864197530864197D-02, - $ -2.191358024691358D-01,-4.135802469135803D-01, - $ -1.358024691358025D-01,-1.913580246913580D-01, - $ -1.635802469135803D-01/ - DATA (CF(I, 19),I= 43, 48) /1.975308641975309D+00, - $ -2.469135802469136D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02,3.086419753086420D - $ -01/ - DATA (CF(I, 19),I= 49, 54) /3.086419753086420D-02, - $ -2.469135802469136D-01,-1.913580246913580D-01, - $ -2.191358024691358D-01,-2.469135802469136D-02 - $ ,3.086419753086420D-03/ - DATA (CF(I, 19),I= 55, 60) /-1.913580246913580D-01 - $ ,1.530864197530864D+00,-4.135802469135803D-01, - $ -1.358024691358025D-01,-6.913580246913580D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 19),I= 61, 66) /-4.135802469135803D-01 - $ ,1.558641975308642D+00,1.364197530864198D+00, - $ -3.580246913580247D-01,-4.135802469135803D-01 - $ ,1.364197530864198D+00/ - DATA (CF(I, 19),I= 67, 72) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,1.530864197530864D+00, - $ -1.913580246913580D-01,5.864197530864197D-02, - $ -1.635802469135803D-01/ - DATA (CF(I, 19),I= 73, 78) /-1.913580246913580D-01 - $ ,3.086419753086420D-02,8.641975308641975D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I, 19),I= 79, 84) /-1.635802469135803D-01, - $ -1.913580246913580D-01,1.364197530864198D+00, - $ -3.580246913580247D-01,8.641975308641975D-02, - $ -1.358024691358025D-01/ - DATA (CF(I, 19),I= 85, 90) /-1.358024691358025D-01 - $ ,1.586419753086420D+00,-3.580246913580247D-01 - $ ,4.197530864197531D-01,-1.358024691358025D-01, - $ -3.580246913580247D-01/ - DATA (CF(I, 19),I= 91, 96) /3.086419753086420D-02 - $ ,3.086419753086420D-01,-1.913580246913580D-01 - $ ,1.586419753086420D+00,-1.635802469135803D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 19),I= 97,102) /-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 19),I=103,108) /1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I, 19),I=109,114) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01/ - DATA (CF(I, 19),I=115,120) /3.086419753086420D-03 - $ ,3.086419753086420D-02,3.086419753086420D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,8.641975308641975D-02/ + DATA (CF(I),I=2008,2109) /4096,-1024,-1024,128,128,1280,2,-16,20 + $ ,2,128,-16,-142,1136,1010,1028,992,-124,38,-142,-268,-88,-124, + $ -106,1280,-160,-160,20,20,200,20,-160,-124,-142,-16,2,-124,992, + $ -268,-88,-448,56,-268,1010,884,-232,-268,884,-160,20,992,-124 + $ ,38,-106,-124,20,56,-124,2,20,-106,-124,884,-232,56,-88,-88 + $ ,1028,-232,272,-88,-232,20,200,-124,1028,-106,-88,-1024,128,128 + $ ,-16,-16,-160,128,-16,-16,2,2,20,-16,2,-160,20,-142,-124,2,20 + $ ,20,-124,-124,56/ C 1 T(1,7,2,5,6,3,4) - DATA (CF(I, 20),I= 1, 6) /-2.469135802469136D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -1.580246913580247D+00/ - DATA (CF(I, 20),I= 7, 12) /1.530864197530864D+00, - $ -2.469135802469136D-01,-6.913580246913580D-01 - $ ,1.530864197530864D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 20),I= 13, 18) /-2.469135802469136D-01 - $ ,1.975308641975309D+00,1.530864197530864D+00,1.753086419753086D - $ +00,1.975308641975309D-01,-2.469135802469136D-02/ - DATA (CF(I, 20),I= 19, 24) /-1.580246913580247D+00 - $ ,1.264197530864197D+01,1.975308641975309D-01,1.975308641975309D - $ +00,-1.580246913580247D+00,1.975308641975309D-01/ - DATA (CF(I, 20),I= 25, 30) /3.086419753086420D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 20),I= 31, 36) /5.864197530864197D-02, - $ -2.191358024691358D-01,-4.135802469135803D-01, - $ -1.358024691358025D-01,-1.913580246913580D-01, - $ -1.635802469135803D-01/ - DATA (CF(I, 20),I= 37, 42) /-2.191358024691358D-01 - $ ,1.753086419753086D+00,1.558641975308642D+00,1.586419753086420D - $ +00,1.530864197530864D+00,-1.913580246913580D-01/ - DATA (CF(I, 20),I= 43, 48) /-2.469135802469136D-01 - $ ,1.975308641975309D+00,3.086419753086420D-02,3.086419753086420D - $ -01,-2.469135802469136D-01,3.086419753086420D-02/ - DATA (CF(I, 20),I= 49, 54) /-1.913580246913580D-01 - $ ,3.086419753086420D-02,8.641975308641975D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I, 20),I= 55, 60) /-1.635802469135803D-01, - $ -1.913580246913580D-01,1.364197530864198D+00, - $ -3.580246913580247D-01,8.641975308641975D-02, - $ -1.358024691358025D-01/ - DATA (CF(I, 20),I= 61, 66) /-1.358024691358025D-01 - $ ,1.586419753086420D+00,-3.580246913580247D-01 - $ ,4.197530864197531D-01,-1.358024691358025D-01, - $ -3.580246913580247D-01/ - DATA (CF(I, 20),I= 67, 72) /3.086419753086420D-02 - $ ,3.086419753086420D-01,-1.913580246913580D-01 - $ ,1.586419753086420D+00,-1.635802469135803D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 20),I= 73, 78) /3.086419753086420D-02, - $ -2.469135802469136D-01,-1.913580246913580D-01, - $ -2.191358024691358D-01,-2.469135802469136D-02 - $ ,3.086419753086420D-03/ - DATA (CF(I, 20),I= 79, 84) /-1.913580246913580D-01 - $ ,1.530864197530864D+00,-4.135802469135803D-01, - $ -1.358024691358025D-01,-6.913580246913580D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 20),I= 85, 90) /-4.135802469135803D-01 - $ ,1.558641975308642D+00,1.364197530864198D+00, - $ -3.580246913580247D-01,-4.135802469135803D-01 - $ ,1.364197530864198D+00/ - DATA (CF(I, 20),I= 91, 96) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,1.530864197530864D+00, - $ -1.913580246913580D-01,5.864197530864197D-02, - $ -1.635802469135803D-01/ - DATA (CF(I, 20),I= 97,102) /1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 20),I=103,108) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03,3.086419753086420D - $ -02,-2.469135802469136D-02,3.086419753086420D-03/ - DATA (CF(I, 20),I=109,114) /3.086419753086420D-03 - $ ,3.086419753086420D-02,3.086419753086420D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 20),I=115,120) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01/ + DATA (CF(I),I=2110,2210) /4096,128,1280,-1024,128,20,2,2,-16,-16 + $ ,128,38,-142,-268,-88,-124,-106,-142,1136,1010,1028,992,-124, + $ -160,1280,20,200,-160,20,-124,20,56,-124,2,20,-106,-124,884, + $ -232,56,-88,-88,1028,-232,272,-88,-232,20,200,-124,1028,-106, + $ -88,20,-160,-124,-142,-16,2,-124,992,-268,-88,-448,56,-268,1010 + $ ,884,-232,-268,884,-160,20,992,-124,38,-106,128,-1024,-16,-160 + $ ,128,-16,-16,128,2,20,-16,2,2,20,20,-124,-124,56,-16,2,-160,20, + $ -142,-124/ C 1 T(1,7,2,6,5,3,4) - DATA (CF(I, 21),I= 1, 6) /-2.469135802469136D-01 - $ ,1.975308641975309D+00,1.530864197530864D+00,1.753086419753086D - $ +00,1.975308641975309D-01,-2.469135802469136D-02/ - DATA (CF(I, 21),I= 7, 12) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01/ - DATA (CF(I, 21),I= 13, 18) /-6.913580246913580D-01 - $ ,1.530864197530864D+00,1.530864197530864D+00, - $ -2.469135802469136D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 21),I= 19, 24) /-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.264197530864197D+01, - $ -1.580246913580247D+00,1.975308641975309D+00,1.975308641975309D - $ -01/ - DATA (CF(I, 21),I= 25, 30) /3.086419753086420D-02, - $ -2.469135802469136D-01,-1.913580246913580D-01, - $ -2.191358024691358D-01,-2.469135802469136D-02 - $ ,3.086419753086420D-03/ - DATA (CF(I, 21),I= 31, 36) /-1.913580246913580D-01 - $ ,1.530864197530864D+00,-4.135802469135803D-01, - $ -1.358024691358025D-01,-6.913580246913580D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 21),I= 37, 42) /-4.135802469135803D-01 - $ ,1.558641975308642D+00,1.364197530864198D+00, - $ -3.580246913580247D-01,-4.135802469135803D-01 - $ ,1.364197530864198D+00/ - DATA (CF(I, 21),I= 43, 48) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,1.530864197530864D+00, - $ -1.913580246913580D-01,5.864197530864197D-02, - $ -1.635802469135803D-01/ - DATA (CF(I, 21),I= 49, 54) /3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03,1.975308641975309D-01,-2.469135802469136D-02/ - DATA (CF(I, 21),I= 55, 60) /-2.191358024691358D-01 - $ ,1.753086419753086D+00,1.558641975308642D+00,1.586419753086420D - $ +00,1.530864197530864D+00,-1.913580246913580D-01/ - DATA (CF(I, 21),I= 61, 66) /5.864197530864197D-02, - $ -2.191358024691358D-01,-4.135802469135803D-01, - $ -1.358024691358025D-01,-1.913580246913580D-01, - $ -1.635802469135803D-01/ - DATA (CF(I, 21),I= 67, 72) /1.975308641975309D+00, - $ -2.469135802469136D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02,3.086419753086420D - $ -01/ - DATA (CF(I, 21),I= 73, 78) /8.641975308641975D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I, 21),I= 79, 84) /-1.358024691358025D-01 - $ ,1.586419753086420D+00,-3.580246913580247D-01 - $ ,4.197530864197531D-01,-1.358024691358025D-01, - $ -3.580246913580247D-01/ - DATA (CF(I, 21),I= 85, 90) /-1.635802469135803D-01, - $ -1.913580246913580D-01,1.364197530864198D+00, - $ -3.580246913580247D-01,8.641975308641975D-02, - $ -1.358024691358025D-01/ - DATA (CF(I, 21),I= 91, 96) /3.086419753086420D-01 - $ ,3.086419753086420D-02,-1.635802469135803D-01, - $ -1.358024691358025D-01,-1.913580246913580D-01 - $ ,1.586419753086420D+00/ - DATA (CF(I, 21),I= 97,102) /1.975308641975309D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 21),I=103,108) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01/ - DATA (CF(I, 21),I=109,114) /1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I, 21),I=115,120) /3.086419753086420D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02, - $ -1.913580246913580D-01/ + DATA (CF(I),I=2211,2310) /4096,-1024,1280,128,20,-160,-124,-142, + $ -16,2,-124,992,-268,-88,-448,56,-268,1010,884,-232,-268,884, + $ -160,20,992,-124,38,-106,2,-16,20,2,128,-16,-142,1136,1010,1028 + $ ,992,-124,38,-142,-268,-88,-124,-106,1280,-160,-160,20,20,200 + $ ,56,-124,-124,20,20,2,-88,1028,-232,272,-88,-232,-106,-124,884, + $ -232,56,-88,200,20,-106,-88,-124,1028,128,-16,-1024,128,-160, + $ -16,-16,2,-160,20,-142,-124,128,-16,-16,2,2,20,20,2,-124,56,20, + $ -124/ C 1 T(1,7,5,2,6,3,4) - DATA (CF(I, 22),I= 1, 6) /1.530864197530864D+00, - $ -2.469135802469136D-01,-6.913580246913580D-01 - $ ,1.530864197530864D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 22),I= 7, 12) /-2.469135802469136D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -1.580246913580247D+00/ - DATA (CF(I, 22),I= 13, 18) /1.530864197530864D+00 - $ ,1.753086419753086D+00,-2.469135802469136D-01 - $ ,1.975308641975309D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 22),I= 19, 24) /1.975308641975309D-01 - $ ,1.975308641975309D+00,-1.580246913580247D+00 - $ ,1.264197530864197D+01,1.975308641975309D-01, - $ -1.580246913580247D+00/ - DATA (CF(I, 22),I= 25, 30) /-1.913580246913580D-01 - $ ,3.086419753086420D-02,8.641975308641975D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I, 22),I= 31, 36) /-1.635802469135803D-01, - $ -1.913580246913580D-01,1.364197530864198D+00, - $ -3.580246913580247D-01,8.641975308641975D-02, - $ -1.358024691358025D-01/ - DATA (CF(I, 22),I= 37, 42) /-1.358024691358025D-01 - $ ,1.586419753086420D+00,-3.580246913580247D-01 - $ ,4.197530864197531D-01,-1.358024691358025D-01, - $ -3.580246913580247D-01/ - DATA (CF(I, 22),I= 43, 48) /3.086419753086420D-02 - $ ,3.086419753086420D-01,-1.913580246913580D-01 - $ ,1.586419753086420D+00,-1.635802469135803D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 22),I= 49, 54) /3.086419753086420D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 22),I= 55, 60) /5.864197530864197D-02, - $ -2.191358024691358D-01,-4.135802469135803D-01, - $ -1.358024691358025D-01,-1.913580246913580D-01, - $ -1.635802469135803D-01/ - DATA (CF(I, 22),I= 61, 66) /-2.191358024691358D-01 - $ ,1.753086419753086D+00,1.558641975308642D+00,1.586419753086420D - $ +00,1.530864197530864D+00,-1.913580246913580D-01/ - DATA (CF(I, 22),I= 67, 72) /-2.469135802469136D-01 - $ ,1.975308641975309D+00,3.086419753086420D-02,3.086419753086420D - $ -01,-2.469135802469136D-01,3.086419753086420D-02/ - DATA (CF(I, 22),I= 73, 78) /-1.913580246913580D-01, - $ -2.191358024691358D-01,3.086419753086420D-02, - $ -2.469135802469136D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I, 22),I= 79, 84) /-4.135802469135803D-01 - $ ,1.558641975308642D+00,1.364197530864198D+00, - $ -3.580246913580247D-01,-4.135802469135803D-01 - $ ,1.364197530864198D+00/ - DATA (CF(I, 22),I= 85, 90) /-1.913580246913580D-01 - $ ,1.530864197530864D+00,-4.135802469135803D-01, - $ -1.358024691358025D-01,-6.913580246913580D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 22),I= 91, 96) /3.086419753086420D-02, - $ -2.469135802469136D-01,5.864197530864197D-02, - $ -1.635802469135803D-01,1.530864197530864D+00, - $ -1.913580246913580D-01/ - DATA (CF(I, 22),I= 97,102) /-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 22),I=103,108) /3.086419753086420D-03 - $ ,3.086419753086420D-02,3.086419753086420D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 22),I=109,114) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03,3.086419753086420D - $ -02,-2.469135802469136D-02,3.086419753086420D-03/ - DATA (CF(I, 22),I=115,120) /3.086419753086420D-03, - $ -2.469135802469136D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02/ + DATA (CF(I),I=2311,2409) /4096,128,-1024,-124,20,56,-124,2,20, + $ -106,-124,884,-232,56,-88,-88,1028,-232,272,-88,-232,20,200, + $ -124,1028,-106,-88,20,2,2,-16,-16,128,38,-142,-268,-88,-124, + $ -106,-142,1136,1010,1028,992,-124,-160,1280,20,200,-160,20,-124 + $ ,-142,20,-160,2,-16,-268,1010,884,-232,-268,884,-124,992,-268, + $ -88,-448,56,20,-160,38,-106,992,-124,-16,-160,128,-1024,-16,128 + $ ,2,20,20,-124,-124,56,-16,128,2,20,-16,2,2,-16,-142,-124,-160 + $ ,20/ C 1 T(1,7,5,6,2,3,4) - DATA (CF(I, 23),I= 1, 6) /1.530864197530864D+00 - $ ,1.753086419753086D+00,-2.469135802469136D-01 - $ ,1.975308641975309D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 23),I= 7, 12) /-6.913580246913580D-01 - $ ,1.530864197530864D+00,1.530864197530864D+00, - $ -2.469135802469136D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 23),I= 13, 18) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01/ - DATA (CF(I, 23),I= 19, 24) /1.975308641975309D-01, - $ -1.580246913580247D+00,1.975308641975309D+00,1.975308641975309D - $ -01,1.264197530864197D+01,-1.580246913580247D+00/ - DATA (CF(I, 23),I= 25, 30) /-1.913580246913580D-01, - $ -2.191358024691358D-01,3.086419753086420D-02, - $ -2.469135802469136D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I, 23),I= 31, 36) /-4.135802469135803D-01 - $ ,1.558641975308642D+00,1.364197530864198D+00, - $ -3.580246913580247D-01,-4.135802469135803D-01 - $ ,1.364197530864198D+00/ - DATA (CF(I, 23),I= 37, 42) /-1.913580246913580D-01 - $ ,1.530864197530864D+00,-4.135802469135803D-01, - $ -1.358024691358025D-01,-6.913580246913580D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 23),I= 43, 48) /3.086419753086420D-02, - $ -2.469135802469136D-01,5.864197530864197D-02, - $ -1.635802469135803D-01,1.530864197530864D+00, - $ -1.913580246913580D-01/ - DATA (CF(I, 23),I= 49, 54) /8.641975308641975D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I, 23),I= 55, 60) /-1.358024691358025D-01 - $ ,1.586419753086420D+00,-3.580246913580247D-01 - $ ,4.197530864197531D-01,-1.358024691358025D-01, - $ -3.580246913580247D-01/ - DATA (CF(I, 23),I= 61, 66) /-1.635802469135803D-01, - $ -1.913580246913580D-01,1.364197530864198D+00, - $ -3.580246913580247D-01,8.641975308641975D-02, - $ -1.358024691358025D-01/ - DATA (CF(I, 23),I= 67, 72) /3.086419753086420D-01 - $ ,3.086419753086420D-02,-1.635802469135803D-01, - $ -1.358024691358025D-01,-1.913580246913580D-01 - $ ,1.586419753086420D+00/ - DATA (CF(I, 23),I= 73, 78) /3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03,1.975308641975309D-01,-2.469135802469136D-02/ - DATA (CF(I, 23),I= 79, 84) /-2.191358024691358D-01 - $ ,1.753086419753086D+00,1.558641975308642D+00,1.586419753086420D - $ +00,1.530864197530864D+00,-1.913580246913580D-01/ - DATA (CF(I, 23),I= 85, 90) /5.864197530864197D-02, - $ -2.191358024691358D-01,-4.135802469135803D-01, - $ -1.358024691358025D-01,-1.913580246913580D-01, - $ -1.635802469135803D-01/ - DATA (CF(I, 23),I= 91, 96) /1.975308641975309D+00, - $ -2.469135802469136D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02,3.086419753086420D - $ -01/ - DATA (CF(I, 23),I= 97,102) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01/ - DATA (CF(I, 23),I=103,108) /3.086419753086420D-03, - $ -2.469135802469136D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02/ - DATA (CF(I, 23),I=109,114) /3.086419753086420D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02, - $ -1.913580246913580D-01/ - DATA (CF(I, 23),I=115,120) /1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03,3.086419753086420D - $ -02/ + DATA (CF(I),I=2410,2507) /4096,-1024,-124,-142,20,-160,2,-16, + $ -268,1010,884,-232,-268,884,-124,992,-268,-88,-448,56,20,-160 + $ ,38,-106,992,-124,56,-124,-124,20,20,2,-88,1028,-232,272,-88, + $ -232,-106,-124,884,-232,56,-88,200,20,-106,-88,-124,1028,2,-16 + $ ,20,2,128,-16,-142,1136,1010,1028,992,-124,38,-142,-268,-88, + $ -124,-106,1280,-160,-160,20,20,200,-16,128,-160,-16,-1024,128,2 + $ ,-16,-142,-124,-160,20,20,2,-124,56,20,-124,128,-16,-16,2,2,20/ C 1 T(1,7,6,2,5,3,4) - DATA (CF(I, 24),I= 1, 6) /-6.913580246913580D-01 - $ ,1.530864197530864D+00,1.530864197530864D+00, - $ -2.469135802469136D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 24),I= 7, 12) /1.530864197530864D+00 - $ ,1.753086419753086D+00,-2.469135802469136D-01 - $ ,1.975308641975309D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 24),I= 13, 18) /-2.469135802469136D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -1.580246913580247D+00/ - DATA (CF(I, 24),I= 19, 24) /1.975308641975309D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -1.580246913580247D+00,-1.580246913580247D+00 - $ ,1.264197530864197D+01/ - DATA (CF(I, 24),I= 25, 30) /8.641975308641975D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I, 24),I= 31, 36) /-1.358024691358025D-01 - $ ,1.586419753086420D+00,-3.580246913580247D-01 - $ ,4.197530864197531D-01,-1.358024691358025D-01, - $ -3.580246913580247D-01/ - DATA (CF(I, 24),I= 37, 42) /-1.635802469135803D-01, - $ -1.913580246913580D-01,1.364197530864198D+00, - $ -3.580246913580247D-01,8.641975308641975D-02, - $ -1.358024691358025D-01/ - DATA (CF(I, 24),I= 43, 48) /3.086419753086420D-01 - $ ,3.086419753086420D-02,-1.635802469135803D-01, - $ -1.358024691358025D-01,-1.913580246913580D-01 - $ ,1.586419753086420D+00/ - DATA (CF(I, 24),I= 49, 54) /-1.913580246913580D-01, - $ -2.191358024691358D-01,3.086419753086420D-02, - $ -2.469135802469136D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I, 24),I= 55, 60) /-4.135802469135803D-01 - $ ,1.558641975308642D+00,1.364197530864198D+00, - $ -3.580246913580247D-01,-4.135802469135803D-01 - $ ,1.364197530864198D+00/ - DATA (CF(I, 24),I= 61, 66) /-1.913580246913580D-01 - $ ,1.530864197530864D+00,-4.135802469135803D-01, - $ -1.358024691358025D-01,-6.913580246913580D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 24),I= 67, 72) /3.086419753086420D-02, - $ -2.469135802469136D-01,5.864197530864197D-02, - $ -1.635802469135803D-01,1.530864197530864D+00, - $ -1.913580246913580D-01/ - DATA (CF(I, 24),I= 73, 78) /3.086419753086420D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 24),I= 79, 84) /5.864197530864197D-02, - $ -2.191358024691358D-01,-4.135802469135803D-01, - $ -1.358024691358025D-01,-1.913580246913580D-01, - $ -1.635802469135803D-01/ - DATA (CF(I, 24),I= 85, 90) /-2.191358024691358D-01 - $ ,1.753086419753086D+00,1.558641975308642D+00,1.586419753086420D - $ +00,1.530864197530864D+00,-1.913580246913580D-01/ - DATA (CF(I, 24),I= 91, 96) /-2.469135802469136D-01 - $ ,1.975308641975309D+00,3.086419753086420D-02,3.086419753086420D - $ -01,-2.469135802469136D-01,3.086419753086420D-02/ - DATA (CF(I, 24),I= 97,102) /-2.469135802469136D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -1.580246913580247D+00/ - DATA (CF(I, 24),I=103,108) /3.086419753086420D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02, - $ -1.913580246913580D-01/ - DATA (CF(I, 24),I=109,114) /3.086419753086420D-03, - $ -2.469135802469136D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02/ - DATA (CF(I, 24),I=115,120) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03,3.086419753086420D - $ -02,-2.469135802469136D-02,3.086419753086420D-03/ + DATA (CF(I),I=2508,2604) /4096,56,-124,-124,20,20,2,-88,1028, + $ -232,272,-88,-232,-106,-124,884,-232,56,-88,200,20,-106,-88, + $ -124,1028,-124,-142,20,-160,2,-16,-268,1010,884,-232,-268,884, + $ -124,992,-268,-88,-448,56,20,-160,38,-106,992,-124,20,2,2,-16, + $ -16,128,38,-142,-268,-88,-124,-106,-142,1136,1010,1028,992,-124 + $ ,-160,1280,20,200,-160,20,-160,-16,-16,128,128,-1024,20,2,-124 + $ ,56,20,-124,2,-16,-142,-124,-160,20,-16,128,2,20,-16,2/ C 1 T(1,7,6,5,2,3,4) - DATA (CF(I, 25),I= 1, 6) /-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 25),I= 7, 12) /1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I, 25),I= 13, 18) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01/ - DATA (CF(I, 25),I= 19, 24) /3.086419753086420D-03 - $ ,3.086419753086420D-02,3.086419753086420D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 25),I= 25, 30) /1.264197530864197D+01, - $ -1.580246913580247D+00,-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01,1.975308641975309D - $ +00/ - DATA (CF(I, 25),I= 31, 36) /-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 25),I= 37, 42) /1.975308641975309D-01, - $ -2.469135802469136D-02,1.975308641975309D+00, - $ -2.469135802469136D-01,1.753086419753086D+00,1.530864197530864D - $ +00/ - DATA (CF(I, 25),I= 43, 48) /-2.469135802469136D-02, - $ -2.469135802469136D-01,-2.469135802469136D-01 - $ ,1.530864197530864D+00,1.530864197530864D+00, - $ -6.913580246913580D-01/ - DATA (CF(I, 25),I= 49, 54) /1.975308641975309D+00, - $ -2.469135802469136D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02,3.086419753086420D - $ -01/ - DATA (CF(I, 25),I= 55, 60) /1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I, 25),I= 61, 66) /1.530864197530864D+00, - $ -1.913580246913580D-01,1.753086419753086D+00, - $ -2.191358024691358D-01,1.586419753086420D+00,1.558641975308642D - $ +00/ - DATA (CF(I, 25),I= 67, 72) /-1.913580246913580D-01, - $ -1.635802469135803D-01,-2.191358024691358D-01 - $ ,5.864197530864197D-02,-1.358024691358025D-01, - $ -4.135802469135803D-01/ - DATA (CF(I, 25),I= 73, 78) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,1.530864197530864D+00, - $ -1.913580246913580D-01,5.864197530864197D-02, - $ -1.635802469135803D-01/ - DATA (CF(I, 25),I= 79, 84) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01/ - DATA (CF(I, 25),I= 85, 90) /-6.913580246913580D-01 - $ ,8.641975308641975D-02,1.530864197530864D+00, - $ -1.913580246913580D-01,-1.358024691358025D-01, - $ -4.135802469135803D-01/ - DATA (CF(I, 25),I= 91, 96) /-4.135802469135803D-01 - $ ,1.364197530864198D+00,1.558641975308642D+00, - $ -4.135802469135803D-01,-3.580246913580247D-01 - $ ,1.364197530864198D+00/ - DATA (CF(I, 25),I= 97,102) /3.086419753086420D-02 - $ ,3.086419753086420D-01,-1.913580246913580D-01 - $ ,1.586419753086420D+00,-1.635802469135803D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 25),I=103,108) /3.086419753086420D-03 - $ ,3.086419753086420D-02,3.086419753086420D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 25),I=109,114) /8.641975308641975D-02, - $ -1.358024691358025D-01,-1.913580246913580D-01, - $ -1.635802469135803D-01,-3.580246913580247D-01 - $ ,1.364197530864198D+00/ - DATA (CF(I, 25),I=115,120) /-1.358024691358025D-01, - $ -3.580246913580247D-01,1.586419753086420D+00, - $ -1.358024691358025D-01,4.197530864197531D-01, - $ -3.580246913580247D-01/ + DATA (CF(I),I=2605,2700) /4096,-1024,-1024,128,128,1280,-1024 + $ ,128,128,-16,-16,-160,128,-16,1280,-160,1136,992,-16,-160,-160 + $ ,992,992,-448,1280,-160,-160,20,20,200,128,-16,-16,2,2,20,992, + $ -124,1136,-142,1028,1010,-124,-106,-142,38,-88,-268,-160,20,992 + $ ,-124,38,-106,-16,2,-160,20,-142,-124,-448,56,992,-124,-88,-268 + $ ,-268,884,1010,-268,-232,884,20,200,-124,1028,-106,-88,2,20,20, + $ -124,-124,56,56,-88,-124,-106,-232,884,-88,-232,1028,-88,272, + $ -232/ C 1 T(2,1,5,6,7,3,4) - DATA (CF(I, 26),I= 1, 6) /1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 26),I= 7, 12) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03,3.086419753086420D - $ -02,-2.469135802469136D-02,3.086419753086420D-03/ - DATA (CF(I, 26),I= 13, 18) /3.086419753086420D-03 - $ ,3.086419753086420D-02,3.086419753086420D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 26),I= 19, 24) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01/ - DATA (CF(I, 26),I= 25, 30) /-1.580246913580247D+00 - $ ,1.264197530864197D+01,1.975308641975309D-01,1.975308641975309D - $ +00,-1.580246913580247D+00,1.975308641975309D-01/ - DATA (CF(I, 26),I= 31, 36) /1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 26),I= 37, 42) /-2.469135802469136D-02, - $ -2.469135802469136D-01,-2.469135802469136D-01 - $ ,1.530864197530864D+00,1.530864197530864D+00, - $ -6.913580246913580D-01/ - DATA (CF(I, 26),I= 43, 48) /1.975308641975309D-01, - $ -2.469135802469136D-02,1.975308641975309D+00, - $ -2.469135802469136D-01,1.753086419753086D+00,1.530864197530864D - $ +00/ - DATA (CF(I, 26),I= 49, 54) /-2.469135802469136D-01 - $ ,1.975308641975309D+00,3.086419753086420D-02,3.086419753086420D - $ -01,-2.469135802469136D-01,3.086419753086420D-02/ - DATA (CF(I, 26),I= 55, 60) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03,3.086419753086420D - $ -02,-2.469135802469136D-02,3.086419753086420D-03/ - DATA (CF(I, 26),I= 61, 66) /-1.913580246913580D-01, - $ -1.635802469135803D-01,-2.191358024691358D-01 - $ ,5.864197530864197D-02,-1.358024691358025D-01, - $ -4.135802469135803D-01/ - DATA (CF(I, 26),I= 67, 72) /1.530864197530864D+00, - $ -1.913580246913580D-01,1.753086419753086D+00, - $ -2.191358024691358D-01,1.586419753086420D+00,1.558641975308642D - $ +00/ - DATA (CF(I, 26),I= 73, 78) /3.086419753086420D-02 - $ ,3.086419753086420D-01,-1.913580246913580D-01 - $ ,1.586419753086420D+00,-1.635802469135803D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 26),I= 79, 84) /3.086419753086420D-03 - $ ,3.086419753086420D-02,3.086419753086420D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 26),I= 85, 90) /8.641975308641975D-02, - $ -1.358024691358025D-01,-1.913580246913580D-01, - $ -1.635802469135803D-01,-3.580246913580247D-01 - $ ,1.364197530864198D+00/ - DATA (CF(I, 26),I= 91, 96) /-1.358024691358025D-01, - $ -3.580246913580247D-01,1.586419753086420D+00, - $ -1.358024691358025D-01,4.197530864197531D-01, - $ -3.580246913580247D-01/ - DATA (CF(I, 26),I= 97,102) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,1.530864197530864D+00, - $ -1.913580246913580D-01,5.864197530864197D-02, - $ -1.635802469135803D-01/ - DATA (CF(I, 26),I=103,108) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01/ - DATA (CF(I, 26),I=109,114) /-6.913580246913580D-01 - $ ,8.641975308641975D-02,1.530864197530864D+00, - $ -1.913580246913580D-01,-1.358024691358025D-01, - $ -4.135802469135803D-01/ - DATA (CF(I, 26),I=115,120) /-4.135802469135803D-01 - $ ,1.364197530864198D+00,1.558641975308642D+00, - $ -4.135802469135803D-01,-3.580246913580247D-01 - $ ,1.364197530864198D+00/ + DATA (CF(I),I=2701,2795) /4096,128,1280,-1024,128,128,-1024,-16, + $ -160,128,-16,-16,-160,-160,992,992,-448,128,-16,1280,-160,1136 + $ ,992,-160,1280,20,200,-160,20,-16,128,2,20,-16,2,-124,-106,-142 + $ ,38,-88,-268,992,-124,1136,-142,1028,1010,20,200,-124,1028,-106 + $ ,-88,2,20,20,-124,-124,56,56,-88,-124,-106,-232,884,-88,-232 + $ ,1028,-88,272,-232,-160,20,992,-124,38,-106,-16,2,-160,20,-142, + $ -124,-448,56,992,-124,-88,-268,-268,884,1010,-268,-232,884/ C 1 T(2,1,5,7,6,3,4) - DATA (CF(I, 27),I= 1, 6) /1.975308641975309D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 27),I= 7, 12) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01/ - DATA (CF(I, 27),I= 13, 18) /1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I, 27),I= 19, 24) /3.086419753086420D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02, - $ -1.913580246913580D-01/ - DATA (CF(I, 27),I= 25, 30) /-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.264197530864197D+01, - $ -1.580246913580247D+00,1.975308641975309D+00,1.975308641975309D - $ -01/ - DATA (CF(I, 27),I= 31, 36) /1.975308641975309D-01, - $ -2.469135802469136D-02,1.975308641975309D+00, - $ -2.469135802469136D-01,1.753086419753086D+00,1.530864197530864D - $ +00/ - DATA (CF(I, 27),I= 37, 42) /-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 27),I= 43, 48) /-2.469135802469136D-01, - $ -2.469135802469136D-02,1.530864197530864D+00, - $ -6.913580246913580D-01,-2.469135802469136D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 27),I= 49, 54) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,1.530864197530864D+00, - $ -1.913580246913580D-01,5.864197530864197D-02, - $ -1.635802469135803D-01/ - DATA (CF(I, 27),I= 55, 60) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01/ - DATA (CF(I, 27),I= 61, 66) /-6.913580246913580D-01 - $ ,8.641975308641975D-02,1.530864197530864D+00, - $ -1.913580246913580D-01,-1.358024691358025D-01, - $ -4.135802469135803D-01/ - DATA (CF(I, 27),I= 67, 72) /-4.135802469135803D-01 - $ ,1.364197530864198D+00,1.558641975308642D+00, - $ -4.135802469135803D-01,-3.580246913580247D-01 - $ ,1.364197530864198D+00/ - DATA (CF(I, 27),I= 73, 78) /1.975308641975309D+00, - $ -2.469135802469136D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02,3.086419753086420D - $ -01/ - DATA (CF(I, 27),I= 79, 84) /1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I, 27),I= 85, 90) /1.530864197530864D+00, - $ -1.913580246913580D-01,1.753086419753086D+00, - $ -2.191358024691358D-01,1.586419753086420D+00,1.558641975308642D - $ +00/ - DATA (CF(I, 27),I= 91, 96) /-1.913580246913580D-01, - $ -1.635802469135803D-01,-2.191358024691358D-01 - $ ,5.864197530864197D-02,-1.358024691358025D-01, - $ -4.135802469135803D-01/ - DATA (CF(I, 27),I= 97,102) /3.086419753086420D-01 - $ ,3.086419753086420D-02,-1.635802469135803D-01, - $ -1.358024691358025D-01,-1.913580246913580D-01 - $ ,1.586419753086420D+00/ - DATA (CF(I, 27),I=103,108) /3.086419753086420D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02, - $ -1.913580246913580D-01/ - DATA (CF(I, 27),I=109,114) /-1.358024691358025D-01, - $ -3.580246913580247D-01,1.586419753086420D+00, - $ -1.358024691358025D-01,4.197530864197531D-01, - $ -3.580246913580247D-01/ - DATA (CF(I, 27),I=115,120) /8.641975308641975D-02, - $ -1.358024691358025D-01,-1.913580246913580D-01, - $ -1.635802469135803D-01,-3.580246913580247D-01 - $ ,1.364197530864198D+00/ + DATA (CF(I),I=2796,2889) /4096,-1024,1280,128,128,-16,1280,-160 + $ ,1136,992,-1024,128,128,-16,-16,-160,-160,-16,992,-448,-160,992 + $ ,-160,20,992,-124,38,-106,-16,2,-160,20,-142,-124,-448,56,992, + $ -124,-88,-268,-268,884,1010,-268,-232,884,1280,-160,-160,20,20 + $ ,200,128,-16,-16,2,2,20,992,-124,1136,-142,1028,1010,-124,-106, + $ -142,38,-88,-268,200,20,-106,-88,-124,1028,20,2,-124,56,20,-124 + $ ,-88,-232,1028,-88,272,-232,56,-88,-124,-106,-232,884/ C 1 T(2,1,6,5,7,3,4) - DATA (CF(I, 28),I= 1, 6) /-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 28),I= 7, 12) /3.086419753086420D-03 - $ ,3.086419753086420D-02,3.086419753086420D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 28),I= 13, 18) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03,3.086419753086420D - $ -02,-2.469135802469136D-02,3.086419753086420D-03/ - DATA (CF(I, 28),I= 19, 24) /3.086419753086420D-03, - $ -2.469135802469136D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02/ - DATA (CF(I, 28),I= 25, 30) /1.975308641975309D-01 - $ ,1.975308641975309D+00,-1.580246913580247D+00 - $ ,1.264197530864197D+01,1.975308641975309D-01, - $ -1.580246913580247D+00/ - DATA (CF(I, 28),I= 31, 36) /-2.469135802469136D-02, - $ -2.469135802469136D-01,-2.469135802469136D-01 - $ ,1.530864197530864D+00,1.530864197530864D+00, - $ -6.913580246913580D-01/ - DATA (CF(I, 28),I= 37, 42) /1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 28),I= 43, 48) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,1.753086419753086D+00,1.530864197530864D - $ +00,1.975308641975309D+00,-2.469135802469136D-01/ - DATA (CF(I, 28),I= 49, 54) /3.086419753086420D-02 - $ ,3.086419753086420D-01,-1.913580246913580D-01 - $ ,1.586419753086420D+00,-1.635802469135803D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 28),I= 55, 60) /3.086419753086420D-03 - $ ,3.086419753086420D-02,3.086419753086420D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 28),I= 61, 66) /8.641975308641975D-02, - $ -1.358024691358025D-01,-1.913580246913580D-01, - $ -1.635802469135803D-01,-3.580246913580247D-01 - $ ,1.364197530864198D+00/ - DATA (CF(I, 28),I= 67, 72) /-1.358024691358025D-01, - $ -3.580246913580247D-01,1.586419753086420D+00, - $ -1.358024691358025D-01,4.197530864197531D-01, - $ -3.580246913580247D-01/ - DATA (CF(I, 28),I= 73, 78) /-2.469135802469136D-01 - $ ,1.975308641975309D+00,3.086419753086420D-02,3.086419753086420D - $ -01,-2.469135802469136D-01,3.086419753086420D-02/ - DATA (CF(I, 28),I= 79, 84) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03,3.086419753086420D - $ -02,-2.469135802469136D-02,3.086419753086420D-03/ - DATA (CF(I, 28),I= 85, 90) /-1.913580246913580D-01, - $ -1.635802469135803D-01,-2.191358024691358D-01 - $ ,5.864197530864197D-02,-1.358024691358025D-01, - $ -4.135802469135803D-01/ - DATA (CF(I, 28),I= 91, 96) /1.530864197530864D+00, - $ -1.913580246913580D-01,1.753086419753086D+00, - $ -2.191358024691358D-01,1.586419753086420D+00,1.558641975308642D - $ +00/ - DATA (CF(I, 28),I= 97,102) /3.086419753086420D-02, - $ -2.469135802469136D-01,5.864197530864197D-02, - $ -1.635802469135803D-01,1.530864197530864D+00, - $ -1.913580246913580D-01/ - DATA (CF(I, 28),I=103,108) /3.086419753086420D-03, - $ -2.469135802469136D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02/ - DATA (CF(I, 28),I=109,114) /-4.135802469135803D-01 - $ ,1.364197530864198D+00,1.558641975308642D+00, - $ -4.135802469135803D-01,-3.580246913580247D-01 - $ ,1.364197530864198D+00/ - DATA (CF(I, 28),I=115,120) /-6.913580246913580D-01 - $ ,8.641975308641975D-02,1.530864197530864D+00, - $ -1.913580246913580D-01,-1.358024691358025D-01, - $ -4.135802469135803D-01/ + DATA (CF(I),I=2890,2982) /4096,128,-1024,-16,-160,-160,992,992, + $ -448,128,-1024,-16,-160,128,-16,-16,128,1136,992,1280,-160,20 + $ ,200,-124,1028,-106,-88,2,20,20,-124,-124,56,56,-88,-124,-106, + $ -232,884,-88,-232,1028,-88,272,-232,-160,1280,20,200,-160,20, + $ -16,128,2,20,-16,2,-124,-106,-142,38,-88,-268,992,-124,1136, + $ -142,1028,1010,20,-160,38,-106,992,-124,2,-16,-142,-124,-160,20 + $ ,-268,884,1010,-268,-232,884,-448,56,992,-124,-88,-268/ C 1 T(2,1,6,7,5,3,4) - DATA (CF(I, 29),I= 1, 6) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01/ - DATA (CF(I, 29),I= 7, 12) /3.086419753086420D-03, - $ -2.469135802469136D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02/ - DATA (CF(I, 29),I= 13, 18) /3.086419753086420D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02, - $ -1.913580246913580D-01/ - DATA (CF(I, 29),I= 19, 24) /1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I, 29),I= 25, 30) /1.975308641975309D-01, - $ -1.580246913580247D+00,1.975308641975309D+00,1.975308641975309D - $ -01,1.264197530864197D+01,-1.580246913580247D+00/ - DATA (CF(I, 29),I= 31, 36) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,1.753086419753086D+00,1.530864197530864D - $ +00,1.975308641975309D+00,-2.469135802469136D-01/ - DATA (CF(I, 29),I= 37, 42) /-2.469135802469136D-01, - $ -2.469135802469136D-02,1.530864197530864D+00, - $ -6.913580246913580D-01,-2.469135802469136D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 29),I= 43, 48) /-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 29),I= 49, 54) /3.086419753086420D-02, - $ -2.469135802469136D-01,5.864197530864197D-02, - $ -1.635802469135803D-01,1.530864197530864D+00, - $ -1.913580246913580D-01/ - DATA (CF(I, 29),I= 55, 60) /3.086419753086420D-03, - $ -2.469135802469136D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02/ - DATA (CF(I, 29),I= 61, 66) /-4.135802469135803D-01 - $ ,1.364197530864198D+00,1.558641975308642D+00, - $ -4.135802469135803D-01,-3.580246913580247D-01 - $ ,1.364197530864198D+00/ - DATA (CF(I, 29),I= 67, 72) /-6.913580246913580D-01 - $ ,8.641975308641975D-02,1.530864197530864D+00, - $ -1.913580246913580D-01,-1.358024691358025D-01, - $ -4.135802469135803D-01/ - DATA (CF(I, 29),I= 73, 78) /3.086419753086420D-01 - $ ,3.086419753086420D-02,-1.635802469135803D-01, - $ -1.358024691358025D-01,-1.913580246913580D-01 - $ ,1.586419753086420D+00/ - DATA (CF(I, 29),I= 79, 84) /3.086419753086420D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02, - $ -1.913580246913580D-01/ - DATA (CF(I, 29),I= 85, 90) /-1.358024691358025D-01, - $ -3.580246913580247D-01,1.586419753086420D+00, - $ -1.358024691358025D-01,4.197530864197531D-01, - $ -3.580246913580247D-01/ - DATA (CF(I, 29),I= 91, 96) /8.641975308641975D-02, - $ -1.358024691358025D-01,-1.913580246913580D-01, - $ -1.635802469135803D-01,-3.580246913580247D-01 - $ ,1.364197530864198D+00/ - DATA (CF(I, 29),I= 97,102) /1.975308641975309D+00, - $ -2.469135802469136D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02,3.086419753086420D - $ -01/ - DATA (CF(I, 29),I=103,108) /1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I, 29),I=109,114) /1.530864197530864D+00, - $ -1.913580246913580D-01,1.753086419753086D+00, - $ -2.191358024691358D-01,1.586419753086420D+00,1.558641975308642D - $ +00/ - DATA (CF(I, 29),I=115,120) /-1.913580246913580D-01, - $ -1.635802469135803D-01,-2.191358024691358D-01 - $ ,5.864197530864197D-02,-1.358024691358025D-01, - $ -4.135802469135803D-01/ + DATA (CF(I),I=2983,3074) /4096,-1024,-16,128,1136,992,1280,-160, + $ -160,-16,992,-448,-160,992,-1024,128,128,-16,-16,-160,20,-160 + $ ,38,-106,992,-124,2,-16,-142,-124,-160,20,-268,884,1010,-268, + $ -232,884,-448,56,992,-124,-88,-268,200,20,-106,-88,-124,1028,20 + $ ,2,-124,56,20,-124,-88,-232,1028,-88,272,-232,56,-88,-124,-106, + $ -232,884,1280,-160,-160,20,20,200,128,-16,-16,2,2,20,992,-124 + $ ,1136,-142,1028,1010,-124,-106,-142,38,-88,-268/ C 1 T(2,1,7,5,6,3,4) - DATA (CF(I, 30),I= 1, 6) /-2.469135802469136D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -1.580246913580247D+00/ - DATA (CF(I, 30),I= 7, 12) /3.086419753086420D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02, - $ -1.913580246913580D-01/ - DATA (CF(I, 30),I= 13, 18) /3.086419753086420D-03, - $ -2.469135802469136D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02/ - DATA (CF(I, 30),I= 19, 24) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03,3.086419753086420D - $ -02,-2.469135802469136D-02,3.086419753086420D-03/ - DATA (CF(I, 30),I= 25, 30) /1.975308641975309D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -1.580246913580247D+00,-1.580246913580247D+00 - $ ,1.264197530864197D+01/ - DATA (CF(I, 30),I= 31, 36) /-2.469135802469136D-01, - $ -2.469135802469136D-02,1.530864197530864D+00, - $ -6.913580246913580D-01,-2.469135802469136D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 30),I= 37, 42) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,1.753086419753086D+00,1.530864197530864D - $ +00,1.975308641975309D+00,-2.469135802469136D-01/ - DATA (CF(I, 30),I= 43, 48) /1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 30),I= 49, 54) /3.086419753086420D-01 - $ ,3.086419753086420D-02,-1.635802469135803D-01, - $ -1.358024691358025D-01,-1.913580246913580D-01 - $ ,1.586419753086420D+00/ - DATA (CF(I, 30),I= 55, 60) /3.086419753086420D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02, - $ -1.913580246913580D-01/ - DATA (CF(I, 30),I= 61, 66) /-1.358024691358025D-01, - $ -3.580246913580247D-01,1.586419753086420D+00, - $ -1.358024691358025D-01,4.197530864197531D-01, - $ -3.580246913580247D-01/ - DATA (CF(I, 30),I= 67, 72) /8.641975308641975D-02, - $ -1.358024691358025D-01,-1.913580246913580D-01, - $ -1.635802469135803D-01,-3.580246913580247D-01 - $ ,1.364197530864198D+00/ - DATA (CF(I, 30),I= 73, 78) /3.086419753086420D-02, - $ -2.469135802469136D-01,5.864197530864197D-02, - $ -1.635802469135803D-01,1.530864197530864D+00, - $ -1.913580246913580D-01/ - DATA (CF(I, 30),I= 79, 84) /3.086419753086420D-03, - $ -2.469135802469136D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02/ - DATA (CF(I, 30),I= 85, 90) /-4.135802469135803D-01 - $ ,1.364197530864198D+00,1.558641975308642D+00, - $ -4.135802469135803D-01,-3.580246913580247D-01 - $ ,1.364197530864198D+00/ - DATA (CF(I, 30),I= 91, 96) /-6.913580246913580D-01 - $ ,8.641975308641975D-02,1.530864197530864D+00, - $ -1.913580246913580D-01,-1.358024691358025D-01, - $ -4.135802469135803D-01/ - DATA (CF(I, 30),I= 97,102) /-2.469135802469136D-01 - $ ,1.975308641975309D+00,3.086419753086420D-02,3.086419753086420D - $ -01,-2.469135802469136D-01,3.086419753086420D-02/ - DATA (CF(I, 30),I=103,108) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03,3.086419753086420D - $ -02,-2.469135802469136D-02,3.086419753086420D-03/ - DATA (CF(I, 30),I=109,114) /-1.913580246913580D-01, - $ -1.635802469135803D-01,-2.191358024691358D-01 - $ ,5.864197530864197D-02,-1.358024691358025D-01, - $ -4.135802469135803D-01/ - DATA (CF(I, 30),I=115,120) /1.530864197530864D+00, - $ -1.913580246913580D-01,1.753086419753086D+00, - $ -2.191358024691358D-01,1.586419753086420D+00,1.558641975308642D - $ +00/ + DATA (CF(I),I=3075,3165) /4096,-160,-16,992,-448,-160,992,-16 + $ ,128,1136,992,1280,-160,128,-1024,-16,-160,128,-16,200,20,-106, + $ -88,-124,1028,20,2,-124,56,20,-124,-88,-232,1028,-88,272,-232 + $ ,56,-88,-124,-106,-232,884,20,-160,38,-106,992,-124,2,-16,-142, + $ -124,-160,20,-268,884,1010,-268,-232,884,-448,56,992,-124,-88, + $ -268,-160,1280,20,200,-160,20,-16,128,2,20,-16,2,-124,-106,-142 + $ ,38,-88,-268,992,-124,1136,-142,1028,1010/ C 1 T(2,1,7,6,5,3,4) - DATA (CF(I, 31),I= 1, 6) /1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I, 31),I= 7, 12) /1.975308641975309D+00, - $ -2.469135802469136D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02,3.086419753086420D - $ -01/ - DATA (CF(I, 31),I= 13, 18) /1.753086419753086D+00, - $ -2.191358024691358D-01,1.530864197530864D+00, - $ -1.913580246913580D-01,1.558641975308642D+00,1.586419753086420D - $ +00/ - DATA (CF(I, 31),I= 19, 24) /-2.191358024691358D-01 - $ ,5.864197530864197D-02,-1.913580246913580D-01, - $ -1.635802469135803D-01,-4.135802469135803D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 31),I= 25, 30) /-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 31),I= 31, 36) /1.264197530864197D+01, - $ -1.580246913580247D+00,-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01,1.975308641975309D - $ +00/ - DATA (CF(I, 31),I= 37, 42) /1.975308641975309D+00, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -2.469135802469136D-02,1.530864197530864D+00,1.753086419753086D - $ +00/ - DATA (CF(I, 31),I= 43, 48) /-2.469135802469136D-01 - $ ,1.530864197530864D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01,-6.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 31),I= 49, 54) /1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I, 31),I= 55, 60) /-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 31),I= 61, 66) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01, - $ -2.191358024691358D-01/ - DATA (CF(I, 31),I= 67, 72) /3.086419753086420D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02,8.641975308641975D-02,-1.913580246913580D-01/ - DATA (CF(I, 31),I= 73, 78) /1.530864197530864D+00, - $ -1.913580246913580D-01,-6.913580246913580D-01 - $ ,8.641975308641975D-02,-4.135802469135803D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 31),I= 79, 84) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01, - $ -2.191358024691358D-01/ - DATA (CF(I, 31),I= 85, 90) /1.530864197530864D+00, - $ -1.913580246913580D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02,-1.635802469135803D-01 - $ ,5.864197530864197D-02/ - DATA (CF(I, 31),I= 91, 96) /1.364197530864198D+00, - $ -3.580246913580247D-01,-4.135802469135803D-01 - $ ,1.558641975308642D+00,1.364197530864198D+00, - $ -4.135802469135803D-01/ - DATA (CF(I, 31),I= 97,102) /-1.913580246913580D-01, - $ -1.635802469135803D-01,8.641975308641975D-02, - $ -1.358024691358025D-01,1.364197530864198D+00, - $ -3.580246913580247D-01/ - DATA (CF(I, 31),I=103,108) /3.086419753086420D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02,8.641975308641975D-02,-1.913580246913580D-01/ - DATA (CF(I, 31),I=109,114) /-1.913580246913580D-01 - $ ,1.586419753086420D+00,3.086419753086420D-02,3.086419753086420D - $ -01,-1.358024691358025D-01,-1.635802469135803D-01/ - DATA (CF(I, 31),I=115,120) /-3.580246913580247D-01 - $ ,4.197530864197531D-01,-1.358024691358025D-01 - $ ,1.586419753086420D+00,-3.580246913580247D-01, - $ -1.358024691358025D-01/ + DATA (CF(I),I=3166,3255) /4096,-1024,-1024,128,128,1280,1280, + $ -160,128,-16,992,1136,-160,992,-16,-160,-448,992,128,-16,-16,2 + $ ,2,20,-1024,128,128,-16,-16,-160,-160,20,-16,2,-124,-142,20, + $ -124,2,20,56,-124,992,-124,-448,56,-268,-88,-160,20,-16,2,-124, + $ -142,992,-124,-160,20,-106,38,884,-232,-268,1010,884,-268,-124, + $ -106,56,-88,884,-232,20,-124,2,20,56,-124,-124,1028,20,200,-88, + $ -106,-232,272,-88,1028,-232,-88/ C 1 T(2,5,1,6,7,3,4) - DATA (CF(I, 32),I= 1, 6) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03,3.086419753086420D - $ -02,-2.469135802469136D-02,3.086419753086420D-03/ - DATA (CF(I, 32),I= 7, 12) /-2.469135802469136D-01 - $ ,1.975308641975309D+00,3.086419753086420D-02,3.086419753086420D - $ -01,-2.469135802469136D-01,3.086419753086420D-02/ - DATA (CF(I, 32),I= 13, 18) /-2.191358024691358D-01 - $ ,5.864197530864197D-02,-1.913580246913580D-01, - $ -1.635802469135803D-01,-4.135802469135803D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 32),I= 19, 24) /1.753086419753086D+00, - $ -2.191358024691358D-01,1.530864197530864D+00, - $ -1.913580246913580D-01,1.558641975308642D+00,1.586419753086420D - $ +00/ - DATA (CF(I, 32),I= 25, 30) /1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 32),I= 31, 36) /-1.580246913580247D+00 - $ ,1.264197530864197D+01,1.975308641975309D-01,1.975308641975309D - $ +00,-1.580246913580247D+00,1.975308641975309D-01/ - DATA (CF(I, 32),I= 37, 42) /-2.469135802469136D-01 - $ ,1.530864197530864D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01,-6.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 32),I= 43, 48) /1.975308641975309D+00, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -2.469135802469136D-02,1.530864197530864D+00,1.753086419753086D - $ +00/ - DATA (CF(I, 32),I= 49, 54) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03,3.086419753086420D - $ -02,-2.469135802469136D-02,3.086419753086420D-03/ - DATA (CF(I, 32),I= 55, 60) /1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 32),I= 61, 66) /3.086419753086420D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02,8.641975308641975D-02,-1.913580246913580D-01/ - DATA (CF(I, 32),I= 67, 72) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01, - $ -2.191358024691358D-01/ - DATA (CF(I, 32),I= 73, 78) /-1.913580246913580D-01, - $ -1.635802469135803D-01,8.641975308641975D-02, - $ -1.358024691358025D-01,1.364197530864198D+00, - $ -3.580246913580247D-01/ - DATA (CF(I, 32),I= 79, 84) /3.086419753086420D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02,8.641975308641975D-02,-1.913580246913580D-01/ - DATA (CF(I, 32),I= 85, 90) /-1.913580246913580D-01 - $ ,1.586419753086420D+00,3.086419753086420D-02,3.086419753086420D - $ -01,-1.358024691358025D-01,-1.635802469135803D-01/ - DATA (CF(I, 32),I= 91, 96) /-3.580246913580247D-01 - $ ,4.197530864197531D-01,-1.358024691358025D-01 - $ ,1.586419753086420D+00,-3.580246913580247D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 32),I= 97,102) /1.530864197530864D+00, - $ -1.913580246913580D-01,-6.913580246913580D-01 - $ ,8.641975308641975D-02,-4.135802469135803D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 32),I=103,108) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01, - $ -2.191358024691358D-01/ - DATA (CF(I, 32),I=109,114) /1.530864197530864D+00, - $ -1.913580246913580D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02,-1.635802469135803D-01 - $ ,5.864197530864197D-02/ - DATA (CF(I, 32),I=115,120) /1.364197530864198D+00, - $ -3.580246913580247D-01,-4.135802469135803D-01 - $ ,1.558641975308642D+00,1.364197530864198D+00, - $ -4.135802469135803D-01/ + DATA (CF(I),I=3256,3344) /4096,128,1280,-1024,128,-160,992,-16, + $ -160,-448,992,1280,-160,128,-16,992,1136,-16,128,2,20,-16,2,128 + $ ,-1024,-16,-160,128,-16,20,-124,2,20,56,-124,-160,20,-16,2,-124 + $ ,-142,-124,-106,56,-88,884,-232,20,-124,2,20,56,-124,-124,1028 + $ ,20,200,-88,-106,-232,272,-88,1028,-232,-88,992,-124,-448,56, + $ -268,-88,-160,20,-16,2,-124,-142,992,-124,-160,20,-106,38,884, + $ -232,-268,1010,884,-268/ C 1 T(2,5,1,7,6,3,4) - DATA (CF(I, 33),I= 1, 6) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01/ - DATA (CF(I, 33),I= 7, 12) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,1.530864197530864D+00, - $ -1.913580246913580D-01,5.864197530864197D-02, - $ -1.635802469135803D-01/ - DATA (CF(I, 33),I= 13, 18) /1.530864197530864D+00, - $ -1.913580246913580D-01,-6.913580246913580D-01 - $ ,8.641975308641975D-02,-4.135802469135803D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 33),I= 19, 24) /1.558641975308642D+00, - $ -4.135802469135803D-01,-4.135802469135803D-01 - $ ,1.364197530864198D+00,1.364197530864198D+00, - $ -3.580246913580247D-01/ - DATA (CF(I, 33),I= 25, 30) /1.975308641975309D-01, - $ -2.469135802469136D-02,1.975308641975309D+00, - $ -2.469135802469136D-01,1.753086419753086D+00,1.530864197530864D - $ +00/ - DATA (CF(I, 33),I= 31, 36) /-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.264197530864197D+01, - $ -1.580246913580247D+00,1.975308641975309D+00,1.975308641975309D - $ -01/ - DATA (CF(I, 33),I= 37, 42) /1.975308641975309D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 33),I= 43, 48) /1.530864197530864D+00, - $ -6.913580246913580D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02,1.530864197530864D+00, - $ -2.469135802469136D-01/ - DATA (CF(I, 33),I= 49, 54) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01/ - DATA (CF(I, 33),I= 55, 60) /1.975308641975309D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 33),I= 61, 66) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,1.975308641975309D-01, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I, 33),I= 67, 72) /-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02,3.086419753086420D - $ -03,-1.913580246913580D-01,3.086419753086420D-02/ - DATA (CF(I, 33),I= 73, 78) /1.753086419753086D+00, - $ -2.191358024691358D-01,1.530864197530864D+00, - $ -1.913580246913580D-01,1.558641975308642D+00,1.586419753086420D - $ +00/ - DATA (CF(I, 33),I= 79, 84) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,1.975308641975309D-01, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I, 33),I= 85, 90) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,1.975308641975309D+00, - $ -2.469135802469136D-01,3.086419753086420D-01,3.086419753086420D - $ -02/ - DATA (CF(I, 33),I= 91, 96) /-4.135802469135803D-01, - $ -1.358024691358025D-01,5.864197530864197D-02, - $ -2.191358024691358D-01,-1.635802469135803D-01, - $ -1.913580246913580D-01/ - DATA (CF(I, 33),I= 97,102) /1.586419753086420D+00, - $ -1.358024691358025D-01,-1.358024691358025D-01, - $ -3.580246913580247D-01,-3.580246913580247D-01 - $ ,4.197530864197531D-01/ - DATA (CF(I, 33),I=103,108) /-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02,3.086419753086420D - $ -03,-1.913580246913580D-01,3.086419753086420D-02/ - DATA (CF(I, 33),I=109,114) /-1.635802469135803D-01, - $ -1.358024691358025D-01,3.086419753086420D-01,3.086419753086420D - $ -02,1.586419753086420D+00,-1.913580246913580D-01/ - DATA (CF(I, 33),I=115,120) /1.364197530864198D+00, - $ -3.580246913580247D-01,-1.635802469135803D-01, - $ -1.913580246913580D-01,-1.358024691358025D-01 - $ ,8.641975308641975D-02/ + DATA (CF(I),I=3345,3432) /4096,-1024,1280,128,128,-16,-1024,128, + $ -160,-16,992,-448,-160,-16,992,-160,-16,2,-160,20,-142,-124,128 + $ ,-16,-1024,128,-160,-16,-16,2,128,-16,20,2,-124,56,20,2,-124,20 + $ ,1136,-142,992,-124,1010,1028,-16,2,128,-16,20,2,-160,20,1280, + $ -160,200,20,-268,-88,38,-142,-106,-124,1028,-88,-88,-232,-232 + $ ,272,-124,56,20,2,-124,20,-106,-88,200,20,1028,-124,884,-232, + $ -106,-124,-88,56/ C 1 T(2,5,6,1,7,3,4) - DATA (CF(I, 34),I= 1, 6) /3.086419753086420D-03 - $ ,3.086419753086420D-02,3.086419753086420D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 34),I= 7, 12) /3.086419753086420D-02 - $ ,3.086419753086420D-01,-1.913580246913580D-01 - $ ,1.586419753086420D+00,-1.635802469135803D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 34),I= 13, 18) /-1.913580246913580D-01, - $ -1.635802469135803D-01,8.641975308641975D-02, - $ -1.358024691358025D-01,1.364197530864198D+00, - $ -3.580246913580247D-01/ - DATA (CF(I, 34),I= 19, 24) /1.586419753086420D+00, - $ -1.358024691358025D-01,-1.358024691358025D-01, - $ -3.580246913580247D-01,-3.580246913580247D-01 - $ ,4.197530864197531D-01/ - DATA (CF(I, 34),I= 25, 30) /-2.469135802469136D-02, - $ -2.469135802469136D-01,-2.469135802469136D-01 - $ ,1.530864197530864D+00,1.530864197530864D+00, - $ -6.913580246913580D-01/ - DATA (CF(I, 34),I= 31, 36) /1.975308641975309D-01 - $ ,1.975308641975309D+00,-1.580246913580247D+00 - $ ,1.264197530864197D+01,1.975308641975309D-01, - $ -1.580246913580247D+00/ - DATA (CF(I, 34),I= 37, 42) /-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 34),I= 43, 48) /1.753086419753086D+00 - $ ,1.530864197530864D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01,-2.469135802469136D-01 - $ ,1.975308641975309D+00/ - DATA (CF(I, 34),I= 49, 54) /3.086419753086420D-03 - $ ,3.086419753086420D-02,3.086419753086420D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 34),I= 55, 60) /-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 34),I= 61, 66) /3.086419753086420D-03 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I, 34),I= 67, 72) /-2.191358024691358D-01, - $ -1.913580246913580D-01,3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 34),I= 73, 78) /-2.191358024691358D-01 - $ ,5.864197530864197D-02,-1.913580246913580D-01, - $ -1.635802469135803D-01,-4.135802469135803D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 34),I= 79, 84) /3.086419753086420D-03 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I, 34),I= 85, 90) /3.086419753086420D-02 - $ ,3.086419753086420D-01,-2.469135802469136D-01 - $ ,1.975308641975309D+00,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 34),I= 91, 96) /1.558641975308642D+00 - $ ,1.586419753086420D+00,-2.191358024691358D-01 - $ ,1.753086419753086D+00,-1.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 34),I= 97,102) /1.558641975308642D+00, - $ -4.135802469135803D-01,-4.135802469135803D-01 - $ ,1.364197530864198D+00,1.364197530864198D+00, - $ -3.580246913580247D-01/ - DATA (CF(I, 34),I=103,108) /-2.191358024691358D-01, - $ -1.913580246913580D-01,3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 34),I=109,114) /5.864197530864197D-02, - $ -1.635802469135803D-01,3.086419753086420D-02, - $ -2.469135802469136D-01,-1.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 34),I=115,120) /-4.135802469135803D-01, - $ -1.358024691358025D-01,-1.913580246913580D-01 - $ ,1.530864197530864D+00,8.641975308641975D-02, - $ -6.913580246913580D-01/ + DATA (CF(I),I=3433,3519) /4096,128,-1024,-16,-160,128,-1024,-16 + $ ,128,1136,992,-16,128,-160,1280,2,20,20,-124,-124,56,-16,-160 + $ ,128,-1024,-16,128,2,20,-16,128,2,-16,-142,-124,2,-16,20,-160, + $ -142,38,-124,-106,-268,-88,2,20,-16,128,2,-16,20,200,-160,1280 + $ ,20,-160,1010,1028,-142,1136,-124,992,1010,-268,-268,884,884, + $ -232,-142,-124,2,-16,20,-160,38,-106,20,-160,-124,992,-268,-88, + $ -124,992,56,-448/ C 1 T(2,5,6,7,1,3,4) - DATA (CF(I, 35),I= 1, 6) /3.086419753086420D-03, - $ -2.469135802469136D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02/ - DATA (CF(I, 35),I= 7, 12) /3.086419753086420D-02, - $ -2.469135802469136D-01,5.864197530864197D-02, - $ -1.635802469135803D-01,1.530864197530864D+00, - $ -1.913580246913580D-01/ - DATA (CF(I, 35),I= 13, 18) /1.558641975308642D+00, - $ -4.135802469135803D-01,-4.135802469135803D-01 - $ ,1.364197530864198D+00,1.364197530864198D+00, - $ -3.580246913580247D-01/ - DATA (CF(I, 35),I= 19, 24) /1.530864197530864D+00, - $ -1.913580246913580D-01,-6.913580246913580D-01 - $ ,8.641975308641975D-02,-4.135802469135803D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 35),I= 25, 30) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,1.753086419753086D+00,1.530864197530864D - $ +00,1.975308641975309D+00,-2.469135802469136D-01/ - DATA (CF(I, 35),I= 31, 36) /1.975308641975309D-01, - $ -1.580246913580247D+00,1.975308641975309D+00,1.975308641975309D - $ -01,1.264197530864197D+01,-1.580246913580247D+00/ - DATA (CF(I, 35),I= 37, 42) /1.530864197530864D+00, - $ -6.913580246913580D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02,1.530864197530864D+00, - $ -2.469135802469136D-01/ - DATA (CF(I, 35),I= 43, 48) /1.975308641975309D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 35),I= 49, 54) /3.086419753086420D-03, - $ -2.469135802469136D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02/ - DATA (CF(I, 35),I= 55, 60) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01/ - DATA (CF(I, 35),I= 61, 66) /-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02,3.086419753086420D - $ -03,-1.913580246913580D-01,3.086419753086420D-02/ - DATA (CF(I, 35),I= 67, 72) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,1.975308641975309D-01, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I, 35),I= 73, 78) /1.586419753086420D+00, - $ -1.358024691358025D-01,-1.358024691358025D-01, - $ -3.580246913580247D-01,-3.580246913580247D-01 - $ ,4.197530864197531D-01/ - DATA (CF(I, 35),I= 79, 84) /-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02,3.086419753086420D - $ -03,-1.913580246913580D-01,3.086419753086420D-02/ - DATA (CF(I, 35),I= 85, 90) /-1.635802469135803D-01, - $ -1.358024691358025D-01,3.086419753086420D-01,3.086419753086420D - $ -02,1.586419753086420D+00,-1.913580246913580D-01/ - DATA (CF(I, 35),I= 91, 96) /1.364197530864198D+00, - $ -3.580246913580247D-01,-1.635802469135803D-01, - $ -1.913580246913580D-01,-1.358024691358025D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 35),I= 97,102) /1.753086419753086D+00, - $ -2.191358024691358D-01,1.530864197530864D+00, - $ -1.913580246913580D-01,1.558641975308642D+00,1.586419753086420D - $ +00/ - DATA (CF(I, 35),I=103,108) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,1.975308641975309D-01, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I, 35),I=109,114) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,1.975308641975309D+00, - $ -2.469135802469136D-01,3.086419753086420D-01,3.086419753086420D - $ -02/ - DATA (CF(I, 35),I=115,120) /-4.135802469135803D-01, - $ -1.358024691358025D-01,5.864197530864197D-02, - $ -2.191358024691358D-01,-1.635802469135803D-01, - $ -1.913580246913580D-01/ + DATA (CF(I),I=3520,3605) /4096,-1024,992,-448,-160,-16,992,-160 + $ ,128,-16,-1024,128,-160,-16,2,-16,-142,-124,-160,20,-16,128, + $ -160,-16,-1024,128,-124,56,20,2,-124,20,-16,2,128,-16,20,2,1028 + $ ,-88,-88,-232,-232,272,-124,56,20,2,-124,20,-106,-88,200,20 + $ ,1028,-124,884,-232,-106,-124,-88,56,1136,-142,992,-124,1010 + $ ,1028,-16,2,128,-16,20,2,-160,20,1280,-160,200,20,-268,-88,38, + $ -142,-106,-124/ C 1 T(2,5,7,1,6,3,4) - DATA (CF(I, 36),I= 1, 6) /3.086419753086420D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02, - $ -1.913580246913580D-01/ - DATA (CF(I, 36),I= 7, 12) /3.086419753086420D-01 - $ ,3.086419753086420D-02,-1.635802469135803D-01, - $ -1.358024691358025D-01,-1.913580246913580D-01 - $ ,1.586419753086420D+00/ - DATA (CF(I, 36),I= 13, 18) /1.586419753086420D+00, - $ -1.358024691358025D-01,-1.358024691358025D-01, - $ -3.580246913580247D-01,-3.580246913580247D-01 - $ ,4.197530864197531D-01/ - DATA (CF(I, 36),I= 19, 24) /-1.913580246913580D-01, - $ -1.635802469135803D-01,8.641975308641975D-02, - $ -1.358024691358025D-01,1.364197530864198D+00, - $ -3.580246913580247D-01/ - DATA (CF(I, 36),I= 25, 30) /-2.469135802469136D-01, - $ -2.469135802469136D-02,1.530864197530864D+00, - $ -6.913580246913580D-01,-2.469135802469136D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 36),I= 31, 36) /1.975308641975309D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -1.580246913580247D+00,-1.580246913580247D+00 - $ ,1.264197530864197D+01/ - DATA (CF(I, 36),I= 37, 42) /1.753086419753086D+00 - $ ,1.530864197530864D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01,-2.469135802469136D-01 - $ ,1.975308641975309D+00/ - DATA (CF(I, 36),I= 43, 48) /-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 36),I= 49, 54) /3.086419753086420D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02, - $ -1.913580246913580D-01/ - DATA (CF(I, 36),I= 55, 60) /-2.469135802469136D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -1.580246913580247D+00/ - DATA (CF(I, 36),I= 61, 66) /-2.191358024691358D-01, - $ -1.913580246913580D-01,3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 36),I= 67, 72) /3.086419753086420D-03 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I, 36),I= 73, 78) /1.558641975308642D+00, - $ -4.135802469135803D-01,-4.135802469135803D-01 - $ ,1.364197530864198D+00,1.364197530864198D+00, - $ -3.580246913580247D-01/ - DATA (CF(I, 36),I= 79, 84) /-2.191358024691358D-01, - $ -1.913580246913580D-01,3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 36),I= 85, 90) /5.864197530864197D-02, - $ -1.635802469135803D-01,3.086419753086420D-02, - $ -2.469135802469136D-01,-1.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 36),I= 91, 96) /-4.135802469135803D-01, - $ -1.358024691358025D-01,-1.913580246913580D-01 - $ ,1.530864197530864D+00,8.641975308641975D-02, - $ -6.913580246913580D-01/ - DATA (CF(I, 36),I= 97,102) /-2.191358024691358D-01 - $ ,5.864197530864197D-02,-1.913580246913580D-01, - $ -1.635802469135803D-01,-4.135802469135803D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 36),I=103,108) /3.086419753086420D-03 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I, 36),I=109,114) /3.086419753086420D-02 - $ ,3.086419753086420D-01,-2.469135802469136D-01 - $ ,1.975308641975309D+00,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 36),I=115,120) /1.558641975308642D+00 - $ ,1.586419753086420D+00,-2.191358024691358D-01 - $ ,1.753086419753086D+00,-1.913580246913580D-01 - $ ,1.530864197530864D+00/ + DATA (CF(I),I=3606,3690) /4096,1136,992,-16,128,-160,1280,-16, + $ -160,128,-1024,-16,128,20,2,-124,56,20,-124,-160,-16,-16,128 + $ ,128,-1024,-142,-124,2,-16,20,-160,2,20,-16,128,2,-16,1010,-268 + $ ,-268,884,884,-232,-142,-124,2,-16,20,-160,38,-106,20,-160,-124 + $ ,992,-268,-88,-124,992,56,-448,-142,38,-124,-106,-268,-88,2,20, + $ -16,128,2,-16,20,200,-160,1280,20,-160,1010,1028,-142,1136,-124 + $ ,992/ C 1 T(2,5,7,6,1,3,4) - DATA (CF(I, 37),I= 1, 6) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,1.975308641975309D-01, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I, 37),I= 7, 12) /1.753086419753086D+00, - $ -2.191358024691358D-01,1.530864197530864D+00, - $ -1.913580246913580D-01,1.558641975308642D+00,1.586419753086420D - $ +00/ - DATA (CF(I, 37),I= 13, 18) /1.975308641975309D+00, - $ -2.469135802469136D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02,3.086419753086420D - $ -01/ - DATA (CF(I, 37),I= 19, 24) /5.864197530864197D-02, - $ -2.191358024691358D-01,-4.135802469135803D-01, - $ -1.358024691358025D-01,-1.913580246913580D-01, - $ -1.635802469135803D-01/ - DATA (CF(I, 37),I= 25, 30) /1.975308641975309D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 37),I= 31, 36) /1.975308641975309D+00, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -2.469135802469136D-02,1.530864197530864D+00,1.753086419753086D - $ +00/ - DATA (CF(I, 37),I= 37, 42) /1.264197530864197D+01, - $ -1.580246913580247D+00,-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01,1.975308641975309D - $ +00/ - DATA (CF(I, 37),I= 43, 48) /1.530864197530864D+00, - $ -2.469135802469136D-01,-6.913580246913580D-01 - $ ,1.530864197530864D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 37),I= 49, 54) /1.530864197530864D+00, - $ -1.913580246913580D-01,-6.913580246913580D-01 - $ ,8.641975308641975D-02,-4.135802469135803D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 37),I= 55, 60) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01, - $ -2.191358024691358D-01/ - DATA (CF(I, 37),I= 61, 66) /1.530864197530864D+00, - $ -1.913580246913580D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02,-1.635802469135803D-01 - $ ,5.864197530864197D-02/ - DATA (CF(I, 37),I= 67, 72) /1.364197530864198D+00, - $ -3.580246913580247D-01,-4.135802469135803D-01 - $ ,1.558641975308642D+00,1.364197530864198D+00, - $ -4.135802469135803D-01/ - DATA (CF(I, 37),I= 73, 78) /1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I, 37),I= 79, 84) /-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 37),I= 85, 90) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01, - $ -2.191358024691358D-01/ - DATA (CF(I, 37),I= 91, 96) /3.086419753086420D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02,8.641975308641975D-02,-1.913580246913580D-01/ - DATA (CF(I, 37),I= 97,102) /-1.635802469135803D-01, - $ -1.913580246913580D-01,1.364197530864198D+00, - $ -3.580246913580247D-01,8.641975308641975D-02, - $ -1.358024691358025D-01/ - DATA (CF(I, 37),I=103,108) /-1.913580246913580D-01 - $ ,3.086419753086420D-02,8.641975308641975D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I, 37),I=109,114) /-3.580246913580247D-01 - $ ,4.197530864197531D-01,-1.358024691358025D-01 - $ ,1.586419753086420D+00,-3.580246913580247D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 37),I=115,120) /-1.913580246913580D-01 - $ ,1.586419753086420D+00,3.086419753086420D-02,3.086419753086420D - $ -01,-1.358024691358025D-01,-1.635802469135803D-01/ + DATA (CF(I),I=3691,3774) /4096,-1024,-1024,128,128,1280,992,-160 + $ ,-448,992,-16,-160,992,-124,-448,56,-268,-88,-160,20,-16,2,-124 + $ ,-142,992,-124,-160,20,-106,38,884,-232,-268,1010,884,-268,128, + $ -16,-16,2,2,20,-1024,128,128,-16,-16,-160,-160,20,-16,2,-124, + $ -142,20,-124,2,20,56,-124,-106,-124,884,-232,56,-88,-124,20,56, + $ -124,2,20,-232,272,-88,1028,-232,-88,-124,1028,20,200,-88,-106/ C 1 T(2,6,1,5,7,3,4) - DATA (CF(I, 38),I= 1, 6) /3.086419753086420D-03 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I, 38),I= 7, 12) /-2.191358024691358D-01 - $ ,5.864197530864197D-02,-1.913580246913580D-01, - $ -1.635802469135803D-01,-4.135802469135803D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 38),I= 13, 18) /-2.469135802469136D-01 - $ ,1.975308641975309D+00,3.086419753086420D-02,3.086419753086420D - $ -01,-2.469135802469136D-01,3.086419753086420D-02/ - DATA (CF(I, 38),I= 19, 24) /-2.191358024691358D-01 - $ ,1.753086419753086D+00,1.558641975308642D+00,1.586419753086420D - $ +00,1.530864197530864D+00,-1.913580246913580D-01/ - DATA (CF(I, 38),I= 25, 30) /-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 38),I= 31, 36) /-2.469135802469136D-01 - $ ,1.530864197530864D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01,-6.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 38),I= 37, 42) /-1.580246913580247D+00 - $ ,1.264197530864197D+01,1.975308641975309D-01,1.975308641975309D - $ +00,-1.580246913580247D+00,1.975308641975309D-01/ - DATA (CF(I, 38),I= 43, 48) /-2.469135802469136D-01 - $ ,1.975308641975309D+00,1.530864197530864D+00,1.753086419753086D - $ +00,1.975308641975309D-01,-2.469135802469136D-02/ - DATA (CF(I, 38),I= 49, 54) /-1.913580246913580D-01, - $ -1.635802469135803D-01,8.641975308641975D-02, - $ -1.358024691358025D-01,1.364197530864198D+00, - $ -3.580246913580247D-01/ - DATA (CF(I, 38),I= 55, 60) /3.086419753086420D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02,8.641975308641975D-02,-1.913580246913580D-01/ - DATA (CF(I, 38),I= 61, 66) /-1.913580246913580D-01 - $ ,1.586419753086420D+00,3.086419753086420D-02,3.086419753086420D - $ -01,-1.358024691358025D-01,-1.635802469135803D-01/ - DATA (CF(I, 38),I= 67, 72) /-3.580246913580247D-01 - $ ,4.197530864197531D-01,-1.358024691358025D-01 - $ ,1.586419753086420D+00,-3.580246913580247D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 38),I= 73, 78) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03,3.086419753086420D - $ -02,-2.469135802469136D-02,3.086419753086420D-03/ - DATA (CF(I, 38),I= 79, 84) /1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 38),I= 85, 90) /3.086419753086420D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02,8.641975308641975D-02,-1.913580246913580D-01/ - DATA (CF(I, 38),I= 91, 96) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01, - $ -2.191358024691358D-01/ - DATA (CF(I, 38),I= 97,102) /-1.913580246913580D-01 - $ ,1.530864197530864D+00,-4.135802469135803D-01, - $ -1.358024691358025D-01,-6.913580246913580D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 38),I=103,108) /3.086419753086420D-02, - $ -2.469135802469136D-01,-1.913580246913580D-01, - $ -2.191358024691358D-01,-2.469135802469136D-02 - $ ,3.086419753086420D-03/ - DATA (CF(I, 38),I=109,114) /1.364197530864198D+00, - $ -3.580246913580247D-01,-4.135802469135803D-01 - $ ,1.558641975308642D+00,1.364197530864198D+00, - $ -4.135802469135803D-01/ - DATA (CF(I, 38),I=115,120) /1.530864197530864D+00, - $ -1.913580246913580D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02,-1.635802469135803D-01 - $ ,5.864197530864197D-02/ + DATA (CF(I),I=3775,3857) /4096,128,1280,-1024,128,-160,1280,992 + $ ,1136,128,-16,-124,-106,56,-88,884,-232,20,-124,2,20,56,-124, + $ -124,1028,20,200,-88,-106,-232,272,-88,1028,-232,-88,-16,128,2 + $ ,20,-16,2,128,-1024,-16,-160,128,-16,20,-124,2,20,56,-124,-160 + $ ,20,-16,2,-124,-142,-124,992,-268,-88,-448,56,20,-160,-124,-142 + $ ,-16,2,884,-232,-268,1010,884,-268,992,-124,-160,20,-106,38/ C 1 T(2,6,1,7,5,3,4) - DATA (CF(I, 39),I= 1, 6) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01, - $ -2.191358024691358D-01/ - DATA (CF(I, 39),I= 7, 12) /1.530864197530864D+00, - $ -1.913580246913580D-01,-6.913580246913580D-01 - $ ,8.641975308641975D-02,-4.135802469135803D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 39),I= 13, 18) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,1.530864197530864D+00, - $ -1.913580246913580D-01,5.864197530864197D-02, - $ -1.635802469135803D-01/ - DATA (CF(I, 39),I= 19, 24) /-4.135802469135803D-01 - $ ,1.558641975308642D+00,1.364197530864198D+00, - $ -3.580246913580247D-01,-4.135802469135803D-01 - $ ,1.364197530864198D+00/ - DATA (CF(I, 39),I= 25, 30) /1.975308641975309D+00, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -2.469135802469136D-02,1.530864197530864D+00,1.753086419753086D - $ +00/ - DATA (CF(I, 39),I= 31, 36) /1.975308641975309D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 39),I= 37, 42) /-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.264197530864197D+01, - $ -1.580246913580247D+00,1.975308641975309D+00,1.975308641975309D - $ -01/ - DATA (CF(I, 39),I= 43, 48) /-6.913580246913580D-01 - $ ,1.530864197530864D+00,1.530864197530864D+00, - $ -2.469135802469136D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 39),I= 49, 54) /1.753086419753086D+00, - $ -2.191358024691358D-01,1.530864197530864D+00, - $ -1.913580246913580D-01,1.558641975308642D+00,1.586419753086420D - $ +00/ - DATA (CF(I, 39),I= 55, 60) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,1.975308641975309D-01, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I, 39),I= 61, 66) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,1.975308641975309D+00, - $ -2.469135802469136D-01,3.086419753086420D-01,3.086419753086420D - $ -02/ - DATA (CF(I, 39),I= 67, 72) /-4.135802469135803D-01, - $ -1.358024691358025D-01,5.864197530864197D-02, - $ -2.191358024691358D-01,-1.635802469135803D-01, - $ -1.913580246913580D-01/ - DATA (CF(I, 39),I= 73, 78) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01/ - DATA (CF(I, 39),I= 79, 84) /1.975308641975309D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 39),I= 85, 90) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,1.975308641975309D-01, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I, 39),I= 91, 96) /-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02,3.086419753086420D - $ -03,-1.913580246913580D-01,3.086419753086420D-02/ - DATA (CF(I, 39),I= 97,102) /-1.358024691358025D-01 - $ ,1.586419753086420D+00,-3.580246913580247D-01 - $ ,4.197530864197531D-01,-1.358024691358025D-01, - $ -3.580246913580247D-01/ - DATA (CF(I, 39),I=103,108) /8.641975308641975D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I, 39),I=109,114) /1.364197530864198D+00, - $ -3.580246913580247D-01,-1.635802469135803D-01, - $ -1.913580246913580D-01,-1.358024691358025D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 39),I=115,120) /-1.635802469135803D-01, - $ -1.358024691358025D-01,3.086419753086420D-01,3.086419753086420D - $ -02,1.586419753086420D+00,-1.913580246913580D-01/ + DATA (CF(I),I=3858,3939) /4096,-1024,1280,128,-448,992,992,-160, + $ -160,-16,1136,-142,992,-124,1010,1028,-16,2,128,-16,20,2,-160 + $ ,20,1280,-160,200,20,-268,-88,38,-142,-106,-124,-16,2,-160,20, + $ -142,-124,128,-16,-1024,128,-160,-16,-16,2,128,-16,20,2,-124,56 + $ ,20,2,-124,20,-88,1028,-232,272,-88,-232,56,-124,-124,20,20,2 + $ ,884,-232,-106,-124,-88,56,-106,-88,200,20,1028,-124/ C 1 T(2,6,5,1,7,3,4) - DATA (CF(I, 40),I= 1, 6) /3.086419753086420D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02,8.641975308641975D-02,-1.913580246913580D-01/ - DATA (CF(I, 40),I= 7, 12) /-1.913580246913580D-01, - $ -1.635802469135803D-01,8.641975308641975D-02, - $ -1.358024691358025D-01,1.364197530864198D+00, - $ -3.580246913580247D-01/ - DATA (CF(I, 40),I= 13, 18) /3.086419753086420D-02 - $ ,3.086419753086420D-01,-1.913580246913580D-01 - $ ,1.586419753086420D+00,-1.635802469135803D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 40),I= 19, 24) /-1.358024691358025D-01 - $ ,1.586419753086420D+00,-3.580246913580247D-01 - $ ,4.197530864197531D-01,-1.358024691358025D-01, - $ -3.580246913580247D-01/ - DATA (CF(I, 40),I= 25, 30) /-2.469135802469136D-01 - $ ,1.530864197530864D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01,-6.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 40),I= 31, 36) /-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 40),I= 37, 42) /1.975308641975309D-01 - $ ,1.975308641975309D+00,-1.580246913580247D+00 - $ ,1.264197530864197D+01,1.975308641975309D-01, - $ -1.580246913580247D+00/ - DATA (CF(I, 40),I= 43, 48) /1.530864197530864D+00 - $ ,1.753086419753086D+00,-2.469135802469136D-01 - $ ,1.975308641975309D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 40),I= 49, 54) /-2.191358024691358D-01 - $ ,5.864197530864197D-02,-1.913580246913580D-01, - $ -1.635802469135803D-01,-4.135802469135803D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 40),I= 55, 60) /3.086419753086420D-03 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I, 40),I= 61, 66) /3.086419753086420D-02 - $ ,3.086419753086420D-01,-2.469135802469136D-01 - $ ,1.975308641975309D+00,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 40),I= 67, 72) /1.558641975308642D+00 - $ ,1.586419753086420D+00,-2.191358024691358D-01 - $ ,1.753086419753086D+00,-1.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 40),I= 73, 78) /3.086419753086420D-03 - $ ,3.086419753086420D-02,3.086419753086420D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 40),I= 79, 84) /-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 40),I= 85, 90) /3.086419753086420D-03 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I, 40),I= 91, 96) /-2.191358024691358D-01, - $ -1.913580246913580D-01,3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 40),I= 97,102) /-4.135802469135803D-01 - $ ,1.558641975308642D+00,1.364197530864198D+00, - $ -3.580246913580247D-01,-4.135802469135803D-01 - $ ,1.364197530864198D+00/ - DATA (CF(I, 40),I=103,108) /-1.913580246913580D-01, - $ -2.191358024691358D-01,3.086419753086420D-02, - $ -2.469135802469136D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I, 40),I=109,114) /-4.135802469135803D-01, - $ -1.358024691358025D-01,-1.913580246913580D-01 - $ ,1.530864197530864D+00,8.641975308641975D-02, - $ -6.913580246913580D-01/ - DATA (CF(I, 40),I=115,120) /5.864197530864197D-02, - $ -1.635802469135803D-01,3.086419753086420D-02, - $ -2.469135802469136D-01,-1.913580246913580D-01 - $ ,1.530864197530864D+00/ + DATA (CF(I),I=3940,4020) /4096,128,-1024,992,1136,-160,1280,-16 + $ ,128,-142,38,-124,-106,-268,-88,2,20,-16,128,2,-16,20,200,-160 + $ ,1280,20,-160,1010,1028,-142,1136,-124,992,2,20,20,-124,-124,56 + $ ,-16,-160,128,-1024,-16,128,2,20,-16,128,2,-16,-142,-124,2,-16 + $ ,20,-160,-268,1010,884,-232,-268,884,-124,-142,20,-160,2,-16, + $ -268,-88,-124,992,56,-448,38,-106,20,-160,-124,992/ C 1 T(2,6,5,7,1,3,4) - DATA (CF(I, 41),I= 1, 6) /-2.191358024691358D-01, - $ -1.913580246913580D-01,3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 41),I= 7, 12) /1.558641975308642D+00, - $ -4.135802469135803D-01,-4.135802469135803D-01 - $ ,1.364197530864198D+00,1.364197530864198D+00, - $ -3.580246913580247D-01/ - DATA (CF(I, 41),I= 13, 18) /3.086419753086420D-02, - $ -2.469135802469136D-01,5.864197530864197D-02, - $ -1.635802469135803D-01,1.530864197530864D+00, - $ -1.913580246913580D-01/ - DATA (CF(I, 41),I= 19, 24) /-1.913580246913580D-01 - $ ,1.530864197530864D+00,-4.135802469135803D-01, - $ -1.358024691358025D-01,-6.913580246913580D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 41),I= 25, 30) /1.753086419753086D+00 - $ ,1.530864197530864D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01,-2.469135802469136D-01 - $ ,1.975308641975309D+00/ - DATA (CF(I, 41),I= 31, 36) /1.530864197530864D+00, - $ -6.913580246913580D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02,1.530864197530864D+00, - $ -2.469135802469136D-01/ - DATA (CF(I, 41),I= 37, 42) /1.975308641975309D-01, - $ -1.580246913580247D+00,1.975308641975309D+00,1.975308641975309D - $ -01,1.264197530864197D+01,-1.580246913580247D+00/ - DATA (CF(I, 41),I= 43, 48) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01/ - DATA (CF(I, 41),I= 49, 54) /1.586419753086420D+00, - $ -1.358024691358025D-01,-1.358024691358025D-01, - $ -3.580246913580247D-01,-3.580246913580247D-01 - $ ,4.197530864197531D-01/ - DATA (CF(I, 41),I= 55, 60) /-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02,3.086419753086420D - $ -03,-1.913580246913580D-01,3.086419753086420D-02/ - DATA (CF(I, 41),I= 61, 66) /-1.635802469135803D-01, - $ -1.358024691358025D-01,3.086419753086420D-01,3.086419753086420D - $ -02,1.586419753086420D+00,-1.913580246913580D-01/ - DATA (CF(I, 41),I= 67, 72) /1.364197530864198D+00, - $ -3.580246913580247D-01,-1.635802469135803D-01, - $ -1.913580246913580D-01,-1.358024691358025D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 41),I= 73, 78) /3.086419753086420D-03, - $ -2.469135802469136D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02/ - DATA (CF(I, 41),I= 79, 84) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01/ - DATA (CF(I, 41),I= 85, 90) /-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02,3.086419753086420D - $ -03,-1.913580246913580D-01,3.086419753086420D-02/ - DATA (CF(I, 41),I= 91, 96) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,1.975308641975309D-01, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I, 41),I= 97,102) /-2.191358024691358D-01 - $ ,1.753086419753086D+00,1.558641975308642D+00,1.586419753086420D - $ +00,1.530864197530864D+00,-1.913580246913580D-01/ - DATA (CF(I, 41),I=103,108) /3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03,1.975308641975309D-01,-2.469135802469136D-02/ - DATA (CF(I, 41),I=109,114) /-4.135802469135803D-01, - $ -1.358024691358025D-01,5.864197530864197D-02, - $ -2.191358024691358D-01,-1.635802469135803D-01, - $ -1.913580246913580D-01/ - DATA (CF(I, 41),I=115,120) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,1.975308641975309D+00, - $ -2.469135802469136D-01,3.086419753086420D-01,3.086419753086420D - $ -02/ + DATA (CF(I),I=4021,4100) /4096,-1024,-16,128,-160,-16,-1024,128 + $ ,1028,-88,-88,-232,-232,272,-124,56,20,2,-124,20,-106,-88,200 + $ ,20,1028,-124,884,-232,-106,-124,-88,56,2,-16,-142,-124,-160,20 + $ ,-16,128,-160,-16,-1024,128,-124,56,20,2,-124,20,-16,2,128,-16 + $ ,20,2,-142,1136,1010,1028,992,-124,2,-16,20,2,128,-16,-268,-88 + $ ,38,-142,-106,-124,-160,20,1280,-160,200,20/ C 1 T(2,6,7,1,5,3,4) - DATA (CF(I, 42),I= 1, 6) /-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02,3.086419753086420D - $ -03,-1.913580246913580D-01,3.086419753086420D-02/ - DATA (CF(I, 42),I= 7, 12) /1.586419753086420D+00, - $ -1.358024691358025D-01,-1.358024691358025D-01, - $ -3.580246913580247D-01,-3.580246913580247D-01 - $ ,4.197530864197531D-01/ - DATA (CF(I, 42),I= 13, 18) /3.086419753086420D-01 - $ ,3.086419753086420D-02,-1.635802469135803D-01, - $ -1.358024691358025D-01,-1.913580246913580D-01 - $ ,1.586419753086420D+00/ - DATA (CF(I, 42),I= 19, 24) /-1.635802469135803D-01, - $ -1.913580246913580D-01,1.364197530864198D+00, - $ -3.580246913580247D-01,8.641975308641975D-02, - $ -1.358024691358025D-01/ - DATA (CF(I, 42),I= 25, 30) /1.530864197530864D+00, - $ -6.913580246913580D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02,1.530864197530864D+00, - $ -2.469135802469136D-01/ - DATA (CF(I, 42),I= 31, 36) /1.753086419753086D+00 - $ ,1.530864197530864D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01,-2.469135802469136D-01 - $ ,1.975308641975309D+00/ - DATA (CF(I, 42),I= 37, 42) /1.975308641975309D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -1.580246913580247D+00,-1.580246913580247D+00 - $ ,1.264197530864197D+01/ - DATA (CF(I, 42),I= 43, 48) /-2.469135802469136D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -1.580246913580247D+00/ - DATA (CF(I, 42),I= 49, 54) /1.558641975308642D+00, - $ -4.135802469135803D-01,-4.135802469135803D-01 - $ ,1.364197530864198D+00,1.364197530864198D+00, - $ -3.580246913580247D-01/ - DATA (CF(I, 42),I= 55, 60) /-2.191358024691358D-01, - $ -1.913580246913580D-01,3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 42),I= 61, 66) /5.864197530864197D-02, - $ -1.635802469135803D-01,3.086419753086420D-02, - $ -2.469135802469136D-01,-1.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 42),I= 67, 72) /-4.135802469135803D-01, - $ -1.358024691358025D-01,-1.913580246913580D-01 - $ ,1.530864197530864D+00,8.641975308641975D-02, - $ -6.913580246913580D-01/ - DATA (CF(I, 42),I= 73, 78) /3.086419753086420D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02, - $ -1.913580246913580D-01/ - DATA (CF(I, 42),I= 79, 84) /-2.469135802469136D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -1.580246913580247D+00/ - DATA (CF(I, 42),I= 85, 90) /-2.191358024691358D-01, - $ -1.913580246913580D-01,3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 42),I= 91, 96) /3.086419753086420D-03 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I, 42),I= 97,102) /5.864197530864197D-02, - $ -2.191358024691358D-01,-4.135802469135803D-01, - $ -1.358024691358025D-01,-1.913580246913580D-01, - $ -1.635802469135803D-01/ - DATA (CF(I, 42),I=103,108) /3.086419753086420D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 42),I=109,114) /1.558641975308642D+00 - $ ,1.586419753086420D+00,-2.191358024691358D-01 - $ ,1.753086419753086D+00,-1.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 42),I=115,120) /3.086419753086420D-02 - $ ,3.086419753086420D-01,-2.469135802469136D-01 - $ ,1.975308641975309D+00,3.086419753086420D-02, - $ -2.469135802469136D-01/ + DATA (CF(I),I=4101,4179) /4096,-160,-16,-16,128,128,-1024,1010, + $ -268,-268,884,884,-232,-142,-124,2,-16,20,-160,38,-106,20,-160, + $ -124,992,-268,-88,-124,992,56,-448,20,2,-124,56,20,-124,-160, + $ -16,-16,128,128,-1024,-142,-124,2,-16,20,-160,2,20,-16,128,2, + $ -16,38,-142,-268,-88,-124,-106,20,2,2,-16,-16,128,1010,1028, + $ -142,1136,-124,992,20,200,-160,1280,20,-160/ C 1 T(2,6,7,5,1,3,4) - DATA (CF(I, 43),I= 1, 6) /3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03,1.975308641975309D-01,-2.469135802469136D-02/ - DATA (CF(I, 43),I= 7, 12) /-2.191358024691358D-01 - $ ,1.753086419753086D+00,1.558641975308642D+00,1.586419753086420D - $ +00,1.530864197530864D+00,-1.913580246913580D-01/ - DATA (CF(I, 43),I= 13, 18) /5.864197530864197D-02, - $ -2.191358024691358D-01,-4.135802469135803D-01, - $ -1.358024691358025D-01,-1.913580246913580D-01, - $ -1.635802469135803D-01/ - DATA (CF(I, 43),I= 19, 24) /1.975308641975309D+00, - $ -2.469135802469136D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02,3.086419753086420D - $ -01/ - DATA (CF(I, 43),I= 25, 30) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01/ - DATA (CF(I, 43),I= 31, 36) /-2.469135802469136D-01 - $ ,1.975308641975309D+00,1.530864197530864D+00,1.753086419753086D - $ +00,1.975308641975309D-01,-2.469135802469136D-02/ - DATA (CF(I, 43),I= 37, 42) /1.530864197530864D+00, - $ -2.469135802469136D-01,-6.913580246913580D-01 - $ ,1.530864197530864D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 43),I= 43, 48) /1.264197530864197D+01, - $ -1.580246913580247D+00,-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01,1.975308641975309D - $ +00/ - DATA (CF(I, 43),I= 49, 54) /-1.913580246913580D-01 - $ ,1.530864197530864D+00,-4.135802469135803D-01, - $ -1.358024691358025D-01,-6.913580246913580D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 43),I= 55, 60) /3.086419753086420D-02, - $ -2.469135802469136D-01,-1.913580246913580D-01, - $ -2.191358024691358D-01,-2.469135802469136D-02 - $ ,3.086419753086420D-03/ - DATA (CF(I, 43),I= 61, 66) /1.364197530864198D+00, - $ -3.580246913580247D-01,-4.135802469135803D-01 - $ ,1.558641975308642D+00,1.364197530864198D+00, - $ -4.135802469135803D-01/ - DATA (CF(I, 43),I= 67, 72) /1.530864197530864D+00, - $ -1.913580246913580D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02,-1.635802469135803D-01 - $ ,5.864197530864197D-02/ - DATA (CF(I, 43),I= 73, 78) /-1.635802469135803D-01, - $ -1.913580246913580D-01,1.364197530864198D+00, - $ -3.580246913580247D-01,8.641975308641975D-02, - $ -1.358024691358025D-01/ - DATA (CF(I, 43),I= 79, 84) /-1.913580246913580D-01 - $ ,3.086419753086420D-02,8.641975308641975D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I, 43),I= 85, 90) /-3.580246913580247D-01 - $ ,4.197530864197531D-01,-1.358024691358025D-01 - $ ,1.586419753086420D+00,-3.580246913580247D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 43),I= 91, 96) /-1.913580246913580D-01 - $ ,1.586419753086420D+00,3.086419753086420D-02,3.086419753086420D - $ -01,-1.358024691358025D-01,-1.635802469135803D-01/ - DATA (CF(I, 43),I= 97,102) /1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I, 43),I=103,108) /-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 43),I=109,114) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01, - $ -2.191358024691358D-01/ - DATA (CF(I, 43),I=115,120) /3.086419753086420D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02,8.641975308641975D-02,-1.913580246913580D-01/ + DATA (CF(I),I=4180,4257) /4096,-1024,-1024,128,128,1280,-124,992 + $ ,-268,-88,-448,56,20,-160,-124,-142,-16,2,884,-232,-268,1010 + $ ,884,-268,992,-124,-160,20,-106,38,-106,-124,884,-232,56,-88, + $ -124,20,56,-124,2,20,-232,272,-88,1028,-232,-88,-124,1028,20 + $ ,200,-88,-106,128,-16,-16,2,2,20,-1024,128,128,-16,-16,-160, + $ -160,20,-16,2,-124,-142,20,-124,2,20,56,-124/ C 1 T(2,7,1,5,6,3,4) - DATA (CF(I, 44),I= 1, 6) /3.086419753086420D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 44),I= 7, 12) /5.864197530864197D-02, - $ -2.191358024691358D-01,-4.135802469135803D-01, - $ -1.358024691358025D-01,-1.913580246913580D-01, - $ -1.635802469135803D-01/ - DATA (CF(I, 44),I= 13, 18) /-2.191358024691358D-01 - $ ,1.753086419753086D+00,1.558641975308642D+00,1.586419753086420D - $ +00,1.530864197530864D+00,-1.913580246913580D-01/ - DATA (CF(I, 44),I= 19, 24) /-2.469135802469136D-01 - $ ,1.975308641975309D+00,3.086419753086420D-02,3.086419753086420D - $ -01,-2.469135802469136D-01,3.086419753086420D-02/ - DATA (CF(I, 44),I= 25, 30) /-2.469135802469136D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -1.580246913580247D+00/ - DATA (CF(I, 44),I= 31, 36) /1.530864197530864D+00, - $ -2.469135802469136D-01,-6.913580246913580D-01 - $ ,1.530864197530864D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 44),I= 37, 42) /-2.469135802469136D-01 - $ ,1.975308641975309D+00,1.530864197530864D+00,1.753086419753086D - $ +00,1.975308641975309D-01,-2.469135802469136D-02/ - DATA (CF(I, 44),I= 43, 48) /-1.580246913580247D+00 - $ ,1.264197530864197D+01,1.975308641975309D-01,1.975308641975309D - $ +00,-1.580246913580247D+00,1.975308641975309D-01/ - DATA (CF(I, 44),I= 49, 54) /-1.635802469135803D-01, - $ -1.913580246913580D-01,1.364197530864198D+00, - $ -3.580246913580247D-01,8.641975308641975D-02, - $ -1.358024691358025D-01/ - DATA (CF(I, 44),I= 55, 60) /-1.913580246913580D-01 - $ ,3.086419753086420D-02,8.641975308641975D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I, 44),I= 61, 66) /-3.580246913580247D-01 - $ ,4.197530864197531D-01,-1.358024691358025D-01 - $ ,1.586419753086420D+00,-3.580246913580247D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 44),I= 67, 72) /-1.913580246913580D-01 - $ ,1.586419753086420D+00,3.086419753086420D-02,3.086419753086420D - $ -01,-1.358024691358025D-01,-1.635802469135803D-01/ - DATA (CF(I, 44),I= 73, 78) /-1.913580246913580D-01 - $ ,1.530864197530864D+00,-4.135802469135803D-01, - $ -1.358024691358025D-01,-6.913580246913580D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 44),I= 79, 84) /3.086419753086420D-02, - $ -2.469135802469136D-01,-1.913580246913580D-01, - $ -2.191358024691358D-01,-2.469135802469136D-02 - $ ,3.086419753086420D-03/ - DATA (CF(I, 44),I= 85, 90) /1.364197530864198D+00, - $ -3.580246913580247D-01,-4.135802469135803D-01 - $ ,1.558641975308642D+00,1.364197530864198D+00, - $ -4.135802469135803D-01/ - DATA (CF(I, 44),I= 91, 96) /1.530864197530864D+00, - $ -1.913580246913580D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02,-1.635802469135803D-01 - $ ,5.864197530864197D-02/ - DATA (CF(I, 44),I= 97,102) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03,3.086419753086420D - $ -02,-2.469135802469136D-02,3.086419753086420D-03/ - DATA (CF(I, 44),I=103,108) /1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 44),I=109,114) /3.086419753086420D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02,8.641975308641975D-02,-1.913580246913580D-01/ - DATA (CF(I, 44),I=115,120) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01, - $ -2.191358024691358D-01/ + DATA (CF(I),I=4258,4334) /4096,128,1280,-1024,128,-106,-124,884, + $ -232,56,-88,-124,20,56,-124,2,20,-232,272,-88,1028,-232,-88, + $ -124,1028,20,200,-88,-106,-124,992,-268,-88,-448,56,20,-160, + $ -124,-142,-16,2,884,-232,-268,1010,884,-268,992,-124,-160,20, + $ -106,38,-16,128,2,20,-16,2,128,-1024,-16,-160,128,-16,20,-124,2 + $ ,20,56,-124,-160,20,-16,2,-124,-142/ C 1 T(2,7,1,6,5,3,4) - DATA (CF(I, 45),I= 1, 6) /3.086419753086420D-02, - $ -2.469135802469136D-01,-1.913580246913580D-01, - $ -2.191358024691358D-01,-2.469135802469136D-02 - $ ,3.086419753086420D-03/ - DATA (CF(I, 45),I= 7, 12) /-1.913580246913580D-01 - $ ,1.530864197530864D+00,-4.135802469135803D-01, - $ -1.358024691358025D-01,-6.913580246913580D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 45),I= 13, 18) /-4.135802469135803D-01 - $ ,1.558641975308642D+00,1.364197530864198D+00, - $ -3.580246913580247D-01,-4.135802469135803D-01 - $ ,1.364197530864198D+00/ - DATA (CF(I, 45),I= 19, 24) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,1.530864197530864D+00, - $ -1.913580246913580D-01,5.864197530864197D-02, - $ -1.635802469135803D-01/ - DATA (CF(I, 45),I= 25, 30) /-2.469135802469136D-01 - $ ,1.975308641975309D+00,1.530864197530864D+00,1.753086419753086D - $ +00,1.975308641975309D-01,-2.469135802469136D-02/ - DATA (CF(I, 45),I= 31, 36) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01/ - DATA (CF(I, 45),I= 37, 42) /-6.913580246913580D-01 - $ ,1.530864197530864D+00,1.530864197530864D+00, - $ -2.469135802469136D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 45),I= 43, 48) /-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.264197530864197D+01, - $ -1.580246913580247D+00,1.975308641975309D+00,1.975308641975309D - $ -01/ - DATA (CF(I, 45),I= 49, 54) /-2.191358024691358D-01 - $ ,1.753086419753086D+00,1.558641975308642D+00,1.586419753086420D - $ +00,1.530864197530864D+00,-1.913580246913580D-01/ - DATA (CF(I, 45),I= 55, 60) /3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03,1.975308641975309D-01,-2.469135802469136D-02/ - DATA (CF(I, 45),I= 61, 66) /-4.135802469135803D-01, - $ -1.358024691358025D-01,5.864197530864197D-02, - $ -2.191358024691358D-01,-1.635802469135803D-01, - $ -1.913580246913580D-01/ - DATA (CF(I, 45),I= 67, 72) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,1.975308641975309D+00, - $ -2.469135802469136D-01,3.086419753086420D-01,3.086419753086420D - $ -02/ - DATA (CF(I, 45),I= 73, 78) /-1.358024691358025D-01 - $ ,1.586419753086420D+00,-3.580246913580247D-01 - $ ,4.197530864197531D-01,-1.358024691358025D-01, - $ -3.580246913580247D-01/ - DATA (CF(I, 45),I= 79, 84) /8.641975308641975D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I, 45),I= 85, 90) /1.364197530864198D+00, - $ -3.580246913580247D-01,-1.635802469135803D-01, - $ -1.913580246913580D-01,-1.358024691358025D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 45),I= 91, 96) /-1.635802469135803D-01, - $ -1.358024691358025D-01,3.086419753086420D-01,3.086419753086420D - $ -02,1.586419753086420D+00,-1.913580246913580D-01/ - DATA (CF(I, 45),I= 97,102) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01/ - DATA (CF(I, 45),I=103,108) /1.975308641975309D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 45),I=109,114) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,1.975308641975309D-01, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I, 45),I=115,120) /-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02,3.086419753086420D - $ -03,-1.913580246913580D-01,3.086419753086420D-02/ + DATA (CF(I),I=4335,4410) /4096,-1024,1280,128,-142,1136,1010 + $ ,1028,992,-124,2,-16,20,2,128,-16,-268,-88,38,-142,-106,-124, + $ -160,20,1280,-160,200,20,-88,1028,-232,272,-88,-232,56,-124, + $ -124,20,20,2,884,-232,-106,-124,-88,56,-106,-88,200,20,1028, + $ -124,-16,2,-160,20,-142,-124,128,-16,-1024,128,-160,-16,-16,2 + $ ,128,-16,20,2,-124,56,20,2,-124,20/ C 1 T(2,7,5,1,6,3,4) - DATA (CF(I, 46),I= 1, 6) /-1.913580246913580D-01 - $ ,3.086419753086420D-02,8.641975308641975D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I, 46),I= 7, 12) /-1.635802469135803D-01, - $ -1.913580246913580D-01,1.364197530864198D+00, - $ -3.580246913580247D-01,8.641975308641975D-02, - $ -1.358024691358025D-01/ - DATA (CF(I, 46),I= 13, 18) /-1.358024691358025D-01 - $ ,1.586419753086420D+00,-3.580246913580247D-01 - $ ,4.197530864197531D-01,-1.358024691358025D-01, - $ -3.580246913580247D-01/ - DATA (CF(I, 46),I= 19, 24) /3.086419753086420D-02 - $ ,3.086419753086420D-01,-1.913580246913580D-01 - $ ,1.586419753086420D+00,-1.635802469135803D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 46),I= 25, 30) /1.530864197530864D+00, - $ -2.469135802469136D-01,-6.913580246913580D-01 - $ ,1.530864197530864D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 46),I= 31, 36) /-2.469135802469136D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -1.580246913580247D+00/ - DATA (CF(I, 46),I= 37, 42) /1.530864197530864D+00 - $ ,1.753086419753086D+00,-2.469135802469136D-01 - $ ,1.975308641975309D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 46),I= 43, 48) /1.975308641975309D-01 - $ ,1.975308641975309D+00,-1.580246913580247D+00 - $ ,1.264197530864197D+01,1.975308641975309D-01, - $ -1.580246913580247D+00/ - DATA (CF(I, 46),I= 49, 54) /5.864197530864197D-02, - $ -2.191358024691358D-01,-4.135802469135803D-01, - $ -1.358024691358025D-01,-1.913580246913580D-01, - $ -1.635802469135803D-01/ - DATA (CF(I, 46),I= 55, 60) /3.086419753086420D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 46),I= 61, 66) /1.558641975308642D+00 - $ ,1.586419753086420D+00,-2.191358024691358D-01 - $ ,1.753086419753086D+00,-1.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 46),I= 67, 72) /3.086419753086420D-02 - $ ,3.086419753086420D-01,-2.469135802469136D-01 - $ ,1.975308641975309D+00,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 46),I= 73, 78) /-4.135802469135803D-01 - $ ,1.558641975308642D+00,1.364197530864198D+00, - $ -3.580246913580247D-01,-4.135802469135803D-01 - $ ,1.364197530864198D+00/ - DATA (CF(I, 46),I= 79, 84) /-1.913580246913580D-01, - $ -2.191358024691358D-01,3.086419753086420D-02, - $ -2.469135802469136D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I, 46),I= 85, 90) /-4.135802469135803D-01, - $ -1.358024691358025D-01,-1.913580246913580D-01 - $ ,1.530864197530864D+00,8.641975308641975D-02, - $ -6.913580246913580D-01/ - DATA (CF(I, 46),I= 91, 96) /5.864197530864197D-02, - $ -1.635802469135803D-01,3.086419753086420D-02, - $ -2.469135802469136D-01,-1.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 46),I= 97,102) /3.086419753086420D-03 - $ ,3.086419753086420D-02,3.086419753086420D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 46),I=103,108) /-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 46),I=109,114) /3.086419753086420D-03 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I, 46),I=115,120) /-2.191358024691358D-01, - $ -1.913580246913580D-01,3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02, - $ -2.469135802469136D-01/ + DATA (CF(I),I=4411,4485) /4096,128,-1024,38,-142,-268,-88,-124, + $ -106,20,2,2,-16,-16,128,1010,1028,-142,1136,-124,992,20,200, + $ -160,1280,20,-160,-268,1010,884,-232,-268,884,-124,-142,20,-160 + $ ,2,-16,-268,-88,-124,992,56,-448,38,-106,20,-160,-124,992,2,20 + $ ,20,-124,-124,56,-16,-160,128,-1024,-16,128,2,20,-16,128,2,-16, + $ -142,-124,2,-16,20,-160/ C 1 T(2,7,5,6,1,3,4) - DATA (CF(I, 47),I= 1, 6) /-1.913580246913580D-01, - $ -2.191358024691358D-01,3.086419753086420D-02, - $ -2.469135802469136D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I, 47),I= 7, 12) /-4.135802469135803D-01 - $ ,1.558641975308642D+00,1.364197530864198D+00, - $ -3.580246913580247D-01,-4.135802469135803D-01 - $ ,1.364197530864198D+00/ - DATA (CF(I, 47),I= 13, 18) /-1.913580246913580D-01 - $ ,1.530864197530864D+00,-4.135802469135803D-01, - $ -1.358024691358025D-01,-6.913580246913580D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 47),I= 19, 24) /3.086419753086420D-02, - $ -2.469135802469136D-01,5.864197530864197D-02, - $ -1.635802469135803D-01,1.530864197530864D+00, - $ -1.913580246913580D-01/ - DATA (CF(I, 47),I= 25, 30) /1.530864197530864D+00 - $ ,1.753086419753086D+00,-2.469135802469136D-01 - $ ,1.975308641975309D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 47),I= 31, 36) /-6.913580246913580D-01 - $ ,1.530864197530864D+00,1.530864197530864D+00, - $ -2.469135802469136D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 47),I= 37, 42) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01/ - DATA (CF(I, 47),I= 43, 48) /1.975308641975309D-01, - $ -1.580246913580247D+00,1.975308641975309D+00,1.975308641975309D - $ -01,1.264197530864197D+01,-1.580246913580247D+00/ - DATA (CF(I, 47),I= 49, 54) /-1.358024691358025D-01 - $ ,1.586419753086420D+00,-3.580246913580247D-01 - $ ,4.197530864197531D-01,-1.358024691358025D-01, - $ -3.580246913580247D-01/ - DATA (CF(I, 47),I= 55, 60) /8.641975308641975D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I, 47),I= 61, 66) /1.364197530864198D+00, - $ -3.580246913580247D-01,-1.635802469135803D-01, - $ -1.913580246913580D-01,-1.358024691358025D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 47),I= 67, 72) /-1.635802469135803D-01, - $ -1.358024691358025D-01,3.086419753086420D-01,3.086419753086420D - $ -02,1.586419753086420D+00,-1.913580246913580D-01/ - DATA (CF(I, 47),I= 73, 78) /-2.191358024691358D-01 - $ ,1.753086419753086D+00,1.558641975308642D+00,1.586419753086420D - $ +00,1.530864197530864D+00,-1.913580246913580D-01/ - DATA (CF(I, 47),I= 79, 84) /3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03,1.975308641975309D-01,-2.469135802469136D-02/ - DATA (CF(I, 47),I= 85, 90) /-4.135802469135803D-01, - $ -1.358024691358025D-01,5.864197530864197D-02, - $ -2.191358024691358D-01,-1.635802469135803D-01, - $ -1.913580246913580D-01/ - DATA (CF(I, 47),I= 91, 96) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,1.975308641975309D+00, - $ -2.469135802469136D-01,3.086419753086420D-01,3.086419753086420D - $ -02/ - DATA (CF(I, 47),I= 97,102) /3.086419753086420D-03, - $ -2.469135802469136D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02/ - DATA (CF(I, 47),I=103,108) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01/ - DATA (CF(I, 47),I=109,114) /-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02,3.086419753086420D - $ -03,-1.913580246913580D-01,3.086419753086420D-02/ - DATA (CF(I, 47),I=115,120) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,1.975308641975309D-01, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ + DATA (CF(I),I=4486,4559) /4096,-1024,-88,1028,-232,272,-88,-232 + $ ,56,-124,-124,20,20,2,884,-232,-106,-124,-88,56,-106,-88,200,20 + $ ,1028,-124,-142,1136,1010,1028,992,-124,2,-16,20,2,128,-16,-268 + $ ,-88,38,-142,-106,-124,-160,20,1280,-160,200,20,2,-16,-142,-124 + $ ,-160,20,-16,128,-160,-16,-1024,128,-124,56,20,2,-124,20,-16,2 + $ ,128,-16,20,2/ C 1 T(2,7,6,1,5,3,4) - DATA (CF(I, 48),I= 1, 6) /8.641975308641975D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I, 48),I= 7, 12) /-1.358024691358025D-01 - $ ,1.586419753086420D+00,-3.580246913580247D-01 - $ ,4.197530864197531D-01,-1.358024691358025D-01, - $ -3.580246913580247D-01/ - DATA (CF(I, 48),I= 13, 18) /-1.635802469135803D-01, - $ -1.913580246913580D-01,1.364197530864198D+00, - $ -3.580246913580247D-01,8.641975308641975D-02, - $ -1.358024691358025D-01/ - DATA (CF(I, 48),I= 19, 24) /3.086419753086420D-01 - $ ,3.086419753086420D-02,-1.635802469135803D-01, - $ -1.358024691358025D-01,-1.913580246913580D-01 - $ ,1.586419753086420D+00/ - DATA (CF(I, 48),I= 25, 30) /-6.913580246913580D-01 - $ ,1.530864197530864D+00,1.530864197530864D+00, - $ -2.469135802469136D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 48),I= 31, 36) /1.530864197530864D+00 - $ ,1.753086419753086D+00,-2.469135802469136D-01 - $ ,1.975308641975309D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 48),I= 37, 42) /-2.469135802469136D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -1.580246913580247D+00/ - DATA (CF(I, 48),I= 43, 48) /1.975308641975309D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -1.580246913580247D+00,-1.580246913580247D+00 - $ ,1.264197530864197D+01/ - DATA (CF(I, 48),I= 49, 54) /-4.135802469135803D-01 - $ ,1.558641975308642D+00,1.364197530864198D+00, - $ -3.580246913580247D-01,-4.135802469135803D-01 - $ ,1.364197530864198D+00/ - DATA (CF(I, 48),I= 55, 60) /-1.913580246913580D-01, - $ -2.191358024691358D-01,3.086419753086420D-02, - $ -2.469135802469136D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I, 48),I= 61, 66) /-4.135802469135803D-01, - $ -1.358024691358025D-01,-1.913580246913580D-01 - $ ,1.530864197530864D+00,8.641975308641975D-02, - $ -6.913580246913580D-01/ - DATA (CF(I, 48),I= 67, 72) /5.864197530864197D-02, - $ -1.635802469135803D-01,3.086419753086420D-02, - $ -2.469135802469136D-01,-1.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 48),I= 73, 78) /5.864197530864197D-02, - $ -2.191358024691358D-01,-4.135802469135803D-01, - $ -1.358024691358025D-01,-1.913580246913580D-01, - $ -1.635802469135803D-01/ - DATA (CF(I, 48),I= 79, 84) /3.086419753086420D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 48),I= 85, 90) /1.558641975308642D+00 - $ ,1.586419753086420D+00,-2.191358024691358D-01 - $ ,1.753086419753086D+00,-1.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 48),I= 91, 96) /3.086419753086420D-02 - $ ,3.086419753086420D-01,-2.469135802469136D-01 - $ ,1.975308641975309D+00,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 48),I= 97,102) /3.086419753086420D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02, - $ -1.913580246913580D-01/ - DATA (CF(I, 48),I=103,108) /-2.469135802469136D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -1.580246913580247D+00/ - DATA (CF(I, 48),I=109,114) /-2.191358024691358D-01, - $ -1.913580246913580D-01,3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 48),I=115,120) /3.086419753086420D-03 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ + DATA (CF(I),I=4560,4632) /4096,-268,1010,884,-232,-268,884,-124, + $ -142,20,-160,2,-16,-268,-88,-124,992,56,-448,38,-106,20,-160, + $ -124,992,38,-142,-268,-88,-124,-106,20,2,2,-16,-16,128,1010 + $ ,1028,-142,1136,-124,992,20,200,-160,1280,20,-160,20,2,-124,56 + $ ,20,-124,-160,-16,-16,128,128,-1024,-142,-124,2,-16,20,-160,2 + $ ,20,-16,128,2,-16/ C 1 T(2,7,6,5,1,3,4) - DATA (CF(I, 49),I= 1, 6) /1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I, 49),I= 7, 12) /-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 49),I= 13, 18) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01, - $ -2.191358024691358D-01/ - DATA (CF(I, 49),I= 19, 24) /3.086419753086420D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02,8.641975308641975D-02,-1.913580246913580D-01/ - DATA (CF(I, 49),I= 25, 30) /1.975308641975309D+00, - $ -2.469135802469136D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02,3.086419753086420D - $ -01/ - DATA (CF(I, 49),I= 31, 36) /1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I, 49),I= 37, 42) /1.530864197530864D+00, - $ -1.913580246913580D-01,1.753086419753086D+00, - $ -2.191358024691358D-01,1.586419753086420D+00,1.558641975308642D - $ +00/ - DATA (CF(I, 49),I= 43, 48) /-1.913580246913580D-01, - $ -1.635802469135803D-01,-2.191358024691358D-01 - $ ,5.864197530864197D-02,-1.358024691358025D-01, - $ -4.135802469135803D-01/ - DATA (CF(I, 49),I= 49, 54) /1.264197530864197D+01, - $ -1.580246913580247D+00,-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01,1.975308641975309D - $ +00/ - DATA (CF(I, 49),I= 55, 60) /-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 49),I= 61, 66) /1.975308641975309D-01, - $ -2.469135802469136D-02,1.975308641975309D+00, - $ -2.469135802469136D-01,1.753086419753086D+00,1.530864197530864D - $ +00/ - DATA (CF(I, 49),I= 67, 72) /-2.469135802469136D-02, - $ -2.469135802469136D-01,-2.469135802469136D-01 - $ ,1.530864197530864D+00,1.530864197530864D+00, - $ -6.913580246913580D-01/ - DATA (CF(I, 49),I= 73, 78) /1.530864197530864D+00, - $ -1.913580246913580D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02,-1.635802469135803D-01 - $ ,5.864197530864197D-02/ - DATA (CF(I, 49),I= 79, 84) /-6.913580246913580D-01 - $ ,8.641975308641975D-02,1.530864197530864D+00, - $ -1.913580246913580D-01,-1.358024691358025D-01, - $ -4.135802469135803D-01/ - DATA (CF(I, 49),I= 85, 90) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01/ - DATA (CF(I, 49),I= 91, 96) /1.364197530864198D+00, - $ -4.135802469135803D-01,-3.580246913580247D-01 - $ ,1.364197530864198D+00,1.558641975308642D+00, - $ -4.135802469135803D-01/ - DATA (CF(I, 49),I= 97,102) /-1.913580246913580D-01 - $ ,1.586419753086420D+00,3.086419753086420D-02,3.086419753086420D - $ -01,-1.358024691358025D-01,-1.635802469135803D-01/ - DATA (CF(I, 49),I=103,108) /8.641975308641975D-02, - $ -1.358024691358025D-01,-1.913580246913580D-01, - $ -1.635802469135803D-01,-3.580246913580247D-01 - $ ,1.364197530864198D+00/ - DATA (CF(I, 49),I=109,114) /3.086419753086420D-03 - $ ,3.086419753086420D-02,3.086419753086420D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 49),I=115,120) /-3.580246913580247D-01, - $ -1.358024691358025D-01,4.197530864197531D-01, - $ -3.580246913580247D-01,1.586419753086420D+00, - $ -1.358024691358025D-01/ + DATA (CF(I),I=4633,4704) /4096,-1024,-1024,128,128,1280,-1024 + $ ,128,128,-16,-16,-160,128,-16,1280,-160,1136,992,-16,-160,-160 + $ ,992,992,-448,992,-124,-160,20,-106,38,-448,56,992,-124,-88, + $ -268,-16,2,-160,20,-142,-124,884,-268,-232,884,1010,-268,-124 + $ ,1028,20,200,-88,-106,56,-88,-124,-106,-232,884,2,20,20,-124, + $ -124,56,-232,-88,272,-232,1028,-88/ C 1 T(5,1,2,6,7,3,4) - DATA (CF(I, 50),I= 1, 6) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03,3.086419753086420D - $ -02,-2.469135802469136D-02,3.086419753086420D-03/ - DATA (CF(I, 50),I= 7, 12) /1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 50),I= 13, 18) /3.086419753086420D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02,8.641975308641975D-02,-1.913580246913580D-01/ - DATA (CF(I, 50),I= 19, 24) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01, - $ -2.191358024691358D-01/ - DATA (CF(I, 50),I= 25, 30) /-2.469135802469136D-01 - $ ,1.975308641975309D+00,3.086419753086420D-02,3.086419753086420D - $ -01,-2.469135802469136D-01,3.086419753086420D-02/ - DATA (CF(I, 50),I= 31, 36) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03,3.086419753086420D - $ -02,-2.469135802469136D-02,3.086419753086420D-03/ - DATA (CF(I, 50),I= 37, 42) /-1.913580246913580D-01, - $ -1.635802469135803D-01,-2.191358024691358D-01 - $ ,5.864197530864197D-02,-1.358024691358025D-01, - $ -4.135802469135803D-01/ - DATA (CF(I, 50),I= 43, 48) /1.530864197530864D+00, - $ -1.913580246913580D-01,1.753086419753086D+00, - $ -2.191358024691358D-01,1.586419753086420D+00,1.558641975308642D - $ +00/ - DATA (CF(I, 50),I= 49, 54) /-1.580246913580247D+00 - $ ,1.264197530864197D+01,1.975308641975309D-01,1.975308641975309D - $ +00,-1.580246913580247D+00,1.975308641975309D-01/ - DATA (CF(I, 50),I= 55, 60) /1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 50),I= 61, 66) /-2.469135802469136D-02, - $ -2.469135802469136D-01,-2.469135802469136D-01 - $ ,1.530864197530864D+00,1.530864197530864D+00, - $ -6.913580246913580D-01/ - DATA (CF(I, 50),I= 67, 72) /1.975308641975309D-01, - $ -2.469135802469136D-02,1.975308641975309D+00, - $ -2.469135802469136D-01,1.753086419753086D+00,1.530864197530864D - $ +00/ - DATA (CF(I, 50),I= 73, 78) /-1.913580246913580D-01 - $ ,1.586419753086420D+00,3.086419753086420D-02,3.086419753086420D - $ -01,-1.358024691358025D-01,-1.635802469135803D-01/ - DATA (CF(I, 50),I= 79, 84) /8.641975308641975D-02, - $ -1.358024691358025D-01,-1.913580246913580D-01, - $ -1.635802469135803D-01,-3.580246913580247D-01 - $ ,1.364197530864198D+00/ - DATA (CF(I, 50),I= 85, 90) /3.086419753086420D-03 - $ ,3.086419753086420D-02,3.086419753086420D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 50),I= 91, 96) /-3.580246913580247D-01, - $ -1.358024691358025D-01,4.197530864197531D-01, - $ -3.580246913580247D-01,1.586419753086420D+00, - $ -1.358024691358025D-01/ - DATA (CF(I, 50),I= 97,102) /1.530864197530864D+00, - $ -1.913580246913580D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02,-1.635802469135803D-01 - $ ,5.864197530864197D-02/ - DATA (CF(I, 50),I=103,108) /-6.913580246913580D-01 - $ ,8.641975308641975D-02,1.530864197530864D+00, - $ -1.913580246913580D-01,-1.358024691358025D-01, - $ -4.135802469135803D-01/ - DATA (CF(I, 50),I=109,114) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01/ - DATA (CF(I, 50),I=115,120) /1.364197530864198D+00, - $ -4.135802469135803D-01,-3.580246913580247D-01 - $ ,1.364197530864198D+00,1.558641975308642D+00, - $ -4.135802469135803D-01/ + DATA (CF(I),I=4705,4775) /4096,128,1280,-1024,128,128,-1024,-16, + $ -160,128,-16,-16,-160,-160,992,992,-448,128,-16,1280,-160,1136 + $ ,992,-124,1028,20,200,-88,-106,56,-88,-124,-106,-232,884,2,20 + $ ,20,-124,-124,56,-232,-88,272,-232,1028,-88,992,-124,-160,20, + $ -106,38,-448,56,992,-124,-88,-268,-16,2,-160,20,-142,-124,884, + $ -268,-232,884,1010,-268/ C 1 T(5,1,2,7,6,3,4) - DATA (CF(I, 51),I= 1, 6) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01/ - DATA (CF(I, 51),I= 7, 12) /1.975308641975309D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 51),I= 13, 18) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,1.975308641975309D-01, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I, 51),I= 19, 24) /-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02,3.086419753086420D - $ -03,-1.913580246913580D-01,3.086419753086420D-02/ - DATA (CF(I, 51),I= 25, 30) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,1.530864197530864D+00, - $ -1.913580246913580D-01,5.864197530864197D-02, - $ -1.635802469135803D-01/ - DATA (CF(I, 51),I= 31, 36) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01/ - DATA (CF(I, 51),I= 37, 42) /-6.913580246913580D-01 - $ ,8.641975308641975D-02,1.530864197530864D+00, - $ -1.913580246913580D-01,-1.358024691358025D-01, - $ -4.135802469135803D-01/ - DATA (CF(I, 51),I= 43, 48) /-4.135802469135803D-01 - $ ,1.364197530864198D+00,1.558641975308642D+00, - $ -4.135802469135803D-01,-3.580246913580247D-01 - $ ,1.364197530864198D+00/ - DATA (CF(I, 51),I= 49, 54) /-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.264197530864197D+01, - $ -1.580246913580247D+00,1.975308641975309D+00,1.975308641975309D - $ -01/ - DATA (CF(I, 51),I= 55, 60) /1.975308641975309D-01, - $ -2.469135802469136D-02,1.975308641975309D+00, - $ -2.469135802469136D-01,1.753086419753086D+00,1.530864197530864D - $ +00/ - DATA (CF(I, 51),I= 61, 66) /-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 51),I= 67, 72) /-2.469135802469136D-01, - $ -2.469135802469136D-02,1.530864197530864D+00, - $ -6.913580246913580D-01,-2.469135802469136D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 51),I= 73, 78) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,1.975308641975309D+00, - $ -2.469135802469136D-01,3.086419753086420D-01,3.086419753086420D - $ -02/ - DATA (CF(I, 51),I= 79, 84) /1.530864197530864D+00, - $ -1.913580246913580D-01,1.753086419753086D+00, - $ -2.191358024691358D-01,1.586419753086420D+00,1.558641975308642D - $ +00/ - DATA (CF(I, 51),I= 85, 90) /1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I, 51),I= 91, 96) /-1.635802469135803D-01, - $ -1.913580246913580D-01,-1.358024691358025D-01, - $ -4.135802469135803D-01,-2.191358024691358D-01 - $ ,5.864197530864197D-02/ - DATA (CF(I, 51),I= 97,102) /-1.635802469135803D-01, - $ -1.358024691358025D-01,3.086419753086420D-01,3.086419753086420D - $ -02,1.586419753086420D+00,-1.913580246913580D-01/ - DATA (CF(I, 51),I=103,108) /-1.358024691358025D-01, - $ -3.580246913580247D-01,1.586419753086420D+00, - $ -1.358024691358025D-01,4.197530864197531D-01, - $ -3.580246913580247D-01/ - DATA (CF(I, 51),I=109,114) /3.086419753086420D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02, - $ -1.913580246913580D-01/ - DATA (CF(I, 51),I=115,120) /-1.358024691358025D-01 - $ ,8.641975308641975D-02,-3.580246913580247D-01 - $ ,1.364197530864198D+00,-1.913580246913580D-01, - $ -1.635802469135803D-01/ + DATA (CF(I),I=4776,4845) /4096,-1024,1280,128,128,-16,1280,-160 + $ ,1136,992,-1024,128,128,-16,-16,-160,-160,-16,992,-448,-160,992 + $ ,-160,20,1280,-160,200,20,992,-124,1136,-142,1028,1010,128,-16, + $ -16,2,2,20,-106,-124,-88,-268,-142,38,-106,-88,200,20,1028,-124 + $ ,-88,-232,1028,-88,272,-232,20,2,-124,56,20,-124,-88,56,-232 + $ ,884,-124,-106/ C 1 T(5,1,6,2,7,3,4) - DATA (CF(I, 52),I= 1, 6) /3.086419753086420D-03 - $ ,3.086419753086420D-02,3.086419753086420D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 52),I= 7, 12) /-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 52),I= 13, 18) /3.086419753086420D-03 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I, 52),I= 19, 24) /-2.191358024691358D-01, - $ -1.913580246913580D-01,3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 52),I= 25, 30) /3.086419753086420D-02 - $ ,3.086419753086420D-01,-1.913580246913580D-01 - $ ,1.586419753086420D+00,-1.635802469135803D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 52),I= 31, 36) /3.086419753086420D-03 - $ ,3.086419753086420D-02,3.086419753086420D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 52),I= 37, 42) /8.641975308641975D-02, - $ -1.358024691358025D-01,-1.913580246913580D-01, - $ -1.635802469135803D-01,-3.580246913580247D-01 - $ ,1.364197530864198D+00/ - DATA (CF(I, 52),I= 43, 48) /-1.358024691358025D-01, - $ -3.580246913580247D-01,1.586419753086420D+00, - $ -1.358024691358025D-01,4.197530864197531D-01, - $ -3.580246913580247D-01/ - DATA (CF(I, 52),I= 49, 54) /1.975308641975309D-01 - $ ,1.975308641975309D+00,-1.580246913580247D+00 - $ ,1.264197530864197D+01,1.975308641975309D-01, - $ -1.580246913580247D+00/ - DATA (CF(I, 52),I= 55, 60) /-2.469135802469136D-02, - $ -2.469135802469136D-01,-2.469135802469136D-01 - $ ,1.530864197530864D+00,1.530864197530864D+00, - $ -6.913580246913580D-01/ - DATA (CF(I, 52),I= 61, 66) /1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 52),I= 67, 72) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,1.753086419753086D+00,1.530864197530864D - $ +00,1.975308641975309D+00,-2.469135802469136D-01/ - DATA (CF(I, 52),I= 73, 78) /3.086419753086420D-02 - $ ,3.086419753086420D-01,-2.469135802469136D-01 - $ ,1.975308641975309D+00,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 52),I= 79, 84) /-1.913580246913580D-01, - $ -1.635802469135803D-01,-2.191358024691358D-01 - $ ,5.864197530864197D-02,-1.358024691358025D-01, - $ -4.135802469135803D-01/ - DATA (CF(I, 52),I= 85, 90) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03,3.086419753086420D - $ -02,-2.469135802469136D-02,3.086419753086420D-03/ - DATA (CF(I, 52),I= 91, 96) /-1.913580246913580D-01 - $ ,1.530864197530864D+00,1.586419753086420D+00,1.558641975308642D - $ +00,1.753086419753086D+00,-2.191358024691358D-01/ - DATA (CF(I, 52),I= 97,102) /5.864197530864197D-02, - $ -1.635802469135803D-01,3.086419753086420D-02, - $ -2.469135802469136D-01,-1.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 52),I=103,108) /-4.135802469135803D-01 - $ ,1.364197530864198D+00,1.558641975308642D+00, - $ -4.135802469135803D-01,-3.580246913580247D-01 - $ ,1.364197530864198D+00/ - DATA (CF(I, 52),I=109,114) /3.086419753086420D-03, - $ -2.469135802469136D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02/ - DATA (CF(I, 52),I=115,120) /8.641975308641975D-02, - $ -6.913580246913580D-01,-1.358024691358025D-01, - $ -4.135802469135803D-01,1.530864197530864D+00, - $ -1.913580246913580D-01/ + DATA (CF(I),I=4846,4914) /4096,128,-1024,-16,-160,-160,992,992, + $ -448,128,-1024,-16,-160,128,-16,-16,128,1136,992,1280,-160,20 + $ ,200,-160,1280,20,-160,-124,-106,-142,38,-88,-268,-16,128,2,20, + $ -16,2,-124,992,1028,1010,1136,-142,38,-106,20,-160,-124,992, + $ -268,884,1010,-268,-232,884,2,-16,-142,-124,-160,20,56,-448,-88 + $ ,-268,992,-124/ C 1 T(5,1,6,7,2,3,4) - DATA (CF(I, 53),I= 1, 6) /3.086419753086420D-03, - $ -2.469135802469136D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02/ - DATA (CF(I, 53),I= 7, 12) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01/ - DATA (CF(I, 53),I= 13, 18) /-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02,3.086419753086420D - $ -03,-1.913580246913580D-01,3.086419753086420D-02/ - DATA (CF(I, 53),I= 19, 24) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,1.975308641975309D-01, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I, 53),I= 25, 30) /3.086419753086420D-02, - $ -2.469135802469136D-01,5.864197530864197D-02, - $ -1.635802469135803D-01,1.530864197530864D+00, - $ -1.913580246913580D-01/ - DATA (CF(I, 53),I= 31, 36) /3.086419753086420D-03, - $ -2.469135802469136D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02/ - DATA (CF(I, 53),I= 37, 42) /-4.135802469135803D-01 - $ ,1.364197530864198D+00,1.558641975308642D+00, - $ -4.135802469135803D-01,-3.580246913580247D-01 - $ ,1.364197530864198D+00/ - DATA (CF(I, 53),I= 43, 48) /-6.913580246913580D-01 - $ ,8.641975308641975D-02,1.530864197530864D+00, - $ -1.913580246913580D-01,-1.358024691358025D-01, - $ -4.135802469135803D-01/ - DATA (CF(I, 53),I= 49, 54) /1.975308641975309D-01, - $ -1.580246913580247D+00,1.975308641975309D+00,1.975308641975309D - $ -01,1.264197530864197D+01,-1.580246913580247D+00/ - DATA (CF(I, 53),I= 55, 60) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,1.753086419753086D+00,1.530864197530864D - $ +00,1.975308641975309D+00,-2.469135802469136D-01/ - DATA (CF(I, 53),I= 61, 66) /-2.469135802469136D-01, - $ -2.469135802469136D-02,1.530864197530864D+00, - $ -6.913580246913580D-01,-2.469135802469136D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 53),I= 67, 72) /-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 53),I= 73, 78) /-1.635802469135803D-01, - $ -1.358024691358025D-01,3.086419753086420D-01,3.086419753086420D - $ -02,1.586419753086420D+00,-1.913580246913580D-01/ - DATA (CF(I, 53),I= 79, 84) /-1.358024691358025D-01, - $ -3.580246913580247D-01,1.586419753086420D+00, - $ -1.358024691358025D-01,4.197530864197531D-01, - $ -3.580246913580247D-01/ - DATA (CF(I, 53),I= 85, 90) /3.086419753086420D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02, - $ -1.913580246913580D-01/ - DATA (CF(I, 53),I= 91, 96) /-1.358024691358025D-01 - $ ,8.641975308641975D-02,-3.580246913580247D-01 - $ ,1.364197530864198D+00,-1.913580246913580D-01, - $ -1.635802469135803D-01/ - DATA (CF(I, 53),I= 97,102) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,1.975308641975309D+00, - $ -2.469135802469136D-01,3.086419753086420D-01,3.086419753086420D - $ -02/ - DATA (CF(I, 53),I=103,108) /1.530864197530864D+00, - $ -1.913580246913580D-01,1.753086419753086D+00, - $ -2.191358024691358D-01,1.586419753086420D+00,1.558641975308642D - $ +00/ - DATA (CF(I, 53),I=109,114) /1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I, 53),I=115,120) /-1.635802469135803D-01, - $ -1.913580246913580D-01,-1.358024691358025D-01, - $ -4.135802469135803D-01,-2.191358024691358D-01 - $ ,5.864197530864197D-02/ + DATA (CF(I),I=4915,4982) /4096,-1024,-16,128,1136,992,1280,-160, + $ -160,-16,992,-448,-160,992,-1024,128,128,-16,-16,-160,-106,-88 + $ ,200,20,1028,-124,-88,-232,1028,-88,272,-232,20,2,-124,56,20, + $ -124,-88,56,-232,884,-124,-106,-160,20,1280,-160,200,20,992, + $ -124,1136,-142,1028,1010,128,-16,-16,2,2,20,-106,-124,-88,-268, + $ -142,38/ C 1 T(5,1,7,2,6,3,4) - DATA (CF(I, 54),I= 1, 6) /3.086419753086420D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02, - $ -1.913580246913580D-01/ - DATA (CF(I, 54),I= 7, 12) /-2.469135802469136D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -1.580246913580247D+00/ - DATA (CF(I, 54),I= 13, 18) /-2.191358024691358D-01, - $ -1.913580246913580D-01,3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 54),I= 19, 24) /3.086419753086420D-03 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I, 54),I= 25, 30) /3.086419753086420D-01 - $ ,3.086419753086420D-02,-1.635802469135803D-01, - $ -1.358024691358025D-01,-1.913580246913580D-01 - $ ,1.586419753086420D+00/ - DATA (CF(I, 54),I= 31, 36) /3.086419753086420D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02, - $ -1.913580246913580D-01/ - DATA (CF(I, 54),I= 37, 42) /-1.358024691358025D-01, - $ -3.580246913580247D-01,1.586419753086420D+00, - $ -1.358024691358025D-01,4.197530864197531D-01, - $ -3.580246913580247D-01/ - DATA (CF(I, 54),I= 43, 48) /8.641975308641975D-02, - $ -1.358024691358025D-01,-1.913580246913580D-01, - $ -1.635802469135803D-01,-3.580246913580247D-01 - $ ,1.364197530864198D+00/ - DATA (CF(I, 54),I= 49, 54) /1.975308641975309D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -1.580246913580247D+00,-1.580246913580247D+00 - $ ,1.264197530864197D+01/ - DATA (CF(I, 54),I= 55, 60) /-2.469135802469136D-01, - $ -2.469135802469136D-02,1.530864197530864D+00, - $ -6.913580246913580D-01,-2.469135802469136D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 54),I= 61, 66) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,1.753086419753086D+00,1.530864197530864D - $ +00,1.975308641975309D+00,-2.469135802469136D-01/ - DATA (CF(I, 54),I= 67, 72) /1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 54),I= 73, 78) /5.864197530864197D-02, - $ -1.635802469135803D-01,3.086419753086420D-02, - $ -2.469135802469136D-01,-1.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 54),I= 79, 84) /-4.135802469135803D-01 - $ ,1.364197530864198D+00,1.558641975308642D+00, - $ -4.135802469135803D-01,-3.580246913580247D-01 - $ ,1.364197530864198D+00/ - DATA (CF(I, 54),I= 85, 90) /3.086419753086420D-03, - $ -2.469135802469136D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02/ - DATA (CF(I, 54),I= 91, 96) /8.641975308641975D-02, - $ -6.913580246913580D-01,-1.358024691358025D-01, - $ -4.135802469135803D-01,1.530864197530864D+00, - $ -1.913580246913580D-01/ - DATA (CF(I, 54),I= 97,102) /3.086419753086420D-02 - $ ,3.086419753086420D-01,-2.469135802469136D-01 - $ ,1.975308641975309D+00,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 54),I=103,108) /-1.913580246913580D-01, - $ -1.635802469135803D-01,-2.191358024691358D-01 - $ ,5.864197530864197D-02,-1.358024691358025D-01, - $ -4.135802469135803D-01/ - DATA (CF(I, 54),I=109,114) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03,3.086419753086420D - $ -02,-2.469135802469136D-02,3.086419753086420D-03/ - DATA (CF(I, 54),I=115,120) /-1.913580246913580D-01 - $ ,1.530864197530864D+00,1.586419753086420D+00,1.558641975308642D - $ +00,1.753086419753086D+00,-2.191358024691358D-01/ + DATA (CF(I),I=4983,5049) /4096,-160,-16,992,-448,-160,992,-16 + $ ,128,1136,992,1280,-160,128,-1024,-16,-160,128,-16,38,-106,20, + $ -160,-124,992,-268,884,1010,-268,-232,884,2,-16,-142,-124,-160 + $ ,20,56,-448,-88,-268,992,-124,20,200,-160,1280,20,-160,-124, + $ -106,-142,38,-88,-268,-16,128,2,20,-16,2,-124,992,1028,1010 + $ ,1136,-142/ C 1 T(5,1,7,6,2,3,4) - DATA (CF(I, 55),I= 1, 6) /1.975308641975309D+00, - $ -2.469135802469136D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02,3.086419753086420D - $ -01/ - DATA (CF(I, 55),I= 7, 12) /1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I, 55),I= 13, 18) /1.530864197530864D+00, - $ -1.913580246913580D-01,1.753086419753086D+00, - $ -2.191358024691358D-01,1.586419753086420D+00,1.558641975308642D - $ +00/ - DATA (CF(I, 55),I= 19, 24) /-1.913580246913580D-01, - $ -1.635802469135803D-01,-2.191358024691358D-01 - $ ,5.864197530864197D-02,-1.358024691358025D-01, - $ -4.135802469135803D-01/ - DATA (CF(I, 55),I= 25, 30) /1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I, 55),I= 31, 36) /-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 55),I= 37, 42) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01, - $ -2.191358024691358D-01/ - DATA (CF(I, 55),I= 43, 48) /3.086419753086420D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02,8.641975308641975D-02,-1.913580246913580D-01/ - DATA (CF(I, 55),I= 49, 54) /-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 55),I= 55, 60) /1.264197530864197D+01, - $ -1.580246913580247D+00,-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01,1.975308641975309D - $ +00/ - DATA (CF(I, 55),I= 61, 66) /1.975308641975309D+00, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -2.469135802469136D-02,1.530864197530864D+00,1.753086419753086D - $ +00/ - DATA (CF(I, 55),I= 67, 72) /-2.469135802469136D-01 - $ ,1.530864197530864D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01,-6.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 55),I= 73, 78) /-6.913580246913580D-01 - $ ,8.641975308641975D-02,1.530864197530864D+00, - $ -1.913580246913580D-01,-1.358024691358025D-01, - $ -4.135802469135803D-01/ - DATA (CF(I, 55),I= 79, 84) /1.530864197530864D+00, - $ -1.913580246913580D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02,-1.635802469135803D-01 - $ ,5.864197530864197D-02/ - DATA (CF(I, 55),I= 85, 90) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01, - $ -2.191358024691358D-01/ - DATA (CF(I, 55),I= 91, 96) /-3.580246913580247D-01 - $ ,1.364197530864198D+00,1.364197530864198D+00, - $ -4.135802469135803D-01,-4.135802469135803D-01 - $ ,1.558641975308642D+00/ - DATA (CF(I, 55),I= 97,102) /8.641975308641975D-02, - $ -1.358024691358025D-01,-1.913580246913580D-01, - $ -1.635802469135803D-01,-3.580246913580247D-01 - $ ,1.364197530864198D+00/ - DATA (CF(I, 55),I=103,108) /-1.913580246913580D-01 - $ ,1.586419753086420D+00,3.086419753086420D-02,3.086419753086420D - $ -01,-1.358024691358025D-01,-1.635802469135803D-01/ - DATA (CF(I, 55),I=109,114) /3.086419753086420D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02,8.641975308641975D-02,-1.913580246913580D-01/ - DATA (CF(I, 55),I=115,120) /4.197530864197531D-01, - $ -3.580246913580247D-01,-3.580246913580247D-01, - $ -1.358024691358025D-01,-1.358024691358025D-01 - $ ,1.586419753086420D+00/ + DATA (CF(I),I=5050,5115) /4096,-1024,-1024,128,128,1280,1280, + $ -160,128,-16,992,1136,-160,992,-16,-160,-448,992,-448,56,992, + $ -124,-88,-268,992,-124,-160,20,-106,38,-160,20,-16,2,-124,-142, + $ -232,884,884,-268,-268,1010,56,-88,-124,-106,-232,884,-124,1028 + $ ,20,200,-88,-106,20,-124,2,20,56,-124,272,-232,-232,-88,-88 + $ ,1028/ C 1 T(5,2,1,6,7,3,4) - DATA (CF(I, 56),I= 1, 6) /-2.469135802469136D-01 - $ ,1.975308641975309D+00,3.086419753086420D-02,3.086419753086420D - $ -01,-2.469135802469136D-01,3.086419753086420D-02/ - DATA (CF(I, 56),I= 7, 12) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03,3.086419753086420D - $ -02,-2.469135802469136D-02,3.086419753086420D-03/ - DATA (CF(I, 56),I= 13, 18) /-1.913580246913580D-01, - $ -1.635802469135803D-01,-2.191358024691358D-01 - $ ,5.864197530864197D-02,-1.358024691358025D-01, - $ -4.135802469135803D-01/ - DATA (CF(I, 56),I= 19, 24) /1.530864197530864D+00, - $ -1.913580246913580D-01,1.753086419753086D+00, - $ -2.191358024691358D-01,1.586419753086420D+00,1.558641975308642D - $ +00/ - DATA (CF(I, 56),I= 25, 30) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03,3.086419753086420D - $ -02,-2.469135802469136D-02,3.086419753086420D-03/ - DATA (CF(I, 56),I= 31, 36) /1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 56),I= 37, 42) /3.086419753086420D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02,8.641975308641975D-02,-1.913580246913580D-01/ - DATA (CF(I, 56),I= 43, 48) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01, - $ -2.191358024691358D-01/ - DATA (CF(I, 56),I= 49, 54) /1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 56),I= 55, 60) /-1.580246913580247D+00 - $ ,1.264197530864197D+01,1.975308641975309D-01,1.975308641975309D - $ +00,-1.580246913580247D+00,1.975308641975309D-01/ - DATA (CF(I, 56),I= 61, 66) /-2.469135802469136D-01 - $ ,1.530864197530864D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01,-6.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 56),I= 67, 72) /1.975308641975309D+00, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -2.469135802469136D-02,1.530864197530864D+00,1.753086419753086D - $ +00/ - DATA (CF(I, 56),I= 73, 78) /8.641975308641975D-02, - $ -1.358024691358025D-01,-1.913580246913580D-01, - $ -1.635802469135803D-01,-3.580246913580247D-01 - $ ,1.364197530864198D+00/ - DATA (CF(I, 56),I= 79, 84) /-1.913580246913580D-01 - $ ,1.586419753086420D+00,3.086419753086420D-02,3.086419753086420D - $ -01,-1.358024691358025D-01,-1.635802469135803D-01/ - DATA (CF(I, 56),I= 85, 90) /3.086419753086420D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02,8.641975308641975D-02,-1.913580246913580D-01/ - DATA (CF(I, 56),I= 91, 96) /4.197530864197531D-01, - $ -3.580246913580247D-01,-3.580246913580247D-01, - $ -1.358024691358025D-01,-1.358024691358025D-01 - $ ,1.586419753086420D+00/ - DATA (CF(I, 56),I= 97,102) /-6.913580246913580D-01 - $ ,8.641975308641975D-02,1.530864197530864D+00, - $ -1.913580246913580D-01,-1.358024691358025D-01, - $ -4.135802469135803D-01/ - DATA (CF(I, 56),I=103,108) /1.530864197530864D+00, - $ -1.913580246913580D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02,-1.635802469135803D-01 - $ ,5.864197530864197D-02/ - DATA (CF(I, 56),I=109,114) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01, - $ -2.191358024691358D-01/ - DATA (CF(I, 56),I=115,120) /-3.580246913580247D-01 - $ ,1.364197530864198D+00,1.364197530864198D+00, - $ -4.135802469135803D-01,-4.135802469135803D-01 - $ ,1.558641975308642D+00/ + DATA (CF(I),I=5116,5180) /4096,128,1280,-1024,128,-160,992,-16, + $ -160,-448,992,1280,-160,128,-16,992,1136,56,-88,-124,-106,-232 + $ ,884,-124,1028,20,200,-88,-106,20,-124,2,20,56,-124,272,-232, + $ -232,-88,-88,1028,-448,56,992,-124,-88,-268,992,-124,-160,20, + $ -106,38,-160,20,-16,2,-124,-142,-232,884,884,-268,-268,1010/ C 1 T(5,2,1,7,6,3,4) - DATA (CF(I, 57),I= 1, 6) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,1.530864197530864D+00, - $ -1.913580246913580D-01,5.864197530864197D-02, - $ -1.635802469135803D-01/ - DATA (CF(I, 57),I= 7, 12) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01/ - DATA (CF(I, 57),I= 13, 18) /-6.913580246913580D-01 - $ ,8.641975308641975D-02,1.530864197530864D+00, - $ -1.913580246913580D-01,-1.358024691358025D-01, - $ -4.135802469135803D-01/ - DATA (CF(I, 57),I= 19, 24) /-4.135802469135803D-01 - $ ,1.364197530864198D+00,1.558641975308642D+00, - $ -4.135802469135803D-01,-3.580246913580247D-01 - $ ,1.364197530864198D+00/ - DATA (CF(I, 57),I= 25, 30) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01/ - DATA (CF(I, 57),I= 31, 36) /1.975308641975309D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 57),I= 37, 42) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,1.975308641975309D-01, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I, 57),I= 43, 48) /-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02,3.086419753086420D - $ -03,-1.913580246913580D-01,3.086419753086420D-02/ - DATA (CF(I, 57),I= 49, 54) /1.975308641975309D-01, - $ -2.469135802469136D-02,1.975308641975309D+00, - $ -2.469135802469136D-01,1.753086419753086D+00,1.530864197530864D - $ +00/ - DATA (CF(I, 57),I= 55, 60) /-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.264197530864197D+01, - $ -1.580246913580247D+00,1.975308641975309D+00,1.975308641975309D - $ -01/ - DATA (CF(I, 57),I= 61, 66) /1.975308641975309D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 57),I= 67, 72) /1.530864197530864D+00, - $ -6.913580246913580D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02,1.530864197530864D+00, - $ -2.469135802469136D-01/ - DATA (CF(I, 57),I= 73, 78) /1.530864197530864D+00, - $ -1.913580246913580D-01,1.753086419753086D+00, - $ -2.191358024691358D-01,1.586419753086420D+00,1.558641975308642D - $ +00/ - DATA (CF(I, 57),I= 79, 84) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,1.975308641975309D+00, - $ -2.469135802469136D-01,3.086419753086420D-01,3.086419753086420D - $ -02/ - DATA (CF(I, 57),I= 85, 90) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,1.975308641975309D-01, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I, 57),I= 91, 96) /-1.358024691358025D-01, - $ -4.135802469135803D-01,-1.635802469135803D-01, - $ -1.913580246913580D-01,5.864197530864197D-02, - $ -2.191358024691358D-01/ - DATA (CF(I, 57),I= 97,102) /-1.358024691358025D-01, - $ -3.580246913580247D-01,1.586419753086420D+00, - $ -1.358024691358025D-01,4.197530864197531D-01, - $ -3.580246913580247D-01/ - DATA (CF(I, 57),I=103,108) /-1.635802469135803D-01, - $ -1.358024691358025D-01,3.086419753086420D-01,3.086419753086420D - $ -02,1.586419753086420D+00,-1.913580246913580D-01/ - DATA (CF(I, 57),I=109,114) /-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02,3.086419753086420D - $ -03,-1.913580246913580D-01,3.086419753086420D-02/ - DATA (CF(I, 57),I=115,120) /-3.580246913580247D-01 - $ ,1.364197530864198D+00,-1.358024691358025D-01 - $ ,8.641975308641975D-02,-1.635802469135803D-01, - $ -1.913580246913580D-01/ + DATA (CF(I),I=5181,5244) /4096,-1024,1280,128,128,-16,-1024,128, + $ -160,-16,992,-448,-160,-16,992,-160,992,-124,1136,-142,1028 + $ ,1010,-160,20,1280,-160,200,20,-16,2,128,-16,20,2,-88,-268,-106 + $ ,-124,38,-142,-88,-232,1028,-88,272,-232,-106,-88,200,20,1028, + $ -124,-124,56,20,2,-124,20,-232,884,-88,56,-106,-124/ C 1 T(5,2,6,1,7,3,4) - DATA (CF(I, 58),I= 1, 6) /3.086419753086420D-02 - $ ,3.086419753086420D-01,-1.913580246913580D-01 - $ ,1.586419753086420D+00,-1.635802469135803D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 58),I= 7, 12) /3.086419753086420D-03 - $ ,3.086419753086420D-02,3.086419753086420D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 58),I= 13, 18) /8.641975308641975D-02, - $ -1.358024691358025D-01,-1.913580246913580D-01, - $ -1.635802469135803D-01,-3.580246913580247D-01 - $ ,1.364197530864198D+00/ - DATA (CF(I, 58),I= 19, 24) /-1.358024691358025D-01, - $ -3.580246913580247D-01,1.586419753086420D+00, - $ -1.358024691358025D-01,4.197530864197531D-01, - $ -3.580246913580247D-01/ - DATA (CF(I, 58),I= 25, 30) /3.086419753086420D-03 - $ ,3.086419753086420D-02,3.086419753086420D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 58),I= 31, 36) /-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 58),I= 37, 42) /3.086419753086420D-03 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I, 58),I= 43, 48) /-2.191358024691358D-01, - $ -1.913580246913580D-01,3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 58),I= 49, 54) /-2.469135802469136D-02, - $ -2.469135802469136D-01,-2.469135802469136D-01 - $ ,1.530864197530864D+00,1.530864197530864D+00, - $ -6.913580246913580D-01/ - DATA (CF(I, 58),I= 55, 60) /1.975308641975309D-01 - $ ,1.975308641975309D+00,-1.580246913580247D+00 - $ ,1.264197530864197D+01,1.975308641975309D-01, - $ -1.580246913580247D+00/ - DATA (CF(I, 58),I= 61, 66) /-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 58),I= 67, 72) /1.753086419753086D+00 - $ ,1.530864197530864D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01,-2.469135802469136D-01 - $ ,1.975308641975309D+00/ - DATA (CF(I, 58),I= 73, 78) /-1.913580246913580D-01, - $ -1.635802469135803D-01,-2.191358024691358D-01 - $ ,5.864197530864197D-02,-1.358024691358025D-01, - $ -4.135802469135803D-01/ - DATA (CF(I, 58),I= 79, 84) /3.086419753086420D-02 - $ ,3.086419753086420D-01,-2.469135802469136D-01 - $ ,1.975308641975309D+00,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 58),I= 85, 90) /3.086419753086420D-03 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I, 58),I= 91, 96) /1.586419753086420D+00 - $ ,1.558641975308642D+00,-1.913580246913580D-01 - $ ,1.530864197530864D+00,-2.191358024691358D-01 - $ ,1.753086419753086D+00/ - DATA (CF(I, 58),I= 97,102) /-4.135802469135803D-01 - $ ,1.364197530864198D+00,1.558641975308642D+00, - $ -4.135802469135803D-01,-3.580246913580247D-01 - $ ,1.364197530864198D+00/ - DATA (CF(I, 58),I=103,108) /5.864197530864197D-02, - $ -1.635802469135803D-01,3.086419753086420D-02, - $ -2.469135802469136D-01,-1.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 58),I=109,114) /-2.191358024691358D-01, - $ -1.913580246913580D-01,3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 58),I=115,120) /-1.358024691358025D-01, - $ -4.135802469135803D-01,8.641975308641975D-02, - $ -6.913580246913580D-01,-1.913580246913580D-01 - $ ,1.530864197530864D+00/ + DATA (CF(I),I=5245,5307) /4096,128,-1024,-16,-160,128,-1024,-16 + $ ,128,1136,992,-16,128,-160,1280,-124,-106,-142,38,-88,-268,20 + $ ,200,-160,1280,20,-160,2,20,-16,128,2,-16,1028,1010,-124,992, + $ -142,1136,-268,884,1010,-268,-232,884,38,-106,20,-160,-124,992, + $ -142,-124,2,-16,20,-160,-88,-268,56,-448,-124,992/ C 1 T(5,2,6,7,1,3,4) - DATA (CF(I, 59),I= 1, 6) /3.086419753086420D-02, - $ -2.469135802469136D-01,5.864197530864197D-02, - $ -1.635802469135803D-01,1.530864197530864D+00, - $ -1.913580246913580D-01/ - DATA (CF(I, 59),I= 7, 12) /3.086419753086420D-03, - $ -2.469135802469136D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02/ - DATA (CF(I, 59),I= 13, 18) /-4.135802469135803D-01 - $ ,1.364197530864198D+00,1.558641975308642D+00, - $ -4.135802469135803D-01,-3.580246913580247D-01 - $ ,1.364197530864198D+00/ - DATA (CF(I, 59),I= 19, 24) /-6.913580246913580D-01 - $ ,8.641975308641975D-02,1.530864197530864D+00, - $ -1.913580246913580D-01,-1.358024691358025D-01, - $ -4.135802469135803D-01/ - DATA (CF(I, 59),I= 25, 30) /3.086419753086420D-03, - $ -2.469135802469136D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02/ - DATA (CF(I, 59),I= 31, 36) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01/ - DATA (CF(I, 59),I= 37, 42) /-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02,3.086419753086420D - $ -03,-1.913580246913580D-01,3.086419753086420D-02/ - DATA (CF(I, 59),I= 43, 48) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,1.975308641975309D-01, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I, 59),I= 49, 54) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,1.753086419753086D+00,1.530864197530864D - $ +00,1.975308641975309D+00,-2.469135802469136D-01/ - DATA (CF(I, 59),I= 55, 60) /1.975308641975309D-01, - $ -1.580246913580247D+00,1.975308641975309D+00,1.975308641975309D - $ -01,1.264197530864197D+01,-1.580246913580247D+00/ - DATA (CF(I, 59),I= 61, 66) /1.530864197530864D+00, - $ -6.913580246913580D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02,1.530864197530864D+00, - $ -2.469135802469136D-01/ - DATA (CF(I, 59),I= 67, 72) /1.975308641975309D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 59),I= 73, 78) /-1.358024691358025D-01, - $ -3.580246913580247D-01,1.586419753086420D+00, - $ -1.358024691358025D-01,4.197530864197531D-01, - $ -3.580246913580247D-01/ - DATA (CF(I, 59),I= 79, 84) /-1.635802469135803D-01, - $ -1.358024691358025D-01,3.086419753086420D-01,3.086419753086420D - $ -02,1.586419753086420D+00,-1.913580246913580D-01/ - DATA (CF(I, 59),I= 85, 90) /-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02,3.086419753086420D - $ -03,-1.913580246913580D-01,3.086419753086420D-02/ - DATA (CF(I, 59),I= 91, 96) /-3.580246913580247D-01 - $ ,1.364197530864198D+00,-1.358024691358025D-01 - $ ,8.641975308641975D-02,-1.635802469135803D-01, - $ -1.913580246913580D-01/ - DATA (CF(I, 59),I= 97,102) /1.530864197530864D+00, - $ -1.913580246913580D-01,1.753086419753086D+00, - $ -2.191358024691358D-01,1.586419753086420D+00,1.558641975308642D - $ +00/ - DATA (CF(I, 59),I=103,108) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,1.975308641975309D+00, - $ -2.469135802469136D-01,3.086419753086420D-01,3.086419753086420D - $ -02/ - DATA (CF(I, 59),I=109,114) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,1.975308641975309D-01, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I, 59),I=115,120) /-1.358024691358025D-01, - $ -4.135802469135803D-01,-1.635802469135803D-01, - $ -1.913580246913580D-01,5.864197530864197D-02, - $ -2.191358024691358D-01/ + DATA (CF(I),I=5308,5369) /4096,-1024,992,-448,-160,-16,992,-160 + $ ,128,-16,-1024,128,-160,-16,-88,-232,1028,-88,272,-232,-106,-88 + $ ,200,20,1028,-124,-124,56,20,2,-124,20,-232,884,-88,56,-106, + $ -124,992,-124,1136,-142,1028,1010,-160,20,1280,-160,200,20,-16 + $ ,2,128,-16,20,2,-88,-268,-106,-124,38,-142/ C 1 T(5,2,7,1,6,3,4) - DATA (CF(I, 60),I= 1, 6) /3.086419753086420D-01 - $ ,3.086419753086420D-02,-1.635802469135803D-01, - $ -1.358024691358025D-01,-1.913580246913580D-01 - $ ,1.586419753086420D+00/ - DATA (CF(I, 60),I= 7, 12) /3.086419753086420D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02, - $ -1.913580246913580D-01/ - DATA (CF(I, 60),I= 13, 18) /-1.358024691358025D-01, - $ -3.580246913580247D-01,1.586419753086420D+00, - $ -1.358024691358025D-01,4.197530864197531D-01, - $ -3.580246913580247D-01/ - DATA (CF(I, 60),I= 19, 24) /8.641975308641975D-02, - $ -1.358024691358025D-01,-1.913580246913580D-01, - $ -1.635802469135803D-01,-3.580246913580247D-01 - $ ,1.364197530864198D+00/ - DATA (CF(I, 60),I= 25, 30) /3.086419753086420D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02, - $ -1.913580246913580D-01/ - DATA (CF(I, 60),I= 31, 36) /-2.469135802469136D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -1.580246913580247D+00/ - DATA (CF(I, 60),I= 37, 42) /-2.191358024691358D-01, - $ -1.913580246913580D-01,3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 60),I= 43, 48) /3.086419753086420D-03 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I, 60),I= 49, 54) /-2.469135802469136D-01, - $ -2.469135802469136D-02,1.530864197530864D+00, - $ -6.913580246913580D-01,-2.469135802469136D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 60),I= 55, 60) /1.975308641975309D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -1.580246913580247D+00,-1.580246913580247D+00 - $ ,1.264197530864197D+01/ - DATA (CF(I, 60),I= 61, 66) /1.753086419753086D+00 - $ ,1.530864197530864D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01,-2.469135802469136D-01 - $ ,1.975308641975309D+00/ - DATA (CF(I, 60),I= 67, 72) /-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 60),I= 73, 78) /-4.135802469135803D-01 - $ ,1.364197530864198D+00,1.558641975308642D+00, - $ -4.135802469135803D-01,-3.580246913580247D-01 - $ ,1.364197530864198D+00/ - DATA (CF(I, 60),I= 79, 84) /5.864197530864197D-02, - $ -1.635802469135803D-01,3.086419753086420D-02, - $ -2.469135802469136D-01,-1.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 60),I= 85, 90) /-2.191358024691358D-01, - $ -1.913580246913580D-01,3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 60),I= 91, 96) /-1.358024691358025D-01, - $ -4.135802469135803D-01,8.641975308641975D-02, - $ -6.913580246913580D-01,-1.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 60),I= 97,102) /-1.913580246913580D-01, - $ -1.635802469135803D-01,-2.191358024691358D-01 - $ ,5.864197530864197D-02,-1.358024691358025D-01, - $ -4.135802469135803D-01/ - DATA (CF(I, 60),I=103,108) /3.086419753086420D-02 - $ ,3.086419753086420D-01,-2.469135802469136D-01 - $ ,1.975308641975309D+00,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 60),I=109,114) /3.086419753086420D-03 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I, 60),I=115,120) /1.586419753086420D+00 - $ ,1.558641975308642D+00,-1.913580246913580D-01 - $ ,1.530864197530864D+00,-2.191358024691358D-01 - $ ,1.753086419753086D+00/ + DATA (CF(I),I=5370,5430) /4096,1136,992,-16,128,-160,1280,-16, + $ -160,128,-1024,-16,128,-268,884,1010,-268,-232,884,38,-106,20, + $ -160,-124,992,-142,-124,2,-16,20,-160,-88,-268,56,-448,-124,992 + $ ,-124,-106,-142,38,-88,-268,20,200,-160,1280,20,-160,2,20,-16 + $ ,128,2,-16,1028,1010,-124,992,-142,1136/ C 1 T(5,2,7,6,1,3,4) - DATA (CF(I, 61),I= 1, 6) /1.753086419753086D+00, - $ -2.191358024691358D-01,1.530864197530864D+00, - $ -1.913580246913580D-01,1.558641975308642D+00,1.586419753086420D - $ +00/ - DATA (CF(I, 61),I= 7, 12) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,1.975308641975309D-01, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I, 61),I= 13, 18) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,1.975308641975309D+00, - $ -2.469135802469136D-01,3.086419753086420D-01,3.086419753086420D - $ -02/ - DATA (CF(I, 61),I= 19, 24) /-4.135802469135803D-01, - $ -1.358024691358025D-01,5.864197530864197D-02, - $ -2.191358024691358D-01,-1.635802469135803D-01, - $ -1.913580246913580D-01/ - DATA (CF(I, 61),I= 25, 30) /1.530864197530864D+00, - $ -1.913580246913580D-01,-6.913580246913580D-01 - $ ,8.641975308641975D-02,-4.135802469135803D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 61),I= 31, 36) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01, - $ -2.191358024691358D-01/ - DATA (CF(I, 61),I= 37, 42) /1.530864197530864D+00, - $ -1.913580246913580D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02,-1.635802469135803D-01 - $ ,5.864197530864197D-02/ - DATA (CF(I, 61),I= 43, 48) /1.364197530864198D+00, - $ -3.580246913580247D-01,-4.135802469135803D-01 - $ ,1.558641975308642D+00,1.364197530864198D+00, - $ -4.135802469135803D-01/ - DATA (CF(I, 61),I= 49, 54) /1.975308641975309D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 61),I= 55, 60) /1.975308641975309D+00, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -2.469135802469136D-02,1.530864197530864D+00,1.753086419753086D - $ +00/ - DATA (CF(I, 61),I= 61, 66) /1.264197530864197D+01, - $ -1.580246913580247D+00,-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01,1.975308641975309D - $ +00/ - DATA (CF(I, 61),I= 67, 72) /1.530864197530864D+00, - $ -2.469135802469136D-01,-6.913580246913580D-01 - $ ,1.530864197530864D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 61),I= 73, 78) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,1.975308641975309D-01, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I, 61),I= 79, 84) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01, - $ -2.191358024691358D-01/ - DATA (CF(I, 61),I= 85, 90) /-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 61),I= 91, 96) /-1.913580246913580D-01 - $ ,3.086419753086420D-02,8.641975308641975D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I, 61),I= 97,102) /1.364197530864198D+00, - $ -3.580246913580247D-01,-1.635802469135803D-01, - $ -1.913580246913580D-01,-1.358024691358025D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 61),I=103,108) /-3.580246913580247D-01 - $ ,4.197530864197531D-01,-1.358024691358025D-01 - $ ,1.586419753086420D+00,-3.580246913580247D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 61),I=109,114) /-1.913580246913580D-01 - $ ,3.086419753086420D-02,8.641975308641975D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I, 61),I=115,120) /1.586419753086420D+00, - $ -1.913580246913580D-01,-1.358024691358025D-01, - $ -1.635802469135803D-01,3.086419753086420D-02,3.086419753086420D - $ -01/ + DATA (CF(I),I=5431,5490) /4096,-1024,-1024,128,128,1280,992,-160 + $ ,-448,992,-16,-160,-16,2,128,-16,20,2,-160,20,-16,2,-124,-142, + $ -1024,128,128,-16,-16,-160,-124,20,56,-124,2,20,884,-232,-106, + $ -124,-88,56,-232,272,-88,1028,-232,-88,-124,20,56,-124,2,20 + $ ,1028,-124,-88,-106,20,200/ C 1 T(5,6,1,2,7,3,4) - DATA (CF(I, 62),I= 1, 6) /-2.191358024691358D-01 - $ ,5.864197530864197D-02,-1.913580246913580D-01, - $ -1.635802469135803D-01,-4.135802469135803D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 62),I= 7, 12) /3.086419753086420D-03 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I, 62),I= 13, 18) /3.086419753086420D-02 - $ ,3.086419753086420D-01,-2.469135802469136D-01 - $ ,1.975308641975309D+00,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 62),I= 19, 24) /1.558641975308642D+00 - $ ,1.586419753086420D+00,-2.191358024691358D-01 - $ ,1.753086419753086D+00,-1.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 62),I= 25, 30) /-1.913580246913580D-01, - $ -1.635802469135803D-01,8.641975308641975D-02, - $ -1.358024691358025D-01,1.364197530864198D+00, - $ -3.580246913580247D-01/ - DATA (CF(I, 62),I= 31, 36) /3.086419753086420D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02,8.641975308641975D-02,-1.913580246913580D-01/ - DATA (CF(I, 62),I= 37, 42) /-1.913580246913580D-01 - $ ,1.586419753086420D+00,3.086419753086420D-02,3.086419753086420D - $ -01,-1.358024691358025D-01,-1.635802469135803D-01/ - DATA (CF(I, 62),I= 43, 48) /-3.580246913580247D-01 - $ ,4.197530864197531D-01,-1.358024691358025D-01 - $ ,1.586419753086420D+00,-3.580246913580247D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 62),I= 49, 54) /-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 62),I= 55, 60) /-2.469135802469136D-01 - $ ,1.530864197530864D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01,-6.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 62),I= 61, 66) /-1.580246913580247D+00 - $ ,1.264197530864197D+01,1.975308641975309D-01,1.975308641975309D - $ +00,-1.580246913580247D+00,1.975308641975309D-01/ - DATA (CF(I, 62),I= 67, 72) /-2.469135802469136D-01 - $ ,1.975308641975309D+00,1.530864197530864D+00,1.753086419753086D - $ +00,1.975308641975309D-01,-2.469135802469136D-02/ - DATA (CF(I, 62),I= 73, 78) /3.086419753086420D-03 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I, 62),I= 79, 84) /3.086419753086420D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02,8.641975308641975D-02,-1.913580246913580D-01/ - DATA (CF(I, 62),I= 85, 90) /1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 62),I= 91, 96) /3.086419753086420D-02, - $ -2.469135802469136D-01,-1.913580246913580D-01, - $ -2.191358024691358D-01,-2.469135802469136D-02 - $ ,3.086419753086420D-03/ - DATA (CF(I, 62),I= 97,102) /-4.135802469135803D-01, - $ -1.358024691358025D-01,-1.913580246913580D-01 - $ ,1.530864197530864D+00,8.641975308641975D-02, - $ -6.913580246913580D-01/ - DATA (CF(I, 62),I=103,108) /1.364197530864198D+00, - $ -3.580246913580247D-01,-4.135802469135803D-01 - $ ,1.558641975308642D+00,1.364197530864198D+00, - $ -4.135802469135803D-01/ - DATA (CF(I, 62),I=109,114) /3.086419753086420D-02, - $ -2.469135802469136D-01,-1.913580246913580D-01, - $ -2.191358024691358D-01,-2.469135802469136D-02 - $ ,3.086419753086420D-03/ - DATA (CF(I, 62),I=115,120) /-1.913580246913580D-01 - $ ,1.530864197530864D+00,-1.635802469135803D-01 - $ ,5.864197530864197D-02,-2.469135802469136D-01 - $ ,3.086419753086420D-02/ + DATA (CF(I),I=5491,5549) /4096,128,1280,-1024,128,-160,1280,992 + $ ,1136,128,-16,2,20,-16,128,2,-16,20,-124,2,20,56,-124,128,-1024 + $ ,-16,-160,128,-16,20,-160,-124,-142,-16,2,-268,-88,-124,992,56, + $ -448,884,-232,-268,1010,884,-268,20,-160,-124,-142,-16,2,-124 + $ ,992,-106,38,-160,20/ C 1 T(5,6,1,7,2,3,4) - DATA (CF(I, 63),I= 1, 6) /1.530864197530864D+00, - $ -1.913580246913580D-01,-6.913580246913580D-01 - $ ,8.641975308641975D-02,-4.135802469135803D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 63),I= 7, 12) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01, - $ -2.191358024691358D-01/ - DATA (CF(I, 63),I= 13, 18) /1.530864197530864D+00, - $ -1.913580246913580D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02,-1.635802469135803D-01 - $ ,5.864197530864197D-02/ - DATA (CF(I, 63),I= 19, 24) /1.364197530864198D+00, - $ -3.580246913580247D-01,-4.135802469135803D-01 - $ ,1.558641975308642D+00,1.364197530864198D+00, - $ -4.135802469135803D-01/ - DATA (CF(I, 63),I= 25, 30) /1.753086419753086D+00, - $ -2.191358024691358D-01,1.530864197530864D+00, - $ -1.913580246913580D-01,1.558641975308642D+00,1.586419753086420D - $ +00/ - DATA (CF(I, 63),I= 31, 36) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,1.975308641975309D-01, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I, 63),I= 37, 42) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,1.975308641975309D+00, - $ -2.469135802469136D-01,3.086419753086420D-01,3.086419753086420D - $ -02/ - DATA (CF(I, 63),I= 43, 48) /-4.135802469135803D-01, - $ -1.358024691358025D-01,5.864197530864197D-02, - $ -2.191358024691358D-01,-1.635802469135803D-01, - $ -1.913580246913580D-01/ - DATA (CF(I, 63),I= 49, 54) /1.975308641975309D+00, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -2.469135802469136D-02,1.530864197530864D+00,1.753086419753086D - $ +00/ - DATA (CF(I, 63),I= 55, 60) /1.975308641975309D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 63),I= 61, 66) /-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.264197530864197D+01, - $ -1.580246913580247D+00,1.975308641975309D+00,1.975308641975309D - $ -01/ - DATA (CF(I, 63),I= 67, 72) /-6.913580246913580D-01 - $ ,1.530864197530864D+00,1.530864197530864D+00, - $ -2.469135802469136D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 63),I= 73, 78) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01, - $ -2.191358024691358D-01/ - DATA (CF(I, 63),I= 79, 84) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,1.975308641975309D-01, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I, 63),I= 85, 90) /1.975308641975309D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 63),I= 91, 96) /8.641975308641975D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I, 63),I= 97,102) /-3.580246913580247D-01 - $ ,4.197530864197531D-01,-1.358024691358025D-01 - $ ,1.586419753086420D+00,-3.580246913580247D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 63),I=103,108) /1.364197530864198D+00, - $ -3.580246913580247D-01,-1.635802469135803D-01, - $ -1.913580246913580D-01,-1.358024691358025D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 63),I=109,114) /8.641975308641975D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I, 63),I=115,120) /-1.358024691358025D-01, - $ -1.635802469135803D-01,1.586419753086420D+00, - $ -1.913580246913580D-01,3.086419753086420D-01,3.086419753086420D - $ -02/ + DATA (CF(I),I=5550,5607) /4096,-1024,1280,128,-448,992,992,-160, + $ -160,-16,-160,20,-16,2,-124,-142,-16,2,128,-16,20,2,128,-16, + $ -1024,128,-160,-16,56,-124,-124,20,20,2,-232,272,-88,1028,-232, + $ -88,884,-232,-106,-124,-88,56,56,-124,-124,20,20,2,-88,-106 + $ ,1028,-124,200,20/ C 1 T(5,6,2,1,7,3,4) - DATA (CF(I, 64),I= 1, 6) /-1.913580246913580D-01, - $ -1.635802469135803D-01,8.641975308641975D-02, - $ -1.358024691358025D-01,1.364197530864198D+00, - $ -3.580246913580247D-01/ - DATA (CF(I, 64),I= 7, 12) /3.086419753086420D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02,8.641975308641975D-02,-1.913580246913580D-01/ - DATA (CF(I, 64),I= 13, 18) /-1.913580246913580D-01 - $ ,1.586419753086420D+00,3.086419753086420D-02,3.086419753086420D - $ -01,-1.358024691358025D-01,-1.635802469135803D-01/ - DATA (CF(I, 64),I= 19, 24) /-3.580246913580247D-01 - $ ,4.197530864197531D-01,-1.358024691358025D-01 - $ ,1.586419753086420D+00,-3.580246913580247D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 64),I= 25, 30) /-2.191358024691358D-01 - $ ,5.864197530864197D-02,-1.913580246913580D-01, - $ -1.635802469135803D-01,-4.135802469135803D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 64),I= 31, 36) /3.086419753086420D-03 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I, 64),I= 37, 42) /3.086419753086420D-02 - $ ,3.086419753086420D-01,-2.469135802469136D-01 - $ ,1.975308641975309D+00,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 64),I= 43, 48) /1.558641975308642D+00 - $ ,1.586419753086420D+00,-2.191358024691358D-01 - $ ,1.753086419753086D+00,-1.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 64),I= 49, 54) /-2.469135802469136D-01 - $ ,1.530864197530864D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01,-6.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 64),I= 55, 60) /-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 64),I= 61, 66) /1.975308641975309D-01 - $ ,1.975308641975309D+00,-1.580246913580247D+00 - $ ,1.264197530864197D+01,1.975308641975309D-01, - $ -1.580246913580247D+00/ - DATA (CF(I, 64),I= 67, 72) /1.530864197530864D+00 - $ ,1.753086419753086D+00,-2.469135802469136D-01 - $ ,1.975308641975309D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 64),I= 73, 78) /3.086419753086420D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02,8.641975308641975D-02,-1.913580246913580D-01/ - DATA (CF(I, 64),I= 79, 84) /3.086419753086420D-03 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I, 64),I= 85, 90) /-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 64),I= 91, 96) /-1.913580246913580D-01, - $ -2.191358024691358D-01,3.086419753086420D-02, - $ -2.469135802469136D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I, 64),I= 97,102) /1.364197530864198D+00, - $ -3.580246913580247D-01,-4.135802469135803D-01 - $ ,1.558641975308642D+00,1.364197530864198D+00, - $ -4.135802469135803D-01/ - DATA (CF(I, 64),I=103,108) /-4.135802469135803D-01, - $ -1.358024691358025D-01,-1.913580246913580D-01 - $ ,1.530864197530864D+00,8.641975308641975D-02, - $ -6.913580246913580D-01/ - DATA (CF(I, 64),I=109,114) /-1.913580246913580D-01, - $ -2.191358024691358D-01,3.086419753086420D-02, - $ -2.469135802469136D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I, 64),I=115,120) /-1.635802469135803D-01 - $ ,5.864197530864197D-02,-1.913580246913580D-01 - $ ,1.530864197530864D+00,3.086419753086420D-02, - $ -2.469135802469136D-01/ + DATA (CF(I),I=5608,5664) /4096,128,-1024,992,1136,-160,1280,-16 + $ ,128,20,-124,2,20,56,-124,2,20,-16,128,2,-16,-16,-160,128,-1024 + $ ,-16,128,-124,-142,20,-160,2,-16,884,-232,-268,1010,884,-268, + $ -268,-88,-124,992,56,-448,-124,-142,20,-160,2,-16,-106,38,-124 + $ ,992,20,-160/ C 1 T(5,6,2,7,1,3,4) - DATA (CF(I, 65),I= 1, 6) /1.558641975308642D+00, - $ -4.135802469135803D-01,-4.135802469135803D-01 - $ ,1.364197530864198D+00,1.364197530864198D+00, - $ -3.580246913580247D-01/ - DATA (CF(I, 65),I= 7, 12) /-2.191358024691358D-01, - $ -1.913580246913580D-01,3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 65),I= 13, 18) /5.864197530864197D-02, - $ -1.635802469135803D-01,3.086419753086420D-02, - $ -2.469135802469136D-01,-1.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 65),I= 19, 24) /-4.135802469135803D-01, - $ -1.358024691358025D-01,-1.913580246913580D-01 - $ ,1.530864197530864D+00,8.641975308641975D-02, - $ -6.913580246913580D-01/ - DATA (CF(I, 65),I= 25, 30) /1.586419753086420D+00, - $ -1.358024691358025D-01,-1.358024691358025D-01, - $ -3.580246913580247D-01,-3.580246913580247D-01 - $ ,4.197530864197531D-01/ - DATA (CF(I, 65),I= 31, 36) /-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02,3.086419753086420D - $ -03,-1.913580246913580D-01,3.086419753086420D-02/ - DATA (CF(I, 65),I= 37, 42) /-1.635802469135803D-01, - $ -1.358024691358025D-01,3.086419753086420D-01,3.086419753086420D - $ -02,1.586419753086420D+00,-1.913580246913580D-01/ - DATA (CF(I, 65),I= 43, 48) /1.364197530864198D+00, - $ -3.580246913580247D-01,-1.635802469135803D-01, - $ -1.913580246913580D-01,-1.358024691358025D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 65),I= 49, 54) /1.753086419753086D+00 - $ ,1.530864197530864D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01,-2.469135802469136D-01 - $ ,1.975308641975309D+00/ - DATA (CF(I, 65),I= 55, 60) /1.530864197530864D+00, - $ -6.913580246913580D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02,1.530864197530864D+00, - $ -2.469135802469136D-01/ - DATA (CF(I, 65),I= 61, 66) /1.975308641975309D-01, - $ -1.580246913580247D+00,1.975308641975309D+00,1.975308641975309D - $ -01,1.264197530864197D+01,-1.580246913580247D+00/ - DATA (CF(I, 65),I= 67, 72) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01/ - DATA (CF(I, 65),I= 73, 78) /-2.191358024691358D-01, - $ -1.913580246913580D-01,3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 65),I= 79, 84) /-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02,3.086419753086420D - $ -03,-1.913580246913580D-01,3.086419753086420D-02/ - DATA (CF(I, 65),I= 85, 90) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01/ - DATA (CF(I, 65),I= 91, 96) /3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03,1.975308641975309D-01,-2.469135802469136D-02/ - DATA (CF(I, 65),I= 97,102) /1.558641975308642D+00 - $ ,1.586419753086420D+00,-2.191358024691358D-01 - $ ,1.753086419753086D+00,-1.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 65),I=103,108) /-4.135802469135803D-01, - $ -1.358024691358025D-01,5.864197530864197D-02, - $ -2.191358024691358D-01,-1.635802469135803D-01, - $ -1.913580246913580D-01/ - DATA (CF(I, 65),I=109,114) /3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03,1.975308641975309D-01,-2.469135802469136D-02/ - DATA (CF(I, 65),I=115,120) /3.086419753086420D-02, - $ -2.469135802469136D-01,3.086419753086420D-01,3.086419753086420D - $ -02,1.975308641975309D+00,-2.469135802469136D-01/ + DATA (CF(I),I=5665,5720) /4096,-1024,-16,128,-160,-16,-1024,128, + $ -142,-124,2,-16,20,-160,-124,56,20,2,-124,20,-16,128,-160,-16, + $ -1024,128,2,-16,20,2,128,-16,1010,1028,-142,1136,-124,992,-268, + $ -88,38,-142,-106,-124,2,-16,20,2,128,-16,20,-160,200,20,1280, + $ -160/ C 1 T(5,6,7,1,2,3,4) - DATA (CF(I, 66),I= 1, 6) /1.586419753086420D+00, - $ -1.358024691358025D-01,-1.358024691358025D-01, - $ -3.580246913580247D-01,-3.580246913580247D-01 - $ ,4.197530864197531D-01/ - DATA (CF(I, 66),I= 7, 12) /-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02,3.086419753086420D - $ -03,-1.913580246913580D-01,3.086419753086420D-02/ - DATA (CF(I, 66),I= 13, 18) /-1.635802469135803D-01, - $ -1.358024691358025D-01,3.086419753086420D-01,3.086419753086420D - $ -02,1.586419753086420D+00,-1.913580246913580D-01/ - DATA (CF(I, 66),I= 19, 24) /1.364197530864198D+00, - $ -3.580246913580247D-01,-1.635802469135803D-01, - $ -1.913580246913580D-01,-1.358024691358025D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 66),I= 25, 30) /1.558641975308642D+00, - $ -4.135802469135803D-01,-4.135802469135803D-01 - $ ,1.364197530864198D+00,1.364197530864198D+00, - $ -3.580246913580247D-01/ - DATA (CF(I, 66),I= 31, 36) /-2.191358024691358D-01, - $ -1.913580246913580D-01,3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 66),I= 37, 42) /5.864197530864197D-02, - $ -1.635802469135803D-01,3.086419753086420D-02, - $ -2.469135802469136D-01,-1.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 66),I= 43, 48) /-4.135802469135803D-01, - $ -1.358024691358025D-01,-1.913580246913580D-01 - $ ,1.530864197530864D+00,8.641975308641975D-02, - $ -6.913580246913580D-01/ - DATA (CF(I, 66),I= 49, 54) /1.530864197530864D+00, - $ -6.913580246913580D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02,1.530864197530864D+00, - $ -2.469135802469136D-01/ - DATA (CF(I, 66),I= 55, 60) /1.753086419753086D+00 - $ ,1.530864197530864D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01,-2.469135802469136D-01 - $ ,1.975308641975309D+00/ - DATA (CF(I, 66),I= 61, 66) /1.975308641975309D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -1.580246913580247D+00,-1.580246913580247D+00 - $ ,1.264197530864197D+01/ - DATA (CF(I, 66),I= 67, 72) /-2.469135802469136D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -1.580246913580247D+00/ - DATA (CF(I, 66),I= 73, 78) /-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02,3.086419753086420D - $ -03,-1.913580246913580D-01,3.086419753086420D-02/ - DATA (CF(I, 66),I= 79, 84) /-2.191358024691358D-01, - $ -1.913580246913580D-01,3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 66),I= 85, 90) /-2.469135802469136D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -1.580246913580247D+00/ - DATA (CF(I, 66),I= 91, 96) /3.086419753086420D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 66),I= 97,102) /-4.135802469135803D-01, - $ -1.358024691358025D-01,5.864197530864197D-02, - $ -2.191358024691358D-01,-1.635802469135803D-01, - $ -1.913580246913580D-01/ - DATA (CF(I, 66),I=103,108) /1.558641975308642D+00 - $ ,1.586419753086420D+00,-2.191358024691358D-01 - $ ,1.753086419753086D+00,-1.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 66),I=109,114) /3.086419753086420D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 66),I=115,120) /3.086419753086420D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02, - $ -2.469135802469136D-01,-2.469135802469136D-01 - $ ,1.975308641975309D+00/ + DATA (CF(I),I=5721,5775) /4096,-160,-16,-16,128,128,-1024,-124 + $ ,56,20,2,-124,20,-142,-124,2,-16,20,-160,-160,-16,-16,128,128, + $ -1024,20,2,2,-16,-16,128,-268,-88,38,-142,-106,-124,1010,1028, + $ -142,1136,-124,992,20,2,2,-16,-16,128,200,20,20,-160,-160,1280/ C 1 T(5,6,7,2,1,3,4) - DATA (CF(I, 67),I= 1, 6) /-2.191358024691358D-01 - $ ,1.753086419753086D+00,1.558641975308642D+00,1.586419753086420D - $ +00,1.530864197530864D+00,-1.913580246913580D-01/ - DATA (CF(I, 67),I= 7, 12) /3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03,1.975308641975309D-01,-2.469135802469136D-02/ - DATA (CF(I, 67),I= 13, 18) /-4.135802469135803D-01, - $ -1.358024691358025D-01,5.864197530864197D-02, - $ -2.191358024691358D-01,-1.635802469135803D-01, - $ -1.913580246913580D-01/ - DATA (CF(I, 67),I= 19, 24) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,1.975308641975309D+00, - $ -2.469135802469136D-01,3.086419753086420D-01,3.086419753086420D - $ -02/ - DATA (CF(I, 67),I= 25, 30) /-1.913580246913580D-01 - $ ,1.530864197530864D+00,-4.135802469135803D-01, - $ -1.358024691358025D-01,-6.913580246913580D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 67),I= 31, 36) /3.086419753086420D-02, - $ -2.469135802469136D-01,-1.913580246913580D-01, - $ -2.191358024691358D-01,-2.469135802469136D-02 - $ ,3.086419753086420D-03/ - DATA (CF(I, 67),I= 37, 42) /1.364197530864198D+00, - $ -3.580246913580247D-01,-4.135802469135803D-01 - $ ,1.558641975308642D+00,1.364197530864198D+00, - $ -4.135802469135803D-01/ - DATA (CF(I, 67),I= 43, 48) /1.530864197530864D+00, - $ -1.913580246913580D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02,-1.635802469135803D-01 - $ ,5.864197530864197D-02/ - DATA (CF(I, 67),I= 49, 54) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01/ - DATA (CF(I, 67),I= 55, 60) /-2.469135802469136D-01 - $ ,1.975308641975309D+00,1.530864197530864D+00,1.753086419753086D - $ +00,1.975308641975309D-01,-2.469135802469136D-02/ - DATA (CF(I, 67),I= 61, 66) /1.530864197530864D+00, - $ -2.469135802469136D-01,-6.913580246913580D-01 - $ ,1.530864197530864D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 67),I= 67, 72) /1.264197530864197D+01, - $ -1.580246913580247D+00,-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01,1.975308641975309D - $ +00/ - DATA (CF(I, 67),I= 73, 78) /1.364197530864198D+00, - $ -3.580246913580247D-01,-1.635802469135803D-01, - $ -1.913580246913580D-01,-1.358024691358025D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 67),I= 79, 84) /-3.580246913580247D-01 - $ ,4.197530864197531D-01,-1.358024691358025D-01 - $ ,1.586419753086420D+00,-3.580246913580247D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 67),I= 85, 90) /-1.913580246913580D-01 - $ ,3.086419753086420D-02,8.641975308641975D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I, 67),I= 91, 96) /1.586419753086420D+00, - $ -1.913580246913580D-01,-1.358024691358025D-01, - $ -1.635802469135803D-01,3.086419753086420D-02,3.086419753086420D - $ -01/ - DATA (CF(I, 67),I= 97,102) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,1.975308641975309D-01, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I, 67),I=103,108) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01, - $ -2.191358024691358D-01/ - DATA (CF(I, 67),I=109,114) /-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 67),I=115,120) /-1.913580246913580D-01 - $ ,3.086419753086420D-02,8.641975308641975D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02/ + DATA (CF(I),I=5776,5829) /4096,-1024,-1024,128,128,1280,884,-232 + $ ,-106,-124,-88,56,-232,272,-88,1028,-232,-88,-124,20,56,-124,2 + $ ,20,1028,-124,-88,-106,20,200,-16,2,128,-16,20,2,-160,20,-16,2, + $ -124,-142,-1024,128,128,-16,-16,-160,-124,20,56,-124,2,20/ C 1 T(5,7,1,2,6,3,4) - DATA (CF(I, 68),I= 1, 6) /5.864197530864197D-02, - $ -2.191358024691358D-01,-4.135802469135803D-01, - $ -1.358024691358025D-01,-1.913580246913580D-01, - $ -1.635802469135803D-01/ - DATA (CF(I, 68),I= 7, 12) /3.086419753086420D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 68),I= 13, 18) /1.558641975308642D+00 - $ ,1.586419753086420D+00,-2.191358024691358D-01 - $ ,1.753086419753086D+00,-1.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 68),I= 19, 24) /3.086419753086420D-02 - $ ,3.086419753086420D-01,-2.469135802469136D-01 - $ ,1.975308641975309D+00,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 68),I= 25, 30) /-1.635802469135803D-01, - $ -1.913580246913580D-01,1.364197530864198D+00, - $ -3.580246913580247D-01,8.641975308641975D-02, - $ -1.358024691358025D-01/ - DATA (CF(I, 68),I= 31, 36) /-1.913580246913580D-01 - $ ,3.086419753086420D-02,8.641975308641975D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I, 68),I= 37, 42) /-3.580246913580247D-01 - $ ,4.197530864197531D-01,-1.358024691358025D-01 - $ ,1.586419753086420D+00,-3.580246913580247D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 68),I= 43, 48) /-1.913580246913580D-01 - $ ,1.586419753086420D+00,3.086419753086420D-02,3.086419753086420D - $ -01,-1.358024691358025D-01,-1.635802469135803D-01/ - DATA (CF(I, 68),I= 49, 54) /-2.469135802469136D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -1.580246913580247D+00/ - DATA (CF(I, 68),I= 55, 60) /1.530864197530864D+00, - $ -2.469135802469136D-01,-6.913580246913580D-01 - $ ,1.530864197530864D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 68),I= 61, 66) /-2.469135802469136D-01 - $ ,1.975308641975309D+00,1.530864197530864D+00,1.753086419753086D - $ +00,1.975308641975309D-01,-2.469135802469136D-02/ - DATA (CF(I, 68),I= 67, 72) /-1.580246913580247D+00 - $ ,1.264197530864197D+01,1.975308641975309D-01,1.975308641975309D - $ +00,-1.580246913580247D+00,1.975308641975309D-01/ - DATA (CF(I, 68),I= 73, 78) /-4.135802469135803D-01, - $ -1.358024691358025D-01,-1.913580246913580D-01 - $ ,1.530864197530864D+00,8.641975308641975D-02, - $ -6.913580246913580D-01/ - DATA (CF(I, 68),I= 79, 84) /1.364197530864198D+00, - $ -3.580246913580247D-01,-4.135802469135803D-01 - $ ,1.558641975308642D+00,1.364197530864198D+00, - $ -4.135802469135803D-01/ - DATA (CF(I, 68),I= 85, 90) /3.086419753086420D-02, - $ -2.469135802469136D-01,-1.913580246913580D-01, - $ -2.191358024691358D-01,-2.469135802469136D-02 - $ ,3.086419753086420D-03/ - DATA (CF(I, 68),I= 91, 96) /-1.913580246913580D-01 - $ ,1.530864197530864D+00,-1.635802469135803D-01 - $ ,5.864197530864197D-02,-2.469135802469136D-01 - $ ,3.086419753086420D-02/ - DATA (CF(I, 68),I= 97,102) /3.086419753086420D-03 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I, 68),I=103,108) /3.086419753086420D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02,8.641975308641975D-02,-1.913580246913580D-01/ - DATA (CF(I, 68),I=109,114) /1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 68),I=115,120) /3.086419753086420D-02, - $ -2.469135802469136D-01,-1.913580246913580D-01, - $ -2.191358024691358D-01,-2.469135802469136D-02 - $ ,3.086419753086420D-03/ + DATA (CF(I),I=5830,5882) /4096,128,1280,-1024,128,-268,-88,-124 + $ ,992,56,-448,884,-232,-268,1010,884,-268,20,-160,-124,-142,-16 + $ ,2,-124,992,-106,38,-160,20,2,20,-16,128,2,-16,20,-124,2,20,56, + $ -124,128,-1024,-16,-160,128,-16,20,-160,-124,-142,-16,2/ C 1 T(5,7,1,6,2,3,4) - DATA (CF(I, 69),I= 1, 6) /-1.913580246913580D-01 - $ ,1.530864197530864D+00,-4.135802469135803D-01, - $ -1.358024691358025D-01,-6.913580246913580D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 69),I= 7, 12) /3.086419753086420D-02, - $ -2.469135802469136D-01,-1.913580246913580D-01, - $ -2.191358024691358D-01,-2.469135802469136D-02 - $ ,3.086419753086420D-03/ - DATA (CF(I, 69),I= 13, 18) /1.364197530864198D+00, - $ -3.580246913580247D-01,-4.135802469135803D-01 - $ ,1.558641975308642D+00,1.364197530864198D+00, - $ -4.135802469135803D-01/ - DATA (CF(I, 69),I= 19, 24) /1.530864197530864D+00, - $ -1.913580246913580D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02,-1.635802469135803D-01 - $ ,5.864197530864197D-02/ - DATA (CF(I, 69),I= 25, 30) /-2.191358024691358D-01 - $ ,1.753086419753086D+00,1.558641975308642D+00,1.586419753086420D - $ +00,1.530864197530864D+00,-1.913580246913580D-01/ - DATA (CF(I, 69),I= 31, 36) /3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03,1.975308641975309D-01,-2.469135802469136D-02/ - DATA (CF(I, 69),I= 37, 42) /-4.135802469135803D-01, - $ -1.358024691358025D-01,5.864197530864197D-02, - $ -2.191358024691358D-01,-1.635802469135803D-01, - $ -1.913580246913580D-01/ - DATA (CF(I, 69),I= 43, 48) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,1.975308641975309D+00, - $ -2.469135802469136D-01,3.086419753086420D-01,3.086419753086420D - $ -02/ - DATA (CF(I, 69),I= 49, 54) /-2.469135802469136D-01 - $ ,1.975308641975309D+00,1.530864197530864D+00,1.753086419753086D - $ +00,1.975308641975309D-01,-2.469135802469136D-02/ - DATA (CF(I, 69),I= 55, 60) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01/ - DATA (CF(I, 69),I= 61, 66) /-6.913580246913580D-01 - $ ,1.530864197530864D+00,1.530864197530864D+00, - $ -2.469135802469136D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 69),I= 67, 72) /-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.264197530864197D+01, - $ -1.580246913580247D+00,1.975308641975309D+00,1.975308641975309D - $ -01/ - DATA (CF(I, 69),I= 73, 78) /-3.580246913580247D-01 - $ ,4.197530864197531D-01,-1.358024691358025D-01 - $ ,1.586419753086420D+00,-3.580246913580247D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 69),I= 79, 84) /1.364197530864198D+00, - $ -3.580246913580247D-01,-1.635802469135803D-01, - $ -1.913580246913580D-01,-1.358024691358025D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 69),I= 85, 90) /8.641975308641975D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I, 69),I= 91, 96) /-1.358024691358025D-01, - $ -1.635802469135803D-01,1.586419753086420D+00, - $ -1.913580246913580D-01,3.086419753086420D-01,3.086419753086420D - $ -02/ - DATA (CF(I, 69),I= 97,102) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01, - $ -2.191358024691358D-01/ - DATA (CF(I, 69),I=103,108) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,1.975308641975309D-01, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I, 69),I=109,114) /1.975308641975309D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 69),I=115,120) /8.641975308641975D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ + DATA (CF(I),I=5883,5934) /4096,-1024,1280,128,-232,272,-88,1028, + $ -232,-88,884,-232,-106,-124,-88,56,56,-124,-124,20,20,2,-88, + $ -106,1028,-124,200,20,-160,20,-16,2,-124,-142,-16,2,128,-16,20 + $ ,2,128,-16,-1024,128,-160,-16,56,-124,-124,20,20,2/ C 1 T(5,7,2,1,6,3,4) - DATA (CF(I, 70),I= 1, 6) /-1.635802469135803D-01, - $ -1.913580246913580D-01,1.364197530864198D+00, - $ -3.580246913580247D-01,8.641975308641975D-02, - $ -1.358024691358025D-01/ - DATA (CF(I, 70),I= 7, 12) /-1.913580246913580D-01 - $ ,3.086419753086420D-02,8.641975308641975D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I, 70),I= 13, 18) /-3.580246913580247D-01 - $ ,4.197530864197531D-01,-1.358024691358025D-01 - $ ,1.586419753086420D+00,-3.580246913580247D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 70),I= 19, 24) /-1.913580246913580D-01 - $ ,1.586419753086420D+00,3.086419753086420D-02,3.086419753086420D - $ -01,-1.358024691358025D-01,-1.635802469135803D-01/ - DATA (CF(I, 70),I= 25, 30) /5.864197530864197D-02, - $ -2.191358024691358D-01,-4.135802469135803D-01, - $ -1.358024691358025D-01,-1.913580246913580D-01, - $ -1.635802469135803D-01/ - DATA (CF(I, 70),I= 31, 36) /3.086419753086420D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 70),I= 37, 42) /1.558641975308642D+00 - $ ,1.586419753086420D+00,-2.191358024691358D-01 - $ ,1.753086419753086D+00,-1.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 70),I= 43, 48) /3.086419753086420D-02 - $ ,3.086419753086420D-01,-2.469135802469136D-01 - $ ,1.975308641975309D+00,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 70),I= 49, 54) /1.530864197530864D+00, - $ -2.469135802469136D-01,-6.913580246913580D-01 - $ ,1.530864197530864D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 70),I= 55, 60) /-2.469135802469136D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -1.580246913580247D+00/ - DATA (CF(I, 70),I= 61, 66) /1.530864197530864D+00 - $ ,1.753086419753086D+00,-2.469135802469136D-01 - $ ,1.975308641975309D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 70),I= 67, 72) /1.975308641975309D-01 - $ ,1.975308641975309D+00,-1.580246913580247D+00 - $ ,1.264197530864197D+01,1.975308641975309D-01, - $ -1.580246913580247D+00/ - DATA (CF(I, 70),I= 73, 78) /1.364197530864198D+00, - $ -3.580246913580247D-01,-4.135802469135803D-01 - $ ,1.558641975308642D+00,1.364197530864198D+00, - $ -4.135802469135803D-01/ - DATA (CF(I, 70),I= 79, 84) /-4.135802469135803D-01, - $ -1.358024691358025D-01,-1.913580246913580D-01 - $ ,1.530864197530864D+00,8.641975308641975D-02, - $ -6.913580246913580D-01/ - DATA (CF(I, 70),I= 85, 90) /-1.913580246913580D-01, - $ -2.191358024691358D-01,3.086419753086420D-02, - $ -2.469135802469136D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I, 70),I= 91, 96) /-1.635802469135803D-01 - $ ,5.864197530864197D-02,-1.913580246913580D-01 - $ ,1.530864197530864D+00,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 70),I= 97,102) /3.086419753086420D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02,8.641975308641975D-02,-1.913580246913580D-01/ - DATA (CF(I, 70),I=103,108) /3.086419753086420D-03 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I, 70),I=109,114) /-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 70),I=115,120) /-1.913580246913580D-01, - $ -2.191358024691358D-01,3.086419753086420D-02, - $ -2.469135802469136D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ + DATA (CF(I),I=5935,5985) /4096,128,-1024,884,-232,-268,1010,884, + $ -268,-268,-88,-124,992,56,-448,-124,-142,20,-160,2,-16,-106,38, + $ -124,992,20,-160,20,-124,2,20,56,-124,2,20,-16,128,2,-16,-16, + $ -160,128,-1024,-16,128,-124,-142,20,-160,2,-16/ C 1 T(5,7,2,6,1,3,4) - DATA (CF(I, 71),I= 1, 6) /-4.135802469135803D-01 - $ ,1.558641975308642D+00,1.364197530864198D+00, - $ -3.580246913580247D-01,-4.135802469135803D-01 - $ ,1.364197530864198D+00/ - DATA (CF(I, 71),I= 7, 12) /-1.913580246913580D-01, - $ -2.191358024691358D-01,3.086419753086420D-02, - $ -2.469135802469136D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I, 71),I= 13, 18) /-4.135802469135803D-01, - $ -1.358024691358025D-01,-1.913580246913580D-01 - $ ,1.530864197530864D+00,8.641975308641975D-02, - $ -6.913580246913580D-01/ - DATA (CF(I, 71),I= 19, 24) /5.864197530864197D-02, - $ -1.635802469135803D-01,3.086419753086420D-02, - $ -2.469135802469136D-01,-1.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 71),I= 25, 30) /-1.358024691358025D-01 - $ ,1.586419753086420D+00,-3.580246913580247D-01 - $ ,4.197530864197531D-01,-1.358024691358025D-01, - $ -3.580246913580247D-01/ - DATA (CF(I, 71),I= 31, 36) /8.641975308641975D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I, 71),I= 37, 42) /1.364197530864198D+00, - $ -3.580246913580247D-01,-1.635802469135803D-01, - $ -1.913580246913580D-01,-1.358024691358025D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 71),I= 43, 48) /-1.635802469135803D-01, - $ -1.358024691358025D-01,3.086419753086420D-01,3.086419753086420D - $ -02,1.586419753086420D+00,-1.913580246913580D-01/ - DATA (CF(I, 71),I= 49, 54) /1.530864197530864D+00 - $ ,1.753086419753086D+00,-2.469135802469136D-01 - $ ,1.975308641975309D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 71),I= 55, 60) /-6.913580246913580D-01 - $ ,1.530864197530864D+00,1.530864197530864D+00, - $ -2.469135802469136D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 71),I= 61, 66) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01/ - DATA (CF(I, 71),I= 67, 72) /1.975308641975309D-01, - $ -1.580246913580247D+00,1.975308641975309D+00,1.975308641975309D - $ -01,1.264197530864197D+01,-1.580246913580247D+00/ - DATA (CF(I, 71),I= 73, 78) /1.558641975308642D+00 - $ ,1.586419753086420D+00,-2.191358024691358D-01 - $ ,1.753086419753086D+00,-1.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 71),I= 79, 84) /-4.135802469135803D-01, - $ -1.358024691358025D-01,5.864197530864197D-02, - $ -2.191358024691358D-01,-1.635802469135803D-01, - $ -1.913580246913580D-01/ - DATA (CF(I, 71),I= 85, 90) /3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03,1.975308641975309D-01,-2.469135802469136D-02/ - DATA (CF(I, 71),I= 91, 96) /3.086419753086420D-02, - $ -2.469135802469136D-01,3.086419753086420D-01,3.086419753086420D - $ -02,1.975308641975309D+00,-2.469135802469136D-01/ - DATA (CF(I, 71),I= 97,102) /-2.191358024691358D-01, - $ -1.913580246913580D-01,3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 71),I=103,108) /-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02,3.086419753086420D - $ -03,-1.913580246913580D-01,3.086419753086420D-02/ - DATA (CF(I, 71),I=109,114) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01/ - DATA (CF(I, 71),I=115,120) /3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03,1.975308641975309D-01,-2.469135802469136D-02/ + DATA (CF(I),I=5986,6035) /4096,-1024,1010,1028,-142,1136,-124 + $ ,992,-268,-88,38,-142,-106,-124,2,-16,20,2,128,-16,20,-160,200 + $ ,20,1280,-160,-142,-124,2,-16,20,-160,-124,56,20,2,-124,20,-16 + $ ,128,-160,-16,-1024,128,2,-16,20,2,128,-16/ C 1 T(5,7,6,1,2,3,4) - DATA (CF(I, 72),I= 1, 6) /-1.358024691358025D-01 - $ ,1.586419753086420D+00,-3.580246913580247D-01 - $ ,4.197530864197531D-01,-1.358024691358025D-01, - $ -3.580246913580247D-01/ - DATA (CF(I, 72),I= 7, 12) /8.641975308641975D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I, 72),I= 13, 18) /1.364197530864198D+00, - $ -3.580246913580247D-01,-1.635802469135803D-01, - $ -1.913580246913580D-01,-1.358024691358025D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 72),I= 19, 24) /-1.635802469135803D-01, - $ -1.358024691358025D-01,3.086419753086420D-01,3.086419753086420D - $ -02,1.586419753086420D+00,-1.913580246913580D-01/ - DATA (CF(I, 72),I= 25, 30) /-4.135802469135803D-01 - $ ,1.558641975308642D+00,1.364197530864198D+00, - $ -3.580246913580247D-01,-4.135802469135803D-01 - $ ,1.364197530864198D+00/ - DATA (CF(I, 72),I= 31, 36) /-1.913580246913580D-01, - $ -2.191358024691358D-01,3.086419753086420D-02, - $ -2.469135802469136D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I, 72),I= 37, 42) /-4.135802469135803D-01, - $ -1.358024691358025D-01,-1.913580246913580D-01 - $ ,1.530864197530864D+00,8.641975308641975D-02, - $ -6.913580246913580D-01/ - DATA (CF(I, 72),I= 43, 48) /5.864197530864197D-02, - $ -1.635802469135803D-01,3.086419753086420D-02, - $ -2.469135802469136D-01,-1.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 72),I= 49, 54) /-6.913580246913580D-01 - $ ,1.530864197530864D+00,1.530864197530864D+00, - $ -2.469135802469136D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 72),I= 55, 60) /1.530864197530864D+00 - $ ,1.753086419753086D+00,-2.469135802469136D-01 - $ ,1.975308641975309D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 72),I= 61, 66) /-2.469135802469136D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -1.580246913580247D+00/ - DATA (CF(I, 72),I= 67, 72) /1.975308641975309D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -1.580246913580247D+00,-1.580246913580247D+00 - $ ,1.264197530864197D+01/ - DATA (CF(I, 72),I= 73, 78) /-4.135802469135803D-01, - $ -1.358024691358025D-01,5.864197530864197D-02, - $ -2.191358024691358D-01,-1.635802469135803D-01, - $ -1.913580246913580D-01/ - DATA (CF(I, 72),I= 79, 84) /1.558641975308642D+00 - $ ,1.586419753086420D+00,-2.191358024691358D-01 - $ ,1.753086419753086D+00,-1.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 72),I= 85, 90) /3.086419753086420D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 72),I= 91, 96) /3.086419753086420D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02, - $ -2.469135802469136D-01,-2.469135802469136D-01 - $ ,1.975308641975309D+00/ - DATA (CF(I, 72),I= 97,102) /-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02,3.086419753086420D - $ -03,-1.913580246913580D-01,3.086419753086420D-02/ - DATA (CF(I, 72),I=103,108) /-2.191358024691358D-01, - $ -1.913580246913580D-01,3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 72),I=109,114) /-2.469135802469136D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -1.580246913580247D+00/ - DATA (CF(I, 72),I=115,120) /3.086419753086420D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ + DATA (CF(I),I=6036,6084) /4096,-268,-88,38,-142,-106,-124,1010 + $ ,1028,-142,1136,-124,992,20,2,2,-16,-16,128,200,20,20,-160,-160 + $ ,1280,-124,56,20,2,-124,20,-142,-124,2,-16,20,-160,-160,-16,-16 + $ ,128,128,-1024,20,2,2,-16,-16,128/ C 1 T(5,7,6,2,1,3,4) - DATA (CF(I, 73),I= 1, 6) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,1.975308641975309D-01, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I, 73),I= 7, 12) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01, - $ -2.191358024691358D-01/ - DATA (CF(I, 73),I= 13, 18) /-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 73),I= 19, 24) /-1.913580246913580D-01 - $ ,3.086419753086420D-02,8.641975308641975D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I, 73),I= 25, 30) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,1.975308641975309D+00, - $ -2.469135802469136D-01,3.086419753086420D-01,3.086419753086420D - $ -02/ - DATA (CF(I, 73),I= 31, 36) /1.530864197530864D+00, - $ -1.913580246913580D-01,1.753086419753086D+00, - $ -2.191358024691358D-01,1.586419753086420D+00,1.558641975308642D - $ +00/ - DATA (CF(I, 73),I= 37, 42) /1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I, 73),I= 43, 48) /-1.635802469135803D-01, - $ -1.913580246913580D-01,-1.358024691358025D-01, - $ -4.135802469135803D-01,-2.191358024691358D-01 - $ ,5.864197530864197D-02/ - DATA (CF(I, 73),I= 49, 54) /1.530864197530864D+00, - $ -1.913580246913580D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02,-1.635802469135803D-01 - $ ,5.864197530864197D-02/ - DATA (CF(I, 73),I= 55, 60) /-6.913580246913580D-01 - $ ,8.641975308641975D-02,1.530864197530864D+00, - $ -1.913580246913580D-01,-1.358024691358025D-01, - $ -4.135802469135803D-01/ - DATA (CF(I, 73),I= 61, 66) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01/ - DATA (CF(I, 73),I= 67, 72) /1.364197530864198D+00, - $ -4.135802469135803D-01,-3.580246913580247D-01 - $ ,1.364197530864198D+00,1.558641975308642D+00, - $ -4.135802469135803D-01/ - DATA (CF(I, 73),I= 73, 78) /1.264197530864197D+01, - $ -1.580246913580247D+00,-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01,1.975308641975309D - $ +00/ - DATA (CF(I, 73),I= 79, 84) /-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 73),I= 85, 90) /1.975308641975309D-01, - $ -2.469135802469136D-02,1.975308641975309D+00, - $ -2.469135802469136D-01,1.753086419753086D+00,1.530864197530864D - $ +00/ - DATA (CF(I, 73),I= 91, 96) /-2.469135802469136D-02, - $ -2.469135802469136D-01,-2.469135802469136D-01 - $ ,1.530864197530864D+00,1.530864197530864D+00, - $ -6.913580246913580D-01/ - DATA (CF(I, 73),I= 97,102) /1.586419753086420D+00, - $ -1.913580246913580D-01,-1.358024691358025D-01, - $ -1.635802469135803D-01,3.086419753086420D-02,3.086419753086420D - $ -01/ - DATA (CF(I, 73),I=103,108) /-1.358024691358025D-01 - $ ,8.641975308641975D-02,-3.580246913580247D-01 - $ ,1.364197530864198D+00,-1.913580246913580D-01, - $ -1.635802469135803D-01/ - DATA (CF(I, 73),I=109,114) /-3.580246913580247D-01, - $ -1.358024691358025D-01,4.197530864197531D-01, - $ -3.580246913580247D-01,1.586419753086420D+00, - $ -1.358024691358025D-01/ - DATA (CF(I, 73),I=115,120) /3.086419753086420D-03 - $ ,3.086419753086420D-02,3.086419753086420D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,8.641975308641975D-02/ + DATA (CF(I),I=6085,6132) /4096,-1024,-1024,128,128,1280,-1024 + $ ,128,128,-16,-16,-160,128,-16,1280,-160,1136,992,-16,-160,-160 + $ ,992,992,-448,1028,-124,-88,-106,20,200,-88,56,-232,884,-124, + $ -106,-232,-88,272,-232,1028,-88,2,20,20,-124,-124,56/ C 1 T(6,1,2,5,7,3,4) - DATA (CF(I, 74),I= 1, 6) /3.086419753086420D-03 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I, 74),I= 7, 12) /3.086419753086420D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02,8.641975308641975D-02,-1.913580246913580D-01/ - DATA (CF(I, 74),I= 13, 18) /1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 74),I= 19, 24) /3.086419753086420D-02, - $ -2.469135802469136D-01,-1.913580246913580D-01, - $ -2.191358024691358D-01,-2.469135802469136D-02 - $ ,3.086419753086420D-03/ - DATA (CF(I, 74),I= 25, 30) /3.086419753086420D-02 - $ ,3.086419753086420D-01,-2.469135802469136D-01 - $ ,1.975308641975309D+00,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 74),I= 31, 36) /-1.913580246913580D-01, - $ -1.635802469135803D-01,-2.191358024691358D-01 - $ ,5.864197530864197D-02,-1.358024691358025D-01, - $ -4.135802469135803D-01/ - DATA (CF(I, 74),I= 37, 42) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03,3.086419753086420D - $ -02,-2.469135802469136D-02,3.086419753086420D-03/ - DATA (CF(I, 74),I= 43, 48) /-1.913580246913580D-01 - $ ,1.530864197530864D+00,1.586419753086420D+00,1.558641975308642D - $ +00,1.753086419753086D+00,-2.191358024691358D-01/ - DATA (CF(I, 74),I= 49, 54) /-1.913580246913580D-01 - $ ,1.586419753086420D+00,3.086419753086420D-02,3.086419753086420D - $ -01,-1.358024691358025D-01,-1.635802469135803D-01/ - DATA (CF(I, 74),I= 55, 60) /8.641975308641975D-02, - $ -1.358024691358025D-01,-1.913580246913580D-01, - $ -1.635802469135803D-01,-3.580246913580247D-01 - $ ,1.364197530864198D+00/ - DATA (CF(I, 74),I= 61, 66) /3.086419753086420D-03 - $ ,3.086419753086420D-02,3.086419753086420D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 74),I= 67, 72) /-3.580246913580247D-01, - $ -1.358024691358025D-01,4.197530864197531D-01, - $ -3.580246913580247D-01,1.586419753086420D+00, - $ -1.358024691358025D-01/ - DATA (CF(I, 74),I= 73, 78) /-1.580246913580247D+00 - $ ,1.264197530864197D+01,1.975308641975309D-01,1.975308641975309D - $ +00,-1.580246913580247D+00,1.975308641975309D-01/ - DATA (CF(I, 74),I= 79, 84) /1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 74),I= 85, 90) /-2.469135802469136D-02, - $ -2.469135802469136D-01,-2.469135802469136D-01 - $ ,1.530864197530864D+00,1.530864197530864D+00, - $ -6.913580246913580D-01/ - DATA (CF(I, 74),I= 91, 96) /1.975308641975309D-01, - $ -2.469135802469136D-02,1.975308641975309D+00, - $ -2.469135802469136D-01,1.753086419753086D+00,1.530864197530864D - $ +00/ - DATA (CF(I, 74),I= 97,102) /-1.913580246913580D-01 - $ ,1.530864197530864D+00,-1.635802469135803D-01 - $ ,5.864197530864197D-02,-2.469135802469136D-01 - $ ,3.086419753086420D-02/ - DATA (CF(I, 74),I=103,108) /8.641975308641975D-02, - $ -6.913580246913580D-01,-1.358024691358025D-01, - $ -4.135802469135803D-01,1.530864197530864D+00, - $ -1.913580246913580D-01/ - DATA (CF(I, 74),I=109,114) /1.364197530864198D+00, - $ -4.135802469135803D-01,-3.580246913580247D-01 - $ ,1.364197530864198D+00,1.558641975308642D+00, - $ -4.135802469135803D-01/ - DATA (CF(I, 74),I=115,120) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01/ + DATA (CF(I),I=6133,6179) /4096,128,1280,-1024,128,128,-1024,-16, + $ -160,128,-16,-16,-160,-160,992,992,-448,128,-16,1280,-160,1136 + $ ,992,-124,992,-106,38,-160,20,56,-448,-88,-268,992,-124,884, + $ -268,-232,884,1010,-268,-16,2,-160,20,-142,-124/ C 1 T(6,1,2,7,5,3,4) - DATA (CF(I, 75),I= 1, 6) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01, - $ -2.191358024691358D-01/ - DATA (CF(I, 75),I= 7, 12) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,1.975308641975309D-01, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I, 75),I= 13, 18) /1.975308641975309D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 75),I= 19, 24) /8.641975308641975D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I, 75),I= 25, 30) /1.530864197530864D+00, - $ -1.913580246913580D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02,-1.635802469135803D-01 - $ ,5.864197530864197D-02/ - DATA (CF(I, 75),I= 31, 36) /-6.913580246913580D-01 - $ ,8.641975308641975D-02,1.530864197530864D+00, - $ -1.913580246913580D-01,-1.358024691358025D-01, - $ -4.135802469135803D-01/ - DATA (CF(I, 75),I= 37, 42) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01/ - DATA (CF(I, 75),I= 43, 48) /1.364197530864198D+00, - $ -4.135802469135803D-01,-3.580246913580247D-01 - $ ,1.364197530864198D+00,1.558641975308642D+00, - $ -4.135802469135803D-01/ - DATA (CF(I, 75),I= 49, 54) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,1.975308641975309D+00, - $ -2.469135802469136D-01,3.086419753086420D-01,3.086419753086420D - $ -02/ - DATA (CF(I, 75),I= 55, 60) /1.530864197530864D+00, - $ -1.913580246913580D-01,1.753086419753086D+00, - $ -2.191358024691358D-01,1.586419753086420D+00,1.558641975308642D - $ +00/ - DATA (CF(I, 75),I= 61, 66) /1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I, 75),I= 67, 72) /-1.635802469135803D-01, - $ -1.913580246913580D-01,-1.358024691358025D-01, - $ -4.135802469135803D-01,-2.191358024691358D-01 - $ ,5.864197530864197D-02/ - DATA (CF(I, 75),I= 73, 78) /-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.264197530864197D+01, - $ -1.580246913580247D+00,1.975308641975309D+00,1.975308641975309D - $ -01/ - DATA (CF(I, 75),I= 79, 84) /1.975308641975309D-01, - $ -2.469135802469136D-02,1.975308641975309D+00, - $ -2.469135802469136D-01,1.753086419753086D+00,1.530864197530864D - $ +00/ - DATA (CF(I, 75),I= 85, 90) /-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 75),I= 91, 96) /-2.469135802469136D-01, - $ -2.469135802469136D-02,1.530864197530864D+00, - $ -6.913580246913580D-01,-2.469135802469136D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 75),I= 97,102) /-1.358024691358025D-01, - $ -1.635802469135803D-01,1.586419753086420D+00, - $ -1.913580246913580D-01,3.086419753086420D-01,3.086419753086420D - $ -02/ - DATA (CF(I, 75),I=103,108) /-3.580246913580247D-01, - $ -1.358024691358025D-01,4.197530864197531D-01, - $ -3.580246913580247D-01,1.586419753086420D+00, - $ -1.358024691358025D-01/ - DATA (CF(I, 75),I=109,114) /-1.358024691358025D-01 - $ ,8.641975308641975D-02,-3.580246913580247D-01 - $ ,1.364197530864198D+00,-1.913580246913580D-01, - $ -1.635802469135803D-01/ - DATA (CF(I, 75),I=115,120) /3.086419753086420D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02, - $ -1.913580246913580D-01/ + DATA (CF(I),I=6180,6225) /4096,-1024,1280,128,128,-16,1280,-160 + $ ,1136,992,-1024,128,128,-16,-16,-160,-160,-16,992,-448,-160,992 + $ ,-88,-106,1028,-124,200,20,-232,-88,272,-232,1028,-88,-88,56, + $ -232,884,-124,-106,20,2,-124,56,20,-124/ C 1 T(6,1,5,2,7,3,4) - DATA (CF(I, 76),I= 1, 6) /3.086419753086420D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02,8.641975308641975D-02,-1.913580246913580D-01/ - DATA (CF(I, 76),I= 7, 12) /3.086419753086420D-03 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I, 76),I= 13, 18) /-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 76),I= 19, 24) /-1.913580246913580D-01, - $ -2.191358024691358D-01,3.086419753086420D-02, - $ -2.469135802469136D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I, 76),I= 25, 30) /-1.913580246913580D-01 - $ ,1.586419753086420D+00,3.086419753086420D-02,3.086419753086420D - $ -01,-1.358024691358025D-01,-1.635802469135803D-01/ - DATA (CF(I, 76),I= 31, 36) /8.641975308641975D-02, - $ -1.358024691358025D-01,-1.913580246913580D-01, - $ -1.635802469135803D-01,-3.580246913580247D-01 - $ ,1.364197530864198D+00/ - DATA (CF(I, 76),I= 37, 42) /3.086419753086420D-03 - $ ,3.086419753086420D-02,3.086419753086420D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 76),I= 43, 48) /-3.580246913580247D-01, - $ -1.358024691358025D-01,4.197530864197531D-01, - $ -3.580246913580247D-01,1.586419753086420D+00, - $ -1.358024691358025D-01/ - DATA (CF(I, 76),I= 49, 54) /3.086419753086420D-02 - $ ,3.086419753086420D-01,-2.469135802469136D-01 - $ ,1.975308641975309D+00,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 76),I= 55, 60) /-1.913580246913580D-01, - $ -1.635802469135803D-01,-2.191358024691358D-01 - $ ,5.864197530864197D-02,-1.358024691358025D-01, - $ -4.135802469135803D-01/ - DATA (CF(I, 76),I= 61, 66) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03,3.086419753086420D - $ -02,-2.469135802469136D-02,3.086419753086420D-03/ - DATA (CF(I, 76),I= 67, 72) /-1.913580246913580D-01 - $ ,1.530864197530864D+00,1.586419753086420D+00,1.558641975308642D - $ +00,1.753086419753086D+00,-2.191358024691358D-01/ - DATA (CF(I, 76),I= 73, 78) /1.975308641975309D-01 - $ ,1.975308641975309D+00,-1.580246913580247D+00 - $ ,1.264197530864197D+01,1.975308641975309D-01, - $ -1.580246913580247D+00/ - DATA (CF(I, 76),I= 79, 84) /-2.469135802469136D-02, - $ -2.469135802469136D-01,-2.469135802469136D-01 - $ ,1.530864197530864D+00,1.530864197530864D+00, - $ -6.913580246913580D-01/ - DATA (CF(I, 76),I= 85, 90) /1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 76),I= 91, 96) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,1.753086419753086D+00,1.530864197530864D - $ +00,1.975308641975309D+00,-2.469135802469136D-01/ - DATA (CF(I, 76),I= 97,102) /-1.635802469135803D-01 - $ ,5.864197530864197D-02,-1.913580246913580D-01 - $ ,1.530864197530864D+00,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 76),I=103,108) /1.364197530864198D+00, - $ -4.135802469135803D-01,-3.580246913580247D-01 - $ ,1.364197530864198D+00,1.558641975308642D+00, - $ -4.135802469135803D-01/ - DATA (CF(I, 76),I=109,114) /8.641975308641975D-02, - $ -6.913580246913580D-01,-1.358024691358025D-01, - $ -4.135802469135803D-01,1.530864197530864D+00, - $ -1.913580246913580D-01/ - DATA (CF(I, 76),I=115,120) /3.086419753086420D-03, - $ -2.469135802469136D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02/ + DATA (CF(I),I=6226,6270) /4096,128,-1024,-16,-160,-160,992,992, + $ -448,128,-1024,-16,-160,128,-16,-16,128,1136,992,1280,-160,-106 + $ ,38,-124,992,20,-160,884,-268,-232,884,1010,-268,56,-448,-88, + $ -268,992,-124,2,-16,-142,-124,-160,20/ C 1 T(6,1,5,7,2,3,4) - DATA (CF(I, 77),I= 1, 6) /-2.191358024691358D-01, - $ -1.913580246913580D-01,3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 77),I= 7, 12) /-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02,3.086419753086420D - $ -03,-1.913580246913580D-01,3.086419753086420D-02/ - DATA (CF(I, 77),I= 13, 18) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01/ - DATA (CF(I, 77),I= 19, 24) /3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03,1.975308641975309D-01,-2.469135802469136D-02/ - DATA (CF(I, 77),I= 25, 30) /5.864197530864197D-02, - $ -1.635802469135803D-01,3.086419753086420D-02, - $ -2.469135802469136D-01,-1.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 77),I= 31, 36) /-4.135802469135803D-01 - $ ,1.364197530864198D+00,1.558641975308642D+00, - $ -4.135802469135803D-01,-3.580246913580247D-01 - $ ,1.364197530864198D+00/ - DATA (CF(I, 77),I= 37, 42) /3.086419753086420D-03, - $ -2.469135802469136D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02/ - DATA (CF(I, 77),I= 43, 48) /8.641975308641975D-02, - $ -6.913580246913580D-01,-1.358024691358025D-01, - $ -4.135802469135803D-01,1.530864197530864D+00, - $ -1.913580246913580D-01/ - DATA (CF(I, 77),I= 49, 54) /-1.635802469135803D-01, - $ -1.358024691358025D-01,3.086419753086420D-01,3.086419753086420D - $ -02,1.586419753086420D+00,-1.913580246913580D-01/ - DATA (CF(I, 77),I= 55, 60) /-1.358024691358025D-01, - $ -3.580246913580247D-01,1.586419753086420D+00, - $ -1.358024691358025D-01,4.197530864197531D-01, - $ -3.580246913580247D-01/ - DATA (CF(I, 77),I= 61, 66) /3.086419753086420D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02, - $ -1.913580246913580D-01/ - DATA (CF(I, 77),I= 67, 72) /-1.358024691358025D-01 - $ ,8.641975308641975D-02,-3.580246913580247D-01 - $ ,1.364197530864198D+00,-1.913580246913580D-01, - $ -1.635802469135803D-01/ - DATA (CF(I, 77),I= 73, 78) /1.975308641975309D-01, - $ -1.580246913580247D+00,1.975308641975309D+00,1.975308641975309D - $ -01,1.264197530864197D+01,-1.580246913580247D+00/ - DATA (CF(I, 77),I= 79, 84) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,1.753086419753086D+00,1.530864197530864D - $ +00,1.975308641975309D+00,-2.469135802469136D-01/ - DATA (CF(I, 77),I= 85, 90) /-2.469135802469136D-01, - $ -2.469135802469136D-02,1.530864197530864D+00, - $ -6.913580246913580D-01,-2.469135802469136D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 77),I= 91, 96) /-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 77),I= 97,102) /3.086419753086420D-02, - $ -2.469135802469136D-01,3.086419753086420D-01,3.086419753086420D - $ -02,1.975308641975309D+00,-2.469135802469136D-01/ - DATA (CF(I, 77),I=103,108) /-1.913580246913580D-01 - $ ,1.530864197530864D+00,1.586419753086420D+00,1.558641975308642D - $ +00,1.753086419753086D+00,-2.191358024691358D-01/ - DATA (CF(I, 77),I=109,114) /-1.635802469135803D-01, - $ -1.913580246913580D-01,-1.358024691358025D-01, - $ -4.135802469135803D-01,-2.191358024691358D-01 - $ ,5.864197530864197D-02/ - DATA (CF(I, 77),I=115,120) /1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03,3.086419753086420D - $ -02/ + DATA (CF(I),I=6271,6314) /4096,-1024,-16,128,1136,992,1280,-160, + $ -160,-16,992,-448,-160,992,-1024,128,128,-16,-16,-160,20,-160 + $ ,200,20,1280,-160,-124,992,1028,1010,1136,-142,-106,-124,-88, + $ -268,-142,38,128,-16,-16,2,2,20/ C 1 T(6,1,7,2,5,3,4) - DATA (CF(I, 78),I= 1, 6) /-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02,3.086419753086420D - $ -03,-1.913580246913580D-01,3.086419753086420D-02/ - DATA (CF(I, 78),I= 7, 12) /-2.191358024691358D-01, - $ -1.913580246913580D-01,3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 78),I= 13, 18) /-2.469135802469136D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -1.580246913580247D+00/ - DATA (CF(I, 78),I= 19, 24) /3.086419753086420D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 78),I= 25, 30) /-1.635802469135803D-01, - $ -1.358024691358025D-01,3.086419753086420D-01,3.086419753086420D - $ -02,1.586419753086420D+00,-1.913580246913580D-01/ - DATA (CF(I, 78),I= 31, 36) /-1.358024691358025D-01, - $ -3.580246913580247D-01,1.586419753086420D+00, - $ -1.358024691358025D-01,4.197530864197531D-01, - $ -3.580246913580247D-01/ - DATA (CF(I, 78),I= 37, 42) /3.086419753086420D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02, - $ -1.913580246913580D-01/ - DATA (CF(I, 78),I= 43, 48) /-1.358024691358025D-01 - $ ,8.641975308641975D-02,-3.580246913580247D-01 - $ ,1.364197530864198D+00,-1.913580246913580D-01, - $ -1.635802469135803D-01/ - DATA (CF(I, 78),I= 49, 54) /5.864197530864197D-02, - $ -1.635802469135803D-01,3.086419753086420D-02, - $ -2.469135802469136D-01,-1.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 78),I= 55, 60) /-4.135802469135803D-01 - $ ,1.364197530864198D+00,1.558641975308642D+00, - $ -4.135802469135803D-01,-3.580246913580247D-01 - $ ,1.364197530864198D+00/ - DATA (CF(I, 78),I= 61, 66) /3.086419753086420D-03, - $ -2.469135802469136D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02/ - DATA (CF(I, 78),I= 67, 72) /8.641975308641975D-02, - $ -6.913580246913580D-01,-1.358024691358025D-01, - $ -4.135802469135803D-01,1.530864197530864D+00, - $ -1.913580246913580D-01/ - DATA (CF(I, 78),I= 73, 78) /1.975308641975309D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -1.580246913580247D+00,-1.580246913580247D+00 - $ ,1.264197530864197D+01/ - DATA (CF(I, 78),I= 79, 84) /-2.469135802469136D-01, - $ -2.469135802469136D-02,1.530864197530864D+00, - $ -6.913580246913580D-01,-2.469135802469136D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 78),I= 85, 90) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,1.753086419753086D+00,1.530864197530864D - $ +00,1.975308641975309D+00,-2.469135802469136D-01/ - DATA (CF(I, 78),I= 91, 96) /1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 78),I= 97,102) /3.086419753086420D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02, - $ -2.469135802469136D-01,-2.469135802469136D-01 - $ ,1.975308641975309D+00/ - DATA (CF(I, 78),I=103,108) /-1.635802469135803D-01, - $ -1.913580246913580D-01,-1.358024691358025D-01, - $ -4.135802469135803D-01,-2.191358024691358D-01 - $ ,5.864197530864197D-02/ - DATA (CF(I, 78),I=109,114) /-1.913580246913580D-01 - $ ,1.530864197530864D+00,1.586419753086420D+00,1.558641975308642D - $ +00,1.753086419753086D+00,-2.191358024691358D-01/ - DATA (CF(I, 78),I=115,120) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03,3.086419753086420D - $ -02,-2.469135802469136D-02,3.086419753086420D-03/ + DATA (CF(I),I=6315,6357) /4096,-160,-16,992,-448,-160,992,-16 + $ ,128,1136,992,1280,-160,128,-1024,-16,-160,128,-16,200,20,20, + $ -160,-160,1280,-106,-124,-88,-268,-142,38,-124,992,1028,1010 + $ ,1136,-142,-16,128,2,20,-16,2/ C 1 T(6,1,7,5,2,3,4) - DATA (CF(I, 79),I= 1, 6) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,1.975308641975309D+00, - $ -2.469135802469136D-01,3.086419753086420D-01,3.086419753086420D - $ -02/ - DATA (CF(I, 79),I= 7, 12) /1.530864197530864D+00, - $ -1.913580246913580D-01,1.753086419753086D+00, - $ -2.191358024691358D-01,1.586419753086420D+00,1.558641975308642D - $ +00/ - DATA (CF(I, 79),I= 13, 18) /1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I, 79),I= 19, 24) /-1.635802469135803D-01, - $ -1.913580246913580D-01,-1.358024691358025D-01, - $ -4.135802469135803D-01,-2.191358024691358D-01 - $ ,5.864197530864197D-02/ - DATA (CF(I, 79),I= 25, 30) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,1.975308641975309D-01, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I, 79),I= 31, 36) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01, - $ -2.191358024691358D-01/ - DATA (CF(I, 79),I= 37, 42) /-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 79),I= 43, 48) /-1.913580246913580D-01 - $ ,3.086419753086420D-02,8.641975308641975D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I, 79),I= 49, 54) /-6.913580246913580D-01 - $ ,8.641975308641975D-02,1.530864197530864D+00, - $ -1.913580246913580D-01,-1.358024691358025D-01, - $ -4.135802469135803D-01/ - DATA (CF(I, 79),I= 55, 60) /1.530864197530864D+00, - $ -1.913580246913580D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02,-1.635802469135803D-01 - $ ,5.864197530864197D-02/ - DATA (CF(I, 79),I= 61, 66) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01, - $ -2.191358024691358D-01/ - DATA (CF(I, 79),I= 67, 72) /-3.580246913580247D-01 - $ ,1.364197530864198D+00,1.364197530864198D+00, - $ -4.135802469135803D-01,-4.135802469135803D-01 - $ ,1.558641975308642D+00/ - DATA (CF(I, 79),I= 73, 78) /-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 79),I= 79, 84) /1.264197530864197D+01, - $ -1.580246913580247D+00,-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01,1.975308641975309D - $ +00/ - DATA (CF(I, 79),I= 85, 90) /1.975308641975309D+00, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -2.469135802469136D-02,1.530864197530864D+00,1.753086419753086D - $ +00/ - DATA (CF(I, 79),I= 91, 96) /-2.469135802469136D-01 - $ ,1.530864197530864D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01,-6.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 79),I= 97,102) /-1.358024691358025D-01 - $ ,8.641975308641975D-02,-3.580246913580247D-01 - $ ,1.364197530864198D+00,-1.913580246913580D-01, - $ -1.635802469135803D-01/ - DATA (CF(I, 79),I=103,108) /1.586419753086420D+00, - $ -1.913580246913580D-01,-1.358024691358025D-01, - $ -1.635802469135803D-01,3.086419753086420D-02,3.086419753086420D - $ -01/ - DATA (CF(I, 79),I=109,114) /4.197530864197531D-01, - $ -3.580246913580247D-01,-3.580246913580247D-01, - $ -1.358024691358025D-01,-1.358024691358025D-01 - $ ,1.586419753086420D+00/ - DATA (CF(I, 79),I=115,120) /3.086419753086420D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02,8.641975308641975D-02,-1.913580246913580D-01/ + DATA (CF(I),I=6358,6399) /4096,-1024,-1024,128,128,1280,1280, + $ -160,128,-16,992,1136,-160,992,-16,-160,-448,992,-88,56,-232 + $ ,884,-124,-106,1028,-124,-88,-106,20,200,272,-232,-232,-88,-88 + $ ,1028,20,-124,2,20,56,-124/ C 1 T(6,2,1,5,7,3,4) - DATA (CF(I, 80),I= 1, 6) /3.086419753086420D-02 - $ ,3.086419753086420D-01,-2.469135802469136D-01 - $ ,1.975308641975309D+00,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 80),I= 7, 12) /-1.913580246913580D-01, - $ -1.635802469135803D-01,-2.191358024691358D-01 - $ ,5.864197530864197D-02,-1.358024691358025D-01, - $ -4.135802469135803D-01/ - DATA (CF(I, 80),I= 13, 18) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03,3.086419753086420D - $ -02,-2.469135802469136D-02,3.086419753086420D-03/ - DATA (CF(I, 80),I= 19, 24) /-1.913580246913580D-01 - $ ,1.530864197530864D+00,1.586419753086420D+00,1.558641975308642D - $ +00,1.753086419753086D+00,-2.191358024691358D-01/ - DATA (CF(I, 80),I= 25, 30) /3.086419753086420D-03 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I, 80),I= 31, 36) /3.086419753086420D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02,8.641975308641975D-02,-1.913580246913580D-01/ - DATA (CF(I, 80),I= 37, 42) /1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 80),I= 43, 48) /3.086419753086420D-02, - $ -2.469135802469136D-01,-1.913580246913580D-01, - $ -2.191358024691358D-01,-2.469135802469136D-02 - $ ,3.086419753086420D-03/ - DATA (CF(I, 80),I= 49, 54) /8.641975308641975D-02, - $ -1.358024691358025D-01,-1.913580246913580D-01, - $ -1.635802469135803D-01,-3.580246913580247D-01 - $ ,1.364197530864198D+00/ - DATA (CF(I, 80),I= 55, 60) /-1.913580246913580D-01 - $ ,1.586419753086420D+00,3.086419753086420D-02,3.086419753086420D - $ -01,-1.358024691358025D-01,-1.635802469135803D-01/ - DATA (CF(I, 80),I= 61, 66) /3.086419753086420D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02,8.641975308641975D-02,-1.913580246913580D-01/ - DATA (CF(I, 80),I= 67, 72) /4.197530864197531D-01, - $ -3.580246913580247D-01,-3.580246913580247D-01, - $ -1.358024691358025D-01,-1.358024691358025D-01 - $ ,1.586419753086420D+00/ - DATA (CF(I, 80),I= 73, 78) /1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 80),I= 79, 84) /-1.580246913580247D+00 - $ ,1.264197530864197D+01,1.975308641975309D-01,1.975308641975309D - $ +00,-1.580246913580247D+00,1.975308641975309D-01/ - DATA (CF(I, 80),I= 85, 90) /-2.469135802469136D-01 - $ ,1.530864197530864D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01,-6.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 80),I= 91, 96) /1.975308641975309D+00, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -2.469135802469136D-02,1.530864197530864D+00,1.753086419753086D - $ +00/ - DATA (CF(I, 80),I= 97,102) /8.641975308641975D-02, - $ -6.913580246913580D-01,-1.358024691358025D-01, - $ -4.135802469135803D-01,1.530864197530864D+00, - $ -1.913580246913580D-01/ - DATA (CF(I, 80),I=103,108) /-1.913580246913580D-01 - $ ,1.530864197530864D+00,-1.635802469135803D-01 - $ ,5.864197530864197D-02,-2.469135802469136D-01 - $ ,3.086419753086420D-02/ - DATA (CF(I, 80),I=109,114) /-3.580246913580247D-01 - $ ,1.364197530864198D+00,1.364197530864198D+00, - $ -4.135802469135803D-01,-4.135802469135803D-01 - $ ,1.558641975308642D+00/ - DATA (CF(I, 80),I=115,120) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01, - $ -2.191358024691358D-01/ + DATA (CF(I),I=6400,6440) /4096,128,1280,-1024,128,-160,992,-16, + $ -160,-448,992,1280,-160,128,-16,992,1136,56,-448,-88,-268,992, + $ -124,-124,992,-106,38,-160,20,-232,884,884,-268,-268,1010,-160 + $ ,20,-16,2,-124,-142/ C 1 T(6,2,1,7,5,3,4) - DATA (CF(I, 81),I= 1, 6) /1.530864197530864D+00, - $ -1.913580246913580D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02,-1.635802469135803D-01 - $ ,5.864197530864197D-02/ - DATA (CF(I, 81),I= 7, 12) /-6.913580246913580D-01 - $ ,8.641975308641975D-02,1.530864197530864D+00, - $ -1.913580246913580D-01,-1.358024691358025D-01, - $ -4.135802469135803D-01/ - DATA (CF(I, 81),I= 13, 18) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01/ - DATA (CF(I, 81),I= 19, 24) /1.364197530864198D+00, - $ -4.135802469135803D-01,-3.580246913580247D-01 - $ ,1.364197530864198D+00,1.558641975308642D+00, - $ -4.135802469135803D-01/ - DATA (CF(I, 81),I= 25, 30) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01, - $ -2.191358024691358D-01/ - DATA (CF(I, 81),I= 31, 36) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,1.975308641975309D-01, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I, 81),I= 37, 42) /1.975308641975309D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 81),I= 43, 48) /8.641975308641975D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I, 81),I= 49, 54) /1.530864197530864D+00, - $ -1.913580246913580D-01,1.753086419753086D+00, - $ -2.191358024691358D-01,1.586419753086420D+00,1.558641975308642D - $ +00/ - DATA (CF(I, 81),I= 55, 60) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,1.975308641975309D+00, - $ -2.469135802469136D-01,3.086419753086420D-01,3.086419753086420D - $ -02/ - DATA (CF(I, 81),I= 61, 66) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,1.975308641975309D-01, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I, 81),I= 67, 72) /-1.358024691358025D-01, - $ -4.135802469135803D-01,-1.635802469135803D-01, - $ -1.913580246913580D-01,5.864197530864197D-02, - $ -2.191358024691358D-01/ - DATA (CF(I, 81),I= 73, 78) /1.975308641975309D-01, - $ -2.469135802469136D-02,1.975308641975309D+00, - $ -2.469135802469136D-01,1.753086419753086D+00,1.530864197530864D - $ +00/ - DATA (CF(I, 81),I= 79, 84) /-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.264197530864197D+01, - $ -1.580246913580247D+00,1.975308641975309D+00,1.975308641975309D - $ -01/ - DATA (CF(I, 81),I= 85, 90) /1.975308641975309D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 81),I= 91, 96) /1.530864197530864D+00, - $ -6.913580246913580D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02,1.530864197530864D+00, - $ -2.469135802469136D-01/ - DATA (CF(I, 81),I= 97,102) /-3.580246913580247D-01, - $ -1.358024691358025D-01,4.197530864197531D-01, - $ -3.580246913580247D-01,1.586419753086420D+00, - $ -1.358024691358025D-01/ - DATA (CF(I, 81),I=103,108) /-1.358024691358025D-01, - $ -1.635802469135803D-01,1.586419753086420D+00, - $ -1.913580246913580D-01,3.086419753086420D-01,3.086419753086420D - $ -02/ - DATA (CF(I, 81),I=109,114) /-3.580246913580247D-01 - $ ,1.364197530864198D+00,-1.358024691358025D-01 - $ ,8.641975308641975D-02,-1.635802469135803D-01, - $ -1.913580246913580D-01/ - DATA (CF(I, 81),I=115,120) /-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02,3.086419753086420D - $ -03,-1.913580246913580D-01,3.086419753086420D-02/ + DATA (CF(I),I=6441,6480) /4096,-1024,1280,128,128,-16,-1024,128, + $ -160,-16,992,-448,-160,-16,992,-160,-232,-88,272,-232,1028,-88, + $ -88,-106,1028,-124,200,20,-232,884,-88,56,-106,-124,-124,56,20 + $ ,2,-124,20/ C 1 T(6,2,5,1,7,3,4) - DATA (CF(I, 82),I= 1, 6) /-1.913580246913580D-01 - $ ,1.586419753086420D+00,3.086419753086420D-02,3.086419753086420D - $ -01,-1.358024691358025D-01,-1.635802469135803D-01/ - DATA (CF(I, 82),I= 7, 12) /8.641975308641975D-02, - $ -1.358024691358025D-01,-1.913580246913580D-01, - $ -1.635802469135803D-01,-3.580246913580247D-01 - $ ,1.364197530864198D+00/ - DATA (CF(I, 82),I= 13, 18) /3.086419753086420D-03 - $ ,3.086419753086420D-02,3.086419753086420D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 82),I= 19, 24) /-3.580246913580247D-01, - $ -1.358024691358025D-01,4.197530864197531D-01, - $ -3.580246913580247D-01,1.586419753086420D+00, - $ -1.358024691358025D-01/ - DATA (CF(I, 82),I= 25, 30) /3.086419753086420D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02,8.641975308641975D-02,-1.913580246913580D-01/ - DATA (CF(I, 82),I= 31, 36) /3.086419753086420D-03 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I, 82),I= 37, 42) /-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 82),I= 43, 48) /-1.913580246913580D-01, - $ -2.191358024691358D-01,3.086419753086420D-02, - $ -2.469135802469136D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I, 82),I= 49, 54) /-1.913580246913580D-01, - $ -1.635802469135803D-01,-2.191358024691358D-01 - $ ,5.864197530864197D-02,-1.358024691358025D-01, - $ -4.135802469135803D-01/ - DATA (CF(I, 82),I= 55, 60) /3.086419753086420D-02 - $ ,3.086419753086420D-01,-2.469135802469136D-01 - $ ,1.975308641975309D+00,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 82),I= 61, 66) /3.086419753086420D-03 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I, 82),I= 67, 72) /1.586419753086420D+00 - $ ,1.558641975308642D+00,-1.913580246913580D-01 - $ ,1.530864197530864D+00,-2.191358024691358D-01 - $ ,1.753086419753086D+00/ - DATA (CF(I, 82),I= 73, 78) /-2.469135802469136D-02, - $ -2.469135802469136D-01,-2.469135802469136D-01 - $ ,1.530864197530864D+00,1.530864197530864D+00, - $ -6.913580246913580D-01/ - DATA (CF(I, 82),I= 79, 84) /1.975308641975309D-01 - $ ,1.975308641975309D+00,-1.580246913580247D+00 - $ ,1.264197530864197D+01,1.975308641975309D-01, - $ -1.580246913580247D+00/ - DATA (CF(I, 82),I= 85, 90) /-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 82),I= 91, 96) /1.753086419753086D+00 - $ ,1.530864197530864D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01,-2.469135802469136D-01 - $ ,1.975308641975309D+00/ - DATA (CF(I, 82),I= 97,102) /1.364197530864198D+00, - $ -4.135802469135803D-01,-3.580246913580247D-01 - $ ,1.364197530864198D+00,1.558641975308642D+00, - $ -4.135802469135803D-01/ - DATA (CF(I, 82),I=103,108) /-1.635802469135803D-01 - $ ,5.864197530864197D-02,-1.913580246913580D-01 - $ ,1.530864197530864D+00,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 82),I=109,114) /-1.358024691358025D-01, - $ -4.135802469135803D-01,8.641975308641975D-02, - $ -6.913580246913580D-01,-1.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 82),I=115,120) /-2.191358024691358D-01, - $ -1.913580246913580D-01,3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02, - $ -2.469135802469136D-01/ + DATA (CF(I),I=6481,6519) /4096,128,-1024,-16,-160,128,-1024,-16 + $ ,128,1136,992,-16,128,-160,1280,884,-268,-232,884,1010,-268, + $ -106,38,-124,992,20,-160,-88,-268,56,-448,-124,992,-142,-124,2, + $ -16,20,-160/ C 1 T(6,2,5,7,1,3,4) - DATA (CF(I, 83),I= 1, 6) /5.864197530864197D-02, - $ -1.635802469135803D-01,3.086419753086420D-02, - $ -2.469135802469136D-01,-1.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 83),I= 7, 12) /-4.135802469135803D-01 - $ ,1.364197530864198D+00,1.558641975308642D+00, - $ -4.135802469135803D-01,-3.580246913580247D-01 - $ ,1.364197530864198D+00/ - DATA (CF(I, 83),I= 13, 18) /3.086419753086420D-03, - $ -2.469135802469136D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02/ - DATA (CF(I, 83),I= 19, 24) /8.641975308641975D-02, - $ -6.913580246913580D-01,-1.358024691358025D-01, - $ -4.135802469135803D-01,1.530864197530864D+00, - $ -1.913580246913580D-01/ - DATA (CF(I, 83),I= 25, 30) /-2.191358024691358D-01, - $ -1.913580246913580D-01,3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 83),I= 31, 36) /-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02,3.086419753086420D - $ -03,-1.913580246913580D-01,3.086419753086420D-02/ - DATA (CF(I, 83),I= 37, 42) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01/ - DATA (CF(I, 83),I= 43, 48) /3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03,1.975308641975309D-01,-2.469135802469136D-02/ - DATA (CF(I, 83),I= 49, 54) /-1.358024691358025D-01, - $ -3.580246913580247D-01,1.586419753086420D+00, - $ -1.358024691358025D-01,4.197530864197531D-01, - $ -3.580246913580247D-01/ - DATA (CF(I, 83),I= 55, 60) /-1.635802469135803D-01, - $ -1.358024691358025D-01,3.086419753086420D-01,3.086419753086420D - $ -02,1.586419753086420D+00,-1.913580246913580D-01/ - DATA (CF(I, 83),I= 61, 66) /-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02,3.086419753086420D - $ -03,-1.913580246913580D-01,3.086419753086420D-02/ - DATA (CF(I, 83),I= 67, 72) /-3.580246913580247D-01 - $ ,1.364197530864198D+00,-1.358024691358025D-01 - $ ,8.641975308641975D-02,-1.635802469135803D-01, - $ -1.913580246913580D-01/ - DATA (CF(I, 83),I= 73, 78) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,1.753086419753086D+00,1.530864197530864D - $ +00,1.975308641975309D+00,-2.469135802469136D-01/ - DATA (CF(I, 83),I= 79, 84) /1.975308641975309D-01, - $ -1.580246913580247D+00,1.975308641975309D+00,1.975308641975309D - $ -01,1.264197530864197D+01,-1.580246913580247D+00/ - DATA (CF(I, 83),I= 85, 90) /1.530864197530864D+00, - $ -6.913580246913580D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02,1.530864197530864D+00, - $ -2.469135802469136D-01/ - DATA (CF(I, 83),I= 91, 96) /1.975308641975309D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 83),I= 97,102) /-1.913580246913580D-01 - $ ,1.530864197530864D+00,1.586419753086420D+00,1.558641975308642D - $ +00,1.753086419753086D+00,-2.191358024691358D-01/ - DATA (CF(I, 83),I=103,108) /3.086419753086420D-02, - $ -2.469135802469136D-01,3.086419753086420D-01,3.086419753086420D - $ -02,1.975308641975309D+00,-2.469135802469136D-01/ - DATA (CF(I, 83),I=109,114) /-1.358024691358025D-01, - $ -4.135802469135803D-01,-1.635802469135803D-01, - $ -1.913580246913580D-01,5.864197530864197D-02, - $ -2.191358024691358D-01/ - DATA (CF(I, 83),I=115,120) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,1.975308641975309D-01, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ + DATA (CF(I),I=6520,6557) /4096,-1024,992,-448,-160,-16,992,-160 + $ ,128,-16,-1024,128,-160,-16,-124,992,1028,1010,1136,-142,20, + $ -160,200,20,1280,-160,-88,-268,-106,-124,38,-142,-16,2,128,-16 + $ ,20,2/ C 1 T(6,2,7,1,5,3,4) - DATA (CF(I, 84),I= 1, 6) /-1.635802469135803D-01, - $ -1.358024691358025D-01,3.086419753086420D-01,3.086419753086420D - $ -02,1.586419753086420D+00,-1.913580246913580D-01/ - DATA (CF(I, 84),I= 7, 12) /-1.358024691358025D-01, - $ -3.580246913580247D-01,1.586419753086420D+00, - $ -1.358024691358025D-01,4.197530864197531D-01, - $ -3.580246913580247D-01/ - DATA (CF(I, 84),I= 13, 18) /3.086419753086420D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02, - $ -1.913580246913580D-01/ - DATA (CF(I, 84),I= 19, 24) /-1.358024691358025D-01 - $ ,8.641975308641975D-02,-3.580246913580247D-01 - $ ,1.364197530864198D+00,-1.913580246913580D-01, - $ -1.635802469135803D-01/ - DATA (CF(I, 84),I= 25, 30) /-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02,3.086419753086420D - $ -03,-1.913580246913580D-01,3.086419753086420D-02/ - DATA (CF(I, 84),I= 31, 36) /-2.191358024691358D-01, - $ -1.913580246913580D-01,3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 84),I= 37, 42) /-2.469135802469136D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -1.580246913580247D+00/ - DATA (CF(I, 84),I= 43, 48) /3.086419753086420D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 84),I= 49, 54) /-4.135802469135803D-01 - $ ,1.364197530864198D+00,1.558641975308642D+00, - $ -4.135802469135803D-01,-3.580246913580247D-01 - $ ,1.364197530864198D+00/ - DATA (CF(I, 84),I= 55, 60) /5.864197530864197D-02, - $ -1.635802469135803D-01,3.086419753086420D-02, - $ -2.469135802469136D-01,-1.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 84),I= 61, 66) /-2.191358024691358D-01, - $ -1.913580246913580D-01,3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 84),I= 67, 72) /-1.358024691358025D-01, - $ -4.135802469135803D-01,8.641975308641975D-02, - $ -6.913580246913580D-01,-1.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 84),I= 73, 78) /-2.469135802469136D-01, - $ -2.469135802469136D-02,1.530864197530864D+00, - $ -6.913580246913580D-01,-2.469135802469136D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 84),I= 79, 84) /1.975308641975309D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -1.580246913580247D+00,-1.580246913580247D+00 - $ ,1.264197530864197D+01/ - DATA (CF(I, 84),I= 85, 90) /1.753086419753086D+00 - $ ,1.530864197530864D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01,-2.469135802469136D-01 - $ ,1.975308641975309D+00/ - DATA (CF(I, 84),I= 91, 96) /-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 84),I= 97,102) /-1.635802469135803D-01, - $ -1.913580246913580D-01,-1.358024691358025D-01, - $ -4.135802469135803D-01,-2.191358024691358D-01 - $ ,5.864197530864197D-02/ - DATA (CF(I, 84),I=103,108) /3.086419753086420D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02, - $ -2.469135802469136D-01,-2.469135802469136D-01 - $ ,1.975308641975309D+00/ - DATA (CF(I, 84),I=109,114) /1.586419753086420D+00 - $ ,1.558641975308642D+00,-1.913580246913580D-01 - $ ,1.530864197530864D+00,-2.191358024691358D-01 - $ ,1.753086419753086D+00/ - DATA (CF(I, 84),I=115,120) /3.086419753086420D-03 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ + DATA (CF(I),I=6558,6594) /4096,1136,992,-16,128,-160,1280,-16, + $ -160,128,-1024,-16,128,-106,-124,-88,-268,-142,38,200,20,20, + $ -160,-160,1280,1028,1010,-124,992,-142,1136,2,20,-16,128,2,-16/ C 1 T(6,2,7,5,1,3,4) - DATA (CF(I, 85),I= 1, 6) /1.530864197530864D+00, - $ -1.913580246913580D-01,1.753086419753086D+00, - $ -2.191358024691358D-01,1.586419753086420D+00,1.558641975308642D - $ +00/ - DATA (CF(I, 85),I= 7, 12) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,1.975308641975309D+00, - $ -2.469135802469136D-01,3.086419753086420D-01,3.086419753086420D - $ -02/ - DATA (CF(I, 85),I= 13, 18) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,1.975308641975309D-01, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I, 85),I= 19, 24) /-1.358024691358025D-01, - $ -4.135802469135803D-01,-1.635802469135803D-01, - $ -1.913580246913580D-01,5.864197530864197D-02, - $ -2.191358024691358D-01/ - DATA (CF(I, 85),I= 25, 30) /-6.913580246913580D-01 - $ ,8.641975308641975D-02,1.530864197530864D+00, - $ -1.913580246913580D-01,-1.358024691358025D-01, - $ -4.135802469135803D-01/ - DATA (CF(I, 85),I= 31, 36) /1.530864197530864D+00, - $ -1.913580246913580D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02,-1.635802469135803D-01 - $ ,5.864197530864197D-02/ - DATA (CF(I, 85),I= 37, 42) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01, - $ -2.191358024691358D-01/ - DATA (CF(I, 85),I= 43, 48) /-3.580246913580247D-01 - $ ,1.364197530864198D+00,1.364197530864198D+00, - $ -4.135802469135803D-01,-4.135802469135803D-01 - $ ,1.558641975308642D+00/ - DATA (CF(I, 85),I= 49, 54) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,1.975308641975309D-01, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I, 85),I= 55, 60) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01, - $ -2.191358024691358D-01/ - DATA (CF(I, 85),I= 61, 66) /-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 85),I= 67, 72) /-1.913580246913580D-01 - $ ,3.086419753086420D-02,8.641975308641975D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I, 85),I= 73, 78) /1.975308641975309D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 85),I= 79, 84) /1.975308641975309D+00, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -2.469135802469136D-02,1.530864197530864D+00,1.753086419753086D - $ +00/ - DATA (CF(I, 85),I= 85, 90) /1.264197530864197D+01, - $ -1.580246913580247D+00,-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01,1.975308641975309D - $ +00/ - DATA (CF(I, 85),I= 91, 96) /1.530864197530864D+00, - $ -2.469135802469136D-01,-6.913580246913580D-01 - $ ,1.530864197530864D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 85),I= 97,102) /-3.580246913580247D-01 - $ ,1.364197530864198D+00,-1.358024691358025D-01 - $ ,8.641975308641975D-02,-1.635802469135803D-01, - $ -1.913580246913580D-01/ - DATA (CF(I, 85),I=103,108) /4.197530864197531D-01, - $ -3.580246913580247D-01,-3.580246913580247D-01, - $ -1.358024691358025D-01,-1.358024691358025D-01 - $ ,1.586419753086420D+00/ - DATA (CF(I, 85),I=109,114) /1.586419753086420D+00, - $ -1.913580246913580D-01,-1.358024691358025D-01, - $ -1.635802469135803D-01,3.086419753086420D-02,3.086419753086420D - $ -01/ - DATA (CF(I, 85),I=115,120) /-1.913580246913580D-01 - $ ,3.086419753086420D-02,8.641975308641975D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02/ + DATA (CF(I),I=6595,6630) /4096,-1024,-1024,128,128,1280,992,-160 + $ ,-448,992,-16,-160,-232,884,-88,56,-106,-124,272,-232,-232,-88, + $ -88,1028,1028,-124,-88,-106,20,200,-124,20,56,-124,2,20/ C 1 T(6,5,1,2,7,3,4) - DATA (CF(I, 86),I= 1, 6) /-1.913580246913580D-01, - $ -1.635802469135803D-01,-2.191358024691358D-01 - $ ,5.864197530864197D-02,-1.358024691358025D-01, - $ -4.135802469135803D-01/ - DATA (CF(I, 86),I= 7, 12) /3.086419753086420D-02 - $ ,3.086419753086420D-01,-2.469135802469136D-01 - $ ,1.975308641975309D+00,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 86),I= 13, 18) /3.086419753086420D-03 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I, 86),I= 19, 24) /1.586419753086420D+00 - $ ,1.558641975308642D+00,-1.913580246913580D-01 - $ ,1.530864197530864D+00,-2.191358024691358D-01 - $ ,1.753086419753086D+00/ - DATA (CF(I, 86),I= 25, 30) /8.641975308641975D-02, - $ -1.358024691358025D-01,-1.913580246913580D-01, - $ -1.635802469135803D-01,-3.580246913580247D-01 - $ ,1.364197530864198D+00/ - DATA (CF(I, 86),I= 31, 36) /-1.913580246913580D-01 - $ ,1.586419753086420D+00,3.086419753086420D-02,3.086419753086420D - $ -01,-1.358024691358025D-01,-1.635802469135803D-01/ - DATA (CF(I, 86),I= 37, 42) /3.086419753086420D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02,8.641975308641975D-02,-1.913580246913580D-01/ - DATA (CF(I, 86),I= 43, 48) /4.197530864197531D-01, - $ -3.580246913580247D-01,-3.580246913580247D-01, - $ -1.358024691358025D-01,-1.358024691358025D-01 - $ ,1.586419753086420D+00/ - DATA (CF(I, 86),I= 49, 54) /3.086419753086420D-03 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I, 86),I= 55, 60) /3.086419753086420D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02,8.641975308641975D-02,-1.913580246913580D-01/ - DATA (CF(I, 86),I= 61, 66) /1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 86),I= 67, 72) /3.086419753086420D-02, - $ -2.469135802469136D-01,-1.913580246913580D-01, - $ -2.191358024691358D-01,-2.469135802469136D-02 - $ ,3.086419753086420D-03/ - DATA (CF(I, 86),I= 73, 78) /-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 86),I= 79, 84) /-2.469135802469136D-01 - $ ,1.530864197530864D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01,-6.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 86),I= 85, 90) /-1.580246913580247D+00 - $ ,1.264197530864197D+01,1.975308641975309D-01,1.975308641975309D - $ +00,-1.580246913580247D+00,1.975308641975309D-01/ - DATA (CF(I, 86),I= 91, 96) /-2.469135802469136D-01 - $ ,1.975308641975309D+00,1.530864197530864D+00,1.753086419753086D - $ +00,1.975308641975309D-01,-2.469135802469136D-02/ - DATA (CF(I, 86),I= 97,102) /-1.358024691358025D-01, - $ -4.135802469135803D-01,8.641975308641975D-02, - $ -6.913580246913580D-01,-1.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 86),I=103,108) /-3.580246913580247D-01 - $ ,1.364197530864198D+00,1.364197530864198D+00, - $ -4.135802469135803D-01,-4.135802469135803D-01 - $ ,1.558641975308642D+00/ - DATA (CF(I, 86),I=109,114) /-1.913580246913580D-01 - $ ,1.530864197530864D+00,-1.635802469135803D-01 - $ ,5.864197530864197D-02,-2.469135802469136D-01 - $ ,3.086419753086420D-02/ - DATA (CF(I, 86),I=115,120) /3.086419753086420D-02, - $ -2.469135802469136D-01,-1.913580246913580D-01, - $ -2.191358024691358D-01,-2.469135802469136D-02 - $ ,3.086419753086420D-03/ + DATA (CF(I),I=6631,6665) /4096,128,1280,-1024,128,-160,1280,992 + $ ,1136,128,-16,-88,-268,56,-448,-124,992,-232,884,884,-268,-268 + $ ,1010,-124,992,-106,38,-160,20,20,-160,-124,-142,-16,2/ C 1 T(6,5,1,7,2,3,4) - DATA (CF(I, 87),I= 1, 6) /-6.913580246913580D-01 - $ ,8.641975308641975D-02,1.530864197530864D+00, - $ -1.913580246913580D-01,-1.358024691358025D-01, - $ -4.135802469135803D-01/ - DATA (CF(I, 87),I= 7, 12) /1.530864197530864D+00, - $ -1.913580246913580D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02,-1.635802469135803D-01 - $ ,5.864197530864197D-02/ - DATA (CF(I, 87),I= 13, 18) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01, - $ -2.191358024691358D-01/ - DATA (CF(I, 87),I= 19, 24) /-3.580246913580247D-01 - $ ,1.364197530864198D+00,1.364197530864198D+00, - $ -4.135802469135803D-01,-4.135802469135803D-01 - $ ,1.558641975308642D+00/ - DATA (CF(I, 87),I= 25, 30) /1.530864197530864D+00, - $ -1.913580246913580D-01,1.753086419753086D+00, - $ -2.191358024691358D-01,1.586419753086420D+00,1.558641975308642D - $ +00/ - DATA (CF(I, 87),I= 31, 36) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,1.975308641975309D+00, - $ -2.469135802469136D-01,3.086419753086420D-01,3.086419753086420D - $ -02/ - DATA (CF(I, 87),I= 37, 42) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,1.975308641975309D-01, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I, 87),I= 43, 48) /-1.358024691358025D-01, - $ -4.135802469135803D-01,-1.635802469135803D-01, - $ -1.913580246913580D-01,5.864197530864197D-02, - $ -2.191358024691358D-01/ - DATA (CF(I, 87),I= 49, 54) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01, - $ -2.191358024691358D-01/ - DATA (CF(I, 87),I= 55, 60) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,1.975308641975309D-01, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I, 87),I= 61, 66) /1.975308641975309D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 87),I= 67, 72) /8.641975308641975D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I, 87),I= 73, 78) /1.975308641975309D+00, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -2.469135802469136D-02,1.530864197530864D+00,1.753086419753086D - $ +00/ - DATA (CF(I, 87),I= 79, 84) /1.975308641975309D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 87),I= 85, 90) /-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.264197530864197D+01, - $ -1.580246913580247D+00,1.975308641975309D+00,1.975308641975309D - $ -01/ - DATA (CF(I, 87),I= 91, 96) /-6.913580246913580D-01 - $ ,1.530864197530864D+00,1.530864197530864D+00, - $ -2.469135802469136D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 87),I= 97,102) /4.197530864197531D-01, - $ -3.580246913580247D-01,-3.580246913580247D-01, - $ -1.358024691358025D-01,-1.358024691358025D-01 - $ ,1.586419753086420D+00/ - DATA (CF(I, 87),I=103,108) /-3.580246913580247D-01 - $ ,1.364197530864198D+00,-1.358024691358025D-01 - $ ,8.641975308641975D-02,-1.635802469135803D-01, - $ -1.913580246913580D-01/ - DATA (CF(I, 87),I=109,114) /-1.358024691358025D-01, - $ -1.635802469135803D-01,1.586419753086420D+00, - $ -1.913580246913580D-01,3.086419753086420D-01,3.086419753086420D - $ -02/ - DATA (CF(I, 87),I=115,120) /8.641975308641975D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ + DATA (CF(I),I=6666,6699) /4096,-1024,1280,128,-448,992,992,-160, + $ -160,-16,272,-232,-232,-88,-88,1028,-232,884,-88,56,-106,-124, + $ -88,-106,1028,-124,200,20,56,-124,-124,20,20,2/ C 1 T(6,5,2,1,7,3,4) - DATA (CF(I, 88),I= 1, 6) /8.641975308641975D-02, - $ -1.358024691358025D-01,-1.913580246913580D-01, - $ -1.635802469135803D-01,-3.580246913580247D-01 - $ ,1.364197530864198D+00/ - DATA (CF(I, 88),I= 7, 12) /-1.913580246913580D-01 - $ ,1.586419753086420D+00,3.086419753086420D-02,3.086419753086420D - $ -01,-1.358024691358025D-01,-1.635802469135803D-01/ - DATA (CF(I, 88),I= 13, 18) /3.086419753086420D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02,8.641975308641975D-02,-1.913580246913580D-01/ - DATA (CF(I, 88),I= 19, 24) /4.197530864197531D-01, - $ -3.580246913580247D-01,-3.580246913580247D-01, - $ -1.358024691358025D-01,-1.358024691358025D-01 - $ ,1.586419753086420D+00/ - DATA (CF(I, 88),I= 25, 30) /-1.913580246913580D-01, - $ -1.635802469135803D-01,-2.191358024691358D-01 - $ ,5.864197530864197D-02,-1.358024691358025D-01, - $ -4.135802469135803D-01/ - DATA (CF(I, 88),I= 31, 36) /3.086419753086420D-02 - $ ,3.086419753086420D-01,-2.469135802469136D-01 - $ ,1.975308641975309D+00,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 88),I= 37, 42) /3.086419753086420D-03 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I, 88),I= 43, 48) /1.586419753086420D+00 - $ ,1.558641975308642D+00,-1.913580246913580D-01 - $ ,1.530864197530864D+00,-2.191358024691358D-01 - $ ,1.753086419753086D+00/ - DATA (CF(I, 88),I= 49, 54) /3.086419753086420D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02,8.641975308641975D-02,-1.913580246913580D-01/ - DATA (CF(I, 88),I= 55, 60) /3.086419753086420D-03 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I, 88),I= 61, 66) /-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 88),I= 67, 72) /-1.913580246913580D-01, - $ -2.191358024691358D-01,3.086419753086420D-02, - $ -2.469135802469136D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I, 88),I= 73, 78) /-2.469135802469136D-01 - $ ,1.530864197530864D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01,-6.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 88),I= 79, 84) /-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 88),I= 85, 90) /1.975308641975309D-01 - $ ,1.975308641975309D+00,-1.580246913580247D+00 - $ ,1.264197530864197D+01,1.975308641975309D-01, - $ -1.580246913580247D+00/ - DATA (CF(I, 88),I= 91, 96) /1.530864197530864D+00 - $ ,1.753086419753086D+00,-2.469135802469136D-01 - $ ,1.975308641975309D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 88),I= 97,102) /-3.580246913580247D-01 - $ ,1.364197530864198D+00,1.364197530864198D+00, - $ -4.135802469135803D-01,-4.135802469135803D-01 - $ ,1.558641975308642D+00/ - DATA (CF(I, 88),I=103,108) /-1.358024691358025D-01, - $ -4.135802469135803D-01,8.641975308641975D-02, - $ -6.913580246913580D-01,-1.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 88),I=109,114) /-1.635802469135803D-01 - $ ,5.864197530864197D-02,-1.913580246913580D-01 - $ ,1.530864197530864D+00,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 88),I=115,120) /-1.913580246913580D-01, - $ -2.191358024691358D-01,3.086419753086420D-02, - $ -2.469135802469136D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ + DATA (CF(I),I=6700,6732) /4096,128,-1024,992,1136,-160,1280,-16 + $ ,128,-232,884,884,-268,-268,1010,-88,-268,56,-448,-124,992,-106 + $ ,38,-124,992,20,-160,-124,-142,20,-160,2,-16/ C 1 T(6,5,2,7,1,3,4) - DATA (CF(I, 89),I= 1, 6) /-4.135802469135803D-01 - $ ,1.364197530864198D+00,1.558641975308642D+00, - $ -4.135802469135803D-01,-3.580246913580247D-01 - $ ,1.364197530864198D+00/ - DATA (CF(I, 89),I= 7, 12) /5.864197530864197D-02, - $ -1.635802469135803D-01,3.086419753086420D-02, - $ -2.469135802469136D-01,-1.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 89),I= 13, 18) /-2.191358024691358D-01, - $ -1.913580246913580D-01,3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 89),I= 19, 24) /-1.358024691358025D-01, - $ -4.135802469135803D-01,8.641975308641975D-02, - $ -6.913580246913580D-01,-1.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 89),I= 25, 30) /-1.358024691358025D-01, - $ -3.580246913580247D-01,1.586419753086420D+00, - $ -1.358024691358025D-01,4.197530864197531D-01, - $ -3.580246913580247D-01/ - DATA (CF(I, 89),I= 31, 36) /-1.635802469135803D-01, - $ -1.358024691358025D-01,3.086419753086420D-01,3.086419753086420D - $ -02,1.586419753086420D+00,-1.913580246913580D-01/ - DATA (CF(I, 89),I= 37, 42) /-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02,3.086419753086420D - $ -03,-1.913580246913580D-01,3.086419753086420D-02/ - DATA (CF(I, 89),I= 43, 48) /-3.580246913580247D-01 - $ ,1.364197530864198D+00,-1.358024691358025D-01 - $ ,8.641975308641975D-02,-1.635802469135803D-01, - $ -1.913580246913580D-01/ - DATA (CF(I, 89),I= 49, 54) /-2.191358024691358D-01, - $ -1.913580246913580D-01,3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 89),I= 55, 60) /-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02,3.086419753086420D - $ -03,-1.913580246913580D-01,3.086419753086420D-02/ - DATA (CF(I, 89),I= 61, 66) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01/ - DATA (CF(I, 89),I= 67, 72) /3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03,1.975308641975309D-01,-2.469135802469136D-02/ - DATA (CF(I, 89),I= 73, 78) /1.753086419753086D+00 - $ ,1.530864197530864D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01,-2.469135802469136D-01 - $ ,1.975308641975309D+00/ - DATA (CF(I, 89),I= 79, 84) /1.530864197530864D+00, - $ -6.913580246913580D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02,1.530864197530864D+00, - $ -2.469135802469136D-01/ - DATA (CF(I, 89),I= 85, 90) /1.975308641975309D-01, - $ -1.580246913580247D+00,1.975308641975309D+00,1.975308641975309D - $ -01,1.264197530864197D+01,-1.580246913580247D+00/ - DATA (CF(I, 89),I= 91, 96) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01/ - DATA (CF(I, 89),I= 97,102) /1.586419753086420D+00 - $ ,1.558641975308642D+00,-1.913580246913580D-01 - $ ,1.530864197530864D+00,-2.191358024691358D-01 - $ ,1.753086419753086D+00/ - DATA (CF(I, 89),I=103,108) /-1.358024691358025D-01, - $ -4.135802469135803D-01,-1.635802469135803D-01, - $ -1.913580246913580D-01,5.864197530864197D-02, - $ -2.191358024691358D-01/ - DATA (CF(I, 89),I=109,114) /3.086419753086420D-02, - $ -2.469135802469136D-01,3.086419753086420D-01,3.086419753086420D - $ -02,1.975308641975309D+00,-2.469135802469136D-01/ - DATA (CF(I, 89),I=115,120) /3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03,1.975308641975309D-01,-2.469135802469136D-02/ + DATA (CF(I),I=6733,6764) /4096,-1024,-16,128,-160,-16,-1024,128 + $ ,1028,1010,-124,992,-142,1136,-88,-268,-106,-124,38,-142,20, + $ -160,200,20,1280,-160,2,-16,20,2,128,-16/ C 1 T(6,5,7,1,2,3,4) - DATA (CF(I, 90),I= 1, 6) /-1.358024691358025D-01, - $ -3.580246913580247D-01,1.586419753086420D+00, - $ -1.358024691358025D-01,4.197530864197531D-01, - $ -3.580246913580247D-01/ - DATA (CF(I, 90),I= 7, 12) /-1.635802469135803D-01, - $ -1.358024691358025D-01,3.086419753086420D-01,3.086419753086420D - $ -02,1.586419753086420D+00,-1.913580246913580D-01/ - DATA (CF(I, 90),I= 13, 18) /-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02,3.086419753086420D - $ -03,-1.913580246913580D-01,3.086419753086420D-02/ - DATA (CF(I, 90),I= 19, 24) /-3.580246913580247D-01 - $ ,1.364197530864198D+00,-1.358024691358025D-01 - $ ,8.641975308641975D-02,-1.635802469135803D-01, - $ -1.913580246913580D-01/ - DATA (CF(I, 90),I= 25, 30) /-4.135802469135803D-01 - $ ,1.364197530864198D+00,1.558641975308642D+00, - $ -4.135802469135803D-01,-3.580246913580247D-01 - $ ,1.364197530864198D+00/ - DATA (CF(I, 90),I= 31, 36) /5.864197530864197D-02, - $ -1.635802469135803D-01,3.086419753086420D-02, - $ -2.469135802469136D-01,-1.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 90),I= 37, 42) /-2.191358024691358D-01, - $ -1.913580246913580D-01,3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 90),I= 43, 48) /-1.358024691358025D-01, - $ -4.135802469135803D-01,8.641975308641975D-02, - $ -6.913580246913580D-01,-1.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 90),I= 49, 54) /-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02,3.086419753086420D - $ -03,-1.913580246913580D-01,3.086419753086420D-02/ - DATA (CF(I, 90),I= 55, 60) /-2.191358024691358D-01, - $ -1.913580246913580D-01,3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 90),I= 61, 66) /-2.469135802469136D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -1.580246913580247D+00/ - DATA (CF(I, 90),I= 67, 72) /3.086419753086420D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 90),I= 73, 78) /1.530864197530864D+00, - $ -6.913580246913580D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02,1.530864197530864D+00, - $ -2.469135802469136D-01/ - DATA (CF(I, 90),I= 79, 84) /1.753086419753086D+00 - $ ,1.530864197530864D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01,-2.469135802469136D-01 - $ ,1.975308641975309D+00/ - DATA (CF(I, 90),I= 85, 90) /1.975308641975309D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -1.580246913580247D+00,-1.580246913580247D+00 - $ ,1.264197530864197D+01/ - DATA (CF(I, 90),I= 91, 96) /-2.469135802469136D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -1.580246913580247D+00/ - DATA (CF(I, 90),I= 97,102) /-1.358024691358025D-01, - $ -4.135802469135803D-01,-1.635802469135803D-01, - $ -1.913580246913580D-01,5.864197530864197D-02, - $ -2.191358024691358D-01/ - DATA (CF(I, 90),I=103,108) /1.586419753086420D+00 - $ ,1.558641975308642D+00,-1.913580246913580D-01 - $ ,1.530864197530864D+00,-2.191358024691358D-01 - $ ,1.753086419753086D+00/ - DATA (CF(I, 90),I=109,114) /3.086419753086420D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02, - $ -2.469135802469136D-01,-2.469135802469136D-01 - $ ,1.975308641975309D+00/ - DATA (CF(I, 90),I=115,120) /3.086419753086420D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ + DATA (CF(I),I=6765,6795) /4096,-160,-16,-16,128,128,-1024,-88, + $ -268,-106,-124,38,-142,1028,1010,-124,992,-142,1136,200,20,20, + $ -160,-160,1280,20,2,2,-16,-16,128/ C 1 T(6,5,7,2,1,3,4) - DATA (CF(I, 91),I= 1, 6) /1.558641975308642D+00 - $ ,1.586419753086420D+00,-2.191358024691358D-01 - $ ,1.753086419753086D+00,-1.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 91),I= 7, 12) /-4.135802469135803D-01, - $ -1.358024691358025D-01,5.864197530864197D-02, - $ -2.191358024691358D-01,-1.635802469135803D-01, - $ -1.913580246913580D-01/ - DATA (CF(I, 91),I= 13, 18) /3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03,1.975308641975309D-01,-2.469135802469136D-02/ - DATA (CF(I, 91),I= 19, 24) /3.086419753086420D-02, - $ -2.469135802469136D-01,3.086419753086420D-01,3.086419753086420D - $ -02,1.975308641975309D+00,-2.469135802469136D-01/ - DATA (CF(I, 91),I= 25, 30) /-4.135802469135803D-01, - $ -1.358024691358025D-01,-1.913580246913580D-01 - $ ,1.530864197530864D+00,8.641975308641975D-02, - $ -6.913580246913580D-01/ - DATA (CF(I, 91),I= 31, 36) /1.364197530864198D+00, - $ -3.580246913580247D-01,-4.135802469135803D-01 - $ ,1.558641975308642D+00,1.364197530864198D+00, - $ -4.135802469135803D-01/ - DATA (CF(I, 91),I= 37, 42) /3.086419753086420D-02, - $ -2.469135802469136D-01,-1.913580246913580D-01, - $ -2.191358024691358D-01,-2.469135802469136D-02 - $ ,3.086419753086420D-03/ - DATA (CF(I, 91),I= 43, 48) /-1.913580246913580D-01 - $ ,1.530864197530864D+00,-1.635802469135803D-01 - $ ,5.864197530864197D-02,-2.469135802469136D-01 - $ ,3.086419753086420D-02/ - DATA (CF(I, 91),I= 49, 54) /1.364197530864198D+00, - $ -3.580246913580247D-01,-1.635802469135803D-01, - $ -1.913580246913580D-01,-1.358024691358025D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 91),I= 55, 60) /-3.580246913580247D-01 - $ ,4.197530864197531D-01,-1.358024691358025D-01 - $ ,1.586419753086420D+00,-3.580246913580247D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 91),I= 61, 66) /-1.913580246913580D-01 - $ ,3.086419753086420D-02,8.641975308641975D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I, 91),I= 67, 72) /1.586419753086420D+00, - $ -1.913580246913580D-01,-1.358024691358025D-01, - $ -1.635802469135803D-01,3.086419753086420D-02,3.086419753086420D - $ -01/ - DATA (CF(I, 91),I= 73, 78) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01/ - DATA (CF(I, 91),I= 79, 84) /-2.469135802469136D-01 - $ ,1.975308641975309D+00,1.530864197530864D+00,1.753086419753086D - $ +00,1.975308641975309D-01,-2.469135802469136D-02/ - DATA (CF(I, 91),I= 85, 90) /1.530864197530864D+00, - $ -2.469135802469136D-01,-6.913580246913580D-01 - $ ,1.530864197530864D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 91),I= 91, 96) /1.264197530864197D+01, - $ -1.580246913580247D+00,-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01,1.975308641975309D - $ +00/ - DATA (CF(I, 91),I= 97,102) /3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03,1.975308641975309D-01,-2.469135802469136D-02/ - DATA (CF(I, 91),I=103,108) /3.086419753086420D-02, - $ -2.469135802469136D-01,-1.913580246913580D-01, - $ -2.191358024691358D-01,-2.469135802469136D-02 - $ ,3.086419753086420D-03/ - DATA (CF(I, 91),I=109,114) /-1.913580246913580D-01 - $ ,3.086419753086420D-02,8.641975308641975D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I, 91),I=115,120) /-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02, - $ -2.469135802469136D-01/ + DATA (CF(I),I=6796,6825) /4096,-1024,-1024,128,128,1280,2,-16,20 + $ ,2,128,-16,20,-160,-124,-142,-16,2,-124,20,56,-124,2,20,-1024 + $ ,128,128,-16,-16,-160/ C 1 T(6,7,1,2,5,3,4) - DATA (CF(I, 92),I= 1, 6) /-4.135802469135803D-01, - $ -1.358024691358025D-01,5.864197530864197D-02, - $ -2.191358024691358D-01,-1.635802469135803D-01, - $ -1.913580246913580D-01/ - DATA (CF(I, 92),I= 7, 12) /1.558641975308642D+00 - $ ,1.586419753086420D+00,-2.191358024691358D-01 - $ ,1.753086419753086D+00,-1.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 92),I= 13, 18) /3.086419753086420D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 92),I= 19, 24) /3.086419753086420D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02, - $ -2.469135802469136D-01,-2.469135802469136D-01 - $ ,1.975308641975309D+00/ - DATA (CF(I, 92),I= 25, 30) /1.364197530864198D+00, - $ -3.580246913580247D-01,-1.635802469135803D-01, - $ -1.913580246913580D-01,-1.358024691358025D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 92),I= 31, 36) /-3.580246913580247D-01 - $ ,4.197530864197531D-01,-1.358024691358025D-01 - $ ,1.586419753086420D+00,-3.580246913580247D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 92),I= 37, 42) /-1.913580246913580D-01 - $ ,3.086419753086420D-02,8.641975308641975D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I, 92),I= 43, 48) /1.586419753086420D+00, - $ -1.913580246913580D-01,-1.358024691358025D-01, - $ -1.635802469135803D-01,3.086419753086420D-02,3.086419753086420D - $ -01/ - DATA (CF(I, 92),I= 49, 54) /-4.135802469135803D-01, - $ -1.358024691358025D-01,-1.913580246913580D-01 - $ ,1.530864197530864D+00,8.641975308641975D-02, - $ -6.913580246913580D-01/ - DATA (CF(I, 92),I= 55, 60) /1.364197530864198D+00, - $ -3.580246913580247D-01,-4.135802469135803D-01 - $ ,1.558641975308642D+00,1.364197530864198D+00, - $ -4.135802469135803D-01/ - DATA (CF(I, 92),I= 61, 66) /3.086419753086420D-02, - $ -2.469135802469136D-01,-1.913580246913580D-01, - $ -2.191358024691358D-01,-2.469135802469136D-02 - $ ,3.086419753086420D-03/ - DATA (CF(I, 92),I= 67, 72) /-1.913580246913580D-01 - $ ,1.530864197530864D+00,-1.635802469135803D-01 - $ ,5.864197530864197D-02,-2.469135802469136D-01 - $ ,3.086419753086420D-02/ - DATA (CF(I, 92),I= 73, 78) /-2.469135802469136D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -1.580246913580247D+00/ - DATA (CF(I, 92),I= 79, 84) /1.530864197530864D+00, - $ -2.469135802469136D-01,-6.913580246913580D-01 - $ ,1.530864197530864D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 92),I= 85, 90) /-2.469135802469136D-01 - $ ,1.975308641975309D+00,1.530864197530864D+00,1.753086419753086D - $ +00,1.975308641975309D-01,-2.469135802469136D-02/ - DATA (CF(I, 92),I= 91, 96) /-1.580246913580247D+00 - $ ,1.264197530864197D+01,1.975308641975309D-01,1.975308641975309D - $ +00,-1.580246913580247D+00,1.975308641975309D-01/ - DATA (CF(I, 92),I= 97,102) /3.086419753086420D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 92),I=103,108) /-1.913580246913580D-01 - $ ,3.086419753086420D-02,8.641975308641975D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I, 92),I=109,114) /3.086419753086420D-02, - $ -2.469135802469136D-01,-1.913580246913580D-01, - $ -2.191358024691358D-01,-2.469135802469136D-02 - $ ,3.086419753086420D-03/ - DATA (CF(I, 92),I=115,120) /1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -2.469135802469136D-02/ + DATA (CF(I),I=6826,6854) /4096,128,1280,-1024,128,20,2,2,-16,-16 + $ ,128,-124,20,56,-124,2,20,20,-160,-124,-142,-16,2,128,-1024,-16 + $ ,-160,128,-16/ C 1 T(6,7,1,5,2,3,4) - DATA (CF(I, 93),I= 1, 6) /-4.135802469135803D-01, - $ -1.358024691358025D-01,-1.913580246913580D-01 - $ ,1.530864197530864D+00,8.641975308641975D-02, - $ -6.913580246913580D-01/ - DATA (CF(I, 93),I= 7, 12) /1.364197530864198D+00, - $ -3.580246913580247D-01,-4.135802469135803D-01 - $ ,1.558641975308642D+00,1.364197530864198D+00, - $ -4.135802469135803D-01/ - DATA (CF(I, 93),I= 13, 18) /3.086419753086420D-02, - $ -2.469135802469136D-01,-1.913580246913580D-01, - $ -2.191358024691358D-01,-2.469135802469136D-02 - $ ,3.086419753086420D-03/ - DATA (CF(I, 93),I= 19, 24) /-1.913580246913580D-01 - $ ,1.530864197530864D+00,-1.635802469135803D-01 - $ ,5.864197530864197D-02,-2.469135802469136D-01 - $ ,3.086419753086420D-02/ - DATA (CF(I, 93),I= 25, 30) /1.558641975308642D+00 - $ ,1.586419753086420D+00,-2.191358024691358D-01 - $ ,1.753086419753086D+00,-1.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 93),I= 31, 36) /-4.135802469135803D-01, - $ -1.358024691358025D-01,5.864197530864197D-02, - $ -2.191358024691358D-01,-1.635802469135803D-01, - $ -1.913580246913580D-01/ - DATA (CF(I, 93),I= 37, 42) /3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03,1.975308641975309D-01,-2.469135802469136D-02/ - DATA (CF(I, 93),I= 43, 48) /3.086419753086420D-02, - $ -2.469135802469136D-01,3.086419753086420D-01,3.086419753086420D - $ -02,1.975308641975309D+00,-2.469135802469136D-01/ - DATA (CF(I, 93),I= 49, 54) /-3.580246913580247D-01 - $ ,4.197530864197531D-01,-1.358024691358025D-01 - $ ,1.586419753086420D+00,-3.580246913580247D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 93),I= 55, 60) /1.364197530864198D+00, - $ -3.580246913580247D-01,-1.635802469135803D-01, - $ -1.913580246913580D-01,-1.358024691358025D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 93),I= 61, 66) /8.641975308641975D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I, 93),I= 67, 72) /-1.358024691358025D-01, - $ -1.635802469135803D-01,1.586419753086420D+00, - $ -1.913580246913580D-01,3.086419753086420D-01,3.086419753086420D - $ -02/ - DATA (CF(I, 93),I= 73, 78) /-2.469135802469136D-01 - $ ,1.975308641975309D+00,1.530864197530864D+00,1.753086419753086D - $ +00,1.975308641975309D-01,-2.469135802469136D-02/ - DATA (CF(I, 93),I= 79, 84) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01/ - DATA (CF(I, 93),I= 85, 90) /-6.913580246913580D-01 - $ ,1.530864197530864D+00,1.530864197530864D+00, - $ -2.469135802469136D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 93),I= 91, 96) /-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.264197530864197D+01, - $ -1.580246913580247D+00,1.975308641975309D+00,1.975308641975309D - $ -01/ - DATA (CF(I, 93),I= 97,102) /3.086419753086420D-02, - $ -2.469135802469136D-01,-1.913580246913580D-01, - $ -2.191358024691358D-01,-2.469135802469136D-02 - $ ,3.086419753086420D-03/ - DATA (CF(I, 93),I=103,108) /3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03,1.975308641975309D-01,-2.469135802469136D-02/ - DATA (CF(I, 93),I=109,114) /8.641975308641975D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I, 93),I=115,120) /1.975308641975309D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02/ + DATA (CF(I),I=6855,6882) /4096,-1024,1280,128,20,-160,-124,-142, + $ -16,2,2,-16,20,2,128,-16,56,-124,-124,20,20,2,128,-16,-1024,128 + $ ,-160,-16/ C 1 T(6,7,2,1,5,3,4) - DATA (CF(I, 94),I= 1, 6) /1.364197530864198D+00, - $ -3.580246913580247D-01,-1.635802469135803D-01, - $ -1.913580246913580D-01,-1.358024691358025D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 94),I= 7, 12) /-3.580246913580247D-01 - $ ,4.197530864197531D-01,-1.358024691358025D-01 - $ ,1.586419753086420D+00,-3.580246913580247D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 94),I= 13, 18) /-1.913580246913580D-01 - $ ,3.086419753086420D-02,8.641975308641975D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I, 94),I= 19, 24) /1.586419753086420D+00, - $ -1.913580246913580D-01,-1.358024691358025D-01, - $ -1.635802469135803D-01,3.086419753086420D-02,3.086419753086420D - $ -01/ - DATA (CF(I, 94),I= 25, 30) /-4.135802469135803D-01, - $ -1.358024691358025D-01,5.864197530864197D-02, - $ -2.191358024691358D-01,-1.635802469135803D-01, - $ -1.913580246913580D-01/ - DATA (CF(I, 94),I= 31, 36) /1.558641975308642D+00 - $ ,1.586419753086420D+00,-2.191358024691358D-01 - $ ,1.753086419753086D+00,-1.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 94),I= 37, 42) /3.086419753086420D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 94),I= 43, 48) /3.086419753086420D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02, - $ -2.469135802469136D-01,-2.469135802469136D-01 - $ ,1.975308641975309D+00/ - DATA (CF(I, 94),I= 49, 54) /1.364197530864198D+00, - $ -3.580246913580247D-01,-4.135802469135803D-01 - $ ,1.558641975308642D+00,1.364197530864198D+00, - $ -4.135802469135803D-01/ - DATA (CF(I, 94),I= 55, 60) /-4.135802469135803D-01, - $ -1.358024691358025D-01,-1.913580246913580D-01 - $ ,1.530864197530864D+00,8.641975308641975D-02, - $ -6.913580246913580D-01/ - DATA (CF(I, 94),I= 61, 66) /-1.913580246913580D-01, - $ -2.191358024691358D-01,3.086419753086420D-02, - $ -2.469135802469136D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I, 94),I= 67, 72) /-1.635802469135803D-01 - $ ,5.864197530864197D-02,-1.913580246913580D-01 - $ ,1.530864197530864D+00,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 94),I= 73, 78) /1.530864197530864D+00, - $ -2.469135802469136D-01,-6.913580246913580D-01 - $ ,1.530864197530864D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 94),I= 79, 84) /-2.469135802469136D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -1.580246913580247D+00/ - DATA (CF(I, 94),I= 85, 90) /1.530864197530864D+00 - $ ,1.753086419753086D+00,-2.469135802469136D-01 - $ ,1.975308641975309D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 94),I= 91, 96) /1.975308641975309D-01 - $ ,1.975308641975309D+00,-1.580246913580247D+00 - $ ,1.264197530864197D+01,1.975308641975309D-01, - $ -1.580246913580247D+00/ - DATA (CF(I, 94),I= 97,102) /-1.913580246913580D-01 - $ ,3.086419753086420D-02,8.641975308641975D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I, 94),I=103,108) /3.086419753086420D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 94),I=109,114) /-1.913580246913580D-01, - $ -2.191358024691358D-01,3.086419753086420D-02, - $ -2.469135802469136D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I, 94),I=115,120) /-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ + DATA (CF(I),I=6883,6909) /4096,128,-1024,-124,20,56,-124,2,20,20 + $ ,2,2,-16,-16,128,-124,-142,20,-160,2,-16,-16,-160,128,-1024,-16 + $ ,128/ C 1 T(6,7,2,5,1,3,4) - DATA (CF(I, 95),I= 1, 6) /1.364197530864198D+00, - $ -3.580246913580247D-01,-4.135802469135803D-01 - $ ,1.558641975308642D+00,1.364197530864198D+00, - $ -4.135802469135803D-01/ - DATA (CF(I, 95),I= 7, 12) /-4.135802469135803D-01, - $ -1.358024691358025D-01,-1.913580246913580D-01 - $ ,1.530864197530864D+00,8.641975308641975D-02, - $ -6.913580246913580D-01/ - DATA (CF(I, 95),I= 13, 18) /-1.913580246913580D-01, - $ -2.191358024691358D-01,3.086419753086420D-02, - $ -2.469135802469136D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I, 95),I= 19, 24) /-1.635802469135803D-01 - $ ,5.864197530864197D-02,-1.913580246913580D-01 - $ ,1.530864197530864D+00,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 95),I= 25, 30) /-3.580246913580247D-01 - $ ,4.197530864197531D-01,-1.358024691358025D-01 - $ ,1.586419753086420D+00,-3.580246913580247D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 95),I= 31, 36) /1.364197530864198D+00, - $ -3.580246913580247D-01,-1.635802469135803D-01, - $ -1.913580246913580D-01,-1.358024691358025D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 95),I= 37, 42) /8.641975308641975D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I, 95),I= 43, 48) /-1.358024691358025D-01, - $ -1.635802469135803D-01,1.586419753086420D+00, - $ -1.913580246913580D-01,3.086419753086420D-01,3.086419753086420D - $ -02/ - DATA (CF(I, 95),I= 49, 54) /1.558641975308642D+00 - $ ,1.586419753086420D+00,-2.191358024691358D-01 - $ ,1.753086419753086D+00,-1.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 95),I= 55, 60) /-4.135802469135803D-01, - $ -1.358024691358025D-01,5.864197530864197D-02, - $ -2.191358024691358D-01,-1.635802469135803D-01, - $ -1.913580246913580D-01/ - DATA (CF(I, 95),I= 61, 66) /3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03,1.975308641975309D-01,-2.469135802469136D-02/ - DATA (CF(I, 95),I= 67, 72) /3.086419753086420D-02, - $ -2.469135802469136D-01,3.086419753086420D-01,3.086419753086420D - $ -02,1.975308641975309D+00,-2.469135802469136D-01/ - DATA (CF(I, 95),I= 73, 78) /1.530864197530864D+00 - $ ,1.753086419753086D+00,-2.469135802469136D-01 - $ ,1.975308641975309D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 95),I= 79, 84) /-6.913580246913580D-01 - $ ,1.530864197530864D+00,1.530864197530864D+00, - $ -2.469135802469136D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 95),I= 85, 90) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01/ - DATA (CF(I, 95),I= 91, 96) /1.975308641975309D-01, - $ -1.580246913580247D+00,1.975308641975309D+00,1.975308641975309D - $ -01,1.264197530864197D+01,-1.580246913580247D+00/ - DATA (CF(I, 95),I= 97,102) /-1.913580246913580D-01, - $ -2.191358024691358D-01,3.086419753086420D-02, - $ -2.469135802469136D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I, 95),I=103,108) /8.641975308641975D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I, 95),I=109,114) /3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03,1.975308641975309D-01,-2.469135802469136D-02/ - DATA (CF(I, 95),I=115,120) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01/ + DATA (CF(I),I=6910,6935) /4096,-1024,-124,-142,20,-160,2,-16,56, + $ -124,-124,20,20,2,2,-16,20,2,128,-16,-16,128,-160,-16,-1024,128/ C 1 T(6,7,5,1,2,3,4) - DATA (CF(I, 96),I= 1, 6) /-3.580246913580247D-01 - $ ,4.197530864197531D-01,-1.358024691358025D-01 - $ ,1.586419753086420D+00,-3.580246913580247D-01, - $ -1.358024691358025D-01/ - DATA (CF(I, 96),I= 7, 12) /1.364197530864198D+00, - $ -3.580246913580247D-01,-1.635802469135803D-01, - $ -1.913580246913580D-01,-1.358024691358025D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 96),I= 13, 18) /8.641975308641975D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I, 96),I= 19, 24) /-1.358024691358025D-01, - $ -1.635802469135803D-01,1.586419753086420D+00, - $ -1.913580246913580D-01,3.086419753086420D-01,3.086419753086420D - $ -02/ - DATA (CF(I, 96),I= 25, 30) /1.364197530864198D+00, - $ -3.580246913580247D-01,-4.135802469135803D-01 - $ ,1.558641975308642D+00,1.364197530864198D+00, - $ -4.135802469135803D-01/ - DATA (CF(I, 96),I= 31, 36) /-4.135802469135803D-01, - $ -1.358024691358025D-01,-1.913580246913580D-01 - $ ,1.530864197530864D+00,8.641975308641975D-02, - $ -6.913580246913580D-01/ - DATA (CF(I, 96),I= 37, 42) /-1.913580246913580D-01, - $ -2.191358024691358D-01,3.086419753086420D-02, - $ -2.469135802469136D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I, 96),I= 43, 48) /-1.635802469135803D-01 - $ ,5.864197530864197D-02,-1.913580246913580D-01 - $ ,1.530864197530864D+00,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 96),I= 49, 54) /-4.135802469135803D-01, - $ -1.358024691358025D-01,5.864197530864197D-02, - $ -2.191358024691358D-01,-1.635802469135803D-01, - $ -1.913580246913580D-01/ - DATA (CF(I, 96),I= 55, 60) /1.558641975308642D+00 - $ ,1.586419753086420D+00,-2.191358024691358D-01 - $ ,1.753086419753086D+00,-1.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I, 96),I= 61, 66) /3.086419753086420D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 96),I= 67, 72) /3.086419753086420D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02, - $ -2.469135802469136D-01,-2.469135802469136D-01 - $ ,1.975308641975309D+00/ - DATA (CF(I, 96),I= 73, 78) /-6.913580246913580D-01 - $ ,1.530864197530864D+00,1.530864197530864D+00, - $ -2.469135802469136D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 96),I= 79, 84) /1.530864197530864D+00 - $ ,1.753086419753086D+00,-2.469135802469136D-01 - $ ,1.975308641975309D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 96),I= 85, 90) /-2.469135802469136D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -1.580246913580247D+00/ - DATA (CF(I, 96),I= 91, 96) /1.975308641975309D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -1.580246913580247D+00,-1.580246913580247D+00 - $ ,1.264197530864197D+01/ - DATA (CF(I, 96),I= 97,102) /8.641975308641975D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I, 96),I=103,108) /-1.913580246913580D-01, - $ -2.191358024691358D-01,3.086419753086420D-02, - $ -2.469135802469136D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I, 96),I=109,114) /3.086419753086420D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 96),I=115,120) /-2.469135802469136D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -1.580246913580247D+00/ + DATA (CF(I),I=6936,6960) /4096,56,-124,-124,20,20,2,-124,-142,20 + $ ,-160,2,-16,20,2,2,-16,-16,128,-160,-16,-16,128,128,-1024/ C 1 T(6,7,5,2,1,3,4) - DATA (CF(I, 97),I= 1, 6) /3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03,1.975308641975309D-01,-2.469135802469136D-02/ - DATA (CF(I, 97),I= 7, 12) /3.086419753086420D-02, - $ -2.469135802469136D-01,-1.913580246913580D-01, - $ -2.191358024691358D-01,-2.469135802469136D-02 - $ ,3.086419753086420D-03/ - DATA (CF(I, 97),I= 13, 18) /-1.913580246913580D-01 - $ ,3.086419753086420D-02,8.641975308641975D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I, 97),I= 19, 24) /-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 97),I= 25, 30) /3.086419753086420D-02, - $ -2.469135802469136D-01,3.086419753086420D-01,3.086419753086420D - $ -02,1.975308641975309D+00,-2.469135802469136D-01/ - DATA (CF(I, 97),I= 31, 36) /-1.913580246913580D-01 - $ ,1.530864197530864D+00,1.586419753086420D+00,1.558641975308642D - $ +00,1.753086419753086D+00,-2.191358024691358D-01/ - DATA (CF(I, 97),I= 37, 42) /-1.635802469135803D-01, - $ -1.913580246913580D-01,-1.358024691358025D-01, - $ -4.135802469135803D-01,-2.191358024691358D-01 - $ ,5.864197530864197D-02/ - DATA (CF(I, 97),I= 43, 48) /1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I, 97),I= 49, 54) /-1.913580246913580D-01 - $ ,1.530864197530864D+00,-1.635802469135803D-01 - $ ,5.864197530864197D-02,-2.469135802469136D-01 - $ ,3.086419753086420D-02/ - DATA (CF(I, 97),I= 55, 60) /8.641975308641975D-02, - $ -6.913580246913580D-01,-1.358024691358025D-01, - $ -4.135802469135803D-01,1.530864197530864D+00, - $ -1.913580246913580D-01/ - DATA (CF(I, 97),I= 61, 66) /1.364197530864198D+00, - $ -4.135802469135803D-01,-3.580246913580247D-01 - $ ,1.364197530864198D+00,1.558641975308642D+00, - $ -4.135802469135803D-01/ - DATA (CF(I, 97),I= 67, 72) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01/ - DATA (CF(I, 97),I= 73, 78) /1.586419753086420D+00, - $ -1.913580246913580D-01,-1.358024691358025D-01, - $ -1.635802469135803D-01,3.086419753086420D-02,3.086419753086420D - $ -01/ - DATA (CF(I, 97),I= 79, 84) /-1.358024691358025D-01 - $ ,8.641975308641975D-02,-3.580246913580247D-01 - $ ,1.364197530864198D+00,-1.913580246913580D-01, - $ -1.635802469135803D-01/ - DATA (CF(I, 97),I= 85, 90) /-3.580246913580247D-01, - $ -1.358024691358025D-01,4.197530864197531D-01, - $ -3.580246913580247D-01,1.586419753086420D+00, - $ -1.358024691358025D-01/ - DATA (CF(I, 97),I= 91, 96) /3.086419753086420D-03 - $ ,3.086419753086420D-02,3.086419753086420D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 97),I= 97,102) /1.264197530864197D+01, - $ -1.580246913580247D+00,-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01,1.975308641975309D - $ +00/ - DATA (CF(I, 97),I=103,108) /-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 97),I=109,114) /1.975308641975309D-01, - $ -2.469135802469136D-02,1.975308641975309D+00, - $ -2.469135802469136D-01,1.753086419753086D+00,1.530864197530864D - $ +00/ - DATA (CF(I, 97),I=115,120) /-2.469135802469136D-02, - $ -2.469135802469136D-01,-2.469135802469136D-01 - $ ,1.530864197530864D+00,1.530864197530864D+00, - $ -6.913580246913580D-01/ + DATA (CF(I),I=6961,6984) /4096,-1024,-1024,128,128,1280,-1024 + $ ,128,128,-16,-16,-160,128,-16,1280,-160,1136,992,-16,-160,-160 + $ ,992,992,-448/ C 1 T(7,1,2,5,6,3,4) - DATA (CF(I, 98),I= 1, 6) /3.086419753086420D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I, 98),I= 7, 12) /-1.913580246913580D-01 - $ ,3.086419753086420D-02,8.641975308641975D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I, 98),I= 13, 18) /3.086419753086420D-02, - $ -2.469135802469136D-01,-1.913580246913580D-01, - $ -2.191358024691358D-01,-2.469135802469136D-02 - $ ,3.086419753086420D-03/ - DATA (CF(I, 98),I= 19, 24) /1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 98),I= 25, 30) /3.086419753086420D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02, - $ -2.469135802469136D-01,-2.469135802469136D-01 - $ ,1.975308641975309D+00/ - DATA (CF(I, 98),I= 31, 36) /-1.635802469135803D-01, - $ -1.913580246913580D-01,-1.358024691358025D-01, - $ -4.135802469135803D-01,-2.191358024691358D-01 - $ ,5.864197530864197D-02/ - DATA (CF(I, 98),I= 37, 42) /-1.913580246913580D-01 - $ ,1.530864197530864D+00,1.586419753086420D+00,1.558641975308642D - $ +00,1.753086419753086D+00,-2.191358024691358D-01/ - DATA (CF(I, 98),I= 43, 48) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03,3.086419753086420D - $ -02,-2.469135802469136D-02,3.086419753086420D-03/ - DATA (CF(I, 98),I= 49, 54) /1.586419753086420D+00, - $ -1.913580246913580D-01,-1.358024691358025D-01, - $ -1.635802469135803D-01,3.086419753086420D-02,3.086419753086420D - $ -01/ - DATA (CF(I, 98),I= 55, 60) /-1.358024691358025D-01 - $ ,8.641975308641975D-02,-3.580246913580247D-01 - $ ,1.364197530864198D+00,-1.913580246913580D-01, - $ -1.635802469135803D-01/ - DATA (CF(I, 98),I= 61, 66) /-3.580246913580247D-01, - $ -1.358024691358025D-01,4.197530864197531D-01, - $ -3.580246913580247D-01,1.586419753086420D+00, - $ -1.358024691358025D-01/ - DATA (CF(I, 98),I= 67, 72) /3.086419753086420D-03 - $ ,3.086419753086420D-02,3.086419753086420D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I, 98),I= 73, 78) /-1.913580246913580D-01 - $ ,1.530864197530864D+00,-1.635802469135803D-01 - $ ,5.864197530864197D-02,-2.469135802469136D-01 - $ ,3.086419753086420D-02/ - DATA (CF(I, 98),I= 79, 84) /8.641975308641975D-02, - $ -6.913580246913580D-01,-1.358024691358025D-01, - $ -4.135802469135803D-01,1.530864197530864D+00, - $ -1.913580246913580D-01/ - DATA (CF(I, 98),I= 85, 90) /1.364197530864198D+00, - $ -4.135802469135803D-01,-3.580246913580247D-01 - $ ,1.364197530864198D+00,1.558641975308642D+00, - $ -4.135802469135803D-01/ - DATA (CF(I, 98),I= 91, 96) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01/ - DATA (CF(I, 98),I= 97,102) /-1.580246913580247D+00 - $ ,1.264197530864197D+01,1.975308641975309D-01,1.975308641975309D - $ +00,-1.580246913580247D+00,1.975308641975309D-01/ - DATA (CF(I, 98),I=103,108) /1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 98),I=109,114) /-2.469135802469136D-02, - $ -2.469135802469136D-01,-2.469135802469136D-01 - $ ,1.530864197530864D+00,1.530864197530864D+00, - $ -6.913580246913580D-01/ - DATA (CF(I, 98),I=115,120) /1.975308641975309D-01, - $ -2.469135802469136D-02,1.975308641975309D+00, - $ -2.469135802469136D-01,1.753086419753086D+00,1.530864197530864D - $ +00/ + DATA (CF(I),I=6985,7007) /4096,128,1280,-1024,128,128,-1024,-16, + $ -160,128,-16,-16,-160,-160,992,992,-448,128,-16,1280,-160,1136 + $ ,992/ C 1 T(7,1,2,6,5,3,4) - DATA (CF(I, 99),I= 1, 6) /3.086419753086420D-02, - $ -2.469135802469136D-01,-1.913580246913580D-01, - $ -2.191358024691358D-01,-2.469135802469136D-02 - $ ,3.086419753086420D-03/ - DATA (CF(I, 99),I= 7, 12) /3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03,1.975308641975309D-01,-2.469135802469136D-02/ - DATA (CF(I, 99),I= 13, 18) /8.641975308641975D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I, 99),I= 19, 24) /1.975308641975309D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02/ - DATA (CF(I, 99),I= 25, 30) /-1.913580246913580D-01 - $ ,1.530864197530864D+00,-1.635802469135803D-01 - $ ,5.864197530864197D-02,-2.469135802469136D-01 - $ ,3.086419753086420D-02/ - DATA (CF(I, 99),I= 31, 36) /8.641975308641975D-02, - $ -6.913580246913580D-01,-1.358024691358025D-01, - $ -4.135802469135803D-01,1.530864197530864D+00, - $ -1.913580246913580D-01/ - DATA (CF(I, 99),I= 37, 42) /1.364197530864198D+00, - $ -4.135802469135803D-01,-3.580246913580247D-01 - $ ,1.364197530864198D+00,1.558641975308642D+00, - $ -4.135802469135803D-01/ - DATA (CF(I, 99),I= 43, 48) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01/ - DATA (CF(I, 99),I= 49, 54) /3.086419753086420D-02, - $ -2.469135802469136D-01,3.086419753086420D-01,3.086419753086420D - $ -02,1.975308641975309D+00,-2.469135802469136D-01/ - DATA (CF(I, 99),I= 55, 60) /-1.913580246913580D-01 - $ ,1.530864197530864D+00,1.586419753086420D+00,1.558641975308642D - $ +00,1.753086419753086D+00,-2.191358024691358D-01/ - DATA (CF(I, 99),I= 61, 66) /-1.635802469135803D-01, - $ -1.913580246913580D-01,-1.358024691358025D-01, - $ -4.135802469135803D-01,-2.191358024691358D-01 - $ ,5.864197530864197D-02/ - DATA (CF(I, 99),I= 67, 72) /1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I, 99),I= 73, 78) /-1.358024691358025D-01, - $ -1.635802469135803D-01,1.586419753086420D+00, - $ -1.913580246913580D-01,3.086419753086420D-01,3.086419753086420D - $ -02/ - DATA (CF(I, 99),I= 79, 84) /-3.580246913580247D-01, - $ -1.358024691358025D-01,4.197530864197531D-01, - $ -3.580246913580247D-01,1.586419753086420D+00, - $ -1.358024691358025D-01/ - DATA (CF(I, 99),I= 85, 90) /-1.358024691358025D-01 - $ ,8.641975308641975D-02,-3.580246913580247D-01 - $ ,1.364197530864198D+00,-1.913580246913580D-01, - $ -1.635802469135803D-01/ - DATA (CF(I, 99),I= 91, 96) /3.086419753086420D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02, - $ -1.913580246913580D-01/ - DATA (CF(I, 99),I= 97,102) /-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.264197530864197D+01, - $ -1.580246913580247D+00,1.975308641975309D+00,1.975308641975309D - $ -01/ - DATA (CF(I, 99),I=103,108) /1.975308641975309D-01, - $ -2.469135802469136D-02,1.975308641975309D+00, - $ -2.469135802469136D-01,1.753086419753086D+00,1.530864197530864D - $ +00/ - DATA (CF(I, 99),I=109,114) /-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02, - $ -2.469135802469136D-01/ - DATA (CF(I, 99),I=115,120) /-2.469135802469136D-01, - $ -2.469135802469136D-02,1.530864197530864D+00, - $ -6.913580246913580D-01,-2.469135802469136D-01 - $ ,1.530864197530864D+00/ + DATA (CF(I),I=7008,7029) /4096,-1024,1280,128,128,-16,1280,-160 + $ ,1136,992,-1024,128,128,-16,-16,-160,-160,-16,992,-448,-160,992/ C 1 T(7,1,5,2,6,3,4) - DATA (CF(I,100),I= 1, 6) /-1.913580246913580D-01 - $ ,3.086419753086420D-02,8.641975308641975D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I,100),I= 7, 12) /3.086419753086420D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I,100),I= 13, 18) /-1.913580246913580D-01, - $ -2.191358024691358D-01,3.086419753086420D-02, - $ -2.469135802469136D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I,100),I= 19, 24) /-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I,100),I= 25, 30) /1.586419753086420D+00, - $ -1.913580246913580D-01,-1.358024691358025D-01, - $ -1.635802469135803D-01,3.086419753086420D-02,3.086419753086420D - $ -01/ - DATA (CF(I,100),I= 31, 36) /-1.358024691358025D-01 - $ ,8.641975308641975D-02,-3.580246913580247D-01 - $ ,1.364197530864198D+00,-1.913580246913580D-01, - $ -1.635802469135803D-01/ - DATA (CF(I,100),I= 37, 42) /-3.580246913580247D-01, - $ -1.358024691358025D-01,4.197530864197531D-01, - $ -3.580246913580247D-01,1.586419753086420D+00, - $ -1.358024691358025D-01/ - DATA (CF(I,100),I= 43, 48) /3.086419753086420D-03 - $ ,3.086419753086420D-02,3.086419753086420D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I,100),I= 49, 54) /3.086419753086420D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02, - $ -2.469135802469136D-01,-2.469135802469136D-01 - $ ,1.975308641975309D+00/ - DATA (CF(I,100),I= 55, 60) /-1.635802469135803D-01, - $ -1.913580246913580D-01,-1.358024691358025D-01, - $ -4.135802469135803D-01,-2.191358024691358D-01 - $ ,5.864197530864197D-02/ - DATA (CF(I,100),I= 61, 66) /-1.913580246913580D-01 - $ ,1.530864197530864D+00,1.586419753086420D+00,1.558641975308642D - $ +00,1.753086419753086D+00,-2.191358024691358D-01/ - DATA (CF(I,100),I= 67, 72) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03,3.086419753086420D - $ -02,-2.469135802469136D-02,3.086419753086420D-03/ - DATA (CF(I,100),I= 73, 78) /-1.635802469135803D-01 - $ ,5.864197530864197D-02,-1.913580246913580D-01 - $ ,1.530864197530864D+00,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I,100),I= 79, 84) /1.364197530864198D+00, - $ -4.135802469135803D-01,-3.580246913580247D-01 - $ ,1.364197530864198D+00,1.558641975308642D+00, - $ -4.135802469135803D-01/ - DATA (CF(I,100),I= 85, 90) /8.641975308641975D-02, - $ -6.913580246913580D-01,-1.358024691358025D-01, - $ -4.135802469135803D-01,1.530864197530864D+00, - $ -1.913580246913580D-01/ - DATA (CF(I,100),I= 91, 96) /3.086419753086420D-03, - $ -2.469135802469136D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02/ - DATA (CF(I,100),I= 97,102) /1.975308641975309D-01 - $ ,1.975308641975309D+00,-1.580246913580247D+00 - $ ,1.264197530864197D+01,1.975308641975309D-01, - $ -1.580246913580247D+00/ - DATA (CF(I,100),I=103,108) /-2.469135802469136D-02, - $ -2.469135802469136D-01,-2.469135802469136D-01 - $ ,1.530864197530864D+00,1.530864197530864D+00, - $ -6.913580246913580D-01/ - DATA (CF(I,100),I=109,114) /1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -2.469135802469136D-02/ - DATA (CF(I,100),I=115,120) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,1.753086419753086D+00,1.530864197530864D - $ +00,1.975308641975309D+00,-2.469135802469136D-01/ + DATA (CF(I),I=7030,7050) /4096,128,-1024,-16,-160,-160,992,992, + $ -448,128,-1024,-16,-160,128,-16,-16,128,1136,992,1280,-160/ C 1 T(7,1,5,6,2,3,4) - DATA (CF(I,101),I= 1, 6) /-1.913580246913580D-01, - $ -2.191358024691358D-01,3.086419753086420D-02, - $ -2.469135802469136D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I,101),I= 7, 12) /8.641975308641975D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I,101),I= 13, 18) /3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03,1.975308641975309D-01,-2.469135802469136D-02/ - DATA (CF(I,101),I= 19, 24) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01/ - DATA (CF(I,101),I= 25, 30) /-1.635802469135803D-01 - $ ,5.864197530864197D-02,-1.913580246913580D-01 - $ ,1.530864197530864D+00,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I,101),I= 31, 36) /1.364197530864198D+00, - $ -4.135802469135803D-01,-3.580246913580247D-01 - $ ,1.364197530864198D+00,1.558641975308642D+00, - $ -4.135802469135803D-01/ - DATA (CF(I,101),I= 37, 42) /8.641975308641975D-02, - $ -6.913580246913580D-01,-1.358024691358025D-01, - $ -4.135802469135803D-01,1.530864197530864D+00, - $ -1.913580246913580D-01/ - DATA (CF(I,101),I= 43, 48) /3.086419753086420D-03, - $ -2.469135802469136D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02/ - DATA (CF(I,101),I= 49, 54) /-1.358024691358025D-01, - $ -1.635802469135803D-01,1.586419753086420D+00, - $ -1.913580246913580D-01,3.086419753086420D-01,3.086419753086420D - $ -02/ - DATA (CF(I,101),I= 55, 60) /-3.580246913580247D-01, - $ -1.358024691358025D-01,4.197530864197531D-01, - $ -3.580246913580247D-01,1.586419753086420D+00, - $ -1.358024691358025D-01/ - DATA (CF(I,101),I= 61, 66) /-1.358024691358025D-01 - $ ,8.641975308641975D-02,-3.580246913580247D-01 - $ ,1.364197530864198D+00,-1.913580246913580D-01, - $ -1.635802469135803D-01/ - DATA (CF(I,101),I= 67, 72) /3.086419753086420D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02, - $ -1.913580246913580D-01/ - DATA (CF(I,101),I= 73, 78) /3.086419753086420D-02, - $ -2.469135802469136D-01,3.086419753086420D-01,3.086419753086420D - $ -02,1.975308641975309D+00,-2.469135802469136D-01/ - DATA (CF(I,101),I= 79, 84) /-1.913580246913580D-01 - $ ,1.530864197530864D+00,1.586419753086420D+00,1.558641975308642D - $ +00,1.753086419753086D+00,-2.191358024691358D-01/ - DATA (CF(I,101),I= 85, 90) /-1.635802469135803D-01, - $ -1.913580246913580D-01,-1.358024691358025D-01, - $ -4.135802469135803D-01,-2.191358024691358D-01 - $ ,5.864197530864197D-02/ - DATA (CF(I,101),I= 91, 96) /1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I,101),I= 97,102) /1.975308641975309D-01, - $ -1.580246913580247D+00,1.975308641975309D+00,1.975308641975309D - $ -01,1.264197530864197D+01,-1.580246913580247D+00/ - DATA (CF(I,101),I=103,108) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,1.753086419753086D+00,1.530864197530864D - $ +00,1.975308641975309D+00,-2.469135802469136D-01/ - DATA (CF(I,101),I=109,114) /-2.469135802469136D-01, - $ -2.469135802469136D-02,1.530864197530864D+00, - $ -6.913580246913580D-01,-2.469135802469136D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I,101),I=115,120) /-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02, - $ -2.469135802469136D-01/ + DATA (CF(I),I=7051,7070) /4096,-1024,-16,128,1136,992,1280,-160, + $ -160,-16,992,-448,-160,992,-1024,128,128,-16,-16,-160/ C 1 T(7,1,6,2,5,3,4) - DATA (CF(I,102),I= 1, 6) /8.641975308641975D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I,102),I= 7, 12) /-1.913580246913580D-01, - $ -2.191358024691358D-01,3.086419753086420D-02, - $ -2.469135802469136D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I,102),I= 13, 18) /3.086419753086420D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I,102),I= 19, 24) /-2.469135802469136D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -1.580246913580247D+00/ - DATA (CF(I,102),I= 25, 30) /-1.358024691358025D-01, - $ -1.635802469135803D-01,1.586419753086420D+00, - $ -1.913580246913580D-01,3.086419753086420D-01,3.086419753086420D - $ -02/ - DATA (CF(I,102),I= 31, 36) /-3.580246913580247D-01, - $ -1.358024691358025D-01,4.197530864197531D-01, - $ -3.580246913580247D-01,1.586419753086420D+00, - $ -1.358024691358025D-01/ - DATA (CF(I,102),I= 37, 42) /-1.358024691358025D-01 - $ ,8.641975308641975D-02,-3.580246913580247D-01 - $ ,1.364197530864198D+00,-1.913580246913580D-01, - $ -1.635802469135803D-01/ - DATA (CF(I,102),I= 43, 48) /3.086419753086420D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02, - $ -1.913580246913580D-01/ - DATA (CF(I,102),I= 49, 54) /-1.635802469135803D-01 - $ ,5.864197530864197D-02,-1.913580246913580D-01 - $ ,1.530864197530864D+00,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I,102),I= 55, 60) /1.364197530864198D+00, - $ -4.135802469135803D-01,-3.580246913580247D-01 - $ ,1.364197530864198D+00,1.558641975308642D+00, - $ -4.135802469135803D-01/ - DATA (CF(I,102),I= 61, 66) /8.641975308641975D-02, - $ -6.913580246913580D-01,-1.358024691358025D-01, - $ -4.135802469135803D-01,1.530864197530864D+00, - $ -1.913580246913580D-01/ - DATA (CF(I,102),I= 67, 72) /3.086419753086420D-03, - $ -2.469135802469136D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02/ - DATA (CF(I,102),I= 73, 78) /3.086419753086420D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02, - $ -2.469135802469136D-01,-2.469135802469136D-01 - $ ,1.975308641975309D+00/ - DATA (CF(I,102),I= 79, 84) /-1.635802469135803D-01, - $ -1.913580246913580D-01,-1.358024691358025D-01, - $ -4.135802469135803D-01,-2.191358024691358D-01 - $ ,5.864197530864197D-02/ - DATA (CF(I,102),I= 85, 90) /-1.913580246913580D-01 - $ ,1.530864197530864D+00,1.586419753086420D+00,1.558641975308642D - $ +00,1.753086419753086D+00,-2.191358024691358D-01/ - DATA (CF(I,102),I= 91, 96) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03,3.086419753086420D - $ -02,-2.469135802469136D-02,3.086419753086420D-03/ - DATA (CF(I,102),I= 97,102) /1.975308641975309D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -1.580246913580247D+00,-1.580246913580247D+00 - $ ,1.264197530864197D+01/ - DATA (CF(I,102),I=103,108) /-2.469135802469136D-01, - $ -2.469135802469136D-02,1.530864197530864D+00, - $ -6.913580246913580D-01,-2.469135802469136D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I,102),I=109,114) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,1.753086419753086D+00,1.530864197530864D - $ +00,1.975308641975309D+00,-2.469135802469136D-01/ - DATA (CF(I,102),I=115,120) /1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -2.469135802469136D-02/ + DATA (CF(I),I=7071,7089) /4096,-160,-16,992,-448,-160,992,-16 + $ ,128,1136,992,1280,-160,128,-1024,-16,-160,128,-16/ C 1 T(7,1,6,5,2,3,4) - DATA (CF(I,103),I= 1, 6) /3.086419753086420D-02, - $ -2.469135802469136D-01,3.086419753086420D-01,3.086419753086420D - $ -02,1.975308641975309D+00,-2.469135802469136D-01/ - DATA (CF(I,103),I= 7, 12) /-1.913580246913580D-01 - $ ,1.530864197530864D+00,1.586419753086420D+00,1.558641975308642D - $ +00,1.753086419753086D+00,-2.191358024691358D-01/ - DATA (CF(I,103),I= 13, 18) /-1.635802469135803D-01, - $ -1.913580246913580D-01,-1.358024691358025D-01, - $ -4.135802469135803D-01,-2.191358024691358D-01 - $ ,5.864197530864197D-02/ - DATA (CF(I,103),I= 19, 24) /1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I,103),I= 25, 30) /3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03,1.975308641975309D-01,-2.469135802469136D-02/ - DATA (CF(I,103),I= 31, 36) /3.086419753086420D-02, - $ -2.469135802469136D-01,-1.913580246913580D-01, - $ -2.191358024691358D-01,-2.469135802469136D-02 - $ ,3.086419753086420D-03/ - DATA (CF(I,103),I= 37, 42) /-1.913580246913580D-01 - $ ,3.086419753086420D-02,8.641975308641975D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I,103),I= 43, 48) /-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02, - $ -2.469135802469136D-01/ - DATA (CF(I,103),I= 49, 54) /8.641975308641975D-02, - $ -6.913580246913580D-01,-1.358024691358025D-01, - $ -4.135802469135803D-01,1.530864197530864D+00, - $ -1.913580246913580D-01/ - DATA (CF(I,103),I= 55, 60) /-1.913580246913580D-01 - $ ,1.530864197530864D+00,-1.635802469135803D-01 - $ ,5.864197530864197D-02,-2.469135802469136D-01 - $ ,3.086419753086420D-02/ - DATA (CF(I,103),I= 61, 66) /-3.580246913580247D-01 - $ ,1.364197530864198D+00,1.364197530864198D+00, - $ -4.135802469135803D-01,-4.135802469135803D-01 - $ ,1.558641975308642D+00/ - DATA (CF(I,103),I= 67, 72) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01, - $ -2.191358024691358D-01/ - DATA (CF(I,103),I= 73, 78) /-1.358024691358025D-01 - $ ,8.641975308641975D-02,-3.580246913580247D-01 - $ ,1.364197530864198D+00,-1.913580246913580D-01, - $ -1.635802469135803D-01/ - DATA (CF(I,103),I= 79, 84) /1.586419753086420D+00, - $ -1.913580246913580D-01,-1.358024691358025D-01, - $ -1.635802469135803D-01,3.086419753086420D-02,3.086419753086420D - $ -01/ - DATA (CF(I,103),I= 85, 90) /4.197530864197531D-01, - $ -3.580246913580247D-01,-3.580246913580247D-01, - $ -1.358024691358025D-01,-1.358024691358025D-01 - $ ,1.586419753086420D+00/ - DATA (CF(I,103),I= 91, 96) /3.086419753086420D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02,8.641975308641975D-02,-1.913580246913580D-01/ - DATA (CF(I,103),I= 97,102) /-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02, - $ -2.469135802469136D-01/ - DATA (CF(I,103),I=103,108) /1.264197530864197D+01, - $ -1.580246913580247D+00,-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01,1.975308641975309D - $ +00/ - DATA (CF(I,103),I=109,114) /1.975308641975309D+00, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -2.469135802469136D-02,1.530864197530864D+00,1.753086419753086D - $ +00/ - DATA (CF(I,103),I=115,120) /-2.469135802469136D-01 - $ ,1.530864197530864D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01,-6.913580246913580D-01 - $ ,1.530864197530864D+00/ + DATA (CF(I),I=7090,7107) /4096,-1024,-1024,128,128,1280,1280, + $ -160,128,-16,992,1136,-160,992,-16,-160,-448,992/ C 1 T(7,2,1,5,6,3,4) - DATA (CF(I,104),I= 1, 6) /3.086419753086420D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02, - $ -2.469135802469136D-01,-2.469135802469136D-01 - $ ,1.975308641975309D+00/ - DATA (CF(I,104),I= 7, 12) /-1.635802469135803D-01, - $ -1.913580246913580D-01,-1.358024691358025D-01, - $ -4.135802469135803D-01,-2.191358024691358D-01 - $ ,5.864197530864197D-02/ - DATA (CF(I,104),I= 13, 18) /-1.913580246913580D-01 - $ ,1.530864197530864D+00,1.586419753086420D+00,1.558641975308642D - $ +00,1.753086419753086D+00,-2.191358024691358D-01/ - DATA (CF(I,104),I= 19, 24) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03,3.086419753086420D - $ -02,-2.469135802469136D-02,3.086419753086420D-03/ - DATA (CF(I,104),I= 25, 30) /3.086419753086420D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I,104),I= 31, 36) /-1.913580246913580D-01 - $ ,3.086419753086420D-02,8.641975308641975D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I,104),I= 37, 42) /3.086419753086420D-02, - $ -2.469135802469136D-01,-1.913580246913580D-01, - $ -2.191358024691358D-01,-2.469135802469136D-02 - $ ,3.086419753086420D-03/ - DATA (CF(I,104),I= 43, 48) /1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -2.469135802469136D-02/ - DATA (CF(I,104),I= 49, 54) /-1.358024691358025D-01 - $ ,8.641975308641975D-02,-3.580246913580247D-01 - $ ,1.364197530864198D+00,-1.913580246913580D-01, - $ -1.635802469135803D-01/ - DATA (CF(I,104),I= 55, 60) /1.586419753086420D+00, - $ -1.913580246913580D-01,-1.358024691358025D-01, - $ -1.635802469135803D-01,3.086419753086420D-02,3.086419753086420D - $ -01/ - DATA (CF(I,104),I= 61, 66) /4.197530864197531D-01, - $ -3.580246913580247D-01,-3.580246913580247D-01, - $ -1.358024691358025D-01,-1.358024691358025D-01 - $ ,1.586419753086420D+00/ - DATA (CF(I,104),I= 67, 72) /3.086419753086420D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02,8.641975308641975D-02,-1.913580246913580D-01/ - DATA (CF(I,104),I= 73, 78) /8.641975308641975D-02, - $ -6.913580246913580D-01,-1.358024691358025D-01, - $ -4.135802469135803D-01,1.530864197530864D+00, - $ -1.913580246913580D-01/ - DATA (CF(I,104),I= 79, 84) /-1.913580246913580D-01 - $ ,1.530864197530864D+00,-1.635802469135803D-01 - $ ,5.864197530864197D-02,-2.469135802469136D-01 - $ ,3.086419753086420D-02/ - DATA (CF(I,104),I= 85, 90) /-3.580246913580247D-01 - $ ,1.364197530864198D+00,1.364197530864198D+00, - $ -4.135802469135803D-01,-4.135802469135803D-01 - $ ,1.558641975308642D+00/ - DATA (CF(I,104),I= 91, 96) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01, - $ -2.191358024691358D-01/ - DATA (CF(I,104),I= 97,102) /1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -2.469135802469136D-02/ - DATA (CF(I,104),I=103,108) /-1.580246913580247D+00 - $ ,1.264197530864197D+01,1.975308641975309D-01,1.975308641975309D - $ +00,-1.580246913580247D+00,1.975308641975309D-01/ - DATA (CF(I,104),I=109,114) /-2.469135802469136D-01 - $ ,1.530864197530864D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01,-6.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I,104),I=115,120) /1.975308641975309D+00, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -2.469135802469136D-02,1.530864197530864D+00,1.753086419753086D - $ +00/ + DATA (CF(I),I=7108,7124) /4096,128,1280,-1024,128,-160,992,-16, + $ -160,-448,992,1280,-160,128,-16,992,1136/ C 1 T(7,2,1,6,5,3,4) - DATA (CF(I,105),I= 1, 6) /-1.913580246913580D-01 - $ ,1.530864197530864D+00,-1.635802469135803D-01 - $ ,5.864197530864197D-02,-2.469135802469136D-01 - $ ,3.086419753086420D-02/ - DATA (CF(I,105),I= 7, 12) /8.641975308641975D-02, - $ -6.913580246913580D-01,-1.358024691358025D-01, - $ -4.135802469135803D-01,1.530864197530864D+00, - $ -1.913580246913580D-01/ - DATA (CF(I,105),I= 13, 18) /1.364197530864198D+00, - $ -4.135802469135803D-01,-3.580246913580247D-01 - $ ,1.364197530864198D+00,1.558641975308642D+00, - $ -4.135802469135803D-01/ - DATA (CF(I,105),I= 19, 24) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01/ - DATA (CF(I,105),I= 25, 30) /3.086419753086420D-02, - $ -2.469135802469136D-01,-1.913580246913580D-01, - $ -2.191358024691358D-01,-2.469135802469136D-02 - $ ,3.086419753086420D-03/ - DATA (CF(I,105),I= 31, 36) /3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03,1.975308641975309D-01,-2.469135802469136D-02/ - DATA (CF(I,105),I= 37, 42) /8.641975308641975D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I,105),I= 43, 48) /1.975308641975309D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02/ - DATA (CF(I,105),I= 49, 54) /-1.913580246913580D-01 - $ ,1.530864197530864D+00,1.586419753086420D+00,1.558641975308642D - $ +00,1.753086419753086D+00,-2.191358024691358D-01/ - DATA (CF(I,105),I= 55, 60) /3.086419753086420D-02, - $ -2.469135802469136D-01,3.086419753086420D-01,3.086419753086420D - $ -02,1.975308641975309D+00,-2.469135802469136D-01/ - DATA (CF(I,105),I= 61, 66) /-1.358024691358025D-01, - $ -4.135802469135803D-01,-1.635802469135803D-01, - $ -1.913580246913580D-01,5.864197530864197D-02, - $ -2.191358024691358D-01/ - DATA (CF(I,105),I= 67, 72) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,1.975308641975309D-01, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I,105),I= 73, 78) /-3.580246913580247D-01, - $ -1.358024691358025D-01,4.197530864197531D-01, - $ -3.580246913580247D-01,1.586419753086420D+00, - $ -1.358024691358025D-01/ - DATA (CF(I,105),I= 79, 84) /-1.358024691358025D-01, - $ -1.635802469135803D-01,1.586419753086420D+00, - $ -1.913580246913580D-01,3.086419753086420D-01,3.086419753086420D - $ -02/ - DATA (CF(I,105),I= 85, 90) /-3.580246913580247D-01 - $ ,1.364197530864198D+00,-1.358024691358025D-01 - $ ,8.641975308641975D-02,-1.635802469135803D-01, - $ -1.913580246913580D-01/ - DATA (CF(I,105),I= 91, 96) /-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02,3.086419753086420D - $ -03,-1.913580246913580D-01,3.086419753086420D-02/ - DATA (CF(I,105),I= 97,102) /1.975308641975309D-01, - $ -2.469135802469136D-02,1.975308641975309D+00, - $ -2.469135802469136D-01,1.753086419753086D+00,1.530864197530864D - $ +00/ - DATA (CF(I,105),I=103,108) /-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.264197530864197D+01, - $ -1.580246913580247D+00,1.975308641975309D+00,1.975308641975309D - $ -01/ - DATA (CF(I,105),I=109,114) /1.975308641975309D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02/ - DATA (CF(I,105),I=115,120) /1.530864197530864D+00, - $ -6.913580246913580D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02,1.530864197530864D+00, - $ -2.469135802469136D-01/ + DATA (CF(I),I=7125,7140) /4096,-1024,1280,128,128,-16,-1024,128, + $ -160,-16,992,-448,-160,-16,992,-160/ C 1 T(7,2,5,1,6,3,4) - DATA (CF(I,106),I= 1, 6) /1.586419753086420D+00, - $ -1.913580246913580D-01,-1.358024691358025D-01, - $ -1.635802469135803D-01,3.086419753086420D-02,3.086419753086420D - $ -01/ - DATA (CF(I,106),I= 7, 12) /-1.358024691358025D-01 - $ ,8.641975308641975D-02,-3.580246913580247D-01 - $ ,1.364197530864198D+00,-1.913580246913580D-01, - $ -1.635802469135803D-01/ - DATA (CF(I,106),I= 13, 18) /-3.580246913580247D-01, - $ -1.358024691358025D-01,4.197530864197531D-01, - $ -3.580246913580247D-01,1.586419753086420D+00, - $ -1.358024691358025D-01/ - DATA (CF(I,106),I= 19, 24) /3.086419753086420D-03 - $ ,3.086419753086420D-02,3.086419753086420D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,8.641975308641975D-02/ - DATA (CF(I,106),I= 25, 30) /-1.913580246913580D-01 - $ ,3.086419753086420D-02,8.641975308641975D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I,106),I= 31, 36) /3.086419753086420D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I,106),I= 37, 42) /-1.913580246913580D-01, - $ -2.191358024691358D-01,3.086419753086420D-02, - $ -2.469135802469136D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I,106),I= 43, 48) /-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I,106),I= 49, 54) /-1.635802469135803D-01, - $ -1.913580246913580D-01,-1.358024691358025D-01, - $ -4.135802469135803D-01,-2.191358024691358D-01 - $ ,5.864197530864197D-02/ - DATA (CF(I,106),I= 55, 60) /3.086419753086420D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02, - $ -2.469135802469136D-01,-2.469135802469136D-01 - $ ,1.975308641975309D+00/ - DATA (CF(I,106),I= 61, 66) /1.586419753086420D+00 - $ ,1.558641975308642D+00,-1.913580246913580D-01 - $ ,1.530864197530864D+00,-2.191358024691358D-01 - $ ,1.753086419753086D+00/ - DATA (CF(I,106),I= 67, 72) /3.086419753086420D-03 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I,106),I= 73, 78) /1.364197530864198D+00, - $ -4.135802469135803D-01,-3.580246913580247D-01 - $ ,1.364197530864198D+00,1.558641975308642D+00, - $ -4.135802469135803D-01/ - DATA (CF(I,106),I= 79, 84) /-1.635802469135803D-01 - $ ,5.864197530864197D-02,-1.913580246913580D-01 - $ ,1.530864197530864D+00,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I,106),I= 85, 90) /-1.358024691358025D-01, - $ -4.135802469135803D-01,8.641975308641975D-02, - $ -6.913580246913580D-01,-1.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I,106),I= 91, 96) /-2.191358024691358D-01, - $ -1.913580246913580D-01,3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I,106),I= 97,102) /-2.469135802469136D-02, - $ -2.469135802469136D-01,-2.469135802469136D-01 - $ ,1.530864197530864D+00,1.530864197530864D+00, - $ -6.913580246913580D-01/ - DATA (CF(I,106),I=103,108) /1.975308641975309D-01 - $ ,1.975308641975309D+00,-1.580246913580247D+00 - $ ,1.264197530864197D+01,1.975308641975309D-01, - $ -1.580246913580247D+00/ - DATA (CF(I,106),I=109,114) /-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I,106),I=115,120) /1.753086419753086D+00 - $ ,1.530864197530864D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01,-2.469135802469136D-01 - $ ,1.975308641975309D+00/ + DATA (CF(I),I=7141,7155) /4096,128,-1024,-16,-160,128,-1024,-16 + $ ,128,1136,992,-16,128,-160,1280/ C 1 T(7,2,5,6,1,3,4) - DATA (CF(I,107),I= 1, 6) /-1.635802469135803D-01 - $ ,5.864197530864197D-02,-1.913580246913580D-01 - $ ,1.530864197530864D+00,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I,107),I= 7, 12) /1.364197530864198D+00, - $ -4.135802469135803D-01,-3.580246913580247D-01 - $ ,1.364197530864198D+00,1.558641975308642D+00, - $ -4.135802469135803D-01/ - DATA (CF(I,107),I= 13, 18) /8.641975308641975D-02, - $ -6.913580246913580D-01,-1.358024691358025D-01, - $ -4.135802469135803D-01,1.530864197530864D+00, - $ -1.913580246913580D-01/ - DATA (CF(I,107),I= 19, 24) /3.086419753086420D-03, - $ -2.469135802469136D-02,-2.191358024691358D-01, - $ -1.913580246913580D-01,-2.469135802469136D-01 - $ ,3.086419753086420D-02/ - DATA (CF(I,107),I= 25, 30) /-1.913580246913580D-01, - $ -2.191358024691358D-01,3.086419753086420D-02, - $ -2.469135802469136D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I,107),I= 31, 36) /8.641975308641975D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I,107),I= 37, 42) /3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03,1.975308641975309D-01,-2.469135802469136D-02/ - DATA (CF(I,107),I= 43, 48) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01/ - DATA (CF(I,107),I= 49, 54) /-3.580246913580247D-01, - $ -1.358024691358025D-01,4.197530864197531D-01, - $ -3.580246913580247D-01,1.586419753086420D+00, - $ -1.358024691358025D-01/ - DATA (CF(I,107),I= 55, 60) /-1.358024691358025D-01, - $ -1.635802469135803D-01,1.586419753086420D+00, - $ -1.913580246913580D-01,3.086419753086420D-01,3.086419753086420D - $ -02/ - DATA (CF(I,107),I= 61, 66) /-3.580246913580247D-01 - $ ,1.364197530864198D+00,-1.358024691358025D-01 - $ ,8.641975308641975D-02,-1.635802469135803D-01, - $ -1.913580246913580D-01/ - DATA (CF(I,107),I= 67, 72) /-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02,3.086419753086420D - $ -03,-1.913580246913580D-01,3.086419753086420D-02/ - DATA (CF(I,107),I= 73, 78) /-1.913580246913580D-01 - $ ,1.530864197530864D+00,1.586419753086420D+00,1.558641975308642D - $ +00,1.753086419753086D+00,-2.191358024691358D-01/ - DATA (CF(I,107),I= 79, 84) /3.086419753086420D-02, - $ -2.469135802469136D-01,3.086419753086420D-01,3.086419753086420D - $ -02,1.975308641975309D+00,-2.469135802469136D-01/ - DATA (CF(I,107),I= 85, 90) /-1.358024691358025D-01, - $ -4.135802469135803D-01,-1.635802469135803D-01, - $ -1.913580246913580D-01,5.864197530864197D-02, - $ -2.191358024691358D-01/ - DATA (CF(I,107),I= 91, 96) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,1.975308641975309D-01, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I,107),I= 97,102) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,1.753086419753086D+00,1.530864197530864D - $ +00,1.975308641975309D+00,-2.469135802469136D-01/ - DATA (CF(I,107),I=103,108) /1.975308641975309D-01, - $ -1.580246913580247D+00,1.975308641975309D+00,1.975308641975309D - $ -01,1.264197530864197D+01,-1.580246913580247D+00/ - DATA (CF(I,107),I=109,114) /1.530864197530864D+00, - $ -6.913580246913580D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02,1.530864197530864D+00, - $ -2.469135802469136D-01/ - DATA (CF(I,107),I=115,120) /1.975308641975309D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02/ + DATA (CF(I),I=7156,7169) /4096,-1024,992,-448,-160,-16,992,-160 + $ ,128,-16,-1024,128,-160,-16/ C 1 T(7,2,6,1,5,3,4) - DATA (CF(I,108),I= 1, 6) /-1.358024691358025D-01, - $ -1.635802469135803D-01,1.586419753086420D+00, - $ -1.913580246913580D-01,3.086419753086420D-01,3.086419753086420D - $ -02/ - DATA (CF(I,108),I= 7, 12) /-3.580246913580247D-01, - $ -1.358024691358025D-01,4.197530864197531D-01, - $ -3.580246913580247D-01,1.586419753086420D+00, - $ -1.358024691358025D-01/ - DATA (CF(I,108),I= 13, 18) /-1.358024691358025D-01 - $ ,8.641975308641975D-02,-3.580246913580247D-01 - $ ,1.364197530864198D+00,-1.913580246913580D-01, - $ -1.635802469135803D-01/ - DATA (CF(I,108),I= 19, 24) /3.086419753086420D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02, - $ -1.913580246913580D-01/ - DATA (CF(I,108),I= 25, 30) /8.641975308641975D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I,108),I= 31, 36) /-1.913580246913580D-01, - $ -2.191358024691358D-01,3.086419753086420D-02, - $ -2.469135802469136D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I,108),I= 37, 42) /3.086419753086420D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I,108),I= 43, 48) /-2.469135802469136D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -1.580246913580247D+00/ - DATA (CF(I,108),I= 49, 54) /1.364197530864198D+00, - $ -4.135802469135803D-01,-3.580246913580247D-01 - $ ,1.364197530864198D+00,1.558641975308642D+00, - $ -4.135802469135803D-01/ - DATA (CF(I,108),I= 55, 60) /-1.635802469135803D-01 - $ ,5.864197530864197D-02,-1.913580246913580D-01 - $ ,1.530864197530864D+00,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I,108),I= 61, 66) /-1.358024691358025D-01, - $ -4.135802469135803D-01,8.641975308641975D-02, - $ -6.913580246913580D-01,-1.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I,108),I= 67, 72) /-2.191358024691358D-01, - $ -1.913580246913580D-01,3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I,108),I= 73, 78) /-1.635802469135803D-01, - $ -1.913580246913580D-01,-1.358024691358025D-01, - $ -4.135802469135803D-01,-2.191358024691358D-01 - $ ,5.864197530864197D-02/ - DATA (CF(I,108),I= 79, 84) /3.086419753086420D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02, - $ -2.469135802469136D-01,-2.469135802469136D-01 - $ ,1.975308641975309D+00/ - DATA (CF(I,108),I= 85, 90) /1.586419753086420D+00 - $ ,1.558641975308642D+00,-1.913580246913580D-01 - $ ,1.530864197530864D+00,-2.191358024691358D-01 - $ ,1.753086419753086D+00/ - DATA (CF(I,108),I= 91, 96) /3.086419753086420D-03 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I,108),I= 97,102) /-2.469135802469136D-01, - $ -2.469135802469136D-02,1.530864197530864D+00, - $ -6.913580246913580D-01,-2.469135802469136D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I,108),I=103,108) /1.975308641975309D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -1.580246913580247D+00,-1.580246913580247D+00 - $ ,1.264197530864197D+01/ - DATA (CF(I,108),I=109,114) /1.753086419753086D+00 - $ ,1.530864197530864D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01,-2.469135802469136D-01 - $ ,1.975308641975309D+00/ - DATA (CF(I,108),I=115,120) /-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ + DATA (CF(I),I=7170,7182) /4096,1136,992,-16,128,-160,1280,-16, + $ -160,128,-1024,-16,128/ C 1 T(7,2,6,5,1,3,4) - DATA (CF(I,109),I= 1, 6) /-1.913580246913580D-01 - $ ,1.530864197530864D+00,1.586419753086420D+00,1.558641975308642D - $ +00,1.753086419753086D+00,-2.191358024691358D-01/ - DATA (CF(I,109),I= 7, 12) /3.086419753086420D-02, - $ -2.469135802469136D-01,3.086419753086420D-01,3.086419753086420D - $ -02,1.975308641975309D+00,-2.469135802469136D-01/ - DATA (CF(I,109),I= 13, 18) /-1.358024691358025D-01, - $ -4.135802469135803D-01,-1.635802469135803D-01, - $ -1.913580246913580D-01,5.864197530864197D-02, - $ -2.191358024691358D-01/ - DATA (CF(I,109),I= 19, 24) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,1.975308641975309D-01, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I,109),I= 25, 30) /8.641975308641975D-02, - $ -6.913580246913580D-01,-1.358024691358025D-01, - $ -4.135802469135803D-01,1.530864197530864D+00, - $ -1.913580246913580D-01/ - DATA (CF(I,109),I= 31, 36) /-1.913580246913580D-01 - $ ,1.530864197530864D+00,-1.635802469135803D-01 - $ ,5.864197530864197D-02,-2.469135802469136D-01 - $ ,3.086419753086420D-02/ - DATA (CF(I,109),I= 37, 42) /-3.580246913580247D-01 - $ ,1.364197530864198D+00,1.364197530864198D+00, - $ -4.135802469135803D-01,-4.135802469135803D-01 - $ ,1.558641975308642D+00/ - DATA (CF(I,109),I= 43, 48) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01, - $ -2.191358024691358D-01/ - DATA (CF(I,109),I= 49, 54) /3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03,1.975308641975309D-01,-2.469135802469136D-02/ - DATA (CF(I,109),I= 55, 60) /3.086419753086420D-02, - $ -2.469135802469136D-01,-1.913580246913580D-01, - $ -2.191358024691358D-01,-2.469135802469136D-02 - $ ,3.086419753086420D-03/ - DATA (CF(I,109),I= 61, 66) /-1.913580246913580D-01 - $ ,3.086419753086420D-02,8.641975308641975D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I,109),I= 67, 72) /-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02, - $ -2.469135802469136D-01/ - DATA (CF(I,109),I= 73, 78) /-3.580246913580247D-01 - $ ,1.364197530864198D+00,-1.358024691358025D-01 - $ ,8.641975308641975D-02,-1.635802469135803D-01, - $ -1.913580246913580D-01/ - DATA (CF(I,109),I= 79, 84) /4.197530864197531D-01, - $ -3.580246913580247D-01,-3.580246913580247D-01, - $ -1.358024691358025D-01,-1.358024691358025D-01 - $ ,1.586419753086420D+00/ - DATA (CF(I,109),I= 85, 90) /1.586419753086420D+00, - $ -1.913580246913580D-01,-1.358024691358025D-01, - $ -1.635802469135803D-01,3.086419753086420D-02,3.086419753086420D - $ -01/ - DATA (CF(I,109),I= 91, 96) /-1.913580246913580D-01 - $ ,3.086419753086420D-02,8.641975308641975D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I,109),I= 97,102) /1.975308641975309D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02/ - DATA (CF(I,109),I=103,108) /1.975308641975309D+00, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -2.469135802469136D-02,1.530864197530864D+00,1.753086419753086D - $ +00/ - DATA (CF(I,109),I=109,114) /1.264197530864197D+01, - $ -1.580246913580247D+00,-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01,1.975308641975309D - $ +00/ - DATA (CF(I,109),I=115,120) /1.530864197530864D+00, - $ -2.469135802469136D-01,-6.913580246913580D-01 - $ ,1.530864197530864D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01/ + DATA (CF(I),I=7183,7194) /4096,-1024,-1024,128,128,1280,992,-160 + $ ,-448,992,-16,-160/ C 1 T(7,5,1,2,6,3,4) - DATA (CF(I,110),I= 1, 6) /-1.635802469135803D-01, - $ -1.913580246913580D-01,-1.358024691358025D-01, - $ -4.135802469135803D-01,-2.191358024691358D-01 - $ ,5.864197530864197D-02/ - DATA (CF(I,110),I= 7, 12) /3.086419753086420D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02, - $ -2.469135802469136D-01,-2.469135802469136D-01 - $ ,1.975308641975309D+00/ - DATA (CF(I,110),I= 13, 18) /1.586419753086420D+00 - $ ,1.558641975308642D+00,-1.913580246913580D-01 - $ ,1.530864197530864D+00,-2.191358024691358D-01 - $ ,1.753086419753086D+00/ - DATA (CF(I,110),I= 19, 24) /3.086419753086420D-03 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I,110),I= 25, 30) /-1.358024691358025D-01 - $ ,8.641975308641975D-02,-3.580246913580247D-01 - $ ,1.364197530864198D+00,-1.913580246913580D-01, - $ -1.635802469135803D-01/ - DATA (CF(I,110),I= 31, 36) /1.586419753086420D+00, - $ -1.913580246913580D-01,-1.358024691358025D-01, - $ -1.635802469135803D-01,3.086419753086420D-02,3.086419753086420D - $ -01/ - DATA (CF(I,110),I= 37, 42) /4.197530864197531D-01, - $ -3.580246913580247D-01,-3.580246913580247D-01, - $ -1.358024691358025D-01,-1.358024691358025D-01 - $ ,1.586419753086420D+00/ - DATA (CF(I,110),I= 43, 48) /3.086419753086420D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02,8.641975308641975D-02,-1.913580246913580D-01/ - DATA (CF(I,110),I= 49, 54) /3.086419753086420D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I,110),I= 55, 60) /-1.913580246913580D-01 - $ ,3.086419753086420D-02,8.641975308641975D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I,110),I= 61, 66) /3.086419753086420D-02, - $ -2.469135802469136D-01,-1.913580246913580D-01, - $ -2.191358024691358D-01,-2.469135802469136D-02 - $ ,3.086419753086420D-03/ - DATA (CF(I,110),I= 67, 72) /1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -2.469135802469136D-02/ - DATA (CF(I,110),I= 73, 78) /-1.358024691358025D-01, - $ -4.135802469135803D-01,8.641975308641975D-02, - $ -6.913580246913580D-01,-1.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I,110),I= 79, 84) /-3.580246913580247D-01 - $ ,1.364197530864198D+00,1.364197530864198D+00, - $ -4.135802469135803D-01,-4.135802469135803D-01 - $ ,1.558641975308642D+00/ - DATA (CF(I,110),I= 85, 90) /-1.913580246913580D-01 - $ ,1.530864197530864D+00,-1.635802469135803D-01 - $ ,5.864197530864197D-02,-2.469135802469136D-01 - $ ,3.086419753086420D-02/ - DATA (CF(I,110),I= 91, 96) /3.086419753086420D-02, - $ -2.469135802469136D-01,-1.913580246913580D-01, - $ -2.191358024691358D-01,-2.469135802469136D-02 - $ ,3.086419753086420D-03/ - DATA (CF(I,110),I= 97,102) /-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I,110),I=103,108) /-2.469135802469136D-01 - $ ,1.530864197530864D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01,-6.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I,110),I=109,114) /-1.580246913580247D+00 - $ ,1.264197530864197D+01,1.975308641975309D-01,1.975308641975309D - $ +00,-1.580246913580247D+00,1.975308641975309D-01/ - DATA (CF(I,110),I=115,120) /-2.469135802469136D-01 - $ ,1.975308641975309D+00,1.530864197530864D+00,1.753086419753086D - $ +00,1.975308641975309D-01,-2.469135802469136D-02/ + DATA (CF(I),I=7195,7205) /4096,128,1280,-1024,128,-160,1280,992 + $ ,1136,128,-16/ C 1 T(7,5,1,6,2,3,4) - DATA (CF(I,111),I= 1, 6) /8.641975308641975D-02, - $ -6.913580246913580D-01,-1.358024691358025D-01, - $ -4.135802469135803D-01,1.530864197530864D+00, - $ -1.913580246913580D-01/ - DATA (CF(I,111),I= 7, 12) /-1.913580246913580D-01 - $ ,1.530864197530864D+00,-1.635802469135803D-01 - $ ,5.864197530864197D-02,-2.469135802469136D-01 - $ ,3.086419753086420D-02/ - DATA (CF(I,111),I= 13, 18) /-3.580246913580247D-01 - $ ,1.364197530864198D+00,1.364197530864198D+00, - $ -4.135802469135803D-01,-4.135802469135803D-01 - $ ,1.558641975308642D+00/ - DATA (CF(I,111),I= 19, 24) /-2.469135802469136D-01 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,3.086419753086420D-03,-1.913580246913580D-01, - $ -2.191358024691358D-01/ - DATA (CF(I,111),I= 25, 30) /-1.913580246913580D-01 - $ ,1.530864197530864D+00,1.586419753086420D+00,1.558641975308642D - $ +00,1.753086419753086D+00,-2.191358024691358D-01/ - DATA (CF(I,111),I= 31, 36) /3.086419753086420D-02, - $ -2.469135802469136D-01,3.086419753086420D-01,3.086419753086420D - $ -02,1.975308641975309D+00,-2.469135802469136D-01/ - DATA (CF(I,111),I= 37, 42) /-1.358024691358025D-01, - $ -4.135802469135803D-01,-1.635802469135803D-01, - $ -1.913580246913580D-01,5.864197530864197D-02, - $ -2.191358024691358D-01/ - DATA (CF(I,111),I= 43, 48) /-2.469135802469136D-02 - $ ,3.086419753086420D-03,1.975308641975309D-01, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I,111),I= 49, 54) /3.086419753086420D-02, - $ -2.469135802469136D-01,-1.913580246913580D-01, - $ -2.191358024691358D-01,-2.469135802469136D-02 - $ ,3.086419753086420D-03/ - DATA (CF(I,111),I= 55, 60) /3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03,1.975308641975309D-01,-2.469135802469136D-02/ - DATA (CF(I,111),I= 61, 66) /8.641975308641975D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I,111),I= 67, 72) /1.975308641975309D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02/ - DATA (CF(I,111),I= 73, 78) /4.197530864197531D-01, - $ -3.580246913580247D-01,-3.580246913580247D-01, - $ -1.358024691358025D-01,-1.358024691358025D-01 - $ ,1.586419753086420D+00/ - DATA (CF(I,111),I= 79, 84) /-3.580246913580247D-01 - $ ,1.364197530864198D+00,-1.358024691358025D-01 - $ ,8.641975308641975D-02,-1.635802469135803D-01, - $ -1.913580246913580D-01/ - DATA (CF(I,111),I= 85, 90) /-1.358024691358025D-01, - $ -1.635802469135803D-01,1.586419753086420D+00, - $ -1.913580246913580D-01,3.086419753086420D-01,3.086419753086420D - $ -02/ - DATA (CF(I,111),I= 91, 96) /8.641975308641975D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I,111),I= 97,102) /1.975308641975309D+00, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -2.469135802469136D-02,1.530864197530864D+00,1.753086419753086D - $ +00/ - DATA (CF(I,111),I=103,108) /1.975308641975309D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02/ - DATA (CF(I,111),I=109,114) /-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.264197530864197D+01, - $ -1.580246913580247D+00,1.975308641975309D+00,1.975308641975309D - $ -01/ - DATA (CF(I,111),I=115,120) /-6.913580246913580D-01 - $ ,1.530864197530864D+00,1.530864197530864D+00, - $ -2.469135802469136D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02/ + DATA (CF(I),I=7206,7215) /4096,-1024,1280,128,-448,992,992,-160, + $ -160,-16/ C 1 T(7,5,2,1,6,3,4) - DATA (CF(I,112),I= 1, 6) /-1.358024691358025D-01 - $ ,8.641975308641975D-02,-3.580246913580247D-01 - $ ,1.364197530864198D+00,-1.913580246913580D-01, - $ -1.635802469135803D-01/ - DATA (CF(I,112),I= 7, 12) /1.586419753086420D+00, - $ -1.913580246913580D-01,-1.358024691358025D-01, - $ -1.635802469135803D-01,3.086419753086420D-02,3.086419753086420D - $ -01/ - DATA (CF(I,112),I= 13, 18) /4.197530864197531D-01, - $ -3.580246913580247D-01,-3.580246913580247D-01, - $ -1.358024691358025D-01,-1.358024691358025D-01 - $ ,1.586419753086420D+00/ - DATA (CF(I,112),I= 19, 24) /3.086419753086420D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02,8.641975308641975D-02,-1.913580246913580D-01/ - DATA (CF(I,112),I= 25, 30) /-1.635802469135803D-01, - $ -1.913580246913580D-01,-1.358024691358025D-01, - $ -4.135802469135803D-01,-2.191358024691358D-01 - $ ,5.864197530864197D-02/ - DATA (CF(I,112),I= 31, 36) /3.086419753086420D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02, - $ -2.469135802469136D-01,-2.469135802469136D-01 - $ ,1.975308641975309D+00/ - DATA (CF(I,112),I= 37, 42) /1.586419753086420D+00 - $ ,1.558641975308642D+00,-1.913580246913580D-01 - $ ,1.530864197530864D+00,-2.191358024691358D-01 - $ ,1.753086419753086D+00/ - DATA (CF(I,112),I= 43, 48) /3.086419753086420D-03 - $ ,3.086419753086420D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I,112),I= 49, 54) /-1.913580246913580D-01 - $ ,3.086419753086420D-02,8.641975308641975D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I,112),I= 55, 60) /3.086419753086420D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I,112),I= 61, 66) /-1.913580246913580D-01, - $ -2.191358024691358D-01,3.086419753086420D-02, - $ -2.469135802469136D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I,112),I= 67, 72) /-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I,112),I= 73, 78) /-3.580246913580247D-01 - $ ,1.364197530864198D+00,1.364197530864198D+00, - $ -4.135802469135803D-01,-4.135802469135803D-01 - $ ,1.558641975308642D+00/ - DATA (CF(I,112),I= 79, 84) /-1.358024691358025D-01, - $ -4.135802469135803D-01,8.641975308641975D-02, - $ -6.913580246913580D-01,-1.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I,112),I= 85, 90) /-1.635802469135803D-01 - $ ,5.864197530864197D-02,-1.913580246913580D-01 - $ ,1.530864197530864D+00,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I,112),I= 91, 96) /-1.913580246913580D-01, - $ -2.191358024691358D-01,3.086419753086420D-02, - $ -2.469135802469136D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I,112),I= 97,102) /-2.469135802469136D-01 - $ ,1.530864197530864D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01,-6.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I,112),I=103,108) /-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I,112),I=109,114) /1.975308641975309D-01 - $ ,1.975308641975309D+00,-1.580246913580247D+00 - $ ,1.264197530864197D+01,1.975308641975309D-01, - $ -1.580246913580247D+00/ - DATA (CF(I,112),I=115,120) /1.530864197530864D+00 - $ ,1.753086419753086D+00,-2.469135802469136D-01 - $ ,1.975308641975309D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ + DATA (CF(I),I=7216,7224) /4096,128,-1024,992,1136,-160,1280,-16 + $ ,128/ C 1 T(7,5,2,6,1,3,4) - DATA (CF(I,113),I= 1, 6) /1.364197530864198D+00, - $ -4.135802469135803D-01,-3.580246913580247D-01 - $ ,1.364197530864198D+00,1.558641975308642D+00, - $ -4.135802469135803D-01/ - DATA (CF(I,113),I= 7, 12) /-1.635802469135803D-01 - $ ,5.864197530864197D-02,-1.913580246913580D-01 - $ ,1.530864197530864D+00,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I,113),I= 13, 18) /-1.358024691358025D-01, - $ -4.135802469135803D-01,8.641975308641975D-02, - $ -6.913580246913580D-01,-1.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I,113),I= 19, 24) /-2.191358024691358D-01, - $ -1.913580246913580D-01,3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I,113),I= 25, 30) /-3.580246913580247D-01, - $ -1.358024691358025D-01,4.197530864197531D-01, - $ -3.580246913580247D-01,1.586419753086420D+00, - $ -1.358024691358025D-01/ - DATA (CF(I,113),I= 31, 36) /-1.358024691358025D-01, - $ -1.635802469135803D-01,1.586419753086420D+00, - $ -1.913580246913580D-01,3.086419753086420D-01,3.086419753086420D - $ -02/ - DATA (CF(I,113),I= 37, 42) /-3.580246913580247D-01 - $ ,1.364197530864198D+00,-1.358024691358025D-01 - $ ,8.641975308641975D-02,-1.635802469135803D-01, - $ -1.913580246913580D-01/ - DATA (CF(I,113),I= 43, 48) /-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02,3.086419753086420D - $ -03,-1.913580246913580D-01,3.086419753086420D-02/ - DATA (CF(I,113),I= 49, 54) /-1.913580246913580D-01, - $ -2.191358024691358D-01,3.086419753086420D-02, - $ -2.469135802469136D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I,113),I= 55, 60) /8.641975308641975D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I,113),I= 61, 66) /3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03,1.975308641975309D-01,-2.469135802469136D-02/ - DATA (CF(I,113),I= 67, 72) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01/ - DATA (CF(I,113),I= 73, 78) /1.586419753086420D+00 - $ ,1.558641975308642D+00,-1.913580246913580D-01 - $ ,1.530864197530864D+00,-2.191358024691358D-01 - $ ,1.753086419753086D+00/ - DATA (CF(I,113),I= 79, 84) /-1.358024691358025D-01, - $ -4.135802469135803D-01,-1.635802469135803D-01, - $ -1.913580246913580D-01,5.864197530864197D-02, - $ -2.191358024691358D-01/ - DATA (CF(I,113),I= 85, 90) /3.086419753086420D-02, - $ -2.469135802469136D-01,3.086419753086420D-01,3.086419753086420D - $ -02,1.975308641975309D+00,-2.469135802469136D-01/ - DATA (CF(I,113),I= 91, 96) /3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03,1.975308641975309D-01,-2.469135802469136D-02/ - DATA (CF(I,113),I= 97,102) /1.753086419753086D+00 - $ ,1.530864197530864D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01,-2.469135802469136D-01 - $ ,1.975308641975309D+00/ - DATA (CF(I,113),I=103,108) /1.530864197530864D+00, - $ -6.913580246913580D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02,1.530864197530864D+00, - $ -2.469135802469136D-01/ - DATA (CF(I,113),I=109,114) /1.975308641975309D-01, - $ -1.580246913580247D+00,1.975308641975309D+00,1.975308641975309D - $ -01,1.264197530864197D+01,-1.580246913580247D+00/ - DATA (CF(I,113),I=115,120) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01/ + DATA (CF(I),I=7225,7232) /4096,-1024,-16,128,-160,-16,-1024,128/ C 1 T(7,5,6,1,2,3,4) - DATA (CF(I,114),I= 1, 6) /-3.580246913580247D-01, - $ -1.358024691358025D-01,4.197530864197531D-01, - $ -3.580246913580247D-01,1.586419753086420D+00, - $ -1.358024691358025D-01/ - DATA (CF(I,114),I= 7, 12) /-1.358024691358025D-01, - $ -1.635802469135803D-01,1.586419753086420D+00, - $ -1.913580246913580D-01,3.086419753086420D-01,3.086419753086420D - $ -02/ - DATA (CF(I,114),I= 13, 18) /-3.580246913580247D-01 - $ ,1.364197530864198D+00,-1.358024691358025D-01 - $ ,8.641975308641975D-02,-1.635802469135803D-01, - $ -1.913580246913580D-01/ - DATA (CF(I,114),I= 19, 24) /-1.913580246913580D-01 - $ ,8.641975308641975D-02,3.086419753086420D-02,3.086419753086420D - $ -03,-1.913580246913580D-01,3.086419753086420D-02/ - DATA (CF(I,114),I= 25, 30) /1.364197530864198D+00, - $ -4.135802469135803D-01,-3.580246913580247D-01 - $ ,1.364197530864198D+00,1.558641975308642D+00, - $ -4.135802469135803D-01/ - DATA (CF(I,114),I= 31, 36) /-1.635802469135803D-01 - $ ,5.864197530864197D-02,-1.913580246913580D-01 - $ ,1.530864197530864D+00,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I,114),I= 37, 42) /-1.358024691358025D-01, - $ -4.135802469135803D-01,8.641975308641975D-02, - $ -6.913580246913580D-01,-1.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I,114),I= 43, 48) /-2.191358024691358D-01, - $ -1.913580246913580D-01,3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I,114),I= 49, 54) /8.641975308641975D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I,114),I= 55, 60) /-1.913580246913580D-01, - $ -2.191358024691358D-01,3.086419753086420D-02, - $ -2.469135802469136D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I,114),I= 61, 66) /3.086419753086420D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I,114),I= 67, 72) /-2.469135802469136D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -1.580246913580247D+00/ - DATA (CF(I,114),I= 73, 78) /-1.358024691358025D-01, - $ -4.135802469135803D-01,-1.635802469135803D-01, - $ -1.913580246913580D-01,5.864197530864197D-02, - $ -2.191358024691358D-01/ - DATA (CF(I,114),I= 79, 84) /1.586419753086420D+00 - $ ,1.558641975308642D+00,-1.913580246913580D-01 - $ ,1.530864197530864D+00,-2.191358024691358D-01 - $ ,1.753086419753086D+00/ - DATA (CF(I,114),I= 85, 90) /3.086419753086420D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02, - $ -2.469135802469136D-01,-2.469135802469136D-01 - $ ,1.975308641975309D+00/ - DATA (CF(I,114),I= 91, 96) /3.086419753086420D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I,114),I= 97,102) /1.530864197530864D+00, - $ -6.913580246913580D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02,1.530864197530864D+00, - $ -2.469135802469136D-01/ - DATA (CF(I,114),I=103,108) /1.753086419753086D+00 - $ ,1.530864197530864D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01,-2.469135802469136D-01 - $ ,1.975308641975309D+00/ - DATA (CF(I,114),I=109,114) /1.975308641975309D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -1.580246913580247D+00,-1.580246913580247D+00 - $ ,1.264197530864197D+01/ - DATA (CF(I,114),I=115,120) /-2.469135802469136D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -1.580246913580247D+00/ + DATA (CF(I),I=7233,7239) /4096,-160,-16,-16,128,128,-1024/ C 1 T(7,5,6,2,1,3,4) - DATA (CF(I,115),I= 1, 6) /1.586419753086420D+00 - $ ,1.558641975308642D+00,-1.913580246913580D-01 - $ ,1.530864197530864D+00,-2.191358024691358D-01 - $ ,1.753086419753086D+00/ - DATA (CF(I,115),I= 7, 12) /-1.358024691358025D-01, - $ -4.135802469135803D-01,-1.635802469135803D-01, - $ -1.913580246913580D-01,5.864197530864197D-02, - $ -2.191358024691358D-01/ - DATA (CF(I,115),I= 13, 18) /3.086419753086420D-02, - $ -2.469135802469136D-01,3.086419753086420D-01,3.086419753086420D - $ -02,1.975308641975309D+00,-2.469135802469136D-01/ - DATA (CF(I,115),I= 19, 24) /3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03,1.975308641975309D-01,-2.469135802469136D-02/ - DATA (CF(I,115),I= 25, 30) /-1.358024691358025D-01, - $ -4.135802469135803D-01,8.641975308641975D-02, - $ -6.913580246913580D-01,-1.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I,115),I= 31, 36) /-3.580246913580247D-01 - $ ,1.364197530864198D+00,1.364197530864198D+00, - $ -4.135802469135803D-01,-4.135802469135803D-01 - $ ,1.558641975308642D+00/ - DATA (CF(I,115),I= 37, 42) /-1.913580246913580D-01 - $ ,1.530864197530864D+00,-1.635802469135803D-01 - $ ,5.864197530864197D-02,-2.469135802469136D-01 - $ ,3.086419753086420D-02/ - DATA (CF(I,115),I= 43, 48) /3.086419753086420D-02, - $ -2.469135802469136D-01,-1.913580246913580D-01, - $ -2.191358024691358D-01,-2.469135802469136D-02 - $ ,3.086419753086420D-03/ - DATA (CF(I,115),I= 49, 54) /-3.580246913580247D-01 - $ ,1.364197530864198D+00,-1.358024691358025D-01 - $ ,8.641975308641975D-02,-1.635802469135803D-01, - $ -1.913580246913580D-01/ - DATA (CF(I,115),I= 55, 60) /4.197530864197531D-01, - $ -3.580246913580247D-01,-3.580246913580247D-01, - $ -1.358024691358025D-01,-1.358024691358025D-01 - $ ,1.586419753086420D+00/ - DATA (CF(I,115),I= 61, 66) /1.586419753086420D+00, - $ -1.913580246913580D-01,-1.358024691358025D-01, - $ -1.635802469135803D-01,3.086419753086420D-02,3.086419753086420D - $ -01/ - DATA (CF(I,115),I= 67, 72) /-1.913580246913580D-01 - $ ,3.086419753086420D-02,8.641975308641975D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I,115),I= 73, 78) /3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03,1.975308641975309D-01,-2.469135802469136D-02/ - DATA (CF(I,115),I= 79, 84) /3.086419753086420D-02, - $ -2.469135802469136D-01,-1.913580246913580D-01, - $ -2.191358024691358D-01,-2.469135802469136D-02 - $ ,3.086419753086420D-03/ - DATA (CF(I,115),I= 85, 90) /-1.913580246913580D-01 - $ ,3.086419753086420D-02,8.641975308641975D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I,115),I= 91, 96) /-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02, - $ -2.469135802469136D-01/ - DATA (CF(I,115),I= 97,102) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01/ - DATA (CF(I,115),I=103,108) /-2.469135802469136D-01 - $ ,1.975308641975309D+00,1.530864197530864D+00,1.753086419753086D - $ +00,1.975308641975309D-01,-2.469135802469136D-02/ - DATA (CF(I,115),I=109,114) /1.530864197530864D+00, - $ -2.469135802469136D-01,-6.913580246913580D-01 - $ ,1.530864197530864D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01/ - DATA (CF(I,115),I=115,120) /1.264197530864197D+01, - $ -1.580246913580247D+00,-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01,1.975308641975309D - $ +00/ + DATA (CF(I),I=7240,7245) /4096,-1024,-1024,128,128,1280/ C 1 T(7,6,1,2,5,3,4) - DATA (CF(I,116),I= 1, 6) /-1.358024691358025D-01, - $ -4.135802469135803D-01,-1.635802469135803D-01, - $ -1.913580246913580D-01,5.864197530864197D-02, - $ -2.191358024691358D-01/ - DATA (CF(I,116),I= 7, 12) /1.586419753086420D+00 - $ ,1.558641975308642D+00,-1.913580246913580D-01 - $ ,1.530864197530864D+00,-2.191358024691358D-01 - $ ,1.753086419753086D+00/ - DATA (CF(I,116),I= 13, 18) /3.086419753086420D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02, - $ -2.469135802469136D-01,-2.469135802469136D-01 - $ ,1.975308641975309D+00/ - DATA (CF(I,116),I= 19, 24) /3.086419753086420D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I,116),I= 25, 30) /-3.580246913580247D-01 - $ ,1.364197530864198D+00,-1.358024691358025D-01 - $ ,8.641975308641975D-02,-1.635802469135803D-01, - $ -1.913580246913580D-01/ - DATA (CF(I,116),I= 31, 36) /4.197530864197531D-01, - $ -3.580246913580247D-01,-3.580246913580247D-01, - $ -1.358024691358025D-01,-1.358024691358025D-01 - $ ,1.586419753086420D+00/ - DATA (CF(I,116),I= 37, 42) /1.586419753086420D+00, - $ -1.913580246913580D-01,-1.358024691358025D-01, - $ -1.635802469135803D-01,3.086419753086420D-02,3.086419753086420D - $ -01/ - DATA (CF(I,116),I= 43, 48) /-1.913580246913580D-01 - $ ,3.086419753086420D-02,8.641975308641975D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I,116),I= 49, 54) /-1.358024691358025D-01, - $ -4.135802469135803D-01,8.641975308641975D-02, - $ -6.913580246913580D-01,-1.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I,116),I= 55, 60) /-3.580246913580247D-01 - $ ,1.364197530864198D+00,1.364197530864198D+00, - $ -4.135802469135803D-01,-4.135802469135803D-01 - $ ,1.558641975308642D+00/ - DATA (CF(I,116),I= 61, 66) /-1.913580246913580D-01 - $ ,1.530864197530864D+00,-1.635802469135803D-01 - $ ,5.864197530864197D-02,-2.469135802469136D-01 - $ ,3.086419753086420D-02/ - DATA (CF(I,116),I= 67, 72) /3.086419753086420D-02, - $ -2.469135802469136D-01,-1.913580246913580D-01, - $ -2.191358024691358D-01,-2.469135802469136D-02 - $ ,3.086419753086420D-03/ - DATA (CF(I,116),I= 73, 78) /3.086419753086420D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I,116),I= 79, 84) /-1.913580246913580D-01 - $ ,3.086419753086420D-02,8.641975308641975D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I,116),I= 85, 90) /3.086419753086420D-02, - $ -2.469135802469136D-01,-1.913580246913580D-01, - $ -2.191358024691358D-01,-2.469135802469136D-02 - $ ,3.086419753086420D-03/ - DATA (CF(I,116),I= 91, 96) /1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -2.469135802469136D-02/ - DATA (CF(I,116),I= 97,102) /-2.469135802469136D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -1.580246913580247D+00/ - DATA (CF(I,116),I=103,108) /1.530864197530864D+00, - $ -2.469135802469136D-01,-6.913580246913580D-01 - $ ,1.530864197530864D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01/ - DATA (CF(I,116),I=109,114) /-2.469135802469136D-01 - $ ,1.975308641975309D+00,1.530864197530864D+00,1.753086419753086D - $ +00,1.975308641975309D-01,-2.469135802469136D-02/ - DATA (CF(I,116),I=115,120) /-1.580246913580247D+00 - $ ,1.264197530864197D+01,1.975308641975309D-01,1.975308641975309D - $ +00,-1.580246913580247D+00,1.975308641975309D-01/ + DATA (CF(I),I=7246,7250) /4096,128,1280,-1024,128/ C 1 T(7,6,1,5,2,3,4) - DATA (CF(I,117),I= 1, 6) /-1.358024691358025D-01, - $ -4.135802469135803D-01,8.641975308641975D-02, - $ -6.913580246913580D-01,-1.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I,117),I= 7, 12) /-3.580246913580247D-01 - $ ,1.364197530864198D+00,1.364197530864198D+00, - $ -4.135802469135803D-01,-4.135802469135803D-01 - $ ,1.558641975308642D+00/ - DATA (CF(I,117),I= 13, 18) /-1.913580246913580D-01 - $ ,1.530864197530864D+00,-1.635802469135803D-01 - $ ,5.864197530864197D-02,-2.469135802469136D-01 - $ ,3.086419753086420D-02/ - DATA (CF(I,117),I= 19, 24) /3.086419753086420D-02, - $ -2.469135802469136D-01,-1.913580246913580D-01, - $ -2.191358024691358D-01,-2.469135802469136D-02 - $ ,3.086419753086420D-03/ - DATA (CF(I,117),I= 25, 30) /1.586419753086420D+00 - $ ,1.558641975308642D+00,-1.913580246913580D-01 - $ ,1.530864197530864D+00,-2.191358024691358D-01 - $ ,1.753086419753086D+00/ - DATA (CF(I,117),I= 31, 36) /-1.358024691358025D-01, - $ -4.135802469135803D-01,-1.635802469135803D-01, - $ -1.913580246913580D-01,5.864197530864197D-02, - $ -2.191358024691358D-01/ - DATA (CF(I,117),I= 37, 42) /3.086419753086420D-02, - $ -2.469135802469136D-01,3.086419753086420D-01,3.086419753086420D - $ -02,1.975308641975309D+00,-2.469135802469136D-01/ - DATA (CF(I,117),I= 43, 48) /3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03,1.975308641975309D-01,-2.469135802469136D-02/ - DATA (CF(I,117),I= 49, 54) /4.197530864197531D-01, - $ -3.580246913580247D-01,-3.580246913580247D-01, - $ -1.358024691358025D-01,-1.358024691358025D-01 - $ ,1.586419753086420D+00/ - DATA (CF(I,117),I= 55, 60) /-3.580246913580247D-01 - $ ,1.364197530864198D+00,-1.358024691358025D-01 - $ ,8.641975308641975D-02,-1.635802469135803D-01, - $ -1.913580246913580D-01/ - DATA (CF(I,117),I= 61, 66) /-1.358024691358025D-01, - $ -1.635802469135803D-01,1.586419753086420D+00, - $ -1.913580246913580D-01,3.086419753086420D-01,3.086419753086420D - $ -02/ - DATA (CF(I,117),I= 67, 72) /8.641975308641975D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I,117),I= 73, 78) /3.086419753086420D-02, - $ -2.469135802469136D-01,-1.913580246913580D-01, - $ -2.191358024691358D-01,-2.469135802469136D-02 - $ ,3.086419753086420D-03/ - DATA (CF(I,117),I= 79, 84) /3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03,1.975308641975309D-01,-2.469135802469136D-02/ - DATA (CF(I,117),I= 85, 90) /8.641975308641975D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I,117),I= 91, 96) /1.975308641975309D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02/ - DATA (CF(I,117),I= 97,102) /-2.469135802469136D-01 - $ ,1.975308641975309D+00,1.530864197530864D+00,1.753086419753086D - $ +00,1.975308641975309D-01,-2.469135802469136D-02/ - DATA (CF(I,117),I=103,108) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01/ - DATA (CF(I,117),I=109,114) /-6.913580246913580D-01 - $ ,1.530864197530864D+00,1.530864197530864D+00, - $ -2.469135802469136D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02/ - DATA (CF(I,117),I=115,120) /-1.580246913580247D+00 - $ ,1.975308641975309D-01,1.264197530864197D+01, - $ -1.580246913580247D+00,1.975308641975309D+00,1.975308641975309D - $ -01/ + DATA (CF(I),I=7251,7254) /4096,-1024,1280,128/ C 1 T(7,6,2,1,5,3,4) - DATA (CF(I,118),I= 1, 6) /-3.580246913580247D-01 - $ ,1.364197530864198D+00,-1.358024691358025D-01 - $ ,8.641975308641975D-02,-1.635802469135803D-01, - $ -1.913580246913580D-01/ - DATA (CF(I,118),I= 7, 12) /4.197530864197531D-01, - $ -3.580246913580247D-01,-3.580246913580247D-01, - $ -1.358024691358025D-01,-1.358024691358025D-01 - $ ,1.586419753086420D+00/ - DATA (CF(I,118),I= 13, 18) /1.586419753086420D+00, - $ -1.913580246913580D-01,-1.358024691358025D-01, - $ -1.635802469135803D-01,3.086419753086420D-02,3.086419753086420D - $ -01/ - DATA (CF(I,118),I= 19, 24) /-1.913580246913580D-01 - $ ,3.086419753086420D-02,8.641975308641975D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I,118),I= 25, 30) /-1.358024691358025D-01, - $ -4.135802469135803D-01,-1.635802469135803D-01, - $ -1.913580246913580D-01,5.864197530864197D-02, - $ -2.191358024691358D-01/ - DATA (CF(I,118),I= 31, 36) /1.586419753086420D+00 - $ ,1.558641975308642D+00,-1.913580246913580D-01 - $ ,1.530864197530864D+00,-2.191358024691358D-01 - $ ,1.753086419753086D+00/ - DATA (CF(I,118),I= 37, 42) /3.086419753086420D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02, - $ -2.469135802469136D-01,-2.469135802469136D-01 - $ ,1.975308641975309D+00/ - DATA (CF(I,118),I= 43, 48) /3.086419753086420D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I,118),I= 49, 54) /-3.580246913580247D-01 - $ ,1.364197530864198D+00,1.364197530864198D+00, - $ -4.135802469135803D-01,-4.135802469135803D-01 - $ ,1.558641975308642D+00/ - DATA (CF(I,118),I= 55, 60) /-1.358024691358025D-01, - $ -4.135802469135803D-01,8.641975308641975D-02, - $ -6.913580246913580D-01,-1.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I,118),I= 61, 66) /-1.635802469135803D-01 - $ ,5.864197530864197D-02,-1.913580246913580D-01 - $ ,1.530864197530864D+00,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I,118),I= 67, 72) /-1.913580246913580D-01, - $ -2.191358024691358D-01,3.086419753086420D-02, - $ -2.469135802469136D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I,118),I= 73, 78) /-1.913580246913580D-01 - $ ,3.086419753086420D-02,8.641975308641975D-02, - $ -1.913580246913580D-01,3.086419753086420D-03,3.086419753086420D - $ -02/ - DATA (CF(I,118),I= 79, 84) /3.086419753086420D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I,118),I= 85, 90) /-1.913580246913580D-01, - $ -2.191358024691358D-01,3.086419753086420D-02, - $ -2.469135802469136D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I,118),I= 91, 96) /-2.469135802469136D-02, - $ -2.469135802469136D-01,1.975308641975309D-01, - $ -1.580246913580247D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I,118),I= 97,102) /1.530864197530864D+00, - $ -2.469135802469136D-01,-6.913580246913580D-01 - $ ,1.530864197530864D+00,-2.469135802469136D-02, - $ -2.469135802469136D-01/ - DATA (CF(I,118),I=103,108) /-2.469135802469136D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -1.580246913580247D+00/ - DATA (CF(I,118),I=109,114) /1.530864197530864D+00 - $ ,1.753086419753086D+00,-2.469135802469136D-01 - $ ,1.975308641975309D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I,118),I=115,120) /1.975308641975309D-01 - $ ,1.975308641975309D+00,-1.580246913580247D+00 - $ ,1.264197530864197D+01,1.975308641975309D-01, - $ -1.580246913580247D+00/ + DATA (CF(I),I=7255,7257) /4096,128,-1024/ C 1 T(7,6,2,5,1,3,4) - DATA (CF(I,119),I= 1, 6) /-3.580246913580247D-01 - $ ,1.364197530864198D+00,1.364197530864198D+00, - $ -4.135802469135803D-01,-4.135802469135803D-01 - $ ,1.558641975308642D+00/ - DATA (CF(I,119),I= 7, 12) /-1.358024691358025D-01, - $ -4.135802469135803D-01,8.641975308641975D-02, - $ -6.913580246913580D-01,-1.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I,119),I= 13, 18) /-1.635802469135803D-01 - $ ,5.864197530864197D-02,-1.913580246913580D-01 - $ ,1.530864197530864D+00,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I,119),I= 19, 24) /-1.913580246913580D-01, - $ -2.191358024691358D-01,3.086419753086420D-02, - $ -2.469135802469136D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I,119),I= 25, 30) /4.197530864197531D-01, - $ -3.580246913580247D-01,-3.580246913580247D-01, - $ -1.358024691358025D-01,-1.358024691358025D-01 - $ ,1.586419753086420D+00/ - DATA (CF(I,119),I= 31, 36) /-3.580246913580247D-01 - $ ,1.364197530864198D+00,-1.358024691358025D-01 - $ ,8.641975308641975D-02,-1.635802469135803D-01, - $ -1.913580246913580D-01/ - DATA (CF(I,119),I= 37, 42) /-1.358024691358025D-01, - $ -1.635802469135803D-01,1.586419753086420D+00, - $ -1.913580246913580D-01,3.086419753086420D-01,3.086419753086420D - $ -02/ - DATA (CF(I,119),I= 43, 48) /8.641975308641975D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I,119),I= 49, 54) /1.586419753086420D+00 - $ ,1.558641975308642D+00,-1.913580246913580D-01 - $ ,1.530864197530864D+00,-2.191358024691358D-01 - $ ,1.753086419753086D+00/ - DATA (CF(I,119),I= 55, 60) /-1.358024691358025D-01, - $ -4.135802469135803D-01,-1.635802469135803D-01, - $ -1.913580246913580D-01,5.864197530864197D-02, - $ -2.191358024691358D-01/ - DATA (CF(I,119),I= 61, 66) /3.086419753086420D-02, - $ -2.469135802469136D-01,3.086419753086420D-01,3.086419753086420D - $ -02,1.975308641975309D+00,-2.469135802469136D-01/ - DATA (CF(I,119),I= 67, 72) /3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03,1.975308641975309D-01,-2.469135802469136D-02/ - DATA (CF(I,119),I= 73, 78) /-1.913580246913580D-01, - $ -2.191358024691358D-01,3.086419753086420D-02, - $ -2.469135802469136D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I,119),I= 79, 84) /8.641975308641975D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I,119),I= 85, 90) /3.086419753086420D-03, - $ -2.469135802469136D-02,3.086419753086420D-02,3.086419753086420D - $ -03,1.975308641975309D-01,-2.469135802469136D-02/ - DATA (CF(I,119),I= 91, 96) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01/ - DATA (CF(I,119),I= 97,102) /1.530864197530864D+00 - $ ,1.753086419753086D+00,-2.469135802469136D-01 - $ ,1.975308641975309D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I,119),I=103,108) /-6.913580246913580D-01 - $ ,1.530864197530864D+00,1.530864197530864D+00, - $ -2.469135802469136D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02/ - DATA (CF(I,119),I=109,114) /-2.469135802469136D-02 - $ ,1.975308641975309D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02,-1.580246913580247D+00 - $ ,1.975308641975309D-01/ - DATA (CF(I,119),I=115,120) /1.975308641975309D-01, - $ -1.580246913580247D+00,1.975308641975309D+00,1.975308641975309D - $ -01,1.264197530864197D+01,-1.580246913580247D+00/ + DATA (CF(I),I=7258,7259) /4096,-1024/ C 1 T(7,6,5,1,2,3,4) - DATA (CF(I,120),I= 1, 6) /4.197530864197531D-01, - $ -3.580246913580247D-01,-3.580246913580247D-01, - $ -1.358024691358025D-01,-1.358024691358025D-01 - $ ,1.586419753086420D+00/ - DATA (CF(I,120),I= 7, 12) /-3.580246913580247D-01 - $ ,1.364197530864198D+00,-1.358024691358025D-01 - $ ,8.641975308641975D-02,-1.635802469135803D-01, - $ -1.913580246913580D-01/ - DATA (CF(I,120),I= 13, 18) /-1.358024691358025D-01, - $ -1.635802469135803D-01,1.586419753086420D+00, - $ -1.913580246913580D-01,3.086419753086420D-01,3.086419753086420D - $ -02/ - DATA (CF(I,120),I= 19, 24) /8.641975308641975D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I,120),I= 25, 30) /-3.580246913580247D-01 - $ ,1.364197530864198D+00,1.364197530864198D+00, - $ -4.135802469135803D-01,-4.135802469135803D-01 - $ ,1.558641975308642D+00/ - DATA (CF(I,120),I= 31, 36) /-1.358024691358025D-01, - $ -4.135802469135803D-01,8.641975308641975D-02, - $ -6.913580246913580D-01,-1.913580246913580D-01 - $ ,1.530864197530864D+00/ - DATA (CF(I,120),I= 37, 42) /-1.635802469135803D-01 - $ ,5.864197530864197D-02,-1.913580246913580D-01 - $ ,1.530864197530864D+00,3.086419753086420D-02, - $ -2.469135802469136D-01/ - DATA (CF(I,120),I= 43, 48) /-1.913580246913580D-01, - $ -2.191358024691358D-01,3.086419753086420D-02, - $ -2.469135802469136D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I,120),I= 49, 54) /-1.358024691358025D-01, - $ -4.135802469135803D-01,-1.635802469135803D-01, - $ -1.913580246913580D-01,5.864197530864197D-02, - $ -2.191358024691358D-01/ - DATA (CF(I,120),I= 55, 60) /1.586419753086420D+00 - $ ,1.558641975308642D+00,-1.913580246913580D-01 - $ ,1.530864197530864D+00,-2.191358024691358D-01 - $ ,1.753086419753086D+00/ - DATA (CF(I,120),I= 61, 66) /3.086419753086420D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02, - $ -2.469135802469136D-01,-2.469135802469136D-01 - $ ,1.975308641975309D+00/ - DATA (CF(I,120),I= 67, 72) /3.086419753086420D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I,120),I= 73, 78) /8.641975308641975D-02, - $ -1.913580246913580D-01,-1.913580246913580D-01 - $ ,3.086419753086420D-02,3.086419753086420D-02,3.086419753086420D - $ -03/ - DATA (CF(I,120),I= 79, 84) /-1.913580246913580D-01, - $ -2.191358024691358D-01,3.086419753086420D-02, - $ -2.469135802469136D-01,3.086419753086420D-03, - $ -2.469135802469136D-02/ - DATA (CF(I,120),I= 85, 90) /3.086419753086420D-02 - $ ,3.086419753086420D-03,3.086419753086420D-03, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I,120),I= 91, 96) /-2.469135802469136D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -1.580246913580247D+00/ - DATA (CF(I,120),I= 97,102) /-6.913580246913580D-01 - $ ,1.530864197530864D+00,1.530864197530864D+00, - $ -2.469135802469136D-01,-2.469135802469136D-01, - $ -2.469135802469136D-02/ - DATA (CF(I,120),I=103,108) /1.530864197530864D+00 - $ ,1.753086419753086D+00,-2.469135802469136D-01 - $ ,1.975308641975309D+00,-2.469135802469136D-02 - $ ,1.975308641975309D-01/ - DATA (CF(I,120),I=109,114) /-2.469135802469136D-01, - $ -2.469135802469136D-02,-2.469135802469136D-02 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -1.580246913580247D+00/ - DATA (CF(I,120),I=115,120) /1.975308641975309D+00 - $ ,1.975308641975309D-01,1.975308641975309D-01, - $ -1.580246913580247D+00,-1.580246913580247D+00 - $ ,1.264197530864197D+01/ + DATA (CF(I),I=7260,7260) /4096/ C 1 T(7,6,5,2,1,3,4) C ---------- C BEGIN CODE @@ -18811,10 +10171,12 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) MATRIX1 = 0.D0 DO M = 1, NAMPSO + CF_INDEX = 0 DO I = 1, NCOLOR ZTEMP = (0.D0,0.D0) - DO J = 1, NCOLOR - ZTEMP = ZTEMP + CF(J,I)*JAMP(J,M) + DO J = I, NCOLOR + CF_INDEX = CF_INDEX + 1 + ZTEMP = ZTEMP + CF(CF_INDEX)*JAMP(J,M) ENDDO DO N = 1, NAMPSO @@ -18823,6 +10185,7 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) ENDDO ENDDO ENDDO + MATRIX1 = MATRIX1/DENOM IF(SDE_STRAT.EQ.1)THEN AMP2(1)=AMP2(1)+AMP(1)*DCONJG(AMP(1)) diff --git a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/P1_gg_ttxggg/matrix11.png b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/P1_gg_ttxggg/matrix11.png new file mode 100644 index 0000000000..a93248280f Binary files /dev/null and b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/P1_gg_ttxggg/matrix11.png differ diff --git a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/P1_gg_ttxggg/matrix12.png b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/P1_gg_ttxggg/matrix12.png new file mode 100644 index 0000000000..328915c6e0 Binary files /dev/null and b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/P1_gg_ttxggg/matrix12.png differ diff --git a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/P1_gg_ttxggg/processConfig.h b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/P1_gg_ttxggg/processConfig.h new file mode 100644 index 0000000000..fe7af482a7 --- /dev/null +++ b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/P1_gg_ttxggg/processConfig.h @@ -0,0 +1,16 @@ +// Copyright (C) 2025 CERN and UCLouvain. +// Licensed under the GNU Lesser General Public License (version 3 or later). +// Created by: S. Roiser (May 2025) for the MG5aMC CUDACPP plugin. +// Further modified by: ... for the MG5aMC CUDACPP plugin. + + +#ifndef MG5_CONFIG_SIGMA_SM_GG_TTXGGG_H +#define MG5_CONFIG_SIGMA_SM_GG_TTXGGG_H 1 + +namespace processConfig { + + constexpr int ndiagrams = 1240; + +} + +#endif // MG5_CONFIG_SIGMA_SM_GG_TTXGGG_H \ No newline at end of file diff --git a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/cuts.f b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/cuts.f index 7898714201..bd50ab1357 100644 --- a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/cuts.f +++ b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/cuts.f @@ -307,12 +307,18 @@ LOGICAL FUNCTION PASSCUTS(P, VECSIZE_USED) c c Limit S_hat c - if (dsqrt_shat.ne.0d0)then - if (nincoming.eq.2.and.sumdot(p(0,1),p(0,2),1d0) .lt. dsqrt_shat**2) then - passcuts=.false. - return - endif - endif + if(nincoming.eq.2) then + if (dsqrt_shat.ne.0d0.or.dsqrt_shatmax.ne.-1d0)then + xvar = sumdot(p(0,1),p(0,2),1d0) + if (xvar .lt. dsqrt_shat**2)then + passcuts=.false. + return + else if (dsqrt_shatmax.ne.-1d0 .and. xvar .gt. dsqrt_shatmax**2)then + passcuts = .false. + return + endif + endif + endif C $B$ DESACTIVATE_CUT $E$ !This is a tag for MadWeight if(debug) write (*,*) '=============================' diff --git a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/genps.f b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/genps.f index 1c32e93f5d..8503bdbec8 100644 --- a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/genps.f +++ b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/genps.f @@ -1373,6 +1373,10 @@ subroutine gen_s(x,smin,smax,spole,swidth,s,jac,pass) double precision smin,smax,spole,swidth,s,jac double precision x logical pass + include 'maxparticles.inc' + include '../../Source/vector.inc' + include 'run.inc' + include 'cuts.inc' c c Local c @@ -1384,6 +1388,10 @@ subroutine gen_s(x,smin,smax,spole,swidth,s,jac,pass) c----- c Begin Code c----- + if (dsqrt_shatmax.ne.-1d0)then + smax = min(smax, dsqrt_shatmax**2) + endif + pass=.true. if (jac .eq. 0 .and. .not. warned0) then print*,'Input jacobian 0 in genps' @@ -1628,7 +1636,10 @@ SUBROUTINE GENCMS(S,X1,X2,X,SMIN,SJACOBI) DOUBLE PRECISION ETA,ETAMIN,ETAMAX logical warned data warned/.false./ - + include 'maxparticles.inc' + include '../../Source/vector.inc' + include 'run.inc' + include 'cuts.inc' C------------ C BEGIN CODE C------------ @@ -1645,7 +1656,11 @@ SUBROUTINE GENCMS(S,X1,X2,X,SMIN,SJACOBI) C IF THERE IS NO S CHANNEL POLE USE BELOW: TAUMIN = 0d0 !SMIN/S !keep scale fix - TAUMAX = 1D0 + if (dsqrt_shatmax.ne.-1d0)then + TAUMAX=dsqrt_shatmax**2/S + else + TAUMAX = 1D0 + endif TAU = (TAUMAX-TAUMIN)*X(1)+TAUMIN SJACOBI= sjacobi*(TAUMAX-TAUMIN) @@ -1915,7 +1930,7 @@ double precision function get_channel_cut(p, config) if(sde_strat.eq.2)then t = dot(ptemp(0,-i), ptemp(0,-i)) Mass = prmass(-i, config) - get_channel_cut = get_channel_cut / ((t-Mass)*(t+Mass)+stot*1d-10)**2 + get_channel_cut = get_channel_cut / (t-Mass**2+stot*1d-10)**2 endif c write(*,*) i, "t, Mass, fact", t, Mass, ((t-Mass)*(t+Mass))**2,get_channel_cut t = t/stot @@ -1930,9 +1945,9 @@ double precision function get_channel_cut(p, config) t = dot(ptemp(0,-i), ptemp(0,-i)) Mass = prmass(-i, config) Width = prwidth(-i, config) - tmp = (t-Mass)*(t+Mass) + tmp = (t-Mass**2) tmp2 = Mass*Width - get_channel_cut = get_channel_cut* (tmp**2 - tmp2**2)/(tmp**2 + tmp2**2)**2 + get_channel_cut = get_channel_cut/(tmp**2 + tmp2**2) endif c write(*,*) i, "s, Mass, Width, fact", t, Mass, Width, (((t-Mass)*(t+Mass) )**2 + Width**2*Mass**2), get_channel_cut endif diff --git a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/myamp.f b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/myamp.f index 9e5f8d44dd..5360566ef4 100644 --- a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/myamp.f +++ b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/myamp.f @@ -231,6 +231,7 @@ subroutine set_peaks double precision x1,x2,xk(nexternal) double precision dr,mtot,etot,xqfact double precision spmass + double precision stot ! technically the min with dsqrt_shatmax**2 with the physical one integer i, iconfig, l1, l2, j, nt, nbw, iproc, k integer iden_part(-nexternal+1:nexternal) @@ -285,8 +286,8 @@ subroutine set_peaks integer lbw(0:nexternal) !Use of B.W. common /to_BW/ lbw - double precision stot,m1,m2 - common/to_stot/stot,m1,m2 + double precision real_stot,m1,m2 + common/to_stot/real_stot,m1,m2 include 'coupl.inc' ! needs VECSIZE_MEMMAX (defined in vector.inc) include 'cuts.inc' @@ -309,6 +310,12 @@ subroutine set_peaks c----- c Begin Code c----- + if (dsqrt_shatmax.ne.-1)then + stot = min(real_stot, dsqrt_shatmax**2) + else + stot = real_stot + endif + iconfig = this_config c needs to be initialise to avoid segfault do i = -nexternal,-1 diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/Gridpack/gridrun b/epochX/cudacpp/gg_ttggg.mad/bin/internal/Gridpack/gridrun index 8c8f7d3940..01d4ab53f5 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/Gridpack/gridrun +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/Gridpack/gridrun @@ -91,7 +91,7 @@ import internal.madevent_interface as cmd_interface try: - cmd_line = cmd_interface.GridPackCmd(me_dir=root_path, nb_event=args[0], seed=args[1], gran=args[2]) + cmd_line = cmd_interface.GridPackCmd(me_dir=root_path, nb_event=args[0], seed=args[1], gran=args[2], nprocs=args[3], maxevts=args[4]) except KeyboardInterrupt: print('Quit on KeyboardInterrupt') diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/Gridpack/run.sh b/epochX/cudacpp/gg_ttggg.mad/bin/internal/Gridpack/run.sh index 20adf572c2..2d149f96be 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/Gridpack/run.sh +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/Gridpack/run.sh @@ -14,6 +14,18 @@ # USAGE : run [num_events] [iseed] ## ############################################################################# +function usage() { + local retcode="${1:-1}" # default return code is 1 + echo "Usage:" + echo " run.sh [options] [num events] [seed]" + echo " run.sh [options] [num events] [seed] [granularity]" + echo "Options:" + echo " -h, --help print this message and exit" + echo " -p, --parallel [num procs] number of processes to run in parallel" + echo " -m, --maxevts [num events] maximum number of unweighted events per job" + exit $retcode +} + if [[ -d ./madevent ]]; then DIR='./madevent' else @@ -32,23 +44,46 @@ export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${PWD}/madevent/lib:${PWD}/HELAS/lib # For Mac OS X export DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:${PWD}/madevent/lib:${PWD}/HELAS/lib +pos_args=() +nprocs=1 +maxevts=2500 -if [[ ($1 != "") && ("$2" != "") && ("$3" == "") ]]; then - num_events=$1 - seed=$2 - gran=1 -elif [[ ($1 != "") && ("$2" != "") && ("$3" != "") ]]; then - num_events=$1 - seed=$2 - gran=$3 -else - echo "Warning: input is not correct. script requires two arguments: NB_EVENT SEED" -fi +while [[ $# -gt 0 ]]; do + case $1 in + -h|--help) + usage 0 ;; + -p|--parallel) + nprocs="$2" && shift && shift ;; + -m|--maxevts) + maxevts="$2" && shift && shift ;; + -*) + echo "Error: Unknown option $1" && usage ;; + *) + pos_args+=("$1") && shift ;; + esac +done + +case `echo "${pos_args[@]}" | wc -w | tr -d " "` in + "2") + num_events=${pos_args[0]} + seed=${pos_args[1]} + gran=1 + ;; + "3") + num_events=${pos_args[0]} + seed=${pos_args[1]} + gran=${pos_args[2]} + ;; + *) + echo "Error: number of arguments is not correct" + usage + ;; +esac -echo "Now generating $num_events events with random seed $seed and granularity $gran" +echo "Now generating $num_events events with random seed $seed and granularity $gran using $nprocs processes" ############ RUN THE PYTHON CODE ##################### -${DIR}/bin/gridrun $num_events $seed $gran +${DIR}/bin/gridrun $num_events $seed $gran $nprocs $maxevts ######################################################## ########### POSTPROCESSING ##################### diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/banner.py b/epochX/cudacpp/gg_ttggg.mad/bin/internal/banner.py index 42d82818d0..022861fc31 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/banner.py +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/banner.py @@ -353,7 +353,7 @@ def modify_init_cross(self, cross, allow_zero=False): assert "init" in self cross = dict(cross) - for key in cross.keys(): + for key in list(cross.keys()): if isinstance(key, str) and key.isdigit() and int(key) not in cross: cross[int(key)] = cross[key] @@ -3318,7 +3318,6 @@ def retro_compatible_custom_fct(lines, mode=None): for i,line in enumerate(lines[:]): if search and re.search(include_pat, line): name = re.findall(include_pat, line)[0] - misc.sprint('DETECTED INCLUDE', name) if 'vector.inc' in name: search = False if 'run.inc' in name: @@ -3326,7 +3325,6 @@ def retro_compatible_custom_fct(lines, mode=None): search = False sol.append(line) if re.search(function_pat, line): - misc.sprint("DETECTED FCT") search = True return sol @@ -4201,6 +4199,7 @@ def default_setup(self): self.add_param("bwcutoff", 15.0) self.add_param("cut_decays", False, cut='d') self.add_param('dsqrt_shat',0., cut=True) + self.add_param('dsqrt_shatmax', -1, cut=True) self.add_param("nhel", 0, include=False) self.add_param("limhel", 1e-8, hidden=True, comment="threshold to determine if an helicity contributes when not MC over helicity.") #pt cut @@ -5577,6 +5576,9 @@ def default_setup(self): #technical self.add_param('folding', [1,1,1], include=False) + + #bias + self.add_param('flavour_bias',[5,1], hidden=True, comment="Example: '5,100' means that the probability to generate an event with a bottom (or anti-bottom) quark is increased by a factor 100, but the weight of those events is reduced by a factor 100. Requires that the 'event_norm' is set to 'bias'.") #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]") @@ -5790,6 +5792,17 @@ def check_validity(self): if self['mcatnlo_delta'] and not self['parton_shower'].lower() == 'pythia8': raise InvalidRunCard("MC@NLO-DELTA only possible with matching to Pythia8") + # check that the flavour_bias is consistent + if len(self['flavour_bias']) != 2: + raise InvalidRunCard("'flavour_bias' should contain exactly two numbers: the abs(PDG) of the flavour to enhance, and the enhancement multiplication factor.") + for i in self['flavour_bias']: + if i < 0: + raise InvalidRunCard("flavour and multiplication factor should be positive in the flavour_bias parameter") + if self['flavour_bias'][1] != 1 and self['event_norm'] != 'bias': + logger.warning('Non-trivial flavour enhancement factor: setting event normalisation to "bias"') + self['event_norm']='bias' + + # check that ebeam is bigger than the proton mass. for i in [1,2]: # do not for proton mass if not proton PDF (or when scan initialization) 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 bc785b5de6..a34705f6bc 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 @@ -1092,11 +1092,11 @@ def write_summary(self, path, order=None, lastline=False, nbcol=20): to_print = self.cross[-1:] for info in to_print: name = info['run_name'] - bench = info['bench'] + bench = [float(x) for x in info['bench']] data = [] for k in keys: if k in info: - data.append(info[k]) + data.append(float(info[k])) else: data.append(0.) ff.write(formatting % tuple([name] + bench + data)) 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 9ff7390cf5..541cd6294b 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 @@ -750,8 +750,8 @@ def __init__(self, me_dir, options, *args, **opts): else: self.ninitial = self.proc_characteristics['ninitial'] - def make_make_all_html_results(self, folder_names = [], jobs=[]): - return sum_html.make_all_html_results(self, folder_names, jobs) + def make_make_all_html_results(self, folder_names = [], jobs=[], get_attr=None): + return sum_html.make_all_html_results(self, folder_names, jobs, get_attr) def write_RunWeb(self, me_dir): @@ -3831,7 +3831,7 @@ def store_scan_result(self): """return the information that need to be kept for the scan summary. Auto-width are automatically added.""" - return {'cross': self.results.current['cross']} + return {'cross': self.results.current['cross'], 'error': self.results.current['error']} def add_error_log_in_html(self, errortype=None): @@ -5135,10 +5135,10 @@ def init_run(self, cards): self.special_shortcut.update( {'ebeam':([float],['run_card ebeam1 %(0)s', 'run_card ebeam2 %(0)s']), 'lpp': ([int],['run_card lpp1 %(0)s', 'run_card lpp2 %(0)s' ]), - 'lhc': ([int],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), + 'lhc': ([float],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), 'lep': ([int],['run_card lpp1 0', 'run_card lpp2 0', 'run_card ebeam1 %(0)s/2', 'run_card ebeam2 %(0)s/2']), 'ilc': ([int],['run_card lpp1 0', 'run_card lpp2 0', 'run_card ebeam1 %(0)s/2', 'run_card ebeam2 %(0)s/2']), - 'lcc': ([int],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), + 'lcc': ([float],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), 'fixed_scale': ([float],['run_card fixed_fac_scale T', 'run_card fixed_ren_scale T', 'run_card scale %(0)s', 'run_card dsqrt_q2fact1 %(0)s' ,'run_card dsqrt_q2fact2 %(0)s']), 'no_parton_cut':([],['run_card nocut T']), 'cm_velocity':([float], [lambda self :self.set_CM_velocity]), @@ -6740,7 +6740,15 @@ def postcmd(self, stop, line): return ending_question - + def help_update(self): + logger.info(""" syntax: update dependent: Change the mass/width of particles which are not free parameter for the model. + update missing: add to the current param_card missing blocks/parameters. + update to_slha1: pass SLHA2 card to SLHA1 convention. (beta) + update to_slha2: pass SLHA1 card to SLHA2 convention. (beta) + update to_full [run_card] + update XXX [where XXX correspond to a hidden block of the run_card]: + supported block are %s + """, ', '.join(self.update_block)) def do_update(self, line, timer=0): @@ -6756,6 +6764,8 @@ def do_update(self, line, timer=0): logger.warning('miss an argument (dependent or missing). Please retry') return + args[0] = args[0].lower() + if args[0] == 'dependent': if not self.mother_interface: logger.warning('Failed to update dependent parameter. This might create trouble for external program (like MadSpin/shower/...)') @@ -6805,10 +6815,11 @@ def do_update(self, line, timer=0): self.modified_card.add('run') # delay writting of the run_card logger.info('add optional block %s to the run_card', args[0]) else: - self.help_update() + self.do_help('update') logger.warning('unvalid options for update command. Please retry') + def update_to_full(self, line): """ trigger via update to_full LINE""" 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 789976beee..c321fd88e5 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/extended_cmd.py +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/extended_cmd.py @@ -1317,6 +1317,8 @@ def nice_error_handling(self, error, line): debug_file = open(self.debug_output, 'a') traceback.print_exc(file=debug_file) + if __debug__: + traceback.print_exc() if hasattr(error, 'filename'): debug_file.write("Related File: %s\n" % error.filename) # Create a nice error output @@ -1928,7 +1930,8 @@ def do_display(self, line, output=sys.stdout): for i, name in enumerate(split): try: __import__('.'.join(split[:i+1])) - exec('%s=sys.modules[\'%s\']' % (split[i], '.'.join(split[:i+1]))) + tmp = {} + exec('%s=sys.modules[\'%s\']' % (split[i], '.'.join(split[:i+1])), globals(),tmp) except ImportError: try: var = eval(args[1]) @@ -1939,7 +1942,7 @@ def do_display(self, line, output=sys.stdout): outstr += 'EXTERNAL:\n' outstr += misc.nice_representation(var, nb_space=4) else: - var = eval(args[1]) + var = eval(args[1], globals(), tmp) outstr += 'EXTERNAL:\n' outstr += misc.nice_representation(var, nb_space=4) diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/file_writers.py b/epochX/cudacpp/gg_ttggg.mad/bin/internal/file_writers.py index 526756129f..74ba0d195c 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/file_writers.py +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/file_writers.py @@ -140,10 +140,6 @@ def preprocess_template(self, input_lines, context={}): else: raise self.FileWriterError("%s not string" % repr(input_lines)) - # Setup the contextual environment - for contextual_variable, value in context.items(): - exec('%s=%s'%(str(contextual_variable),repr(value))) - res = [] # The variable below tracks the conditional statements structure if_stack = [] @@ -166,7 +162,7 @@ def preprocess_template(self, input_lines, context={}): # Treat an if statement elif preproc_command.group('command')=='if': try: - if_stack.append(eval(preproc_command.group('body'))==True) + if_stack.append(eval(preproc_command.group('body'), globals(), context)==True) except Exception as e: raise self.FilePreProcessingError('Could not evaluate'+\ "python expression '%s' given the context %s provided."%\ diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/files.py b/epochX/cudacpp/gg_ttggg.mad/bin/internal/files.py index 551b71ddb6..3061b007e7 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/files.py +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/files.py @@ -147,9 +147,14 @@ def cp(path1, path2, log=True, error=False): path2 = format_path(path2) try: shutil.copy(path1, path2) + except shutil.Error as why: + logger.debug('no cp since identical: %s', why) + return except IOError as why: import madgraph.various.misc as misc try: + if 'same file' in str(why): + return if os.path.exists(path2): path2 = os.path.join(path2, os.path.split(path1)[1]) misc.copytree(path1, path2) @@ -157,12 +162,10 @@ def cp(path1, path2, log=True, error=False): if error: raise if log: - logger.warning(why) + logger.warning("fail to cp", path1, path2, why) else: - misc.sprint("fail to cp", why) - except shutil.Error: - # idetical file - pass + misc.sprint("fail to cp",path1,path2, why) + def rm(path, log=True): """removes path, that can be a single element or a list""" diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/gen_cardhtml-pl b/epochX/cudacpp/gg_ttggg.mad/bin/internal/gen_cardhtml-pl index 1810c6c082..6e0e06533d 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/gen_cardhtml-pl +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/gen_cardhtml-pl @@ -137,7 +137,7 @@ until($listpos>$#incard){ print PAGE " Model: $model \n"; print PAGE " \n \n
\n"; print PAGE " \n"; - print PAGE "\"\" \n"; + print PAGE "\"\" \n"; print PAGE "
\n"; print PAGE " \n \n \n"; print PAGE " \n"; diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/gen_crossxhtml.py b/epochX/cudacpp/gg_ttggg.mad/bin/internal/gen_crossxhtml.py index 681bf9d09b..3114a4350c 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/gen_crossxhtml.py +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/gen_crossxhtml.py @@ -133,7 +133,7 @@ class AllResults(dict): web = False - _run_entries = ['cross', 'error','nb_event_pythia','run_mode','run_statistics', + _run_entries = ['cross', 'error','axsec','nb_event_pythia','run_mode','run_statistics', 'nb_event','cross_pythia','error_pythia', 'nb_event_pythia8','cross_pythia8','error_pythia8', 'shower_dir'] diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/gen_jpeg-pl b/epochX/cudacpp/gg_ttggg.mad/bin/internal/gen_jpeg-pl index 87d03da394..31b7e9fe55 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/gen_jpeg-pl +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/gen_jpeg-pl @@ -1,16 +1,16 @@ #!/usr/bin/perl -w #--------------------------------------------------------------------- -# Run GS to create jpeg files defined as $gs +# Run GS to create PNG files defined as $gs #--------------------------------------------------------------------- -system("/bin/bash -c \"rm -f matrix*.jpg\" "); +system("/bin/bash -c \"rm -f matrix*.png\" "); $imatrix = ""; if (! -e "matrix.ps") {$imatrix = 1;} -$max_jpg = 2; -if ($imatrix eq "") {$max_jpg = 5;} -# add 1 to max_jpg, to get max_jpg pages -$max_jpg += 1; +$max_png = 2; +if ($imatrix eq "") {$max_png = 5;} +# add 1 to max_png, to get max_png pages +$max_png += 1; open(PAGE,"> diagrams.html") || die "Error creating diagrams.html"; print PAGE "\ \n"; print PAGE "\ \n"; @@ -21,22 +21,22 @@ while ( -e "matrix$imatrix.ps"){ open(IN, "< matrix$imatrix.ps") || die "No file matrix$imatrix.ps"; open(OUT, "> matrix-1.ps") || die "Could not open file matrix-1.ps"; while () { - if ($_ =~ m/^%%Page: $max_jpg $max_jpg/) {last;} + if ($_ =~ m/^%%Page: $max_png $max_png/) {last;} else {print OUT $_, "\n";} } close(OUT); close(IN); - system "/bin/bash -c \"nice gs \-sDEVICE\=jpeg \-sOutputFile\=matrix$imatrix\%00d.jpg \-q \-dNOPAUSE \-dBATCH matrix-1.ps > /dev/null\""; + system "/bin/bash -c \"nice gs \-sDEVICE\=pngmono \-r150 \-sOutputFile\=matrix$imatrix\%00d.png \-q \-dNOPAUSE \-dBATCH matrix-1.ps > /dev/null\""; system "rm -f matrix-1.ps"; -# Determine how many jpg files we have +# Determine how many png files we have $pages=1; - while(-e "matrix$imatrix$pages.jpg"){ + while(-e "matrix$imatrix$pages.png"){ $pages++; }#end of while #reduce it by one - if ($pages > $max_jpg){ + if ($pages > $max_png){ $pages -= 1; } # Find name of process @@ -45,24 +45,24 @@ while ( -e "matrix$imatrix.ps"){ if ($proc =~ /Process: (.+?)(\s\w+=\d+)*$/) { $proc = $1; } print PAGE "

To save bandwidth not all diagrams were converted to jpeg."; + if (-e "matrix$imatrix$max_png.png" ) { + print PAGE "

To save bandwidth not all diagrams were converted to PNG."; print PAGE "

To view all diagrams click on "; print PAGE "\ postscript. \<\/A\> \ \n"; # # Delete files which aren't included in diagrams.html # - system ("/bin/bash -c \"rm -f matrix$max_jpg.jpg\" "); + system ("/bin/bash -c \"rm -f matrix$max_png.png\" "); } # -# Now create jpeg file for card +# Now create PNG file for card # - if (! -e "../../HTML/card.jpg") { + if (! -e "../../HTML/card.png") { system ("/bin/bash -c \"head -352 matrix$imatrix.ps >& junk.ps\" "); open(JUNK,">> junk.ps") || die "Error opening junk.ps"; @@ -72,7 +72,7 @@ while ( -e "matrix$imatrix.ps"){ system ("/bin/bash -c \"cat matrix$imatrix.ps | sed 1,352d >> junk.ps\" "); - system "/bin/bash -c \"nice gs \-sDEVICE\=jpeg \-sOutputFile\=card.jpg \-q \-dNOPAUSE \-dBATCH \-g180x150 ./junk.ps; rm -f junk.ps; cp -p card.jpg ../../HTML/card.jpg > /dev/null\" "; + system "/bin/bash -c \"nice gs \-sDEVICE\=pngmono \-sOutputFile\=card.png \-q \-dNOPAUSE \-dBATCH \-g180x150 ./junk.ps; rm -f junk.ps; cp -p card.png ../../HTML/card.png > /dev/null\" "; } if ($imatrix eq "") {$imatrix = 0;} $imatrix = $imatrix + 1; @@ -82,3 +82,4 @@ print PAGE "\n"; print PAGE "\<\/BODY\> \n"; print PAGE "\<\/HTML\> \n"; close(PAGE); + 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 415ecc9de0..d5d7fc8faf 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/gen_ximprove.py +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/gen_ximprove.py @@ -30,6 +30,7 @@ import stat import sys import six +import time from six.moves import range from six.moves import zip @@ -304,6 +305,7 @@ def get_helicity(self, to_submit=True, clean=True): logger.debug('(%s) nb_hel: %s zero amp: %s bad_amps_hel: %s/%s', split_file[-1], len(good_hels),len(bad_amps),len(bad_amps_perhel), len(good_hels)*nb_amp ) if len(good_hels) == 1: files.cp(matrix_file, matrix_file.replace('orig','optim')) + files.cp(matrix_file.replace('.f','.o'), matrix_file.replace('orig','optim').replace('.f','.o')) continue # avoid optimization if onlye one helicity gauge = self.cmd.proc_characteristics['gauge'] @@ -1059,6 +1061,7 @@ def __init__(self, cmd, opt=None): # parameter for the gridpack run self.nreq = 2000 self.iseed = 4321 + self.maxevts = 2500 # placeholder for information self.results = 0 #updated in launch/update_html @@ -1200,6 +1203,10 @@ def reset_multijob(self): def write_multijob(self, Channel, nb_split): """ """ if nb_split <=1: + try: + os.remove(pjoin(self.me_dir, 'SubProcesses', Channel.get('name'), 'multijob.dat')) + except OSError: + pass return f = open(pjoin(self.me_dir, 'SubProcesses', Channel.get('name'), 'multijob.dat'), 'w') f.write('%i\n' % nb_split) @@ -1828,17 +1835,17 @@ class gen_ximprove_gridpack(gen_ximprove_v4): 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 gen_events_security = 1.00 - def __new__(cls, *args, **opts): + def __new__(cls, cmd, opts): cls.force_class = 'gridpack' - return super(gen_ximprove_gridpack, cls).__new__(cls, *args, **opts) + return super(gen_ximprove_gridpack, cls).__new__(cls, cmd, opts) - def __init__(self, *args, **opts): + def __init__(self, cmd, opts): self.ngran = -1 + self.nprocs = 1 self.gscalefact = {} self.readonly = False if 'ngran' in opts: @@ -1846,9 +1853,18 @@ def __init__(self, *args, **opts): # del opts['ngran'] if 'readonly' in opts: self.readonly = opts['readonly'] - super(gen_ximprove_gridpack,self).__init__(*args, **opts) + if 'nprocs' in opts: + self.nprocs = int(opts['nprocs']) + if 'maxevts' in opts and self.nprocs > 1: + self.max_request_event = int(opts['maxevts']) + super(gen_ximprove_gridpack,self).__init__(cmd, opts) if self.ngran == -1: self.ngran = 1 + + if self.nprocs > 1: + self.combining_job = 0 + else: + self.combining_job = sys.maxsize def find_job_for_event(self): """return the list of channel that need to be improved""" @@ -1876,8 +1892,8 @@ def find_job_for_event(self): continue # no event to generate events self.gscalefact[tag] = max(1, 1/(goal_lum * C.get('axsec')/ self.ngran)) #need to generate events - logger.debug('request events for ', C.get('name'), 'cross=', - C.get('axsec'), 'needed events = ', goal_lum * C.get('axsec')) + logger.debug('request events for %s cross=%d needed events = %d', + C.get('name'), C.get('axsec'), goal_lum * C.get('axsec')) to_refine.append(C) logger.info('need to improve %s channels' % len(to_refine)) @@ -1897,8 +1913,13 @@ def get_job_for_event(self): 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 - + nb_split = int(max(1,((needed_event-1)// self.max_request_event) +1)) + if not self.split_channels: + nb_split = 1 + if nb_split > self.max_splitting: + 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')) @@ -1908,13 +1929,16 @@ def get_job_for_event(self): nevents = self.max_event_in_iter if nevents < self.min_event_in_iter: + nb_split = int(nb_split * nevents / self.min_event_in_iter) + 1 # sr dangerous? nevents = self.min_event_in_iter # # 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) - + # write the multi-job information + self.write_multijob(C, nb_split) + #create the info dict assume no splitting for the default info = {'name': self.cmd.results.current['run_name'], 'script_name': 'unknown', @@ -1925,7 +1949,7 @@ def get_job_for_event(self): 'nevents': nevents, #int(nevents*self.gen_events_security)+1, 'maxiter': self.max_iter, 'miniter': self.min_iter, - 'precision': -1*int(needed_event)/C.get('axsec'), + 'precision': -goal_lum/nb_split, # -1*int(needed_event)/C.get('axsec'), 'requested_event': needed_event, 'nhel': self.run_card['nhel'], 'channel': C.name.replace('G',''), @@ -1938,27 +1962,59 @@ def get_job_for_event(self): basedir = pjoin(os.path.dirname(__file__), '..','..','SubProcesses', info['P_dir'], info['directory']) info['base_directory'] = basedir - jobs.append(info) - + if nb_split == 1: + jobs.append(info) + else: + for i in range(nb_split): + new_info = dict(info) + new_info['offset'] = i+1 + new_info['directory'] += self.alphabet[i % 26] + str((i+1)//26) + new_info['base_directory'] = info['directory'] + jobs.append(new_info) write_dir = '.' if self.readonly else None self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), jobs, write_dir) + if self.nprocs > 1: + nprocs_cluster = cluster.MultiCore(nb_core=self.nprocs) + gridpack_start = time.time() + def gridpack_wait_monitoring(Idle, Running, Done): + if Idle+Running+Done == 0: + return + logger.info("Gridpack event generation: %s Idle, %s Running, %s Done [%s]" + % (Idle, Running, Done, misc.format_time(time.time()-gridpack_start))) + done = [] for j in jobs: - if j['P_dir'] in done: - continue - done.append(j['P_dir']) + if self.nprocs == 1: + if j['P_dir'] in done: + continue + done.append(j['P_dir']) + # Give a little status. Sometimes these jobs run very long, and having hours without any + # console output can be a bit frightening and make users think we are looping. + if len(done)%5==0: + logger.info(f"Working on job {len(done)} of {len(jobs)}") + # set the working directory path. pwd = pjoin(os.getcwd(),j['P_dir']) if self.readonly else pjoin(self.me_dir, 'SubProcesses', j['P_dir']) - exe = pjoin(pwd, 'ajob1') + exe = pjoin(pwd, j['script_name']) st = os.stat(exe) os.chmod(exe, st.st_mode | stat.S_IEXEC) # run the code\ - cluster.onecore.launch_and_wait(exe, cwd=pwd, packet_member=j['packet']) + if self.nprocs == 1: + cluster.onecore.launch_and_wait(exe, cwd=pwd, packet_member=j['packet']) + else: + nprocs_cluster.cluster_submit(exe, cwd=pwd, packet_member=j['packet']) write_dir = '.' if self.readonly else pjoin(self.me_dir, 'SubProcesses') + if self.nprocs > 1: + nprocs_cluster.wait(self.me_dir, gridpack_wait_monitoring) + + if self.readonly: + combine_runs.CombineRuns(write_dir) + else: + combine_runs.CombineRuns(self.me_dir) self.check_events(goal_lum, to_refine, jobs, write_dir) def check_events(self, goal_lum, to_refine, jobs, Sdir): diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/hel_recycle.py b/epochX/cudacpp/gg_ttggg.mad/bin/internal/hel_recycle.py index 1471de4bcb..978ba6575e 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/hel_recycle.py +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/hel_recycle.py @@ -550,7 +550,7 @@ def get_jamp_lines(self, line): def get_amp2_lines(self, line): if line.startswith(' DO I = 1, NCOLOR'): self.in_amp2 = False - elif not line.isspace(): + elif not line.isspace() and 'DENOM' not in line: self.template_dict['amp2_lines'] += f'{line[0:6]} {self.add_indices(line[6:])}' def prepare_bools(self): diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/histograms.py b/epochX/cudacpp/gg_ttggg.mad/bin/internal/histograms.py index 51ae2914fc..d68c560806 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/histograms.py +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/histograms.py @@ -1149,11 +1149,8 @@ def parse_one_histo_from_stream(self, stream, all_weight_header, boundaries = [0.0,0.0] for j, weight in \ enumerate(HwU.histo_bin_weight_re.finditer(line_bin)): - if (j == len(weight_header)): - continue - if j == len(all_weight_header): - raise HwU.ParseError("There is more bin weights"+\ - " specified than expected (%i)"%len(weight_header)) + #if (j == len(weight_header)): + # continue if selected_central_weight == all_weight_header[j]: bin_weights['central'] = float(weight.group('weight')) if all_weight_header[j] == 'boundary_xmin': @@ -2480,14 +2477,14 @@ def get_main_central_plot_lines(HwU_name, block_position, color_index, # return [template_no_stat%rep_dic]+\ # ([template%rep_dic] if show_mc_uncertainties else []) - # The use of sqrt(-1) is just a trick to prevent the line to display + # The use of 1/0 is just a trick to prevent the line to display res = [] - rep_dic['data'] = '($3 < 0 ? sqrt(-1) : $3)' + rep_dic['data'] = '($3 < 0 ? 1/0 : $3)' res.append(template_no_stat%rep_dic) rep_dic['title'] = " title ''" if show_mc_uncertainties: res.append(template%rep_dic) - rep_dic['data'] = '($3 >= 0 ? sqrt(-1) : abs($3))' + rep_dic['data'] = '($3 >= 0 ? 1/0 : abs($3))' rep_dic['ls'] = ' ls %d'%(100+color_index) res.append(template_no_stat%rep_dic) if show_mc_uncertainties: @@ -2739,13 +2736,13 @@ def ratio_no_correlations(wgtsA, wgtsB): """#-- rendering subhistograms '%(subhistogram_type)s' %(unset label)s %(set_format_y)s +%(set_yscale)s set yrange [%(ymin).4e:%(ymax).4e] set origin %(origin_x).4e, %(origin_y).4e set size %(size_x).4e, %(size_y).4e set mytics %(mytics)d %(set_ytics)s %(set_format_x)s -%(set_yscale)s %(set_ylabel)s %(set_histo_label)s plot \\""" @@ -2878,7 +2875,7 @@ def ratio_no_correlations(wgtsA, wgtsB): # We decide to show uncertainties in the main plot only if they # are part of a monocolor band. Otherwise, they will only be - # shown in the first subplot. Notice that plotting 'sqrt(-1)' + # shown in the first subplot. Notice that plotting '1/0' # is just a trick so as to have only the key printed with no # line @@ -2890,7 +2887,7 @@ def ratio_no_correlations(wgtsA, wgtsB): '%s, scale variation'%title, band='scale' in use_band) else: uncertainty_plot_lines[-1]['scale'] = \ - ["sqrt(-1) ls %d title '%s'"%(color_index+10,'%s, scale variation'%title)] + ["1/0 ls %d title '%s'"%(color_index+10,'%s, scale variation'%title)] # And now PDF_variation if available if not PDF_var_pos is None and len(PDF_var_pos)>0: if 'pdf' in use_band: @@ -2899,7 +2896,7 @@ def ratio_no_correlations(wgtsA, wgtsB): '%s, PDF variation'%title, band='pdf' in use_band) else: uncertainty_plot_lines[-1]['pdf'] = \ - ["sqrt(-1) ls %d title '%s'"%(color_index+20,'%s, PDF variation'%title)] + ["1/0 ls %d title '%s'"%(color_index+20,'%s, PDF variation'%title)] # And now merging variation if available if not merging_var_pos is None and len(merging_var_pos)>0: if 'merging_scale' in use_band: @@ -2908,7 +2905,7 @@ def ratio_no_correlations(wgtsA, wgtsB): '%s, merging scale variation'%title, band='merging_scale' in use_band) else: uncertainty_plot_lines[-1]['merging_scale'] = \ - ["sqrt(-1) ls %d title '%s'"%(color_index+30,'%s, merging scale variation'%title)] + ["1/0 ls %d title '%s'"%(color_index+30,'%s, merging scale variation'%title)] # And now alpsfact variation if available if not alpsfact_var_pos is None and len(alpsfact_var_pos)>0: if 'alpsfact' in use_band: @@ -2917,7 +2914,7 @@ def ratio_no_correlations(wgtsA, wgtsB): '%s, alpsfact variation'%title, band='alpsfact' in use_band) else: uncertainty_plot_lines[-1]['alpsfact'] = \ - ["sqrt(-1) ls %d title '%s'"%(color_index+40,'%s, alpsfact variation'%title)] + ["1/0 ls %d title '%s'"%(color_index+40,'%s, alpsfact variation'%title)] # plot_lines.append( # "'%s' index %d using (($1+$2)/2):3 ls %d title '%s'"\ diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/launch_plugin.py b/epochX/cudacpp/gg_ttggg.mad/bin/internal/launch_plugin.py index 0924927785..ba08c10340 100644 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/launch_plugin.py +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/launch_plugin.py @@ -33,7 +33,7 @@ def compile(self, *args, **opts): if 'cwd' in opts and os.path.basename(opts['cwd']) == 'Source': path = pjoin(opts['cwd'], 'make_opts') common_run_interface.CommonRunCmd.update_make_opts_full(path, - {'FPTYPE': self.run_card['floating_type'] }) + {'override FPTYPE': self.run_card['floating_type'] }) misc.sprint('FPTYPE checked') cudacpp_supported_backends = [ 'fortran', 'cuda', 'hip', 'cpp', 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z', 'cppauto' ] if args and args[0][0] == 'madevent' and hasattr(self, 'run_card'): @@ -76,7 +76,7 @@ def reset_makeopts(self, old_value, new_value, name): if not hasattr(self, 'path'): raise Exception if name == 'floating_type': - common_run_interface.CommonRunCmd.update_make_opts_full({'FPTYPE': new_value}) + common_run_interface.CommonRunCmd.update_make_opts_full({'override FPTYPE': new_value}) else: raise Exception Sourcedir = pjoin(os.path.dirname(os.path.dirname(self.path)), 'Source') diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/lhe_parser.py b/epochX/cudacpp/gg_ttggg.mad/bin/internal/lhe_parser.py index f6e47956cd..76ded329c0 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/lhe_parser.py +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/lhe_parser.py @@ -2953,8 +2953,8 @@ def pt(self): @property def pseudorapidity(self): - norm = math.sqrt(self.px**2 + self.py**2+self.pz**2) - return 0.5* math.log((norm - self.pz) / (norm + self.pz)) + norm = math.sqrt(self.px**2 + self.py**2 + self.pz**2) + return 0.5* math.log((norm + self.pz) / (norm - self.pz)) @property def rapidity(self): 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 85e5bcf5e3..2852f1d4d8 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/madevent_interface.py +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/madevent_interface.py @@ -1171,10 +1171,10 @@ def check_survey(self, args, cmd='survey'): for opt,value in self._survey_options.items(): if arg.startswith('--%s=' % opt): exec('self.opts[\'%s\'] = %s(arg.split(\'=\')[-1])' % \ - (opt, value[0])) + (opt, value[0]), globals(), {'self':self, 'arg':arg}) arg = "" if arg != "": raise Exception - except Exception: + except Exception as error: self.help_survey() raise self.InvalidCmd('invalid %s argument'% arg) @@ -3656,9 +3656,11 @@ def do_refine(self, line): else: self.refine_mode = "new" - cross, error = self.make_make_all_html_results() + cross, error, across = self.make_make_all_html_results(get_attr=('xsec','xerru','axsec')) + self.results.add_detail('cross', cross) self.results.add_detail('error', error) + self.results.add_detail('axsec', across) self.results.add_detail('run_statistics', dict(self.results.get_detail('run_statistics'))) @@ -3786,7 +3788,7 @@ def split(a, n): for i, local_G in enumerate(split(Gdirs, nb_chunk)): line = [pjoin(self.me_dir, "Events", self.run_name, "partials%d.lhe.gz" % i)] line.append(pjoin(self.me_dir, 'Events', self.run_name, '%s_%s_banner.txt' % (self.run_name, tag))) - line.append(str(self.results.current['cross'])) + line.append(str(self.results.current.get('axsec'))) line += local_G partials_info.append(self.do_combine_events_partial(' '.join(line), preprocess_only=True)) mycluster.submit(sys.executable, @@ -6749,7 +6751,7 @@ def get_subP_ids(path): class GridPackCmd(MadEventCmd): """The command for the gridpack --Those are not suppose to be use interactively--""" - def __init__(self, me_dir = None, nb_event=0, seed=0, gran=-1, *completekey, **stdin): + def __init__(self, me_dir = None, nb_event=0, seed=0, gran=-1, nprocs=1, maxevts=2500, *completekey, **stdin): """Initialize the command and directly run""" # Initialize properly @@ -6759,6 +6761,8 @@ 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.nprocs = nprocs + self.maxevts = maxevts self.options['automatic_html_opening'] = False #write the grid_card.dat on disk @@ -6874,7 +6878,7 @@ def launch(self, nb_event, seed): #misc.call([pjoin(self.me_dir,'bin','refine4grid'), # str(nb_event), '0', 'Madevent','1','GridRun_%s' % seed], # cwd=self.me_dir) - self.refine4grid(nb_event) + self.gridpack_cross = self.refine4grid(nb_event) # 3) Combine the events/pythia/... self.exec_cmd('combine_events') @@ -6902,6 +6906,8 @@ def refine4grid(self, nb_event): precision = nb_event + across= self.make_make_all_html_results(get_attr='axsec') + self.opts = dict([(key,value[1]) for (key,value) in \ self._survey_options.items()]) @@ -6915,8 +6921,9 @@ def refine4grid(self, nb_event): 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} + refine_opt = {'err_goal': nb_event, 'split_channels': True, + 'ngran':self.granularity, 'readonly': self.readonly, + 'nprocs': self.nprocs, 'maxevts': self.maxevts} 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 @@ -6926,7 +6933,7 @@ def refine4grid(self, nb_event): #print 'run combine!!!' #combine_runs.CombineRuns(self.me_dir) - return + return across #update html output Presults = sum_html.collect_result(self) cross, error = Presults.xsec, Presults.xerru @@ -7051,10 +7058,14 @@ def do_combine_events(self, line): sum_axsec += result.get('axsec')*gscalefact[Gdir] if len(AllEvent) >= 80: #perform a partial unweighting - if self.results.current['cross'] == 0 and self.run_card['gridpack']: - nb_event= self.nb_event + if not self.results.current.get('axsec'): + if self.run_card['gridpack'] and self.gridpack_cross: + nb_event = min(abs(1.05*self.nb_event*sum_axsec/self.gridpack_cross),self.nb_event) + else: + nb_event= self.nb_event else: - nb_event = min(abs(1.01*self.nb_event*sum_axsec/self.results.current['cross']),self.run_card['nevents']) + nb_event = min(abs(1.01*self.nb_event*sum_axsec/self.results.current.get('axsec')),self.run_card['nevents'], self.nb_event, self.gridpack_cross, sum_axsec) + misc.sprint(nb_event, self.results.current.get('axsec'), self.gridpack_cross) AllEvent.unweight(pjoin(outdir, self.run_name, "partials%s.lhe.gz" % partials), get_wgt, log_level=5, trunc_error=1e-2, event_target=nb_event) AllEvent = lhe_parser.MultiEventFile() @@ -7068,6 +7079,7 @@ def do_combine_events(self, line): for data in partials_info: AllEvent.add(*data) + sum_xsec += data[1] if not hasattr(self,'proc_characteristic'): self.proc_characteristic = self.get_characteristics() diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/restore_data b/epochX/cudacpp/gg_ttggg.mad/bin/internal/restore_data index 6205bb9567..407ed7aa91 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/restore_data +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/restore_data @@ -48,8 +48,17 @@ for i in `cat subproc.mg` ; do cd ../ done +# check if we are on a Mac, otherwise assume Linux +if [[ "$OSTYPE" == "darwin"* ]]; then + # no nproc on Mac, so use sysctl instead + # use -S1024 because there is a limit on the length of the command + xargs_opts="-P $(sysctl -n hw.ncpu) -S1024" +else + xargs_opts="-P $(nproc --all)" +fi + find . -mindepth 2 -maxdepth 2 -type d -name 'G*' -print0 \ - | xargs --null -P "$(nproc --all)" -I{} bash -c " + | xargs --null ${xargs_opts} -I{} bash -c " cd {} for j in $1_results.dat ; do if [[ -e \$j ]] ; then diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/sum_html.py b/epochX/cudacpp/gg_ttggg.mad/bin/internal/sum_html.py index 9dd5826f71..fb8dd3a74a 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/sum_html.py +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/sum_html.py @@ -770,7 +770,7 @@ def collect_result(cmd, folder_names=[], jobs=None, main_dir=None): return all -def make_all_html_results(cmd, folder_names = [], jobs=[]): +def make_all_html_results(cmd, folder_names = [], jobs=[], get_attr=None): """ folder_names and jobs have been added for the amcatnlo runs """ run = cmd.results.current['run_name'] if not os.path.exists(pjoin(cmd.me_dir, 'HTML', run)): @@ -794,7 +794,12 @@ def make_all_html_results(cmd, folder_names = [], jobs=[]): fsock.write('%s

' % Presults.get_html(run, unit, cmd.me_dir)) fsock.write('%s
' % P_text) - return Presults.xsec, Presults.xerru + if not get_attr: + return Presults.xsec, Presults.xerru + else: + if isinstance(get_attr, tuple): + return [getattr(Presults, _) for _ in get_attr] + return getattr(Presults, get_attr) diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/internal/ufomodel/write_param_card.py b/epochX/cudacpp/gg_ttggg.mad/bin/internal/ufomodel/write_param_card.py index 57a85b0614..33a89259f8 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/ufomodel/write_param_card.py +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/ufomodel/write_param_card.py @@ -116,9 +116,10 @@ def write_param(self, param, lhablock): def write_dep_param_block(self, lhablock): import cmath from parameters import all_parameters + param_values = {'cmath':cmath} for parameter in all_parameters: try: - exec("%s = %s" % (parameter.name, parameter.value)) + exec("%s = %s" % (parameter.name, parameter.value), globals(), param_values) except Exception: pass text = "## Not dependent paramater.\n" @@ -134,7 +135,7 @@ def write_dep_param_block(self, lhablock): prefix = "DECAY " for part, param in data: if isinstance(param.value, str): - value = complex(eval(param.value)).real + value = complex(eval(param.value, globals(), param_values)).real else: value = param.value diff --git a/epochX/cudacpp/gg_ttggg.mad/bin/madevent b/epochX/cudacpp/gg_ttggg.mad/bin/madevent index dff9711b73..9c5363e682 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/madevent +++ b/epochX/cudacpp/gg_ttggg.mad/bin/madevent @@ -178,6 +178,17 @@ force_run = False if (args and args[0] == 'treatcards'): force_run=True + +# check that madgraph is not in PYTHONPATH +try: + import madgraph +except ImportError: + pass +else: + logger.getLogger('madgraph').error('Looks like you do have madgraph in your PYTHONPATH (or you run this executable from the main MG5aMC directory). This executable will likely not work in such case.') + + + # Call the cmd interface main loop try: if '-h' in args or '--help' in args: diff --git a/epochX/cudacpp/gg_ttggg.mad/src/HelAmps_sm.h b/epochX/cudacpp/gg_ttggg.mad/src/HelAmps_sm.h index 53dd560ed6..921ace57e7 100644 --- a/epochX/cudacpp/gg_ttggg.mad/src/HelAmps_sm.h +++ b/epochX/cudacpp/gg_ttggg.mad/src/HelAmps_sm.h @@ -8,7 +8,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_ttggg.mad/src/Parameters_sm.cc b/epochX/cudacpp/gg_ttggg.mad/src/Parameters_sm.cc index 47a3a011b8..d17aac5b5c 100644 --- a/epochX/cudacpp/gg_ttggg.mad/src/Parameters_sm.cc +++ b/epochX/cudacpp/gg_ttggg.mad/src/Parameters_sm.cc @@ -7,7 +7,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_ttggg.mad/src/Parameters_sm.h b/epochX/cudacpp/gg_ttggg.mad/src/Parameters_sm.h index 76066c7bb1..63f7d185bd 100644 --- a/epochX/cudacpp/gg_ttggg.mad/src/Parameters_sm.h +++ b/epochX/cudacpp/gg_ttggg.mad/src/Parameters_sm.h @@ -7,7 +7,7 @@ // Further modified by: A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_ttggg.sa/CODEGEN_cudacpp_gg_ttggg_log.txt b/epochX/cudacpp/gg_ttggg.sa/CODEGEN_cudacpp_gg_ttggg_log.txt index 37d3314a5d..9992b378f9 100644 --- a/epochX/cudacpp/gg_ttggg.sa/CODEGEN_cudacpp_gg_ttggg_log.txt +++ b/epochX/cudacpp/gg_ttggg.sa/CODEGEN_cudacpp_gg_ttggg_log.txt @@ -1,8 +1,11 @@ +WARNING:root:python3.12 support is still experimental. For the moment re-weighting is NOT working and do expect a LOT of syntax warning. We do not advise python3.12 for production for the moment. +Running MG5 in debug mode +Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT +Plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT has marked as NOT being validated with this version: 3.6.2. +It has been validated for the last time with version: 3.6.0 Note that this is a development version. This version is intended for development/beta testing and NOT for production. This version has not been fully tested (if at all) and might have limited user support (if at all) -Running MG5 in debug mode -Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT ************************************************************ * * * W E L C O M E to * @@ -15,7 +18,7 @@ Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT * * * * * * * * * * * * -* VERSION 3.6.0 2024-09-30 * +* VERSION 3.6.2 2025-03-19 * * * * WARNING: UNKNOWN DEVELOPMENT VERSION. * * WARNING: DO NOT USE FOR PRODUCTION * @@ -46,10 +49,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 Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt -import /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttggg.mg +import /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_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 @@ -58,7 +60,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.005965471267700195  +DEBUG: model prefixing takes 0.0018663406372070312  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  @@ -151,13 +153,13 @@ 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.863 s +1 processes with 1240 diagrams generated in 0.683 s Total: 1 processes with 1240 diagrams output standalone_cudacpp ../TMPOUT/CODEGEN_cudacpp_gg_ttggg Output will be done with PLUGIN: CUDACPP_OUTPUT DEBUG: Entering PLUGIN_ProcessExporter.__init__ (initialise the exporter) [output.py at line 171]  DEBUG: Entering PLUGIN_ProcessExporter.copy_template (initialise the directory) [output.py at line 176]  -INFO: Creating subdirectories in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttggg +INFO: Creating subdirectories in directory /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttggg 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 @@ -166,18 +168,18 @@ INFO: Processing color information for process: g g > t t~ g g g @1 DEBUG: type(fortran_model)= [output.py at line 220]  DEBUG: type(me)= me=0 [output.py at line 221]  DEBUG: "need to link", self.to_link_in_P =  need to link ['nvtx.h', 'timer.h', 'timermap.h', 'ompnumthreads.h', 'GpuRuntime.h', 'GpuAbstraction.h', 'MemoryAccessHelpers.h', 'MemoryAccessVectors.h', 'MemoryAccessMatrixElements.h', 'MemoryAccessMomenta.h', 'MemoryAccessRandomNumbers.h', 'MemoryAccessWeights.h', 'MemoryAccessAmplitudes.h', 'MemoryAccessWavefunctions.h', 'MemoryAccessGs.h', 'MemoryAccessCouplingsFixed.h', 'MemoryAccessNumerators.h', 'MemoryAccessDenominators.h', 'MemoryAccessChannelIds.h', 'EventStatistics.h', 'CommonRandomNumbers.h', 'CrossSectionKernels.cc', 'CrossSectionKernels.h', 'MatrixElementKernels.cc', 'MatrixElementKernels.h', 'RamboSamplingKernels.cc', 'RamboSamplingKernels.h', 'RandomNumberKernels.h', 'CommonRandomNumberKernel.cc', 'CurandRandomNumberKernel.cc', 'HiprandRandomNumberKernel.cc', 'Bridge.h', 'BridgeKernels.cc', 'BridgeKernels.h', 'fbridge.cc', 'fbridge.inc', 'fsampler.cc', 'fsampler.inc', 'MadgraphTest.h', 'runTest.cc', 'testmisc.cc', 'testxxx_cc_ref.txt', 'valgrind.h', 'cudacpp.mk', 'testxxx.cc', 'MemoryBuffers.h', 'MemoryAccessCouplings.h', 'perf.py', 'profile.sh'] [output.py at line 222]  -INFO: Creating files in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttggg/SubProcesses/P1_Sigma_sm_gg_ttxggg -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttggg/SubProcesses/P1_Sigma_sm_gg_ttxggg/./CPPProcess.h -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttggg/SubProcesses/P1_Sigma_sm_gg_ttxggg/./CPPProcess.cc -INFO: Created files CPPProcess.h and CPPProcess.cc in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttggg/SubProcesses/P1_Sigma_sm_gg_ttxggg/. -Generated helas calls for 1 subprocesses (1240 diagrams) in 6.535 s +INFO: Creating files in directory /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttggg/SubProcesses/P1_Sigma_sm_gg_ttxggg +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttggg/SubProcesses/P1_Sigma_sm_gg_ttxggg/./CPPProcess.h +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttggg/SubProcesses/P1_Sigma_sm_gg_ttxggg/./CPPProcess.cc +INFO: Created files CPPProcess.h and CPPProcess.cc in directory /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttggg/SubProcesses/P1_Sigma_sm_gg_ttxggg/. +Generated helas calls for 1 subprocesses (1240 diagrams) in 2.529 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.348 s +ALOHA: aloha creates 5 routines in 0.140 s VVV1 VVV1 FFV1 @@ -190,17 +192,17 @@ ALOHA: aloha creates 5 routines in 0.348 s VVVV3 VVVV4 VVVV4 -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttggg/src/./HelAmps_sm.h -INFO: Created file HelAmps_sm.h in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttggg/src/. +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttggg/src/./HelAmps_sm.h +INFO: Created file HelAmps_sm.h in directory /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_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_cudacpp_gg_ttggg/src/./Parameters_sm.h -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttggg/src/./Parameters_sm.cc +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttggg/src/./Parameters_sm.h +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_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_cudacpp_gg_ttggg/src/. and /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttggg/src/. +INFO: /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttggg/src/. and /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_ttggg/src/. quit -real 0m12.948s -user 0m12.781s -sys 0m0.107s -Code generation completed in 13 seconds +real 0m8.444s +user 0m5.036s +sys 0m0.315s +Code generation completed in 9 seconds diff --git a/epochX/cudacpp/gg_ttggg.sa/SubProcesses/Bridge.h b/epochX/cudacpp/gg_ttggg.sa/SubProcesses/Bridge.h index 87aa648dd2..49b928db67 100644 --- a/epochX/cudacpp/gg_ttggg.sa/SubProcesses/Bridge.h +++ b/epochX/cudacpp/gg_ttggg.sa/SubProcesses/Bridge.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: S. Roiser (Nov 2021) for the MG5aMC CUDACPP plugin. -// Further modified by: S. Roiser, J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2021-2025) for the MG5aMC CUDACPP plugin. #ifndef BRIDGE_H #define BRIDGE_H 1 @@ -255,11 +255,15 @@ namespace mg5amcCpu throw std::logic_error( "Bridge constructor: FIXME! cannot choose gputhreads" ); // this should never happen! m_gpublocks = m_nevt / m_gputhreads; } +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Instantiate device Bridge (nevt=" << m_nevt << ", gpublocks=" << m_gpublocks << ", gputhreads=" << m_gputhreads << ", gpublocks*gputhreads=" << m_gpublocks * m_gputhreads << ")" << std::endl; +#endif m_pmek.reset( new MatrixElementKernelDevice( m_devMomentaC, m_devGs, m_devRndHel, m_devRndCol, m_devChannelIds, m_devMEs, m_devSelHel, m_devSelCol, m_gpublocks, m_gputhreads ) ); #else +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Instantiate host Bridge (nevt=" << m_nevt << ")" << std::endl; +#endif m_pmek.reset( new MatrixElementKernelHost( m_hstMomentaC, m_hstGs, m_hstRndHel, m_hstRndCol, m_hstChannelIds, m_hstMEs, m_hstSelHel, m_hstSelCol, m_nevt ) ); #endif // MGONGPUCPP_GPUIMPL // Create a process object, read param card and set parameters @@ -290,8 +294,10 @@ namespace mg5amcCpu throw std::runtime_error( "Bridge: gpublocks*gputhreads must equal m_nevt in set_gpugrid" ); m_gpublocks = gpublocks; m_gputhreads = gputhreads; +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Set grid in Bridge (nevt=" << m_nevt << ", gpublocks=" << m_gpublocks << ", gputhreads=" << m_gputhreads << ", gpublocks*gputhreads=" << m_gpublocks * m_gputhreads << ")" << std::endl; +#endif m_pmek->setGrid( m_gpublocks, m_gputhreads ); } #endif @@ -347,7 +353,9 @@ namespace mg5amcCpu if( goodHelOnly ) return; m_pmek->computeMatrixElements( useChannelIds ); copyHostFromDevice( m_hstMEs, m_devMEs ); +#ifdef MGONGPUCPP_VERBOSE flagAbnormalMEs( m_hstMEs.data(), m_nevt ); +#endif copyHostFromDevice( m_hstSelHel, m_devSelHel ); copyHostFromDevice( m_hstSelCol, m_devSelCol ); if constexpr( std::is_same_v ) @@ -400,7 +408,9 @@ namespace mg5amcCpu } if( goodHelOnly ) return; m_pmek->computeMatrixElements( useChannelIds ); +#ifdef MGONGPUCPP_VERBOSE flagAbnormalMEs( m_hstMEs.data(), m_nevt ); +#endif if constexpr( std::is_same_v ) { memcpy( mes, m_hstMEs.data(), m_hstMEs.bytes() ); diff --git a/epochX/cudacpp/gg_ttggg.sa/SubProcesses/GpuRuntime.h b/epochX/cudacpp/gg_ttggg.sa/SubProcesses/GpuRuntime.h index 860c7fde16..6a4b946e74 100644 --- a/epochX/cudacpp/gg_ttggg.sa/SubProcesses/GpuRuntime.h +++ b/epochX/cudacpp/gg_ttggg.sa/SubProcesses/GpuRuntime.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: J. Teig (Jun 2023, based on earlier work by S. Roiser) for the MG5aMC CUDACPP plugin. -// Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2025) for the MG5aMC CUDACPP plugin. #ifndef MG5AMC_GPURUNTIME_H #define MG5AMC_GPURUNTIME_H 1 @@ -50,7 +50,7 @@ namespace mg5amcGpu // Set up CUDA application // ** NB: strictly speaking this is not needed when using the CUDA runtime API ** // Calling cudaSetDevice on startup is useful to properly book-keep the time spent in CUDA initialization - static void setUp( const bool debug = true ) + static void setUp( const bool debug = false ) // ZW: changed debug default to false { // ** NB: it is useful to call cudaSetDevice, or cudaFree, to properly book-keep the time spent in CUDA initialization // ** NB: otherwise, the first CUDA operation (eg a cudaMemcpyToSymbol in CPPProcess ctor) appears to take much longer! @@ -71,7 +71,7 @@ namespace mg5amcGpu // ** NB: strictly speaking this is not needed when using the CUDA runtime API ** // Calling cudaDeviceReset on shutdown is only needed for checking memory leaks in cuda-memcheck // See https://docs.nvidia.com/cuda/cuda-memcheck/index.html#leak-checking - static void tearDown( const bool debug = true ) + static void tearDown( const bool debug = false ) // ZW: changed debug default to false { if( debug ) std::cout << "__GpuRuntime: calling GpuDeviceReset()" << std::endl; checkGpu( gpuDeviceReset() ); diff --git a/epochX/cudacpp/gg_ttggg.sa/SubProcesses/MatrixElementKernels.cc b/epochX/cudacpp/gg_ttggg.sa/SubProcesses/MatrixElementKernels.cc index f463977c1a..703ea3781c 100644 --- a/epochX/cudacpp/gg_ttggg.sa/SubProcesses/MatrixElementKernels.cc +++ b/epochX/cudacpp/gg_ttggg.sa/SubProcesses/MatrixElementKernels.cc @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: A. Valassi (Jan 2022) for the MG5aMC CUDACPP plugin. -// Further modified by: J. Teig, A. Valassi (2022-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: J. Teig, A. Valassi, Z. Wettersten (2022-2025) for the MG5aMC CUDACPP plugin. #include "MatrixElementKernels.h" @@ -60,7 +60,9 @@ namespace mg5amcCpu #ifdef MGONGPU_CHANNELID_DEBUG MatrixElementKernelBase::dumpNevtProcessedByChannel(); #endif +#ifdef MGONGPUCPP_VERBOSE MatrixElementKernelBase::dumpSignallingFPEs(); +#endif } //-------------------------------------------------------------------------- diff --git a/epochX/cudacpp/gg_ttggg.sa/SubProcesses/MatrixElementKernels.h b/epochX/cudacpp/gg_ttggg.sa/SubProcesses/MatrixElementKernels.h index 7acff4b308..8da04d7945 100644 --- a/epochX/cudacpp/gg_ttggg.sa/SubProcesses/MatrixElementKernels.h +++ b/epochX/cudacpp/gg_ttggg.sa/SubProcesses/MatrixElementKernels.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: A. Valassi (Jan 2022) for the MG5aMC CUDACPP plugin. -// Further modified by: J. Teig, A. Valassi (2022-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: J. Teig, A. Valassi, Z. Wettersten (2022-2025) for the MG5aMC CUDACPP plugin. #ifndef MATRIXELEMENTKERNELS_H #define MATRIXELEMENTKERNELS_H 1 @@ -134,7 +134,7 @@ namespace mg5amcCpu // Does this host system support the SIMD used in the matrix element calculation? // [NB: this is private, SIMD vectorization in mg5amc C++ code is currently only used in the ME calculations below MatrixElementKernelHost!] - static bool hostSupportsSIMD( const bool verbose = true ); + static bool hostSupportsSIMD( const bool verbose = false ); // ZW: default verbose false private: diff --git a/epochX/cudacpp/gg_ttggg.sa/SubProcesses/MemoryAccessGs.h b/epochX/cudacpp/gg_ttggg.sa/SubProcesses/MemoryAccessGs.h index 63c17a68fa..50a6aaef4d 100644 --- a/epochX/cudacpp/gg_ttggg.sa/SubProcesses/MemoryAccessGs.h +++ b/epochX/cudacpp/gg_ttggg.sa/SubProcesses/MemoryAccessGs.h @@ -128,6 +128,14 @@ namespace mg5amcCpu #endif } + // Locate a field (output) in a memory buffer (input) from a kernel event-indexing mechanism (internal) + // [Signature (SCALAR OR VECTOR) ===> fptype_sv* kernelAccess( fptype* buffer ) <===] + static __host__ __device__ inline fptype_sv* + kernelAccessP( fptype* buffer ) + { + return reinterpret_cast( buffer ); + } + // Locate a field (output) in a memory buffer (input) from a kernel event-indexing mechanism (internal) and the given field indexes (input) // [Signature (const, SCALAR) ===> const fptype& kernelAccessConst( const fptype* buffer ) <===] static constexpr auto kernelAccessConst_s = diff --git a/epochX/cudacpp/gg_ttggg.sa/SubProcesses/MemoryBuffers.h b/epochX/cudacpp/gg_ttggg.sa/SubProcesses/MemoryBuffers.h index 65a101888d..17ba7a89e5 100644 --- a/epochX/cudacpp/gg_ttggg.sa/SubProcesses/MemoryBuffers.h +++ b/epochX/cudacpp/gg_ttggg.sa/SubProcesses/MemoryBuffers.h @@ -13,6 +13,7 @@ #include "CPPProcess.h" #include "GpuRuntime.h" #include "Parameters_sm.h" +#include "processConfig.h" #include @@ -274,7 +275,8 @@ namespace mg5amcCpu typedef BufferBase BufferNumerators; // The size (number of elements) per event in a memory buffer for numerators - constexpr size_t sizePerEventNumerators = 1; + // (should be equal to the number of diagrams in the process) + constexpr size_t sizePerEventNumerators = processConfig::ndiagrams; #ifndef MGONGPUCPP_GPUIMPL // A class encapsulating a C++ host buffer for gs 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 07099839d3..047387cab4 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 @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -25,6 +25,7 @@ #include "MemoryAccessMatrixElements.h" #include "MemoryAccessMomenta.h" #include "MemoryAccessWavefunctions.h" +#include "processConfig.h" #ifdef MGONGPU_SUPPORTS_MULTICHANNEL #include "MemoryAccessDenominators.h" @@ -96,6 +97,69 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { +#ifdef MGONGPU_SUPPORTS_MULTICHANNEL + __device__ INLINE unsigned int getChannelId( const unsigned int* allChannelIds +#ifndef MGONGPUCPP_GPUIMPL + , + const int ievt00, + bool sanityCheckMixedPrecision = true +#endif + ) + { + unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr +#ifdef MGONGPUCPP_GPUIMPL + using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page + if( allChannelIds != nullptr ) + { + const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) + const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) + // NB: channelIds_sv is a scalar in CUDA + channelId = channelIds_sv; + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + } +#else // Cuda or C++ + using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + if( allChannelIds != nullptr ) + { + // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) + const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 + uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) +#ifndef MGONGPU_CPPSIMD + // NB: channelIds_sv is a scalar in no-SIMD C++ + channelId = channelIds_sv; +#else + // NB: channelIds_sv is a vector in SIMD C++ + channelId = channelIds_sv[0]; // element[0] + for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] + { + assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId + } +#endif + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + if( sanityCheckMixedPrecision ) + { +#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT + // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) + const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 + uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + for( int i = 0; i < neppV; ++i ) + { + assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector + } +#endif + } + } +#endif // MGONGPUCPP_GPUIMPL + return channelId; + } +#endif // MGONGPU_SUPPORTS_MULTICHANNEL + constexpr int nw6 = CPPProcess::nw6; // dimensions of each wavefunction (HELAS KEK 91-11): e.g. 6 for e+ e- -> mu+ mu- (fermions and vectors) constexpr int npar = CPPProcess::npar; // #particles in total (external = initial + final): e.g. 4 for e+ e- -> mu+ mu- constexpr int ncomb = CPPProcess::ncomb; // #helicity combinations: e.g. 16 for e+ e- -> mu+ mu- (2**4 = fermion spin up/down ** npar) @@ -305,7 +369,7 @@ namespace mg5amcCpu COUPs[ndcoup + iicoup] = allCOUPs[ndcoup + iicoup]; // independent couplings, fixed for all events fptype* MEs = E_ACCESS::ieventAccessRecord( allMEs, ievt0 ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); #endif #endif @@ -315,7 +379,7 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Numerators and denominators for the current event (CUDA) or SIMD event page (C++) - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); #endif @@ -32273,7 +32337,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- @@ -32647,9 +32713,6 @@ namespace mg5amcCpu #ifdef MGONGPUCPP_GPUIMPL // Remember: in CUDA this is a kernel for one event, in c++ this processes n events const int ievt = blockDim.x * blockIdx.x + threadIdx.x; // index of event (thread) in grid -#ifdef MGONGPU_SUPPORTS_MULTICHANNEL - using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events -#endif #else //assert( (size_t)(allmomenta) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] //assert( (size_t)(allMEs) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] @@ -32657,7 +32720,6 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL using NUM_ACCESS = HostAccessNumerators; // non-trivial access: buffer includes all events using DEN_ACCESS = HostAccessDenominators; // non-trivial access: buffer includes all events - using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events #endif #endif @@ -32682,11 +32744,12 @@ namespace mg5amcCpu fptype_sv& MEs_sv = E_ACCESS::kernelAccess( MEs ); MEs_sv = fptype_sv{ 0 }; #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - numerators_sv = fptype_sv{ 0 }; + for( int i = 0; i < processConfig::ndiagrams; ++i ) + numerators_sv[i] = fptype_sv{ 0 }; denominators_sv = fptype_sv{ 0 }; #endif } @@ -32699,17 +32762,7 @@ namespace mg5amcCpu // *** START OF PART 1a - CUDA (one event per GPU thread) *** #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) - const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) - // NB: channelIds_sv is a scalar in CUDA - channelId = channelIds_sv; - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) - } + unsigned int channelId = getChannelId( allChannelIds ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (for the single event processed in calculate_wavefunctions) @@ -32824,38 +32877,7 @@ namespace mg5amcCpu const int ievt00 = ipagV2 * neppV; // loop on one SIMD page (neppV events) at a time #endif #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) - const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 - uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) -#ifndef MGONGPU_CPPSIMD - // NB: channelIds_sv is a scalar in no-SIMD C++ - channelId = channelIds_sv; -#else - // NB: channelIds_sv is a vector in SIMD C++ - channelId = channelIds_sv[0]; // element[0] - for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] - { - assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId - } -#endif - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) -#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT - // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) - const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 - uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - for( int i = 0; i < neppV; ++i ) - { - assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector - } -#endif - } + unsigned int channelId = getChannelId( allChannelIds, ievt00 ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (jamp2[nParity][ncolor][neppV] for the SIMD vector - or the two SIMD vectors - of events processed in calculate_wavefunctions) @@ -33028,11 +33050,12 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( allChannelIds != nullptr ) // fix segfault #892 (not 'channelIds[0] != 0') { - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + const unsigned int channelId = getChannelId( allChannelIds, ievt0, false ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - MEs_sv *= numerators_sv / denominators_sv; + MEs_sv *= numerators_sv[channelId - 1] / denominators_sv; } #endif //for( int ieppV = 0; ieppV < neppV; ieppV++ ) diff --git a/epochX/cudacpp/gg_ttggg.sa/SubProcesses/P1_Sigma_sm_gg_ttxggg/CPPProcess.h b/epochX/cudacpp/gg_ttggg.sa/SubProcesses/P1_Sigma_sm_gg_ttxggg/CPPProcess.h index 2eb1e066ff..a89060a269 100644 --- a/epochX/cudacpp/gg_ttggg.sa/SubProcesses/P1_Sigma_sm_gg_ttxggg/CPPProcess.h +++ b/epochX/cudacpp/gg_ttggg.sa/SubProcesses/P1_Sigma_sm_gg_ttxggg/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_ttggg.sa/SubProcesses/P1_Sigma_sm_gg_ttxggg/processConfig.h b/epochX/cudacpp/gg_ttggg.sa/SubProcesses/P1_Sigma_sm_gg_ttxggg/processConfig.h new file mode 100644 index 0000000000..fe7af482a7 --- /dev/null +++ b/epochX/cudacpp/gg_ttggg.sa/SubProcesses/P1_Sigma_sm_gg_ttxggg/processConfig.h @@ -0,0 +1,16 @@ +// Copyright (C) 2025 CERN and UCLouvain. +// Licensed under the GNU Lesser General Public License (version 3 or later). +// Created by: S. Roiser (May 2025) for the MG5aMC CUDACPP plugin. +// Further modified by: ... for the MG5aMC CUDACPP plugin. + + +#ifndef MG5_CONFIG_SIGMA_SM_GG_TTXGGG_H +#define MG5_CONFIG_SIGMA_SM_GG_TTXGGG_H 1 + +namespace processConfig { + + constexpr int ndiagrams = 1240; + +} + +#endif // MG5_CONFIG_SIGMA_SM_GG_TTXGGG_H \ 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 53dd560ed6..921ace57e7 100644 --- a/epochX/cudacpp/gg_ttggg.sa/src/HelAmps_sm.h +++ b/epochX/cudacpp/gg_ttggg.sa/src/HelAmps_sm.h @@ -8,7 +8,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_ttggg.sa/src/Parameters_sm.cc b/epochX/cudacpp/gg_ttggg.sa/src/Parameters_sm.cc index 47a3a011b8..d17aac5b5c 100644 --- a/epochX/cudacpp/gg_ttggg.sa/src/Parameters_sm.cc +++ b/epochX/cudacpp/gg_ttggg.sa/src/Parameters_sm.cc @@ -7,7 +7,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_ttggg.sa/src/Parameters_sm.h b/epochX/cudacpp/gg_ttggg.sa/src/Parameters_sm.h index 76066c7bb1..63f7d185bd 100644 --- a/epochX/cudacpp/gg_ttggg.sa/src/Parameters_sm.h +++ b/epochX/cudacpp/gg_ttggg.sa/src/Parameters_sm.h @@ -7,7 +7,7 @@ // Further modified by: A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== 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 1baee42e06..8486c2944e 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 @@ -1,8 +1,11 @@ +WARNING:root:python3.12 support is still experimental. For the moment re-weighting is NOT working and do expect a LOT of syntax warning. We do not advise python3.12 for production for the moment. +Running MG5 in debug mode +Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT +Plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT has marked as NOT being validated with this version: 3.6.2. +It has been validated for the last time with version: 3.6.0 Note that this is a development version. This version is intended for development/beta testing and NOT for production. This version has not been fully tested (if at all) and might have limited user support (if at all) -Running MG5 in debug mode -Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT ************************************************************ * * * W E L C O M E to * @@ -15,7 +18,7 @@ Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT * * * * * * * * * * * * -* VERSION 3.6.0 2024-09-30 * +* VERSION 3.6.2 2025-03-19 * * * * WARNING: UNKNOWN DEVELOPMENT VERSION. * * WARNING: DO NOT USE FOR PRODUCTION * @@ -46,10 +49,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 Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt -import /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq.mg +import /shared/roiser/sw/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 @@ -57,7 +59,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.006198406219482422  +DEBUG: model prefixing takes 0.001968860626220703  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  @@ -166,21 +168,21 @@ 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.078 s +8 processes with 40 diagrams generated in 0.055 s Total: 8 processes with 40 diagrams output madevent_simd ../TMPOUT/CODEGEN_mad_gq_ttq --hel_recycling=False --vector_size=32 Output will be done with PLUGIN: CUDACPP_OUTPUT Addition matrix-element will be done with PLUGIN: CUDACPP_OUTPUT -DEBUG: opt['output_options']['vector_size'] =  32 [export_v4.py at line 4334]  +DEBUG: opt['output_options']['vector_size'] =  32 [export_v4.py at line 4166]  Output will be done with PLUGIN: CUDACPP_OUTPUT DEBUG: Entering PLUGIN_ProcessExporter.__init__ (initialise the exporter) [output.py at line 171]  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 176]  -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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq  +INFO: Creating subdirectories in directory /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq +WARNING: File exists /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/Cards  +WARNING: File exists /shared/roiser/sw/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 @@ -200,9 +202,9 @@ FileWriter t t~ u WEIGHTED<=3 @1 INFO: Finding symmetric diagrams for subprocess group gu_ttxu -DEBUG: len(subproc_diagrams_for_config) =  5 [model_handling.py at line 1527]  -DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5} [model_handling.py at line 1551]  -DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5} [model_handling.py at line 1552]  +DEBUG: len(subproc_diagrams_for_config) =  5 [model_handling.py at line 1538]  +DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5} [model_handling.py at line 1562]  +DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5} [model_handling.py at line 1563]  INFO: Creating files in directory P1_gux_ttxux DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1156]  INFO: Creating files in directory . @@ -211,62 +213,64 @@ FileWriter t t~ u~ WEIGHTED<=3 @1 INFO: Finding symmetric diagrams for subprocess group gux_ttxux -DEBUG: len(subproc_diagrams_for_config) =  5 [model_handling.py at line 1527]  -DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5} [model_handling.py at line 1551]  -DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5} [model_handling.py at line 1552]  -Generated helas calls for 2 subprocesses (10 diagrams) in 0.030 s -Wrote files for 32 helas calls in 0.164 s +DEBUG: len(subproc_diagrams_for_config) =  5 [model_handling.py at line 1538]  +DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5} [model_handling.py at line 1562]  +DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5} [model_handling.py at line 1563]  +Generated helas calls for 2 subprocesses (10 diagrams) in 0.024 s +Wrote files for 32 helas calls in 2.151 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.148 s +ALOHA: aloha creates 2 routines in 0.064 s 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.074 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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/src/./HelAmps_sm.h +INFO: Created file HelAmps_sm.h in directory /shared/roiser/sw/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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/src/./Parameters_sm.h +FileWriter for /shared/roiser/sw/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: /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/src/. and /shared/roiser/sw/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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/Cards/me5_configuration.txt INFO: Use Fortran compiler gfortran INFO: Use c++ compiler g++ INFO: Generate jpeg diagrams 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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq; patch -p4 -i /shared/roiser/sw/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common patching file SubProcesses/makefile -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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/SubProcesses/P1_gu_ttxu; patch -p6 -i /shared/roiser/sw/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file driver.f patching file matrix1.f Hunk #1 succeeded at 74 (offset 3 lines). Hunk #2 succeeded at 254 (offset 27 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 +DEBUG: cd /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/SubProcesses/P1_gux_ttxux; patch -p6 -i /shared/roiser/sw/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file driver.f patching file matrix1.f Hunk #1 succeeded at 74 (offset 3 lines). Hunk #2 succeeded at 254 (offset 27 lines). DEBUG: p.returncode =  0 [output.py at line 263]  -Output to directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq done. +Output to directory /shared/roiser/sw/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 +/shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/README Run "open index.html" to see more information about this process. quit -real 0m2.210s -user 0m1.890s -sys 0m0.303s -Code generation completed in 2 seconds +real 0m7.939s +user 0m1.339s +sys 0m0.754s +Code generation completed in 8 seconds +/shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/bin/internal/banner.py:3309: SyntaxWarning: invalid escape sequence '\s' + function_pat = re.compile('^\s+(?:SUBROUTINE|(?:%(type)s)\s+function)\s+([a-zA-Z]\w*)' \ ************************************************************ * * * W E L C O M E to * @@ -279,7 +283,7 @@ Code generation completed in 2 seconds * * * * * * * * * * * * -* VERSION 3.6.0 * +* VERSION 3.6.2 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -287,10 +291,9 @@ Code generation completed in 2 seconds * 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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/Cards/me5_configuration.txt +INFO: load configuration from /shared/roiser/sw/madgraph4gpu/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/Cards/me5_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 @@ -309,7 +312,7 @@ launch in debug mode * * * * * * * * * * * * -* VERSION 3.6.0 * +* VERSION 3.6.2 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -317,10 +320,9 @@ 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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/Cards/me5_configuration.txt +INFO: load configuration from /shared/roiser/sw/madgraph4gpu/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_gq_ttq/Cards/me5_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 68b4c46295..a0212bfb62 100644 --- a/epochX/cudacpp/gq_ttq.mad/Cards/me5_configuration.txt +++ b/epochX/cudacpp/gq_ttq.mad/Cards/me5_configuration.txt @@ -235,7 +235,7 @@ # pineappl = pineappl -#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo +#mg5_path = /shared/roiser/sw/madgraph4gpu/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo +#mg5_path = /shared/roiser/sw/madgraph4gpu/MG5aMC/mg5amcnlo diff --git a/epochX/cudacpp/gq_ttq.mad/Cards/proc_card_mg5.dat b/epochX/cudacpp/gq_ttq.mad/Cards/proc_card_mg5.dat index 795e11afaf..d9e54f3f0e 100644 --- a/epochX/cudacpp/gq_ttq.mad/Cards/proc_card_mg5.dat +++ b/epochX/cudacpp/gq_ttq.mad/Cards/proc_card_mg5.dat @@ -8,7 +8,7 @@ #* * * * #* * #* * -#* VERSION 3.6.0 2024-09-30 * +#* VERSION 3.6.2 2025-03-19 * #* * #* WARNING: UNKNOWN DEVELOPMENT VERSION. * #* WARNING: DO NOT USE FOR PRODUCTION * diff --git a/epochX/cudacpp/gq_ttq.mad/Cards/run_card.dat b/epochX/cudacpp/gq_ttq.mad/Cards/run_card.dat index 66a805e521..3db737130c 100644 --- a/epochX/cudacpp/gq_ttq.mad/Cards/run_card.dat +++ b/epochX/cudacpp/gq_ttq.mad/Cards/run_card.dat @@ -109,6 +109,7 @@ # Parton level cuts definition * #******************************* 0.0 = dsqrt_shat ! minimal shat for full process + -1 = dsqrt_shatmax ! maximum shat for full process # # #********************************************************************* diff --git a/epochX/cudacpp/gq_ttq.mad/Cards/run_card_default.dat b/epochX/cudacpp/gq_ttq.mad/Cards/run_card_default.dat index 8c0f1e2199..47c2051950 100644 --- a/epochX/cudacpp/gq_ttq.mad/Cards/run_card_default.dat +++ b/epochX/cudacpp/gq_ttq.mad/Cards/run_card_default.dat @@ -109,6 +109,7 @@ # Parton level cuts definition * #******************************* 0.0 = dsqrt_shat ! minimal shat for full process + -1 = dsqrt_shatmax ! maximum shat for full process # # #********************************************************************* diff --git a/epochX/cudacpp/gq_ttq.mad/MGMEVersion.txt b/epochX/cudacpp/gq_ttq.mad/MGMEVersion.txt index 084e244cea..77a069e39b 100644 --- a/epochX/cudacpp/gq_ttq.mad/MGMEVersion.txt +++ b/epochX/cudacpp/gq_ttq.mad/MGMEVersion.txt @@ -1 +1 @@ -3.6.0 \ No newline at end of file +3.6.2 \ No newline at end of file diff --git a/epochX/cudacpp/gq_ttq.mad/Source/alfas_functions.f b/epochX/cudacpp/gq_ttq.mad/Source/alfas_functions.f index bb69a6384e..84aeff369c 100644 --- a/epochX/cudacpp/gq_ttq.mad/Source/alfas_functions.f +++ b/epochX/cudacpp/gq_ttq.mad/Source/alfas_functions.f @@ -188,6 +188,10 @@ SUBROUTINE NEWTON1(T,A_IN,A_OUT,NLOOP,NF) A_OUT=A_IN/(1D0+A_IN*B0(NF)*T) IF (NLOOP .EQ. 1) RETURN + if (1D0+A_IN*B0(NF)*T.le.0d0)THEN + A_OUT = 9d98 + RETURN + ENDIF A_OUT=A_IN/(1D0+B0(NF)*A_IN*T+C1(NF)*A_IN*LOG(1D0+A_IN*B0(NF)*T)) IF (A_OUT .LT. 0D0) AS=0.3D0 30 AS=A_OUT diff --git a/epochX/cudacpp/gq_ttq.mad/Source/cuts.inc b/epochX/cudacpp/gq_ttq.mad/Source/cuts.inc index 23d099e5f7..a8ccc7420d 100644 --- a/epochX/cudacpp/gq_ttq.mad/Source/cuts.inc +++ b/epochX/cudacpp/gq_ttq.mad/Source/cuts.inc @@ -37,7 +37,7 @@ C REAL*8 misset,missetmax,ptheavy REAL*8 ptllmin,ptllmax integer maxjetflavor - REAl*8 dsqrt_shat + REAl*8 dsqrt_shat,dsqrt_shatmax COMMON /to_min_max_cuts/ & PTJmax,PTBmax,PTAmax,PTLmax, @@ -60,7 +60,7 @@ C & ht2max,ht3max,ht4max, & htjmin,htjmax,ihtmin,ihtmax, & misset,missetmax,ptheavy, - & ptllmin,ptllmax,dsqrt_shat, + & ptllmin,ptllmax,dsqrt_shat,dsqrt_shatmax, & maxjetflavor C diff --git a/epochX/cudacpp/gq_ttq.mad/Source/make_opts b/epochX/cudacpp/gq_ttq.mad/Source/make_opts index e4b87ee6ad..f9f7b64bb5 100644 --- a/epochX/cudacpp/gq_ttq.mad/Source/make_opts +++ b/epochX/cudacpp/gq_ttq.mad/Source/make_opts @@ -5,8 +5,8 @@ GLOBAL_FLAG=-O3 -ffast-math -fbounds-check MACFLAG= MG5AMC_VERSION=SpecifiedByMG5aMCAtRunTime PYTHIA8_PATH=NotInstalled -STDLIB_FLAG= STDLIB=-lstdc++ +STDLIB_FLAG= #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 291ca907ee..f9321e7a94 100644 --- a/epochX/cudacpp/gq_ttq.mad/Source/makefile +++ b/epochX/cudacpp/gq_ttq.mad/Source/makefile @@ -73,6 +73,7 @@ $(BINDIR)gensudgrid: $(GENSUDGRID) $(LIBDIR)libpdf.$(libext) $(LIBDIR)libgammaUP # Dependencies dsample.o: DiscreteSampler.o dsample.f genps.inc StringCast.o vector.inc +pawgraph.o: vector.inc DiscreteSampler.o: StringCast.o invarients.o: invarients.f genps.inc gen_ximprove.o: gen_ximprove.f run_config.inc run_card.inc diff --git a/epochX/cudacpp/gq_ttq.mad/Source/run_card.inc b/epochX/cudacpp/gq_ttq.mad/Source/run_card.inc index 1a1bc782bd..8bd5f73840 100644 --- a/epochX/cudacpp/gq_ttq.mad/Source/run_card.inc +++ b/epochX/cudacpp/gq_ttq.mad/Source/run_card.inc @@ -88,6 +88,8 @@ DSQRT_SHAT = 0.000000000000000D+00 + DSQRT_SHATMAX = -1 + LIMHEL = 0.000000000000000D+00 PTJ = 2.000000000000000D+01 diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/Bridge.h b/epochX/cudacpp/gq_ttq.mad/SubProcesses/Bridge.h index 87aa648dd2..49b928db67 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/Bridge.h +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/Bridge.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: S. Roiser (Nov 2021) for the MG5aMC CUDACPP plugin. -// Further modified by: S. Roiser, J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2021-2025) for the MG5aMC CUDACPP plugin. #ifndef BRIDGE_H #define BRIDGE_H 1 @@ -255,11 +255,15 @@ namespace mg5amcCpu throw std::logic_error( "Bridge constructor: FIXME! cannot choose gputhreads" ); // this should never happen! m_gpublocks = m_nevt / m_gputhreads; } +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Instantiate device Bridge (nevt=" << m_nevt << ", gpublocks=" << m_gpublocks << ", gputhreads=" << m_gputhreads << ", gpublocks*gputhreads=" << m_gpublocks * m_gputhreads << ")" << std::endl; +#endif m_pmek.reset( new MatrixElementKernelDevice( m_devMomentaC, m_devGs, m_devRndHel, m_devRndCol, m_devChannelIds, m_devMEs, m_devSelHel, m_devSelCol, m_gpublocks, m_gputhreads ) ); #else +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Instantiate host Bridge (nevt=" << m_nevt << ")" << std::endl; +#endif m_pmek.reset( new MatrixElementKernelHost( m_hstMomentaC, m_hstGs, m_hstRndHel, m_hstRndCol, m_hstChannelIds, m_hstMEs, m_hstSelHel, m_hstSelCol, m_nevt ) ); #endif // MGONGPUCPP_GPUIMPL // Create a process object, read param card and set parameters @@ -290,8 +294,10 @@ namespace mg5amcCpu throw std::runtime_error( "Bridge: gpublocks*gputhreads must equal m_nevt in set_gpugrid" ); m_gpublocks = gpublocks; m_gputhreads = gputhreads; +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Set grid in Bridge (nevt=" << m_nevt << ", gpublocks=" << m_gpublocks << ", gputhreads=" << m_gputhreads << ", gpublocks*gputhreads=" << m_gpublocks * m_gputhreads << ")" << std::endl; +#endif m_pmek->setGrid( m_gpublocks, m_gputhreads ); } #endif @@ -347,7 +353,9 @@ namespace mg5amcCpu if( goodHelOnly ) return; m_pmek->computeMatrixElements( useChannelIds ); copyHostFromDevice( m_hstMEs, m_devMEs ); +#ifdef MGONGPUCPP_VERBOSE flagAbnormalMEs( m_hstMEs.data(), m_nevt ); +#endif copyHostFromDevice( m_hstSelHel, m_devSelHel ); copyHostFromDevice( m_hstSelCol, m_devSelCol ); if constexpr( std::is_same_v ) @@ -400,7 +408,9 @@ namespace mg5amcCpu } if( goodHelOnly ) return; m_pmek->computeMatrixElements( useChannelIds ); +#ifdef MGONGPUCPP_VERBOSE flagAbnormalMEs( m_hstMEs.data(), m_nevt ); +#endif if constexpr( std::is_same_v ) { memcpy( mes, m_hstMEs.data(), m_hstMEs.bytes() ); diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/GpuRuntime.h b/epochX/cudacpp/gq_ttq.mad/SubProcesses/GpuRuntime.h index 860c7fde16..6a4b946e74 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/GpuRuntime.h +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/GpuRuntime.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: J. Teig (Jun 2023, based on earlier work by S. Roiser) for the MG5aMC CUDACPP plugin. -// Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2025) for the MG5aMC CUDACPP plugin. #ifndef MG5AMC_GPURUNTIME_H #define MG5AMC_GPURUNTIME_H 1 @@ -50,7 +50,7 @@ namespace mg5amcGpu // Set up CUDA application // ** NB: strictly speaking this is not needed when using the CUDA runtime API ** // Calling cudaSetDevice on startup is useful to properly book-keep the time spent in CUDA initialization - static void setUp( const bool debug = true ) + static void setUp( const bool debug = false ) // ZW: changed debug default to false { // ** NB: it is useful to call cudaSetDevice, or cudaFree, to properly book-keep the time spent in CUDA initialization // ** NB: otherwise, the first CUDA operation (eg a cudaMemcpyToSymbol in CPPProcess ctor) appears to take much longer! @@ -71,7 +71,7 @@ namespace mg5amcGpu // ** NB: strictly speaking this is not needed when using the CUDA runtime API ** // Calling cudaDeviceReset on shutdown is only needed for checking memory leaks in cuda-memcheck // See https://docs.nvidia.com/cuda/cuda-memcheck/index.html#leak-checking - static void tearDown( const bool debug = true ) + static void tearDown( const bool debug = false ) // ZW: changed debug default to false { if( debug ) std::cout << "__GpuRuntime: calling GpuDeviceReset()" << std::endl; checkGpu( gpuDeviceReset() ); diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/MGVersion.txt b/epochX/cudacpp/gq_ttq.mad/SubProcesses/MGVersion.txt index 084e244cea..77a069e39b 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/MGVersion.txt +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/MGVersion.txt @@ -1 +1 @@ -3.6.0 \ No newline at end of file +3.6.2 \ No newline at end of file diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/MatrixElementKernels.cc b/epochX/cudacpp/gq_ttq.mad/SubProcesses/MatrixElementKernels.cc index f463977c1a..703ea3781c 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/MatrixElementKernels.cc +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/MatrixElementKernels.cc @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: A. Valassi (Jan 2022) for the MG5aMC CUDACPP plugin. -// Further modified by: J. Teig, A. Valassi (2022-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: J. Teig, A. Valassi, Z. Wettersten (2022-2025) for the MG5aMC CUDACPP plugin. #include "MatrixElementKernels.h" @@ -60,7 +60,9 @@ namespace mg5amcCpu #ifdef MGONGPU_CHANNELID_DEBUG MatrixElementKernelBase::dumpNevtProcessedByChannel(); #endif +#ifdef MGONGPUCPP_VERBOSE MatrixElementKernelBase::dumpSignallingFPEs(); +#endif } //-------------------------------------------------------------------------- diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/MatrixElementKernels.h b/epochX/cudacpp/gq_ttq.mad/SubProcesses/MatrixElementKernels.h index 7acff4b308..8da04d7945 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/MatrixElementKernels.h +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/MatrixElementKernels.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: A. Valassi (Jan 2022) for the MG5aMC CUDACPP plugin. -// Further modified by: J. Teig, A. Valassi (2022-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: J. Teig, A. Valassi, Z. Wettersten (2022-2025) for the MG5aMC CUDACPP plugin. #ifndef MATRIXELEMENTKERNELS_H #define MATRIXELEMENTKERNELS_H 1 @@ -134,7 +134,7 @@ namespace mg5amcCpu // Does this host system support the SIMD used in the matrix element calculation? // [NB: this is private, SIMD vectorization in mg5amc C++ code is currently only used in the ME calculations below MatrixElementKernelHost!] - static bool hostSupportsSIMD( const bool verbose = true ); + static bool hostSupportsSIMD( const bool verbose = false ); // ZW: default verbose false private: diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/MemoryAccessGs.h b/epochX/cudacpp/gq_ttq.mad/SubProcesses/MemoryAccessGs.h index 63c17a68fa..50a6aaef4d 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/MemoryAccessGs.h +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/MemoryAccessGs.h @@ -128,6 +128,14 @@ namespace mg5amcCpu #endif } + // Locate a field (output) in a memory buffer (input) from a kernel event-indexing mechanism (internal) + // [Signature (SCALAR OR VECTOR) ===> fptype_sv* kernelAccess( fptype* buffer ) <===] + static __host__ __device__ inline fptype_sv* + kernelAccessP( fptype* buffer ) + { + return reinterpret_cast( buffer ); + } + // Locate a field (output) in a memory buffer (input) from a kernel event-indexing mechanism (internal) and the given field indexes (input) // [Signature (const, SCALAR) ===> const fptype& kernelAccessConst( const fptype* buffer ) <===] static constexpr auto kernelAccessConst_s = diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/MemoryBuffers.h b/epochX/cudacpp/gq_ttq.mad/SubProcesses/MemoryBuffers.h index 65a101888d..17ba7a89e5 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/MemoryBuffers.h +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/MemoryBuffers.h @@ -13,6 +13,7 @@ #include "CPPProcess.h" #include "GpuRuntime.h" #include "Parameters_sm.h" +#include "processConfig.h" #include @@ -274,7 +275,8 @@ namespace mg5amcCpu typedef BufferBase BufferNumerators; // The size (number of elements) per event in a memory buffer for numerators - constexpr size_t sizePerEventNumerators = 1; + // (should be equal to the number of diagrams in the process) + constexpr size_t sizePerEventNumerators = processConfig::ndiagrams; #ifndef MGONGPUCPP_GPUIMPL // A class encapsulating a C++ host buffer for gs 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 99573ab87a..2e83974fdb 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 @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -25,6 +25,7 @@ #include "MemoryAccessMatrixElements.h" #include "MemoryAccessMomenta.h" #include "MemoryAccessWavefunctions.h" +#include "processConfig.h" #ifdef MGONGPU_SUPPORTS_MULTICHANNEL #include "MemoryAccessDenominators.h" @@ -99,6 +100,69 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { +#ifdef MGONGPU_SUPPORTS_MULTICHANNEL + __device__ INLINE unsigned int getChannelId( const unsigned int* allChannelIds +#ifndef MGONGPUCPP_GPUIMPL + , + const int ievt00, + bool sanityCheckMixedPrecision = true +#endif + ) + { + unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr +#ifdef MGONGPUCPP_GPUIMPL + using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page + if( allChannelIds != nullptr ) + { + const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) + const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) + // NB: channelIds_sv is a scalar in CUDA + channelId = channelIds_sv; + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + } +#else // Cuda or C++ + using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + if( allChannelIds != nullptr ) + { + // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) + const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 + uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) +#ifndef MGONGPU_CPPSIMD + // NB: channelIds_sv is a scalar in no-SIMD C++ + channelId = channelIds_sv; +#else + // NB: channelIds_sv is a vector in SIMD C++ + channelId = channelIds_sv[0]; // element[0] + for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] + { + assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId + } +#endif + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + if( sanityCheckMixedPrecision ) + { +#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT + // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) + const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 + uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + for( int i = 0; i < neppV; ++i ) + { + assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector + } +#endif + } + } +#endif // MGONGPUCPP_GPUIMPL + return channelId; + } +#endif // MGONGPU_SUPPORTS_MULTICHANNEL + constexpr int nw6 = CPPProcess::nw6; // dimensions of each wavefunction (HELAS KEK 91-11): e.g. 6 for e+ e- -> mu+ mu- (fermions and vectors) constexpr int npar = CPPProcess::npar; // #particles in total (external = initial + final): e.g. 4 for e+ e- -> mu+ mu- constexpr int ncomb = CPPProcess::ncomb; // #helicity combinations: e.g. 16 for e+ e- -> mu+ mu- (2**4 = fermion spin up/down ** npar) @@ -308,7 +372,7 @@ namespace mg5amcCpu COUPs[ndcoup + iicoup] = allCOUPs[ndcoup + iicoup]; // independent couplings, fixed for all events fptype* MEs = E_ACCESS::ieventAccessRecord( allMEs, ievt0 ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); #endif #endif @@ -318,7 +382,7 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Numerators and denominators for the current event (CUDA) or SIMD event page (C++) - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); #endif @@ -341,8 +405,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1 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] ); + if( channelId != 0 ) + { + numerators_sv[0] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= 1. / 2. * amp_sv[0]; jamp_sv[2] += 1. / 6. * amp_sv[0]; @@ -356,8 +423,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 2 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] ); + if( channelId != 0 ) + { + numerators_sv[1] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= 1. / 2. * amp_sv[0]; jamp_sv[1] += 1. / 6. * amp_sv[0]; @@ -370,8 +440,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 3 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] ); + if( channelId != 0 ) + { + numerators_sv[2] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += 1. / 6. * amp_sv[0]; jamp_sv[3] -= 1. / 2. * amp_sv[0]; @@ -384,8 +457,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 4 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] ); + if( channelId != 0 ) + { + numerators_sv[3] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] += 1. / 6. * amp_sv[0]; jamp_sv[3] -= 1. / 2. * amp_sv[0]; @@ -398,8 +474,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 5 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] ); + if( channelId != 0 ) + { + numerators_sv[4] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[3] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -610,7 +689,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- @@ -980,9 +1061,6 @@ namespace mg5amcCpu #ifdef MGONGPUCPP_GPUIMPL // Remember: in CUDA this is a kernel for one event, in c++ this processes n events const int ievt = blockDim.x * blockIdx.x + threadIdx.x; // index of event (thread) in grid -#ifdef MGONGPU_SUPPORTS_MULTICHANNEL - using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events -#endif #else //assert( (size_t)(allmomenta) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] //assert( (size_t)(allMEs) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] @@ -990,7 +1068,6 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL using NUM_ACCESS = HostAccessNumerators; // non-trivial access: buffer includes all events using DEN_ACCESS = HostAccessDenominators; // non-trivial access: buffer includes all events - using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events #endif #endif @@ -1015,11 +1092,12 @@ namespace mg5amcCpu fptype_sv& MEs_sv = E_ACCESS::kernelAccess( MEs ); MEs_sv = fptype_sv{ 0 }; #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - numerators_sv = fptype_sv{ 0 }; + for( int i = 0; i < processConfig::ndiagrams; ++i ) + numerators_sv[i] = fptype_sv{ 0 }; denominators_sv = fptype_sv{ 0 }; #endif } @@ -1032,17 +1110,7 @@ namespace mg5amcCpu // *** START OF PART 1a - CUDA (one event per GPU thread) *** #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) - const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) - // NB: channelIds_sv is a scalar in CUDA - channelId = channelIds_sv; - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) - } + unsigned int channelId = getChannelId( allChannelIds ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (for the single event processed in calculate_wavefunctions) @@ -1157,38 +1225,7 @@ namespace mg5amcCpu const int ievt00 = ipagV2 * neppV; // loop on one SIMD page (neppV events) at a time #endif #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) - const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 - uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) -#ifndef MGONGPU_CPPSIMD - // NB: channelIds_sv is a scalar in no-SIMD C++ - channelId = channelIds_sv; -#else - // NB: channelIds_sv is a vector in SIMD C++ - channelId = channelIds_sv[0]; // element[0] - for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] - { - assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId - } -#endif - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) -#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT - // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) - const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 - uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - for( int i = 0; i < neppV; ++i ) - { - assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector - } -#endif - } + unsigned int channelId = getChannelId( allChannelIds, ievt00 ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (jamp2[nParity][ncolor][neppV] for the SIMD vector - or the two SIMD vectors - of events processed in calculate_wavefunctions) @@ -1361,11 +1398,12 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( allChannelIds != nullptr ) // fix segfault #892 (not 'channelIds[0] != 0') { - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + const unsigned int channelId = getChannelId( allChannelIds, ievt0, false ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - MEs_sv *= numerators_sv / denominators_sv; + MEs_sv *= numerators_sv[channelId - 1] / denominators_sv; } #endif //for( int ieppV = 0; ieppV < neppV; ieppV++ ) diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu/CPPProcess.h b/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu/CPPProcess.h index b501a9772e..0db2d57c1d 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu/CPPProcess.h +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu/auto_dsig.f b/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu/auto_dsig.f index b0cc58e89c..04ee9916ca 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu/auto_dsig.f +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C 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 2b281a8200..2afe71ca6b 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 @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -140,14 +140,14 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDDO QSCALE=QSCALE/2D0 ELSE - QSCALE=DSQRT(Q2FACT(IB(1))) + QSCALE=DSQRT(Q2FACT(1)) ENDIF G1=PDG2PDF(LPP(IB(1)),0, IB(1),XBK(IB(1)), QSCALE) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) IF (DSQRT(Q2FACT(IB(2))).NE.0D0) THEN - QSCALE=DSQRT(Q2FACT(IB(2))) + QSCALE=DSQRT(Q2FACT(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) @@ -234,7 +234,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -309,6 +309,10 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, INTEGER I_EE C +C STUFF FOR UPC +C + DOUBLE PRECISION PHOTONPDFSQUARE +C C EXTERNAL FUNCTIONS C LOGICAL PASSCUTS @@ -393,18 +397,18 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, IF (ABS(LPP(IB(1))).GE.1) THEN C LP=SIGN(1,LPP(IB(1))) G1(IVEC)=PDG2PDF(LPP(IB(1)),0, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) D2(IVEC)=PDG2PDF(LPP(IB(2)),1, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) U2(IVEC)=PDG2PDF(LPP(IB(2)),2, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) S2(IVEC)=PDG2PDF(LPP(IB(2)),3, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) C2(IVEC)=PDG2PDF(LPP(IB(2)),4, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) ENDIF ENDDO ! IWARP LOOP ENDDO ! CURRWARP LOOP diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu/card.png b/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu/card.png new file mode 100644 index 0000000000..8aa575c1da Binary files /dev/null and b/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu/card.png differ diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu/matrix1.f b/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu/matrix1.f index 1efce64e40..2bd0e076bf 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu/matrix1.f +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu/matrix1.f @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -341,7 +341,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -387,7 +387,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C INTEGER I,J,M,N COMPLEX*16 ZTEMP, TMP_JAMP(0) - REAL*8 CF(NCOLOR,NCOLOR) + INTEGER CF(NCOLOR*(NCOLOR+1)/2) + INTEGER DENOM, CF_INDEX COMPLEX*16 AMP(NGRAPHS), JAMP(NCOLOR,NAMPSO) COMPLEX*16 W(6,NWAVEFUNCS) C Needed for v4 models @@ -430,21 +431,14 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C C COLOR DATA C - DATA (CF(I, 1),I= 1, 4) /1.200000000000000D+01 - $ ,4.000000000000000D+00,4.000000000000000D+00,0.000000000000000D - $ +00/ + DATA DENOM/1/ + DATA (CF(I),I= 1, 4) /12,8,8,0/ C 1 T(1,3,2) T(5,4) - DATA (CF(I, 2),I= 1, 4) /4.000000000000000D+00 - $ ,1.200000000000000D+01,0.000000000000000D+00,4.000000000000000D - $ +00/ + DATA (CF(I),I= 5, 7) /12,0,8/ C 1 T(1,3,4) T(5,2) - DATA (CF(I, 3),I= 1, 4) /4.000000000000000D+00 - $ ,0.000000000000000D+00,1.200000000000000D+01,4.000000000000000D - $ +00/ + DATA (CF(I),I= 8, 9) /12,8/ C 1 T(1,5,2) T(3,4) - DATA (CF(I, 4),I= 1, 4) /0.000000000000000D+00 - $ ,4.000000000000000D+00,4.000000000000000D+00,1.200000000000000D - $ +01/ + DATA (CF(I),I= 10, 10) /12/ C 1 T(1,5,4) T(3,2) C ---------- C BEGIN CODE @@ -507,10 +501,12 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) MATRIX1 = 0.D0 DO M = 1, NAMPSO + CF_INDEX = 0 DO I = 1, NCOLOR ZTEMP = (0.D0,0.D0) - DO J = 1, NCOLOR - ZTEMP = ZTEMP + CF(J,I)*JAMP(J,M) + DO J = I, NCOLOR + CF_INDEX = CF_INDEX + 1 + ZTEMP = ZTEMP + CF(CF_INDEX)*JAMP(J,M) ENDDO DO N = 1, NAMPSO @@ -519,6 +515,7 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) ENDDO ENDDO ENDDO + MATRIX1 = MATRIX1/DENOM IF(SDE_STRAT.EQ.1)THEN AMP2(1)=AMP2(1)+AMP(1)*DCONJG(AMP(1)) diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu/matrix11.png b/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu/matrix11.png new file mode 100644 index 0000000000..46b5244f60 Binary files /dev/null and b/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu/matrix11.png differ diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu/processConfig.h b/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu/processConfig.h new file mode 100644 index 0000000000..fe66e4e760 --- /dev/null +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu/processConfig.h @@ -0,0 +1,16 @@ +// Copyright (C) 2025 CERN and UCLouvain. +// Licensed under the GNU Lesser General Public License (version 3 or later). +// Created by: S. Roiser (May 2025) for the MG5aMC CUDACPP plugin. +// Further modified by: ... for the MG5aMC CUDACPP plugin. + + +#ifndef MG5_CONFIG_SIGMA_SM_GU_TTXU_H +#define MG5_CONFIG_SIGMA_SM_GU_TTXU_H 1 + +namespace processConfig { + + constexpr int ndiagrams = 5; + +} + +#endif // MG5_CONFIG_SIGMA_SM_GU_TTXU_H \ No newline at end of file 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 6dc0abd17c..84f20844d3 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 @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -25,6 +25,7 @@ #include "MemoryAccessMatrixElements.h" #include "MemoryAccessMomenta.h" #include "MemoryAccessWavefunctions.h" +#include "processConfig.h" #ifdef MGONGPU_SUPPORTS_MULTICHANNEL #include "MemoryAccessDenominators.h" @@ -99,6 +100,69 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { +#ifdef MGONGPU_SUPPORTS_MULTICHANNEL + __device__ INLINE unsigned int getChannelId( const unsigned int* allChannelIds +#ifndef MGONGPUCPP_GPUIMPL + , + const int ievt00, + bool sanityCheckMixedPrecision = true +#endif + ) + { + unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr +#ifdef MGONGPUCPP_GPUIMPL + using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page + if( allChannelIds != nullptr ) + { + const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) + const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) + // NB: channelIds_sv is a scalar in CUDA + channelId = channelIds_sv; + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + } +#else // Cuda or C++ + using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + if( allChannelIds != nullptr ) + { + // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) + const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 + uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) +#ifndef MGONGPU_CPPSIMD + // NB: channelIds_sv is a scalar in no-SIMD C++ + channelId = channelIds_sv; +#else + // NB: channelIds_sv is a vector in SIMD C++ + channelId = channelIds_sv[0]; // element[0] + for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] + { + assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId + } +#endif + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + if( sanityCheckMixedPrecision ) + { +#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT + // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) + const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 + uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + for( int i = 0; i < neppV; ++i ) + { + assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector + } +#endif + } + } +#endif // MGONGPUCPP_GPUIMPL + return channelId; + } +#endif // MGONGPU_SUPPORTS_MULTICHANNEL + constexpr int nw6 = CPPProcess::nw6; // dimensions of each wavefunction (HELAS KEK 91-11): e.g. 6 for e+ e- -> mu+ mu- (fermions and vectors) constexpr int npar = CPPProcess::npar; // #particles in total (external = initial + final): e.g. 4 for e+ e- -> mu+ mu- constexpr int ncomb = CPPProcess::ncomb; // #helicity combinations: e.g. 16 for e+ e- -> mu+ mu- (2**4 = fermion spin up/down ** npar) @@ -308,7 +372,7 @@ namespace mg5amcCpu COUPs[ndcoup + iicoup] = allCOUPs[ndcoup + iicoup]; // independent couplings, fixed for all events fptype* MEs = E_ACCESS::ieventAccessRecord( allMEs, ievt0 ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); #endif #endif @@ -318,7 +382,7 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Numerators and denominators for the current event (CUDA) or SIMD event page (C++) - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); #endif @@ -341,8 +405,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1 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] ); + if( channelId != 0 ) + { + numerators_sv[0] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] -= 1. / 6. * amp_sv[0]; jamp_sv[3] += 1. / 2. * amp_sv[0]; @@ -356,8 +423,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 2 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] ); + if( channelId != 0 ) + { + numerators_sv[1] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] -= 1. / 6. * amp_sv[0]; jamp_sv[3] += 1. / 2. * amp_sv[0]; @@ -370,8 +440,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 3 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] ); + if( channelId != 0 ) + { + numerators_sv[2] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 2. * amp_sv[0]; jamp_sv[2] -= 1. / 6. * amp_sv[0]; @@ -384,8 +457,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 4 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] ); + if( channelId != 0 ) + { + numerators_sv[3] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 2. * amp_sv[0]; jamp_sv[1] -= 1. / 6. * amp_sv[0]; @@ -398,8 +474,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 5 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] ); + if( channelId != 0 ) + { + numerators_sv[4] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[3] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -610,7 +689,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- @@ -980,9 +1061,6 @@ namespace mg5amcCpu #ifdef MGONGPUCPP_GPUIMPL // Remember: in CUDA this is a kernel for one event, in c++ this processes n events const int ievt = blockDim.x * blockIdx.x + threadIdx.x; // index of event (thread) in grid -#ifdef MGONGPU_SUPPORTS_MULTICHANNEL - using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events -#endif #else //assert( (size_t)(allmomenta) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] //assert( (size_t)(allMEs) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] @@ -990,7 +1068,6 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL using NUM_ACCESS = HostAccessNumerators; // non-trivial access: buffer includes all events using DEN_ACCESS = HostAccessDenominators; // non-trivial access: buffer includes all events - using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events #endif #endif @@ -1015,11 +1092,12 @@ namespace mg5amcCpu fptype_sv& MEs_sv = E_ACCESS::kernelAccess( MEs ); MEs_sv = fptype_sv{ 0 }; #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - numerators_sv = fptype_sv{ 0 }; + for( int i = 0; i < processConfig::ndiagrams; ++i ) + numerators_sv[i] = fptype_sv{ 0 }; denominators_sv = fptype_sv{ 0 }; #endif } @@ -1032,17 +1110,7 @@ namespace mg5amcCpu // *** START OF PART 1a - CUDA (one event per GPU thread) *** #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) - const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) - // NB: channelIds_sv is a scalar in CUDA - channelId = channelIds_sv; - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) - } + unsigned int channelId = getChannelId( allChannelIds ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (for the single event processed in calculate_wavefunctions) @@ -1157,38 +1225,7 @@ namespace mg5amcCpu const int ievt00 = ipagV2 * neppV; // loop on one SIMD page (neppV events) at a time #endif #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) - const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 - uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) -#ifndef MGONGPU_CPPSIMD - // NB: channelIds_sv is a scalar in no-SIMD C++ - channelId = channelIds_sv; -#else - // NB: channelIds_sv is a vector in SIMD C++ - channelId = channelIds_sv[0]; // element[0] - for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] - { - assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId - } -#endif - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) -#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT - // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) - const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 - uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - for( int i = 0; i < neppV; ++i ) - { - assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector - } -#endif - } + unsigned int channelId = getChannelId( allChannelIds, ievt00 ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (jamp2[nParity][ncolor][neppV] for the SIMD vector - or the two SIMD vectors - of events processed in calculate_wavefunctions) @@ -1361,11 +1398,12 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( allChannelIds != nullptr ) // fix segfault #892 (not 'channelIds[0] != 0') { - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + const unsigned int channelId = getChannelId( allChannelIds, ievt0, false ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - MEs_sv *= numerators_sv / denominators_sv; + MEs_sv *= numerators_sv[channelId - 1] / denominators_sv; } #endif //for( int ieppV = 0; ieppV < neppV; ieppV++ ) diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux/CPPProcess.h b/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux/CPPProcess.h index d658e0394e..d18eb18110 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux/CPPProcess.h +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux/auto_dsig.f b/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux/auto_dsig.f index e36675626f..7c2b7d44c2 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux/auto_dsig.f +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C 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 61bb13c3e7..b869d6cc8f 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 @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -140,14 +140,14 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDDO QSCALE=QSCALE/2D0 ELSE - QSCALE=DSQRT(Q2FACT(IB(1))) + QSCALE=DSQRT(Q2FACT(1)) ENDIF G1=PDG2PDF(LPP(IB(1)),0, IB(1),XBK(IB(1)), QSCALE) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) IF (DSQRT(Q2FACT(IB(2))).NE.0D0) THEN - QSCALE=DSQRT(Q2FACT(IB(2))) + QSCALE=DSQRT(Q2FACT(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) @@ -234,7 +234,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -309,6 +309,10 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, INTEGER I_EE C +C STUFF FOR UPC +C + DOUBLE PRECISION PHOTONPDFSQUARE +C C EXTERNAL FUNCTIONS C LOGICAL PASSCUTS @@ -393,18 +397,18 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, IF (ABS(LPP(IB(1))).GE.1) THEN C LP=SIGN(1,LPP(IB(1))) G1(IVEC)=PDG2PDF(LPP(IB(1)),0, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) CX2(IVEC)=PDG2PDF(LPP(IB(2)),-4, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) SX2(IVEC)=PDG2PDF(LPP(IB(2)),-3, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) UX2(IVEC)=PDG2PDF(LPP(IB(2)),-2, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) DX2(IVEC)=PDG2PDF(LPP(IB(2)),-1, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) ENDIF ENDDO ! IWARP LOOP ENDDO ! CURRWARP LOOP diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux/matrix1.f b/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux/matrix1.f index c8fbbe9e22..895210eff5 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux/matrix1.f +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux/matrix1.f @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -341,7 +341,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -387,7 +387,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C INTEGER I,J,M,N COMPLEX*16 ZTEMP, TMP_JAMP(0) - REAL*8 CF(NCOLOR,NCOLOR) + INTEGER CF(NCOLOR*(NCOLOR+1)/2) + INTEGER DENOM, CF_INDEX COMPLEX*16 AMP(NGRAPHS), JAMP(NCOLOR,NAMPSO) COMPLEX*16 W(6,NWAVEFUNCS) C Needed for v4 models @@ -430,21 +431,14 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C C COLOR DATA C - DATA (CF(I, 1),I= 1, 4) /1.200000000000000D+01 - $ ,4.000000000000000D+00,4.000000000000000D+00,0.000000000000000D - $ +00/ + DATA DENOM/1/ + DATA (CF(I),I= 1, 4) /12,8,8,0/ C 1 T(1,2,4) T(3,5) - DATA (CF(I, 2),I= 1, 4) /4.000000000000000D+00 - $ ,1.200000000000000D+01,0.000000000000000D+00,4.000000000000000D - $ +00/ + DATA (CF(I),I= 5, 7) /12,0,8/ C 1 T(1,2,5) T(3,4) - DATA (CF(I, 3),I= 1, 4) /4.000000000000000D+00 - $ ,0.000000000000000D+00,1.200000000000000D+01,4.000000000000000D - $ +00/ + DATA (CF(I),I= 8, 9) /12,8/ C 1 T(1,3,4) T(2,5) - DATA (CF(I, 4),I= 1, 4) /0.000000000000000D+00 - $ ,4.000000000000000D+00,4.000000000000000D+00,1.200000000000000D - $ +01/ + DATA (CF(I),I= 10, 10) /12/ C 1 T(1,3,5) T(2,4) C ---------- C BEGIN CODE @@ -507,10 +501,12 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) MATRIX1 = 0.D0 DO M = 1, NAMPSO + CF_INDEX = 0 DO I = 1, NCOLOR ZTEMP = (0.D0,0.D0) - DO J = 1, NCOLOR - ZTEMP = ZTEMP + CF(J,I)*JAMP(J,M) + DO J = I, NCOLOR + CF_INDEX = CF_INDEX + 1 + ZTEMP = ZTEMP + CF(CF_INDEX)*JAMP(J,M) ENDDO DO N = 1, NAMPSO @@ -519,6 +515,7 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) ENDDO ENDDO ENDDO + MATRIX1 = MATRIX1/DENOM IF(SDE_STRAT.EQ.1)THEN AMP2(1)=AMP2(1)+AMP(1)*DCONJG(AMP(1)) diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux/matrix11.png b/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux/matrix11.png new file mode 100644 index 0000000000..20f88674c1 Binary files /dev/null and b/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux/matrix11.png differ diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux/processConfig.h b/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux/processConfig.h new file mode 100644 index 0000000000..89823b9d1d --- /dev/null +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux/processConfig.h @@ -0,0 +1,16 @@ +// Copyright (C) 2025 CERN and UCLouvain. +// Licensed under the GNU Lesser General Public License (version 3 or later). +// Created by: S. Roiser (May 2025) for the MG5aMC CUDACPP plugin. +// Further modified by: ... for the MG5aMC CUDACPP plugin. + + +#ifndef MG5_CONFIG_SIGMA_SM_GUX_TTXUX_H +#define MG5_CONFIG_SIGMA_SM_GUX_TTXUX_H 1 + +namespace processConfig { + + constexpr int ndiagrams = 5; + +} + +#endif // MG5_CONFIG_SIGMA_SM_GUX_TTXUX_H \ No newline at end of file diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/cuts.f b/epochX/cudacpp/gq_ttq.mad/SubProcesses/cuts.f index 7898714201..bd50ab1357 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/cuts.f +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/cuts.f @@ -307,12 +307,18 @@ LOGICAL FUNCTION PASSCUTS(P, VECSIZE_USED) c c Limit S_hat c - if (dsqrt_shat.ne.0d0)then - if (nincoming.eq.2.and.sumdot(p(0,1),p(0,2),1d0) .lt. dsqrt_shat**2) then - passcuts=.false. - return - endif - endif + if(nincoming.eq.2) then + if (dsqrt_shat.ne.0d0.or.dsqrt_shatmax.ne.-1d0)then + xvar = sumdot(p(0,1),p(0,2),1d0) + if (xvar .lt. dsqrt_shat**2)then + passcuts=.false. + return + else if (dsqrt_shatmax.ne.-1d0 .and. xvar .gt. dsqrt_shatmax**2)then + passcuts = .false. + return + endif + endif + endif C $B$ DESACTIVATE_CUT $E$ !This is a tag for MadWeight if(debug) write (*,*) '=============================' diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/genps.f b/epochX/cudacpp/gq_ttq.mad/SubProcesses/genps.f index 1c32e93f5d..8503bdbec8 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/genps.f +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/genps.f @@ -1373,6 +1373,10 @@ subroutine gen_s(x,smin,smax,spole,swidth,s,jac,pass) double precision smin,smax,spole,swidth,s,jac double precision x logical pass + include 'maxparticles.inc' + include '../../Source/vector.inc' + include 'run.inc' + include 'cuts.inc' c c Local c @@ -1384,6 +1388,10 @@ subroutine gen_s(x,smin,smax,spole,swidth,s,jac,pass) c----- c Begin Code c----- + if (dsqrt_shatmax.ne.-1d0)then + smax = min(smax, dsqrt_shatmax**2) + endif + pass=.true. if (jac .eq. 0 .and. .not. warned0) then print*,'Input jacobian 0 in genps' @@ -1628,7 +1636,10 @@ SUBROUTINE GENCMS(S,X1,X2,X,SMIN,SJACOBI) DOUBLE PRECISION ETA,ETAMIN,ETAMAX logical warned data warned/.false./ - + include 'maxparticles.inc' + include '../../Source/vector.inc' + include 'run.inc' + include 'cuts.inc' C------------ C BEGIN CODE C------------ @@ -1645,7 +1656,11 @@ SUBROUTINE GENCMS(S,X1,X2,X,SMIN,SJACOBI) C IF THERE IS NO S CHANNEL POLE USE BELOW: TAUMIN = 0d0 !SMIN/S !keep scale fix - TAUMAX = 1D0 + if (dsqrt_shatmax.ne.-1d0)then + TAUMAX=dsqrt_shatmax**2/S + else + TAUMAX = 1D0 + endif TAU = (TAUMAX-TAUMIN)*X(1)+TAUMIN SJACOBI= sjacobi*(TAUMAX-TAUMIN) @@ -1915,7 +1930,7 @@ double precision function get_channel_cut(p, config) if(sde_strat.eq.2)then t = dot(ptemp(0,-i), ptemp(0,-i)) Mass = prmass(-i, config) - get_channel_cut = get_channel_cut / ((t-Mass)*(t+Mass)+stot*1d-10)**2 + get_channel_cut = get_channel_cut / (t-Mass**2+stot*1d-10)**2 endif c write(*,*) i, "t, Mass, fact", t, Mass, ((t-Mass)*(t+Mass))**2,get_channel_cut t = t/stot @@ -1930,9 +1945,9 @@ double precision function get_channel_cut(p, config) t = dot(ptemp(0,-i), ptemp(0,-i)) Mass = prmass(-i, config) Width = prwidth(-i, config) - tmp = (t-Mass)*(t+Mass) + tmp = (t-Mass**2) tmp2 = Mass*Width - get_channel_cut = get_channel_cut* (tmp**2 - tmp2**2)/(tmp**2 + tmp2**2)**2 + get_channel_cut = get_channel_cut/(tmp**2 + tmp2**2) endif c write(*,*) i, "s, Mass, Width, fact", t, Mass, Width, (((t-Mass)*(t+Mass) )**2 + Width**2*Mass**2), get_channel_cut endif diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/myamp.f b/epochX/cudacpp/gq_ttq.mad/SubProcesses/myamp.f index 9e5f8d44dd..5360566ef4 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/myamp.f +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/myamp.f @@ -231,6 +231,7 @@ subroutine set_peaks double precision x1,x2,xk(nexternal) double precision dr,mtot,etot,xqfact double precision spmass + double precision stot ! technically the min with dsqrt_shatmax**2 with the physical one integer i, iconfig, l1, l2, j, nt, nbw, iproc, k integer iden_part(-nexternal+1:nexternal) @@ -285,8 +286,8 @@ subroutine set_peaks integer lbw(0:nexternal) !Use of B.W. common /to_BW/ lbw - double precision stot,m1,m2 - common/to_stot/stot,m1,m2 + double precision real_stot,m1,m2 + common/to_stot/real_stot,m1,m2 include 'coupl.inc' ! needs VECSIZE_MEMMAX (defined in vector.inc) include 'cuts.inc' @@ -309,6 +310,12 @@ subroutine set_peaks c----- c Begin Code c----- + if (dsqrt_shatmax.ne.-1)then + stot = min(real_stot, dsqrt_shatmax**2) + else + stot = real_stot + endif + iconfig = this_config c needs to be initialise to avoid segfault do i = -nexternal,-1 diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/Gridpack/gridrun b/epochX/cudacpp/gq_ttq.mad/bin/internal/Gridpack/gridrun index 8c8f7d3940..01d4ab53f5 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/Gridpack/gridrun +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/Gridpack/gridrun @@ -91,7 +91,7 @@ import internal.madevent_interface as cmd_interface try: - cmd_line = cmd_interface.GridPackCmd(me_dir=root_path, nb_event=args[0], seed=args[1], gran=args[2]) + cmd_line = cmd_interface.GridPackCmd(me_dir=root_path, nb_event=args[0], seed=args[1], gran=args[2], nprocs=args[3], maxevts=args[4]) except KeyboardInterrupt: print('Quit on KeyboardInterrupt') diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/Gridpack/run.sh b/epochX/cudacpp/gq_ttq.mad/bin/internal/Gridpack/run.sh index 20adf572c2..2d149f96be 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/Gridpack/run.sh +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/Gridpack/run.sh @@ -14,6 +14,18 @@ # USAGE : run [num_events] [iseed] ## ############################################################################# +function usage() { + local retcode="${1:-1}" # default return code is 1 + echo "Usage:" + echo " run.sh [options] [num events] [seed]" + echo " run.sh [options] [num events] [seed] [granularity]" + echo "Options:" + echo " -h, --help print this message and exit" + echo " -p, --parallel [num procs] number of processes to run in parallel" + echo " -m, --maxevts [num events] maximum number of unweighted events per job" + exit $retcode +} + if [[ -d ./madevent ]]; then DIR='./madevent' else @@ -32,23 +44,46 @@ export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${PWD}/madevent/lib:${PWD}/HELAS/lib # For Mac OS X export DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:${PWD}/madevent/lib:${PWD}/HELAS/lib +pos_args=() +nprocs=1 +maxevts=2500 -if [[ ($1 != "") && ("$2" != "") && ("$3" == "") ]]; then - num_events=$1 - seed=$2 - gran=1 -elif [[ ($1 != "") && ("$2" != "") && ("$3" != "") ]]; then - num_events=$1 - seed=$2 - gran=$3 -else - echo "Warning: input is not correct. script requires two arguments: NB_EVENT SEED" -fi +while [[ $# -gt 0 ]]; do + case $1 in + -h|--help) + usage 0 ;; + -p|--parallel) + nprocs="$2" && shift && shift ;; + -m|--maxevts) + maxevts="$2" && shift && shift ;; + -*) + echo "Error: Unknown option $1" && usage ;; + *) + pos_args+=("$1") && shift ;; + esac +done + +case `echo "${pos_args[@]}" | wc -w | tr -d " "` in + "2") + num_events=${pos_args[0]} + seed=${pos_args[1]} + gran=1 + ;; + "3") + num_events=${pos_args[0]} + seed=${pos_args[1]} + gran=${pos_args[2]} + ;; + *) + echo "Error: number of arguments is not correct" + usage + ;; +esac -echo "Now generating $num_events events with random seed $seed and granularity $gran" +echo "Now generating $num_events events with random seed $seed and granularity $gran using $nprocs processes" ############ RUN THE PYTHON CODE ##################### -${DIR}/bin/gridrun $num_events $seed $gran +${DIR}/bin/gridrun $num_events $seed $gran $nprocs $maxevts ######################################################## ########### POSTPROCESSING ##################### diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/banner.py b/epochX/cudacpp/gq_ttq.mad/bin/internal/banner.py index 42d82818d0..022861fc31 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/banner.py +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/banner.py @@ -353,7 +353,7 @@ def modify_init_cross(self, cross, allow_zero=False): assert "init" in self cross = dict(cross) - for key in cross.keys(): + for key in list(cross.keys()): if isinstance(key, str) and key.isdigit() and int(key) not in cross: cross[int(key)] = cross[key] @@ -3318,7 +3318,6 @@ def retro_compatible_custom_fct(lines, mode=None): for i,line in enumerate(lines[:]): if search and re.search(include_pat, line): name = re.findall(include_pat, line)[0] - misc.sprint('DETECTED INCLUDE', name) if 'vector.inc' in name: search = False if 'run.inc' in name: @@ -3326,7 +3325,6 @@ def retro_compatible_custom_fct(lines, mode=None): search = False sol.append(line) if re.search(function_pat, line): - misc.sprint("DETECTED FCT") search = True return sol @@ -4201,6 +4199,7 @@ def default_setup(self): self.add_param("bwcutoff", 15.0) self.add_param("cut_decays", False, cut='d') self.add_param('dsqrt_shat',0., cut=True) + self.add_param('dsqrt_shatmax', -1, cut=True) self.add_param("nhel", 0, include=False) self.add_param("limhel", 1e-8, hidden=True, comment="threshold to determine if an helicity contributes when not MC over helicity.") #pt cut @@ -5577,6 +5576,9 @@ def default_setup(self): #technical self.add_param('folding', [1,1,1], include=False) + + #bias + self.add_param('flavour_bias',[5,1], hidden=True, comment="Example: '5,100' means that the probability to generate an event with a bottom (or anti-bottom) quark is increased by a factor 100, but the weight of those events is reduced by a factor 100. Requires that the 'event_norm' is set to 'bias'.") #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]") @@ -5790,6 +5792,17 @@ def check_validity(self): if self['mcatnlo_delta'] and not self['parton_shower'].lower() == 'pythia8': raise InvalidRunCard("MC@NLO-DELTA only possible with matching to Pythia8") + # check that the flavour_bias is consistent + if len(self['flavour_bias']) != 2: + raise InvalidRunCard("'flavour_bias' should contain exactly two numbers: the abs(PDG) of the flavour to enhance, and the enhancement multiplication factor.") + for i in self['flavour_bias']: + if i < 0: + raise InvalidRunCard("flavour and multiplication factor should be positive in the flavour_bias parameter") + if self['flavour_bias'][1] != 1 and self['event_norm'] != 'bias': + logger.warning('Non-trivial flavour enhancement factor: setting event normalisation to "bias"') + self['event_norm']='bias' + + # check that ebeam is bigger than the proton mass. for i in [1,2]: # do not for proton mass if not proton PDF (or when scan initialization) 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 bc785b5de6..a34705f6bc 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 @@ -1092,11 +1092,11 @@ def write_summary(self, path, order=None, lastline=False, nbcol=20): to_print = self.cross[-1:] for info in to_print: name = info['run_name'] - bench = info['bench'] + bench = [float(x) for x in info['bench']] data = [] for k in keys: if k in info: - data.append(info[k]) + data.append(float(info[k])) else: data.append(0.) ff.write(formatting % tuple([name] + bench + data)) 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 9ff7390cf5..541cd6294b 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 @@ -750,8 +750,8 @@ def __init__(self, me_dir, options, *args, **opts): else: self.ninitial = self.proc_characteristics['ninitial'] - def make_make_all_html_results(self, folder_names = [], jobs=[]): - return sum_html.make_all_html_results(self, folder_names, jobs) + def make_make_all_html_results(self, folder_names = [], jobs=[], get_attr=None): + return sum_html.make_all_html_results(self, folder_names, jobs, get_attr) def write_RunWeb(self, me_dir): @@ -3831,7 +3831,7 @@ def store_scan_result(self): """return the information that need to be kept for the scan summary. Auto-width are automatically added.""" - return {'cross': self.results.current['cross']} + return {'cross': self.results.current['cross'], 'error': self.results.current['error']} def add_error_log_in_html(self, errortype=None): @@ -5135,10 +5135,10 @@ def init_run(self, cards): self.special_shortcut.update( {'ebeam':([float],['run_card ebeam1 %(0)s', 'run_card ebeam2 %(0)s']), 'lpp': ([int],['run_card lpp1 %(0)s', 'run_card lpp2 %(0)s' ]), - 'lhc': ([int],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), + 'lhc': ([float],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), 'lep': ([int],['run_card lpp1 0', 'run_card lpp2 0', 'run_card ebeam1 %(0)s/2', 'run_card ebeam2 %(0)s/2']), 'ilc': ([int],['run_card lpp1 0', 'run_card lpp2 0', 'run_card ebeam1 %(0)s/2', 'run_card ebeam2 %(0)s/2']), - 'lcc': ([int],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), + 'lcc': ([float],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), 'fixed_scale': ([float],['run_card fixed_fac_scale T', 'run_card fixed_ren_scale T', 'run_card scale %(0)s', 'run_card dsqrt_q2fact1 %(0)s' ,'run_card dsqrt_q2fact2 %(0)s']), 'no_parton_cut':([],['run_card nocut T']), 'cm_velocity':([float], [lambda self :self.set_CM_velocity]), @@ -6740,7 +6740,15 @@ def postcmd(self, stop, line): return ending_question - + def help_update(self): + logger.info(""" syntax: update dependent: Change the mass/width of particles which are not free parameter for the model. + update missing: add to the current param_card missing blocks/parameters. + update to_slha1: pass SLHA2 card to SLHA1 convention. (beta) + update to_slha2: pass SLHA1 card to SLHA2 convention. (beta) + update to_full [run_card] + update XXX [where XXX correspond to a hidden block of the run_card]: + supported block are %s + """, ', '.join(self.update_block)) def do_update(self, line, timer=0): @@ -6756,6 +6764,8 @@ def do_update(self, line, timer=0): logger.warning('miss an argument (dependent or missing). Please retry') return + args[0] = args[0].lower() + if args[0] == 'dependent': if not self.mother_interface: logger.warning('Failed to update dependent parameter. This might create trouble for external program (like MadSpin/shower/...)') @@ -6805,10 +6815,11 @@ def do_update(self, line, timer=0): self.modified_card.add('run') # delay writting of the run_card logger.info('add optional block %s to the run_card', args[0]) else: - self.help_update() + self.do_help('update') logger.warning('unvalid options for update command. Please retry') + def update_to_full(self, line): """ trigger via update to_full LINE""" 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 789976beee..c321fd88e5 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/extended_cmd.py +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/extended_cmd.py @@ -1317,6 +1317,8 @@ def nice_error_handling(self, error, line): debug_file = open(self.debug_output, 'a') traceback.print_exc(file=debug_file) + if __debug__: + traceback.print_exc() if hasattr(error, 'filename'): debug_file.write("Related File: %s\n" % error.filename) # Create a nice error output @@ -1928,7 +1930,8 @@ def do_display(self, line, output=sys.stdout): for i, name in enumerate(split): try: __import__('.'.join(split[:i+1])) - exec('%s=sys.modules[\'%s\']' % (split[i], '.'.join(split[:i+1]))) + tmp = {} + exec('%s=sys.modules[\'%s\']' % (split[i], '.'.join(split[:i+1])), globals(),tmp) except ImportError: try: var = eval(args[1]) @@ -1939,7 +1942,7 @@ def do_display(self, line, output=sys.stdout): outstr += 'EXTERNAL:\n' outstr += misc.nice_representation(var, nb_space=4) else: - var = eval(args[1]) + var = eval(args[1], globals(), tmp) outstr += 'EXTERNAL:\n' outstr += misc.nice_representation(var, nb_space=4) diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/file_writers.py b/epochX/cudacpp/gq_ttq.mad/bin/internal/file_writers.py index 526756129f..74ba0d195c 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/file_writers.py +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/file_writers.py @@ -140,10 +140,6 @@ def preprocess_template(self, input_lines, context={}): else: raise self.FileWriterError("%s not string" % repr(input_lines)) - # Setup the contextual environment - for contextual_variable, value in context.items(): - exec('%s=%s'%(str(contextual_variable),repr(value))) - res = [] # The variable below tracks the conditional statements structure if_stack = [] @@ -166,7 +162,7 @@ def preprocess_template(self, input_lines, context={}): # Treat an if statement elif preproc_command.group('command')=='if': try: - if_stack.append(eval(preproc_command.group('body'))==True) + if_stack.append(eval(preproc_command.group('body'), globals(), context)==True) except Exception as e: raise self.FilePreProcessingError('Could not evaluate'+\ "python expression '%s' given the context %s provided."%\ diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/files.py b/epochX/cudacpp/gq_ttq.mad/bin/internal/files.py index 551b71ddb6..3061b007e7 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/files.py +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/files.py @@ -147,9 +147,14 @@ def cp(path1, path2, log=True, error=False): path2 = format_path(path2) try: shutil.copy(path1, path2) + except shutil.Error as why: + logger.debug('no cp since identical: %s', why) + return except IOError as why: import madgraph.various.misc as misc try: + if 'same file' in str(why): + return if os.path.exists(path2): path2 = os.path.join(path2, os.path.split(path1)[1]) misc.copytree(path1, path2) @@ -157,12 +162,10 @@ def cp(path1, path2, log=True, error=False): if error: raise if log: - logger.warning(why) + logger.warning("fail to cp", path1, path2, why) else: - misc.sprint("fail to cp", why) - except shutil.Error: - # idetical file - pass + misc.sprint("fail to cp",path1,path2, why) + def rm(path, log=True): """removes path, that can be a single element or a list""" diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/gen_cardhtml-pl b/epochX/cudacpp/gq_ttq.mad/bin/internal/gen_cardhtml-pl index 1810c6c082..6e0e06533d 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/gen_cardhtml-pl +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/gen_cardhtml-pl @@ -137,7 +137,7 @@ until($listpos>$#incard){ print PAGE " Model: $model \n"; print PAGE " \n \n
\n"; print PAGE " \n"; - print PAGE "\"\" \n"; + print PAGE "\"\" \n"; print PAGE "
\n"; print PAGE " \n \n \n"; print PAGE " \n"; diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/gen_crossxhtml.py b/epochX/cudacpp/gq_ttq.mad/bin/internal/gen_crossxhtml.py index 681bf9d09b..3114a4350c 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/gen_crossxhtml.py +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/gen_crossxhtml.py @@ -133,7 +133,7 @@ class AllResults(dict): web = False - _run_entries = ['cross', 'error','nb_event_pythia','run_mode','run_statistics', + _run_entries = ['cross', 'error','axsec','nb_event_pythia','run_mode','run_statistics', 'nb_event','cross_pythia','error_pythia', 'nb_event_pythia8','cross_pythia8','error_pythia8', 'shower_dir'] diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/gen_jpeg-pl b/epochX/cudacpp/gq_ttq.mad/bin/internal/gen_jpeg-pl index 87d03da394..31b7e9fe55 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/gen_jpeg-pl +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/gen_jpeg-pl @@ -1,16 +1,16 @@ #!/usr/bin/perl -w #--------------------------------------------------------------------- -# Run GS to create jpeg files defined as $gs +# Run GS to create PNG files defined as $gs #--------------------------------------------------------------------- -system("/bin/bash -c \"rm -f matrix*.jpg\" "); +system("/bin/bash -c \"rm -f matrix*.png\" "); $imatrix = ""; if (! -e "matrix.ps") {$imatrix = 1;} -$max_jpg = 2; -if ($imatrix eq "") {$max_jpg = 5;} -# add 1 to max_jpg, to get max_jpg pages -$max_jpg += 1; +$max_png = 2; +if ($imatrix eq "") {$max_png = 5;} +# add 1 to max_png, to get max_png pages +$max_png += 1; open(PAGE,"> diagrams.html") || die "Error creating diagrams.html"; print PAGE "\ \n"; print PAGE "\ \n"; @@ -21,22 +21,22 @@ while ( -e "matrix$imatrix.ps"){ open(IN, "< matrix$imatrix.ps") || die "No file matrix$imatrix.ps"; open(OUT, "> matrix-1.ps") || die "Could not open file matrix-1.ps"; while () { - if ($_ =~ m/^%%Page: $max_jpg $max_jpg/) {last;} + if ($_ =~ m/^%%Page: $max_png $max_png/) {last;} else {print OUT $_, "\n";} } close(OUT); close(IN); - system "/bin/bash -c \"nice gs \-sDEVICE\=jpeg \-sOutputFile\=matrix$imatrix\%00d.jpg \-q \-dNOPAUSE \-dBATCH matrix-1.ps > /dev/null\""; + system "/bin/bash -c \"nice gs \-sDEVICE\=pngmono \-r150 \-sOutputFile\=matrix$imatrix\%00d.png \-q \-dNOPAUSE \-dBATCH matrix-1.ps > /dev/null\""; system "rm -f matrix-1.ps"; -# Determine how many jpg files we have +# Determine how many png files we have $pages=1; - while(-e "matrix$imatrix$pages.jpg"){ + while(-e "matrix$imatrix$pages.png"){ $pages++; }#end of while #reduce it by one - if ($pages > $max_jpg){ + if ($pages > $max_png){ $pages -= 1; } # Find name of process @@ -45,24 +45,24 @@ while ( -e "matrix$imatrix.ps"){ if ($proc =~ /Process: (.+?)(\s\w+=\d+)*$/) { $proc = $1; } print PAGE "

To save bandwidth not all diagrams were converted to jpeg."; + if (-e "matrix$imatrix$max_png.png" ) { + print PAGE "

To save bandwidth not all diagrams were converted to PNG."; print PAGE "

To view all diagrams click on "; print PAGE "\ postscript. \<\/A\> \ \n"; # # Delete files which aren't included in diagrams.html # - system ("/bin/bash -c \"rm -f matrix$max_jpg.jpg\" "); + system ("/bin/bash -c \"rm -f matrix$max_png.png\" "); } # -# Now create jpeg file for card +# Now create PNG file for card # - if (! -e "../../HTML/card.jpg") { + if (! -e "../../HTML/card.png") { system ("/bin/bash -c \"head -352 matrix$imatrix.ps >& junk.ps\" "); open(JUNK,">> junk.ps") || die "Error opening junk.ps"; @@ -72,7 +72,7 @@ while ( -e "matrix$imatrix.ps"){ system ("/bin/bash -c \"cat matrix$imatrix.ps | sed 1,352d >> junk.ps\" "); - system "/bin/bash -c \"nice gs \-sDEVICE\=jpeg \-sOutputFile\=card.jpg \-q \-dNOPAUSE \-dBATCH \-g180x150 ./junk.ps; rm -f junk.ps; cp -p card.jpg ../../HTML/card.jpg > /dev/null\" "; + system "/bin/bash -c \"nice gs \-sDEVICE\=pngmono \-sOutputFile\=card.png \-q \-dNOPAUSE \-dBATCH \-g180x150 ./junk.ps; rm -f junk.ps; cp -p card.png ../../HTML/card.png > /dev/null\" "; } if ($imatrix eq "") {$imatrix = 0;} $imatrix = $imatrix + 1; @@ -82,3 +82,4 @@ print PAGE "\n"; print PAGE "\<\/BODY\> \n"; print PAGE "\<\/HTML\> \n"; close(PAGE); + 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 415ecc9de0..d5d7fc8faf 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/gen_ximprove.py +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/gen_ximprove.py @@ -30,6 +30,7 @@ import stat import sys import six +import time from six.moves import range from six.moves import zip @@ -304,6 +305,7 @@ def get_helicity(self, to_submit=True, clean=True): logger.debug('(%s) nb_hel: %s zero amp: %s bad_amps_hel: %s/%s', split_file[-1], len(good_hels),len(bad_amps),len(bad_amps_perhel), len(good_hels)*nb_amp ) if len(good_hels) == 1: files.cp(matrix_file, matrix_file.replace('orig','optim')) + files.cp(matrix_file.replace('.f','.o'), matrix_file.replace('orig','optim').replace('.f','.o')) continue # avoid optimization if onlye one helicity gauge = self.cmd.proc_characteristics['gauge'] @@ -1059,6 +1061,7 @@ def __init__(self, cmd, opt=None): # parameter for the gridpack run self.nreq = 2000 self.iseed = 4321 + self.maxevts = 2500 # placeholder for information self.results = 0 #updated in launch/update_html @@ -1200,6 +1203,10 @@ def reset_multijob(self): def write_multijob(self, Channel, nb_split): """ """ if nb_split <=1: + try: + os.remove(pjoin(self.me_dir, 'SubProcesses', Channel.get('name'), 'multijob.dat')) + except OSError: + pass return f = open(pjoin(self.me_dir, 'SubProcesses', Channel.get('name'), 'multijob.dat'), 'w') f.write('%i\n' % nb_split) @@ -1828,17 +1835,17 @@ class gen_ximprove_gridpack(gen_ximprove_v4): 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 gen_events_security = 1.00 - def __new__(cls, *args, **opts): + def __new__(cls, cmd, opts): cls.force_class = 'gridpack' - return super(gen_ximprove_gridpack, cls).__new__(cls, *args, **opts) + return super(gen_ximprove_gridpack, cls).__new__(cls, cmd, opts) - def __init__(self, *args, **opts): + def __init__(self, cmd, opts): self.ngran = -1 + self.nprocs = 1 self.gscalefact = {} self.readonly = False if 'ngran' in opts: @@ -1846,9 +1853,18 @@ def __init__(self, *args, **opts): # del opts['ngran'] if 'readonly' in opts: self.readonly = opts['readonly'] - super(gen_ximprove_gridpack,self).__init__(*args, **opts) + if 'nprocs' in opts: + self.nprocs = int(opts['nprocs']) + if 'maxevts' in opts and self.nprocs > 1: + self.max_request_event = int(opts['maxevts']) + super(gen_ximprove_gridpack,self).__init__(cmd, opts) if self.ngran == -1: self.ngran = 1 + + if self.nprocs > 1: + self.combining_job = 0 + else: + self.combining_job = sys.maxsize def find_job_for_event(self): """return the list of channel that need to be improved""" @@ -1876,8 +1892,8 @@ def find_job_for_event(self): continue # no event to generate events self.gscalefact[tag] = max(1, 1/(goal_lum * C.get('axsec')/ self.ngran)) #need to generate events - logger.debug('request events for ', C.get('name'), 'cross=', - C.get('axsec'), 'needed events = ', goal_lum * C.get('axsec')) + logger.debug('request events for %s cross=%d needed events = %d', + C.get('name'), C.get('axsec'), goal_lum * C.get('axsec')) to_refine.append(C) logger.info('need to improve %s channels' % len(to_refine)) @@ -1897,8 +1913,13 @@ def get_job_for_event(self): 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 - + nb_split = int(max(1,((needed_event-1)// self.max_request_event) +1)) + if not self.split_channels: + nb_split = 1 + if nb_split > self.max_splitting: + 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')) @@ -1908,13 +1929,16 @@ def get_job_for_event(self): nevents = self.max_event_in_iter if nevents < self.min_event_in_iter: + nb_split = int(nb_split * nevents / self.min_event_in_iter) + 1 # sr dangerous? nevents = self.min_event_in_iter # # 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) - + # write the multi-job information + self.write_multijob(C, nb_split) + #create the info dict assume no splitting for the default info = {'name': self.cmd.results.current['run_name'], 'script_name': 'unknown', @@ -1925,7 +1949,7 @@ def get_job_for_event(self): 'nevents': nevents, #int(nevents*self.gen_events_security)+1, 'maxiter': self.max_iter, 'miniter': self.min_iter, - 'precision': -1*int(needed_event)/C.get('axsec'), + 'precision': -goal_lum/nb_split, # -1*int(needed_event)/C.get('axsec'), 'requested_event': needed_event, 'nhel': self.run_card['nhel'], 'channel': C.name.replace('G',''), @@ -1938,27 +1962,59 @@ def get_job_for_event(self): basedir = pjoin(os.path.dirname(__file__), '..','..','SubProcesses', info['P_dir'], info['directory']) info['base_directory'] = basedir - jobs.append(info) - + if nb_split == 1: + jobs.append(info) + else: + for i in range(nb_split): + new_info = dict(info) + new_info['offset'] = i+1 + new_info['directory'] += self.alphabet[i % 26] + str((i+1)//26) + new_info['base_directory'] = info['directory'] + jobs.append(new_info) write_dir = '.' if self.readonly else None self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), jobs, write_dir) + if self.nprocs > 1: + nprocs_cluster = cluster.MultiCore(nb_core=self.nprocs) + gridpack_start = time.time() + def gridpack_wait_monitoring(Idle, Running, Done): + if Idle+Running+Done == 0: + return + logger.info("Gridpack event generation: %s Idle, %s Running, %s Done [%s]" + % (Idle, Running, Done, misc.format_time(time.time()-gridpack_start))) + done = [] for j in jobs: - if j['P_dir'] in done: - continue - done.append(j['P_dir']) + if self.nprocs == 1: + if j['P_dir'] in done: + continue + done.append(j['P_dir']) + # Give a little status. Sometimes these jobs run very long, and having hours without any + # console output can be a bit frightening and make users think we are looping. + if len(done)%5==0: + logger.info(f"Working on job {len(done)} of {len(jobs)}") + # set the working directory path. pwd = pjoin(os.getcwd(),j['P_dir']) if self.readonly else pjoin(self.me_dir, 'SubProcesses', j['P_dir']) - exe = pjoin(pwd, 'ajob1') + exe = pjoin(pwd, j['script_name']) st = os.stat(exe) os.chmod(exe, st.st_mode | stat.S_IEXEC) # run the code\ - cluster.onecore.launch_and_wait(exe, cwd=pwd, packet_member=j['packet']) + if self.nprocs == 1: + cluster.onecore.launch_and_wait(exe, cwd=pwd, packet_member=j['packet']) + else: + nprocs_cluster.cluster_submit(exe, cwd=pwd, packet_member=j['packet']) write_dir = '.' if self.readonly else pjoin(self.me_dir, 'SubProcesses') + if self.nprocs > 1: + nprocs_cluster.wait(self.me_dir, gridpack_wait_monitoring) + + if self.readonly: + combine_runs.CombineRuns(write_dir) + else: + combine_runs.CombineRuns(self.me_dir) self.check_events(goal_lum, to_refine, jobs, write_dir) def check_events(self, goal_lum, to_refine, jobs, Sdir): diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/hel_recycle.py b/epochX/cudacpp/gq_ttq.mad/bin/internal/hel_recycle.py index 1471de4bcb..978ba6575e 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/hel_recycle.py +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/hel_recycle.py @@ -550,7 +550,7 @@ def get_jamp_lines(self, line): def get_amp2_lines(self, line): if line.startswith(' DO I = 1, NCOLOR'): self.in_amp2 = False - elif not line.isspace(): + elif not line.isspace() and 'DENOM' not in line: self.template_dict['amp2_lines'] += f'{line[0:6]} {self.add_indices(line[6:])}' def prepare_bools(self): diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/histograms.py b/epochX/cudacpp/gq_ttq.mad/bin/internal/histograms.py index 51ae2914fc..d68c560806 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/histograms.py +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/histograms.py @@ -1149,11 +1149,8 @@ def parse_one_histo_from_stream(self, stream, all_weight_header, boundaries = [0.0,0.0] for j, weight in \ enumerate(HwU.histo_bin_weight_re.finditer(line_bin)): - if (j == len(weight_header)): - continue - if j == len(all_weight_header): - raise HwU.ParseError("There is more bin weights"+\ - " specified than expected (%i)"%len(weight_header)) + #if (j == len(weight_header)): + # continue if selected_central_weight == all_weight_header[j]: bin_weights['central'] = float(weight.group('weight')) if all_weight_header[j] == 'boundary_xmin': @@ -2480,14 +2477,14 @@ def get_main_central_plot_lines(HwU_name, block_position, color_index, # return [template_no_stat%rep_dic]+\ # ([template%rep_dic] if show_mc_uncertainties else []) - # The use of sqrt(-1) is just a trick to prevent the line to display + # The use of 1/0 is just a trick to prevent the line to display res = [] - rep_dic['data'] = '($3 < 0 ? sqrt(-1) : $3)' + rep_dic['data'] = '($3 < 0 ? 1/0 : $3)' res.append(template_no_stat%rep_dic) rep_dic['title'] = " title ''" if show_mc_uncertainties: res.append(template%rep_dic) - rep_dic['data'] = '($3 >= 0 ? sqrt(-1) : abs($3))' + rep_dic['data'] = '($3 >= 0 ? 1/0 : abs($3))' rep_dic['ls'] = ' ls %d'%(100+color_index) res.append(template_no_stat%rep_dic) if show_mc_uncertainties: @@ -2739,13 +2736,13 @@ def ratio_no_correlations(wgtsA, wgtsB): """#-- rendering subhistograms '%(subhistogram_type)s' %(unset label)s %(set_format_y)s +%(set_yscale)s set yrange [%(ymin).4e:%(ymax).4e] set origin %(origin_x).4e, %(origin_y).4e set size %(size_x).4e, %(size_y).4e set mytics %(mytics)d %(set_ytics)s %(set_format_x)s -%(set_yscale)s %(set_ylabel)s %(set_histo_label)s plot \\""" @@ -2878,7 +2875,7 @@ def ratio_no_correlations(wgtsA, wgtsB): # We decide to show uncertainties in the main plot only if they # are part of a monocolor band. Otherwise, they will only be - # shown in the first subplot. Notice that plotting 'sqrt(-1)' + # shown in the first subplot. Notice that plotting '1/0' # is just a trick so as to have only the key printed with no # line @@ -2890,7 +2887,7 @@ def ratio_no_correlations(wgtsA, wgtsB): '%s, scale variation'%title, band='scale' in use_band) else: uncertainty_plot_lines[-1]['scale'] = \ - ["sqrt(-1) ls %d title '%s'"%(color_index+10,'%s, scale variation'%title)] + ["1/0 ls %d title '%s'"%(color_index+10,'%s, scale variation'%title)] # And now PDF_variation if available if not PDF_var_pos is None and len(PDF_var_pos)>0: if 'pdf' in use_band: @@ -2899,7 +2896,7 @@ def ratio_no_correlations(wgtsA, wgtsB): '%s, PDF variation'%title, band='pdf' in use_band) else: uncertainty_plot_lines[-1]['pdf'] = \ - ["sqrt(-1) ls %d title '%s'"%(color_index+20,'%s, PDF variation'%title)] + ["1/0 ls %d title '%s'"%(color_index+20,'%s, PDF variation'%title)] # And now merging variation if available if not merging_var_pos is None and len(merging_var_pos)>0: if 'merging_scale' in use_band: @@ -2908,7 +2905,7 @@ def ratio_no_correlations(wgtsA, wgtsB): '%s, merging scale variation'%title, band='merging_scale' in use_band) else: uncertainty_plot_lines[-1]['merging_scale'] = \ - ["sqrt(-1) ls %d title '%s'"%(color_index+30,'%s, merging scale variation'%title)] + ["1/0 ls %d title '%s'"%(color_index+30,'%s, merging scale variation'%title)] # And now alpsfact variation if available if not alpsfact_var_pos is None and len(alpsfact_var_pos)>0: if 'alpsfact' in use_band: @@ -2917,7 +2914,7 @@ def ratio_no_correlations(wgtsA, wgtsB): '%s, alpsfact variation'%title, band='alpsfact' in use_band) else: uncertainty_plot_lines[-1]['alpsfact'] = \ - ["sqrt(-1) ls %d title '%s'"%(color_index+40,'%s, alpsfact variation'%title)] + ["1/0 ls %d title '%s'"%(color_index+40,'%s, alpsfact variation'%title)] # plot_lines.append( # "'%s' index %d using (($1+$2)/2):3 ls %d title '%s'"\ diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/launch_plugin.py b/epochX/cudacpp/gq_ttq.mad/bin/internal/launch_plugin.py index 0924927785..ba08c10340 100644 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/launch_plugin.py +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/launch_plugin.py @@ -33,7 +33,7 @@ def compile(self, *args, **opts): if 'cwd' in opts and os.path.basename(opts['cwd']) == 'Source': path = pjoin(opts['cwd'], 'make_opts') common_run_interface.CommonRunCmd.update_make_opts_full(path, - {'FPTYPE': self.run_card['floating_type'] }) + {'override FPTYPE': self.run_card['floating_type'] }) misc.sprint('FPTYPE checked') cudacpp_supported_backends = [ 'fortran', 'cuda', 'hip', 'cpp', 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z', 'cppauto' ] if args and args[0][0] == 'madevent' and hasattr(self, 'run_card'): @@ -76,7 +76,7 @@ def reset_makeopts(self, old_value, new_value, name): if not hasattr(self, 'path'): raise Exception if name == 'floating_type': - common_run_interface.CommonRunCmd.update_make_opts_full({'FPTYPE': new_value}) + common_run_interface.CommonRunCmd.update_make_opts_full({'override FPTYPE': new_value}) else: raise Exception Sourcedir = pjoin(os.path.dirname(os.path.dirname(self.path)), 'Source') diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/lhe_parser.py b/epochX/cudacpp/gq_ttq.mad/bin/internal/lhe_parser.py index f6e47956cd..76ded329c0 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/lhe_parser.py +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/lhe_parser.py @@ -2953,8 +2953,8 @@ def pt(self): @property def pseudorapidity(self): - norm = math.sqrt(self.px**2 + self.py**2+self.pz**2) - return 0.5* math.log((norm - self.pz) / (norm + self.pz)) + norm = math.sqrt(self.px**2 + self.py**2 + self.pz**2) + return 0.5* math.log((norm + self.pz) / (norm - self.pz)) @property def rapidity(self): 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 85e5bcf5e3..2852f1d4d8 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/madevent_interface.py +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/madevent_interface.py @@ -1171,10 +1171,10 @@ def check_survey(self, args, cmd='survey'): for opt,value in self._survey_options.items(): if arg.startswith('--%s=' % opt): exec('self.opts[\'%s\'] = %s(arg.split(\'=\')[-1])' % \ - (opt, value[0])) + (opt, value[0]), globals(), {'self':self, 'arg':arg}) arg = "" if arg != "": raise Exception - except Exception: + except Exception as error: self.help_survey() raise self.InvalidCmd('invalid %s argument'% arg) @@ -3656,9 +3656,11 @@ def do_refine(self, line): else: self.refine_mode = "new" - cross, error = self.make_make_all_html_results() + cross, error, across = self.make_make_all_html_results(get_attr=('xsec','xerru','axsec')) + self.results.add_detail('cross', cross) self.results.add_detail('error', error) + self.results.add_detail('axsec', across) self.results.add_detail('run_statistics', dict(self.results.get_detail('run_statistics'))) @@ -3786,7 +3788,7 @@ def split(a, n): for i, local_G in enumerate(split(Gdirs, nb_chunk)): line = [pjoin(self.me_dir, "Events", self.run_name, "partials%d.lhe.gz" % i)] line.append(pjoin(self.me_dir, 'Events', self.run_name, '%s_%s_banner.txt' % (self.run_name, tag))) - line.append(str(self.results.current['cross'])) + line.append(str(self.results.current.get('axsec'))) line += local_G partials_info.append(self.do_combine_events_partial(' '.join(line), preprocess_only=True)) mycluster.submit(sys.executable, @@ -6749,7 +6751,7 @@ def get_subP_ids(path): class GridPackCmd(MadEventCmd): """The command for the gridpack --Those are not suppose to be use interactively--""" - def __init__(self, me_dir = None, nb_event=0, seed=0, gran=-1, *completekey, **stdin): + def __init__(self, me_dir = None, nb_event=0, seed=0, gran=-1, nprocs=1, maxevts=2500, *completekey, **stdin): """Initialize the command and directly run""" # Initialize properly @@ -6759,6 +6761,8 @@ 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.nprocs = nprocs + self.maxevts = maxevts self.options['automatic_html_opening'] = False #write the grid_card.dat on disk @@ -6874,7 +6878,7 @@ def launch(self, nb_event, seed): #misc.call([pjoin(self.me_dir,'bin','refine4grid'), # str(nb_event), '0', 'Madevent','1','GridRun_%s' % seed], # cwd=self.me_dir) - self.refine4grid(nb_event) + self.gridpack_cross = self.refine4grid(nb_event) # 3) Combine the events/pythia/... self.exec_cmd('combine_events') @@ -6902,6 +6906,8 @@ def refine4grid(self, nb_event): precision = nb_event + across= self.make_make_all_html_results(get_attr='axsec') + self.opts = dict([(key,value[1]) for (key,value) in \ self._survey_options.items()]) @@ -6915,8 +6921,9 @@ def refine4grid(self, nb_event): 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} + refine_opt = {'err_goal': nb_event, 'split_channels': True, + 'ngran':self.granularity, 'readonly': self.readonly, + 'nprocs': self.nprocs, 'maxevts': self.maxevts} 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 @@ -6926,7 +6933,7 @@ def refine4grid(self, nb_event): #print 'run combine!!!' #combine_runs.CombineRuns(self.me_dir) - return + return across #update html output Presults = sum_html.collect_result(self) cross, error = Presults.xsec, Presults.xerru @@ -7051,10 +7058,14 @@ def do_combine_events(self, line): sum_axsec += result.get('axsec')*gscalefact[Gdir] if len(AllEvent) >= 80: #perform a partial unweighting - if self.results.current['cross'] == 0 and self.run_card['gridpack']: - nb_event= self.nb_event + if not self.results.current.get('axsec'): + if self.run_card['gridpack'] and self.gridpack_cross: + nb_event = min(abs(1.05*self.nb_event*sum_axsec/self.gridpack_cross),self.nb_event) + else: + nb_event= self.nb_event else: - nb_event = min(abs(1.01*self.nb_event*sum_axsec/self.results.current['cross']),self.run_card['nevents']) + nb_event = min(abs(1.01*self.nb_event*sum_axsec/self.results.current.get('axsec')),self.run_card['nevents'], self.nb_event, self.gridpack_cross, sum_axsec) + misc.sprint(nb_event, self.results.current.get('axsec'), self.gridpack_cross) AllEvent.unweight(pjoin(outdir, self.run_name, "partials%s.lhe.gz" % partials), get_wgt, log_level=5, trunc_error=1e-2, event_target=nb_event) AllEvent = lhe_parser.MultiEventFile() @@ -7068,6 +7079,7 @@ def do_combine_events(self, line): for data in partials_info: AllEvent.add(*data) + sum_xsec += data[1] if not hasattr(self,'proc_characteristic'): self.proc_characteristic = self.get_characteristics() diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/restore_data b/epochX/cudacpp/gq_ttq.mad/bin/internal/restore_data index 6205bb9567..407ed7aa91 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/restore_data +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/restore_data @@ -48,8 +48,17 @@ for i in `cat subproc.mg` ; do cd ../ done +# check if we are on a Mac, otherwise assume Linux +if [[ "$OSTYPE" == "darwin"* ]]; then + # no nproc on Mac, so use sysctl instead + # use -S1024 because there is a limit on the length of the command + xargs_opts="-P $(sysctl -n hw.ncpu) -S1024" +else + xargs_opts="-P $(nproc --all)" +fi + find . -mindepth 2 -maxdepth 2 -type d -name 'G*' -print0 \ - | xargs --null -P "$(nproc --all)" -I{} bash -c " + | xargs --null ${xargs_opts} -I{} bash -c " cd {} for j in $1_results.dat ; do if [[ -e \$j ]] ; then diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/sum_html.py b/epochX/cudacpp/gq_ttq.mad/bin/internal/sum_html.py index 9dd5826f71..fb8dd3a74a 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/sum_html.py +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/sum_html.py @@ -770,7 +770,7 @@ def collect_result(cmd, folder_names=[], jobs=None, main_dir=None): return all -def make_all_html_results(cmd, folder_names = [], jobs=[]): +def make_all_html_results(cmd, folder_names = [], jobs=[], get_attr=None): """ folder_names and jobs have been added for the amcatnlo runs """ run = cmd.results.current['run_name'] if not os.path.exists(pjoin(cmd.me_dir, 'HTML', run)): @@ -794,7 +794,12 @@ def make_all_html_results(cmd, folder_names = [], jobs=[]): fsock.write('%s

' % Presults.get_html(run, unit, cmd.me_dir)) fsock.write('%s
' % P_text) - return Presults.xsec, Presults.xerru + if not get_attr: + return Presults.xsec, Presults.xerru + else: + if isinstance(get_attr, tuple): + return [getattr(Presults, _) for _ in get_attr] + return getattr(Presults, get_attr) diff --git a/epochX/cudacpp/gq_ttq.mad/bin/internal/ufomodel/write_param_card.py b/epochX/cudacpp/gq_ttq.mad/bin/internal/ufomodel/write_param_card.py index 57a85b0614..33a89259f8 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/ufomodel/write_param_card.py +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/ufomodel/write_param_card.py @@ -116,9 +116,10 @@ def write_param(self, param, lhablock): def write_dep_param_block(self, lhablock): import cmath from parameters import all_parameters + param_values = {'cmath':cmath} for parameter in all_parameters: try: - exec("%s = %s" % (parameter.name, parameter.value)) + exec("%s = %s" % (parameter.name, parameter.value), globals(), param_values) except Exception: pass text = "## Not dependent paramater.\n" @@ -134,7 +135,7 @@ def write_dep_param_block(self, lhablock): prefix = "DECAY " for part, param in data: if isinstance(param.value, str): - value = complex(eval(param.value)).real + value = complex(eval(param.value, globals(), param_values)).real else: value = param.value diff --git a/epochX/cudacpp/gq_ttq.mad/bin/madevent b/epochX/cudacpp/gq_ttq.mad/bin/madevent index dff9711b73..9c5363e682 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/madevent +++ b/epochX/cudacpp/gq_ttq.mad/bin/madevent @@ -178,6 +178,17 @@ force_run = False if (args and args[0] == 'treatcards'): force_run=True + +# check that madgraph is not in PYTHONPATH +try: + import madgraph +except ImportError: + pass +else: + logger.getLogger('madgraph').error('Looks like you do have madgraph in your PYTHONPATH (or you run this executable from the main MG5aMC directory). This executable will likely not work in such case.') + + + # Call the cmd interface main loop try: if '-h' in args or '--help' in args: diff --git a/epochX/cudacpp/gq_ttq.mad/src/HelAmps_sm.h b/epochX/cudacpp/gq_ttq.mad/src/HelAmps_sm.h index a304fc85c8..a7f18284b4 100644 --- a/epochX/cudacpp/gq_ttq.mad/src/HelAmps_sm.h +++ b/epochX/cudacpp/gq_ttq.mad/src/HelAmps_sm.h @@ -8,7 +8,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gq_ttq.mad/src/Parameters_sm.cc b/epochX/cudacpp/gq_ttq.mad/src/Parameters_sm.cc index 998cb505a0..5f2def274e 100644 --- a/epochX/cudacpp/gq_ttq.mad/src/Parameters_sm.cc +++ b/epochX/cudacpp/gq_ttq.mad/src/Parameters_sm.cc @@ -7,7 +7,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gq_ttq.mad/src/Parameters_sm.h b/epochX/cudacpp/gq_ttq.mad/src/Parameters_sm.h index 1565ed5888..d2a4a36268 100644 --- a/epochX/cudacpp/gq_ttq.mad/src/Parameters_sm.h +++ b/epochX/cudacpp/gq_ttq.mad/src/Parameters_sm.h @@ -7,7 +7,7 @@ // Further modified by: A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gq_ttq.sa/CODEGEN_cudacpp_gq_ttq_log.txt b/epochX/cudacpp/gq_ttq.sa/CODEGEN_cudacpp_gq_ttq_log.txt index 8249ac5d67..8c6d0c28b4 100644 --- a/epochX/cudacpp/gq_ttq.sa/CODEGEN_cudacpp_gq_ttq_log.txt +++ b/epochX/cudacpp/gq_ttq.sa/CODEGEN_cudacpp_gq_ttq_log.txt @@ -1,8 +1,11 @@ +WARNING:root:python3.12 support is still experimental. For the moment re-weighting is NOT working and do expect a LOT of syntax warning. We do not advise python3.12 for production for the moment. +Running MG5 in debug mode +Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT +Plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT has marked as NOT being validated with this version: 3.6.2. +It has been validated for the last time with version: 3.6.0 Note that this is a development version. This version is intended for development/beta testing and NOT for production. This version has not been fully tested (if at all) and might have limited user support (if at all) -Running MG5 in debug mode -Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT ************************************************************ * * * W E L C O M E to * @@ -15,7 +18,7 @@ Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT * * * * * * * * * * * * -* VERSION 3.6.0 2024-09-30 * +* VERSION 3.6.2 2025-03-19 * * * * WARNING: UNKNOWN DEVELOPMENT VERSION. * * WARNING: DO NOT USE FOR PRODUCTION * @@ -46,10 +49,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 Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt -import /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq.mg +import /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_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 @@ -57,7 +59,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.006358146667480469  +DEBUG: model prefixing takes 0.001814126968383789  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  @@ -166,13 +168,13 @@ 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.078 s +8 processes with 40 diagrams generated in 0.063 s Total: 8 processes with 40 diagrams output standalone_cudacpp ../TMPOUT/CODEGEN_cudacpp_gq_ttq Output will be done with PLUGIN: CUDACPP_OUTPUT DEBUG: Entering PLUGIN_ProcessExporter.__init__ (initialise the exporter) [output.py at line 171]  DEBUG: Entering PLUGIN_ProcessExporter.copy_template (initialise the directory) [output.py at line 176]  -INFO: Creating subdirectories in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq +INFO: Creating subdirectories in directory /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq 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 @@ -189,40 +191,40 @@ INFO: Combined process g s~ > t t~ s~ WEIGHTED<=3 @1 with process g u~ > t t~ u~ DEBUG: type(fortran_model)= [output.py at line 220]  DEBUG: type(me)= me=0 [output.py at line 221]  DEBUG: "need to link", self.to_link_in_P =  need to link ['nvtx.h', 'timer.h', 'timermap.h', 'ompnumthreads.h', 'GpuRuntime.h', 'GpuAbstraction.h', 'MemoryAccessHelpers.h', 'MemoryAccessVectors.h', 'MemoryAccessMatrixElements.h', 'MemoryAccessMomenta.h', 'MemoryAccessRandomNumbers.h', 'MemoryAccessWeights.h', 'MemoryAccessAmplitudes.h', 'MemoryAccessWavefunctions.h', 'MemoryAccessGs.h', 'MemoryAccessCouplingsFixed.h', 'MemoryAccessNumerators.h', 'MemoryAccessDenominators.h', 'MemoryAccessChannelIds.h', 'EventStatistics.h', 'CommonRandomNumbers.h', 'CrossSectionKernels.cc', 'CrossSectionKernels.h', 'MatrixElementKernels.cc', 'MatrixElementKernels.h', 'RamboSamplingKernels.cc', 'RamboSamplingKernels.h', 'RandomNumberKernels.h', 'CommonRandomNumberKernel.cc', 'CurandRandomNumberKernel.cc', 'HiprandRandomNumberKernel.cc', 'Bridge.h', 'BridgeKernels.cc', 'BridgeKernels.h', 'fbridge.cc', 'fbridge.inc', 'fsampler.cc', 'fsampler.inc', 'MadgraphTest.h', 'runTest.cc', 'testmisc.cc', 'testxxx_cc_ref.txt', 'valgrind.h', 'cudacpp.mk', 'testxxx.cc', 'MemoryBuffers.h', 'MemoryAccessCouplings.h', 'perf.py', 'profile.sh'] [output.py at line 222]  -INFO: Creating files in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq/SubProcesses/P1_Sigma_sm_gu_ttxu -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq/SubProcesses/P1_Sigma_sm_gu_ttxu/./CPPProcess.h -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq/SubProcesses/P1_Sigma_sm_gu_ttxu/./CPPProcess.cc -INFO: Created files CPPProcess.h and CPPProcess.cc in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq/SubProcesses/P1_Sigma_sm_gu_ttxu/. +INFO: Creating files in directory /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq/SubProcesses/P1_Sigma_sm_gu_ttxu +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq/SubProcesses/P1_Sigma_sm_gu_ttxu/./CPPProcess.h +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq/SubProcesses/P1_Sigma_sm_gu_ttxu/./CPPProcess.cc +INFO: Created files CPPProcess.h and CPPProcess.cc in directory /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq/SubProcesses/P1_Sigma_sm_gu_ttxu/. DEBUG: Entering PLUGIN_ProcessExporter.generate_subprocess_directory (create the directory) [output.py at line 218]  DEBUG: type(subproc_group)= [output.py at line 219]  DEBUG: type(fortran_model)= [output.py at line 220]  DEBUG: type(me)= me=1 [output.py at line 221]  DEBUG: "need to link", self.to_link_in_P =  need to link ['nvtx.h', 'timer.h', 'timermap.h', 'ompnumthreads.h', 'GpuRuntime.h', 'GpuAbstraction.h', 'MemoryAccessHelpers.h', 'MemoryAccessVectors.h', 'MemoryAccessMatrixElements.h', 'MemoryAccessMomenta.h', 'MemoryAccessRandomNumbers.h', 'MemoryAccessWeights.h', 'MemoryAccessAmplitudes.h', 'MemoryAccessWavefunctions.h', 'MemoryAccessGs.h', 'MemoryAccessCouplingsFixed.h', 'MemoryAccessNumerators.h', 'MemoryAccessDenominators.h', 'MemoryAccessChannelIds.h', 'EventStatistics.h', 'CommonRandomNumbers.h', 'CrossSectionKernels.cc', 'CrossSectionKernels.h', 'MatrixElementKernels.cc', 'MatrixElementKernels.h', 'RamboSamplingKernels.cc', 'RamboSamplingKernels.h', 'RandomNumberKernels.h', 'CommonRandomNumberKernel.cc', 'CurandRandomNumberKernel.cc', 'HiprandRandomNumberKernel.cc', 'Bridge.h', 'BridgeKernels.cc', 'BridgeKernels.h', 'fbridge.cc', 'fbridge.inc', 'fsampler.cc', 'fsampler.inc', 'MadgraphTest.h', 'runTest.cc', 'testmisc.cc', 'testxxx_cc_ref.txt', 'valgrind.h', 'cudacpp.mk', 'testxxx.cc', 'MemoryBuffers.h', 'MemoryAccessCouplings.h', 'perf.py', 'profile.sh'] [output.py at line 222]  -INFO: Creating files in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq/SubProcesses/P1_Sigma_sm_gux_ttxux -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq/SubProcesses/P1_Sigma_sm_gux_ttxux/./CPPProcess.h -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq/SubProcesses/P1_Sigma_sm_gux_ttxux/./CPPProcess.cc -INFO: Created files CPPProcess.h and CPPProcess.cc in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq/SubProcesses/P1_Sigma_sm_gux_ttxux/. -Generated helas calls for 2 subprocesses (10 diagrams) in 0.031 s +INFO: Creating files in directory /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq/SubProcesses/P1_Sigma_sm_gux_ttxux +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq/SubProcesses/P1_Sigma_sm_gux_ttxux/./CPPProcess.h +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq/SubProcesses/P1_Sigma_sm_gux_ttxux/./CPPProcess.cc +INFO: Created files CPPProcess.h and CPPProcess.cc in directory /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq/SubProcesses/P1_Sigma_sm_gux_ttxux/. +Generated helas calls for 2 subprocesses (10 diagrams) in 0.025 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.145 s +ALOHA: aloha creates 2 routines in 0.061 s FFV1 FFV1 FFV1 FFV1 VVV1 -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq/src/./HelAmps_sm.h -INFO: Created file HelAmps_sm.h in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq/src/. +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq/src/./HelAmps_sm.h +INFO: Created file HelAmps_sm.h in directory /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_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_cudacpp_gq_ttq/src/./Parameters_sm.h -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq/src/./Parameters_sm.cc +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq/src/./Parameters_sm.h +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_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_cudacpp_gq_ttq/src/. and /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq/src/. +INFO: /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq/src/. and /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_gq_ttq/src/. quit -real 0m0.670s -user 0m0.588s -sys 0m0.061s -Code generation completed in 1 seconds +real 0m1.667s +user 0m0.425s +sys 0m0.153s +Code generation completed in 2 seconds diff --git a/epochX/cudacpp/gq_ttq.sa/SubProcesses/Bridge.h b/epochX/cudacpp/gq_ttq.sa/SubProcesses/Bridge.h index 87aa648dd2..49b928db67 100644 --- a/epochX/cudacpp/gq_ttq.sa/SubProcesses/Bridge.h +++ b/epochX/cudacpp/gq_ttq.sa/SubProcesses/Bridge.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: S. Roiser (Nov 2021) for the MG5aMC CUDACPP plugin. -// Further modified by: S. Roiser, J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2021-2025) for the MG5aMC CUDACPP plugin. #ifndef BRIDGE_H #define BRIDGE_H 1 @@ -255,11 +255,15 @@ namespace mg5amcCpu throw std::logic_error( "Bridge constructor: FIXME! cannot choose gputhreads" ); // this should never happen! m_gpublocks = m_nevt / m_gputhreads; } +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Instantiate device Bridge (nevt=" << m_nevt << ", gpublocks=" << m_gpublocks << ", gputhreads=" << m_gputhreads << ", gpublocks*gputhreads=" << m_gpublocks * m_gputhreads << ")" << std::endl; +#endif m_pmek.reset( new MatrixElementKernelDevice( m_devMomentaC, m_devGs, m_devRndHel, m_devRndCol, m_devChannelIds, m_devMEs, m_devSelHel, m_devSelCol, m_gpublocks, m_gputhreads ) ); #else +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Instantiate host Bridge (nevt=" << m_nevt << ")" << std::endl; +#endif m_pmek.reset( new MatrixElementKernelHost( m_hstMomentaC, m_hstGs, m_hstRndHel, m_hstRndCol, m_hstChannelIds, m_hstMEs, m_hstSelHel, m_hstSelCol, m_nevt ) ); #endif // MGONGPUCPP_GPUIMPL // Create a process object, read param card and set parameters @@ -290,8 +294,10 @@ namespace mg5amcCpu throw std::runtime_error( "Bridge: gpublocks*gputhreads must equal m_nevt in set_gpugrid" ); m_gpublocks = gpublocks; m_gputhreads = gputhreads; +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Set grid in Bridge (nevt=" << m_nevt << ", gpublocks=" << m_gpublocks << ", gputhreads=" << m_gputhreads << ", gpublocks*gputhreads=" << m_gpublocks * m_gputhreads << ")" << std::endl; +#endif m_pmek->setGrid( m_gpublocks, m_gputhreads ); } #endif @@ -347,7 +353,9 @@ namespace mg5amcCpu if( goodHelOnly ) return; m_pmek->computeMatrixElements( useChannelIds ); copyHostFromDevice( m_hstMEs, m_devMEs ); +#ifdef MGONGPUCPP_VERBOSE flagAbnormalMEs( m_hstMEs.data(), m_nevt ); +#endif copyHostFromDevice( m_hstSelHel, m_devSelHel ); copyHostFromDevice( m_hstSelCol, m_devSelCol ); if constexpr( std::is_same_v ) @@ -400,7 +408,9 @@ namespace mg5amcCpu } if( goodHelOnly ) return; m_pmek->computeMatrixElements( useChannelIds ); +#ifdef MGONGPUCPP_VERBOSE flagAbnormalMEs( m_hstMEs.data(), m_nevt ); +#endif if constexpr( std::is_same_v ) { memcpy( mes, m_hstMEs.data(), m_hstMEs.bytes() ); diff --git a/epochX/cudacpp/gq_ttq.sa/SubProcesses/GpuRuntime.h b/epochX/cudacpp/gq_ttq.sa/SubProcesses/GpuRuntime.h index 860c7fde16..6a4b946e74 100644 --- a/epochX/cudacpp/gq_ttq.sa/SubProcesses/GpuRuntime.h +++ b/epochX/cudacpp/gq_ttq.sa/SubProcesses/GpuRuntime.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: J. Teig (Jun 2023, based on earlier work by S. Roiser) for the MG5aMC CUDACPP plugin. -// Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2025) for the MG5aMC CUDACPP plugin. #ifndef MG5AMC_GPURUNTIME_H #define MG5AMC_GPURUNTIME_H 1 @@ -50,7 +50,7 @@ namespace mg5amcGpu // Set up CUDA application // ** NB: strictly speaking this is not needed when using the CUDA runtime API ** // Calling cudaSetDevice on startup is useful to properly book-keep the time spent in CUDA initialization - static void setUp( const bool debug = true ) + static void setUp( const bool debug = false ) // ZW: changed debug default to false { // ** NB: it is useful to call cudaSetDevice, or cudaFree, to properly book-keep the time spent in CUDA initialization // ** NB: otherwise, the first CUDA operation (eg a cudaMemcpyToSymbol in CPPProcess ctor) appears to take much longer! @@ -71,7 +71,7 @@ namespace mg5amcGpu // ** NB: strictly speaking this is not needed when using the CUDA runtime API ** // Calling cudaDeviceReset on shutdown is only needed for checking memory leaks in cuda-memcheck // See https://docs.nvidia.com/cuda/cuda-memcheck/index.html#leak-checking - static void tearDown( const bool debug = true ) + static void tearDown( const bool debug = false ) // ZW: changed debug default to false { if( debug ) std::cout << "__GpuRuntime: calling GpuDeviceReset()" << std::endl; checkGpu( gpuDeviceReset() ); diff --git a/epochX/cudacpp/gq_ttq.sa/SubProcesses/MatrixElementKernels.cc b/epochX/cudacpp/gq_ttq.sa/SubProcesses/MatrixElementKernels.cc index f463977c1a..703ea3781c 100644 --- a/epochX/cudacpp/gq_ttq.sa/SubProcesses/MatrixElementKernels.cc +++ b/epochX/cudacpp/gq_ttq.sa/SubProcesses/MatrixElementKernels.cc @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: A. Valassi (Jan 2022) for the MG5aMC CUDACPP plugin. -// Further modified by: J. Teig, A. Valassi (2022-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: J. Teig, A. Valassi, Z. Wettersten (2022-2025) for the MG5aMC CUDACPP plugin. #include "MatrixElementKernels.h" @@ -60,7 +60,9 @@ namespace mg5amcCpu #ifdef MGONGPU_CHANNELID_DEBUG MatrixElementKernelBase::dumpNevtProcessedByChannel(); #endif +#ifdef MGONGPUCPP_VERBOSE MatrixElementKernelBase::dumpSignallingFPEs(); +#endif } //-------------------------------------------------------------------------- diff --git a/epochX/cudacpp/gq_ttq.sa/SubProcesses/MatrixElementKernels.h b/epochX/cudacpp/gq_ttq.sa/SubProcesses/MatrixElementKernels.h index 7acff4b308..8da04d7945 100644 --- a/epochX/cudacpp/gq_ttq.sa/SubProcesses/MatrixElementKernels.h +++ b/epochX/cudacpp/gq_ttq.sa/SubProcesses/MatrixElementKernels.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: A. Valassi (Jan 2022) for the MG5aMC CUDACPP plugin. -// Further modified by: J. Teig, A. Valassi (2022-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: J. Teig, A. Valassi, Z. Wettersten (2022-2025) for the MG5aMC CUDACPP plugin. #ifndef MATRIXELEMENTKERNELS_H #define MATRIXELEMENTKERNELS_H 1 @@ -134,7 +134,7 @@ namespace mg5amcCpu // Does this host system support the SIMD used in the matrix element calculation? // [NB: this is private, SIMD vectorization in mg5amc C++ code is currently only used in the ME calculations below MatrixElementKernelHost!] - static bool hostSupportsSIMD( const bool verbose = true ); + static bool hostSupportsSIMD( const bool verbose = false ); // ZW: default verbose false private: diff --git a/epochX/cudacpp/gq_ttq.sa/SubProcesses/MemoryAccessGs.h b/epochX/cudacpp/gq_ttq.sa/SubProcesses/MemoryAccessGs.h index 63c17a68fa..50a6aaef4d 100644 --- a/epochX/cudacpp/gq_ttq.sa/SubProcesses/MemoryAccessGs.h +++ b/epochX/cudacpp/gq_ttq.sa/SubProcesses/MemoryAccessGs.h @@ -128,6 +128,14 @@ namespace mg5amcCpu #endif } + // Locate a field (output) in a memory buffer (input) from a kernel event-indexing mechanism (internal) + // [Signature (SCALAR OR VECTOR) ===> fptype_sv* kernelAccess( fptype* buffer ) <===] + static __host__ __device__ inline fptype_sv* + kernelAccessP( fptype* buffer ) + { + return reinterpret_cast( buffer ); + } + // Locate a field (output) in a memory buffer (input) from a kernel event-indexing mechanism (internal) and the given field indexes (input) // [Signature (const, SCALAR) ===> const fptype& kernelAccessConst( const fptype* buffer ) <===] static constexpr auto kernelAccessConst_s = diff --git a/epochX/cudacpp/gq_ttq.sa/SubProcesses/MemoryBuffers.h b/epochX/cudacpp/gq_ttq.sa/SubProcesses/MemoryBuffers.h index 65a101888d..17ba7a89e5 100644 --- a/epochX/cudacpp/gq_ttq.sa/SubProcesses/MemoryBuffers.h +++ b/epochX/cudacpp/gq_ttq.sa/SubProcesses/MemoryBuffers.h @@ -13,6 +13,7 @@ #include "CPPProcess.h" #include "GpuRuntime.h" #include "Parameters_sm.h" +#include "processConfig.h" #include @@ -274,7 +275,8 @@ namespace mg5amcCpu typedef BufferBase BufferNumerators; // The size (number of elements) per event in a memory buffer for numerators - constexpr size_t sizePerEventNumerators = 1; + // (should be equal to the number of diagrams in the process) + constexpr size_t sizePerEventNumerators = processConfig::ndiagrams; #ifndef MGONGPUCPP_GPUIMPL // A class encapsulating a C++ host buffer for gs diff --git a/epochX/cudacpp/gq_ttq.sa/SubProcesses/P1_Sigma_sm_gu_ttxu/CPPProcess.cc b/epochX/cudacpp/gq_ttq.sa/SubProcesses/P1_Sigma_sm_gu_ttxu/CPPProcess.cc index 81ab8669a5..ca7f355c3b 100644 --- a/epochX/cudacpp/gq_ttq.sa/SubProcesses/P1_Sigma_sm_gu_ttxu/CPPProcess.cc +++ b/epochX/cudacpp/gq_ttq.sa/SubProcesses/P1_Sigma_sm_gu_ttxu/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -25,6 +25,7 @@ #include "MemoryAccessMatrixElements.h" #include "MemoryAccessMomenta.h" #include "MemoryAccessWavefunctions.h" +#include "processConfig.h" #ifdef MGONGPU_SUPPORTS_MULTICHANNEL #include "MemoryAccessDenominators.h" @@ -99,6 +100,69 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { +#ifdef MGONGPU_SUPPORTS_MULTICHANNEL + __device__ INLINE unsigned int getChannelId( const unsigned int* allChannelIds +#ifndef MGONGPUCPP_GPUIMPL + , + const int ievt00, + bool sanityCheckMixedPrecision = true +#endif + ) + { + unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr +#ifdef MGONGPUCPP_GPUIMPL + using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page + if( allChannelIds != nullptr ) + { + const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) + const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) + // NB: channelIds_sv is a scalar in CUDA + channelId = channelIds_sv; + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + } +#else // Cuda or C++ + using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + if( allChannelIds != nullptr ) + { + // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) + const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 + uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) +#ifndef MGONGPU_CPPSIMD + // NB: channelIds_sv is a scalar in no-SIMD C++ + channelId = channelIds_sv; +#else + // NB: channelIds_sv is a vector in SIMD C++ + channelId = channelIds_sv[0]; // element[0] + for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] + { + assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId + } +#endif + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + if( sanityCheckMixedPrecision ) + { +#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT + // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) + const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 + uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + for( int i = 0; i < neppV; ++i ) + { + assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector + } +#endif + } + } +#endif // MGONGPUCPP_GPUIMPL + return channelId; + } +#endif // MGONGPU_SUPPORTS_MULTICHANNEL + constexpr int nw6 = CPPProcess::nw6; // dimensions of each wavefunction (HELAS KEK 91-11): e.g. 6 for e+ e- -> mu+ mu- (fermions and vectors) constexpr int npar = CPPProcess::npar; // #particles in total (external = initial + final): e.g. 4 for e+ e- -> mu+ mu- constexpr int ncomb = CPPProcess::ncomb; // #helicity combinations: e.g. 16 for e+ e- -> mu+ mu- (2**4 = fermion spin up/down ** npar) @@ -308,7 +372,7 @@ namespace mg5amcCpu COUPs[ndcoup + iicoup] = allCOUPs[ndcoup + iicoup]; // independent couplings, fixed for all events fptype* MEs = E_ACCESS::ieventAccessRecord( allMEs, ievt0 ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); #endif #endif @@ -318,7 +382,7 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Numerators and denominators for the current event (CUDA) or SIMD event page (C++) - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); #endif @@ -605,7 +669,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- @@ -975,9 +1041,6 @@ namespace mg5amcCpu #ifdef MGONGPUCPP_GPUIMPL // Remember: in CUDA this is a kernel for one event, in c++ this processes n events const int ievt = blockDim.x * blockIdx.x + threadIdx.x; // index of event (thread) in grid -#ifdef MGONGPU_SUPPORTS_MULTICHANNEL - using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events -#endif #else //assert( (size_t)(allmomenta) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] //assert( (size_t)(allMEs) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] @@ -985,7 +1048,6 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL using NUM_ACCESS = HostAccessNumerators; // non-trivial access: buffer includes all events using DEN_ACCESS = HostAccessDenominators; // non-trivial access: buffer includes all events - using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events #endif #endif @@ -1010,11 +1072,12 @@ namespace mg5amcCpu fptype_sv& MEs_sv = E_ACCESS::kernelAccess( MEs ); MEs_sv = fptype_sv{ 0 }; #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - numerators_sv = fptype_sv{ 0 }; + for( int i = 0; i < processConfig::ndiagrams; ++i ) + numerators_sv[i] = fptype_sv{ 0 }; denominators_sv = fptype_sv{ 0 }; #endif } @@ -1027,17 +1090,7 @@ namespace mg5amcCpu // *** START OF PART 1a - CUDA (one event per GPU thread) *** #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) - const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) - // NB: channelIds_sv is a scalar in CUDA - channelId = channelIds_sv; - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) - } + unsigned int channelId = getChannelId( allChannelIds ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (for the single event processed in calculate_wavefunctions) @@ -1152,38 +1205,7 @@ namespace mg5amcCpu const int ievt00 = ipagV2 * neppV; // loop on one SIMD page (neppV events) at a time #endif #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) - const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 - uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) -#ifndef MGONGPU_CPPSIMD - // NB: channelIds_sv is a scalar in no-SIMD C++ - channelId = channelIds_sv; -#else - // NB: channelIds_sv is a vector in SIMD C++ - channelId = channelIds_sv[0]; // element[0] - for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] - { - assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId - } -#endif - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) -#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT - // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) - const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 - uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - for( int i = 0; i < neppV; ++i ) - { - assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector - } -#endif - } + unsigned int channelId = getChannelId( allChannelIds, ievt00 ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (jamp2[nParity][ncolor][neppV] for the SIMD vector - or the two SIMD vectors - of events processed in calculate_wavefunctions) @@ -1356,11 +1378,12 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( allChannelIds != nullptr ) // fix segfault #892 (not 'channelIds[0] != 0') { - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + const unsigned int channelId = getChannelId( allChannelIds, ievt0, false ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - MEs_sv *= numerators_sv / denominators_sv; + MEs_sv *= numerators_sv[channelId - 1] / denominators_sv; } #endif //for( int ieppV = 0; ieppV < neppV; ieppV++ ) diff --git a/epochX/cudacpp/gq_ttq.sa/SubProcesses/P1_Sigma_sm_gu_ttxu/CPPProcess.h b/epochX/cudacpp/gq_ttq.sa/SubProcesses/P1_Sigma_sm_gu_ttxu/CPPProcess.h index b501a9772e..0db2d57c1d 100644 --- a/epochX/cudacpp/gq_ttq.sa/SubProcesses/P1_Sigma_sm_gu_ttxu/CPPProcess.h +++ b/epochX/cudacpp/gq_ttq.sa/SubProcesses/P1_Sigma_sm_gu_ttxu/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gq_ttq.sa/SubProcesses/P1_Sigma_sm_gu_ttxu/processConfig.h b/epochX/cudacpp/gq_ttq.sa/SubProcesses/P1_Sigma_sm_gu_ttxu/processConfig.h new file mode 100644 index 0000000000..fe66e4e760 --- /dev/null +++ b/epochX/cudacpp/gq_ttq.sa/SubProcesses/P1_Sigma_sm_gu_ttxu/processConfig.h @@ -0,0 +1,16 @@ +// Copyright (C) 2025 CERN and UCLouvain. +// Licensed under the GNU Lesser General Public License (version 3 or later). +// Created by: S. Roiser (May 2025) for the MG5aMC CUDACPP plugin. +// Further modified by: ... for the MG5aMC CUDACPP plugin. + + +#ifndef MG5_CONFIG_SIGMA_SM_GU_TTXU_H +#define MG5_CONFIG_SIGMA_SM_GU_TTXU_H 1 + +namespace processConfig { + + constexpr int ndiagrams = 5; + +} + +#endif // MG5_CONFIG_SIGMA_SM_GU_TTXU_H \ No newline at end of file diff --git a/epochX/cudacpp/gq_ttq.sa/SubProcesses/P1_Sigma_sm_gux_ttxux/CPPProcess.cc b/epochX/cudacpp/gq_ttq.sa/SubProcesses/P1_Sigma_sm_gux_ttxux/CPPProcess.cc index c1c42990a2..0fcd144b28 100644 --- a/epochX/cudacpp/gq_ttq.sa/SubProcesses/P1_Sigma_sm_gux_ttxux/CPPProcess.cc +++ b/epochX/cudacpp/gq_ttq.sa/SubProcesses/P1_Sigma_sm_gux_ttxux/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -25,6 +25,7 @@ #include "MemoryAccessMatrixElements.h" #include "MemoryAccessMomenta.h" #include "MemoryAccessWavefunctions.h" +#include "processConfig.h" #ifdef MGONGPU_SUPPORTS_MULTICHANNEL #include "MemoryAccessDenominators.h" @@ -99,6 +100,69 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { +#ifdef MGONGPU_SUPPORTS_MULTICHANNEL + __device__ INLINE unsigned int getChannelId( const unsigned int* allChannelIds +#ifndef MGONGPUCPP_GPUIMPL + , + const int ievt00, + bool sanityCheckMixedPrecision = true +#endif + ) + { + unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr +#ifdef MGONGPUCPP_GPUIMPL + using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page + if( allChannelIds != nullptr ) + { + const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) + const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) + // NB: channelIds_sv is a scalar in CUDA + channelId = channelIds_sv; + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + } +#else // Cuda or C++ + using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + if( allChannelIds != nullptr ) + { + // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) + const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 + uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) +#ifndef MGONGPU_CPPSIMD + // NB: channelIds_sv is a scalar in no-SIMD C++ + channelId = channelIds_sv; +#else + // NB: channelIds_sv is a vector in SIMD C++ + channelId = channelIds_sv[0]; // element[0] + for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] + { + assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId + } +#endif + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + if( sanityCheckMixedPrecision ) + { +#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT + // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) + const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 + uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + for( int i = 0; i < neppV; ++i ) + { + assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector + } +#endif + } + } +#endif // MGONGPUCPP_GPUIMPL + return channelId; + } +#endif // MGONGPU_SUPPORTS_MULTICHANNEL + constexpr int nw6 = CPPProcess::nw6; // dimensions of each wavefunction (HELAS KEK 91-11): e.g. 6 for e+ e- -> mu+ mu- (fermions and vectors) constexpr int npar = CPPProcess::npar; // #particles in total (external = initial + final): e.g. 4 for e+ e- -> mu+ mu- constexpr int ncomb = CPPProcess::ncomb; // #helicity combinations: e.g. 16 for e+ e- -> mu+ mu- (2**4 = fermion spin up/down ** npar) @@ -308,7 +372,7 @@ namespace mg5amcCpu COUPs[ndcoup + iicoup] = allCOUPs[ndcoup + iicoup]; // independent couplings, fixed for all events fptype* MEs = E_ACCESS::ieventAccessRecord( allMEs, ievt0 ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); #endif #endif @@ -318,7 +382,7 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Numerators and denominators for the current event (CUDA) or SIMD event page (C++) - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); #endif @@ -605,7 +669,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- @@ -975,9 +1041,6 @@ namespace mg5amcCpu #ifdef MGONGPUCPP_GPUIMPL // Remember: in CUDA this is a kernel for one event, in c++ this processes n events const int ievt = blockDim.x * blockIdx.x + threadIdx.x; // index of event (thread) in grid -#ifdef MGONGPU_SUPPORTS_MULTICHANNEL - using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events -#endif #else //assert( (size_t)(allmomenta) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] //assert( (size_t)(allMEs) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] @@ -985,7 +1048,6 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL using NUM_ACCESS = HostAccessNumerators; // non-trivial access: buffer includes all events using DEN_ACCESS = HostAccessDenominators; // non-trivial access: buffer includes all events - using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events #endif #endif @@ -1010,11 +1072,12 @@ namespace mg5amcCpu fptype_sv& MEs_sv = E_ACCESS::kernelAccess( MEs ); MEs_sv = fptype_sv{ 0 }; #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - numerators_sv = fptype_sv{ 0 }; + for( int i = 0; i < processConfig::ndiagrams; ++i ) + numerators_sv[i] = fptype_sv{ 0 }; denominators_sv = fptype_sv{ 0 }; #endif } @@ -1027,17 +1090,7 @@ namespace mg5amcCpu // *** START OF PART 1a - CUDA (one event per GPU thread) *** #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) - const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) - // NB: channelIds_sv is a scalar in CUDA - channelId = channelIds_sv; - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) - } + unsigned int channelId = getChannelId( allChannelIds ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (for the single event processed in calculate_wavefunctions) @@ -1152,38 +1205,7 @@ namespace mg5amcCpu const int ievt00 = ipagV2 * neppV; // loop on one SIMD page (neppV events) at a time #endif #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) - const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 - uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) -#ifndef MGONGPU_CPPSIMD - // NB: channelIds_sv is a scalar in no-SIMD C++ - channelId = channelIds_sv; -#else - // NB: channelIds_sv is a vector in SIMD C++ - channelId = channelIds_sv[0]; // element[0] - for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] - { - assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId - } -#endif - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) -#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT - // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) - const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 - uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - for( int i = 0; i < neppV; ++i ) - { - assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector - } -#endif - } + unsigned int channelId = getChannelId( allChannelIds, ievt00 ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (jamp2[nParity][ncolor][neppV] for the SIMD vector - or the two SIMD vectors - of events processed in calculate_wavefunctions) @@ -1356,11 +1378,12 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( allChannelIds != nullptr ) // fix segfault #892 (not 'channelIds[0] != 0') { - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + const unsigned int channelId = getChannelId( allChannelIds, ievt0, false ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - MEs_sv *= numerators_sv / denominators_sv; + MEs_sv *= numerators_sv[channelId - 1] / denominators_sv; } #endif //for( int ieppV = 0; ieppV < neppV; ieppV++ ) diff --git a/epochX/cudacpp/gq_ttq.sa/SubProcesses/P1_Sigma_sm_gux_ttxux/CPPProcess.h b/epochX/cudacpp/gq_ttq.sa/SubProcesses/P1_Sigma_sm_gux_ttxux/CPPProcess.h index d658e0394e..d18eb18110 100644 --- a/epochX/cudacpp/gq_ttq.sa/SubProcesses/P1_Sigma_sm_gux_ttxux/CPPProcess.h +++ b/epochX/cudacpp/gq_ttq.sa/SubProcesses/P1_Sigma_sm_gux_ttxux/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gq_ttq.sa/SubProcesses/P1_Sigma_sm_gux_ttxux/processConfig.h b/epochX/cudacpp/gq_ttq.sa/SubProcesses/P1_Sigma_sm_gux_ttxux/processConfig.h new file mode 100644 index 0000000000..89823b9d1d --- /dev/null +++ b/epochX/cudacpp/gq_ttq.sa/SubProcesses/P1_Sigma_sm_gux_ttxux/processConfig.h @@ -0,0 +1,16 @@ +// Copyright (C) 2025 CERN and UCLouvain. +// Licensed under the GNU Lesser General Public License (version 3 or later). +// Created by: S. Roiser (May 2025) for the MG5aMC CUDACPP plugin. +// Further modified by: ... for the MG5aMC CUDACPP plugin. + + +#ifndef MG5_CONFIG_SIGMA_SM_GUX_TTXUX_H +#define MG5_CONFIG_SIGMA_SM_GUX_TTXUX_H 1 + +namespace processConfig { + + constexpr int ndiagrams = 5; + +} + +#endif // MG5_CONFIG_SIGMA_SM_GUX_TTXUX_H \ No newline at end of file diff --git a/epochX/cudacpp/gq_ttq.sa/src/HelAmps_sm.h b/epochX/cudacpp/gq_ttq.sa/src/HelAmps_sm.h index a304fc85c8..a7f18284b4 100644 --- a/epochX/cudacpp/gq_ttq.sa/src/HelAmps_sm.h +++ b/epochX/cudacpp/gq_ttq.sa/src/HelAmps_sm.h @@ -8,7 +8,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gq_ttq.sa/src/Parameters_sm.cc b/epochX/cudacpp/gq_ttq.sa/src/Parameters_sm.cc index 998cb505a0..5f2def274e 100644 --- a/epochX/cudacpp/gq_ttq.sa/src/Parameters_sm.cc +++ b/epochX/cudacpp/gq_ttq.sa/src/Parameters_sm.cc @@ -7,7 +7,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gq_ttq.sa/src/Parameters_sm.h b/epochX/cudacpp/gq_ttq.sa/src/Parameters_sm.h index 1565ed5888..d2a4a36268 100644 --- a/epochX/cudacpp/gq_ttq.sa/src/Parameters_sm.h +++ b/epochX/cudacpp/gq_ttq.sa/src/Parameters_sm.h @@ -7,7 +7,7 @@ // Further modified by: A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/heft_gg_bb.mad/CODEGEN_mad_heft_gg_bb_log.txt b/epochX/cudacpp/heft_gg_bb.mad/CODEGEN_mad_heft_gg_bb_log.txt index c46ef95a65..4e2a1052c6 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/CODEGEN_mad_heft_gg_bb_log.txt +++ b/epochX/cudacpp/heft_gg_bb.mad/CODEGEN_mad_heft_gg_bb_log.txt @@ -1,8 +1,11 @@ +WARNING:root:python3.12 support is still experimental. For the moment re-weighting is NOT working and do expect a LOT of syntax warning. We do not advise python3.12 for production for the moment. +Running MG5 in debug mode +Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT +Plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT has marked as NOT being validated with this version: 3.6.2. +It has been validated for the last time with version: 3.6.0 Note that this is a development version. This version is intended for development/beta testing and NOT for production. This version has not been fully tested (if at all) and might have limited user support (if at all) -Running MG5 in debug mode -Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT ************************************************************ * * * W E L C O M E to * @@ -15,7 +18,7 @@ Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT * * * * * * * * * * * * -* VERSION 3.6.0 2024-09-30 * +* VERSION 3.6.2 2025-03-19 * * * * WARNING: UNKNOWN DEVELOPMENT VERSION. * * WARNING: DO NOT USE FOR PRODUCTION * @@ -46,17 +49,16 @@ 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/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb.mg +import /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb.mg The import format was not given, so we guess it as command set stdout_level DEBUG set output information to level: 10 set zerowidth_tchannel F set auto_convert_model T save options auto_convert_model -save configuration file to /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +save configuration file to /shared/roiser/sw/madgraph4gpu/MG5aMC/mg5amcnlo/input/mg5_configuration.txt import model heft INFO: Restrict model heft with file models/heft/restrict_default.dat . DEBUG: Simplifying conditional expressions  @@ -128,16 +130,16 @@ Total: 1 processes with 4 diagrams output madevent_simd ../TMPOUT/CODEGEN_mad_heft_gg_bb --hel_recycling=False --vector_size=32 Output will be done with PLUGIN: CUDACPP_OUTPUT Addition matrix-element will be done with PLUGIN: CUDACPP_OUTPUT -DEBUG: opt['output_options']['vector_size'] =  32 [export_v4.py at line 4334]  +DEBUG: opt['output_options']['vector_size'] =  32 [export_v4.py at line 4166]  Output will be done with PLUGIN: CUDACPP_OUTPUT DEBUG: Entering PLUGIN_ProcessExporter.__init__ (initialise the exporter) [output.py at line 171]  INFO: initialize a new directory: CODEGEN_mad_heft_gg_bb INFO: remove old information in CODEGEN_mad_heft_gg_bb DEBUG: Entering PLUGIN_ProcessExporter.copy_template (initialise the directory) [output.py at line 176]  -WARNING: File exists /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb  -INFO: Creating subdirectories in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb -WARNING: File exists /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb/Cards  -WARNING: File exists /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb/SubProcesses  +WARNING: File exists /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb  +INFO: Creating subdirectories in directory /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb +WARNING: File exists /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb/Cards  +WARNING: File exists /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb/SubProcesses  INFO: Organizing processes into subprocess groups INFO: Generating Helas calls for process: g g > b b~ HIG<=1 HIW<=1 @1 INFO: Processing color information for process: g g > b b~ HIG<=1 HIW<=1 @1 @@ -149,60 +151,62 @@ FileWriter b b~ HIG<=1 HIW<=1 @1 INFO: Finding symmetric diagrams for subprocess group gg_bbx -DEBUG: len(subproc_diagrams_for_config) =  4 [model_handling.py at line 1527]  -DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3, 4: 4} [model_handling.py at line 1551]  -DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3, 4: 4} [model_handling.py at line 1552]  -Generated helas calls for 1 subprocesses (4 diagrams) in 0.009 s -Wrote files for 12 helas calls in 0.076 s +DEBUG: len(subproc_diagrams_for_config) =  4 [model_handling.py at line 1538]  +DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3, 4: 4} [model_handling.py at line 1562]  +DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3, 4: 4} [model_handling.py at line 1563]  +Generated helas calls for 1 subprocesses (4 diagrams) in 0.005 s +Wrote files for 12 helas calls in 1.315 s ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates VVS3 routines ALOHA: aloha creates VVV1 set of routines with options: P0 ALOHA: aloha creates FFV1 routines ALOHA: aloha creates FFS2 routines -ALOHA: aloha creates 4 routines in 0.266 s +ALOHA: aloha creates 4 routines in 0.149 s ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates VVS3 routines ALOHA: aloha creates VVV1 set of routines with options: P0 ALOHA: aloha creates FFV1 routines ALOHA: aloha creates FFS2 routines -ALOHA: aloha creates 8 routines in 0.250 s +ALOHA: aloha creates 8 routines in 0.109 s VVS3 VVV1 FFV1 FFV1 FFV1 FFS2 -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb/src/./HelAmps_heft.h -INFO: Created file HelAmps_heft.h in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb/src/. +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb/src/./HelAmps_heft.h +INFO: Created file HelAmps_heft.h in directory /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb/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_heft_gg_bb/src/./Parameters_heft.h -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb/src/./Parameters_heft.cc +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb/src/./Parameters_heft.h +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb/src/./Parameters_heft.cc INFO: Created files Parameters_heft.h and Parameters_heft.cc in directory -INFO: /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb/src/. and /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb/src/. +INFO: /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb/src/. and /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb/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_heft_gg_bb/Cards/me5_configuration.txt +save configuration file to /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb/Cards/me5_configuration.txt INFO: Use Fortran compiler gfortran INFO: Use c++ compiler g++ INFO: Generate jpeg diagrams INFO: Generate web pages -DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb; patch -p4 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common +DEBUG: cd /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb; patch -p4 -i /shared/roiser/sw/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common patching file SubProcesses/makefile -DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb/SubProcesses/P1_gg_bbx; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +DEBUG: cd /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb/SubProcesses/P1_gg_bbx; patch -p6 -i /shared/roiser/sw/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file driver.f patching file matrix1.f DEBUG: p.returncode =  0 [output.py at line 263]  -Output to directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb done. +Output to directory /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb done. Type "launch" to generate events from this process, or see -/data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb/README +/shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb/README Run "open index.html" to see more information about this process. quit -real 0m2.141s -user 0m1.860s -sys 0m0.270s -Code generation completed in 2 seconds +real 0m6.533s +user 0m1.288s +sys 0m0.697s +Code generation completed in 7 seconds +/shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb/bin/internal/banner.py:3309: SyntaxWarning: invalid escape sequence '\s' + function_pat = re.compile('^\s+(?:SUBROUTINE|(?:%(type)s)\s+function)\s+([a-zA-Z]\w*)' \ ************************************************************ * * * W E L C O M E to * @@ -215,7 +219,7 @@ Code generation completed in 2 seconds * * * * * * * * * * * * -* VERSION 3.6.0 * +* VERSION 3.6.2 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -223,10 +227,9 @@ Code generation completed in 2 seconds * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb/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_heft_gg_bb/Cards/me5_configuration.txt -Using default text editor "vi". Set another one in ./input/mg5_configuration.txt +INFO: load configuration from /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb/Cards/me5_configuration.txt +INFO: load configuration from /shared/roiser/sw/madgraph4gpu/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb/Cards/me5_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 @@ -245,7 +248,7 @@ launch in debug mode * * * * * * * * * * * * -* VERSION 3.6.0 * +* VERSION 3.6.2 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -253,10 +256,9 @@ launch in debug mode * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb/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_heft_gg_bb/Cards/me5_configuration.txt -Using default text editor "vi". Set another one in ./input/mg5_configuration.txt +INFO: load configuration from /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb/Cards/me5_configuration.txt +INFO: load configuration from /shared/roiser/sw/madgraph4gpu/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_heft_gg_bb/Cards/me5_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/heft_gg_bb.mad/Cards/me5_configuration.txt b/epochX/cudacpp/heft_gg_bb.mad/Cards/me5_configuration.txt index 68b4c46295..a0212bfb62 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/Cards/me5_configuration.txt +++ b/epochX/cudacpp/heft_gg_bb.mad/Cards/me5_configuration.txt @@ -235,7 +235,7 @@ # pineappl = pineappl -#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo +#mg5_path = /shared/roiser/sw/madgraph4gpu/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo +#mg5_path = /shared/roiser/sw/madgraph4gpu/MG5aMC/mg5amcnlo diff --git a/epochX/cudacpp/heft_gg_bb.mad/Cards/proc_card_mg5.dat b/epochX/cudacpp/heft_gg_bb.mad/Cards/proc_card_mg5.dat index 92581deeee..5cc845819b 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/Cards/proc_card_mg5.dat +++ b/epochX/cudacpp/heft_gg_bb.mad/Cards/proc_card_mg5.dat @@ -8,7 +8,7 @@ #* * * * #* * #* * -#* VERSION 3.6.0 2024-09-30 * +#* VERSION 3.6.2 2025-03-19 * #* * #* WARNING: UNKNOWN DEVELOPMENT VERSION. * #* WARNING: DO NOT USE FOR PRODUCTION * diff --git a/epochX/cudacpp/heft_gg_bb.mad/Cards/run_card.dat b/epochX/cudacpp/heft_gg_bb.mad/Cards/run_card.dat index 8af20dc4e4..3802880982 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/Cards/run_card.dat +++ b/epochX/cudacpp/heft_gg_bb.mad/Cards/run_card.dat @@ -107,6 +107,7 @@ # Parton level cuts definition * #******************************* 0.0 = dsqrt_shat ! minimal shat for full process + -1 = dsqrt_shatmax ! maximum shat for full process # # #********************************************************************* diff --git a/epochX/cudacpp/heft_gg_bb.mad/Cards/run_card_default.dat b/epochX/cudacpp/heft_gg_bb.mad/Cards/run_card_default.dat index 0815703ee4..6917ce597f 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/Cards/run_card_default.dat +++ b/epochX/cudacpp/heft_gg_bb.mad/Cards/run_card_default.dat @@ -107,6 +107,7 @@ # Parton level cuts definition * #******************************* 0.0 = dsqrt_shat ! minimal shat for full process + -1 = dsqrt_shatmax ! maximum shat for full process # # #********************************************************************* diff --git a/epochX/cudacpp/heft_gg_bb.mad/MGMEVersion.txt b/epochX/cudacpp/heft_gg_bb.mad/MGMEVersion.txt index 084e244cea..77a069e39b 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/MGMEVersion.txt +++ b/epochX/cudacpp/heft_gg_bb.mad/MGMEVersion.txt @@ -1 +1 @@ -3.6.0 \ No newline at end of file +3.6.2 \ No newline at end of file diff --git a/epochX/cudacpp/heft_gg_bb.mad/Source/alfas_functions.f b/epochX/cudacpp/heft_gg_bb.mad/Source/alfas_functions.f index bb69a6384e..84aeff369c 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/Source/alfas_functions.f +++ b/epochX/cudacpp/heft_gg_bb.mad/Source/alfas_functions.f @@ -188,6 +188,10 @@ SUBROUTINE NEWTON1(T,A_IN,A_OUT,NLOOP,NF) A_OUT=A_IN/(1D0+A_IN*B0(NF)*T) IF (NLOOP .EQ. 1) RETURN + if (1D0+A_IN*B0(NF)*T.le.0d0)THEN + A_OUT = 9d98 + RETURN + ENDIF A_OUT=A_IN/(1D0+B0(NF)*A_IN*T+C1(NF)*A_IN*LOG(1D0+A_IN*B0(NF)*T)) IF (A_OUT .LT. 0D0) AS=0.3D0 30 AS=A_OUT diff --git a/epochX/cudacpp/heft_gg_bb.mad/Source/cuts.inc b/epochX/cudacpp/heft_gg_bb.mad/Source/cuts.inc index 23d099e5f7..a8ccc7420d 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/Source/cuts.inc +++ b/epochX/cudacpp/heft_gg_bb.mad/Source/cuts.inc @@ -37,7 +37,7 @@ C REAL*8 misset,missetmax,ptheavy REAL*8 ptllmin,ptllmax integer maxjetflavor - REAl*8 dsqrt_shat + REAl*8 dsqrt_shat,dsqrt_shatmax COMMON /to_min_max_cuts/ & PTJmax,PTBmax,PTAmax,PTLmax, @@ -60,7 +60,7 @@ C & ht2max,ht3max,ht4max, & htjmin,htjmax,ihtmin,ihtmax, & misset,missetmax,ptheavy, - & ptllmin,ptllmax,dsqrt_shat, + & ptllmin,ptllmax,dsqrt_shat,dsqrt_shatmax, & maxjetflavor C diff --git a/epochX/cudacpp/heft_gg_bb.mad/Source/make_opts b/epochX/cudacpp/heft_gg_bb.mad/Source/make_opts index e4b87ee6ad..f9f7b64bb5 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/Source/make_opts +++ b/epochX/cudacpp/heft_gg_bb.mad/Source/make_opts @@ -5,8 +5,8 @@ GLOBAL_FLAG=-O3 -ffast-math -fbounds-check MACFLAG= MG5AMC_VERSION=SpecifiedByMG5aMCAtRunTime PYTHIA8_PATH=NotInstalled -STDLIB_FLAG= STDLIB=-lstdc++ +STDLIB_FLAG= #end_of_make_opts_variables BIASLIBDIR=../../../lib/ diff --git a/epochX/cudacpp/heft_gg_bb.mad/Source/makefile b/epochX/cudacpp/heft_gg_bb.mad/Source/makefile index 291ca907ee..f9321e7a94 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/Source/makefile +++ b/epochX/cudacpp/heft_gg_bb.mad/Source/makefile @@ -73,6 +73,7 @@ $(BINDIR)gensudgrid: $(GENSUDGRID) $(LIBDIR)libpdf.$(libext) $(LIBDIR)libgammaUP # Dependencies dsample.o: DiscreteSampler.o dsample.f genps.inc StringCast.o vector.inc +pawgraph.o: vector.inc DiscreteSampler.o: StringCast.o invarients.o: invarients.f genps.inc gen_ximprove.o: gen_ximprove.f run_config.inc run_card.inc diff --git a/epochX/cudacpp/heft_gg_bb.mad/Source/run_card.inc b/epochX/cudacpp/heft_gg_bb.mad/Source/run_card.inc index 1a1bc782bd..8bd5f73840 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/Source/run_card.inc +++ b/epochX/cudacpp/heft_gg_bb.mad/Source/run_card.inc @@ -88,6 +88,8 @@ DSQRT_SHAT = 0.000000000000000D+00 + DSQRT_SHATMAX = -1 + LIMHEL = 0.000000000000000D+00 PTJ = 2.000000000000000D+01 diff --git a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/Bridge.h b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/Bridge.h index 87aa648dd2..49b928db67 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/Bridge.h +++ b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/Bridge.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: S. Roiser (Nov 2021) for the MG5aMC CUDACPP plugin. -// Further modified by: S. Roiser, J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2021-2025) for the MG5aMC CUDACPP plugin. #ifndef BRIDGE_H #define BRIDGE_H 1 @@ -255,11 +255,15 @@ namespace mg5amcCpu throw std::logic_error( "Bridge constructor: FIXME! cannot choose gputhreads" ); // this should never happen! m_gpublocks = m_nevt / m_gputhreads; } +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Instantiate device Bridge (nevt=" << m_nevt << ", gpublocks=" << m_gpublocks << ", gputhreads=" << m_gputhreads << ", gpublocks*gputhreads=" << m_gpublocks * m_gputhreads << ")" << std::endl; +#endif m_pmek.reset( new MatrixElementKernelDevice( m_devMomentaC, m_devGs, m_devRndHel, m_devRndCol, m_devChannelIds, m_devMEs, m_devSelHel, m_devSelCol, m_gpublocks, m_gputhreads ) ); #else +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Instantiate host Bridge (nevt=" << m_nevt << ")" << std::endl; +#endif m_pmek.reset( new MatrixElementKernelHost( m_hstMomentaC, m_hstGs, m_hstRndHel, m_hstRndCol, m_hstChannelIds, m_hstMEs, m_hstSelHel, m_hstSelCol, m_nevt ) ); #endif // MGONGPUCPP_GPUIMPL // Create a process object, read param card and set parameters @@ -290,8 +294,10 @@ namespace mg5amcCpu throw std::runtime_error( "Bridge: gpublocks*gputhreads must equal m_nevt in set_gpugrid" ); m_gpublocks = gpublocks; m_gputhreads = gputhreads; +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Set grid in Bridge (nevt=" << m_nevt << ", gpublocks=" << m_gpublocks << ", gputhreads=" << m_gputhreads << ", gpublocks*gputhreads=" << m_gpublocks * m_gputhreads << ")" << std::endl; +#endif m_pmek->setGrid( m_gpublocks, m_gputhreads ); } #endif @@ -347,7 +353,9 @@ namespace mg5amcCpu if( goodHelOnly ) return; m_pmek->computeMatrixElements( useChannelIds ); copyHostFromDevice( m_hstMEs, m_devMEs ); +#ifdef MGONGPUCPP_VERBOSE flagAbnormalMEs( m_hstMEs.data(), m_nevt ); +#endif copyHostFromDevice( m_hstSelHel, m_devSelHel ); copyHostFromDevice( m_hstSelCol, m_devSelCol ); if constexpr( std::is_same_v ) @@ -400,7 +408,9 @@ namespace mg5amcCpu } if( goodHelOnly ) return; m_pmek->computeMatrixElements( useChannelIds ); +#ifdef MGONGPUCPP_VERBOSE flagAbnormalMEs( m_hstMEs.data(), m_nevt ); +#endif if constexpr( std::is_same_v ) { memcpy( mes, m_hstMEs.data(), m_hstMEs.bytes() ); diff --git a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/GpuRuntime.h b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/GpuRuntime.h index 860c7fde16..6a4b946e74 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/GpuRuntime.h +++ b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/GpuRuntime.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: J. Teig (Jun 2023, based on earlier work by S. Roiser) for the MG5aMC CUDACPP plugin. -// Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2025) for the MG5aMC CUDACPP plugin. #ifndef MG5AMC_GPURUNTIME_H #define MG5AMC_GPURUNTIME_H 1 @@ -50,7 +50,7 @@ namespace mg5amcGpu // Set up CUDA application // ** NB: strictly speaking this is not needed when using the CUDA runtime API ** // Calling cudaSetDevice on startup is useful to properly book-keep the time spent in CUDA initialization - static void setUp( const bool debug = true ) + static void setUp( const bool debug = false ) // ZW: changed debug default to false { // ** NB: it is useful to call cudaSetDevice, or cudaFree, to properly book-keep the time spent in CUDA initialization // ** NB: otherwise, the first CUDA operation (eg a cudaMemcpyToSymbol in CPPProcess ctor) appears to take much longer! @@ -71,7 +71,7 @@ namespace mg5amcGpu // ** NB: strictly speaking this is not needed when using the CUDA runtime API ** // Calling cudaDeviceReset on shutdown is only needed for checking memory leaks in cuda-memcheck // See https://docs.nvidia.com/cuda/cuda-memcheck/index.html#leak-checking - static void tearDown( const bool debug = true ) + static void tearDown( const bool debug = false ) // ZW: changed debug default to false { if( debug ) std::cout << "__GpuRuntime: calling GpuDeviceReset()" << std::endl; checkGpu( gpuDeviceReset() ); diff --git a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/MGVersion.txt b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/MGVersion.txt index 084e244cea..77a069e39b 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/MGVersion.txt +++ b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/MGVersion.txt @@ -1 +1 @@ -3.6.0 \ No newline at end of file +3.6.2 \ No newline at end of file diff --git a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/MatrixElementKernels.cc b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/MatrixElementKernels.cc index f463977c1a..703ea3781c 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/MatrixElementKernels.cc +++ b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/MatrixElementKernels.cc @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: A. Valassi (Jan 2022) for the MG5aMC CUDACPP plugin. -// Further modified by: J. Teig, A. Valassi (2022-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: J. Teig, A. Valassi, Z. Wettersten (2022-2025) for the MG5aMC CUDACPP plugin. #include "MatrixElementKernels.h" @@ -60,7 +60,9 @@ namespace mg5amcCpu #ifdef MGONGPU_CHANNELID_DEBUG MatrixElementKernelBase::dumpNevtProcessedByChannel(); #endif +#ifdef MGONGPUCPP_VERBOSE MatrixElementKernelBase::dumpSignallingFPEs(); +#endif } //-------------------------------------------------------------------------- diff --git a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/MatrixElementKernels.h b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/MatrixElementKernels.h index 7acff4b308..8da04d7945 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/MatrixElementKernels.h +++ b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/MatrixElementKernels.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: A. Valassi (Jan 2022) for the MG5aMC CUDACPP plugin. -// Further modified by: J. Teig, A. Valassi (2022-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: J. Teig, A. Valassi, Z. Wettersten (2022-2025) for the MG5aMC CUDACPP plugin. #ifndef MATRIXELEMENTKERNELS_H #define MATRIXELEMENTKERNELS_H 1 @@ -134,7 +134,7 @@ namespace mg5amcCpu // Does this host system support the SIMD used in the matrix element calculation? // [NB: this is private, SIMD vectorization in mg5amc C++ code is currently only used in the ME calculations below MatrixElementKernelHost!] - static bool hostSupportsSIMD( const bool verbose = true ); + static bool hostSupportsSIMD( const bool verbose = false ); // ZW: default verbose false private: diff --git a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/MemoryAccessGs.h b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/MemoryAccessGs.h index 63c17a68fa..50a6aaef4d 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/MemoryAccessGs.h +++ b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/MemoryAccessGs.h @@ -128,6 +128,14 @@ namespace mg5amcCpu #endif } + // Locate a field (output) in a memory buffer (input) from a kernel event-indexing mechanism (internal) + // [Signature (SCALAR OR VECTOR) ===> fptype_sv* kernelAccess( fptype* buffer ) <===] + static __host__ __device__ inline fptype_sv* + kernelAccessP( fptype* buffer ) + { + return reinterpret_cast( buffer ); + } + // Locate a field (output) in a memory buffer (input) from a kernel event-indexing mechanism (internal) and the given field indexes (input) // [Signature (const, SCALAR) ===> const fptype& kernelAccessConst( const fptype* buffer ) <===] static constexpr auto kernelAccessConst_s = diff --git a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/MemoryBuffers.h b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/MemoryBuffers.h index 90075da66e..429fac84eb 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/MemoryBuffers.h +++ b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/MemoryBuffers.h @@ -13,6 +13,7 @@ #include "CPPProcess.h" #include "GpuRuntime.h" #include "Parameters_heft.h" +#include "processConfig.h" #include @@ -274,7 +275,8 @@ namespace mg5amcCpu typedef BufferBase BufferNumerators; // The size (number of elements) per event in a memory buffer for numerators - constexpr size_t sizePerEventNumerators = 1; + // (should be equal to the number of diagrams in the process) + constexpr size_t sizePerEventNumerators = processConfig::ndiagrams; #ifndef MGONGPUCPP_GPUIMPL // A class encapsulating a C++ host buffer for gs diff --git a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/P1_gg_bbx/CPPProcess.cc b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/P1_gg_bbx/CPPProcess.cc index 5d6a4e1f06..12a95b6dbc 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/P1_gg_bbx/CPPProcess.cc +++ b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/P1_gg_bbx/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -25,6 +25,7 @@ #include "MemoryAccessMatrixElements.h" #include "MemoryAccessMomenta.h" #include "MemoryAccessWavefunctions.h" +#include "processConfig.h" #ifdef MGONGPU_SUPPORTS_MULTICHANNEL #include "MemoryAccessDenominators.h" @@ -96,6 +97,69 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { +#ifdef MGONGPU_SUPPORTS_MULTICHANNEL + __device__ INLINE unsigned int getChannelId( const unsigned int* allChannelIds +#ifndef MGONGPUCPP_GPUIMPL + , + const int ievt00, + bool sanityCheckMixedPrecision = true +#endif + ) + { + unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr +#ifdef MGONGPUCPP_GPUIMPL + using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page + if( allChannelIds != nullptr ) + { + const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) + const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) + // NB: channelIds_sv is a scalar in CUDA + channelId = channelIds_sv; + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + } +#else // Cuda or C++ + using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + if( allChannelIds != nullptr ) + { + // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) + const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 + uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) +#ifndef MGONGPU_CPPSIMD + // NB: channelIds_sv is a scalar in no-SIMD C++ + channelId = channelIds_sv; +#else + // NB: channelIds_sv is a vector in SIMD C++ + channelId = channelIds_sv[0]; // element[0] + for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] + { + assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId + } +#endif + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + if( sanityCheckMixedPrecision ) + { +#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT + // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) + const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 + uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + for( int i = 0; i < neppV; ++i ) + { + assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector + } +#endif + } + } +#endif // MGONGPUCPP_GPUIMPL + return channelId; + } +#endif // MGONGPU_SUPPORTS_MULTICHANNEL + constexpr int nw6 = CPPProcess::nw6; // dimensions of each wavefunction (HELAS KEK 91-11): e.g. 6 for e+ e- -> mu+ mu- (fermions and vectors) constexpr int npar = CPPProcess::npar; // #particles in total (external = initial + final): e.g. 4 for e+ e- -> mu+ mu- constexpr int ncomb = CPPProcess::ncomb; // #helicity combinations: e.g. 16 for e+ e- -> mu+ mu- (2**4 = fermion spin up/down ** npar) @@ -305,7 +369,7 @@ namespace mg5amcCpu COUPs[ndcoup + iicoup] = allCOUPs[ndcoup + iicoup]; // independent couplings, fixed for all events fptype* MEs = E_ACCESS::ieventAccessRecord( allMEs, ievt0 ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); #endif #endif @@ -315,7 +379,7 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Numerators and denominators for the current event (CUDA) or SIMD event page (C++) - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); #endif @@ -335,8 +399,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1 FFS2_0( w_fp[3], w_fp[2], w_fp[4], COUPs[ndcoup + 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] ); + if( channelId != 0 ) + { + numerators_sv[0] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] -= 2. * amp_sv[0]; @@ -348,8 +415,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 2 FFV1_0( w_fp[3], w_fp[2], w_fp[4], 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] ); + if( channelId != 0 ) + { + numerators_sv[1] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[1] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -362,8 +432,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 3 FFV1_0( w_fp[3], w_fp[4], w_fp[1], COUPs[2], 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] ); + if( channelId != 0 ) + { + numerators_sv[2] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= amp_sv[0]; @@ -375,8 +448,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 4 FFV1_0( w_fp[4], w_fp[2], w_fp[1], COUPs[2], 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] ); + if( channelId != 0 ) + { + numerators_sv[3] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] -= amp_sv[0]; @@ -569,7 +645,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- @@ -938,9 +1016,6 @@ namespace mg5amcCpu #ifdef MGONGPUCPP_GPUIMPL // Remember: in CUDA this is a kernel for one event, in c++ this processes n events const int ievt = blockDim.x * blockIdx.x + threadIdx.x; // index of event (thread) in grid -#ifdef MGONGPU_SUPPORTS_MULTICHANNEL - using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events -#endif #else //assert( (size_t)(allmomenta) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] //assert( (size_t)(allMEs) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] @@ -948,7 +1023,6 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL using NUM_ACCESS = HostAccessNumerators; // non-trivial access: buffer includes all events using DEN_ACCESS = HostAccessDenominators; // non-trivial access: buffer includes all events - using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events #endif #endif @@ -973,11 +1047,12 @@ namespace mg5amcCpu fptype_sv& MEs_sv = E_ACCESS::kernelAccess( MEs ); MEs_sv = fptype_sv{ 0 }; #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - numerators_sv = fptype_sv{ 0 }; + for( int i = 0; i < processConfig::ndiagrams; ++i ) + numerators_sv[i] = fptype_sv{ 0 }; denominators_sv = fptype_sv{ 0 }; #endif } @@ -990,17 +1065,7 @@ namespace mg5amcCpu // *** START OF PART 1a - CUDA (one event per GPU thread) *** #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) - const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) - // NB: channelIds_sv is a scalar in CUDA - channelId = channelIds_sv; - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) - } + unsigned int channelId = getChannelId( allChannelIds ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (for the single event processed in calculate_wavefunctions) @@ -1115,38 +1180,7 @@ namespace mg5amcCpu const int ievt00 = ipagV2 * neppV; // loop on one SIMD page (neppV events) at a time #endif #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) - const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 - uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) -#ifndef MGONGPU_CPPSIMD - // NB: channelIds_sv is a scalar in no-SIMD C++ - channelId = channelIds_sv; -#else - // NB: channelIds_sv is a vector in SIMD C++ - channelId = channelIds_sv[0]; // element[0] - for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] - { - assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId - } -#endif - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) -#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT - // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) - const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 - uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - for( int i = 0; i < neppV; ++i ) - { - assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector - } -#endif - } + unsigned int channelId = getChannelId( allChannelIds, ievt00 ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (jamp2[nParity][ncolor][neppV] for the SIMD vector - or the two SIMD vectors - of events processed in calculate_wavefunctions) @@ -1319,11 +1353,12 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( allChannelIds != nullptr ) // fix segfault #892 (not 'channelIds[0] != 0') { - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + const unsigned int channelId = getChannelId( allChannelIds, ievt0, false ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - MEs_sv *= numerators_sv / denominators_sv; + MEs_sv *= numerators_sv[channelId - 1] / denominators_sv; } #endif //for( int ieppV = 0; ieppV < neppV; ieppV++ ) diff --git a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/P1_gg_bbx/CPPProcess.h b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/P1_gg_bbx/CPPProcess.h index 30c5663297..ecaebc93d2 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/P1_gg_bbx/CPPProcess.h +++ b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/P1_gg_bbx/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/P1_gg_bbx/auto_dsig.f b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/P1_gg_bbx/auto_dsig.f index 0b39d55964..f6c184008c 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/P1_gg_bbx/auto_dsig.f +++ b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/P1_gg_bbx/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C diff --git a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/P1_gg_bbx/auto_dsig1.f b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/P1_gg_bbx/auto_dsig1.f index c57e06d578..ff3bb04846 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/P1_gg_bbx/auto_dsig1.f +++ b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/P1_gg_bbx/auto_dsig1.f @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -137,14 +137,14 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDDO QSCALE=QSCALE/2D0 ELSE - QSCALE=DSQRT(Q2FACT(IB(1))) + QSCALE=DSQRT(Q2FACT(1)) ENDIF G1=PDG2PDF(LPP(IB(1)),0, IB(1),XBK(IB(1)), QSCALE) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) IF (DSQRT(Q2FACT(IB(2))).NE.0D0) THEN - QSCALE=DSQRT(Q2FACT(IB(2))) + QSCALE=DSQRT(Q2FACT(2)) ENDIF G2=PDG2PDF(LPP(IB(2)),0, IB(2),XBK(IB(2)), QSCALE) ENDIF @@ -219,7 +219,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -290,6 +290,10 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, INTEGER I_EE C +C STUFF FOR UPC +C + DOUBLE PRECISION PHOTONPDFSQUARE +C C EXTERNAL FUNCTIONS C LOGICAL PASSCUTS @@ -373,12 +377,12 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, IF (ABS(LPP(IB(1))).GE.1) THEN C LP=SIGN(1,LPP(IB(1))) G1(IVEC)=PDG2PDF(LPP(IB(1)),0, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) G2(IVEC)=PDG2PDF(LPP(IB(2)),0, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) ENDIF ENDDO ! IWARP LOOP ENDDO ! CURRWARP LOOP diff --git a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/P1_gg_bbx/card.png b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/P1_gg_bbx/card.png new file mode 100644 index 0000000000..80d085eec6 Binary files /dev/null and b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/P1_gg_bbx/card.png differ diff --git a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/P1_gg_bbx/matrix1.f b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/P1_gg_bbx/matrix1.f index 598338d03e..ac4f9e7a76 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/P1_gg_bbx/matrix1.f +++ b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/P1_gg_bbx/matrix1.f @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -307,7 +307,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -350,7 +350,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C INTEGER I,J,M,N COMPLEX*16 ZTEMP, TMP_JAMP(0) - REAL*8 CF(NCOLOR,NCOLOR) + INTEGER CF(NCOLOR*(NCOLOR+1)/2) + INTEGER DENOM, CF_INDEX COMPLEX*16 AMP(NGRAPHS), JAMP(NCOLOR,NAMPSO) COMPLEX*16 W(6,NWAVEFUNCS) C Needed for v4 models @@ -393,14 +394,12 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C C COLOR DATA C - DATA (CF(I, 1),I= 1, 3) /5.333333333333333D+00, - $ -6.666666666666666D-01,2.000000000000000D+00/ + DATA DENOM/3/ + DATA (CF(I),I= 1, 3) /16,-4,12/ C 1 T(1,2,3,4) - DATA (CF(I, 2),I= 1, 3) /-6.666666666666666D-01 - $ ,5.333333333333333D+00,2.000000000000000D+00/ + DATA (CF(I),I= 4, 5) /16,12/ C 1 T(2,1,3,4) - DATA (CF(I, 3),I= 1, 3) /2.000000000000000D+00 - $ ,2.000000000000000D+00,6.000000000000000D+00/ + DATA (CF(I),I= 6, 6) /18/ C 1 T(3,4) Tr(1,2) C ---------- C BEGIN CODE @@ -455,10 +454,12 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) MATRIX1 = 0.D0 DO M = 1, NAMPSO + CF_INDEX = 0 DO I = 1, NCOLOR ZTEMP = (0.D0,0.D0) - DO J = 1, NCOLOR - ZTEMP = ZTEMP + CF(J,I)*JAMP(J,M) + DO J = I, NCOLOR + CF_INDEX = CF_INDEX + 1 + ZTEMP = ZTEMP + CF(CF_INDEX)*JAMP(J,M) ENDDO DO N = 1, NAMPSO @@ -467,6 +468,7 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) ENDDO ENDDO ENDDO + MATRIX1 = MATRIX1/DENOM IF(SDE_STRAT.EQ.1)THEN AMP2(1)=AMP2(1)+AMP(1)*DCONJG(AMP(1)) diff --git a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/P1_gg_bbx/matrix11.png b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/P1_gg_bbx/matrix11.png new file mode 100644 index 0000000000..05c87c33cc Binary files /dev/null and b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/P1_gg_bbx/matrix11.png differ diff --git a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/P1_gg_bbx/processConfig.h b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/P1_gg_bbx/processConfig.h new file mode 100644 index 0000000000..f7dbd383b0 --- /dev/null +++ b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/P1_gg_bbx/processConfig.h @@ -0,0 +1,16 @@ +// Copyright (C) 2025 CERN and UCLouvain. +// Licensed under the GNU Lesser General Public License (version 3 or later). +// Created by: S. Roiser (May 2025) for the MG5aMC CUDACPP plugin. +// Further modified by: ... for the MG5aMC CUDACPP plugin. + + +#ifndef MG5_CONFIG_SIGMA_HEFT_GG_BBX_H +#define MG5_CONFIG_SIGMA_HEFT_GG_BBX_H 1 + +namespace processConfig { + + constexpr int ndiagrams = 4; + +} + +#endif // MG5_CONFIG_SIGMA_HEFT_GG_BBX_H \ No newline at end of file diff --git a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/cuts.f b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/cuts.f index 7898714201..bd50ab1357 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/cuts.f +++ b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/cuts.f @@ -307,12 +307,18 @@ LOGICAL FUNCTION PASSCUTS(P, VECSIZE_USED) c c Limit S_hat c - if (dsqrt_shat.ne.0d0)then - if (nincoming.eq.2.and.sumdot(p(0,1),p(0,2),1d0) .lt. dsqrt_shat**2) then - passcuts=.false. - return - endif - endif + if(nincoming.eq.2) then + if (dsqrt_shat.ne.0d0.or.dsqrt_shatmax.ne.-1d0)then + xvar = sumdot(p(0,1),p(0,2),1d0) + if (xvar .lt. dsqrt_shat**2)then + passcuts=.false. + return + else if (dsqrt_shatmax.ne.-1d0 .and. xvar .gt. dsqrt_shatmax**2)then + passcuts = .false. + return + endif + endif + endif C $B$ DESACTIVATE_CUT $E$ !This is a tag for MadWeight if(debug) write (*,*) '=============================' diff --git a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/genps.f b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/genps.f index 1c32e93f5d..8503bdbec8 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/genps.f +++ b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/genps.f @@ -1373,6 +1373,10 @@ subroutine gen_s(x,smin,smax,spole,swidth,s,jac,pass) double precision smin,smax,spole,swidth,s,jac double precision x logical pass + include 'maxparticles.inc' + include '../../Source/vector.inc' + include 'run.inc' + include 'cuts.inc' c c Local c @@ -1384,6 +1388,10 @@ subroutine gen_s(x,smin,smax,spole,swidth,s,jac,pass) c----- c Begin Code c----- + if (dsqrt_shatmax.ne.-1d0)then + smax = min(smax, dsqrt_shatmax**2) + endif + pass=.true. if (jac .eq. 0 .and. .not. warned0) then print*,'Input jacobian 0 in genps' @@ -1628,7 +1636,10 @@ SUBROUTINE GENCMS(S,X1,X2,X,SMIN,SJACOBI) DOUBLE PRECISION ETA,ETAMIN,ETAMAX logical warned data warned/.false./ - + include 'maxparticles.inc' + include '../../Source/vector.inc' + include 'run.inc' + include 'cuts.inc' C------------ C BEGIN CODE C------------ @@ -1645,7 +1656,11 @@ SUBROUTINE GENCMS(S,X1,X2,X,SMIN,SJACOBI) C IF THERE IS NO S CHANNEL POLE USE BELOW: TAUMIN = 0d0 !SMIN/S !keep scale fix - TAUMAX = 1D0 + if (dsqrt_shatmax.ne.-1d0)then + TAUMAX=dsqrt_shatmax**2/S + else + TAUMAX = 1D0 + endif TAU = (TAUMAX-TAUMIN)*X(1)+TAUMIN SJACOBI= sjacobi*(TAUMAX-TAUMIN) @@ -1915,7 +1930,7 @@ double precision function get_channel_cut(p, config) if(sde_strat.eq.2)then t = dot(ptemp(0,-i), ptemp(0,-i)) Mass = prmass(-i, config) - get_channel_cut = get_channel_cut / ((t-Mass)*(t+Mass)+stot*1d-10)**2 + get_channel_cut = get_channel_cut / (t-Mass**2+stot*1d-10)**2 endif c write(*,*) i, "t, Mass, fact", t, Mass, ((t-Mass)*(t+Mass))**2,get_channel_cut t = t/stot @@ -1930,9 +1945,9 @@ double precision function get_channel_cut(p, config) t = dot(ptemp(0,-i), ptemp(0,-i)) Mass = prmass(-i, config) Width = prwidth(-i, config) - tmp = (t-Mass)*(t+Mass) + tmp = (t-Mass**2) tmp2 = Mass*Width - get_channel_cut = get_channel_cut* (tmp**2 - tmp2**2)/(tmp**2 + tmp2**2)**2 + get_channel_cut = get_channel_cut/(tmp**2 + tmp2**2) endif c write(*,*) i, "s, Mass, Width, fact", t, Mass, Width, (((t-Mass)*(t+Mass) )**2 + Width**2*Mass**2), get_channel_cut endif diff --git a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/myamp.f b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/myamp.f index 9e5f8d44dd..5360566ef4 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/myamp.f +++ b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/myamp.f @@ -231,6 +231,7 @@ subroutine set_peaks double precision x1,x2,xk(nexternal) double precision dr,mtot,etot,xqfact double precision spmass + double precision stot ! technically the min with dsqrt_shatmax**2 with the physical one integer i, iconfig, l1, l2, j, nt, nbw, iproc, k integer iden_part(-nexternal+1:nexternal) @@ -285,8 +286,8 @@ subroutine set_peaks integer lbw(0:nexternal) !Use of B.W. common /to_BW/ lbw - double precision stot,m1,m2 - common/to_stot/stot,m1,m2 + double precision real_stot,m1,m2 + common/to_stot/real_stot,m1,m2 include 'coupl.inc' ! needs VECSIZE_MEMMAX (defined in vector.inc) include 'cuts.inc' @@ -309,6 +310,12 @@ subroutine set_peaks c----- c Begin Code c----- + if (dsqrt_shatmax.ne.-1)then + stot = min(real_stot, dsqrt_shatmax**2) + else + stot = real_stot + endif + iconfig = this_config c needs to be initialise to avoid segfault do i = -nexternal,-1 diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/Gridpack/gridrun b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/Gridpack/gridrun index 8c8f7d3940..01d4ab53f5 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/Gridpack/gridrun +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/Gridpack/gridrun @@ -91,7 +91,7 @@ import internal.madevent_interface as cmd_interface try: - cmd_line = cmd_interface.GridPackCmd(me_dir=root_path, nb_event=args[0], seed=args[1], gran=args[2]) + cmd_line = cmd_interface.GridPackCmd(me_dir=root_path, nb_event=args[0], seed=args[1], gran=args[2], nprocs=args[3], maxevts=args[4]) except KeyboardInterrupt: print('Quit on KeyboardInterrupt') diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/Gridpack/run.sh b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/Gridpack/run.sh index 20adf572c2..2d149f96be 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/Gridpack/run.sh +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/Gridpack/run.sh @@ -14,6 +14,18 @@ # USAGE : run [num_events] [iseed] ## ############################################################################# +function usage() { + local retcode="${1:-1}" # default return code is 1 + echo "Usage:" + echo " run.sh [options] [num events] [seed]" + echo " run.sh [options] [num events] [seed] [granularity]" + echo "Options:" + echo " -h, --help print this message and exit" + echo " -p, --parallel [num procs] number of processes to run in parallel" + echo " -m, --maxevts [num events] maximum number of unweighted events per job" + exit $retcode +} + if [[ -d ./madevent ]]; then DIR='./madevent' else @@ -32,23 +44,46 @@ export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${PWD}/madevent/lib:${PWD}/HELAS/lib # For Mac OS X export DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:${PWD}/madevent/lib:${PWD}/HELAS/lib +pos_args=() +nprocs=1 +maxevts=2500 -if [[ ($1 != "") && ("$2" != "") && ("$3" == "") ]]; then - num_events=$1 - seed=$2 - gran=1 -elif [[ ($1 != "") && ("$2" != "") && ("$3" != "") ]]; then - num_events=$1 - seed=$2 - gran=$3 -else - echo "Warning: input is not correct. script requires two arguments: NB_EVENT SEED" -fi +while [[ $# -gt 0 ]]; do + case $1 in + -h|--help) + usage 0 ;; + -p|--parallel) + nprocs="$2" && shift && shift ;; + -m|--maxevts) + maxevts="$2" && shift && shift ;; + -*) + echo "Error: Unknown option $1" && usage ;; + *) + pos_args+=("$1") && shift ;; + esac +done + +case `echo "${pos_args[@]}" | wc -w | tr -d " "` in + "2") + num_events=${pos_args[0]} + seed=${pos_args[1]} + gran=1 + ;; + "3") + num_events=${pos_args[0]} + seed=${pos_args[1]} + gran=${pos_args[2]} + ;; + *) + echo "Error: number of arguments is not correct" + usage + ;; +esac -echo "Now generating $num_events events with random seed $seed and granularity $gran" +echo "Now generating $num_events events with random seed $seed and granularity $gran using $nprocs processes" ############ RUN THE PYTHON CODE ##################### -${DIR}/bin/gridrun $num_events $seed $gran +${DIR}/bin/gridrun $num_events $seed $gran $nprocs $maxevts ######################################################## ########### POSTPROCESSING ##################### diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/banner.py b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/banner.py index 42d82818d0..022861fc31 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/banner.py +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/banner.py @@ -353,7 +353,7 @@ def modify_init_cross(self, cross, allow_zero=False): assert "init" in self cross = dict(cross) - for key in cross.keys(): + for key in list(cross.keys()): if isinstance(key, str) and key.isdigit() and int(key) not in cross: cross[int(key)] = cross[key] @@ -3318,7 +3318,6 @@ def retro_compatible_custom_fct(lines, mode=None): for i,line in enumerate(lines[:]): if search and re.search(include_pat, line): name = re.findall(include_pat, line)[0] - misc.sprint('DETECTED INCLUDE', name) if 'vector.inc' in name: search = False if 'run.inc' in name: @@ -3326,7 +3325,6 @@ def retro_compatible_custom_fct(lines, mode=None): search = False sol.append(line) if re.search(function_pat, line): - misc.sprint("DETECTED FCT") search = True return sol @@ -4201,6 +4199,7 @@ def default_setup(self): self.add_param("bwcutoff", 15.0) self.add_param("cut_decays", False, cut='d') self.add_param('dsqrt_shat',0., cut=True) + self.add_param('dsqrt_shatmax', -1, cut=True) self.add_param("nhel", 0, include=False) self.add_param("limhel", 1e-8, hidden=True, comment="threshold to determine if an helicity contributes when not MC over helicity.") #pt cut @@ -5577,6 +5576,9 @@ def default_setup(self): #technical self.add_param('folding', [1,1,1], include=False) + + #bias + self.add_param('flavour_bias',[5,1], hidden=True, comment="Example: '5,100' means that the probability to generate an event with a bottom (or anti-bottom) quark is increased by a factor 100, but the weight of those events is reduced by a factor 100. Requires that the 'event_norm' is set to 'bias'.") #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]") @@ -5790,6 +5792,17 @@ def check_validity(self): if self['mcatnlo_delta'] and not self['parton_shower'].lower() == 'pythia8': raise InvalidRunCard("MC@NLO-DELTA only possible with matching to Pythia8") + # check that the flavour_bias is consistent + if len(self['flavour_bias']) != 2: + raise InvalidRunCard("'flavour_bias' should contain exactly two numbers: the abs(PDG) of the flavour to enhance, and the enhancement multiplication factor.") + for i in self['flavour_bias']: + if i < 0: + raise InvalidRunCard("flavour and multiplication factor should be positive in the flavour_bias parameter") + if self['flavour_bias'][1] != 1 and self['event_norm'] != 'bias': + logger.warning('Non-trivial flavour enhancement factor: setting event normalisation to "bias"') + self['event_norm']='bias' + + # check that ebeam is bigger than the proton mass. for i in [1,2]: # do not for proton mass if not proton PDF (or when scan initialization) diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/check_param_card.py b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/check_param_card.py index bc785b5de6..a34705f6bc 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/check_param_card.py +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/check_param_card.py @@ -1092,11 +1092,11 @@ def write_summary(self, path, order=None, lastline=False, nbcol=20): to_print = self.cross[-1:] for info in to_print: name = info['run_name'] - bench = info['bench'] + bench = [float(x) for x in info['bench']] data = [] for k in keys: if k in info: - data.append(info[k]) + data.append(float(info[k])) else: data.append(0.) ff.write(formatting % tuple([name] + bench + data)) diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/common_run_interface.py b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/common_run_interface.py index 9ff7390cf5..541cd6294b 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/common_run_interface.py +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/common_run_interface.py @@ -750,8 +750,8 @@ def __init__(self, me_dir, options, *args, **opts): else: self.ninitial = self.proc_characteristics['ninitial'] - def make_make_all_html_results(self, folder_names = [], jobs=[]): - return sum_html.make_all_html_results(self, folder_names, jobs) + def make_make_all_html_results(self, folder_names = [], jobs=[], get_attr=None): + return sum_html.make_all_html_results(self, folder_names, jobs, get_attr) def write_RunWeb(self, me_dir): @@ -3831,7 +3831,7 @@ def store_scan_result(self): """return the information that need to be kept for the scan summary. Auto-width are automatically added.""" - return {'cross': self.results.current['cross']} + return {'cross': self.results.current['cross'], 'error': self.results.current['error']} def add_error_log_in_html(self, errortype=None): @@ -5135,10 +5135,10 @@ def init_run(self, cards): self.special_shortcut.update( {'ebeam':([float],['run_card ebeam1 %(0)s', 'run_card ebeam2 %(0)s']), 'lpp': ([int],['run_card lpp1 %(0)s', 'run_card lpp2 %(0)s' ]), - 'lhc': ([int],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), + 'lhc': ([float],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), 'lep': ([int],['run_card lpp1 0', 'run_card lpp2 0', 'run_card ebeam1 %(0)s/2', 'run_card ebeam2 %(0)s/2']), 'ilc': ([int],['run_card lpp1 0', 'run_card lpp2 0', 'run_card ebeam1 %(0)s/2', 'run_card ebeam2 %(0)s/2']), - 'lcc': ([int],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), + 'lcc': ([float],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), 'fixed_scale': ([float],['run_card fixed_fac_scale T', 'run_card fixed_ren_scale T', 'run_card scale %(0)s', 'run_card dsqrt_q2fact1 %(0)s' ,'run_card dsqrt_q2fact2 %(0)s']), 'no_parton_cut':([],['run_card nocut T']), 'cm_velocity':([float], [lambda self :self.set_CM_velocity]), @@ -6740,7 +6740,15 @@ def postcmd(self, stop, line): return ending_question - + def help_update(self): + logger.info(""" syntax: update dependent: Change the mass/width of particles which are not free parameter for the model. + update missing: add to the current param_card missing blocks/parameters. + update to_slha1: pass SLHA2 card to SLHA1 convention. (beta) + update to_slha2: pass SLHA1 card to SLHA2 convention. (beta) + update to_full [run_card] + update XXX [where XXX correspond to a hidden block of the run_card]: + supported block are %s + """, ', '.join(self.update_block)) def do_update(self, line, timer=0): @@ -6756,6 +6764,8 @@ def do_update(self, line, timer=0): logger.warning('miss an argument (dependent or missing). Please retry') return + args[0] = args[0].lower() + if args[0] == 'dependent': if not self.mother_interface: logger.warning('Failed to update dependent parameter. This might create trouble for external program (like MadSpin/shower/...)') @@ -6805,10 +6815,11 @@ def do_update(self, line, timer=0): self.modified_card.add('run') # delay writting of the run_card logger.info('add optional block %s to the run_card', args[0]) else: - self.help_update() + self.do_help('update') logger.warning('unvalid options for update command. Please retry') + def update_to_full(self, line): """ trigger via update to_full LINE""" diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/extended_cmd.py b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/extended_cmd.py index 789976beee..c321fd88e5 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/extended_cmd.py +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/extended_cmd.py @@ -1317,6 +1317,8 @@ def nice_error_handling(self, error, line): debug_file = open(self.debug_output, 'a') traceback.print_exc(file=debug_file) + if __debug__: + traceback.print_exc() if hasattr(error, 'filename'): debug_file.write("Related File: %s\n" % error.filename) # Create a nice error output @@ -1928,7 +1930,8 @@ def do_display(self, line, output=sys.stdout): for i, name in enumerate(split): try: __import__('.'.join(split[:i+1])) - exec('%s=sys.modules[\'%s\']' % (split[i], '.'.join(split[:i+1]))) + tmp = {} + exec('%s=sys.modules[\'%s\']' % (split[i], '.'.join(split[:i+1])), globals(),tmp) except ImportError: try: var = eval(args[1]) @@ -1939,7 +1942,7 @@ def do_display(self, line, output=sys.stdout): outstr += 'EXTERNAL:\n' outstr += misc.nice_representation(var, nb_space=4) else: - var = eval(args[1]) + var = eval(args[1], globals(), tmp) outstr += 'EXTERNAL:\n' outstr += misc.nice_representation(var, nb_space=4) diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/file_writers.py b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/file_writers.py index 526756129f..74ba0d195c 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/file_writers.py +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/file_writers.py @@ -140,10 +140,6 @@ def preprocess_template(self, input_lines, context={}): else: raise self.FileWriterError("%s not string" % repr(input_lines)) - # Setup the contextual environment - for contextual_variable, value in context.items(): - exec('%s=%s'%(str(contextual_variable),repr(value))) - res = [] # The variable below tracks the conditional statements structure if_stack = [] @@ -166,7 +162,7 @@ def preprocess_template(self, input_lines, context={}): # Treat an if statement elif preproc_command.group('command')=='if': try: - if_stack.append(eval(preproc_command.group('body'))==True) + if_stack.append(eval(preproc_command.group('body'), globals(), context)==True) except Exception as e: raise self.FilePreProcessingError('Could not evaluate'+\ "python expression '%s' given the context %s provided."%\ diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/files.py b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/files.py index 551b71ddb6..3061b007e7 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/files.py +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/files.py @@ -147,9 +147,14 @@ def cp(path1, path2, log=True, error=False): path2 = format_path(path2) try: shutil.copy(path1, path2) + except shutil.Error as why: + logger.debug('no cp since identical: %s', why) + return except IOError as why: import madgraph.various.misc as misc try: + if 'same file' in str(why): + return if os.path.exists(path2): path2 = os.path.join(path2, os.path.split(path1)[1]) misc.copytree(path1, path2) @@ -157,12 +162,10 @@ def cp(path1, path2, log=True, error=False): if error: raise if log: - logger.warning(why) + logger.warning("fail to cp", path1, path2, why) else: - misc.sprint("fail to cp", why) - except shutil.Error: - # idetical file - pass + misc.sprint("fail to cp",path1,path2, why) + def rm(path, log=True): """removes path, that can be a single element or a list""" diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/gen_cardhtml-pl b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/gen_cardhtml-pl index 1810c6c082..6e0e06533d 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/gen_cardhtml-pl +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/gen_cardhtml-pl @@ -137,7 +137,7 @@ until($listpos>$#incard){ print PAGE " Model: $model \n"; print PAGE " \n \n
\n"; print PAGE " \n"; - print PAGE "\"\" \n"; + print PAGE "\"\" \n"; print PAGE "
\n"; print PAGE " \n \n \n"; print PAGE " \n"; diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/gen_crossxhtml.py b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/gen_crossxhtml.py index 681bf9d09b..3114a4350c 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/gen_crossxhtml.py +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/gen_crossxhtml.py @@ -133,7 +133,7 @@ class AllResults(dict): web = False - _run_entries = ['cross', 'error','nb_event_pythia','run_mode','run_statistics', + _run_entries = ['cross', 'error','axsec','nb_event_pythia','run_mode','run_statistics', 'nb_event','cross_pythia','error_pythia', 'nb_event_pythia8','cross_pythia8','error_pythia8', 'shower_dir'] diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/gen_jpeg-pl b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/gen_jpeg-pl index 87d03da394..31b7e9fe55 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/gen_jpeg-pl +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/gen_jpeg-pl @@ -1,16 +1,16 @@ #!/usr/bin/perl -w #--------------------------------------------------------------------- -# Run GS to create jpeg files defined as $gs +# Run GS to create PNG files defined as $gs #--------------------------------------------------------------------- -system("/bin/bash -c \"rm -f matrix*.jpg\" "); +system("/bin/bash -c \"rm -f matrix*.png\" "); $imatrix = ""; if (! -e "matrix.ps") {$imatrix = 1;} -$max_jpg = 2; -if ($imatrix eq "") {$max_jpg = 5;} -# add 1 to max_jpg, to get max_jpg pages -$max_jpg += 1; +$max_png = 2; +if ($imatrix eq "") {$max_png = 5;} +# add 1 to max_png, to get max_png pages +$max_png += 1; open(PAGE,"> diagrams.html") || die "Error creating diagrams.html"; print PAGE "\ \n"; print PAGE "\ \n"; @@ -21,22 +21,22 @@ while ( -e "matrix$imatrix.ps"){ open(IN, "< matrix$imatrix.ps") || die "No file matrix$imatrix.ps"; open(OUT, "> matrix-1.ps") || die "Could not open file matrix-1.ps"; while () { - if ($_ =~ m/^%%Page: $max_jpg $max_jpg/) {last;} + if ($_ =~ m/^%%Page: $max_png $max_png/) {last;} else {print OUT $_, "\n";} } close(OUT); close(IN); - system "/bin/bash -c \"nice gs \-sDEVICE\=jpeg \-sOutputFile\=matrix$imatrix\%00d.jpg \-q \-dNOPAUSE \-dBATCH matrix-1.ps > /dev/null\""; + system "/bin/bash -c \"nice gs \-sDEVICE\=pngmono \-r150 \-sOutputFile\=matrix$imatrix\%00d.png \-q \-dNOPAUSE \-dBATCH matrix-1.ps > /dev/null\""; system "rm -f matrix-1.ps"; -# Determine how many jpg files we have +# Determine how many png files we have $pages=1; - while(-e "matrix$imatrix$pages.jpg"){ + while(-e "matrix$imatrix$pages.png"){ $pages++; }#end of while #reduce it by one - if ($pages > $max_jpg){ + if ($pages > $max_png){ $pages -= 1; } # Find name of process @@ -45,24 +45,24 @@ while ( -e "matrix$imatrix.ps"){ if ($proc =~ /Process: (.+?)(\s\w+=\d+)*$/) { $proc = $1; } print PAGE "

To save bandwidth not all diagrams were converted to jpeg."; + if (-e "matrix$imatrix$max_png.png" ) { + print PAGE "

To save bandwidth not all diagrams were converted to PNG."; print PAGE "

To view all diagrams click on "; print PAGE "\ postscript. \<\/A\> \ \n"; # # Delete files which aren't included in diagrams.html # - system ("/bin/bash -c \"rm -f matrix$max_jpg.jpg\" "); + system ("/bin/bash -c \"rm -f matrix$max_png.png\" "); } # -# Now create jpeg file for card +# Now create PNG file for card # - if (! -e "../../HTML/card.jpg") { + if (! -e "../../HTML/card.png") { system ("/bin/bash -c \"head -352 matrix$imatrix.ps >& junk.ps\" "); open(JUNK,">> junk.ps") || die "Error opening junk.ps"; @@ -72,7 +72,7 @@ while ( -e "matrix$imatrix.ps"){ system ("/bin/bash -c \"cat matrix$imatrix.ps | sed 1,352d >> junk.ps\" "); - system "/bin/bash -c \"nice gs \-sDEVICE\=jpeg \-sOutputFile\=card.jpg \-q \-dNOPAUSE \-dBATCH \-g180x150 ./junk.ps; rm -f junk.ps; cp -p card.jpg ../../HTML/card.jpg > /dev/null\" "; + system "/bin/bash -c \"nice gs \-sDEVICE\=pngmono \-sOutputFile\=card.png \-q \-dNOPAUSE \-dBATCH \-g180x150 ./junk.ps; rm -f junk.ps; cp -p card.png ../../HTML/card.png > /dev/null\" "; } if ($imatrix eq "") {$imatrix = 0;} $imatrix = $imatrix + 1; @@ -82,3 +82,4 @@ print PAGE "\n"; print PAGE "\<\/BODY\> \n"; print PAGE "\<\/HTML\> \n"; close(PAGE); + diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/gen_ximprove.py b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/gen_ximprove.py index 415ecc9de0..d5d7fc8faf 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/gen_ximprove.py +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/gen_ximprove.py @@ -30,6 +30,7 @@ import stat import sys import six +import time from six.moves import range from six.moves import zip @@ -304,6 +305,7 @@ def get_helicity(self, to_submit=True, clean=True): logger.debug('(%s) nb_hel: %s zero amp: %s bad_amps_hel: %s/%s', split_file[-1], len(good_hels),len(bad_amps),len(bad_amps_perhel), len(good_hels)*nb_amp ) if len(good_hels) == 1: files.cp(matrix_file, matrix_file.replace('orig','optim')) + files.cp(matrix_file.replace('.f','.o'), matrix_file.replace('orig','optim').replace('.f','.o')) continue # avoid optimization if onlye one helicity gauge = self.cmd.proc_characteristics['gauge'] @@ -1059,6 +1061,7 @@ def __init__(self, cmd, opt=None): # parameter for the gridpack run self.nreq = 2000 self.iseed = 4321 + self.maxevts = 2500 # placeholder for information self.results = 0 #updated in launch/update_html @@ -1200,6 +1203,10 @@ def reset_multijob(self): def write_multijob(self, Channel, nb_split): """ """ if nb_split <=1: + try: + os.remove(pjoin(self.me_dir, 'SubProcesses', Channel.get('name'), 'multijob.dat')) + except OSError: + pass return f = open(pjoin(self.me_dir, 'SubProcesses', Channel.get('name'), 'multijob.dat'), 'w') f.write('%i\n' % nb_split) @@ -1828,17 +1835,17 @@ class gen_ximprove_gridpack(gen_ximprove_v4): 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 gen_events_security = 1.00 - def __new__(cls, *args, **opts): + def __new__(cls, cmd, opts): cls.force_class = 'gridpack' - return super(gen_ximprove_gridpack, cls).__new__(cls, *args, **opts) + return super(gen_ximprove_gridpack, cls).__new__(cls, cmd, opts) - def __init__(self, *args, **opts): + def __init__(self, cmd, opts): self.ngran = -1 + self.nprocs = 1 self.gscalefact = {} self.readonly = False if 'ngran' in opts: @@ -1846,9 +1853,18 @@ def __init__(self, *args, **opts): # del opts['ngran'] if 'readonly' in opts: self.readonly = opts['readonly'] - super(gen_ximprove_gridpack,self).__init__(*args, **opts) + if 'nprocs' in opts: + self.nprocs = int(opts['nprocs']) + if 'maxevts' in opts and self.nprocs > 1: + self.max_request_event = int(opts['maxevts']) + super(gen_ximprove_gridpack,self).__init__(cmd, opts) if self.ngran == -1: self.ngran = 1 + + if self.nprocs > 1: + self.combining_job = 0 + else: + self.combining_job = sys.maxsize def find_job_for_event(self): """return the list of channel that need to be improved""" @@ -1876,8 +1892,8 @@ def find_job_for_event(self): continue # no event to generate events self.gscalefact[tag] = max(1, 1/(goal_lum * C.get('axsec')/ self.ngran)) #need to generate events - logger.debug('request events for ', C.get('name'), 'cross=', - C.get('axsec'), 'needed events = ', goal_lum * C.get('axsec')) + logger.debug('request events for %s cross=%d needed events = %d', + C.get('name'), C.get('axsec'), goal_lum * C.get('axsec')) to_refine.append(C) logger.info('need to improve %s channels' % len(to_refine)) @@ -1897,8 +1913,13 @@ def get_job_for_event(self): 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 - + nb_split = int(max(1,((needed_event-1)// self.max_request_event) +1)) + if not self.split_channels: + nb_split = 1 + if nb_split > self.max_splitting: + 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')) @@ -1908,13 +1929,16 @@ def get_job_for_event(self): nevents = self.max_event_in_iter if nevents < self.min_event_in_iter: + nb_split = int(nb_split * nevents / self.min_event_in_iter) + 1 # sr dangerous? nevents = self.min_event_in_iter # # 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) - + # write the multi-job information + self.write_multijob(C, nb_split) + #create the info dict assume no splitting for the default info = {'name': self.cmd.results.current['run_name'], 'script_name': 'unknown', @@ -1925,7 +1949,7 @@ def get_job_for_event(self): 'nevents': nevents, #int(nevents*self.gen_events_security)+1, 'maxiter': self.max_iter, 'miniter': self.min_iter, - 'precision': -1*int(needed_event)/C.get('axsec'), + 'precision': -goal_lum/nb_split, # -1*int(needed_event)/C.get('axsec'), 'requested_event': needed_event, 'nhel': self.run_card['nhel'], 'channel': C.name.replace('G',''), @@ -1938,27 +1962,59 @@ def get_job_for_event(self): basedir = pjoin(os.path.dirname(__file__), '..','..','SubProcesses', info['P_dir'], info['directory']) info['base_directory'] = basedir - jobs.append(info) - + if nb_split == 1: + jobs.append(info) + else: + for i in range(nb_split): + new_info = dict(info) + new_info['offset'] = i+1 + new_info['directory'] += self.alphabet[i % 26] + str((i+1)//26) + new_info['base_directory'] = info['directory'] + jobs.append(new_info) write_dir = '.' if self.readonly else None self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), jobs, write_dir) + if self.nprocs > 1: + nprocs_cluster = cluster.MultiCore(nb_core=self.nprocs) + gridpack_start = time.time() + def gridpack_wait_monitoring(Idle, Running, Done): + if Idle+Running+Done == 0: + return + logger.info("Gridpack event generation: %s Idle, %s Running, %s Done [%s]" + % (Idle, Running, Done, misc.format_time(time.time()-gridpack_start))) + done = [] for j in jobs: - if j['P_dir'] in done: - continue - done.append(j['P_dir']) + if self.nprocs == 1: + if j['P_dir'] in done: + continue + done.append(j['P_dir']) + # Give a little status. Sometimes these jobs run very long, and having hours without any + # console output can be a bit frightening and make users think we are looping. + if len(done)%5==0: + logger.info(f"Working on job {len(done)} of {len(jobs)}") + # set the working directory path. pwd = pjoin(os.getcwd(),j['P_dir']) if self.readonly else pjoin(self.me_dir, 'SubProcesses', j['P_dir']) - exe = pjoin(pwd, 'ajob1') + exe = pjoin(pwd, j['script_name']) st = os.stat(exe) os.chmod(exe, st.st_mode | stat.S_IEXEC) # run the code\ - cluster.onecore.launch_and_wait(exe, cwd=pwd, packet_member=j['packet']) + if self.nprocs == 1: + cluster.onecore.launch_and_wait(exe, cwd=pwd, packet_member=j['packet']) + else: + nprocs_cluster.cluster_submit(exe, cwd=pwd, packet_member=j['packet']) write_dir = '.' if self.readonly else pjoin(self.me_dir, 'SubProcesses') + if self.nprocs > 1: + nprocs_cluster.wait(self.me_dir, gridpack_wait_monitoring) + + if self.readonly: + combine_runs.CombineRuns(write_dir) + else: + combine_runs.CombineRuns(self.me_dir) self.check_events(goal_lum, to_refine, jobs, write_dir) def check_events(self, goal_lum, to_refine, jobs, Sdir): diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/hel_recycle.py b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/hel_recycle.py index 1471de4bcb..978ba6575e 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/hel_recycle.py +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/hel_recycle.py @@ -550,7 +550,7 @@ def get_jamp_lines(self, line): def get_amp2_lines(self, line): if line.startswith(' DO I = 1, NCOLOR'): self.in_amp2 = False - elif not line.isspace(): + elif not line.isspace() and 'DENOM' not in line: self.template_dict['amp2_lines'] += f'{line[0:6]} {self.add_indices(line[6:])}' def prepare_bools(self): diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/histograms.py b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/histograms.py index 51ae2914fc..d68c560806 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/histograms.py +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/histograms.py @@ -1149,11 +1149,8 @@ def parse_one_histo_from_stream(self, stream, all_weight_header, boundaries = [0.0,0.0] for j, weight in \ enumerate(HwU.histo_bin_weight_re.finditer(line_bin)): - if (j == len(weight_header)): - continue - if j == len(all_weight_header): - raise HwU.ParseError("There is more bin weights"+\ - " specified than expected (%i)"%len(weight_header)) + #if (j == len(weight_header)): + # continue if selected_central_weight == all_weight_header[j]: bin_weights['central'] = float(weight.group('weight')) if all_weight_header[j] == 'boundary_xmin': @@ -2480,14 +2477,14 @@ def get_main_central_plot_lines(HwU_name, block_position, color_index, # return [template_no_stat%rep_dic]+\ # ([template%rep_dic] if show_mc_uncertainties else []) - # The use of sqrt(-1) is just a trick to prevent the line to display + # The use of 1/0 is just a trick to prevent the line to display res = [] - rep_dic['data'] = '($3 < 0 ? sqrt(-1) : $3)' + rep_dic['data'] = '($3 < 0 ? 1/0 : $3)' res.append(template_no_stat%rep_dic) rep_dic['title'] = " title ''" if show_mc_uncertainties: res.append(template%rep_dic) - rep_dic['data'] = '($3 >= 0 ? sqrt(-1) : abs($3))' + rep_dic['data'] = '($3 >= 0 ? 1/0 : abs($3))' rep_dic['ls'] = ' ls %d'%(100+color_index) res.append(template_no_stat%rep_dic) if show_mc_uncertainties: @@ -2739,13 +2736,13 @@ def ratio_no_correlations(wgtsA, wgtsB): """#-- rendering subhistograms '%(subhistogram_type)s' %(unset label)s %(set_format_y)s +%(set_yscale)s set yrange [%(ymin).4e:%(ymax).4e] set origin %(origin_x).4e, %(origin_y).4e set size %(size_x).4e, %(size_y).4e set mytics %(mytics)d %(set_ytics)s %(set_format_x)s -%(set_yscale)s %(set_ylabel)s %(set_histo_label)s plot \\""" @@ -2878,7 +2875,7 @@ def ratio_no_correlations(wgtsA, wgtsB): # We decide to show uncertainties in the main plot only if they # are part of a monocolor band. Otherwise, they will only be - # shown in the first subplot. Notice that plotting 'sqrt(-1)' + # shown in the first subplot. Notice that plotting '1/0' # is just a trick so as to have only the key printed with no # line @@ -2890,7 +2887,7 @@ def ratio_no_correlations(wgtsA, wgtsB): '%s, scale variation'%title, band='scale' in use_band) else: uncertainty_plot_lines[-1]['scale'] = \ - ["sqrt(-1) ls %d title '%s'"%(color_index+10,'%s, scale variation'%title)] + ["1/0 ls %d title '%s'"%(color_index+10,'%s, scale variation'%title)] # And now PDF_variation if available if not PDF_var_pos is None and len(PDF_var_pos)>0: if 'pdf' in use_band: @@ -2899,7 +2896,7 @@ def ratio_no_correlations(wgtsA, wgtsB): '%s, PDF variation'%title, band='pdf' in use_band) else: uncertainty_plot_lines[-1]['pdf'] = \ - ["sqrt(-1) ls %d title '%s'"%(color_index+20,'%s, PDF variation'%title)] + ["1/0 ls %d title '%s'"%(color_index+20,'%s, PDF variation'%title)] # And now merging variation if available if not merging_var_pos is None and len(merging_var_pos)>0: if 'merging_scale' in use_band: @@ -2908,7 +2905,7 @@ def ratio_no_correlations(wgtsA, wgtsB): '%s, merging scale variation'%title, band='merging_scale' in use_band) else: uncertainty_plot_lines[-1]['merging_scale'] = \ - ["sqrt(-1) ls %d title '%s'"%(color_index+30,'%s, merging scale variation'%title)] + ["1/0 ls %d title '%s'"%(color_index+30,'%s, merging scale variation'%title)] # And now alpsfact variation if available if not alpsfact_var_pos is None and len(alpsfact_var_pos)>0: if 'alpsfact' in use_band: @@ -2917,7 +2914,7 @@ def ratio_no_correlations(wgtsA, wgtsB): '%s, alpsfact variation'%title, band='alpsfact' in use_band) else: uncertainty_plot_lines[-1]['alpsfact'] = \ - ["sqrt(-1) ls %d title '%s'"%(color_index+40,'%s, alpsfact variation'%title)] + ["1/0 ls %d title '%s'"%(color_index+40,'%s, alpsfact variation'%title)] # plot_lines.append( # "'%s' index %d using (($1+$2)/2):3 ls %d title '%s'"\ diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/launch_plugin.py b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/launch_plugin.py index 0924927785..ba08c10340 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/launch_plugin.py +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/launch_plugin.py @@ -33,7 +33,7 @@ def compile(self, *args, **opts): if 'cwd' in opts and os.path.basename(opts['cwd']) == 'Source': path = pjoin(opts['cwd'], 'make_opts') common_run_interface.CommonRunCmd.update_make_opts_full(path, - {'FPTYPE': self.run_card['floating_type'] }) + {'override FPTYPE': self.run_card['floating_type'] }) misc.sprint('FPTYPE checked') cudacpp_supported_backends = [ 'fortran', 'cuda', 'hip', 'cpp', 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z', 'cppauto' ] if args and args[0][0] == 'madevent' and hasattr(self, 'run_card'): @@ -76,7 +76,7 @@ def reset_makeopts(self, old_value, new_value, name): if not hasattr(self, 'path'): raise Exception if name == 'floating_type': - common_run_interface.CommonRunCmd.update_make_opts_full({'FPTYPE': new_value}) + common_run_interface.CommonRunCmd.update_make_opts_full({'override FPTYPE': new_value}) else: raise Exception Sourcedir = pjoin(os.path.dirname(os.path.dirname(self.path)), 'Source') diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/lhe_parser.py b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/lhe_parser.py index f6e47956cd..76ded329c0 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/lhe_parser.py +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/lhe_parser.py @@ -2953,8 +2953,8 @@ def pt(self): @property def pseudorapidity(self): - norm = math.sqrt(self.px**2 + self.py**2+self.pz**2) - return 0.5* math.log((norm - self.pz) / (norm + self.pz)) + norm = math.sqrt(self.px**2 + self.py**2 + self.pz**2) + return 0.5* math.log((norm + self.pz) / (norm - self.pz)) @property def rapidity(self): diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/madevent_interface.py b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/madevent_interface.py index 85e5bcf5e3..2852f1d4d8 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/madevent_interface.py +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/madevent_interface.py @@ -1171,10 +1171,10 @@ def check_survey(self, args, cmd='survey'): for opt,value in self._survey_options.items(): if arg.startswith('--%s=' % opt): exec('self.opts[\'%s\'] = %s(arg.split(\'=\')[-1])' % \ - (opt, value[0])) + (opt, value[0]), globals(), {'self':self, 'arg':arg}) arg = "" if arg != "": raise Exception - except Exception: + except Exception as error: self.help_survey() raise self.InvalidCmd('invalid %s argument'% arg) @@ -3656,9 +3656,11 @@ def do_refine(self, line): else: self.refine_mode = "new" - cross, error = self.make_make_all_html_results() + cross, error, across = self.make_make_all_html_results(get_attr=('xsec','xerru','axsec')) + self.results.add_detail('cross', cross) self.results.add_detail('error', error) + self.results.add_detail('axsec', across) self.results.add_detail('run_statistics', dict(self.results.get_detail('run_statistics'))) @@ -3786,7 +3788,7 @@ def split(a, n): for i, local_G in enumerate(split(Gdirs, nb_chunk)): line = [pjoin(self.me_dir, "Events", self.run_name, "partials%d.lhe.gz" % i)] line.append(pjoin(self.me_dir, 'Events', self.run_name, '%s_%s_banner.txt' % (self.run_name, tag))) - line.append(str(self.results.current['cross'])) + line.append(str(self.results.current.get('axsec'))) line += local_G partials_info.append(self.do_combine_events_partial(' '.join(line), preprocess_only=True)) mycluster.submit(sys.executable, @@ -6749,7 +6751,7 @@ def get_subP_ids(path): class GridPackCmd(MadEventCmd): """The command for the gridpack --Those are not suppose to be use interactively--""" - def __init__(self, me_dir = None, nb_event=0, seed=0, gran=-1, *completekey, **stdin): + def __init__(self, me_dir = None, nb_event=0, seed=0, gran=-1, nprocs=1, maxevts=2500, *completekey, **stdin): """Initialize the command and directly run""" # Initialize properly @@ -6759,6 +6761,8 @@ 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.nprocs = nprocs + self.maxevts = maxevts self.options['automatic_html_opening'] = False #write the grid_card.dat on disk @@ -6874,7 +6878,7 @@ def launch(self, nb_event, seed): #misc.call([pjoin(self.me_dir,'bin','refine4grid'), # str(nb_event), '0', 'Madevent','1','GridRun_%s' % seed], # cwd=self.me_dir) - self.refine4grid(nb_event) + self.gridpack_cross = self.refine4grid(nb_event) # 3) Combine the events/pythia/... self.exec_cmd('combine_events') @@ -6902,6 +6906,8 @@ def refine4grid(self, nb_event): precision = nb_event + across= self.make_make_all_html_results(get_attr='axsec') + self.opts = dict([(key,value[1]) for (key,value) in \ self._survey_options.items()]) @@ -6915,8 +6921,9 @@ def refine4grid(self, nb_event): 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} + refine_opt = {'err_goal': nb_event, 'split_channels': True, + 'ngran':self.granularity, 'readonly': self.readonly, + 'nprocs': self.nprocs, 'maxevts': self.maxevts} 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 @@ -6926,7 +6933,7 @@ def refine4grid(self, nb_event): #print 'run combine!!!' #combine_runs.CombineRuns(self.me_dir) - return + return across #update html output Presults = sum_html.collect_result(self) cross, error = Presults.xsec, Presults.xerru @@ -7051,10 +7058,14 @@ def do_combine_events(self, line): sum_axsec += result.get('axsec')*gscalefact[Gdir] if len(AllEvent) >= 80: #perform a partial unweighting - if self.results.current['cross'] == 0 and self.run_card['gridpack']: - nb_event= self.nb_event + if not self.results.current.get('axsec'): + if self.run_card['gridpack'] and self.gridpack_cross: + nb_event = min(abs(1.05*self.nb_event*sum_axsec/self.gridpack_cross),self.nb_event) + else: + nb_event= self.nb_event else: - nb_event = min(abs(1.01*self.nb_event*sum_axsec/self.results.current['cross']),self.run_card['nevents']) + nb_event = min(abs(1.01*self.nb_event*sum_axsec/self.results.current.get('axsec')),self.run_card['nevents'], self.nb_event, self.gridpack_cross, sum_axsec) + misc.sprint(nb_event, self.results.current.get('axsec'), self.gridpack_cross) AllEvent.unweight(pjoin(outdir, self.run_name, "partials%s.lhe.gz" % partials), get_wgt, log_level=5, trunc_error=1e-2, event_target=nb_event) AllEvent = lhe_parser.MultiEventFile() @@ -7068,6 +7079,7 @@ def do_combine_events(self, line): for data in partials_info: AllEvent.add(*data) + sum_xsec += data[1] if not hasattr(self,'proc_characteristic'): self.proc_characteristic = self.get_characteristics() diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/restore_data b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/restore_data index 6205bb9567..407ed7aa91 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/restore_data +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/restore_data @@ -48,8 +48,17 @@ for i in `cat subproc.mg` ; do cd ../ done +# check if we are on a Mac, otherwise assume Linux +if [[ "$OSTYPE" == "darwin"* ]]; then + # no nproc on Mac, so use sysctl instead + # use -S1024 because there is a limit on the length of the command + xargs_opts="-P $(sysctl -n hw.ncpu) -S1024" +else + xargs_opts="-P $(nproc --all)" +fi + find . -mindepth 2 -maxdepth 2 -type d -name 'G*' -print0 \ - | xargs --null -P "$(nproc --all)" -I{} bash -c " + | xargs --null ${xargs_opts} -I{} bash -c " cd {} for j in $1_results.dat ; do if [[ -e \$j ]] ; then diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/sum_html.py b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/sum_html.py index 9dd5826f71..fb8dd3a74a 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/sum_html.py +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/sum_html.py @@ -770,7 +770,7 @@ def collect_result(cmd, folder_names=[], jobs=None, main_dir=None): return all -def make_all_html_results(cmd, folder_names = [], jobs=[]): +def make_all_html_results(cmd, folder_names = [], jobs=[], get_attr=None): """ folder_names and jobs have been added for the amcatnlo runs """ run = cmd.results.current['run_name'] if not os.path.exists(pjoin(cmd.me_dir, 'HTML', run)): @@ -794,7 +794,12 @@ def make_all_html_results(cmd, folder_names = [], jobs=[]): fsock.write('%s

' % Presults.get_html(run, unit, cmd.me_dir)) fsock.write('%s
' % P_text) - return Presults.xsec, Presults.xerru + if not get_attr: + return Presults.xsec, Presults.xerru + else: + if isinstance(get_attr, tuple): + return [getattr(Presults, _) for _ in get_attr] + return getattr(Presults, get_attr) diff --git a/epochX/cudacpp/heft_gg_bb.mad/bin/madevent b/epochX/cudacpp/heft_gg_bb.mad/bin/madevent index dff9711b73..9c5363e682 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/madevent +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/madevent @@ -178,6 +178,17 @@ force_run = False if (args and args[0] == 'treatcards'): force_run=True + +# check that madgraph is not in PYTHONPATH +try: + import madgraph +except ImportError: + pass +else: + logger.getLogger('madgraph').error('Looks like you do have madgraph in your PYTHONPATH (or you run this executable from the main MG5aMC directory). This executable will likely not work in such case.') + + + # Call the cmd interface main loop try: if '-h' in args or '--help' in args: diff --git a/epochX/cudacpp/heft_gg_bb.mad/src/HelAmps_heft.h b/epochX/cudacpp/heft_gg_bb.mad/src/HelAmps_heft.h index 1b04401547..592d4983b9 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/src/HelAmps_heft.h +++ b/epochX/cudacpp/heft_gg_bb.mad/src/HelAmps_heft.h @@ -8,7 +8,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/heft_gg_bb.mad/src/Parameters_heft.cc b/epochX/cudacpp/heft_gg_bb.mad/src/Parameters_heft.cc index 0fa5a34cf0..24b36c694b 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/src/Parameters_heft.cc +++ b/epochX/cudacpp/heft_gg_bb.mad/src/Parameters_heft.cc @@ -7,7 +7,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/heft_gg_bb.mad/src/Parameters_heft.h b/epochX/cudacpp/heft_gg_bb.mad/src/Parameters_heft.h index 0faa7bb71e..f95cc7b9a7 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/src/Parameters_heft.h +++ b/epochX/cudacpp/heft_gg_bb.mad/src/Parameters_heft.h @@ -7,7 +7,7 @@ // Further modified by: A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/heft_gg_bb.sa/CODEGEN_cudacpp_heft_gg_bb_log.txt b/epochX/cudacpp/heft_gg_bb.sa/CODEGEN_cudacpp_heft_gg_bb_log.txt index 04039fcd14..ae8ff60bc5 100644 --- a/epochX/cudacpp/heft_gg_bb.sa/CODEGEN_cudacpp_heft_gg_bb_log.txt +++ b/epochX/cudacpp/heft_gg_bb.sa/CODEGEN_cudacpp_heft_gg_bb_log.txt @@ -1,8 +1,11 @@ +WARNING:root:python3.12 support is still experimental. For the moment re-weighting is NOT working and do expect a LOT of syntax warning. We do not advise python3.12 for production for the moment. +Running MG5 in debug mode +Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT +Plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT has marked as NOT being validated with this version: 3.6.2. +It has been validated for the last time with version: 3.6.0 Note that this is a development version. This version is intended for development/beta testing and NOT for production. This version has not been fully tested (if at all) and might have limited user support (if at all) -Running MG5 in debug mode -Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT ************************************************************ * * * W E L C O M E to * @@ -15,7 +18,7 @@ Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT * * * * * * * * * * * * -* VERSION 3.6.0 2024-09-30 * +* VERSION 3.6.2 2025-03-19 * * * * WARNING: UNKNOWN DEVELOPMENT VERSION. * * WARNING: DO NOT USE FOR PRODUCTION * @@ -46,18 +49,23 @@ 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/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_heft_gg_bb.mg +import /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_heft_gg_bb.mg The import format was not given, so we guess it as command set stdout_level DEBUG set output information to level: 10 set zerowidth_tchannel F set auto_convert_model T save options auto_convert_model -save configuration file to /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +save configuration file to /shared/roiser/sw/madgraph4gpu/MG5aMC/mg5amcnlo/input/mg5_configuration.txt import model heft +INFO: reload from .py file +INFO: load particles +INFO: load vertices +WARNING: coupling GC_13=-(complex(0,1)*GH) has direct dependence in aS but has QCD order set to 0. Automatic computation of scale uncertainty can be wrong for such model.  +WARNING: coupling GC_16=(complex(0,1)*Gphi)/8. has direct dependence in aS but has QCD order set to 0. Automatic computation of scale uncertainty can be wrong for such model.  +DEBUG: model prefixing takes 0.0024192333221435547  INFO: Restrict model heft with file models/heft/restrict_default.dat . DEBUG: Simplifying conditional expressions  DEBUG: remove interactions: s u w+ at order: QED=1  @@ -123,13 +131,13 @@ Defined multiparticle all = g u c d s u~ c~ d~ s~ a ve vm vt e- mu- ve~ vm~ vt~ generate g g > b b~ HIW<=1 INFO: Trying process: g g > b b~ HIG<=1 HIW<=1 @1 INFO: Process has 4 diagrams -1 processes with 4 diagrams generated in 0.006 s +1 processes with 4 diagrams generated in 0.003 s Total: 1 processes with 4 diagrams output standalone_cudacpp ../TMPOUT/CODEGEN_cudacpp_heft_gg_bb Output will be done with PLUGIN: CUDACPP_OUTPUT DEBUG: Entering PLUGIN_ProcessExporter.__init__ (initialise the exporter) [output.py at line 171]  DEBUG: Entering PLUGIN_ProcessExporter.copy_template (initialise the directory) [output.py at line 176]  -INFO: Creating subdirectories in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_heft_gg_bb +INFO: Creating subdirectories in directory /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_heft_gg_bb INFO: Organizing processes into subprocess groups INFO: Generating Helas calls for process: g g > b b~ HIG<=1 HIW<=1 @1 INFO: Processing color information for process: g g > b b~ HIG<=1 HIW<=1 @1 @@ -138,34 +146,34 @@ INFO: Processing color information for process: g g > b b~ HIG<=1 HIW<=1 @1 DEBUG: type(fortran_model)= [output.py at line 220]  DEBUG: type(me)= me=0 [output.py at line 221]  DEBUG: "need to link", self.to_link_in_P =  need to link ['nvtx.h', 'timer.h', 'timermap.h', 'ompnumthreads.h', 'GpuRuntime.h', 'GpuAbstraction.h', 'MemoryAccessHelpers.h', 'MemoryAccessVectors.h', 'MemoryAccessMatrixElements.h', 'MemoryAccessMomenta.h', 'MemoryAccessRandomNumbers.h', 'MemoryAccessWeights.h', 'MemoryAccessAmplitudes.h', 'MemoryAccessWavefunctions.h', 'MemoryAccessGs.h', 'MemoryAccessCouplingsFixed.h', 'MemoryAccessNumerators.h', 'MemoryAccessDenominators.h', 'MemoryAccessChannelIds.h', 'EventStatistics.h', 'CommonRandomNumbers.h', 'CrossSectionKernels.cc', 'CrossSectionKernels.h', 'MatrixElementKernels.cc', 'MatrixElementKernels.h', 'RamboSamplingKernels.cc', 'RamboSamplingKernels.h', 'RandomNumberKernels.h', 'CommonRandomNumberKernel.cc', 'CurandRandomNumberKernel.cc', 'HiprandRandomNumberKernel.cc', 'Bridge.h', 'BridgeKernels.cc', 'BridgeKernels.h', 'fbridge.cc', 'fbridge.inc', 'fsampler.cc', 'fsampler.inc', 'MadgraphTest.h', 'runTest.cc', 'testmisc.cc', 'testxxx_cc_ref.txt', 'valgrind.h', 'cudacpp.mk', 'testxxx.cc', 'MemoryBuffers.h', 'MemoryAccessCouplings.h', 'perf.py', 'profile.sh'] [output.py at line 222]  -INFO: Creating files in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_heft_gg_bb/SubProcesses/P1_Sigma_heft_gg_bbx -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_heft_gg_bb/SubProcesses/P1_Sigma_heft_gg_bbx/./CPPProcess.h -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_heft_gg_bb/SubProcesses/P1_Sigma_heft_gg_bbx/./CPPProcess.cc -INFO: Created files CPPProcess.h and CPPProcess.cc in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_heft_gg_bb/SubProcesses/P1_Sigma_heft_gg_bbx/. -Generated helas calls for 1 subprocesses (4 diagrams) in 0.008 s +INFO: Creating files in directory /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_heft_gg_bb/SubProcesses/P1_Sigma_heft_gg_bbx +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_heft_gg_bb/SubProcesses/P1_Sigma_heft_gg_bbx/./CPPProcess.h +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_heft_gg_bb/SubProcesses/P1_Sigma_heft_gg_bbx/./CPPProcess.cc +INFO: Created files CPPProcess.h and CPPProcess.cc in directory /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_heft_gg_bb/SubProcesses/P1_Sigma_heft_gg_bbx/. +Generated helas calls for 1 subprocesses (4 diagrams) in 0.005 s ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates VVS3 routines ALOHA: aloha creates VVV1 set of routines with options: P0 ALOHA: aloha creates FFV1 routines ALOHA: aloha creates FFS2 routines -ALOHA: aloha creates 4 routines in 0.261 s +ALOHA: aloha creates 4 routines in 0.110 s VVS3 VVV1 FFV1 FFV1 FFV1 FFS2 -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_heft_gg_bb/src/./HelAmps_heft.h -INFO: Created file HelAmps_heft.h in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_heft_gg_bb/src/. +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_heft_gg_bb/src/./HelAmps_heft.h +INFO: Created file HelAmps_heft.h in directory /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_heft_gg_bb/src/. super_write_set_parameters_onlyfixMajorana (hardcoded=False) super_write_set_parameters_onlyfixMajorana (hardcoded=True) -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_heft_gg_bb/src/./Parameters_heft.h -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_heft_gg_bb/src/./Parameters_heft.cc +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_heft_gg_bb/src/./Parameters_heft.h +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_heft_gg_bb/src/./Parameters_heft.cc INFO: Created files Parameters_heft.h and Parameters_heft.cc in directory -INFO: /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_heft_gg_bb/src/. and /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_heft_gg_bb/src/. +INFO: /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_heft_gg_bb/src/. and /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_heft_gg_bb/src/. quit -real 0m0.646s -user 0m0.583s -sys 0m0.051s -Code generation completed in 1 seconds +real 0m1.358s +user 0m0.407s +sys 0m0.114s +Code generation completed in 2 seconds diff --git a/epochX/cudacpp/heft_gg_bb.sa/SubProcesses/Bridge.h b/epochX/cudacpp/heft_gg_bb.sa/SubProcesses/Bridge.h index 87aa648dd2..49b928db67 100644 --- a/epochX/cudacpp/heft_gg_bb.sa/SubProcesses/Bridge.h +++ b/epochX/cudacpp/heft_gg_bb.sa/SubProcesses/Bridge.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: S. Roiser (Nov 2021) for the MG5aMC CUDACPP plugin. -// Further modified by: S. Roiser, J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2021-2025) for the MG5aMC CUDACPP plugin. #ifndef BRIDGE_H #define BRIDGE_H 1 @@ -255,11 +255,15 @@ namespace mg5amcCpu throw std::logic_error( "Bridge constructor: FIXME! cannot choose gputhreads" ); // this should never happen! m_gpublocks = m_nevt / m_gputhreads; } +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Instantiate device Bridge (nevt=" << m_nevt << ", gpublocks=" << m_gpublocks << ", gputhreads=" << m_gputhreads << ", gpublocks*gputhreads=" << m_gpublocks * m_gputhreads << ")" << std::endl; +#endif m_pmek.reset( new MatrixElementKernelDevice( m_devMomentaC, m_devGs, m_devRndHel, m_devRndCol, m_devChannelIds, m_devMEs, m_devSelHel, m_devSelCol, m_gpublocks, m_gputhreads ) ); #else +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Instantiate host Bridge (nevt=" << m_nevt << ")" << std::endl; +#endif m_pmek.reset( new MatrixElementKernelHost( m_hstMomentaC, m_hstGs, m_hstRndHel, m_hstRndCol, m_hstChannelIds, m_hstMEs, m_hstSelHel, m_hstSelCol, m_nevt ) ); #endif // MGONGPUCPP_GPUIMPL // Create a process object, read param card and set parameters @@ -290,8 +294,10 @@ namespace mg5amcCpu throw std::runtime_error( "Bridge: gpublocks*gputhreads must equal m_nevt in set_gpugrid" ); m_gpublocks = gpublocks; m_gputhreads = gputhreads; +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Set grid in Bridge (nevt=" << m_nevt << ", gpublocks=" << m_gpublocks << ", gputhreads=" << m_gputhreads << ", gpublocks*gputhreads=" << m_gpublocks * m_gputhreads << ")" << std::endl; +#endif m_pmek->setGrid( m_gpublocks, m_gputhreads ); } #endif @@ -347,7 +353,9 @@ namespace mg5amcCpu if( goodHelOnly ) return; m_pmek->computeMatrixElements( useChannelIds ); copyHostFromDevice( m_hstMEs, m_devMEs ); +#ifdef MGONGPUCPP_VERBOSE flagAbnormalMEs( m_hstMEs.data(), m_nevt ); +#endif copyHostFromDevice( m_hstSelHel, m_devSelHel ); copyHostFromDevice( m_hstSelCol, m_devSelCol ); if constexpr( std::is_same_v ) @@ -400,7 +408,9 @@ namespace mg5amcCpu } if( goodHelOnly ) return; m_pmek->computeMatrixElements( useChannelIds ); +#ifdef MGONGPUCPP_VERBOSE flagAbnormalMEs( m_hstMEs.data(), m_nevt ); +#endif if constexpr( std::is_same_v ) { memcpy( mes, m_hstMEs.data(), m_hstMEs.bytes() ); diff --git a/epochX/cudacpp/heft_gg_bb.sa/SubProcesses/GpuRuntime.h b/epochX/cudacpp/heft_gg_bb.sa/SubProcesses/GpuRuntime.h index 860c7fde16..6a4b946e74 100644 --- a/epochX/cudacpp/heft_gg_bb.sa/SubProcesses/GpuRuntime.h +++ b/epochX/cudacpp/heft_gg_bb.sa/SubProcesses/GpuRuntime.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: J. Teig (Jun 2023, based on earlier work by S. Roiser) for the MG5aMC CUDACPP plugin. -// Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2025) for the MG5aMC CUDACPP plugin. #ifndef MG5AMC_GPURUNTIME_H #define MG5AMC_GPURUNTIME_H 1 @@ -50,7 +50,7 @@ namespace mg5amcGpu // Set up CUDA application // ** NB: strictly speaking this is not needed when using the CUDA runtime API ** // Calling cudaSetDevice on startup is useful to properly book-keep the time spent in CUDA initialization - static void setUp( const bool debug = true ) + static void setUp( const bool debug = false ) // ZW: changed debug default to false { // ** NB: it is useful to call cudaSetDevice, or cudaFree, to properly book-keep the time spent in CUDA initialization // ** NB: otherwise, the first CUDA operation (eg a cudaMemcpyToSymbol in CPPProcess ctor) appears to take much longer! @@ -71,7 +71,7 @@ namespace mg5amcGpu // ** NB: strictly speaking this is not needed when using the CUDA runtime API ** // Calling cudaDeviceReset on shutdown is only needed for checking memory leaks in cuda-memcheck // See https://docs.nvidia.com/cuda/cuda-memcheck/index.html#leak-checking - static void tearDown( const bool debug = true ) + static void tearDown( const bool debug = false ) // ZW: changed debug default to false { if( debug ) std::cout << "__GpuRuntime: calling GpuDeviceReset()" << std::endl; checkGpu( gpuDeviceReset() ); diff --git a/epochX/cudacpp/heft_gg_bb.sa/SubProcesses/MatrixElementKernels.cc b/epochX/cudacpp/heft_gg_bb.sa/SubProcesses/MatrixElementKernels.cc index f463977c1a..703ea3781c 100644 --- a/epochX/cudacpp/heft_gg_bb.sa/SubProcesses/MatrixElementKernels.cc +++ b/epochX/cudacpp/heft_gg_bb.sa/SubProcesses/MatrixElementKernels.cc @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: A. Valassi (Jan 2022) for the MG5aMC CUDACPP plugin. -// Further modified by: J. Teig, A. Valassi (2022-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: J. Teig, A. Valassi, Z. Wettersten (2022-2025) for the MG5aMC CUDACPP plugin. #include "MatrixElementKernels.h" @@ -60,7 +60,9 @@ namespace mg5amcCpu #ifdef MGONGPU_CHANNELID_DEBUG MatrixElementKernelBase::dumpNevtProcessedByChannel(); #endif +#ifdef MGONGPUCPP_VERBOSE MatrixElementKernelBase::dumpSignallingFPEs(); +#endif } //-------------------------------------------------------------------------- diff --git a/epochX/cudacpp/heft_gg_bb.sa/SubProcesses/MatrixElementKernels.h b/epochX/cudacpp/heft_gg_bb.sa/SubProcesses/MatrixElementKernels.h index 7acff4b308..8da04d7945 100644 --- a/epochX/cudacpp/heft_gg_bb.sa/SubProcesses/MatrixElementKernels.h +++ b/epochX/cudacpp/heft_gg_bb.sa/SubProcesses/MatrixElementKernels.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: A. Valassi (Jan 2022) for the MG5aMC CUDACPP plugin. -// Further modified by: J. Teig, A. Valassi (2022-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: J. Teig, A. Valassi, Z. Wettersten (2022-2025) for the MG5aMC CUDACPP plugin. #ifndef MATRIXELEMENTKERNELS_H #define MATRIXELEMENTKERNELS_H 1 @@ -134,7 +134,7 @@ namespace mg5amcCpu // Does this host system support the SIMD used in the matrix element calculation? // [NB: this is private, SIMD vectorization in mg5amc C++ code is currently only used in the ME calculations below MatrixElementKernelHost!] - static bool hostSupportsSIMD( const bool verbose = true ); + static bool hostSupportsSIMD( const bool verbose = false ); // ZW: default verbose false private: diff --git a/epochX/cudacpp/heft_gg_bb.sa/SubProcesses/MemoryAccessGs.h b/epochX/cudacpp/heft_gg_bb.sa/SubProcesses/MemoryAccessGs.h index 63c17a68fa..50a6aaef4d 100644 --- a/epochX/cudacpp/heft_gg_bb.sa/SubProcesses/MemoryAccessGs.h +++ b/epochX/cudacpp/heft_gg_bb.sa/SubProcesses/MemoryAccessGs.h @@ -128,6 +128,14 @@ namespace mg5amcCpu #endif } + // Locate a field (output) in a memory buffer (input) from a kernel event-indexing mechanism (internal) + // [Signature (SCALAR OR VECTOR) ===> fptype_sv* kernelAccess( fptype* buffer ) <===] + static __host__ __device__ inline fptype_sv* + kernelAccessP( fptype* buffer ) + { + return reinterpret_cast( buffer ); + } + // Locate a field (output) in a memory buffer (input) from a kernel event-indexing mechanism (internal) and the given field indexes (input) // [Signature (const, SCALAR) ===> const fptype& kernelAccessConst( const fptype* buffer ) <===] static constexpr auto kernelAccessConst_s = diff --git a/epochX/cudacpp/heft_gg_bb.sa/SubProcesses/MemoryBuffers.h b/epochX/cudacpp/heft_gg_bb.sa/SubProcesses/MemoryBuffers.h index 90075da66e..429fac84eb 100644 --- a/epochX/cudacpp/heft_gg_bb.sa/SubProcesses/MemoryBuffers.h +++ b/epochX/cudacpp/heft_gg_bb.sa/SubProcesses/MemoryBuffers.h @@ -13,6 +13,7 @@ #include "CPPProcess.h" #include "GpuRuntime.h" #include "Parameters_heft.h" +#include "processConfig.h" #include @@ -274,7 +275,8 @@ namespace mg5amcCpu typedef BufferBase BufferNumerators; // The size (number of elements) per event in a memory buffer for numerators - constexpr size_t sizePerEventNumerators = 1; + // (should be equal to the number of diagrams in the process) + constexpr size_t sizePerEventNumerators = processConfig::ndiagrams; #ifndef MGONGPUCPP_GPUIMPL // A class encapsulating a C++ host buffer for gs diff --git a/epochX/cudacpp/heft_gg_bb.sa/SubProcesses/P1_Sigma_heft_gg_bbx/CPPProcess.cc b/epochX/cudacpp/heft_gg_bb.sa/SubProcesses/P1_Sigma_heft_gg_bbx/CPPProcess.cc index b9f394434a..d59514bed4 100644 --- a/epochX/cudacpp/heft_gg_bb.sa/SubProcesses/P1_Sigma_heft_gg_bbx/CPPProcess.cc +++ b/epochX/cudacpp/heft_gg_bb.sa/SubProcesses/P1_Sigma_heft_gg_bbx/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -25,6 +25,7 @@ #include "MemoryAccessMatrixElements.h" #include "MemoryAccessMomenta.h" #include "MemoryAccessWavefunctions.h" +#include "processConfig.h" #ifdef MGONGPU_SUPPORTS_MULTICHANNEL #include "MemoryAccessDenominators.h" @@ -96,6 +97,69 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { +#ifdef MGONGPU_SUPPORTS_MULTICHANNEL + __device__ INLINE unsigned int getChannelId( const unsigned int* allChannelIds +#ifndef MGONGPUCPP_GPUIMPL + , + const int ievt00, + bool sanityCheckMixedPrecision = true +#endif + ) + { + unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr +#ifdef MGONGPUCPP_GPUIMPL + using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page + if( allChannelIds != nullptr ) + { + const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) + const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) + // NB: channelIds_sv is a scalar in CUDA + channelId = channelIds_sv; + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + } +#else // Cuda or C++ + using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + if( allChannelIds != nullptr ) + { + // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) + const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 + uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) +#ifndef MGONGPU_CPPSIMD + // NB: channelIds_sv is a scalar in no-SIMD C++ + channelId = channelIds_sv; +#else + // NB: channelIds_sv is a vector in SIMD C++ + channelId = channelIds_sv[0]; // element[0] + for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] + { + assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId + } +#endif + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + if( sanityCheckMixedPrecision ) + { +#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT + // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) + const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 + uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + for( int i = 0; i < neppV; ++i ) + { + assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector + } +#endif + } + } +#endif // MGONGPUCPP_GPUIMPL + return channelId; + } +#endif // MGONGPU_SUPPORTS_MULTICHANNEL + constexpr int nw6 = CPPProcess::nw6; // dimensions of each wavefunction (HELAS KEK 91-11): e.g. 6 for e+ e- -> mu+ mu- (fermions and vectors) constexpr int npar = CPPProcess::npar; // #particles in total (external = initial + final): e.g. 4 for e+ e- -> mu+ mu- constexpr int ncomb = CPPProcess::ncomb; // #helicity combinations: e.g. 16 for e+ e- -> mu+ mu- (2**4 = fermion spin up/down ** npar) @@ -305,7 +369,7 @@ namespace mg5amcCpu COUPs[ndcoup + iicoup] = allCOUPs[ndcoup + iicoup]; // independent couplings, fixed for all events fptype* MEs = E_ACCESS::ieventAccessRecord( allMEs, ievt0 ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); #endif #endif @@ -315,7 +379,7 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Numerators and denominators for the current event (CUDA) or SIMD event page (C++) - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); #endif @@ -565,7 +629,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- @@ -934,9 +1000,6 @@ namespace mg5amcCpu #ifdef MGONGPUCPP_GPUIMPL // Remember: in CUDA this is a kernel for one event, in c++ this processes n events const int ievt = blockDim.x * blockIdx.x + threadIdx.x; // index of event (thread) in grid -#ifdef MGONGPU_SUPPORTS_MULTICHANNEL - using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events -#endif #else //assert( (size_t)(allmomenta) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] //assert( (size_t)(allMEs) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] @@ -944,7 +1007,6 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL using NUM_ACCESS = HostAccessNumerators; // non-trivial access: buffer includes all events using DEN_ACCESS = HostAccessDenominators; // non-trivial access: buffer includes all events - using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events #endif #endif @@ -969,11 +1031,12 @@ namespace mg5amcCpu fptype_sv& MEs_sv = E_ACCESS::kernelAccess( MEs ); MEs_sv = fptype_sv{ 0 }; #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - numerators_sv = fptype_sv{ 0 }; + for( int i = 0; i < processConfig::ndiagrams; ++i ) + numerators_sv[i] = fptype_sv{ 0 }; denominators_sv = fptype_sv{ 0 }; #endif } @@ -986,17 +1049,7 @@ namespace mg5amcCpu // *** START OF PART 1a - CUDA (one event per GPU thread) *** #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) - const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) - // NB: channelIds_sv is a scalar in CUDA - channelId = channelIds_sv; - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) - } + unsigned int channelId = getChannelId( allChannelIds ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (for the single event processed in calculate_wavefunctions) @@ -1111,38 +1164,7 @@ namespace mg5amcCpu const int ievt00 = ipagV2 * neppV; // loop on one SIMD page (neppV events) at a time #endif #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) - const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 - uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) -#ifndef MGONGPU_CPPSIMD - // NB: channelIds_sv is a scalar in no-SIMD C++ - channelId = channelIds_sv; -#else - // NB: channelIds_sv is a vector in SIMD C++ - channelId = channelIds_sv[0]; // element[0] - for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] - { - assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId - } -#endif - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) -#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT - // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) - const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 - uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - for( int i = 0; i < neppV; ++i ) - { - assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector - } -#endif - } + unsigned int channelId = getChannelId( allChannelIds, ievt00 ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (jamp2[nParity][ncolor][neppV] for the SIMD vector - or the two SIMD vectors - of events processed in calculate_wavefunctions) @@ -1315,11 +1337,12 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( allChannelIds != nullptr ) // fix segfault #892 (not 'channelIds[0] != 0') { - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + const unsigned int channelId = getChannelId( allChannelIds, ievt0, false ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - MEs_sv *= numerators_sv / denominators_sv; + MEs_sv *= numerators_sv[channelId - 1] / denominators_sv; } #endif //for( int ieppV = 0; ieppV < neppV; ieppV++ ) diff --git a/epochX/cudacpp/heft_gg_bb.sa/SubProcesses/P1_Sigma_heft_gg_bbx/CPPProcess.h b/epochX/cudacpp/heft_gg_bb.sa/SubProcesses/P1_Sigma_heft_gg_bbx/CPPProcess.h index 30c5663297..ecaebc93d2 100644 --- a/epochX/cudacpp/heft_gg_bb.sa/SubProcesses/P1_Sigma_heft_gg_bbx/CPPProcess.h +++ b/epochX/cudacpp/heft_gg_bb.sa/SubProcesses/P1_Sigma_heft_gg_bbx/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/heft_gg_bb.sa/SubProcesses/P1_Sigma_heft_gg_bbx/processConfig.h b/epochX/cudacpp/heft_gg_bb.sa/SubProcesses/P1_Sigma_heft_gg_bbx/processConfig.h new file mode 100644 index 0000000000..f7dbd383b0 --- /dev/null +++ b/epochX/cudacpp/heft_gg_bb.sa/SubProcesses/P1_Sigma_heft_gg_bbx/processConfig.h @@ -0,0 +1,16 @@ +// Copyright (C) 2025 CERN and UCLouvain. +// Licensed under the GNU Lesser General Public License (version 3 or later). +// Created by: S. Roiser (May 2025) for the MG5aMC CUDACPP plugin. +// Further modified by: ... for the MG5aMC CUDACPP plugin. + + +#ifndef MG5_CONFIG_SIGMA_HEFT_GG_BBX_H +#define MG5_CONFIG_SIGMA_HEFT_GG_BBX_H 1 + +namespace processConfig { + + constexpr int ndiagrams = 4; + +} + +#endif // MG5_CONFIG_SIGMA_HEFT_GG_BBX_H \ No newline at end of file diff --git a/epochX/cudacpp/heft_gg_bb.sa/src/HelAmps_heft.h b/epochX/cudacpp/heft_gg_bb.sa/src/HelAmps_heft.h index 1b04401547..592d4983b9 100644 --- a/epochX/cudacpp/heft_gg_bb.sa/src/HelAmps_heft.h +++ b/epochX/cudacpp/heft_gg_bb.sa/src/HelAmps_heft.h @@ -8,7 +8,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/heft_gg_bb.sa/src/Parameters_heft.cc b/epochX/cudacpp/heft_gg_bb.sa/src/Parameters_heft.cc index 0fa5a34cf0..24b36c694b 100644 --- a/epochX/cudacpp/heft_gg_bb.sa/src/Parameters_heft.cc +++ b/epochX/cudacpp/heft_gg_bb.sa/src/Parameters_heft.cc @@ -7,7 +7,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/heft_gg_bb.sa/src/Parameters_heft.h b/epochX/cudacpp/heft_gg_bb.sa/src/Parameters_heft.h index 0faa7bb71e..f95cc7b9a7 100644 --- a/epochX/cudacpp/heft_gg_bb.sa/src/Parameters_heft.h +++ b/epochX/cudacpp/heft_gg_bb.sa/src/Parameters_heft.h @@ -7,7 +7,7 @@ // Further modified by: A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/CODEGEN_mad_nobm_pp_ttW_log.txt b/epochX/cudacpp/nobm_pp_ttW.mad/CODEGEN_mad_nobm_pp_ttW_log.txt index 11380fe474..63bec4118a 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/CODEGEN_mad_nobm_pp_ttW_log.txt +++ b/epochX/cudacpp/nobm_pp_ttW.mad/CODEGEN_mad_nobm_pp_ttW_log.txt @@ -1,8 +1,11 @@ +WARNING:root:python3.12 support is still experimental. For the moment re-weighting is NOT working and do expect a LOT of syntax warning. We do not advise python3.12 for production for the moment. +Running MG5 in debug mode +Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT +Plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT has marked as NOT being validated with this version: 3.6.2. +It has been validated for the last time with version: 3.6.0 Note that this is a development version. This version is intended for development/beta testing and NOT for production. This version has not been fully tested (if at all) and might have limited user support (if at all) -Running MG5 in debug mode -Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT ************************************************************ * * * W E L C O M E to * @@ -15,7 +18,7 @@ Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT * * * * * * * * * * * * -* VERSION 3.6.0 2024-09-30 * +* VERSION 3.6.2 2025-03-19 * * * * WARNING: UNKNOWN DEVELOPMENT VERSION. * * WARNING: DO NOT USE FOR PRODUCTION * @@ -46,10 +49,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 Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt -import /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW.mg +import /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW.mg The import format was not given, so we guess it as command set stdout_level DEBUG set output information to level: 10 @@ -57,7 +59,7 @@ set zerowidth_tchannel F import model sm-no_b_mass INFO: load particles INFO: load vertices -DEBUG: model prefixing takes 0.006017446517944336  +DEBUG: model prefixing takes 0.0018105506896972656  INFO: Restrict model sm-no_b_mass with file models/sm/restrict_no_b_mass.dat . DEBUG: Simplifying conditional expressions  DEBUG: remove interactions: u s w+ at order: QED=1  @@ -181,7 +183,7 @@ INFO: Process u~ d > t t~ w- added to mirror process d u~ > t t~ w- INFO: Process c~ s > t t~ w- added to mirror process s c~ > t t~ w- INFO: Process d~ u > t t~ w+ added to mirror process u d~ > t t~ w+ INFO: Process s~ c > t t~ w+ added to mirror process c s~ > t t~ w+ -4 processes with 8 diagrams generated in 0.107 s +4 processes with 8 diagrams generated in 0.058 s Total: 4 processes with 8 diagrams add process p p > t t~ w j @1 INFO: Checking for minimal orders which gives processes. @@ -223,21 +225,21 @@ INFO: Process d~ g > t t~ w+ u~ added to mirror process g d~ > t t~ w+ u~ INFO: Process d~ u > t t~ w+ g added to mirror process u d~ > t t~ w+ g INFO: Process s~ g > t t~ w+ c~ added to mirror process g s~ > t t~ w+ c~ INFO: Process s~ c > t t~ w+ g added to mirror process c s~ > t t~ w+ g -12 processes with 144 diagrams generated in 0.640 s +12 processes with 144 diagrams generated in 0.270 s Total: 16 processes with 152 diagrams output madevent_simd ../TMPOUT/CODEGEN_mad_nobm_pp_ttW --hel_recycling=False --vector_size=32 Output will be done with PLUGIN: CUDACPP_OUTPUT Addition matrix-element will be done with PLUGIN: CUDACPP_OUTPUT -DEBUG: opt['output_options']['vector_size'] =  32 [export_v4.py at line 4334]  +DEBUG: opt['output_options']['vector_size'] =  32 [export_v4.py at line 4166]  Output will be done with PLUGIN: CUDACPP_OUTPUT DEBUG: Entering PLUGIN_ProcessExporter.__init__ (initialise the exporter) [output.py at line 171]  INFO: initialize a new directory: CODEGEN_mad_nobm_pp_ttW INFO: remove old information in CODEGEN_mad_nobm_pp_ttW DEBUG: Entering PLUGIN_ProcessExporter.copy_template (initialise the directory) [output.py at line 176]  -WARNING: File exists /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW  -INFO: Creating subdirectories in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW -WARNING: File exists /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/Cards  -WARNING: File exists /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/SubProcesses  +WARNING: File exists /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW  +INFO: Creating subdirectories in directory /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW +WARNING: File exists /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/Cards  +WARNING: File exists /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/SubProcesses  INFO: Organizing processes into subprocess groups INFO: Generating Helas calls for process: g u > t t~ w+ d WEIGHTED<=5 @1 INFO: Processing color information for process: g u > t t~ w+ d @1 @@ -271,9 +273,9 @@ FileWriter t t~ w+ d WEIGHTED<=5 @1 INFO: Finding symmetric diagrams for subprocess group gu_ttxwpd -DEBUG: len(subproc_diagrams_for_config) =  12 [model_handling.py at line 1527]  -DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12} [model_handling.py at line 1551]  -DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12} [model_handling.py at line 1552]  +DEBUG: len(subproc_diagrams_for_config) =  12 [model_handling.py at line 1538]  +DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12} [model_handling.py at line 1562]  +DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12} [model_handling.py at line 1563]  INFO: Creating files in directory P1_gd_ttxwmu DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1156]  INFO: Creating files in directory . @@ -282,9 +284,9 @@ FileWriter t t~ w- u WEIGHTED<=5 @1 INFO: Finding symmetric diagrams for subprocess group gd_ttxwmu -DEBUG: len(subproc_diagrams_for_config) =  12 [model_handling.py at line 1527]  -DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12} [model_handling.py at line 1551]  -DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12} [model_handling.py at line 1552]  +DEBUG: len(subproc_diagrams_for_config) =  12 [model_handling.py at line 1538]  +DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12} [model_handling.py at line 1562]  +DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12} [model_handling.py at line 1563]  INFO: Creating files in directory P1_gux_ttxwmdx DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1156]  INFO: Creating files in directory . @@ -293,9 +295,9 @@ FileWriter t t~ w- d~ WEIGHTED<=5 @1 INFO: Finding symmetric diagrams for subprocess group gux_ttxwmdx -DEBUG: len(subproc_diagrams_for_config) =  12 [model_handling.py at line 1527]  -DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12} [model_handling.py at line 1551]  -DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12} [model_handling.py at line 1552]  +DEBUG: len(subproc_diagrams_for_config) =  12 [model_handling.py at line 1538]  +DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12} [model_handling.py at line 1562]  +DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12} [model_handling.py at line 1563]  INFO: Creating files in directory P1_gdx_ttxwpux DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1156]  INFO: Creating files in directory . @@ -304,9 +306,9 @@ FileWriter t t~ w+ u~ WEIGHTED<=5 @1 INFO: Finding symmetric diagrams for subprocess group gdx_ttxwpux -DEBUG: len(subproc_diagrams_for_config) =  12 [model_handling.py at line 1527]  -DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12} [model_handling.py at line 1551]  -DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12} [model_handling.py at line 1552]  +DEBUG: len(subproc_diagrams_for_config) =  12 [model_handling.py at line 1538]  +DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12} [model_handling.py at line 1562]  +DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12} [model_handling.py at line 1563]  INFO: Creating files in directory P1_udx_ttxwpg DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1156]  INFO: Creating files in directory . @@ -315,9 +317,9 @@ FileWriter t t~ w+ g WEIGHTED<=5 @1 INFO: Finding symmetric diagrams for subprocess group udx_ttxwpg -DEBUG: len(subproc_diagrams_for_config) =  12 [model_handling.py at line 1527]  -DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12} [model_handling.py at line 1551]  -DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12} [model_handling.py at line 1552]  +DEBUG: len(subproc_diagrams_for_config) =  12 [model_handling.py at line 1538]  +DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12} [model_handling.py at line 1562]  +DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12} [model_handling.py at line 1563]  INFO: Creating files in directory P1_dux_ttxwmg DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1156]  INFO: Creating files in directory . @@ -326,9 +328,9 @@ FileWriter t t~ w- g WEIGHTED<=5 @1 INFO: Finding symmetric diagrams for subprocess group dux_ttxwmg -DEBUG: len(subproc_diagrams_for_config) =  12 [model_handling.py at line 1527]  -DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12} [model_handling.py at line 1551]  -DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12} [model_handling.py at line 1552]  +DEBUG: len(subproc_diagrams_for_config) =  12 [model_handling.py at line 1538]  +DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12} [model_handling.py at line 1562]  +DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12} [model_handling.py at line 1563]  INFO: Creating files in directory P0_udx_ttxwp DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1156]  INFO: Creating files in directory . @@ -337,9 +339,9 @@ FileWriter t t~ w+ WEIGHTED<=4 INFO: Finding symmetric diagrams for subprocess group udx_ttxwp -DEBUG: len(subproc_diagrams_for_config) =  2 [model_handling.py at line 1527]  -DEBUG: iconfig_to_diag =  {1: 1, 2: 2} [model_handling.py at line 1551]  -DEBUG: diag_to_iconfig =  {1: 1, 2: 2} [model_handling.py at line 1552]  +DEBUG: len(subproc_diagrams_for_config) =  2 [model_handling.py at line 1538]  +DEBUG: iconfig_to_diag =  {1: 1, 2: 2} [model_handling.py at line 1562]  +DEBUG: diag_to_iconfig =  {1: 1, 2: 2} [model_handling.py at line 1563]  INFO: Creating files in directory P0_dux_ttxwm DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1156]  INFO: Creating files in directory . @@ -348,21 +350,21 @@ FileWriter t t~ w- WEIGHTED<=4 INFO: Finding symmetric diagrams for subprocess group dux_ttxwm -DEBUG: len(subproc_diagrams_for_config) =  2 [model_handling.py at line 1527]  -DEBUG: iconfig_to_diag =  {1: 1, 2: 2} [model_handling.py at line 1551]  -DEBUG: diag_to_iconfig =  {1: 1, 2: 2} [model_handling.py at line 1552]  -Generated helas calls for 8 subprocesses (76 diagrams) in 0.202 s -Wrote files for 212 helas calls in 0.830 s +DEBUG: len(subproc_diagrams_for_config) =  2 [model_handling.py at line 1538]  +DEBUG: iconfig_to_diag =  {1: 1, 2: 2} [model_handling.py at line 1562]  +DEBUG: diag_to_iconfig =  {1: 1, 2: 2} [model_handling.py at line 1563]  +Generated helas calls for 8 subprocesses (76 diagrams) in 0.098 s +Wrote files for 212 helas calls in 10.449 s ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates FFV1 routines ALOHA: aloha creates FFV2 routines ALOHA: aloha creates VVV1 set of routines with options: P0 -ALOHA: aloha creates 3 routines in 0.204 s +ALOHA: aloha creates 3 routines in 0.097 s ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates FFV1 routines ALOHA: aloha creates FFV2 routines ALOHA: aloha creates VVV1 set of routines with options: P0 -ALOHA: aloha creates 6 routines in 0.200 s +ALOHA: aloha creates 6 routines in 0.088 s FFV1 FFV1 FFV1 @@ -370,74 +372,76 @@ ALOHA: aloha creates 6 routines in 0.200 s FFV2 FFV2 VVV1 -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/src/./HelAmps_sm_no_b_mass.h -INFO: Created file HelAmps_sm_no_b_mass.h in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/src/. +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/src/./HelAmps_sm_no_b_mass.h +INFO: Created file HelAmps_sm_no_b_mass.h in directory /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/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_nobm_pp_ttW/src/./Parameters_sm_no_b_mass.h -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/src/./Parameters_sm_no_b_mass.cc +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/src/./Parameters_sm_no_b_mass.h +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/src/./Parameters_sm_no_b_mass.cc INFO: Created files Parameters_sm_no_b_mass.h and Parameters_sm_no_b_mass.cc in directory -INFO: /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/src/. and /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/src/. +INFO: /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/src/. and /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/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_nobm_pp_ttW/Cards/me5_configuration.txt +save configuration file to /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/Cards/me5_configuration.txt INFO: Use Fortran compiler gfortran INFO: Use c++ compiler g++ INFO: Generate jpeg diagrams INFO: Generate web pages -DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW; patch -p4 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common +DEBUG: cd /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW; patch -p4 -i /shared/roiser/sw/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common patching file SubProcesses/makefile -DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/SubProcesses/P0_dux_ttxwm; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +DEBUG: cd /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/SubProcesses/P0_dux_ttxwm; patch -p6 -i /shared/roiser/sw/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file driver.f patching file matrix1.f Hunk #1 succeeded at 72 (offset 1 line). Hunk #2 succeeded at 268 (offset 41 lines). -DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/SubProcesses/P0_udx_ttxwp; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +DEBUG: cd /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/SubProcesses/P0_udx_ttxwp; patch -p6 -i /shared/roiser/sw/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file driver.f patching file matrix1.f Hunk #1 succeeded at 72 (offset 1 line). Hunk #2 succeeded at 268 (offset 41 lines). -DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/SubProcesses/P1_dux_ttxwmg; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +DEBUG: cd /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/SubProcesses/P1_dux_ttxwmg; patch -p6 -i /shared/roiser/sw/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file driver.f patching file matrix1.f Hunk #1 succeeded at 72 (offset 1 line). Hunk #2 succeeded at 316 (offset 89 lines). -DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/SubProcesses/P1_gd_ttxwmu; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +DEBUG: cd /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/SubProcesses/P1_gd_ttxwmu; patch -p6 -i /shared/roiser/sw/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file driver.f patching file matrix1.f Hunk #1 succeeded at 72 (offset 1 line). Hunk #2 succeeded at 316 (offset 89 lines). -DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/SubProcesses/P1_gdx_ttxwpux; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +DEBUG: cd /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/SubProcesses/P1_gdx_ttxwpux; patch -p6 -i /shared/roiser/sw/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file driver.f patching file matrix1.f Hunk #1 succeeded at 72 (offset 1 line). Hunk #2 succeeded at 316 (offset 89 lines). -DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/SubProcesses/P1_gu_ttxwpd; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +DEBUG: cd /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/SubProcesses/P1_gu_ttxwpd; patch -p6 -i /shared/roiser/sw/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file driver.f patching file matrix1.f Hunk #1 succeeded at 72 (offset 1 line). Hunk #2 succeeded at 316 (offset 89 lines). -DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/SubProcesses/P1_gux_ttxwmdx; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +DEBUG: cd /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/SubProcesses/P1_gux_ttxwmdx; patch -p6 -i /shared/roiser/sw/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file driver.f patching file matrix1.f Hunk #1 succeeded at 72 (offset 1 line). Hunk #2 succeeded at 316 (offset 89 lines). -DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/SubProcesses/P1_udx_ttxwpg; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +DEBUG: cd /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/SubProcesses/P1_udx_ttxwpg; patch -p6 -i /shared/roiser/sw/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file driver.f patching file matrix1.f Hunk #1 succeeded at 72 (offset 1 line). Hunk #2 succeeded at 316 (offset 89 lines). DEBUG: p.returncode =  0 [output.py at line 263]  -Output to directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW done. +Output to directory /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW done. Type "launch" to generate events from this process, or see -/data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/README +/shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/README Run "open index.html" to see more information about this process. quit -real 0m4.658s -user 0m4.105s -sys 0m0.537s -Code generation completed in 5 seconds +real 0m17.259s +user 0m2.677s +sys 0m1.431s +Code generation completed in 18 seconds +/shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/bin/internal/banner.py:3309: SyntaxWarning: invalid escape sequence '\s' + function_pat = re.compile('^\s+(?:SUBROUTINE|(?:%(type)s)\s+function)\s+([a-zA-Z]\w*)' \ ************************************************************ * * * W E L C O M E to * @@ -450,7 +454,7 @@ Code generation completed in 5 seconds * * * * * * * * * * * * -* VERSION 3.6.0 * +* VERSION 3.6.2 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -458,10 +462,9 @@ Code generation completed in 5 seconds * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/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_nobm_pp_ttW/Cards/me5_configuration.txt -Using default text editor "vi". Set another one in ./input/mg5_configuration.txt +INFO: load configuration from /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/Cards/me5_configuration.txt +INFO: load configuration from /shared/roiser/sw/madgraph4gpu/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/Cards/me5_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 @@ -480,7 +483,7 @@ launch in debug mode * * * * * * * * * * * * -* VERSION 3.6.0 * +* VERSION 3.6.2 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -488,10 +491,9 @@ launch in debug mode * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/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_nobm_pp_ttW/Cards/me5_configuration.txt -Using default text editor "vi". Set another one in ./input/mg5_configuration.txt +INFO: load configuration from /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/Cards/me5_configuration.txt +INFO: load configuration from /shared/roiser/sw/madgraph4gpu/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_nobm_pp_ttW/Cards/me5_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/nobm_pp_ttW.mad/Cards/me5_configuration.txt b/epochX/cudacpp/nobm_pp_ttW.mad/Cards/me5_configuration.txt index 68b4c46295..a0212bfb62 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/Cards/me5_configuration.txt +++ b/epochX/cudacpp/nobm_pp_ttW.mad/Cards/me5_configuration.txt @@ -235,7 +235,7 @@ # pineappl = pineappl -#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo +#mg5_path = /shared/roiser/sw/madgraph4gpu/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo +#mg5_path = /shared/roiser/sw/madgraph4gpu/MG5aMC/mg5amcnlo diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/Cards/proc_card_mg5.dat b/epochX/cudacpp/nobm_pp_ttW.mad/Cards/proc_card_mg5.dat index 72b31976a0..fd4a094f1f 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/Cards/proc_card_mg5.dat +++ b/epochX/cudacpp/nobm_pp_ttW.mad/Cards/proc_card_mg5.dat @@ -8,7 +8,7 @@ #* * * * #* * #* * -#* VERSION 3.6.0 2024-09-30 * +#* VERSION 3.6.2 2025-03-19 * #* * #* WARNING: UNKNOWN DEVELOPMENT VERSION. * #* WARNING: DO NOT USE FOR PRODUCTION * diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/Cards/run_card.dat b/epochX/cudacpp/nobm_pp_ttW.mad/Cards/run_card.dat index 5eca3e3f2b..48beb899d9 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/Cards/run_card.dat +++ b/epochX/cudacpp/nobm_pp_ttW.mad/Cards/run_card.dat @@ -127,6 +127,7 @@ # Parton level cuts definition * #******************************* 0.0 = dsqrt_shat ! minimal shat for full process + -1 = dsqrt_shatmax ! maximum shat for full process # # #********************************************************************* diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/Cards/run_card_default.dat b/epochX/cudacpp/nobm_pp_ttW.mad/Cards/run_card_default.dat index 3b445d02a0..c22a9e0249 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/Cards/run_card_default.dat +++ b/epochX/cudacpp/nobm_pp_ttW.mad/Cards/run_card_default.dat @@ -127,6 +127,7 @@ # Parton level cuts definition * #******************************* 0.0 = dsqrt_shat ! minimal shat for full process + -1 = dsqrt_shatmax ! maximum shat for full process # # #********************************************************************* diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/MGMEVersion.txt b/epochX/cudacpp/nobm_pp_ttW.mad/MGMEVersion.txt index 084e244cea..77a069e39b 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/MGMEVersion.txt +++ b/epochX/cudacpp/nobm_pp_ttW.mad/MGMEVersion.txt @@ -1 +1 @@ -3.6.0 \ No newline at end of file +3.6.2 \ No newline at end of file diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/Source/alfas_functions.f b/epochX/cudacpp/nobm_pp_ttW.mad/Source/alfas_functions.f index bb69a6384e..84aeff369c 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/Source/alfas_functions.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/Source/alfas_functions.f @@ -188,6 +188,10 @@ SUBROUTINE NEWTON1(T,A_IN,A_OUT,NLOOP,NF) A_OUT=A_IN/(1D0+A_IN*B0(NF)*T) IF (NLOOP .EQ. 1) RETURN + if (1D0+A_IN*B0(NF)*T.le.0d0)THEN + A_OUT = 9d98 + RETURN + ENDIF A_OUT=A_IN/(1D0+B0(NF)*A_IN*T+C1(NF)*A_IN*LOG(1D0+A_IN*B0(NF)*T)) IF (A_OUT .LT. 0D0) AS=0.3D0 30 AS=A_OUT diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/Source/cuts.inc b/epochX/cudacpp/nobm_pp_ttW.mad/Source/cuts.inc index 23d099e5f7..a8ccc7420d 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/Source/cuts.inc +++ b/epochX/cudacpp/nobm_pp_ttW.mad/Source/cuts.inc @@ -37,7 +37,7 @@ C REAL*8 misset,missetmax,ptheavy REAL*8 ptllmin,ptllmax integer maxjetflavor - REAl*8 dsqrt_shat + REAl*8 dsqrt_shat,dsqrt_shatmax COMMON /to_min_max_cuts/ & PTJmax,PTBmax,PTAmax,PTLmax, @@ -60,7 +60,7 @@ C & ht2max,ht3max,ht4max, & htjmin,htjmax,ihtmin,ihtmax, & misset,missetmax,ptheavy, - & ptllmin,ptllmax,dsqrt_shat, + & ptllmin,ptllmax,dsqrt_shat,dsqrt_shatmax, & maxjetflavor C diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/Source/make_opts b/epochX/cudacpp/nobm_pp_ttW.mad/Source/make_opts index e4b87ee6ad..f9f7b64bb5 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/Source/make_opts +++ b/epochX/cudacpp/nobm_pp_ttW.mad/Source/make_opts @@ -5,8 +5,8 @@ GLOBAL_FLAG=-O3 -ffast-math -fbounds-check MACFLAG= MG5AMC_VERSION=SpecifiedByMG5aMCAtRunTime PYTHIA8_PATH=NotInstalled -STDLIB_FLAG= STDLIB=-lstdc++ +STDLIB_FLAG= #end_of_make_opts_variables BIASLIBDIR=../../../lib/ diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/Source/makefile b/epochX/cudacpp/nobm_pp_ttW.mad/Source/makefile index 291ca907ee..f9321e7a94 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/Source/makefile +++ b/epochX/cudacpp/nobm_pp_ttW.mad/Source/makefile @@ -73,6 +73,7 @@ $(BINDIR)gensudgrid: $(GENSUDGRID) $(LIBDIR)libpdf.$(libext) $(LIBDIR)libgammaUP # Dependencies dsample.o: DiscreteSampler.o dsample.f genps.inc StringCast.o vector.inc +pawgraph.o: vector.inc DiscreteSampler.o: StringCast.o invarients.o: invarients.f genps.inc gen_ximprove.o: gen_ximprove.f run_config.inc run_card.inc diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/Source/run_card.inc b/epochX/cudacpp/nobm_pp_ttW.mad/Source/run_card.inc index 2588190439..e169c1f193 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/Source/run_card.inc +++ b/epochX/cudacpp/nobm_pp_ttW.mad/Source/run_card.inc @@ -88,6 +88,8 @@ DSQRT_SHAT = 0.000000000000000D+00 + DSQRT_SHATMAX = -1 + LIMHEL = 0.000000000000000D+00 PTJ = 2.000000000000000D+01 diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/Bridge.h b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/Bridge.h index 87aa648dd2..49b928db67 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/Bridge.h +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/Bridge.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: S. Roiser (Nov 2021) for the MG5aMC CUDACPP plugin. -// Further modified by: S. Roiser, J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2021-2025) for the MG5aMC CUDACPP plugin. #ifndef BRIDGE_H #define BRIDGE_H 1 @@ -255,11 +255,15 @@ namespace mg5amcCpu throw std::logic_error( "Bridge constructor: FIXME! cannot choose gputhreads" ); // this should never happen! m_gpublocks = m_nevt / m_gputhreads; } +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Instantiate device Bridge (nevt=" << m_nevt << ", gpublocks=" << m_gpublocks << ", gputhreads=" << m_gputhreads << ", gpublocks*gputhreads=" << m_gpublocks * m_gputhreads << ")" << std::endl; +#endif m_pmek.reset( new MatrixElementKernelDevice( m_devMomentaC, m_devGs, m_devRndHel, m_devRndCol, m_devChannelIds, m_devMEs, m_devSelHel, m_devSelCol, m_gpublocks, m_gputhreads ) ); #else +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Instantiate host Bridge (nevt=" << m_nevt << ")" << std::endl; +#endif m_pmek.reset( new MatrixElementKernelHost( m_hstMomentaC, m_hstGs, m_hstRndHel, m_hstRndCol, m_hstChannelIds, m_hstMEs, m_hstSelHel, m_hstSelCol, m_nevt ) ); #endif // MGONGPUCPP_GPUIMPL // Create a process object, read param card and set parameters @@ -290,8 +294,10 @@ namespace mg5amcCpu throw std::runtime_error( "Bridge: gpublocks*gputhreads must equal m_nevt in set_gpugrid" ); m_gpublocks = gpublocks; m_gputhreads = gputhreads; +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Set grid in Bridge (nevt=" << m_nevt << ", gpublocks=" << m_gpublocks << ", gputhreads=" << m_gputhreads << ", gpublocks*gputhreads=" << m_gpublocks * m_gputhreads << ")" << std::endl; +#endif m_pmek->setGrid( m_gpublocks, m_gputhreads ); } #endif @@ -347,7 +353,9 @@ namespace mg5amcCpu if( goodHelOnly ) return; m_pmek->computeMatrixElements( useChannelIds ); copyHostFromDevice( m_hstMEs, m_devMEs ); +#ifdef MGONGPUCPP_VERBOSE flagAbnormalMEs( m_hstMEs.data(), m_nevt ); +#endif copyHostFromDevice( m_hstSelHel, m_devSelHel ); copyHostFromDevice( m_hstSelCol, m_devSelCol ); if constexpr( std::is_same_v ) @@ -400,7 +408,9 @@ namespace mg5amcCpu } if( goodHelOnly ) return; m_pmek->computeMatrixElements( useChannelIds ); +#ifdef MGONGPUCPP_VERBOSE flagAbnormalMEs( m_hstMEs.data(), m_nevt ); +#endif if constexpr( std::is_same_v ) { memcpy( mes, m_hstMEs.data(), m_hstMEs.bytes() ); diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/GpuRuntime.h b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/GpuRuntime.h index 860c7fde16..6a4b946e74 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/GpuRuntime.h +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/GpuRuntime.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: J. Teig (Jun 2023, based on earlier work by S. Roiser) for the MG5aMC CUDACPP plugin. -// Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2025) for the MG5aMC CUDACPP plugin. #ifndef MG5AMC_GPURUNTIME_H #define MG5AMC_GPURUNTIME_H 1 @@ -50,7 +50,7 @@ namespace mg5amcGpu // Set up CUDA application // ** NB: strictly speaking this is not needed when using the CUDA runtime API ** // Calling cudaSetDevice on startup is useful to properly book-keep the time spent in CUDA initialization - static void setUp( const bool debug = true ) + static void setUp( const bool debug = false ) // ZW: changed debug default to false { // ** NB: it is useful to call cudaSetDevice, or cudaFree, to properly book-keep the time spent in CUDA initialization // ** NB: otherwise, the first CUDA operation (eg a cudaMemcpyToSymbol in CPPProcess ctor) appears to take much longer! @@ -71,7 +71,7 @@ namespace mg5amcGpu // ** NB: strictly speaking this is not needed when using the CUDA runtime API ** // Calling cudaDeviceReset on shutdown is only needed for checking memory leaks in cuda-memcheck // See https://docs.nvidia.com/cuda/cuda-memcheck/index.html#leak-checking - static void tearDown( const bool debug = true ) + static void tearDown( const bool debug = false ) // ZW: changed debug default to false { if( debug ) std::cout << "__GpuRuntime: calling GpuDeviceReset()" << std::endl; checkGpu( gpuDeviceReset() ); diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/MGVersion.txt b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/MGVersion.txt index 084e244cea..77a069e39b 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/MGVersion.txt +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/MGVersion.txt @@ -1 +1 @@ -3.6.0 \ No newline at end of file +3.6.2 \ No newline at end of file diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/MatrixElementKernels.cc b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/MatrixElementKernels.cc index f463977c1a..703ea3781c 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/MatrixElementKernels.cc +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/MatrixElementKernels.cc @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: A. Valassi (Jan 2022) for the MG5aMC CUDACPP plugin. -// Further modified by: J. Teig, A. Valassi (2022-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: J. Teig, A. Valassi, Z. Wettersten (2022-2025) for the MG5aMC CUDACPP plugin. #include "MatrixElementKernels.h" @@ -60,7 +60,9 @@ namespace mg5amcCpu #ifdef MGONGPU_CHANNELID_DEBUG MatrixElementKernelBase::dumpNevtProcessedByChannel(); #endif +#ifdef MGONGPUCPP_VERBOSE MatrixElementKernelBase::dumpSignallingFPEs(); +#endif } //-------------------------------------------------------------------------- diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/MatrixElementKernels.h b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/MatrixElementKernels.h index 7acff4b308..8da04d7945 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/MatrixElementKernels.h +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/MatrixElementKernels.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: A. Valassi (Jan 2022) for the MG5aMC CUDACPP plugin. -// Further modified by: J. Teig, A. Valassi (2022-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: J. Teig, A. Valassi, Z. Wettersten (2022-2025) for the MG5aMC CUDACPP plugin. #ifndef MATRIXELEMENTKERNELS_H #define MATRIXELEMENTKERNELS_H 1 @@ -134,7 +134,7 @@ namespace mg5amcCpu // Does this host system support the SIMD used in the matrix element calculation? // [NB: this is private, SIMD vectorization in mg5amc C++ code is currently only used in the ME calculations below MatrixElementKernelHost!] - static bool hostSupportsSIMD( const bool verbose = true ); + static bool hostSupportsSIMD( const bool verbose = false ); // ZW: default verbose false private: diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/MemoryAccessGs.h b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/MemoryAccessGs.h index 63c17a68fa..50a6aaef4d 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/MemoryAccessGs.h +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/MemoryAccessGs.h @@ -128,6 +128,14 @@ namespace mg5amcCpu #endif } + // Locate a field (output) in a memory buffer (input) from a kernel event-indexing mechanism (internal) + // [Signature (SCALAR OR VECTOR) ===> fptype_sv* kernelAccess( fptype* buffer ) <===] + static __host__ __device__ inline fptype_sv* + kernelAccessP( fptype* buffer ) + { + return reinterpret_cast( buffer ); + } + // Locate a field (output) in a memory buffer (input) from a kernel event-indexing mechanism (internal) and the given field indexes (input) // [Signature (const, SCALAR) ===> const fptype& kernelAccessConst( const fptype* buffer ) <===] static constexpr auto kernelAccessConst_s = diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/MemoryBuffers.h b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/MemoryBuffers.h index 1e7cc050f7..7c6daa1dbb 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/MemoryBuffers.h +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/MemoryBuffers.h @@ -13,6 +13,7 @@ #include "CPPProcess.h" #include "GpuRuntime.h" #include "Parameters_sm_no_b_mass.h" +#include "processConfig.h" #include @@ -274,7 +275,8 @@ namespace mg5amcCpu typedef BufferBase BufferNumerators; // The size (number of elements) per event in a memory buffer for numerators - constexpr size_t sizePerEventNumerators = 1; + // (should be equal to the number of diagrams in the process) + constexpr size_t sizePerEventNumerators = processConfig::ndiagrams; #ifndef MGONGPUCPP_GPUIMPL // A class encapsulating a C++ host buffer for gs diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_dux_ttxwm/CPPProcess.cc b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_dux_ttxwm/CPPProcess.cc index 97050f0aa2..34562bc93a 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_dux_ttxwm/CPPProcess.cc +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_dux_ttxwm/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -25,6 +25,7 @@ #include "MemoryAccessMatrixElements.h" #include "MemoryAccessMomenta.h" #include "MemoryAccessWavefunctions.h" +#include "processConfig.h" #ifdef MGONGPU_SUPPORTS_MULTICHANNEL #include "MemoryAccessDenominators.h" @@ -97,6 +98,69 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { +#ifdef MGONGPU_SUPPORTS_MULTICHANNEL + __device__ INLINE unsigned int getChannelId( const unsigned int* allChannelIds +#ifndef MGONGPUCPP_GPUIMPL + , + const int ievt00, + bool sanityCheckMixedPrecision = true +#endif + ) + { + unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr +#ifdef MGONGPUCPP_GPUIMPL + using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page + if( allChannelIds != nullptr ) + { + const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) + const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) + // NB: channelIds_sv is a scalar in CUDA + channelId = channelIds_sv; + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + } +#else // Cuda or C++ + using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + if( allChannelIds != nullptr ) + { + // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) + const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 + uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) +#ifndef MGONGPU_CPPSIMD + // NB: channelIds_sv is a scalar in no-SIMD C++ + channelId = channelIds_sv; +#else + // NB: channelIds_sv is a vector in SIMD C++ + channelId = channelIds_sv[0]; // element[0] + for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] + { + assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId + } +#endif + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + if( sanityCheckMixedPrecision ) + { +#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT + // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) + const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 + uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + for( int i = 0; i < neppV; ++i ) + { + assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector + } +#endif + } + } +#endif // MGONGPUCPP_GPUIMPL + return channelId; + } +#endif // MGONGPU_SUPPORTS_MULTICHANNEL + constexpr int nw6 = CPPProcess::nw6; // dimensions of each wavefunction (HELAS KEK 91-11): e.g. 6 for e+ e- -> mu+ mu- (fermions and vectors) constexpr int npar = CPPProcess::npar; // #particles in total (external = initial + final): e.g. 4 for e+ e- -> mu+ mu- constexpr int ncomb = CPPProcess::ncomb; // #helicity combinations: e.g. 16 for e+ e- -> mu+ mu- (2**4 = fermion spin up/down ** npar) @@ -306,7 +370,7 @@ namespace mg5amcCpu COUPs[ndcoup + iicoup] = allCOUPs[ndcoup + iicoup]; // independent couplings, fixed for all events fptype* MEs = E_ACCESS::ieventAccessRecord( allMEs, ievt0 ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); #endif #endif @@ -316,7 +380,7 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Numerators and denominators for the current event (CUDA) or SIMD event page (C++) - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); #endif @@ -339,8 +403,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1 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] ); + if( channelId != 0 ) + { + numerators_sv[0] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 6. * amp_sv[0]; jamp_sv[1] -= 1. / 2. * amp_sv[0]; @@ -353,8 +420,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 2 FFV1_0( w_fp[0], w_fp[5], w_fp[6], 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] ); + if( channelId != 0 ) + { + numerators_sv[1] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 6. * amp_sv[0]; jamp_sv[1] -= 1. / 2. * amp_sv[0]; @@ -579,7 +649,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- @@ -950,9 +1022,6 @@ namespace mg5amcCpu #ifdef MGONGPUCPP_GPUIMPL // Remember: in CUDA this is a kernel for one event, in c++ this processes n events const int ievt = blockDim.x * blockIdx.x + threadIdx.x; // index of event (thread) in grid -#ifdef MGONGPU_SUPPORTS_MULTICHANNEL - using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events -#endif #else //assert( (size_t)(allmomenta) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] //assert( (size_t)(allMEs) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] @@ -960,7 +1029,6 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL using NUM_ACCESS = HostAccessNumerators; // non-trivial access: buffer includes all events using DEN_ACCESS = HostAccessDenominators; // non-trivial access: buffer includes all events - using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events #endif #endif @@ -985,11 +1053,12 @@ namespace mg5amcCpu fptype_sv& MEs_sv = E_ACCESS::kernelAccess( MEs ); MEs_sv = fptype_sv{ 0 }; #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - numerators_sv = fptype_sv{ 0 }; + for( int i = 0; i < processConfig::ndiagrams; ++i ) + numerators_sv[i] = fptype_sv{ 0 }; denominators_sv = fptype_sv{ 0 }; #endif } @@ -1002,17 +1071,7 @@ namespace mg5amcCpu // *** START OF PART 1a - CUDA (one event per GPU thread) *** #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) - const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) - // NB: channelIds_sv is a scalar in CUDA - channelId = channelIds_sv; - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) - } + unsigned int channelId = getChannelId( allChannelIds ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (for the single event processed in calculate_wavefunctions) @@ -1127,38 +1186,7 @@ namespace mg5amcCpu const int ievt00 = ipagV2 * neppV; // loop on one SIMD page (neppV events) at a time #endif #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) - const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 - uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) -#ifndef MGONGPU_CPPSIMD - // NB: channelIds_sv is a scalar in no-SIMD C++ - channelId = channelIds_sv; -#else - // NB: channelIds_sv is a vector in SIMD C++ - channelId = channelIds_sv[0]; // element[0] - for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] - { - assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId - } -#endif - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) -#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT - // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) - const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 - uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - for( int i = 0; i < neppV; ++i ) - { - assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector - } -#endif - } + unsigned int channelId = getChannelId( allChannelIds, ievt00 ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (jamp2[nParity][ncolor][neppV] for the SIMD vector - or the two SIMD vectors - of events processed in calculate_wavefunctions) @@ -1331,11 +1359,12 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( allChannelIds != nullptr ) // fix segfault #892 (not 'channelIds[0] != 0') { - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + const unsigned int channelId = getChannelId( allChannelIds, ievt0, false ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - MEs_sv *= numerators_sv / denominators_sv; + MEs_sv *= numerators_sv[channelId - 1] / denominators_sv; } #endif //for( int ieppV = 0; ieppV < neppV; ieppV++ ) diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_dux_ttxwm/CPPProcess.h b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_dux_ttxwm/CPPProcess.h index 9d6c262053..f581e4e5eb 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_dux_ttxwm/CPPProcess.h +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_dux_ttxwm/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_dux_ttxwm/auto_dsig.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_dux_ttxwm/auto_dsig.f index 7f7324dc0b..dde4a1e826 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_dux_ttxwm/auto_dsig.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_dux_ttxwm/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_dux_ttxwm/auto_dsig1.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_dux_ttxwm/auto_dsig1.f index 08dd1f728a..36ac113779 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_dux_ttxwm/auto_dsig1.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_dux_ttxwm/auto_dsig1.f @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -138,7 +138,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDDO QSCALE=QSCALE/2D0 ELSE - QSCALE=DSQRT(Q2FACT(IB(1))) + QSCALE=DSQRT(Q2FACT(1)) ENDIF D1=PDG2PDF(LPP(IB(1)),1, IB(1),XBK(IB(1)), QSCALE) S1=PDG2PDF(LPP(IB(1)),3, IB(1),XBK(IB(1)), QSCALE) @@ -146,7 +146,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) IF (DSQRT(Q2FACT(IB(2))).NE.0D0) THEN - QSCALE=DSQRT(Q2FACT(IB(2))) + QSCALE=DSQRT(Q2FACT(2)) ENDIF CX2=PDG2PDF(LPP(IB(2)),-4, IB(2),XBK(IB(2)), QSCALE) UX2=PDG2PDF(LPP(IB(2)),-2, IB(2),XBK(IB(2)), QSCALE) @@ -225,7 +225,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -297,6 +297,10 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, INTEGER I_EE C +C STUFF FOR UPC +C + DOUBLE PRECISION PHOTONPDFSQUARE +C C EXTERNAL FUNCTIONS C LOGICAL PASSCUTS @@ -380,16 +384,16 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, IF (ABS(LPP(IB(1))).GE.1) THEN C LP=SIGN(1,LPP(IB(1))) D1(IVEC)=PDG2PDF(LPP(IB(1)),1, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) S1(IVEC)=PDG2PDF(LPP(IB(1)),3, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) CX2(IVEC)=PDG2PDF(LPP(IB(2)),-4, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) UX2(IVEC)=PDG2PDF(LPP(IB(2)),-2, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) ENDIF ENDDO ! IWARP LOOP ENDDO ! CURRWARP LOOP diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_dux_ttxwm/matrix1.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_dux_ttxwm/matrix1.f index 5c47e1c729..74552b2a97 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_dux_ttxwm/matrix1.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_dux_ttxwm/matrix1.f @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -355,7 +355,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -399,7 +399,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C INTEGER I,J,M,N COMPLEX*16 ZTEMP, TMP_JAMP(1) - REAL*8 CF(NCOLOR,NCOLOR) + INTEGER CF(NCOLOR*(NCOLOR+1)/2) + INTEGER DENOM, CF_INDEX COMPLEX*16 AMP(NGRAPHS), JAMP(NCOLOR,NAMPSO) COMPLEX*16 W(6,NWAVEFUNCS) C Needed for v4 models @@ -444,11 +445,10 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C C COLOR DATA C - DATA (CF(I, 1),I= 1, 2) /9.000000000000000D+00 - $ ,3.000000000000000D+00/ + DATA DENOM/1/ + DATA (CF(I),I= 1, 2) /9,6/ C 1 T(2,1) T(3,4) - DATA (CF(I, 2),I= 1, 2) /3.000000000000000D+00 - $ ,9.000000000000000D+00/ + DATA (CF(I),I= 3, 3) /9/ C 1 T(2,4) T(3,1) C ---------- C BEGIN CODE @@ -497,10 +497,12 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) MATRIX1 = 0.D0 DO M = 1, NAMPSO + CF_INDEX = 0 DO I = 1, NCOLOR ZTEMP = (0.D0,0.D0) - DO J = 1, NCOLOR - ZTEMP = ZTEMP + CF(J,I)*JAMP(J,M) + DO J = I, NCOLOR + CF_INDEX = CF_INDEX + 1 + ZTEMP = ZTEMP + CF(CF_INDEX)*JAMP(J,M) ENDDO DO N = 1, NAMPSO @@ -509,6 +511,7 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) ENDDO ENDDO ENDDO + MATRIX1 = MATRIX1/DENOM IF(SDE_STRAT.EQ.1)THEN AMP2(1)=AMP2(1)+AMP(1)*DCONJG(AMP(1)) diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_dux_ttxwm/matrix11.png b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_dux_ttxwm/matrix11.png new file mode 100644 index 0000000000..6f33f8de22 Binary files /dev/null and b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_dux_ttxwm/matrix11.png differ diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_dux_ttxwm/processConfig.h b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_dux_ttxwm/processConfig.h new file mode 100644 index 0000000000..4f350b6335 --- /dev/null +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_dux_ttxwm/processConfig.h @@ -0,0 +1,16 @@ +// Copyright (C) 2025 CERN and UCLouvain. +// Licensed under the GNU Lesser General Public License (version 3 or later). +// Created by: S. Roiser (May 2025) for the MG5aMC CUDACPP plugin. +// Further modified by: ... for the MG5aMC CUDACPP plugin. + + +#ifndef MG5_CONFIG_SIGMA_SM_NO_B_MASS_DUX_TTXWM_H +#define MG5_CONFIG_SIGMA_SM_NO_B_MASS_DUX_TTXWM_H 1 + +namespace processConfig { + + constexpr int ndiagrams = 2; + +} + +#endif // MG5_CONFIG_SIGMA_SM_NO_B_MASS_DUX_TTXWM_H \ No newline at end of file diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_udx_ttxwp/CPPProcess.cc b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_udx_ttxwp/CPPProcess.cc index 57246ba1e7..254db04176 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_udx_ttxwp/CPPProcess.cc +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_udx_ttxwp/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -25,6 +25,7 @@ #include "MemoryAccessMatrixElements.h" #include "MemoryAccessMomenta.h" #include "MemoryAccessWavefunctions.h" +#include "processConfig.h" #ifdef MGONGPU_SUPPORTS_MULTICHANNEL #include "MemoryAccessDenominators.h" @@ -97,6 +98,69 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { +#ifdef MGONGPU_SUPPORTS_MULTICHANNEL + __device__ INLINE unsigned int getChannelId( const unsigned int* allChannelIds +#ifndef MGONGPUCPP_GPUIMPL + , + const int ievt00, + bool sanityCheckMixedPrecision = true +#endif + ) + { + unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr +#ifdef MGONGPUCPP_GPUIMPL + using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page + if( allChannelIds != nullptr ) + { + const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) + const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) + // NB: channelIds_sv is a scalar in CUDA + channelId = channelIds_sv; + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + } +#else // Cuda or C++ + using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + if( allChannelIds != nullptr ) + { + // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) + const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 + uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) +#ifndef MGONGPU_CPPSIMD + // NB: channelIds_sv is a scalar in no-SIMD C++ + channelId = channelIds_sv; +#else + // NB: channelIds_sv is a vector in SIMD C++ + channelId = channelIds_sv[0]; // element[0] + for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] + { + assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId + } +#endif + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + if( sanityCheckMixedPrecision ) + { +#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT + // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) + const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 + uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + for( int i = 0; i < neppV; ++i ) + { + assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector + } +#endif + } + } +#endif // MGONGPUCPP_GPUIMPL + return channelId; + } +#endif // MGONGPU_SUPPORTS_MULTICHANNEL + constexpr int nw6 = CPPProcess::nw6; // dimensions of each wavefunction (HELAS KEK 91-11): e.g. 6 for e+ e- -> mu+ mu- (fermions and vectors) constexpr int npar = CPPProcess::npar; // #particles in total (external = initial + final): e.g. 4 for e+ e- -> mu+ mu- constexpr int ncomb = CPPProcess::ncomb; // #helicity combinations: e.g. 16 for e+ e- -> mu+ mu- (2**4 = fermion spin up/down ** npar) @@ -306,7 +370,7 @@ namespace mg5amcCpu COUPs[ndcoup + iicoup] = allCOUPs[ndcoup + iicoup]; // independent couplings, fixed for all events fptype* MEs = E_ACCESS::ieventAccessRecord( allMEs, ievt0 ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); #endif #endif @@ -316,7 +380,7 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Numerators and denominators for the current event (CUDA) or SIMD event page (C++) - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); #endif @@ -339,8 +403,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1 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] ); + if( channelId != 0 ) + { + numerators_sv[0] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 6. * amp_sv[0]; jamp_sv[1] -= 1. / 2. * amp_sv[0]; @@ -353,8 +420,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 2 FFV1_0( w_fp[0], w_fp[5], w_fp[6], 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] ); + if( channelId != 0 ) + { + numerators_sv[1] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 6. * amp_sv[0]; jamp_sv[1] -= 1. / 2. * amp_sv[0]; @@ -579,7 +649,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- @@ -950,9 +1022,6 @@ namespace mg5amcCpu #ifdef MGONGPUCPP_GPUIMPL // Remember: in CUDA this is a kernel for one event, in c++ this processes n events const int ievt = blockDim.x * blockIdx.x + threadIdx.x; // index of event (thread) in grid -#ifdef MGONGPU_SUPPORTS_MULTICHANNEL - using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events -#endif #else //assert( (size_t)(allmomenta) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] //assert( (size_t)(allMEs) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] @@ -960,7 +1029,6 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL using NUM_ACCESS = HostAccessNumerators; // non-trivial access: buffer includes all events using DEN_ACCESS = HostAccessDenominators; // non-trivial access: buffer includes all events - using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events #endif #endif @@ -985,11 +1053,12 @@ namespace mg5amcCpu fptype_sv& MEs_sv = E_ACCESS::kernelAccess( MEs ); MEs_sv = fptype_sv{ 0 }; #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - numerators_sv = fptype_sv{ 0 }; + for( int i = 0; i < processConfig::ndiagrams; ++i ) + numerators_sv[i] = fptype_sv{ 0 }; denominators_sv = fptype_sv{ 0 }; #endif } @@ -1002,17 +1071,7 @@ namespace mg5amcCpu // *** START OF PART 1a - CUDA (one event per GPU thread) *** #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) - const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) - // NB: channelIds_sv is a scalar in CUDA - channelId = channelIds_sv; - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) - } + unsigned int channelId = getChannelId( allChannelIds ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (for the single event processed in calculate_wavefunctions) @@ -1127,38 +1186,7 @@ namespace mg5amcCpu const int ievt00 = ipagV2 * neppV; // loop on one SIMD page (neppV events) at a time #endif #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) - const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 - uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) -#ifndef MGONGPU_CPPSIMD - // NB: channelIds_sv is a scalar in no-SIMD C++ - channelId = channelIds_sv; -#else - // NB: channelIds_sv is a vector in SIMD C++ - channelId = channelIds_sv[0]; // element[0] - for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] - { - assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId - } -#endif - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) -#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT - // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) - const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 - uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - for( int i = 0; i < neppV; ++i ) - { - assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector - } -#endif - } + unsigned int channelId = getChannelId( allChannelIds, ievt00 ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (jamp2[nParity][ncolor][neppV] for the SIMD vector - or the two SIMD vectors - of events processed in calculate_wavefunctions) @@ -1331,11 +1359,12 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( allChannelIds != nullptr ) // fix segfault #892 (not 'channelIds[0] != 0') { - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + const unsigned int channelId = getChannelId( allChannelIds, ievt0, false ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - MEs_sv *= numerators_sv / denominators_sv; + MEs_sv *= numerators_sv[channelId - 1] / denominators_sv; } #endif //for( int ieppV = 0; ieppV < neppV; ieppV++ ) diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_udx_ttxwp/CPPProcess.h b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_udx_ttxwp/CPPProcess.h index cd8edd3e39..39f3958078 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_udx_ttxwp/CPPProcess.h +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_udx_ttxwp/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_udx_ttxwp/auto_dsig.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_udx_ttxwp/auto_dsig.f index 2e439af0a3..86d348b359 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_udx_ttxwp/auto_dsig.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_udx_ttxwp/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_udx_ttxwp/auto_dsig1.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_udx_ttxwp/auto_dsig1.f index 0808ce67ce..d419649d81 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_udx_ttxwp/auto_dsig1.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_udx_ttxwp/auto_dsig1.f @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -138,7 +138,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDDO QSCALE=QSCALE/2D0 ELSE - QSCALE=DSQRT(Q2FACT(IB(1))) + QSCALE=DSQRT(Q2FACT(1)) ENDIF U1=PDG2PDF(LPP(IB(1)),2, IB(1),XBK(IB(1)), QSCALE) C1=PDG2PDF(LPP(IB(1)),4, IB(1),XBK(IB(1)), QSCALE) @@ -146,7 +146,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) IF (DSQRT(Q2FACT(IB(2))).NE.0D0) THEN - QSCALE=DSQRT(Q2FACT(IB(2))) + QSCALE=DSQRT(Q2FACT(2)) ENDIF SX2=PDG2PDF(LPP(IB(2)),-3, IB(2),XBK(IB(2)), QSCALE) DX2=PDG2PDF(LPP(IB(2)),-1, IB(2),XBK(IB(2)), QSCALE) @@ -225,7 +225,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -297,6 +297,10 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, INTEGER I_EE C +C STUFF FOR UPC +C + DOUBLE PRECISION PHOTONPDFSQUARE +C C EXTERNAL FUNCTIONS C LOGICAL PASSCUTS @@ -380,16 +384,16 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, IF (ABS(LPP(IB(1))).GE.1) THEN C LP=SIGN(1,LPP(IB(1))) U1(IVEC)=PDG2PDF(LPP(IB(1)),2, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) C1(IVEC)=PDG2PDF(LPP(IB(1)),4, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) SX2(IVEC)=PDG2PDF(LPP(IB(2)),-3, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) DX2(IVEC)=PDG2PDF(LPP(IB(2)),-1, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) ENDIF ENDDO ! IWARP LOOP ENDDO ! CURRWARP LOOP diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_udx_ttxwp/matrix1.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_udx_ttxwp/matrix1.f index bbf708250a..39364c11fc 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_udx_ttxwp/matrix1.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_udx_ttxwp/matrix1.f @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -355,7 +355,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -399,7 +399,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C INTEGER I,J,M,N COMPLEX*16 ZTEMP, TMP_JAMP(1) - REAL*8 CF(NCOLOR,NCOLOR) + INTEGER CF(NCOLOR*(NCOLOR+1)/2) + INTEGER DENOM, CF_INDEX COMPLEX*16 AMP(NGRAPHS), JAMP(NCOLOR,NAMPSO) COMPLEX*16 W(6,NWAVEFUNCS) C Needed for v4 models @@ -444,11 +445,10 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C C COLOR DATA C - DATA (CF(I, 1),I= 1, 2) /9.000000000000000D+00 - $ ,3.000000000000000D+00/ + DATA DENOM/1/ + DATA (CF(I),I= 1, 2) /9,6/ C 1 T(2,1) T(3,4) - DATA (CF(I, 2),I= 1, 2) /3.000000000000000D+00 - $ ,9.000000000000000D+00/ + DATA (CF(I),I= 3, 3) /9/ C 1 T(2,4) T(3,1) C ---------- C BEGIN CODE @@ -497,10 +497,12 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) MATRIX1 = 0.D0 DO M = 1, NAMPSO + CF_INDEX = 0 DO I = 1, NCOLOR ZTEMP = (0.D0,0.D0) - DO J = 1, NCOLOR - ZTEMP = ZTEMP + CF(J,I)*JAMP(J,M) + DO J = I, NCOLOR + CF_INDEX = CF_INDEX + 1 + ZTEMP = ZTEMP + CF(CF_INDEX)*JAMP(J,M) ENDDO DO N = 1, NAMPSO @@ -509,6 +511,7 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) ENDDO ENDDO ENDDO + MATRIX1 = MATRIX1/DENOM IF(SDE_STRAT.EQ.1)THEN AMP2(1)=AMP2(1)+AMP(1)*DCONJG(AMP(1)) diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_udx_ttxwp/matrix11.png b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_udx_ttxwp/matrix11.png new file mode 100644 index 0000000000..6ccf61186c Binary files /dev/null and b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_udx_ttxwp/matrix11.png differ diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_udx_ttxwp/processConfig.h b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_udx_ttxwp/processConfig.h new file mode 100644 index 0000000000..38d2d5ed20 --- /dev/null +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_udx_ttxwp/processConfig.h @@ -0,0 +1,16 @@ +// Copyright (C) 2025 CERN and UCLouvain. +// Licensed under the GNU Lesser General Public License (version 3 or later). +// Created by: S. Roiser (May 2025) for the MG5aMC CUDACPP plugin. +// Further modified by: ... for the MG5aMC CUDACPP plugin. + + +#ifndef MG5_CONFIG_SIGMA_SM_NO_B_MASS_UDX_TTXWP_H +#define MG5_CONFIG_SIGMA_SM_NO_B_MASS_UDX_TTXWP_H 1 + +namespace processConfig { + + constexpr int ndiagrams = 2; + +} + +#endif // MG5_CONFIG_SIGMA_SM_NO_B_MASS_UDX_TTXWP_H \ No newline at end of file diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_dux_ttxwmg/CPPProcess.cc b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_dux_ttxwmg/CPPProcess.cc index 3261780672..a3ffec653a 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_dux_ttxwmg/CPPProcess.cc +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_dux_ttxwmg/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -25,6 +25,7 @@ #include "MemoryAccessMatrixElements.h" #include "MemoryAccessMomenta.h" #include "MemoryAccessWavefunctions.h" +#include "processConfig.h" #ifdef MGONGPU_SUPPORTS_MULTICHANNEL #include "MemoryAccessDenominators.h" @@ -97,6 +98,69 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { +#ifdef MGONGPU_SUPPORTS_MULTICHANNEL + __device__ INLINE unsigned int getChannelId( const unsigned int* allChannelIds +#ifndef MGONGPUCPP_GPUIMPL + , + const int ievt00, + bool sanityCheckMixedPrecision = true +#endif + ) + { + unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr +#ifdef MGONGPUCPP_GPUIMPL + using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page + if( allChannelIds != nullptr ) + { + const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) + const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) + // NB: channelIds_sv is a scalar in CUDA + channelId = channelIds_sv; + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + } +#else // Cuda or C++ + using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + if( allChannelIds != nullptr ) + { + // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) + const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 + uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) +#ifndef MGONGPU_CPPSIMD + // NB: channelIds_sv is a scalar in no-SIMD C++ + channelId = channelIds_sv; +#else + // NB: channelIds_sv is a vector in SIMD C++ + channelId = channelIds_sv[0]; // element[0] + for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] + { + assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId + } +#endif + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + if( sanityCheckMixedPrecision ) + { +#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT + // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) + const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 + uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + for( int i = 0; i < neppV; ++i ) + { + assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector + } +#endif + } + } +#endif // MGONGPUCPP_GPUIMPL + return channelId; + } +#endif // MGONGPU_SUPPORTS_MULTICHANNEL + constexpr int nw6 = CPPProcess::nw6; // dimensions of each wavefunction (HELAS KEK 91-11): e.g. 6 for e+ e- -> mu+ mu- (fermions and vectors) constexpr int npar = CPPProcess::npar; // #particles in total (external = initial + final): e.g. 4 for e+ e- -> mu+ mu- constexpr int ncomb = CPPProcess::ncomb; // #helicity combinations: e.g. 16 for e+ e- -> mu+ mu- (2**4 = fermion spin up/down ** npar) @@ -306,7 +370,7 @@ namespace mg5amcCpu COUPs[ndcoup + iicoup] = allCOUPs[ndcoup + iicoup]; // independent couplings, fixed for all events fptype* MEs = E_ACCESS::ieventAccessRecord( allMEs, ievt0 ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); #endif #endif @@ -316,7 +380,7 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Numerators and denominators for the current event (CUDA) or SIMD event page (C++) - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); #endif @@ -342,8 +406,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1 FFV1_0( w_fp[8], w_fp[1], w_fp[7], 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] ); + if( channelId != 0 ) + { + numerators_sv[0] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] -= 1. / 2. * amp_sv[0]; jamp_sv[3] += 1. / 6. * amp_sv[0]; @@ -356,8 +423,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 2 FFV1_0( w_fp[6], w_fp[8], 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] ); + if( channelId != 0 ) + { + numerators_sv[1] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] -= 1. / 2. * amp_sv[0]; jamp_sv[3] += 1. / 6. * amp_sv[0]; @@ -372,8 +442,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 3 FFV1_0( w_fp[9], w_fp[1], w_fp[10], 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] ); + if( channelId != 0 ) + { + numerators_sv[2] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 6. * amp_sv[0]; jamp_sv[1] -= 1. / 2. * amp_sv[0]; @@ -386,8 +459,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 4 FFV1_0( w_fp[0], w_fp[8], 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] ); + if( channelId != 0 ) + { + numerators_sv[3] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 6. * amp_sv[0]; jamp_sv[1] -= 1. / 2. * amp_sv[0]; @@ -401,8 +477,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 5 FFV1_0( w_fp[9], w_fp[1], w_fp[3], 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] ); + if( channelId != 0 ) + { + numerators_sv[4] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 6. * amp_sv[0]; jamp_sv[2] -= 1. / 2. * amp_sv[0]; @@ -415,8 +494,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 6 FFV1_0( w_fp[0], w_fp[8], w_fp[3], COUPs[0], 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] ); + if( channelId != 0 ) + { + numerators_sv[5] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 6. * amp_sv[0]; jamp_sv[2] -= 1. / 2. * amp_sv[0]; @@ -429,8 +511,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 7 FFV1_0( w_fp[9], w_fp[3], w_fp[7], 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] ); + if( channelId != 0 ) + { + numerators_sv[6] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] -= 1. / 2. * amp_sv[0]; jamp_sv[3] += 1. / 6. * amp_sv[0]; @@ -443,8 +528,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 8 FFV1_0( w_fp[0], w_fp[10], w_fp[7], 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] ); + if( channelId != 0 ) + { + numerators_sv[7] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] -= 1. / 2. * amp_sv[0]; jamp_sv[3] += 1. / 6. * amp_sv[0]; @@ -457,8 +545,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 9 FFV1_0( w_fp[10], w_fp[1], w_fp[7], COUPs[0], 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] ); + if( channelId != 0 ) + { + numerators_sv[8] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] -= 1. / 2. * amp_sv[0]; jamp_sv[3] += 1. / 6. * amp_sv[0]; @@ -471,8 +562,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 10 FFV1_0( w_fp[9], w_fp[1], w_fp[10], 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] ); + if( channelId != 0 ) + { + numerators_sv[9] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[2] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -485,8 +579,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 11 FFV1_0( w_fp[0], w_fp[8], w_fp[10], COUPs[0], 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] ); + if( channelId != 0 ) + { + numerators_sv[10] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[2] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -499,8 +596,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 12 FFV1_0( w_fp[0], w_fp[10], w_fp[7], 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] ); + if( channelId != 0 ) + { + numerators_sv[11] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] -= 1. / 2. * amp_sv[0]; jamp_sv[3] += 1. / 6. * amp_sv[0]; @@ -775,7 +875,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- @@ -1148,9 +1250,6 @@ namespace mg5amcCpu #ifdef MGONGPUCPP_GPUIMPL // Remember: in CUDA this is a kernel for one event, in c++ this processes n events const int ievt = blockDim.x * blockIdx.x + threadIdx.x; // index of event (thread) in grid -#ifdef MGONGPU_SUPPORTS_MULTICHANNEL - using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events -#endif #else //assert( (size_t)(allmomenta) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] //assert( (size_t)(allMEs) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] @@ -1158,7 +1257,6 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL using NUM_ACCESS = HostAccessNumerators; // non-trivial access: buffer includes all events using DEN_ACCESS = HostAccessDenominators; // non-trivial access: buffer includes all events - using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events #endif #endif @@ -1183,11 +1281,12 @@ namespace mg5amcCpu fptype_sv& MEs_sv = E_ACCESS::kernelAccess( MEs ); MEs_sv = fptype_sv{ 0 }; #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - numerators_sv = fptype_sv{ 0 }; + for( int i = 0; i < processConfig::ndiagrams; ++i ) + numerators_sv[i] = fptype_sv{ 0 }; denominators_sv = fptype_sv{ 0 }; #endif } @@ -1200,17 +1299,7 @@ namespace mg5amcCpu // *** START OF PART 1a - CUDA (one event per GPU thread) *** #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) - const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) - // NB: channelIds_sv is a scalar in CUDA - channelId = channelIds_sv; - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) - } + unsigned int channelId = getChannelId( allChannelIds ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (for the single event processed in calculate_wavefunctions) @@ -1325,38 +1414,7 @@ namespace mg5amcCpu const int ievt00 = ipagV2 * neppV; // loop on one SIMD page (neppV events) at a time #endif #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) - const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 - uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) -#ifndef MGONGPU_CPPSIMD - // NB: channelIds_sv is a scalar in no-SIMD C++ - channelId = channelIds_sv; -#else - // NB: channelIds_sv is a vector in SIMD C++ - channelId = channelIds_sv[0]; // element[0] - for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] - { - assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId - } -#endif - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) -#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT - // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) - const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 - uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - for( int i = 0; i < neppV; ++i ) - { - assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector - } -#endif - } + unsigned int channelId = getChannelId( allChannelIds, ievt00 ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (jamp2[nParity][ncolor][neppV] for the SIMD vector - or the two SIMD vectors - of events processed in calculate_wavefunctions) @@ -1529,11 +1587,12 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( allChannelIds != nullptr ) // fix segfault #892 (not 'channelIds[0] != 0') { - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + const unsigned int channelId = getChannelId( allChannelIds, ievt0, false ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - MEs_sv *= numerators_sv / denominators_sv; + MEs_sv *= numerators_sv[channelId - 1] / denominators_sv; } #endif //for( int ieppV = 0; ieppV < neppV; ieppV++ ) diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_dux_ttxwmg/CPPProcess.h b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_dux_ttxwmg/CPPProcess.h index ecb184f729..b11badb4c3 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_dux_ttxwmg/CPPProcess.h +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_dux_ttxwmg/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_dux_ttxwmg/auto_dsig.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_dux_ttxwmg/auto_dsig.f index 26d6979a1d..569e58058f 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_dux_ttxwmg/auto_dsig.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_dux_ttxwmg/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_dux_ttxwmg/auto_dsig1.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_dux_ttxwmg/auto_dsig1.f index 330b566ed8..1806e31d33 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_dux_ttxwmg/auto_dsig1.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_dux_ttxwmg/auto_dsig1.f @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -138,7 +138,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDDO QSCALE=QSCALE/2D0 ELSE - QSCALE=DSQRT(Q2FACT(IB(1))) + QSCALE=DSQRT(Q2FACT(1)) ENDIF D1=PDG2PDF(LPP(IB(1)),1, IB(1),XBK(IB(1)), QSCALE) S1=PDG2PDF(LPP(IB(1)),3, IB(1),XBK(IB(1)), QSCALE) @@ -146,7 +146,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) IF (DSQRT(Q2FACT(IB(2))).NE.0D0) THEN - QSCALE=DSQRT(Q2FACT(IB(2))) + QSCALE=DSQRT(Q2FACT(2)) ENDIF CX2=PDG2PDF(LPP(IB(2)),-4, IB(2),XBK(IB(2)), QSCALE) UX2=PDG2PDF(LPP(IB(2)),-2, IB(2),XBK(IB(2)), QSCALE) @@ -225,7 +225,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -297,6 +297,10 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, INTEGER I_EE C +C STUFF FOR UPC +C + DOUBLE PRECISION PHOTONPDFSQUARE +C C EXTERNAL FUNCTIONS C LOGICAL PASSCUTS @@ -380,16 +384,16 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, IF (ABS(LPP(IB(1))).GE.1) THEN C LP=SIGN(1,LPP(IB(1))) D1(IVEC)=PDG2PDF(LPP(IB(1)),1, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) S1(IVEC)=PDG2PDF(LPP(IB(1)),3, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) CX2(IVEC)=PDG2PDF(LPP(IB(2)),-4, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) UX2(IVEC)=PDG2PDF(LPP(IB(2)),-2, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) ENDIF ENDDO ! IWARP LOOP ENDDO ! CURRWARP LOOP diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_dux_ttxwmg/matrix1.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_dux_ttxwmg/matrix1.f index 4b8ccfcacb..43e8b313bf 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_dux_ttxwmg/matrix1.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_dux_ttxwmg/matrix1.f @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -403,7 +403,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -447,7 +447,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C INTEGER I,J,M,N COMPLEX*16 ZTEMP, TMP_JAMP(7) - REAL*8 CF(NCOLOR,NCOLOR) + INTEGER CF(NCOLOR*(NCOLOR+1)/2) + INTEGER DENOM, CF_INDEX COMPLEX*16 AMP(NGRAPHS), JAMP(NCOLOR,NAMPSO) COMPLEX*16 W(6,NWAVEFUNCS) C Needed for v4 models @@ -492,21 +493,14 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C C COLOR DATA C - DATA (CF(I, 1),I= 1, 4) /1.200000000000000D+01 - $ ,4.000000000000000D+00,4.000000000000000D+00,0.000000000000000D - $ +00/ + DATA DENOM/1/ + DATA (CF(I),I= 1, 4) /12,8,8,0/ C 1 T(2,1) T(6,3,4) - DATA (CF(I, 2),I= 1, 4) /4.000000000000000D+00 - $ ,1.200000000000000D+01,0.000000000000000D+00,4.000000000000000D - $ +00/ + DATA (CF(I),I= 5, 7) /12,0,8/ C 1 T(2,4) T(6,3,1) - DATA (CF(I, 3),I= 1, 4) /4.000000000000000D+00 - $ ,0.000000000000000D+00,1.200000000000000D+01,4.000000000000000D - $ +00/ + DATA (CF(I),I= 8, 9) /12,8/ C 1 T(3,1) T(6,2,4) - DATA (CF(I, 4),I= 1, 4) /0.000000000000000D+00 - $ ,4.000000000000000D+00,4.000000000000000D+00,1.200000000000000D - $ +01/ + DATA (CF(I),I= 10, 10) /12/ C 1 T(3,4) T(6,2,1) C ---------- C BEGIN CODE @@ -601,10 +595,12 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) MATRIX1 = 0.D0 DO M = 1, NAMPSO + CF_INDEX = 0 DO I = 1, NCOLOR ZTEMP = (0.D0,0.D0) - DO J = 1, NCOLOR - ZTEMP = ZTEMP + CF(J,I)*JAMP(J,M) + DO J = I, NCOLOR + CF_INDEX = CF_INDEX + 1 + ZTEMP = ZTEMP + CF(CF_INDEX)*JAMP(J,M) ENDDO DO N = 1, NAMPSO @@ -613,6 +609,7 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) ENDDO ENDDO ENDDO + MATRIX1 = MATRIX1/DENOM IF(SDE_STRAT.EQ.1)THEN AMP2(1)=AMP2(1)+AMP(1)*DCONJG(AMP(1)) diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_dux_ttxwmg/matrix11.png b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_dux_ttxwmg/matrix11.png new file mode 100644 index 0000000000..c7dac8de3a Binary files /dev/null and b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_dux_ttxwmg/matrix11.png differ diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_dux_ttxwmg/matrix12.png b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_dux_ttxwmg/matrix12.png new file mode 100644 index 0000000000..933a7b0b09 Binary files /dev/null and b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_dux_ttxwmg/matrix12.png differ diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_dux_ttxwmg/processConfig.h b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_dux_ttxwmg/processConfig.h new file mode 100644 index 0000000000..743c903011 --- /dev/null +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_dux_ttxwmg/processConfig.h @@ -0,0 +1,16 @@ +// Copyright (C) 2025 CERN and UCLouvain. +// Licensed under the GNU Lesser General Public License (version 3 or later). +// Created by: S. Roiser (May 2025) for the MG5aMC CUDACPP plugin. +// Further modified by: ... for the MG5aMC CUDACPP plugin. + + +#ifndef MG5_CONFIG_SIGMA_SM_NO_B_MASS_DUX_TTXWMG_H +#define MG5_CONFIG_SIGMA_SM_NO_B_MASS_DUX_TTXWMG_H 1 + +namespace processConfig { + + constexpr int ndiagrams = 12; + +} + +#endif // MG5_CONFIG_SIGMA_SM_NO_B_MASS_DUX_TTXWMG_H \ No newline at end of file diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gd_ttxwmu/CPPProcess.cc b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gd_ttxwmu/CPPProcess.cc index c933a8f276..72756b605b 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gd_ttxwmu/CPPProcess.cc +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gd_ttxwmu/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -25,6 +25,7 @@ #include "MemoryAccessMatrixElements.h" #include "MemoryAccessMomenta.h" #include "MemoryAccessWavefunctions.h" +#include "processConfig.h" #ifdef MGONGPU_SUPPORTS_MULTICHANNEL #include "MemoryAccessDenominators.h" @@ -97,6 +98,69 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { +#ifdef MGONGPU_SUPPORTS_MULTICHANNEL + __device__ INLINE unsigned int getChannelId( const unsigned int* allChannelIds +#ifndef MGONGPUCPP_GPUIMPL + , + const int ievt00, + bool sanityCheckMixedPrecision = true +#endif + ) + { + unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr +#ifdef MGONGPUCPP_GPUIMPL + using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page + if( allChannelIds != nullptr ) + { + const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) + const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) + // NB: channelIds_sv is a scalar in CUDA + channelId = channelIds_sv; + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + } +#else // Cuda or C++ + using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + if( allChannelIds != nullptr ) + { + // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) + const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 + uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) +#ifndef MGONGPU_CPPSIMD + // NB: channelIds_sv is a scalar in no-SIMD C++ + channelId = channelIds_sv; +#else + // NB: channelIds_sv is a vector in SIMD C++ + channelId = channelIds_sv[0]; // element[0] + for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] + { + assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId + } +#endif + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + if( sanityCheckMixedPrecision ) + { +#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT + // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) + const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 + uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + for( int i = 0; i < neppV; ++i ) + { + assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector + } +#endif + } + } +#endif // MGONGPUCPP_GPUIMPL + return channelId; + } +#endif // MGONGPU_SUPPORTS_MULTICHANNEL + constexpr int nw6 = CPPProcess::nw6; // dimensions of each wavefunction (HELAS KEK 91-11): e.g. 6 for e+ e- -> mu+ mu- (fermions and vectors) constexpr int npar = CPPProcess::npar; // #particles in total (external = initial + final): e.g. 4 for e+ e- -> mu+ mu- constexpr int ncomb = CPPProcess::ncomb; // #helicity combinations: e.g. 16 for e+ e- -> mu+ mu- (2**4 = fermion spin up/down ** npar) @@ -306,7 +370,7 @@ namespace mg5amcCpu COUPs[ndcoup + iicoup] = allCOUPs[ndcoup + iicoup]; // independent couplings, fixed for all events fptype* MEs = E_ACCESS::ieventAccessRecord( allMEs, ievt0 ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); #endif #endif @@ -316,7 +380,7 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Numerators and denominators for the current event (CUDA) or SIMD event page (C++) - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); #endif @@ -342,8 +406,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1 FFV1_0( w_fp[8], w_fp[5], w_fp[7], 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] ); + if( channelId != 0 ) + { + numerators_sv[0] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= 1. / 2. * amp_sv[0]; jamp_sv[2] += 1. / 6. * amp_sv[0]; @@ -356,8 +423,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 2 FFV1_0( w_fp[6], w_fp[8], 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] ); + if( channelId != 0 ) + { + numerators_sv[1] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= 1. / 2. * amp_sv[0]; jamp_sv[2] += 1. / 6. * amp_sv[0]; @@ -372,8 +442,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 3 FFV1_0( w_fp[9], w_fp[5], w_fp[10], 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] ); + if( channelId != 0 ) + { + numerators_sv[2] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= 1. / 2. * amp_sv[0]; jamp_sv[1] += 1. / 6. * amp_sv[0]; @@ -386,8 +459,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 4 FFV1_0( w_fp[1], w_fp[8], 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] ); + if( channelId != 0 ) + { + numerators_sv[3] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= 1. / 2. * amp_sv[0]; jamp_sv[1] += 1. / 6. * amp_sv[0]; @@ -401,8 +477,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 5 FFV1_0( w_fp[9], w_fp[5], w_fp[3], 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] ); + if( channelId != 0 ) + { + numerators_sv[4] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += 1. / 6. * amp_sv[0]; jamp_sv[3] -= 1. / 2. * amp_sv[0]; @@ -415,8 +494,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 6 FFV1_0( w_fp[1], w_fp[8], w_fp[3], COUPs[0], 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] ); + if( channelId != 0 ) + { + numerators_sv[5] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += 1. / 6. * amp_sv[0]; jamp_sv[3] -= 1. / 2. * amp_sv[0]; @@ -429,8 +511,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 7 FFV1_0( w_fp[9], w_fp[3], w_fp[7], 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] ); + if( channelId != 0 ) + { + numerators_sv[6] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] += 1. / 6. * amp_sv[0]; jamp_sv[3] -= 1. / 2. * amp_sv[0]; @@ -443,8 +528,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 8 FFV1_0( w_fp[1], w_fp[10], w_fp[7], 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] ); + if( channelId != 0 ) + { + numerators_sv[7] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] += 1. / 6. * amp_sv[0]; jamp_sv[3] -= 1. / 2. * amp_sv[0]; @@ -457,8 +545,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 9 FFV1_0( w_fp[10], w_fp[5], w_fp[7], COUPs[0], 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] ); + if( channelId != 0 ) + { + numerators_sv[8] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= 1. / 2. * amp_sv[0]; jamp_sv[2] += 1. / 6. * amp_sv[0]; @@ -471,8 +562,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 10 FFV1_0( w_fp[9], w_fp[5], w_fp[10], 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] ); + if( channelId != 0 ) + { + numerators_sv[9] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[3] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -485,8 +579,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 11 FFV1_0( w_fp[1], w_fp[8], w_fp[10], COUPs[0], 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] ); + if( channelId != 0 ) + { + numerators_sv[10] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[3] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -499,8 +596,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 12 FFV1_0( w_fp[1], w_fp[10], w_fp[7], 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] ); + if( channelId != 0 ) + { + numerators_sv[11] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] += 1. / 6. * amp_sv[0]; jamp_sv[3] -= 1. / 2. * amp_sv[0]; @@ -775,7 +875,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- @@ -1148,9 +1250,6 @@ namespace mg5amcCpu #ifdef MGONGPUCPP_GPUIMPL // Remember: in CUDA this is a kernel for one event, in c++ this processes n events const int ievt = blockDim.x * blockIdx.x + threadIdx.x; // index of event (thread) in grid -#ifdef MGONGPU_SUPPORTS_MULTICHANNEL - using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events -#endif #else //assert( (size_t)(allmomenta) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] //assert( (size_t)(allMEs) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] @@ -1158,7 +1257,6 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL using NUM_ACCESS = HostAccessNumerators; // non-trivial access: buffer includes all events using DEN_ACCESS = HostAccessDenominators; // non-trivial access: buffer includes all events - using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events #endif #endif @@ -1183,11 +1281,12 @@ namespace mg5amcCpu fptype_sv& MEs_sv = E_ACCESS::kernelAccess( MEs ); MEs_sv = fptype_sv{ 0 }; #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - numerators_sv = fptype_sv{ 0 }; + for( int i = 0; i < processConfig::ndiagrams; ++i ) + numerators_sv[i] = fptype_sv{ 0 }; denominators_sv = fptype_sv{ 0 }; #endif } @@ -1200,17 +1299,7 @@ namespace mg5amcCpu // *** START OF PART 1a - CUDA (one event per GPU thread) *** #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) - const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) - // NB: channelIds_sv is a scalar in CUDA - channelId = channelIds_sv; - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) - } + unsigned int channelId = getChannelId( allChannelIds ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (for the single event processed in calculate_wavefunctions) @@ -1325,38 +1414,7 @@ namespace mg5amcCpu const int ievt00 = ipagV2 * neppV; // loop on one SIMD page (neppV events) at a time #endif #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) - const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 - uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) -#ifndef MGONGPU_CPPSIMD - // NB: channelIds_sv is a scalar in no-SIMD C++ - channelId = channelIds_sv; -#else - // NB: channelIds_sv is a vector in SIMD C++ - channelId = channelIds_sv[0]; // element[0] - for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] - { - assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId - } -#endif - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) -#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT - // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) - const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 - uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - for( int i = 0; i < neppV; ++i ) - { - assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector - } -#endif - } + unsigned int channelId = getChannelId( allChannelIds, ievt00 ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (jamp2[nParity][ncolor][neppV] for the SIMD vector - or the two SIMD vectors - of events processed in calculate_wavefunctions) @@ -1529,11 +1587,12 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( allChannelIds != nullptr ) // fix segfault #892 (not 'channelIds[0] != 0') { - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + const unsigned int channelId = getChannelId( allChannelIds, ievt0, false ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - MEs_sv *= numerators_sv / denominators_sv; + MEs_sv *= numerators_sv[channelId - 1] / denominators_sv; } #endif //for( int ieppV = 0; ieppV < neppV; ieppV++ ) diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gd_ttxwmu/CPPProcess.h b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gd_ttxwmu/CPPProcess.h index a5c44d3213..2a73af4b9a 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gd_ttxwmu/CPPProcess.h +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gd_ttxwmu/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gd_ttxwmu/auto_dsig.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gd_ttxwmu/auto_dsig.f index 3779397ce4..225a391d4c 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gd_ttxwmu/auto_dsig.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gd_ttxwmu/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gd_ttxwmu/auto_dsig1.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gd_ttxwmu/auto_dsig1.f index 1dae307565..e0f47e9c3d 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gd_ttxwmu/auto_dsig1.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gd_ttxwmu/auto_dsig1.f @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -138,14 +138,14 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDDO QSCALE=QSCALE/2D0 ELSE - QSCALE=DSQRT(Q2FACT(IB(1))) + QSCALE=DSQRT(Q2FACT(1)) ENDIF G1=PDG2PDF(LPP(IB(1)),0, IB(1),XBK(IB(1)), QSCALE) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) IF (DSQRT(Q2FACT(IB(2))).NE.0D0) THEN - QSCALE=DSQRT(Q2FACT(IB(2))) + QSCALE=DSQRT(Q2FACT(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) @@ -224,7 +224,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -296,6 +296,10 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, INTEGER I_EE C +C STUFF FOR UPC +C + DOUBLE PRECISION PHOTONPDFSQUARE +C C EXTERNAL FUNCTIONS C LOGICAL PASSCUTS @@ -379,14 +383,14 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, IF (ABS(LPP(IB(1))).GE.1) THEN C LP=SIGN(1,LPP(IB(1))) G1(IVEC)=PDG2PDF(LPP(IB(1)),0, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) D2(IVEC)=PDG2PDF(LPP(IB(2)),1, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) S2(IVEC)=PDG2PDF(LPP(IB(2)),3, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) ENDIF ENDDO ! IWARP LOOP ENDDO ! CURRWARP LOOP diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gd_ttxwmu/matrix1.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gd_ttxwmu/matrix1.f index a3a57cd8b8..552a0ed42d 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gd_ttxwmu/matrix1.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gd_ttxwmu/matrix1.f @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -403,7 +403,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -447,7 +447,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C INTEGER I,J,M,N COMPLEX*16 ZTEMP, TMP_JAMP(7) - REAL*8 CF(NCOLOR,NCOLOR) + INTEGER CF(NCOLOR*(NCOLOR+1)/2) + INTEGER DENOM, CF_INDEX COMPLEX*16 AMP(NGRAPHS), JAMP(NCOLOR,NAMPSO) COMPLEX*16 W(6,NWAVEFUNCS) C Needed for v4 models @@ -492,21 +493,14 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C C COLOR DATA C - DATA (CF(I, 1),I= 1, 4) /1.200000000000000D+01 - $ ,4.000000000000000D+00,4.000000000000000D+00,0.000000000000000D - $ +00/ + DATA DENOM/1/ + DATA (CF(I),I= 1, 4) /12,8,8,0/ C 1 T(1,3,2) T(6,4) - DATA (CF(I, 2),I= 1, 4) /4.000000000000000D+00 - $ ,1.200000000000000D+01,0.000000000000000D+00,4.000000000000000D - $ +00/ + DATA (CF(I),I= 5, 7) /12,0,8/ C 1 T(1,3,4) T(6,2) - DATA (CF(I, 3),I= 1, 4) /4.000000000000000D+00 - $ ,0.000000000000000D+00,1.200000000000000D+01,4.000000000000000D - $ +00/ + DATA (CF(I),I= 8, 9) /12,8/ C 1 T(1,6,2) T(3,4) - DATA (CF(I, 4),I= 1, 4) /0.000000000000000D+00 - $ ,4.000000000000000D+00,4.000000000000000D+00,1.200000000000000D - $ +01/ + DATA (CF(I),I= 10, 10) /12/ C 1 T(1,6,4) T(3,2) C ---------- C BEGIN CODE @@ -601,10 +595,12 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) MATRIX1 = 0.D0 DO M = 1, NAMPSO + CF_INDEX = 0 DO I = 1, NCOLOR ZTEMP = (0.D0,0.D0) - DO J = 1, NCOLOR - ZTEMP = ZTEMP + CF(J,I)*JAMP(J,M) + DO J = I, NCOLOR + CF_INDEX = CF_INDEX + 1 + ZTEMP = ZTEMP + CF(CF_INDEX)*JAMP(J,M) ENDDO DO N = 1, NAMPSO @@ -613,6 +609,7 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) ENDDO ENDDO ENDDO + MATRIX1 = MATRIX1/DENOM IF(SDE_STRAT.EQ.1)THEN AMP2(1)=AMP2(1)+AMP(1)*DCONJG(AMP(1)) diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gd_ttxwmu/matrix11.png b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gd_ttxwmu/matrix11.png new file mode 100644 index 0000000000..8401e3d60b Binary files /dev/null and b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gd_ttxwmu/matrix11.png differ diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gd_ttxwmu/matrix12.png b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gd_ttxwmu/matrix12.png new file mode 100644 index 0000000000..5ae18c9eaf Binary files /dev/null and b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gd_ttxwmu/matrix12.png differ diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gd_ttxwmu/processConfig.h b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gd_ttxwmu/processConfig.h new file mode 100644 index 0000000000..0861e7eec7 --- /dev/null +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gd_ttxwmu/processConfig.h @@ -0,0 +1,16 @@ +// Copyright (C) 2025 CERN and UCLouvain. +// Licensed under the GNU Lesser General Public License (version 3 or later). +// Created by: S. Roiser (May 2025) for the MG5aMC CUDACPP plugin. +// Further modified by: ... for the MG5aMC CUDACPP plugin. + + +#ifndef MG5_CONFIG_SIGMA_SM_NO_B_MASS_GD_TTXWMU_H +#define MG5_CONFIG_SIGMA_SM_NO_B_MASS_GD_TTXWMU_H 1 + +namespace processConfig { + + constexpr int ndiagrams = 12; + +} + +#endif // MG5_CONFIG_SIGMA_SM_NO_B_MASS_GD_TTXWMU_H \ No newline at end of file diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gdx_ttxwpux/CPPProcess.cc b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gdx_ttxwpux/CPPProcess.cc index 6f1f37d1eb..6f30a06d82 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gdx_ttxwpux/CPPProcess.cc +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gdx_ttxwpux/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -25,6 +25,7 @@ #include "MemoryAccessMatrixElements.h" #include "MemoryAccessMomenta.h" #include "MemoryAccessWavefunctions.h" +#include "processConfig.h" #ifdef MGONGPU_SUPPORTS_MULTICHANNEL #include "MemoryAccessDenominators.h" @@ -97,6 +98,69 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { +#ifdef MGONGPU_SUPPORTS_MULTICHANNEL + __device__ INLINE unsigned int getChannelId( const unsigned int* allChannelIds +#ifndef MGONGPUCPP_GPUIMPL + , + const int ievt00, + bool sanityCheckMixedPrecision = true +#endif + ) + { + unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr +#ifdef MGONGPUCPP_GPUIMPL + using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page + if( allChannelIds != nullptr ) + { + const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) + const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) + // NB: channelIds_sv is a scalar in CUDA + channelId = channelIds_sv; + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + } +#else // Cuda or C++ + using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + if( allChannelIds != nullptr ) + { + // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) + const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 + uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) +#ifndef MGONGPU_CPPSIMD + // NB: channelIds_sv is a scalar in no-SIMD C++ + channelId = channelIds_sv; +#else + // NB: channelIds_sv is a vector in SIMD C++ + channelId = channelIds_sv[0]; // element[0] + for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] + { + assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId + } +#endif + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + if( sanityCheckMixedPrecision ) + { +#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT + // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) + const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 + uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + for( int i = 0; i < neppV; ++i ) + { + assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector + } +#endif + } + } +#endif // MGONGPUCPP_GPUIMPL + return channelId; + } +#endif // MGONGPU_SUPPORTS_MULTICHANNEL + constexpr int nw6 = CPPProcess::nw6; // dimensions of each wavefunction (HELAS KEK 91-11): e.g. 6 for e+ e- -> mu+ mu- (fermions and vectors) constexpr int npar = CPPProcess::npar; // #particles in total (external = initial + final): e.g. 4 for e+ e- -> mu+ mu- constexpr int ncomb = CPPProcess::ncomb; // #helicity combinations: e.g. 16 for e+ e- -> mu+ mu- (2**4 = fermion spin up/down ** npar) @@ -306,7 +370,7 @@ namespace mg5amcCpu COUPs[ndcoup + iicoup] = allCOUPs[ndcoup + iicoup]; // independent couplings, fixed for all events fptype* MEs = E_ACCESS::ieventAccessRecord( allMEs, ievt0 ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); #endif #endif @@ -316,7 +380,7 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Numerators and denominators for the current event (CUDA) or SIMD event page (C++) - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); #endif @@ -342,8 +406,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1 FFV1_0( w_fp[8], w_fp[1], w_fp[7], 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] ); + if( channelId != 0 ) + { + numerators_sv[0] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] -= 1. / 6. * amp_sv[0]; jamp_sv[3] += 1. / 2. * amp_sv[0]; @@ -356,8 +423,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 2 FFV1_0( w_fp[6], w_fp[8], 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] ); + if( channelId != 0 ) + { + numerators_sv[1] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] -= 1. / 6. * amp_sv[0]; jamp_sv[3] += 1. / 2. * amp_sv[0]; @@ -372,8 +442,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 3 FFV1_0( w_fp[9], w_fp[1], w_fp[10], 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] ); + if( channelId != 0 ) + { + numerators_sv[2] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] -= 1. / 6. * amp_sv[0]; jamp_sv[3] += 1. / 2. * amp_sv[0]; @@ -386,8 +459,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 4 FFV1_0( w_fp[5], w_fp[8], 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] ); + if( channelId != 0 ) + { + numerators_sv[3] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] -= 1. / 6. * amp_sv[0]; jamp_sv[3] += 1. / 2. * amp_sv[0]; @@ -401,8 +477,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 5 FFV1_0( w_fp[9], w_fp[1], w_fp[3], 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] ); + if( channelId != 0 ) + { + numerators_sv[4] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 2. * amp_sv[0]; jamp_sv[2] -= 1. / 6. * amp_sv[0]; @@ -415,8 +494,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 6 FFV1_0( w_fp[5], w_fp[8], w_fp[3], COUPs[0], 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] ); + if( channelId != 0 ) + { + numerators_sv[5] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 2. * amp_sv[0]; jamp_sv[2] -= 1. / 6. * amp_sv[0]; @@ -429,8 +511,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 7 FFV1_0( w_fp[9], w_fp[3], w_fp[7], 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] ); + if( channelId != 0 ) + { + numerators_sv[6] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 2. * amp_sv[0]; jamp_sv[1] -= 1. / 6. * amp_sv[0]; @@ -443,8 +528,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 8 FFV1_0( w_fp[5], w_fp[10], w_fp[7], 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] ); + if( channelId != 0 ) + { + numerators_sv[7] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 2. * amp_sv[0]; jamp_sv[1] -= 1. / 6. * amp_sv[0]; @@ -457,8 +545,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 9 FFV1_0( w_fp[10], w_fp[1], w_fp[7], COUPs[0], 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] ); + if( channelId != 0 ) + { + numerators_sv[8] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] -= 1. / 6. * amp_sv[0]; jamp_sv[3] += 1. / 2. * amp_sv[0]; @@ -471,8 +562,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 10 FFV1_0( w_fp[9], w_fp[1], w_fp[10], 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] ); + if( channelId != 0 ) + { + numerators_sv[9] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[3] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -485,8 +579,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 11 FFV1_0( w_fp[5], w_fp[8], w_fp[10], COUPs[0], 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] ); + if( channelId != 0 ) + { + numerators_sv[10] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[3] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -499,8 +596,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 12 FFV1_0( w_fp[5], w_fp[10], w_fp[7], 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] ); + if( channelId != 0 ) + { + numerators_sv[11] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 2. * amp_sv[0]; jamp_sv[1] -= 1. / 6. * amp_sv[0]; @@ -775,7 +875,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- @@ -1148,9 +1250,6 @@ namespace mg5amcCpu #ifdef MGONGPUCPP_GPUIMPL // Remember: in CUDA this is a kernel for one event, in c++ this processes n events const int ievt = blockDim.x * blockIdx.x + threadIdx.x; // index of event (thread) in grid -#ifdef MGONGPU_SUPPORTS_MULTICHANNEL - using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events -#endif #else //assert( (size_t)(allmomenta) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] //assert( (size_t)(allMEs) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] @@ -1158,7 +1257,6 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL using NUM_ACCESS = HostAccessNumerators; // non-trivial access: buffer includes all events using DEN_ACCESS = HostAccessDenominators; // non-trivial access: buffer includes all events - using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events #endif #endif @@ -1183,11 +1281,12 @@ namespace mg5amcCpu fptype_sv& MEs_sv = E_ACCESS::kernelAccess( MEs ); MEs_sv = fptype_sv{ 0 }; #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - numerators_sv = fptype_sv{ 0 }; + for( int i = 0; i < processConfig::ndiagrams; ++i ) + numerators_sv[i] = fptype_sv{ 0 }; denominators_sv = fptype_sv{ 0 }; #endif } @@ -1200,17 +1299,7 @@ namespace mg5amcCpu // *** START OF PART 1a - CUDA (one event per GPU thread) *** #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) - const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) - // NB: channelIds_sv is a scalar in CUDA - channelId = channelIds_sv; - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) - } + unsigned int channelId = getChannelId( allChannelIds ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (for the single event processed in calculate_wavefunctions) @@ -1325,38 +1414,7 @@ namespace mg5amcCpu const int ievt00 = ipagV2 * neppV; // loop on one SIMD page (neppV events) at a time #endif #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) - const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 - uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) -#ifndef MGONGPU_CPPSIMD - // NB: channelIds_sv is a scalar in no-SIMD C++ - channelId = channelIds_sv; -#else - // NB: channelIds_sv is a vector in SIMD C++ - channelId = channelIds_sv[0]; // element[0] - for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] - { - assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId - } -#endif - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) -#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT - // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) - const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 - uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - for( int i = 0; i < neppV; ++i ) - { - assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector - } -#endif - } + unsigned int channelId = getChannelId( allChannelIds, ievt00 ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (jamp2[nParity][ncolor][neppV] for the SIMD vector - or the two SIMD vectors - of events processed in calculate_wavefunctions) @@ -1529,11 +1587,12 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( allChannelIds != nullptr ) // fix segfault #892 (not 'channelIds[0] != 0') { - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + const unsigned int channelId = getChannelId( allChannelIds, ievt0, false ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - MEs_sv *= numerators_sv / denominators_sv; + MEs_sv *= numerators_sv[channelId - 1] / denominators_sv; } #endif //for( int ieppV = 0; ieppV < neppV; ieppV++ ) diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gdx_ttxwpux/CPPProcess.h b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gdx_ttxwpux/CPPProcess.h index d0dd16c512..e7439324b3 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gdx_ttxwpux/CPPProcess.h +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gdx_ttxwpux/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gdx_ttxwpux/auto_dsig.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gdx_ttxwpux/auto_dsig.f index 7c1bbde100..809dbb2ab2 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gdx_ttxwpux/auto_dsig.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gdx_ttxwpux/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gdx_ttxwpux/auto_dsig1.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gdx_ttxwpux/auto_dsig1.f index ece4509a8c..239f34eb31 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gdx_ttxwpux/auto_dsig1.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gdx_ttxwpux/auto_dsig1.f @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -138,14 +138,14 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDDO QSCALE=QSCALE/2D0 ELSE - QSCALE=DSQRT(Q2FACT(IB(1))) + QSCALE=DSQRT(Q2FACT(1)) ENDIF G1=PDG2PDF(LPP(IB(1)),0, IB(1),XBK(IB(1)), QSCALE) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) IF (DSQRT(Q2FACT(IB(2))).NE.0D0) THEN - QSCALE=DSQRT(Q2FACT(IB(2))) + QSCALE=DSQRT(Q2FACT(2)) ENDIF SX2=PDG2PDF(LPP(IB(2)),-3, IB(2),XBK(IB(2)), QSCALE) DX2=PDG2PDF(LPP(IB(2)),-1, IB(2),XBK(IB(2)), QSCALE) @@ -224,7 +224,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -296,6 +296,10 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, INTEGER I_EE C +C STUFF FOR UPC +C + DOUBLE PRECISION PHOTONPDFSQUARE +C C EXTERNAL FUNCTIONS C LOGICAL PASSCUTS @@ -379,14 +383,14 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, IF (ABS(LPP(IB(1))).GE.1) THEN C LP=SIGN(1,LPP(IB(1))) G1(IVEC)=PDG2PDF(LPP(IB(1)),0, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) SX2(IVEC)=PDG2PDF(LPP(IB(2)),-3, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) DX2(IVEC)=PDG2PDF(LPP(IB(2)),-1, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) ENDIF ENDDO ! IWARP LOOP ENDDO ! CURRWARP LOOP diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gdx_ttxwpux/matrix1.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gdx_ttxwpux/matrix1.f index e550640e16..ace70306d3 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gdx_ttxwpux/matrix1.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gdx_ttxwpux/matrix1.f @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -403,7 +403,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -447,7 +447,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C INTEGER I,J,M,N COMPLEX*16 ZTEMP, TMP_JAMP(7) - REAL*8 CF(NCOLOR,NCOLOR) + INTEGER CF(NCOLOR*(NCOLOR+1)/2) + INTEGER DENOM, CF_INDEX COMPLEX*16 AMP(NGRAPHS), JAMP(NCOLOR,NAMPSO) COMPLEX*16 W(6,NWAVEFUNCS) C Needed for v4 models @@ -492,21 +493,14 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C C COLOR DATA C - DATA (CF(I, 1),I= 1, 4) /1.200000000000000D+01 - $ ,4.000000000000000D+00,4.000000000000000D+00,0.000000000000000D - $ +00/ + DATA DENOM/1/ + DATA (CF(I),I= 1, 4) /12,8,8,0/ C 1 T(1,2,4) T(3,6) - DATA (CF(I, 2),I= 1, 4) /4.000000000000000D+00 - $ ,1.200000000000000D+01,0.000000000000000D+00,4.000000000000000D - $ +00/ + DATA (CF(I),I= 5, 7) /12,0,8/ C 1 T(1,2,6) T(3,4) - DATA (CF(I, 3),I= 1, 4) /4.000000000000000D+00 - $ ,0.000000000000000D+00,1.200000000000000D+01,4.000000000000000D - $ +00/ + DATA (CF(I),I= 8, 9) /12,8/ C 1 T(1,3,4) T(2,6) - DATA (CF(I, 4),I= 1, 4) /0.000000000000000D+00 - $ ,4.000000000000000D+00,4.000000000000000D+00,1.200000000000000D - $ +01/ + DATA (CF(I),I= 10, 10) /12/ C 1 T(1,3,6) T(2,4) C ---------- C BEGIN CODE @@ -601,10 +595,12 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) MATRIX1 = 0.D0 DO M = 1, NAMPSO + CF_INDEX = 0 DO I = 1, NCOLOR ZTEMP = (0.D0,0.D0) - DO J = 1, NCOLOR - ZTEMP = ZTEMP + CF(J,I)*JAMP(J,M) + DO J = I, NCOLOR + CF_INDEX = CF_INDEX + 1 + ZTEMP = ZTEMP + CF(CF_INDEX)*JAMP(J,M) ENDDO DO N = 1, NAMPSO @@ -613,6 +609,7 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) ENDDO ENDDO ENDDO + MATRIX1 = MATRIX1/DENOM IF(SDE_STRAT.EQ.1)THEN AMP2(1)=AMP2(1)+AMP(1)*DCONJG(AMP(1)) diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gdx_ttxwpux/matrix11.png b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gdx_ttxwpux/matrix11.png new file mode 100644 index 0000000000..357266a07d Binary files /dev/null and b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gdx_ttxwpux/matrix11.png differ diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gdx_ttxwpux/matrix12.png b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gdx_ttxwpux/matrix12.png new file mode 100644 index 0000000000..cfb2804edc Binary files /dev/null and b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gdx_ttxwpux/matrix12.png differ diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gdx_ttxwpux/processConfig.h b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gdx_ttxwpux/processConfig.h new file mode 100644 index 0000000000..2e039b079e --- /dev/null +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gdx_ttxwpux/processConfig.h @@ -0,0 +1,16 @@ +// Copyright (C) 2025 CERN and UCLouvain. +// Licensed under the GNU Lesser General Public License (version 3 or later). +// Created by: S. Roiser (May 2025) for the MG5aMC CUDACPP plugin. +// Further modified by: ... for the MG5aMC CUDACPP plugin. + + +#ifndef MG5_CONFIG_SIGMA_SM_NO_B_MASS_GDX_TTXWPUX_H +#define MG5_CONFIG_SIGMA_SM_NO_B_MASS_GDX_TTXWPUX_H 1 + +namespace processConfig { + + constexpr int ndiagrams = 12; + +} + +#endif // MG5_CONFIG_SIGMA_SM_NO_B_MASS_GDX_TTXWPUX_H \ No newline at end of file diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gu_ttxwpd/CPPProcess.cc b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gu_ttxwpd/CPPProcess.cc index 16d1e89a53..867acb3b75 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gu_ttxwpd/CPPProcess.cc +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gu_ttxwpd/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -25,6 +25,7 @@ #include "MemoryAccessMatrixElements.h" #include "MemoryAccessMomenta.h" #include "MemoryAccessWavefunctions.h" +#include "processConfig.h" #ifdef MGONGPU_SUPPORTS_MULTICHANNEL #include "MemoryAccessDenominators.h" @@ -97,6 +98,69 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { +#ifdef MGONGPU_SUPPORTS_MULTICHANNEL + __device__ INLINE unsigned int getChannelId( const unsigned int* allChannelIds +#ifndef MGONGPUCPP_GPUIMPL + , + const int ievt00, + bool sanityCheckMixedPrecision = true +#endif + ) + { + unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr +#ifdef MGONGPUCPP_GPUIMPL + using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page + if( allChannelIds != nullptr ) + { + const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) + const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) + // NB: channelIds_sv is a scalar in CUDA + channelId = channelIds_sv; + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + } +#else // Cuda or C++ + using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + if( allChannelIds != nullptr ) + { + // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) + const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 + uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) +#ifndef MGONGPU_CPPSIMD + // NB: channelIds_sv is a scalar in no-SIMD C++ + channelId = channelIds_sv; +#else + // NB: channelIds_sv is a vector in SIMD C++ + channelId = channelIds_sv[0]; // element[0] + for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] + { + assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId + } +#endif + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + if( sanityCheckMixedPrecision ) + { +#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT + // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) + const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 + uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + for( int i = 0; i < neppV; ++i ) + { + assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector + } +#endif + } + } +#endif // MGONGPUCPP_GPUIMPL + return channelId; + } +#endif // MGONGPU_SUPPORTS_MULTICHANNEL + constexpr int nw6 = CPPProcess::nw6; // dimensions of each wavefunction (HELAS KEK 91-11): e.g. 6 for e+ e- -> mu+ mu- (fermions and vectors) constexpr int npar = CPPProcess::npar; // #particles in total (external = initial + final): e.g. 4 for e+ e- -> mu+ mu- constexpr int ncomb = CPPProcess::ncomb; // #helicity combinations: e.g. 16 for e+ e- -> mu+ mu- (2**4 = fermion spin up/down ** npar) @@ -306,7 +370,7 @@ namespace mg5amcCpu COUPs[ndcoup + iicoup] = allCOUPs[ndcoup + iicoup]; // independent couplings, fixed for all events fptype* MEs = E_ACCESS::ieventAccessRecord( allMEs, ievt0 ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); #endif #endif @@ -316,7 +380,7 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Numerators and denominators for the current event (CUDA) or SIMD event page (C++) - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); #endif @@ -342,8 +406,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1 FFV1_0( w_fp[8], w_fp[5], w_fp[7], 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] ); + if( channelId != 0 ) + { + numerators_sv[0] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= 1. / 2. * amp_sv[0]; jamp_sv[2] += 1. / 6. * amp_sv[0]; @@ -356,8 +423,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 2 FFV1_0( w_fp[6], w_fp[8], 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] ); + if( channelId != 0 ) + { + numerators_sv[1] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= 1. / 2. * amp_sv[0]; jamp_sv[2] += 1. / 6. * amp_sv[0]; @@ -372,8 +442,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 3 FFV1_0( w_fp[9], w_fp[5], w_fp[10], 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] ); + if( channelId != 0 ) + { + numerators_sv[2] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= 1. / 2. * amp_sv[0]; jamp_sv[1] += 1. / 6. * amp_sv[0]; @@ -386,8 +459,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 4 FFV1_0( w_fp[1], w_fp[8], 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] ); + if( channelId != 0 ) + { + numerators_sv[3] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= 1. / 2. * amp_sv[0]; jamp_sv[1] += 1. / 6. * amp_sv[0]; @@ -401,8 +477,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 5 FFV1_0( w_fp[9], w_fp[5], w_fp[3], 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] ); + if( channelId != 0 ) + { + numerators_sv[4] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += 1. / 6. * amp_sv[0]; jamp_sv[3] -= 1. / 2. * amp_sv[0]; @@ -415,8 +494,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 6 FFV1_0( w_fp[1], w_fp[8], w_fp[3], COUPs[0], 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] ); + if( channelId != 0 ) + { + numerators_sv[5] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += 1. / 6. * amp_sv[0]; jamp_sv[3] -= 1. / 2. * amp_sv[0]; @@ -429,8 +511,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 7 FFV1_0( w_fp[9], w_fp[3], w_fp[7], 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] ); + if( channelId != 0 ) + { + numerators_sv[6] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] += 1. / 6. * amp_sv[0]; jamp_sv[3] -= 1. / 2. * amp_sv[0]; @@ -443,8 +528,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 8 FFV1_0( w_fp[1], w_fp[10], w_fp[7], 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] ); + if( channelId != 0 ) + { + numerators_sv[7] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] += 1. / 6. * amp_sv[0]; jamp_sv[3] -= 1. / 2. * amp_sv[0]; @@ -457,8 +545,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 9 FFV1_0( w_fp[10], w_fp[5], w_fp[7], COUPs[0], 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] ); + if( channelId != 0 ) + { + numerators_sv[8] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= 1. / 2. * amp_sv[0]; jamp_sv[2] += 1. / 6. * amp_sv[0]; @@ -471,8 +562,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 10 FFV1_0( w_fp[9], w_fp[5], w_fp[10], 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] ); + if( channelId != 0 ) + { + numerators_sv[9] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[3] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -485,8 +579,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 11 FFV1_0( w_fp[1], w_fp[8], w_fp[10], COUPs[0], 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] ); + if( channelId != 0 ) + { + numerators_sv[10] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[3] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -499,8 +596,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 12 FFV1_0( w_fp[1], w_fp[10], w_fp[7], 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] ); + if( channelId != 0 ) + { + numerators_sv[11] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] += 1. / 6. * amp_sv[0]; jamp_sv[3] -= 1. / 2. * amp_sv[0]; @@ -775,7 +875,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- @@ -1148,9 +1250,6 @@ namespace mg5amcCpu #ifdef MGONGPUCPP_GPUIMPL // Remember: in CUDA this is a kernel for one event, in c++ this processes n events const int ievt = blockDim.x * blockIdx.x + threadIdx.x; // index of event (thread) in grid -#ifdef MGONGPU_SUPPORTS_MULTICHANNEL - using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events -#endif #else //assert( (size_t)(allmomenta) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] //assert( (size_t)(allMEs) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] @@ -1158,7 +1257,6 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL using NUM_ACCESS = HostAccessNumerators; // non-trivial access: buffer includes all events using DEN_ACCESS = HostAccessDenominators; // non-trivial access: buffer includes all events - using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events #endif #endif @@ -1183,11 +1281,12 @@ namespace mg5amcCpu fptype_sv& MEs_sv = E_ACCESS::kernelAccess( MEs ); MEs_sv = fptype_sv{ 0 }; #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - numerators_sv = fptype_sv{ 0 }; + for( int i = 0; i < processConfig::ndiagrams; ++i ) + numerators_sv[i] = fptype_sv{ 0 }; denominators_sv = fptype_sv{ 0 }; #endif } @@ -1200,17 +1299,7 @@ namespace mg5amcCpu // *** START OF PART 1a - CUDA (one event per GPU thread) *** #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) - const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) - // NB: channelIds_sv is a scalar in CUDA - channelId = channelIds_sv; - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) - } + unsigned int channelId = getChannelId( allChannelIds ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (for the single event processed in calculate_wavefunctions) @@ -1325,38 +1414,7 @@ namespace mg5amcCpu const int ievt00 = ipagV2 * neppV; // loop on one SIMD page (neppV events) at a time #endif #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) - const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 - uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) -#ifndef MGONGPU_CPPSIMD - // NB: channelIds_sv is a scalar in no-SIMD C++ - channelId = channelIds_sv; -#else - // NB: channelIds_sv is a vector in SIMD C++ - channelId = channelIds_sv[0]; // element[0] - for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] - { - assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId - } -#endif - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) -#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT - // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) - const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 - uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - for( int i = 0; i < neppV; ++i ) - { - assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector - } -#endif - } + unsigned int channelId = getChannelId( allChannelIds, ievt00 ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (jamp2[nParity][ncolor][neppV] for the SIMD vector - or the two SIMD vectors - of events processed in calculate_wavefunctions) @@ -1529,11 +1587,12 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( allChannelIds != nullptr ) // fix segfault #892 (not 'channelIds[0] != 0') { - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + const unsigned int channelId = getChannelId( allChannelIds, ievt0, false ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - MEs_sv *= numerators_sv / denominators_sv; + MEs_sv *= numerators_sv[channelId - 1] / denominators_sv; } #endif //for( int ieppV = 0; ieppV < neppV; ieppV++ ) diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gu_ttxwpd/CPPProcess.h b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gu_ttxwpd/CPPProcess.h index f799f32129..5ca4976990 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gu_ttxwpd/CPPProcess.h +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gu_ttxwpd/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gu_ttxwpd/auto_dsig.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gu_ttxwpd/auto_dsig.f index e5ddbf348a..78747ee297 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gu_ttxwpd/auto_dsig.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gu_ttxwpd/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gu_ttxwpd/auto_dsig1.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gu_ttxwpd/auto_dsig1.f index 4ebece2e78..dd8d63263e 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gu_ttxwpd/auto_dsig1.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gu_ttxwpd/auto_dsig1.f @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -138,14 +138,14 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDDO QSCALE=QSCALE/2D0 ELSE - QSCALE=DSQRT(Q2FACT(IB(1))) + QSCALE=DSQRT(Q2FACT(1)) ENDIF G1=PDG2PDF(LPP(IB(1)),0, IB(1),XBK(IB(1)), QSCALE) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) IF (DSQRT(Q2FACT(IB(2))).NE.0D0) THEN - QSCALE=DSQRT(Q2FACT(IB(2))) + QSCALE=DSQRT(Q2FACT(2)) ENDIF U2=PDG2PDF(LPP(IB(2)),2, IB(2),XBK(IB(2)), QSCALE) C2=PDG2PDF(LPP(IB(2)),4, IB(2),XBK(IB(2)), QSCALE) @@ -224,7 +224,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -296,6 +296,10 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, INTEGER I_EE C +C STUFF FOR UPC +C + DOUBLE PRECISION PHOTONPDFSQUARE +C C EXTERNAL FUNCTIONS C LOGICAL PASSCUTS @@ -379,14 +383,14 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, IF (ABS(LPP(IB(1))).GE.1) THEN C LP=SIGN(1,LPP(IB(1))) G1(IVEC)=PDG2PDF(LPP(IB(1)),0, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) U2(IVEC)=PDG2PDF(LPP(IB(2)),2, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) C2(IVEC)=PDG2PDF(LPP(IB(2)),4, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) ENDIF ENDDO ! IWARP LOOP ENDDO ! CURRWARP LOOP diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gu_ttxwpd/card.png b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gu_ttxwpd/card.png new file mode 100644 index 0000000000..a817132c14 Binary files /dev/null and b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gu_ttxwpd/card.png differ diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gu_ttxwpd/matrix1.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gu_ttxwpd/matrix1.f index 738301d049..c2e8c2975c 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gu_ttxwpd/matrix1.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gu_ttxwpd/matrix1.f @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -403,7 +403,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -447,7 +447,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C INTEGER I,J,M,N COMPLEX*16 ZTEMP, TMP_JAMP(7) - REAL*8 CF(NCOLOR,NCOLOR) + INTEGER CF(NCOLOR*(NCOLOR+1)/2) + INTEGER DENOM, CF_INDEX COMPLEX*16 AMP(NGRAPHS), JAMP(NCOLOR,NAMPSO) COMPLEX*16 W(6,NWAVEFUNCS) C Needed for v4 models @@ -492,21 +493,14 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C C COLOR DATA C - DATA (CF(I, 1),I= 1, 4) /1.200000000000000D+01 - $ ,4.000000000000000D+00,4.000000000000000D+00,0.000000000000000D - $ +00/ + DATA DENOM/1/ + DATA (CF(I),I= 1, 4) /12,8,8,0/ C 1 T(1,3,2) T(6,4) - DATA (CF(I, 2),I= 1, 4) /4.000000000000000D+00 - $ ,1.200000000000000D+01,0.000000000000000D+00,4.000000000000000D - $ +00/ + DATA (CF(I),I= 5, 7) /12,0,8/ C 1 T(1,3,4) T(6,2) - DATA (CF(I, 3),I= 1, 4) /4.000000000000000D+00 - $ ,0.000000000000000D+00,1.200000000000000D+01,4.000000000000000D - $ +00/ + DATA (CF(I),I= 8, 9) /12,8/ C 1 T(1,6,2) T(3,4) - DATA (CF(I, 4),I= 1, 4) /0.000000000000000D+00 - $ ,4.000000000000000D+00,4.000000000000000D+00,1.200000000000000D - $ +01/ + DATA (CF(I),I= 10, 10) /12/ C 1 T(1,6,4) T(3,2) C ---------- C BEGIN CODE @@ -601,10 +595,12 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) MATRIX1 = 0.D0 DO M = 1, NAMPSO + CF_INDEX = 0 DO I = 1, NCOLOR ZTEMP = (0.D0,0.D0) - DO J = 1, NCOLOR - ZTEMP = ZTEMP + CF(J,I)*JAMP(J,M) + DO J = I, NCOLOR + CF_INDEX = CF_INDEX + 1 + ZTEMP = ZTEMP + CF(CF_INDEX)*JAMP(J,M) ENDDO DO N = 1, NAMPSO @@ -613,6 +609,7 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) ENDDO ENDDO ENDDO + MATRIX1 = MATRIX1/DENOM IF(SDE_STRAT.EQ.1)THEN AMP2(1)=AMP2(1)+AMP(1)*DCONJG(AMP(1)) diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gu_ttxwpd/matrix11.png b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gu_ttxwpd/matrix11.png new file mode 100644 index 0000000000..7d2d0ec070 Binary files /dev/null and b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gu_ttxwpd/matrix11.png differ diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gu_ttxwpd/matrix12.png b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gu_ttxwpd/matrix12.png new file mode 100644 index 0000000000..46c92e628d Binary files /dev/null and b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gu_ttxwpd/matrix12.png differ diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gu_ttxwpd/processConfig.h b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gu_ttxwpd/processConfig.h new file mode 100644 index 0000000000..8aa1915d04 --- /dev/null +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gu_ttxwpd/processConfig.h @@ -0,0 +1,16 @@ +// Copyright (C) 2025 CERN and UCLouvain. +// Licensed under the GNU Lesser General Public License (version 3 or later). +// Created by: S. Roiser (May 2025) for the MG5aMC CUDACPP plugin. +// Further modified by: ... for the MG5aMC CUDACPP plugin. + + +#ifndef MG5_CONFIG_SIGMA_SM_NO_B_MASS_GU_TTXWPD_H +#define MG5_CONFIG_SIGMA_SM_NO_B_MASS_GU_TTXWPD_H 1 + +namespace processConfig { + + constexpr int ndiagrams = 12; + +} + +#endif // MG5_CONFIG_SIGMA_SM_NO_B_MASS_GU_TTXWPD_H \ No newline at end of file diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gux_ttxwmdx/CPPProcess.cc b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gux_ttxwmdx/CPPProcess.cc index 41a6e0002f..2d8e1ce247 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gux_ttxwmdx/CPPProcess.cc +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gux_ttxwmdx/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -25,6 +25,7 @@ #include "MemoryAccessMatrixElements.h" #include "MemoryAccessMomenta.h" #include "MemoryAccessWavefunctions.h" +#include "processConfig.h" #ifdef MGONGPU_SUPPORTS_MULTICHANNEL #include "MemoryAccessDenominators.h" @@ -97,6 +98,69 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { +#ifdef MGONGPU_SUPPORTS_MULTICHANNEL + __device__ INLINE unsigned int getChannelId( const unsigned int* allChannelIds +#ifndef MGONGPUCPP_GPUIMPL + , + const int ievt00, + bool sanityCheckMixedPrecision = true +#endif + ) + { + unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr +#ifdef MGONGPUCPP_GPUIMPL + using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page + if( allChannelIds != nullptr ) + { + const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) + const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) + // NB: channelIds_sv is a scalar in CUDA + channelId = channelIds_sv; + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + } +#else // Cuda or C++ + using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + if( allChannelIds != nullptr ) + { + // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) + const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 + uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) +#ifndef MGONGPU_CPPSIMD + // NB: channelIds_sv is a scalar in no-SIMD C++ + channelId = channelIds_sv; +#else + // NB: channelIds_sv is a vector in SIMD C++ + channelId = channelIds_sv[0]; // element[0] + for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] + { + assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId + } +#endif + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + if( sanityCheckMixedPrecision ) + { +#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT + // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) + const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 + uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + for( int i = 0; i < neppV; ++i ) + { + assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector + } +#endif + } + } +#endif // MGONGPUCPP_GPUIMPL + return channelId; + } +#endif // MGONGPU_SUPPORTS_MULTICHANNEL + constexpr int nw6 = CPPProcess::nw6; // dimensions of each wavefunction (HELAS KEK 91-11): e.g. 6 for e+ e- -> mu+ mu- (fermions and vectors) constexpr int npar = CPPProcess::npar; // #particles in total (external = initial + final): e.g. 4 for e+ e- -> mu+ mu- constexpr int ncomb = CPPProcess::ncomb; // #helicity combinations: e.g. 16 for e+ e- -> mu+ mu- (2**4 = fermion spin up/down ** npar) @@ -306,7 +370,7 @@ namespace mg5amcCpu COUPs[ndcoup + iicoup] = allCOUPs[ndcoup + iicoup]; // independent couplings, fixed for all events fptype* MEs = E_ACCESS::ieventAccessRecord( allMEs, ievt0 ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); #endif #endif @@ -316,7 +380,7 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Numerators and denominators for the current event (CUDA) or SIMD event page (C++) - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); #endif @@ -342,8 +406,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1 FFV1_0( w_fp[8], w_fp[1], w_fp[7], 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] ); + if( channelId != 0 ) + { + numerators_sv[0] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] -= 1. / 6. * amp_sv[0]; jamp_sv[3] += 1. / 2. * amp_sv[0]; @@ -356,8 +423,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 2 FFV1_0( w_fp[6], w_fp[8], 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] ); + if( channelId != 0 ) + { + numerators_sv[1] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] -= 1. / 6. * amp_sv[0]; jamp_sv[3] += 1. / 2. * amp_sv[0]; @@ -372,8 +442,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 3 FFV1_0( w_fp[9], w_fp[1], w_fp[10], 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] ); + if( channelId != 0 ) + { + numerators_sv[2] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] -= 1. / 6. * amp_sv[0]; jamp_sv[3] += 1. / 2. * amp_sv[0]; @@ -386,8 +459,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 4 FFV1_0( w_fp[5], w_fp[8], 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] ); + if( channelId != 0 ) + { + numerators_sv[3] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] -= 1. / 6. * amp_sv[0]; jamp_sv[3] += 1. / 2. * amp_sv[0]; @@ -401,8 +477,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 5 FFV1_0( w_fp[9], w_fp[1], w_fp[3], 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] ); + if( channelId != 0 ) + { + numerators_sv[4] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 2. * amp_sv[0]; jamp_sv[2] -= 1. / 6. * amp_sv[0]; @@ -415,8 +494,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 6 FFV1_0( w_fp[5], w_fp[8], w_fp[3], COUPs[0], 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] ); + if( channelId != 0 ) + { + numerators_sv[5] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 2. * amp_sv[0]; jamp_sv[2] -= 1. / 6. * amp_sv[0]; @@ -429,8 +511,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 7 FFV1_0( w_fp[9], w_fp[3], w_fp[7], 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] ); + if( channelId != 0 ) + { + numerators_sv[6] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 2. * amp_sv[0]; jamp_sv[1] -= 1. / 6. * amp_sv[0]; @@ -443,8 +528,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 8 FFV1_0( w_fp[5], w_fp[10], w_fp[7], 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] ); + if( channelId != 0 ) + { + numerators_sv[7] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 2. * amp_sv[0]; jamp_sv[1] -= 1. / 6. * amp_sv[0]; @@ -457,8 +545,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 9 FFV1_0( w_fp[10], w_fp[1], w_fp[7], COUPs[0], 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] ); + if( channelId != 0 ) + { + numerators_sv[8] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] -= 1. / 6. * amp_sv[0]; jamp_sv[3] += 1. / 2. * amp_sv[0]; @@ -471,8 +562,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 10 FFV1_0( w_fp[9], w_fp[1], w_fp[10], 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] ); + if( channelId != 0 ) + { + numerators_sv[9] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[3] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -485,8 +579,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 11 FFV1_0( w_fp[5], w_fp[8], w_fp[10], COUPs[0], 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] ); + if( channelId != 0 ) + { + numerators_sv[10] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[3] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -499,8 +596,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 12 FFV1_0( w_fp[5], w_fp[10], w_fp[7], 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] ); + if( channelId != 0 ) + { + numerators_sv[11] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 2. * amp_sv[0]; jamp_sv[1] -= 1. / 6. * amp_sv[0]; @@ -775,7 +875,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- @@ -1148,9 +1250,6 @@ namespace mg5amcCpu #ifdef MGONGPUCPP_GPUIMPL // Remember: in CUDA this is a kernel for one event, in c++ this processes n events const int ievt = blockDim.x * blockIdx.x + threadIdx.x; // index of event (thread) in grid -#ifdef MGONGPU_SUPPORTS_MULTICHANNEL - using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events -#endif #else //assert( (size_t)(allmomenta) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] //assert( (size_t)(allMEs) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] @@ -1158,7 +1257,6 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL using NUM_ACCESS = HostAccessNumerators; // non-trivial access: buffer includes all events using DEN_ACCESS = HostAccessDenominators; // non-trivial access: buffer includes all events - using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events #endif #endif @@ -1183,11 +1281,12 @@ namespace mg5amcCpu fptype_sv& MEs_sv = E_ACCESS::kernelAccess( MEs ); MEs_sv = fptype_sv{ 0 }; #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - numerators_sv = fptype_sv{ 0 }; + for( int i = 0; i < processConfig::ndiagrams; ++i ) + numerators_sv[i] = fptype_sv{ 0 }; denominators_sv = fptype_sv{ 0 }; #endif } @@ -1200,17 +1299,7 @@ namespace mg5amcCpu // *** START OF PART 1a - CUDA (one event per GPU thread) *** #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) - const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) - // NB: channelIds_sv is a scalar in CUDA - channelId = channelIds_sv; - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) - } + unsigned int channelId = getChannelId( allChannelIds ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (for the single event processed in calculate_wavefunctions) @@ -1325,38 +1414,7 @@ namespace mg5amcCpu const int ievt00 = ipagV2 * neppV; // loop on one SIMD page (neppV events) at a time #endif #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) - const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 - uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) -#ifndef MGONGPU_CPPSIMD - // NB: channelIds_sv is a scalar in no-SIMD C++ - channelId = channelIds_sv; -#else - // NB: channelIds_sv is a vector in SIMD C++ - channelId = channelIds_sv[0]; // element[0] - for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] - { - assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId - } -#endif - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) -#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT - // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) - const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 - uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - for( int i = 0; i < neppV; ++i ) - { - assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector - } -#endif - } + unsigned int channelId = getChannelId( allChannelIds, ievt00 ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (jamp2[nParity][ncolor][neppV] for the SIMD vector - or the two SIMD vectors - of events processed in calculate_wavefunctions) @@ -1529,11 +1587,12 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( allChannelIds != nullptr ) // fix segfault #892 (not 'channelIds[0] != 0') { - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + const unsigned int channelId = getChannelId( allChannelIds, ievt0, false ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - MEs_sv *= numerators_sv / denominators_sv; + MEs_sv *= numerators_sv[channelId - 1] / denominators_sv; } #endif //for( int ieppV = 0; ieppV < neppV; ieppV++ ) diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gux_ttxwmdx/CPPProcess.h b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gux_ttxwmdx/CPPProcess.h index b6253b6715..c851104598 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gux_ttxwmdx/CPPProcess.h +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gux_ttxwmdx/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gux_ttxwmdx/auto_dsig.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gux_ttxwmdx/auto_dsig.f index 8e03eed7eb..8f328acf0e 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gux_ttxwmdx/auto_dsig.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gux_ttxwmdx/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gux_ttxwmdx/auto_dsig1.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gux_ttxwmdx/auto_dsig1.f index 9d0ddcecfc..977cc5a608 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gux_ttxwmdx/auto_dsig1.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gux_ttxwmdx/auto_dsig1.f @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -138,14 +138,14 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDDO QSCALE=QSCALE/2D0 ELSE - QSCALE=DSQRT(Q2FACT(IB(1))) + QSCALE=DSQRT(Q2FACT(1)) ENDIF G1=PDG2PDF(LPP(IB(1)),0, IB(1),XBK(IB(1)), QSCALE) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) IF (DSQRT(Q2FACT(IB(2))).NE.0D0) THEN - QSCALE=DSQRT(Q2FACT(IB(2))) + QSCALE=DSQRT(Q2FACT(2)) ENDIF CX2=PDG2PDF(LPP(IB(2)),-4, IB(2),XBK(IB(2)), QSCALE) UX2=PDG2PDF(LPP(IB(2)),-2, IB(2),XBK(IB(2)), QSCALE) @@ -224,7 +224,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -296,6 +296,10 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, INTEGER I_EE C +C STUFF FOR UPC +C + DOUBLE PRECISION PHOTONPDFSQUARE +C C EXTERNAL FUNCTIONS C LOGICAL PASSCUTS @@ -379,14 +383,14 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, IF (ABS(LPP(IB(1))).GE.1) THEN C LP=SIGN(1,LPP(IB(1))) G1(IVEC)=PDG2PDF(LPP(IB(1)),0, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) CX2(IVEC)=PDG2PDF(LPP(IB(2)),-4, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) UX2(IVEC)=PDG2PDF(LPP(IB(2)),-2, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) ENDIF ENDDO ! IWARP LOOP ENDDO ! CURRWARP LOOP diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gux_ttxwmdx/matrix1.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gux_ttxwmdx/matrix1.f index 6b3ff14d2d..b0004829e9 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gux_ttxwmdx/matrix1.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gux_ttxwmdx/matrix1.f @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -403,7 +403,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -447,7 +447,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C INTEGER I,J,M,N COMPLEX*16 ZTEMP, TMP_JAMP(7) - REAL*8 CF(NCOLOR,NCOLOR) + INTEGER CF(NCOLOR*(NCOLOR+1)/2) + INTEGER DENOM, CF_INDEX COMPLEX*16 AMP(NGRAPHS), JAMP(NCOLOR,NAMPSO) COMPLEX*16 W(6,NWAVEFUNCS) C Needed for v4 models @@ -492,21 +493,14 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C C COLOR DATA C - DATA (CF(I, 1),I= 1, 4) /1.200000000000000D+01 - $ ,4.000000000000000D+00,4.000000000000000D+00,0.000000000000000D - $ +00/ + DATA DENOM/1/ + DATA (CF(I),I= 1, 4) /12,8,8,0/ C 1 T(1,2,4) T(3,6) - DATA (CF(I, 2),I= 1, 4) /4.000000000000000D+00 - $ ,1.200000000000000D+01,0.000000000000000D+00,4.000000000000000D - $ +00/ + DATA (CF(I),I= 5, 7) /12,0,8/ C 1 T(1,2,6) T(3,4) - DATA (CF(I, 3),I= 1, 4) /4.000000000000000D+00 - $ ,0.000000000000000D+00,1.200000000000000D+01,4.000000000000000D - $ +00/ + DATA (CF(I),I= 8, 9) /12,8/ C 1 T(1,3,4) T(2,6) - DATA (CF(I, 4),I= 1, 4) /0.000000000000000D+00 - $ ,4.000000000000000D+00,4.000000000000000D+00,1.200000000000000D - $ +01/ + DATA (CF(I),I= 10, 10) /12/ C 1 T(1,3,6) T(2,4) C ---------- C BEGIN CODE @@ -601,10 +595,12 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) MATRIX1 = 0.D0 DO M = 1, NAMPSO + CF_INDEX = 0 DO I = 1, NCOLOR ZTEMP = (0.D0,0.D0) - DO J = 1, NCOLOR - ZTEMP = ZTEMP + CF(J,I)*JAMP(J,M) + DO J = I, NCOLOR + CF_INDEX = CF_INDEX + 1 + ZTEMP = ZTEMP + CF(CF_INDEX)*JAMP(J,M) ENDDO DO N = 1, NAMPSO @@ -613,6 +609,7 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) ENDDO ENDDO ENDDO + MATRIX1 = MATRIX1/DENOM IF(SDE_STRAT.EQ.1)THEN AMP2(1)=AMP2(1)+AMP(1)*DCONJG(AMP(1)) diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gux_ttxwmdx/matrix11.png b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gux_ttxwmdx/matrix11.png new file mode 100644 index 0000000000..3edb56cf43 Binary files /dev/null and b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gux_ttxwmdx/matrix11.png differ diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gux_ttxwmdx/matrix12.png b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gux_ttxwmdx/matrix12.png new file mode 100644 index 0000000000..c51eb9110d Binary files /dev/null and b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gux_ttxwmdx/matrix12.png differ diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gux_ttxwmdx/processConfig.h b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gux_ttxwmdx/processConfig.h new file mode 100644 index 0000000000..6724b700f9 --- /dev/null +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gux_ttxwmdx/processConfig.h @@ -0,0 +1,16 @@ +// Copyright (C) 2025 CERN and UCLouvain. +// Licensed under the GNU Lesser General Public License (version 3 or later). +// Created by: S. Roiser (May 2025) for the MG5aMC CUDACPP plugin. +// Further modified by: ... for the MG5aMC CUDACPP plugin. + + +#ifndef MG5_CONFIG_SIGMA_SM_NO_B_MASS_GUX_TTXWMDX_H +#define MG5_CONFIG_SIGMA_SM_NO_B_MASS_GUX_TTXWMDX_H 1 + +namespace processConfig { + + constexpr int ndiagrams = 12; + +} + +#endif // MG5_CONFIG_SIGMA_SM_NO_B_MASS_GUX_TTXWMDX_H \ No newline at end of file diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_udx_ttxwpg/CPPProcess.cc b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_udx_ttxwpg/CPPProcess.cc index f90db593a9..522e8ee68a 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_udx_ttxwpg/CPPProcess.cc +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_udx_ttxwpg/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -25,6 +25,7 @@ #include "MemoryAccessMatrixElements.h" #include "MemoryAccessMomenta.h" #include "MemoryAccessWavefunctions.h" +#include "processConfig.h" #ifdef MGONGPU_SUPPORTS_MULTICHANNEL #include "MemoryAccessDenominators.h" @@ -97,6 +98,69 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { +#ifdef MGONGPU_SUPPORTS_MULTICHANNEL + __device__ INLINE unsigned int getChannelId( const unsigned int* allChannelIds +#ifndef MGONGPUCPP_GPUIMPL + , + const int ievt00, + bool sanityCheckMixedPrecision = true +#endif + ) + { + unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr +#ifdef MGONGPUCPP_GPUIMPL + using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page + if( allChannelIds != nullptr ) + { + const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) + const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) + // NB: channelIds_sv is a scalar in CUDA + channelId = channelIds_sv; + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + } +#else // Cuda or C++ + using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + if( allChannelIds != nullptr ) + { + // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) + const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 + uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) +#ifndef MGONGPU_CPPSIMD + // NB: channelIds_sv is a scalar in no-SIMD C++ + channelId = channelIds_sv; +#else + // NB: channelIds_sv is a vector in SIMD C++ + channelId = channelIds_sv[0]; // element[0] + for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] + { + assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId + } +#endif + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + if( sanityCheckMixedPrecision ) + { +#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT + // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) + const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 + uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + for( int i = 0; i < neppV; ++i ) + { + assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector + } +#endif + } + } +#endif // MGONGPUCPP_GPUIMPL + return channelId; + } +#endif // MGONGPU_SUPPORTS_MULTICHANNEL + constexpr int nw6 = CPPProcess::nw6; // dimensions of each wavefunction (HELAS KEK 91-11): e.g. 6 for e+ e- -> mu+ mu- (fermions and vectors) constexpr int npar = CPPProcess::npar; // #particles in total (external = initial + final): e.g. 4 for e+ e- -> mu+ mu- constexpr int ncomb = CPPProcess::ncomb; // #helicity combinations: e.g. 16 for e+ e- -> mu+ mu- (2**4 = fermion spin up/down ** npar) @@ -306,7 +370,7 @@ namespace mg5amcCpu COUPs[ndcoup + iicoup] = allCOUPs[ndcoup + iicoup]; // independent couplings, fixed for all events fptype* MEs = E_ACCESS::ieventAccessRecord( allMEs, ievt0 ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); #endif #endif @@ -316,7 +380,7 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Numerators and denominators for the current event (CUDA) or SIMD event page (C++) - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); #endif @@ -342,8 +406,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1 FFV1_0( w_fp[8], w_fp[1], w_fp[7], 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] ); + if( channelId != 0 ) + { + numerators_sv[0] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] -= 1. / 2. * amp_sv[0]; jamp_sv[3] += 1. / 6. * amp_sv[0]; @@ -356,8 +423,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 2 FFV1_0( w_fp[6], w_fp[8], 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] ); + if( channelId != 0 ) + { + numerators_sv[1] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] -= 1. / 2. * amp_sv[0]; jamp_sv[3] += 1. / 6. * amp_sv[0]; @@ -372,8 +442,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 3 FFV1_0( w_fp[9], w_fp[1], w_fp[10], 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] ); + if( channelId != 0 ) + { + numerators_sv[2] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 6. * amp_sv[0]; jamp_sv[1] -= 1. / 2. * amp_sv[0]; @@ -386,8 +459,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 4 FFV1_0( w_fp[0], w_fp[8], 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] ); + if( channelId != 0 ) + { + numerators_sv[3] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 6. * amp_sv[0]; jamp_sv[1] -= 1. / 2. * amp_sv[0]; @@ -401,8 +477,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 5 FFV1_0( w_fp[9], w_fp[1], w_fp[3], 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] ); + if( channelId != 0 ) + { + numerators_sv[4] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 6. * amp_sv[0]; jamp_sv[2] -= 1. / 2. * amp_sv[0]; @@ -415,8 +494,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 6 FFV1_0( w_fp[0], w_fp[8], w_fp[3], COUPs[0], 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] ); + if( channelId != 0 ) + { + numerators_sv[5] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 6. * amp_sv[0]; jamp_sv[2] -= 1. / 2. * amp_sv[0]; @@ -429,8 +511,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 7 FFV1_0( w_fp[9], w_fp[3], w_fp[7], 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] ); + if( channelId != 0 ) + { + numerators_sv[6] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] -= 1. / 2. * amp_sv[0]; jamp_sv[3] += 1. / 6. * amp_sv[0]; @@ -443,8 +528,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 8 FFV1_0( w_fp[0], w_fp[10], w_fp[7], 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] ); + if( channelId != 0 ) + { + numerators_sv[7] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] -= 1. / 2. * amp_sv[0]; jamp_sv[3] += 1. / 6. * amp_sv[0]; @@ -457,8 +545,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 9 FFV1_0( w_fp[10], w_fp[1], w_fp[7], COUPs[0], 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] ); + if( channelId != 0 ) + { + numerators_sv[8] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] -= 1. / 2. * amp_sv[0]; jamp_sv[3] += 1. / 6. * amp_sv[0]; @@ -471,8 +562,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 10 FFV1_0( w_fp[9], w_fp[1], w_fp[10], 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] ); + if( channelId != 0 ) + { + numerators_sv[9] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[2] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -485,8 +579,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 11 FFV1_0( w_fp[0], w_fp[8], w_fp[10], COUPs[0], 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] ); + if( channelId != 0 ) + { + numerators_sv[10] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[2] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -499,8 +596,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 12 FFV1_0( w_fp[0], w_fp[10], w_fp[7], 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] ); + if( channelId != 0 ) + { + numerators_sv[11] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] -= 1. / 2. * amp_sv[0]; jamp_sv[3] += 1. / 6. * amp_sv[0]; @@ -775,7 +875,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- @@ -1148,9 +1250,6 @@ namespace mg5amcCpu #ifdef MGONGPUCPP_GPUIMPL // Remember: in CUDA this is a kernel for one event, in c++ this processes n events const int ievt = blockDim.x * blockIdx.x + threadIdx.x; // index of event (thread) in grid -#ifdef MGONGPU_SUPPORTS_MULTICHANNEL - using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events -#endif #else //assert( (size_t)(allmomenta) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] //assert( (size_t)(allMEs) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] @@ -1158,7 +1257,6 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL using NUM_ACCESS = HostAccessNumerators; // non-trivial access: buffer includes all events using DEN_ACCESS = HostAccessDenominators; // non-trivial access: buffer includes all events - using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events #endif #endif @@ -1183,11 +1281,12 @@ namespace mg5amcCpu fptype_sv& MEs_sv = E_ACCESS::kernelAccess( MEs ); MEs_sv = fptype_sv{ 0 }; #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - numerators_sv = fptype_sv{ 0 }; + for( int i = 0; i < processConfig::ndiagrams; ++i ) + numerators_sv[i] = fptype_sv{ 0 }; denominators_sv = fptype_sv{ 0 }; #endif } @@ -1200,17 +1299,7 @@ namespace mg5amcCpu // *** START OF PART 1a - CUDA (one event per GPU thread) *** #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) - const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) - // NB: channelIds_sv is a scalar in CUDA - channelId = channelIds_sv; - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) - } + unsigned int channelId = getChannelId( allChannelIds ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (for the single event processed in calculate_wavefunctions) @@ -1325,38 +1414,7 @@ namespace mg5amcCpu const int ievt00 = ipagV2 * neppV; // loop on one SIMD page (neppV events) at a time #endif #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) - const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 - uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) -#ifndef MGONGPU_CPPSIMD - // NB: channelIds_sv is a scalar in no-SIMD C++ - channelId = channelIds_sv; -#else - // NB: channelIds_sv is a vector in SIMD C++ - channelId = channelIds_sv[0]; // element[0] - for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] - { - assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId - } -#endif - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) -#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT - // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) - const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 - uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - for( int i = 0; i < neppV; ++i ) - { - assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector - } -#endif - } + unsigned int channelId = getChannelId( allChannelIds, ievt00 ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (jamp2[nParity][ncolor][neppV] for the SIMD vector - or the two SIMD vectors - of events processed in calculate_wavefunctions) @@ -1529,11 +1587,12 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( allChannelIds != nullptr ) // fix segfault #892 (not 'channelIds[0] != 0') { - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + const unsigned int channelId = getChannelId( allChannelIds, ievt0, false ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - MEs_sv *= numerators_sv / denominators_sv; + MEs_sv *= numerators_sv[channelId - 1] / denominators_sv; } #endif //for( int ieppV = 0; ieppV < neppV; ieppV++ ) diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_udx_ttxwpg/CPPProcess.h b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_udx_ttxwpg/CPPProcess.h index b4a0ccb74d..50adc138aa 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_udx_ttxwpg/CPPProcess.h +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_udx_ttxwpg/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_udx_ttxwpg/auto_dsig.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_udx_ttxwpg/auto_dsig.f index 7e750641c8..dd792566df 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_udx_ttxwpg/auto_dsig.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_udx_ttxwpg/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_udx_ttxwpg/auto_dsig1.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_udx_ttxwpg/auto_dsig1.f index 28ad0eed08..6813f38791 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_udx_ttxwpg/auto_dsig1.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_udx_ttxwpg/auto_dsig1.f @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -138,7 +138,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDDO QSCALE=QSCALE/2D0 ELSE - QSCALE=DSQRT(Q2FACT(IB(1))) + QSCALE=DSQRT(Q2FACT(1)) ENDIF U1=PDG2PDF(LPP(IB(1)),2, IB(1),XBK(IB(1)), QSCALE) C1=PDG2PDF(LPP(IB(1)),4, IB(1),XBK(IB(1)), QSCALE) @@ -146,7 +146,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) IF (DSQRT(Q2FACT(IB(2))).NE.0D0) THEN - QSCALE=DSQRT(Q2FACT(IB(2))) + QSCALE=DSQRT(Q2FACT(2)) ENDIF SX2=PDG2PDF(LPP(IB(2)),-3, IB(2),XBK(IB(2)), QSCALE) DX2=PDG2PDF(LPP(IB(2)),-1, IB(2),XBK(IB(2)), QSCALE) @@ -225,7 +225,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -297,6 +297,10 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, INTEGER I_EE C +C STUFF FOR UPC +C + DOUBLE PRECISION PHOTONPDFSQUARE +C C EXTERNAL FUNCTIONS C LOGICAL PASSCUTS @@ -380,16 +384,16 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, IF (ABS(LPP(IB(1))).GE.1) THEN C LP=SIGN(1,LPP(IB(1))) U1(IVEC)=PDG2PDF(LPP(IB(1)),2, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) C1(IVEC)=PDG2PDF(LPP(IB(1)),4, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) SX2(IVEC)=PDG2PDF(LPP(IB(2)),-3, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) DX2(IVEC)=PDG2PDF(LPP(IB(2)),-1, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) ENDIF ENDDO ! IWARP LOOP ENDDO ! CURRWARP LOOP diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_udx_ttxwpg/matrix1.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_udx_ttxwpg/matrix1.f index 536bec2827..64c618703b 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_udx_ttxwpg/matrix1.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_udx_ttxwpg/matrix1.f @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -403,7 +403,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -447,7 +447,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C INTEGER I,J,M,N COMPLEX*16 ZTEMP, TMP_JAMP(7) - REAL*8 CF(NCOLOR,NCOLOR) + INTEGER CF(NCOLOR*(NCOLOR+1)/2) + INTEGER DENOM, CF_INDEX COMPLEX*16 AMP(NGRAPHS), JAMP(NCOLOR,NAMPSO) COMPLEX*16 W(6,NWAVEFUNCS) C Needed for v4 models @@ -492,21 +493,14 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C C COLOR DATA C - DATA (CF(I, 1),I= 1, 4) /1.200000000000000D+01 - $ ,4.000000000000000D+00,4.000000000000000D+00,0.000000000000000D - $ +00/ + DATA DENOM/1/ + DATA (CF(I),I= 1, 4) /12,8,8,0/ C 1 T(2,1) T(6,3,4) - DATA (CF(I, 2),I= 1, 4) /4.000000000000000D+00 - $ ,1.200000000000000D+01,0.000000000000000D+00,4.000000000000000D - $ +00/ + DATA (CF(I),I= 5, 7) /12,0,8/ C 1 T(2,4) T(6,3,1) - DATA (CF(I, 3),I= 1, 4) /4.000000000000000D+00 - $ ,0.000000000000000D+00,1.200000000000000D+01,4.000000000000000D - $ +00/ + DATA (CF(I),I= 8, 9) /12,8/ C 1 T(3,1) T(6,2,4) - DATA (CF(I, 4),I= 1, 4) /0.000000000000000D+00 - $ ,4.000000000000000D+00,4.000000000000000D+00,1.200000000000000D - $ +01/ + DATA (CF(I),I= 10, 10) /12/ C 1 T(3,4) T(6,2,1) C ---------- C BEGIN CODE @@ -601,10 +595,12 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) MATRIX1 = 0.D0 DO M = 1, NAMPSO + CF_INDEX = 0 DO I = 1, NCOLOR ZTEMP = (0.D0,0.D0) - DO J = 1, NCOLOR - ZTEMP = ZTEMP + CF(J,I)*JAMP(J,M) + DO J = I, NCOLOR + CF_INDEX = CF_INDEX + 1 + ZTEMP = ZTEMP + CF(CF_INDEX)*JAMP(J,M) ENDDO DO N = 1, NAMPSO @@ -613,6 +609,7 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) ENDDO ENDDO ENDDO + MATRIX1 = MATRIX1/DENOM IF(SDE_STRAT.EQ.1)THEN AMP2(1)=AMP2(1)+AMP(1)*DCONJG(AMP(1)) diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_udx_ttxwpg/matrix11.png b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_udx_ttxwpg/matrix11.png new file mode 100644 index 0000000000..a0a0271f74 Binary files /dev/null and b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_udx_ttxwpg/matrix11.png differ diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_udx_ttxwpg/matrix12.png b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_udx_ttxwpg/matrix12.png new file mode 100644 index 0000000000..3580d41f53 Binary files /dev/null and b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_udx_ttxwpg/matrix12.png differ diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_udx_ttxwpg/processConfig.h b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_udx_ttxwpg/processConfig.h new file mode 100644 index 0000000000..59ab03987d --- /dev/null +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_udx_ttxwpg/processConfig.h @@ -0,0 +1,16 @@ +// Copyright (C) 2025 CERN and UCLouvain. +// Licensed under the GNU Lesser General Public License (version 3 or later). +// Created by: S. Roiser (May 2025) for the MG5aMC CUDACPP plugin. +// Further modified by: ... for the MG5aMC CUDACPP plugin. + + +#ifndef MG5_CONFIG_SIGMA_SM_NO_B_MASS_UDX_TTXWPG_H +#define MG5_CONFIG_SIGMA_SM_NO_B_MASS_UDX_TTXWPG_H 1 + +namespace processConfig { + + constexpr int ndiagrams = 12; + +} + +#endif // MG5_CONFIG_SIGMA_SM_NO_B_MASS_UDX_TTXWPG_H \ No newline at end of file diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/cuts.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/cuts.f index 7898714201..bd50ab1357 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/cuts.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/cuts.f @@ -307,12 +307,18 @@ LOGICAL FUNCTION PASSCUTS(P, VECSIZE_USED) c c Limit S_hat c - if (dsqrt_shat.ne.0d0)then - if (nincoming.eq.2.and.sumdot(p(0,1),p(0,2),1d0) .lt. dsqrt_shat**2) then - passcuts=.false. - return - endif - endif + if(nincoming.eq.2) then + if (dsqrt_shat.ne.0d0.or.dsqrt_shatmax.ne.-1d0)then + xvar = sumdot(p(0,1),p(0,2),1d0) + if (xvar .lt. dsqrt_shat**2)then + passcuts=.false. + return + else if (dsqrt_shatmax.ne.-1d0 .and. xvar .gt. dsqrt_shatmax**2)then + passcuts = .false. + return + endif + endif + endif C $B$ DESACTIVATE_CUT $E$ !This is a tag for MadWeight if(debug) write (*,*) '=============================' diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/genps.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/genps.f index 1c32e93f5d..8503bdbec8 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/genps.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/genps.f @@ -1373,6 +1373,10 @@ subroutine gen_s(x,smin,smax,spole,swidth,s,jac,pass) double precision smin,smax,spole,swidth,s,jac double precision x logical pass + include 'maxparticles.inc' + include '../../Source/vector.inc' + include 'run.inc' + include 'cuts.inc' c c Local c @@ -1384,6 +1388,10 @@ subroutine gen_s(x,smin,smax,spole,swidth,s,jac,pass) c----- c Begin Code c----- + if (dsqrt_shatmax.ne.-1d0)then + smax = min(smax, dsqrt_shatmax**2) + endif + pass=.true. if (jac .eq. 0 .and. .not. warned0) then print*,'Input jacobian 0 in genps' @@ -1628,7 +1636,10 @@ SUBROUTINE GENCMS(S,X1,X2,X,SMIN,SJACOBI) DOUBLE PRECISION ETA,ETAMIN,ETAMAX logical warned data warned/.false./ - + include 'maxparticles.inc' + include '../../Source/vector.inc' + include 'run.inc' + include 'cuts.inc' C------------ C BEGIN CODE C------------ @@ -1645,7 +1656,11 @@ SUBROUTINE GENCMS(S,X1,X2,X,SMIN,SJACOBI) C IF THERE IS NO S CHANNEL POLE USE BELOW: TAUMIN = 0d0 !SMIN/S !keep scale fix - TAUMAX = 1D0 + if (dsqrt_shatmax.ne.-1d0)then + TAUMAX=dsqrt_shatmax**2/S + else + TAUMAX = 1D0 + endif TAU = (TAUMAX-TAUMIN)*X(1)+TAUMIN SJACOBI= sjacobi*(TAUMAX-TAUMIN) @@ -1915,7 +1930,7 @@ double precision function get_channel_cut(p, config) if(sde_strat.eq.2)then t = dot(ptemp(0,-i), ptemp(0,-i)) Mass = prmass(-i, config) - get_channel_cut = get_channel_cut / ((t-Mass)*(t+Mass)+stot*1d-10)**2 + get_channel_cut = get_channel_cut / (t-Mass**2+stot*1d-10)**2 endif c write(*,*) i, "t, Mass, fact", t, Mass, ((t-Mass)*(t+Mass))**2,get_channel_cut t = t/stot @@ -1930,9 +1945,9 @@ double precision function get_channel_cut(p, config) t = dot(ptemp(0,-i), ptemp(0,-i)) Mass = prmass(-i, config) Width = prwidth(-i, config) - tmp = (t-Mass)*(t+Mass) + tmp = (t-Mass**2) tmp2 = Mass*Width - get_channel_cut = get_channel_cut* (tmp**2 - tmp2**2)/(tmp**2 + tmp2**2)**2 + get_channel_cut = get_channel_cut/(tmp**2 + tmp2**2) endif c write(*,*) i, "s, Mass, Width, fact", t, Mass, Width, (((t-Mass)*(t+Mass) )**2 + Width**2*Mass**2), get_channel_cut endif diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/myamp.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/myamp.f index 9e5f8d44dd..5360566ef4 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/myamp.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/myamp.f @@ -231,6 +231,7 @@ subroutine set_peaks double precision x1,x2,xk(nexternal) double precision dr,mtot,etot,xqfact double precision spmass + double precision stot ! technically the min with dsqrt_shatmax**2 with the physical one integer i, iconfig, l1, l2, j, nt, nbw, iproc, k integer iden_part(-nexternal+1:nexternal) @@ -285,8 +286,8 @@ subroutine set_peaks integer lbw(0:nexternal) !Use of B.W. common /to_BW/ lbw - double precision stot,m1,m2 - common/to_stot/stot,m1,m2 + double precision real_stot,m1,m2 + common/to_stot/real_stot,m1,m2 include 'coupl.inc' ! needs VECSIZE_MEMMAX (defined in vector.inc) include 'cuts.inc' @@ -309,6 +310,12 @@ subroutine set_peaks c----- c Begin Code c----- + if (dsqrt_shatmax.ne.-1)then + stot = min(real_stot, dsqrt_shatmax**2) + else + stot = real_stot + endif + iconfig = this_config c needs to be initialise to avoid segfault do i = -nexternal,-1 diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/Gridpack/gridrun b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/Gridpack/gridrun index 8c8f7d3940..01d4ab53f5 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/Gridpack/gridrun +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/Gridpack/gridrun @@ -91,7 +91,7 @@ import internal.madevent_interface as cmd_interface try: - cmd_line = cmd_interface.GridPackCmd(me_dir=root_path, nb_event=args[0], seed=args[1], gran=args[2]) + cmd_line = cmd_interface.GridPackCmd(me_dir=root_path, nb_event=args[0], seed=args[1], gran=args[2], nprocs=args[3], maxevts=args[4]) except KeyboardInterrupt: print('Quit on KeyboardInterrupt') diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/Gridpack/run.sh b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/Gridpack/run.sh index 20adf572c2..2d149f96be 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/Gridpack/run.sh +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/Gridpack/run.sh @@ -14,6 +14,18 @@ # USAGE : run [num_events] [iseed] ## ############################################################################# +function usage() { + local retcode="${1:-1}" # default return code is 1 + echo "Usage:" + echo " run.sh [options] [num events] [seed]" + echo " run.sh [options] [num events] [seed] [granularity]" + echo "Options:" + echo " -h, --help print this message and exit" + echo " -p, --parallel [num procs] number of processes to run in parallel" + echo " -m, --maxevts [num events] maximum number of unweighted events per job" + exit $retcode +} + if [[ -d ./madevent ]]; then DIR='./madevent' else @@ -32,23 +44,46 @@ export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${PWD}/madevent/lib:${PWD}/HELAS/lib # For Mac OS X export DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:${PWD}/madevent/lib:${PWD}/HELAS/lib +pos_args=() +nprocs=1 +maxevts=2500 -if [[ ($1 != "") && ("$2" != "") && ("$3" == "") ]]; then - num_events=$1 - seed=$2 - gran=1 -elif [[ ($1 != "") && ("$2" != "") && ("$3" != "") ]]; then - num_events=$1 - seed=$2 - gran=$3 -else - echo "Warning: input is not correct. script requires two arguments: NB_EVENT SEED" -fi +while [[ $# -gt 0 ]]; do + case $1 in + -h|--help) + usage 0 ;; + -p|--parallel) + nprocs="$2" && shift && shift ;; + -m|--maxevts) + maxevts="$2" && shift && shift ;; + -*) + echo "Error: Unknown option $1" && usage ;; + *) + pos_args+=("$1") && shift ;; + esac +done + +case `echo "${pos_args[@]}" | wc -w | tr -d " "` in + "2") + num_events=${pos_args[0]} + seed=${pos_args[1]} + gran=1 + ;; + "3") + num_events=${pos_args[0]} + seed=${pos_args[1]} + gran=${pos_args[2]} + ;; + *) + echo "Error: number of arguments is not correct" + usage + ;; +esac -echo "Now generating $num_events events with random seed $seed and granularity $gran" +echo "Now generating $num_events events with random seed $seed and granularity $gran using $nprocs processes" ############ RUN THE PYTHON CODE ##################### -${DIR}/bin/gridrun $num_events $seed $gran +${DIR}/bin/gridrun $num_events $seed $gran $nprocs $maxevts ######################################################## ########### POSTPROCESSING ##################### diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/banner.py b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/banner.py index 42d82818d0..022861fc31 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/banner.py +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/banner.py @@ -353,7 +353,7 @@ def modify_init_cross(self, cross, allow_zero=False): assert "init" in self cross = dict(cross) - for key in cross.keys(): + for key in list(cross.keys()): if isinstance(key, str) and key.isdigit() and int(key) not in cross: cross[int(key)] = cross[key] @@ -3318,7 +3318,6 @@ def retro_compatible_custom_fct(lines, mode=None): for i,line in enumerate(lines[:]): if search and re.search(include_pat, line): name = re.findall(include_pat, line)[0] - misc.sprint('DETECTED INCLUDE', name) if 'vector.inc' in name: search = False if 'run.inc' in name: @@ -3326,7 +3325,6 @@ def retro_compatible_custom_fct(lines, mode=None): search = False sol.append(line) if re.search(function_pat, line): - misc.sprint("DETECTED FCT") search = True return sol @@ -4201,6 +4199,7 @@ def default_setup(self): self.add_param("bwcutoff", 15.0) self.add_param("cut_decays", False, cut='d') self.add_param('dsqrt_shat',0., cut=True) + self.add_param('dsqrt_shatmax', -1, cut=True) self.add_param("nhel", 0, include=False) self.add_param("limhel", 1e-8, hidden=True, comment="threshold to determine if an helicity contributes when not MC over helicity.") #pt cut @@ -5577,6 +5576,9 @@ def default_setup(self): #technical self.add_param('folding', [1,1,1], include=False) + + #bias + self.add_param('flavour_bias',[5,1], hidden=True, comment="Example: '5,100' means that the probability to generate an event with a bottom (or anti-bottom) quark is increased by a factor 100, but the weight of those events is reduced by a factor 100. Requires that the 'event_norm' is set to 'bias'.") #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]") @@ -5790,6 +5792,17 @@ def check_validity(self): if self['mcatnlo_delta'] and not self['parton_shower'].lower() == 'pythia8': raise InvalidRunCard("MC@NLO-DELTA only possible with matching to Pythia8") + # check that the flavour_bias is consistent + if len(self['flavour_bias']) != 2: + raise InvalidRunCard("'flavour_bias' should contain exactly two numbers: the abs(PDG) of the flavour to enhance, and the enhancement multiplication factor.") + for i in self['flavour_bias']: + if i < 0: + raise InvalidRunCard("flavour and multiplication factor should be positive in the flavour_bias parameter") + if self['flavour_bias'][1] != 1 and self['event_norm'] != 'bias': + logger.warning('Non-trivial flavour enhancement factor: setting event normalisation to "bias"') + self['event_norm']='bias' + + # check that ebeam is bigger than the proton mass. for i in [1,2]: # do not for proton mass if not proton PDF (or when scan initialization) diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/check_param_card.py b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/check_param_card.py index bc785b5de6..a34705f6bc 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/check_param_card.py +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/check_param_card.py @@ -1092,11 +1092,11 @@ def write_summary(self, path, order=None, lastline=False, nbcol=20): to_print = self.cross[-1:] for info in to_print: name = info['run_name'] - bench = info['bench'] + bench = [float(x) for x in info['bench']] data = [] for k in keys: if k in info: - data.append(info[k]) + data.append(float(info[k])) else: data.append(0.) ff.write(formatting % tuple([name] + bench + data)) diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/common_run_interface.py b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/common_run_interface.py index 9ff7390cf5..541cd6294b 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/common_run_interface.py +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/common_run_interface.py @@ -750,8 +750,8 @@ def __init__(self, me_dir, options, *args, **opts): else: self.ninitial = self.proc_characteristics['ninitial'] - def make_make_all_html_results(self, folder_names = [], jobs=[]): - return sum_html.make_all_html_results(self, folder_names, jobs) + def make_make_all_html_results(self, folder_names = [], jobs=[], get_attr=None): + return sum_html.make_all_html_results(self, folder_names, jobs, get_attr) def write_RunWeb(self, me_dir): @@ -3831,7 +3831,7 @@ def store_scan_result(self): """return the information that need to be kept for the scan summary. Auto-width are automatically added.""" - return {'cross': self.results.current['cross']} + return {'cross': self.results.current['cross'], 'error': self.results.current['error']} def add_error_log_in_html(self, errortype=None): @@ -5135,10 +5135,10 @@ def init_run(self, cards): self.special_shortcut.update( {'ebeam':([float],['run_card ebeam1 %(0)s', 'run_card ebeam2 %(0)s']), 'lpp': ([int],['run_card lpp1 %(0)s', 'run_card lpp2 %(0)s' ]), - 'lhc': ([int],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), + 'lhc': ([float],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), 'lep': ([int],['run_card lpp1 0', 'run_card lpp2 0', 'run_card ebeam1 %(0)s/2', 'run_card ebeam2 %(0)s/2']), 'ilc': ([int],['run_card lpp1 0', 'run_card lpp2 0', 'run_card ebeam1 %(0)s/2', 'run_card ebeam2 %(0)s/2']), - 'lcc': ([int],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), + 'lcc': ([float],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), 'fixed_scale': ([float],['run_card fixed_fac_scale T', 'run_card fixed_ren_scale T', 'run_card scale %(0)s', 'run_card dsqrt_q2fact1 %(0)s' ,'run_card dsqrt_q2fact2 %(0)s']), 'no_parton_cut':([],['run_card nocut T']), 'cm_velocity':([float], [lambda self :self.set_CM_velocity]), @@ -6740,7 +6740,15 @@ def postcmd(self, stop, line): return ending_question - + def help_update(self): + logger.info(""" syntax: update dependent: Change the mass/width of particles which are not free parameter for the model. + update missing: add to the current param_card missing blocks/parameters. + update to_slha1: pass SLHA2 card to SLHA1 convention. (beta) + update to_slha2: pass SLHA1 card to SLHA2 convention. (beta) + update to_full [run_card] + update XXX [where XXX correspond to a hidden block of the run_card]: + supported block are %s + """, ', '.join(self.update_block)) def do_update(self, line, timer=0): @@ -6756,6 +6764,8 @@ def do_update(self, line, timer=0): logger.warning('miss an argument (dependent or missing). Please retry') return + args[0] = args[0].lower() + if args[0] == 'dependent': if not self.mother_interface: logger.warning('Failed to update dependent parameter. This might create trouble for external program (like MadSpin/shower/...)') @@ -6805,10 +6815,11 @@ def do_update(self, line, timer=0): self.modified_card.add('run') # delay writting of the run_card logger.info('add optional block %s to the run_card', args[0]) else: - self.help_update() + self.do_help('update') logger.warning('unvalid options for update command. Please retry') + def update_to_full(self, line): """ trigger via update to_full LINE""" diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/extended_cmd.py b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/extended_cmd.py index 789976beee..c321fd88e5 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/extended_cmd.py +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/extended_cmd.py @@ -1317,6 +1317,8 @@ def nice_error_handling(self, error, line): debug_file = open(self.debug_output, 'a') traceback.print_exc(file=debug_file) + if __debug__: + traceback.print_exc() if hasattr(error, 'filename'): debug_file.write("Related File: %s\n" % error.filename) # Create a nice error output @@ -1928,7 +1930,8 @@ def do_display(self, line, output=sys.stdout): for i, name in enumerate(split): try: __import__('.'.join(split[:i+1])) - exec('%s=sys.modules[\'%s\']' % (split[i], '.'.join(split[:i+1]))) + tmp = {} + exec('%s=sys.modules[\'%s\']' % (split[i], '.'.join(split[:i+1])), globals(),tmp) except ImportError: try: var = eval(args[1]) @@ -1939,7 +1942,7 @@ def do_display(self, line, output=sys.stdout): outstr += 'EXTERNAL:\n' outstr += misc.nice_representation(var, nb_space=4) else: - var = eval(args[1]) + var = eval(args[1], globals(), tmp) outstr += 'EXTERNAL:\n' outstr += misc.nice_representation(var, nb_space=4) diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/file_writers.py b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/file_writers.py index 526756129f..74ba0d195c 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/file_writers.py +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/file_writers.py @@ -140,10 +140,6 @@ def preprocess_template(self, input_lines, context={}): else: raise self.FileWriterError("%s not string" % repr(input_lines)) - # Setup the contextual environment - for contextual_variable, value in context.items(): - exec('%s=%s'%(str(contextual_variable),repr(value))) - res = [] # The variable below tracks the conditional statements structure if_stack = [] @@ -166,7 +162,7 @@ def preprocess_template(self, input_lines, context={}): # Treat an if statement elif preproc_command.group('command')=='if': try: - if_stack.append(eval(preproc_command.group('body'))==True) + if_stack.append(eval(preproc_command.group('body'), globals(), context)==True) except Exception as e: raise self.FilePreProcessingError('Could not evaluate'+\ "python expression '%s' given the context %s provided."%\ diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/files.py b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/files.py index 551b71ddb6..3061b007e7 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/files.py +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/files.py @@ -147,9 +147,14 @@ def cp(path1, path2, log=True, error=False): path2 = format_path(path2) try: shutil.copy(path1, path2) + except shutil.Error as why: + logger.debug('no cp since identical: %s', why) + return except IOError as why: import madgraph.various.misc as misc try: + if 'same file' in str(why): + return if os.path.exists(path2): path2 = os.path.join(path2, os.path.split(path1)[1]) misc.copytree(path1, path2) @@ -157,12 +162,10 @@ def cp(path1, path2, log=True, error=False): if error: raise if log: - logger.warning(why) + logger.warning("fail to cp", path1, path2, why) else: - misc.sprint("fail to cp", why) - except shutil.Error: - # idetical file - pass + misc.sprint("fail to cp",path1,path2, why) + def rm(path, log=True): """removes path, that can be a single element or a list""" diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/gen_cardhtml-pl b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/gen_cardhtml-pl index 1810c6c082..6e0e06533d 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/gen_cardhtml-pl +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/gen_cardhtml-pl @@ -137,7 +137,7 @@ until($listpos>$#incard){ print PAGE " Model: $model \n"; print PAGE " \n \n
\n"; print PAGE " \n"; - print PAGE "\"\" \n"; + print PAGE "\"\" \n"; print PAGE "
\n"; print PAGE " \n \n \n"; print PAGE " \n"; diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/gen_crossxhtml.py b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/gen_crossxhtml.py index 681bf9d09b..3114a4350c 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/gen_crossxhtml.py +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/gen_crossxhtml.py @@ -133,7 +133,7 @@ class AllResults(dict): web = False - _run_entries = ['cross', 'error','nb_event_pythia','run_mode','run_statistics', + _run_entries = ['cross', 'error','axsec','nb_event_pythia','run_mode','run_statistics', 'nb_event','cross_pythia','error_pythia', 'nb_event_pythia8','cross_pythia8','error_pythia8', 'shower_dir'] diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/gen_jpeg-pl b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/gen_jpeg-pl index 87d03da394..31b7e9fe55 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/gen_jpeg-pl +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/gen_jpeg-pl @@ -1,16 +1,16 @@ #!/usr/bin/perl -w #--------------------------------------------------------------------- -# Run GS to create jpeg files defined as $gs +# Run GS to create PNG files defined as $gs #--------------------------------------------------------------------- -system("/bin/bash -c \"rm -f matrix*.jpg\" "); +system("/bin/bash -c \"rm -f matrix*.png\" "); $imatrix = ""; if (! -e "matrix.ps") {$imatrix = 1;} -$max_jpg = 2; -if ($imatrix eq "") {$max_jpg = 5;} -# add 1 to max_jpg, to get max_jpg pages -$max_jpg += 1; +$max_png = 2; +if ($imatrix eq "") {$max_png = 5;} +# add 1 to max_png, to get max_png pages +$max_png += 1; open(PAGE,"> diagrams.html") || die "Error creating diagrams.html"; print PAGE "\ \n"; print PAGE "\ \n"; @@ -21,22 +21,22 @@ while ( -e "matrix$imatrix.ps"){ open(IN, "< matrix$imatrix.ps") || die "No file matrix$imatrix.ps"; open(OUT, "> matrix-1.ps") || die "Could not open file matrix-1.ps"; while () { - if ($_ =~ m/^%%Page: $max_jpg $max_jpg/) {last;} + if ($_ =~ m/^%%Page: $max_png $max_png/) {last;} else {print OUT $_, "\n";} } close(OUT); close(IN); - system "/bin/bash -c \"nice gs \-sDEVICE\=jpeg \-sOutputFile\=matrix$imatrix\%00d.jpg \-q \-dNOPAUSE \-dBATCH matrix-1.ps > /dev/null\""; + system "/bin/bash -c \"nice gs \-sDEVICE\=pngmono \-r150 \-sOutputFile\=matrix$imatrix\%00d.png \-q \-dNOPAUSE \-dBATCH matrix-1.ps > /dev/null\""; system "rm -f matrix-1.ps"; -# Determine how many jpg files we have +# Determine how many png files we have $pages=1; - while(-e "matrix$imatrix$pages.jpg"){ + while(-e "matrix$imatrix$pages.png"){ $pages++; }#end of while #reduce it by one - if ($pages > $max_jpg){ + if ($pages > $max_png){ $pages -= 1; } # Find name of process @@ -45,24 +45,24 @@ while ( -e "matrix$imatrix.ps"){ if ($proc =~ /Process: (.+?)(\s\w+=\d+)*$/) { $proc = $1; } print PAGE "

To save bandwidth not all diagrams were converted to jpeg."; + if (-e "matrix$imatrix$max_png.png" ) { + print PAGE "

To save bandwidth not all diagrams were converted to PNG."; print PAGE "

To view all diagrams click on "; print PAGE "\ postscript. \<\/A\> \ \n"; # # Delete files which aren't included in diagrams.html # - system ("/bin/bash -c \"rm -f matrix$max_jpg.jpg\" "); + system ("/bin/bash -c \"rm -f matrix$max_png.png\" "); } # -# Now create jpeg file for card +# Now create PNG file for card # - if (! -e "../../HTML/card.jpg") { + if (! -e "../../HTML/card.png") { system ("/bin/bash -c \"head -352 matrix$imatrix.ps >& junk.ps\" "); open(JUNK,">> junk.ps") || die "Error opening junk.ps"; @@ -72,7 +72,7 @@ while ( -e "matrix$imatrix.ps"){ system ("/bin/bash -c \"cat matrix$imatrix.ps | sed 1,352d >> junk.ps\" "); - system "/bin/bash -c \"nice gs \-sDEVICE\=jpeg \-sOutputFile\=card.jpg \-q \-dNOPAUSE \-dBATCH \-g180x150 ./junk.ps; rm -f junk.ps; cp -p card.jpg ../../HTML/card.jpg > /dev/null\" "; + system "/bin/bash -c \"nice gs \-sDEVICE\=pngmono \-sOutputFile\=card.png \-q \-dNOPAUSE \-dBATCH \-g180x150 ./junk.ps; rm -f junk.ps; cp -p card.png ../../HTML/card.png > /dev/null\" "; } if ($imatrix eq "") {$imatrix = 0;} $imatrix = $imatrix + 1; @@ -82,3 +82,4 @@ print PAGE "\n"; print PAGE "\<\/BODY\> \n"; print PAGE "\<\/HTML\> \n"; close(PAGE); + diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/gen_ximprove.py b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/gen_ximprove.py index 415ecc9de0..d5d7fc8faf 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/gen_ximprove.py +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/gen_ximprove.py @@ -30,6 +30,7 @@ import stat import sys import six +import time from six.moves import range from six.moves import zip @@ -304,6 +305,7 @@ def get_helicity(self, to_submit=True, clean=True): logger.debug('(%s) nb_hel: %s zero amp: %s bad_amps_hel: %s/%s', split_file[-1], len(good_hels),len(bad_amps),len(bad_amps_perhel), len(good_hels)*nb_amp ) if len(good_hels) == 1: files.cp(matrix_file, matrix_file.replace('orig','optim')) + files.cp(matrix_file.replace('.f','.o'), matrix_file.replace('orig','optim').replace('.f','.o')) continue # avoid optimization if onlye one helicity gauge = self.cmd.proc_characteristics['gauge'] @@ -1059,6 +1061,7 @@ def __init__(self, cmd, opt=None): # parameter for the gridpack run self.nreq = 2000 self.iseed = 4321 + self.maxevts = 2500 # placeholder for information self.results = 0 #updated in launch/update_html @@ -1200,6 +1203,10 @@ def reset_multijob(self): def write_multijob(self, Channel, nb_split): """ """ if nb_split <=1: + try: + os.remove(pjoin(self.me_dir, 'SubProcesses', Channel.get('name'), 'multijob.dat')) + except OSError: + pass return f = open(pjoin(self.me_dir, 'SubProcesses', Channel.get('name'), 'multijob.dat'), 'w') f.write('%i\n' % nb_split) @@ -1828,17 +1835,17 @@ class gen_ximprove_gridpack(gen_ximprove_v4): 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 gen_events_security = 1.00 - def __new__(cls, *args, **opts): + def __new__(cls, cmd, opts): cls.force_class = 'gridpack' - return super(gen_ximprove_gridpack, cls).__new__(cls, *args, **opts) + return super(gen_ximprove_gridpack, cls).__new__(cls, cmd, opts) - def __init__(self, *args, **opts): + def __init__(self, cmd, opts): self.ngran = -1 + self.nprocs = 1 self.gscalefact = {} self.readonly = False if 'ngran' in opts: @@ -1846,9 +1853,18 @@ def __init__(self, *args, **opts): # del opts['ngran'] if 'readonly' in opts: self.readonly = opts['readonly'] - super(gen_ximprove_gridpack,self).__init__(*args, **opts) + if 'nprocs' in opts: + self.nprocs = int(opts['nprocs']) + if 'maxevts' in opts and self.nprocs > 1: + self.max_request_event = int(opts['maxevts']) + super(gen_ximprove_gridpack,self).__init__(cmd, opts) if self.ngran == -1: self.ngran = 1 + + if self.nprocs > 1: + self.combining_job = 0 + else: + self.combining_job = sys.maxsize def find_job_for_event(self): """return the list of channel that need to be improved""" @@ -1876,8 +1892,8 @@ def find_job_for_event(self): continue # no event to generate events self.gscalefact[tag] = max(1, 1/(goal_lum * C.get('axsec')/ self.ngran)) #need to generate events - logger.debug('request events for ', C.get('name'), 'cross=', - C.get('axsec'), 'needed events = ', goal_lum * C.get('axsec')) + logger.debug('request events for %s cross=%d needed events = %d', + C.get('name'), C.get('axsec'), goal_lum * C.get('axsec')) to_refine.append(C) logger.info('need to improve %s channels' % len(to_refine)) @@ -1897,8 +1913,13 @@ def get_job_for_event(self): 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 - + nb_split = int(max(1,((needed_event-1)// self.max_request_event) +1)) + if not self.split_channels: + nb_split = 1 + if nb_split > self.max_splitting: + 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')) @@ -1908,13 +1929,16 @@ def get_job_for_event(self): nevents = self.max_event_in_iter if nevents < self.min_event_in_iter: + nb_split = int(nb_split * nevents / self.min_event_in_iter) + 1 # sr dangerous? nevents = self.min_event_in_iter # # 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) - + # write the multi-job information + self.write_multijob(C, nb_split) + #create the info dict assume no splitting for the default info = {'name': self.cmd.results.current['run_name'], 'script_name': 'unknown', @@ -1925,7 +1949,7 @@ def get_job_for_event(self): 'nevents': nevents, #int(nevents*self.gen_events_security)+1, 'maxiter': self.max_iter, 'miniter': self.min_iter, - 'precision': -1*int(needed_event)/C.get('axsec'), + 'precision': -goal_lum/nb_split, # -1*int(needed_event)/C.get('axsec'), 'requested_event': needed_event, 'nhel': self.run_card['nhel'], 'channel': C.name.replace('G',''), @@ -1938,27 +1962,59 @@ def get_job_for_event(self): basedir = pjoin(os.path.dirname(__file__), '..','..','SubProcesses', info['P_dir'], info['directory']) info['base_directory'] = basedir - jobs.append(info) - + if nb_split == 1: + jobs.append(info) + else: + for i in range(nb_split): + new_info = dict(info) + new_info['offset'] = i+1 + new_info['directory'] += self.alphabet[i % 26] + str((i+1)//26) + new_info['base_directory'] = info['directory'] + jobs.append(new_info) write_dir = '.' if self.readonly else None self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), jobs, write_dir) + if self.nprocs > 1: + nprocs_cluster = cluster.MultiCore(nb_core=self.nprocs) + gridpack_start = time.time() + def gridpack_wait_monitoring(Idle, Running, Done): + if Idle+Running+Done == 0: + return + logger.info("Gridpack event generation: %s Idle, %s Running, %s Done [%s]" + % (Idle, Running, Done, misc.format_time(time.time()-gridpack_start))) + done = [] for j in jobs: - if j['P_dir'] in done: - continue - done.append(j['P_dir']) + if self.nprocs == 1: + if j['P_dir'] in done: + continue + done.append(j['P_dir']) + # Give a little status. Sometimes these jobs run very long, and having hours without any + # console output can be a bit frightening and make users think we are looping. + if len(done)%5==0: + logger.info(f"Working on job {len(done)} of {len(jobs)}") + # set the working directory path. pwd = pjoin(os.getcwd(),j['P_dir']) if self.readonly else pjoin(self.me_dir, 'SubProcesses', j['P_dir']) - exe = pjoin(pwd, 'ajob1') + exe = pjoin(pwd, j['script_name']) st = os.stat(exe) os.chmod(exe, st.st_mode | stat.S_IEXEC) # run the code\ - cluster.onecore.launch_and_wait(exe, cwd=pwd, packet_member=j['packet']) + if self.nprocs == 1: + cluster.onecore.launch_and_wait(exe, cwd=pwd, packet_member=j['packet']) + else: + nprocs_cluster.cluster_submit(exe, cwd=pwd, packet_member=j['packet']) write_dir = '.' if self.readonly else pjoin(self.me_dir, 'SubProcesses') + if self.nprocs > 1: + nprocs_cluster.wait(self.me_dir, gridpack_wait_monitoring) + + if self.readonly: + combine_runs.CombineRuns(write_dir) + else: + combine_runs.CombineRuns(self.me_dir) self.check_events(goal_lum, to_refine, jobs, write_dir) def check_events(self, goal_lum, to_refine, jobs, Sdir): diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/hel_recycle.py b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/hel_recycle.py index 1471de4bcb..978ba6575e 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/hel_recycle.py +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/hel_recycle.py @@ -550,7 +550,7 @@ def get_jamp_lines(self, line): def get_amp2_lines(self, line): if line.startswith(' DO I = 1, NCOLOR'): self.in_amp2 = False - elif not line.isspace(): + elif not line.isspace() and 'DENOM' not in line: self.template_dict['amp2_lines'] += f'{line[0:6]} {self.add_indices(line[6:])}' def prepare_bools(self): diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/histograms.py b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/histograms.py index 51ae2914fc..d68c560806 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/histograms.py +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/histograms.py @@ -1149,11 +1149,8 @@ def parse_one_histo_from_stream(self, stream, all_weight_header, boundaries = [0.0,0.0] for j, weight in \ enumerate(HwU.histo_bin_weight_re.finditer(line_bin)): - if (j == len(weight_header)): - continue - if j == len(all_weight_header): - raise HwU.ParseError("There is more bin weights"+\ - " specified than expected (%i)"%len(weight_header)) + #if (j == len(weight_header)): + # continue if selected_central_weight == all_weight_header[j]: bin_weights['central'] = float(weight.group('weight')) if all_weight_header[j] == 'boundary_xmin': @@ -2480,14 +2477,14 @@ def get_main_central_plot_lines(HwU_name, block_position, color_index, # return [template_no_stat%rep_dic]+\ # ([template%rep_dic] if show_mc_uncertainties else []) - # The use of sqrt(-1) is just a trick to prevent the line to display + # The use of 1/0 is just a trick to prevent the line to display res = [] - rep_dic['data'] = '($3 < 0 ? sqrt(-1) : $3)' + rep_dic['data'] = '($3 < 0 ? 1/0 : $3)' res.append(template_no_stat%rep_dic) rep_dic['title'] = " title ''" if show_mc_uncertainties: res.append(template%rep_dic) - rep_dic['data'] = '($3 >= 0 ? sqrt(-1) : abs($3))' + rep_dic['data'] = '($3 >= 0 ? 1/0 : abs($3))' rep_dic['ls'] = ' ls %d'%(100+color_index) res.append(template_no_stat%rep_dic) if show_mc_uncertainties: @@ -2739,13 +2736,13 @@ def ratio_no_correlations(wgtsA, wgtsB): """#-- rendering subhistograms '%(subhistogram_type)s' %(unset label)s %(set_format_y)s +%(set_yscale)s set yrange [%(ymin).4e:%(ymax).4e] set origin %(origin_x).4e, %(origin_y).4e set size %(size_x).4e, %(size_y).4e set mytics %(mytics)d %(set_ytics)s %(set_format_x)s -%(set_yscale)s %(set_ylabel)s %(set_histo_label)s plot \\""" @@ -2878,7 +2875,7 @@ def ratio_no_correlations(wgtsA, wgtsB): # We decide to show uncertainties in the main plot only if they # are part of a monocolor band. Otherwise, they will only be - # shown in the first subplot. Notice that plotting 'sqrt(-1)' + # shown in the first subplot. Notice that plotting '1/0' # is just a trick so as to have only the key printed with no # line @@ -2890,7 +2887,7 @@ def ratio_no_correlations(wgtsA, wgtsB): '%s, scale variation'%title, band='scale' in use_band) else: uncertainty_plot_lines[-1]['scale'] = \ - ["sqrt(-1) ls %d title '%s'"%(color_index+10,'%s, scale variation'%title)] + ["1/0 ls %d title '%s'"%(color_index+10,'%s, scale variation'%title)] # And now PDF_variation if available if not PDF_var_pos is None and len(PDF_var_pos)>0: if 'pdf' in use_band: @@ -2899,7 +2896,7 @@ def ratio_no_correlations(wgtsA, wgtsB): '%s, PDF variation'%title, band='pdf' in use_band) else: uncertainty_plot_lines[-1]['pdf'] = \ - ["sqrt(-1) ls %d title '%s'"%(color_index+20,'%s, PDF variation'%title)] + ["1/0 ls %d title '%s'"%(color_index+20,'%s, PDF variation'%title)] # And now merging variation if available if not merging_var_pos is None and len(merging_var_pos)>0: if 'merging_scale' in use_band: @@ -2908,7 +2905,7 @@ def ratio_no_correlations(wgtsA, wgtsB): '%s, merging scale variation'%title, band='merging_scale' in use_band) else: uncertainty_plot_lines[-1]['merging_scale'] = \ - ["sqrt(-1) ls %d title '%s'"%(color_index+30,'%s, merging scale variation'%title)] + ["1/0 ls %d title '%s'"%(color_index+30,'%s, merging scale variation'%title)] # And now alpsfact variation if available if not alpsfact_var_pos is None and len(alpsfact_var_pos)>0: if 'alpsfact' in use_band: @@ -2917,7 +2914,7 @@ def ratio_no_correlations(wgtsA, wgtsB): '%s, alpsfact variation'%title, band='alpsfact' in use_band) else: uncertainty_plot_lines[-1]['alpsfact'] = \ - ["sqrt(-1) ls %d title '%s'"%(color_index+40,'%s, alpsfact variation'%title)] + ["1/0 ls %d title '%s'"%(color_index+40,'%s, alpsfact variation'%title)] # plot_lines.append( # "'%s' index %d using (($1+$2)/2):3 ls %d title '%s'"\ diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/launch_plugin.py b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/launch_plugin.py index 0924927785..ba08c10340 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/launch_plugin.py +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/launch_plugin.py @@ -33,7 +33,7 @@ def compile(self, *args, **opts): if 'cwd' in opts and os.path.basename(opts['cwd']) == 'Source': path = pjoin(opts['cwd'], 'make_opts') common_run_interface.CommonRunCmd.update_make_opts_full(path, - {'FPTYPE': self.run_card['floating_type'] }) + {'override FPTYPE': self.run_card['floating_type'] }) misc.sprint('FPTYPE checked') cudacpp_supported_backends = [ 'fortran', 'cuda', 'hip', 'cpp', 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z', 'cppauto' ] if args and args[0][0] == 'madevent' and hasattr(self, 'run_card'): @@ -76,7 +76,7 @@ def reset_makeopts(self, old_value, new_value, name): if not hasattr(self, 'path'): raise Exception if name == 'floating_type': - common_run_interface.CommonRunCmd.update_make_opts_full({'FPTYPE': new_value}) + common_run_interface.CommonRunCmd.update_make_opts_full({'override FPTYPE': new_value}) else: raise Exception Sourcedir = pjoin(os.path.dirname(os.path.dirname(self.path)), 'Source') diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/lhe_parser.py b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/lhe_parser.py index f6e47956cd..76ded329c0 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/lhe_parser.py +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/lhe_parser.py @@ -2953,8 +2953,8 @@ def pt(self): @property def pseudorapidity(self): - norm = math.sqrt(self.px**2 + self.py**2+self.pz**2) - return 0.5* math.log((norm - self.pz) / (norm + self.pz)) + norm = math.sqrt(self.px**2 + self.py**2 + self.pz**2) + return 0.5* math.log((norm + self.pz) / (norm - self.pz)) @property def rapidity(self): diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/madevent_interface.py b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/madevent_interface.py index 85e5bcf5e3..2852f1d4d8 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/madevent_interface.py +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/madevent_interface.py @@ -1171,10 +1171,10 @@ def check_survey(self, args, cmd='survey'): for opt,value in self._survey_options.items(): if arg.startswith('--%s=' % opt): exec('self.opts[\'%s\'] = %s(arg.split(\'=\')[-1])' % \ - (opt, value[0])) + (opt, value[0]), globals(), {'self':self, 'arg':arg}) arg = "" if arg != "": raise Exception - except Exception: + except Exception as error: self.help_survey() raise self.InvalidCmd('invalid %s argument'% arg) @@ -3656,9 +3656,11 @@ def do_refine(self, line): else: self.refine_mode = "new" - cross, error = self.make_make_all_html_results() + cross, error, across = self.make_make_all_html_results(get_attr=('xsec','xerru','axsec')) + self.results.add_detail('cross', cross) self.results.add_detail('error', error) + self.results.add_detail('axsec', across) self.results.add_detail('run_statistics', dict(self.results.get_detail('run_statistics'))) @@ -3786,7 +3788,7 @@ def split(a, n): for i, local_G in enumerate(split(Gdirs, nb_chunk)): line = [pjoin(self.me_dir, "Events", self.run_name, "partials%d.lhe.gz" % i)] line.append(pjoin(self.me_dir, 'Events', self.run_name, '%s_%s_banner.txt' % (self.run_name, tag))) - line.append(str(self.results.current['cross'])) + line.append(str(self.results.current.get('axsec'))) line += local_G partials_info.append(self.do_combine_events_partial(' '.join(line), preprocess_only=True)) mycluster.submit(sys.executable, @@ -6749,7 +6751,7 @@ def get_subP_ids(path): class GridPackCmd(MadEventCmd): """The command for the gridpack --Those are not suppose to be use interactively--""" - def __init__(self, me_dir = None, nb_event=0, seed=0, gran=-1, *completekey, **stdin): + def __init__(self, me_dir = None, nb_event=0, seed=0, gran=-1, nprocs=1, maxevts=2500, *completekey, **stdin): """Initialize the command and directly run""" # Initialize properly @@ -6759,6 +6761,8 @@ 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.nprocs = nprocs + self.maxevts = maxevts self.options['automatic_html_opening'] = False #write the grid_card.dat on disk @@ -6874,7 +6878,7 @@ def launch(self, nb_event, seed): #misc.call([pjoin(self.me_dir,'bin','refine4grid'), # str(nb_event), '0', 'Madevent','1','GridRun_%s' % seed], # cwd=self.me_dir) - self.refine4grid(nb_event) + self.gridpack_cross = self.refine4grid(nb_event) # 3) Combine the events/pythia/... self.exec_cmd('combine_events') @@ -6902,6 +6906,8 @@ def refine4grid(self, nb_event): precision = nb_event + across= self.make_make_all_html_results(get_attr='axsec') + self.opts = dict([(key,value[1]) for (key,value) in \ self._survey_options.items()]) @@ -6915,8 +6921,9 @@ def refine4grid(self, nb_event): 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} + refine_opt = {'err_goal': nb_event, 'split_channels': True, + 'ngran':self.granularity, 'readonly': self.readonly, + 'nprocs': self.nprocs, 'maxevts': self.maxevts} 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 @@ -6926,7 +6933,7 @@ def refine4grid(self, nb_event): #print 'run combine!!!' #combine_runs.CombineRuns(self.me_dir) - return + return across #update html output Presults = sum_html.collect_result(self) cross, error = Presults.xsec, Presults.xerru @@ -7051,10 +7058,14 @@ def do_combine_events(self, line): sum_axsec += result.get('axsec')*gscalefact[Gdir] if len(AllEvent) >= 80: #perform a partial unweighting - if self.results.current['cross'] == 0 and self.run_card['gridpack']: - nb_event= self.nb_event + if not self.results.current.get('axsec'): + if self.run_card['gridpack'] and self.gridpack_cross: + nb_event = min(abs(1.05*self.nb_event*sum_axsec/self.gridpack_cross),self.nb_event) + else: + nb_event= self.nb_event else: - nb_event = min(abs(1.01*self.nb_event*sum_axsec/self.results.current['cross']),self.run_card['nevents']) + nb_event = min(abs(1.01*self.nb_event*sum_axsec/self.results.current.get('axsec')),self.run_card['nevents'], self.nb_event, self.gridpack_cross, sum_axsec) + misc.sprint(nb_event, self.results.current.get('axsec'), self.gridpack_cross) AllEvent.unweight(pjoin(outdir, self.run_name, "partials%s.lhe.gz" % partials), get_wgt, log_level=5, trunc_error=1e-2, event_target=nb_event) AllEvent = lhe_parser.MultiEventFile() @@ -7068,6 +7079,7 @@ def do_combine_events(self, line): for data in partials_info: AllEvent.add(*data) + sum_xsec += data[1] if not hasattr(self,'proc_characteristic'): self.proc_characteristic = self.get_characteristics() diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/restore_data b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/restore_data index 6205bb9567..407ed7aa91 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/restore_data +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/restore_data @@ -48,8 +48,17 @@ for i in `cat subproc.mg` ; do cd ../ done +# check if we are on a Mac, otherwise assume Linux +if [[ "$OSTYPE" == "darwin"* ]]; then + # no nproc on Mac, so use sysctl instead + # use -S1024 because there is a limit on the length of the command + xargs_opts="-P $(sysctl -n hw.ncpu) -S1024" +else + xargs_opts="-P $(nproc --all)" +fi + find . -mindepth 2 -maxdepth 2 -type d -name 'G*' -print0 \ - | xargs --null -P "$(nproc --all)" -I{} bash -c " + | xargs --null ${xargs_opts} -I{} bash -c " cd {} for j in $1_results.dat ; do if [[ -e \$j ]] ; then diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/sum_html.py b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/sum_html.py index 9dd5826f71..fb8dd3a74a 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/sum_html.py +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/sum_html.py @@ -770,7 +770,7 @@ def collect_result(cmd, folder_names=[], jobs=None, main_dir=None): return all -def make_all_html_results(cmd, folder_names = [], jobs=[]): +def make_all_html_results(cmd, folder_names = [], jobs=[], get_attr=None): """ folder_names and jobs have been added for the amcatnlo runs """ run = cmd.results.current['run_name'] if not os.path.exists(pjoin(cmd.me_dir, 'HTML', run)): @@ -794,7 +794,12 @@ def make_all_html_results(cmd, folder_names = [], jobs=[]): fsock.write('%s

' % Presults.get_html(run, unit, cmd.me_dir)) fsock.write('%s
' % P_text) - return Presults.xsec, Presults.xerru + if not get_attr: + return Presults.xsec, Presults.xerru + else: + if isinstance(get_attr, tuple): + return [getattr(Presults, _) for _ in get_attr] + return getattr(Presults, get_attr) diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/ufomodel/write_param_card.py b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/ufomodel/write_param_card.py index 57a85b0614..33a89259f8 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/ufomodel/write_param_card.py +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/ufomodel/write_param_card.py @@ -116,9 +116,10 @@ def write_param(self, param, lhablock): def write_dep_param_block(self, lhablock): import cmath from parameters import all_parameters + param_values = {'cmath':cmath} for parameter in all_parameters: try: - exec("%s = %s" % (parameter.name, parameter.value)) + exec("%s = %s" % (parameter.name, parameter.value), globals(), param_values) except Exception: pass text = "## Not dependent paramater.\n" @@ -134,7 +135,7 @@ def write_dep_param_block(self, lhablock): prefix = "DECAY " for part, param in data: if isinstance(param.value, str): - value = complex(eval(param.value)).real + value = complex(eval(param.value, globals(), param_values)).real else: value = param.value diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/bin/madevent b/epochX/cudacpp/nobm_pp_ttW.mad/bin/madevent index dff9711b73..9c5363e682 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/madevent +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/madevent @@ -178,6 +178,17 @@ force_run = False if (args and args[0] == 'treatcards'): force_run=True + +# check that madgraph is not in PYTHONPATH +try: + import madgraph +except ImportError: + pass +else: + logger.getLogger('madgraph').error('Looks like you do have madgraph in your PYTHONPATH (or you run this executable from the main MG5aMC directory). This executable will likely not work in such case.') + + + # Call the cmd interface main loop try: if '-h' in args or '--help' in args: diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/src/HelAmps_sm_no_b_mass.h b/epochX/cudacpp/nobm_pp_ttW.mad/src/HelAmps_sm_no_b_mass.h index 850b86e0e6..1f55e37f1d 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/src/HelAmps_sm_no_b_mass.h +++ b/epochX/cudacpp/nobm_pp_ttW.mad/src/HelAmps_sm_no_b_mass.h @@ -8,7 +8,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/src/Parameters_sm_no_b_mass.cc b/epochX/cudacpp/nobm_pp_ttW.mad/src/Parameters_sm_no_b_mass.cc index d799b19eeb..6dd54b6b99 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/src/Parameters_sm_no_b_mass.cc +++ b/epochX/cudacpp/nobm_pp_ttW.mad/src/Parameters_sm_no_b_mass.cc @@ -7,7 +7,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/src/Parameters_sm_no_b_mass.h b/epochX/cudacpp/nobm_pp_ttW.mad/src/Parameters_sm_no_b_mass.h index e448052141..8e97b4ea6f 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/src/Parameters_sm_no_b_mass.h +++ b/epochX/cudacpp/nobm_pp_ttW.mad/src/Parameters_sm_no_b_mass.h @@ -7,7 +7,7 @@ // Further modified by: A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== 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 0a0d056033..c07758c8fc 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 @@ -1,8 +1,11 @@ +WARNING:root:python3.12 support is still experimental. For the moment re-weighting is NOT working and do expect a LOT of syntax warning. We do not advise python3.12 for production for the moment. +Running MG5 in debug mode +Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT +Plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT has marked as NOT being validated with this version: 3.6.2. +It has been validated for the last time with version: 3.6.0 Note that this is a development version. This version is intended for development/beta testing and NOT for production. This version has not been fully tested (if at all) and might have limited user support (if at all) -Running MG5 in debug mode -Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT ************************************************************ * * * W E L C O M E to * @@ -15,7 +18,7 @@ Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT * * * * * * * * * * * * -* VERSION 3.6.0 2024-09-30 * +* VERSION 3.6.2 2025-03-19 * * * * WARNING: UNKNOWN DEVELOPMENT VERSION. * * WARNING: DO NOT USE FOR PRODUCTION * @@ -46,10 +49,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 Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt -import /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j.mg +import /shared/roiser/sw/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 @@ -57,7 +59,7 @@ set zerowidth_tchannel F define j = p INFO: load particles INFO: load vertices -DEBUG: model prefixing takes 0.0064830780029296875  +DEBUG: model prefixing takes 0.0018301010131835938  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  @@ -168,7 +170,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.030 s +5 processes with 7 diagrams generated in 0.037 s Total: 5 processes with 7 diagrams add process p p > t t~ j @1 INFO: Checking for minimal orders which gives processes. @@ -208,7 +210,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.135 s +13 processes with 76 diagrams generated in 0.090 s Total: 18 processes with 83 diagrams add process p p > t t~ j j @2 INFO: Checking for minimal orders which gives processes. @@ -374,21 +376,21 @@ 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.933 s +65 processes with 1119 diagrams generated in 0.801 s Total: 83 processes with 1202 diagrams output madevent_simd ../TMPOUT/CODEGEN_mad_pp_tt012j --hel_recycling=False --vector_size=32 Output will be done with PLUGIN: CUDACPP_OUTPUT Addition matrix-element will be done with PLUGIN: CUDACPP_OUTPUT -DEBUG: opt['output_options']['vector_size'] =  32 [export_v4.py at line 4334]  +DEBUG: opt['output_options']['vector_size'] =  32 [export_v4.py at line 4166]  Output will be done with PLUGIN: CUDACPP_OUTPUT DEBUG: Entering PLUGIN_ProcessExporter.__init__ (initialise the exporter) [output.py at line 171]  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 176]  -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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j  +INFO: Creating subdirectories in directory /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j +WARNING: File exists /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/Cards  +WARNING: File exists /shared/roiser/sw/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 @@ -499,9 +501,9 @@ FileWriter t t~ g g WEIGHTED<=4 @2 INFO: Finding symmetric diagrams for subprocess group gg_ttxgg -DEBUG: len(subproc_diagrams_for_config) =  105 [model_handling.py at line 1527]  -DEBUG: iconfig_to_diag =  {1: 2, 2: 3, 3: 4, 4: 5, 5: 6, 6: 7, 7: 8, 8: 9, 9: 10, 10: 11, 11: 12, 12: 13, 13: 14, 14: 15, 15: 16, 16: 17, 17: 18, 18: 19, 19: 20, 20: 21, 21: 22, 22: 23, 23: 24, 24: 25, 25: 26, 26: 27, 27: 28, 28: 29, 29: 30, 30: 31, 31: 33, 32: 34, 33: 35, 34: 36, 35: 37, 36: 38, 37: 39, 38: 40, 39: 41, 40: 42, 41: 43, 42: 44, 43: 45, 44: 46, 45: 47, 46: 49, 47: 50, 48: 51, 49: 52, 50: 53, 51: 54, 52: 55, 53: 56, 54: 57, 55: 59, 56: 60, 57: 61, 58: 62, 59: 63, 60: 64, 61: 65, 62: 66, 63: 67, 64: 68, 65: 69, 66: 70, 67: 71, 68: 72, 69: 73, 70: 75, 71: 76, 72: 77, 73: 78, 74: 79, 75: 80, 76: 81, 77: 82, 78: 83, 79: 84, 80: 85, 81: 86, 82: 87, 83: 88, 84: 89, 85: 90, 86: 91, 87: 92, 88: 94, 89: 95, 90: 96, 91: 97, 92: 98, 93: 99, 94: 101, 95: 102, 96: 103, 97: 104, 98: 105, 99: 106, 100: 108, 101: 109, 102: 110, 103: 111, 104: 112, 105: 113} [model_handling.py at line 1551]  -DEBUG: diag_to_iconfig =  {2: 1, 3: 2, 4: 3, 5: 4, 6: 5, 7: 6, 8: 7, 9: 8, 10: 9, 11: 10, 12: 11, 13: 12, 14: 13, 15: 14, 16: 15, 17: 16, 18: 17, 19: 18, 20: 19, 21: 20, 22: 21, 23: 22, 24: 23, 25: 24, 26: 25, 27: 26, 28: 27, 29: 28, 30: 29, 31: 30, 33: 31, 34: 32, 35: 33, 36: 34, 37: 35, 38: 36, 39: 37, 40: 38, 41: 39, 42: 40, 43: 41, 44: 42, 45: 43, 46: 44, 47: 45, 49: 46, 50: 47, 51: 48, 52: 49, 53: 50, 54: 51, 55: 52, 56: 53, 57: 54, 59: 55, 60: 56, 61: 57, 62: 58, 63: 59, 64: 60, 65: 61, 66: 62, 67: 63, 68: 64, 69: 65, 70: 66, 71: 67, 72: 68, 73: 69, 75: 70, 76: 71, 77: 72, 78: 73, 79: 74, 80: 75, 81: 76, 82: 77, 83: 78, 84: 79, 85: 80, 86: 81, 87: 82, 88: 83, 89: 84, 90: 85, 91: 86, 92: 87, 94: 88, 95: 89, 96: 90, 97: 91, 98: 92, 99: 93, 101: 94, 102: 95, 103: 96, 104: 97, 105: 98, 106: 99, 108: 100, 109: 101, 110: 102, 111: 103, 112: 104, 113: 105} [model_handling.py at line 1552]  +DEBUG: len(subproc_diagrams_for_config) =  105 [model_handling.py at line 1538]  +DEBUG: iconfig_to_diag =  {1: 2, 2: 3, 3: 4, 4: 5, 5: 6, 6: 7, 7: 8, 8: 9, 9: 10, 10: 11, 11: 12, 12: 13, 13: 14, 14: 15, 15: 16, 16: 17, 17: 18, 18: 19, 19: 20, 20: 21, 21: 22, 22: 23, 23: 24, 24: 25, 25: 26, 26: 27, 27: 28, 28: 29, 29: 30, 30: 31, 31: 33, 32: 34, 33: 35, 34: 36, 35: 37, 36: 38, 37: 39, 38: 40, 39: 41, 40: 42, 41: 43, 42: 44, 43: 45, 44: 46, 45: 47, 46: 49, 47: 50, 48: 51, 49: 52, 50: 53, 51: 54, 52: 55, 53: 56, 54: 57, 55: 59, 56: 60, 57: 61, 58: 62, 59: 63, 60: 64, 61: 65, 62: 66, 63: 67, 64: 68, 65: 69, 66: 70, 67: 71, 68: 72, 69: 73, 70: 75, 71: 76, 72: 77, 73: 78, 74: 79, 75: 80, 76: 81, 77: 82, 78: 83, 79: 84, 80: 85, 81: 86, 82: 87, 83: 88, 84: 89, 85: 90, 86: 91, 87: 92, 88: 94, 89: 95, 90: 96, 91: 97, 92: 98, 93: 99, 94: 101, 95: 102, 96: 103, 97: 104, 98: 105, 99: 106, 100: 108, 101: 109, 102: 110, 103: 111, 104: 112, 105: 113} [model_handling.py at line 1562]  +DEBUG: diag_to_iconfig =  {2: 1, 3: 2, 4: 3, 5: 4, 6: 5, 7: 6, 8: 7, 9: 8, 10: 9, 11: 10, 12: 11, 13: 12, 14: 13, 15: 14, 16: 15, 17: 16, 18: 17, 19: 18, 20: 19, 21: 20, 22: 21, 23: 22, 24: 23, 25: 24, 26: 25, 27: 26, 28: 27, 29: 28, 30: 29, 31: 30, 33: 31, 34: 32, 35: 33, 36: 34, 37: 35, 38: 36, 39: 37, 40: 38, 41: 39, 42: 40, 43: 41, 44: 42, 45: 43, 46: 44, 47: 45, 49: 46, 50: 47, 51: 48, 52: 49, 53: 50, 54: 51, 55: 52, 56: 53, 57: 54, 59: 55, 60: 56, 61: 57, 62: 58, 63: 59, 64: 60, 65: 61, 66: 62, 67: 63, 68: 64, 69: 65, 70: 66, 71: 67, 72: 68, 73: 69, 75: 70, 76: 71, 77: 72, 78: 73, 79: 74, 80: 75, 81: 76, 82: 77, 83: 78, 84: 79, 85: 80, 86: 81, 87: 82, 88: 83, 89: 84, 90: 85, 91: 86, 92: 87, 94: 88, 95: 89, 96: 90, 97: 91, 98: 92, 99: 93, 101: 94, 102: 95, 103: 96, 104: 97, 105: 98, 106: 99, 108: 100, 109: 101, 110: 102, 111: 103, 112: 104, 113: 105} [model_handling.py at line 1563]  INFO: Creating files in directory P2_gg_ttxuux DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1156]  INFO: Creating files in directory . @@ -510,9 +512,9 @@ FileWriter t t~ u u~ WEIGHTED<=4 @2 INFO: Finding symmetric diagrams for subprocess group gg_ttxuux -DEBUG: len(subproc_diagrams_for_config) =  35 [model_handling.py at line 1527]  -DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12, 13: 13, 14: 14, 15: 15, 16: 16, 17: 17, 18: 18, 19: 19, 20: 20, 21: 21, 22: 22, 23: 23, 24: 24, 25: 25, 26: 26, 27: 27, 28: 28, 29: 29, 30: 30, 31: 31, 32: 32, 33: 33, 34: 35, 35: 36} [model_handling.py at line 1551]  -DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12, 13: 13, 14: 14, 15: 15, 16: 16, 17: 17, 18: 18, 19: 19, 20: 20, 21: 21, 22: 22, 23: 23, 24: 24, 25: 25, 26: 26, 27: 27, 28: 28, 29: 29, 30: 30, 31: 31, 32: 32, 33: 33, 35: 34, 36: 35} [model_handling.py at line 1552]  +DEBUG: len(subproc_diagrams_for_config) =  35 [model_handling.py at line 1538]  +DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12, 13: 13, 14: 14, 15: 15, 16: 16, 17: 17, 18: 18, 19: 19, 20: 20, 21: 21, 22: 22, 23: 23, 24: 24, 25: 25, 26: 26, 27: 27, 28: 28, 29: 29, 30: 30, 31: 31, 32: 32, 33: 33, 34: 35, 35: 36} [model_handling.py at line 1562]  +DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12, 13: 13, 14: 14, 15: 15, 16: 16, 17: 17, 18: 18, 19: 19, 20: 20, 21: 21, 22: 22, 23: 23, 24: 24, 25: 25, 26: 26, 27: 27, 28: 28, 29: 29, 30: 30, 31: 31, 32: 32, 33: 33, 35: 34, 36: 35} [model_handling.py at line 1563]  INFO: Creating files in directory P2_gu_ttxgu DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1156]  INFO: Creating files in directory . @@ -521,9 +523,9 @@ FileWriter t t~ g u WEIGHTED<=4 @2 INFO: Finding symmetric diagrams for subprocess group gu_ttxgu -DEBUG: len(subproc_diagrams_for_config) =  35 [model_handling.py at line 1527]  -DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12, 13: 13, 14: 14, 15: 15, 16: 16, 17: 17, 18: 18, 19: 19, 20: 20, 21: 21, 22: 22, 23: 23, 24: 24, 25: 25, 26: 26, 27: 27, 28: 28, 29: 29, 30: 30, 31: 31, 32: 32, 33: 33, 34: 35, 35: 36} [model_handling.py at line 1551]  -DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12, 13: 13, 14: 14, 15: 15, 16: 16, 17: 17, 18: 18, 19: 19, 20: 20, 21: 21, 22: 22, 23: 23, 24: 24, 25: 25, 26: 26, 27: 27, 28: 28, 29: 29, 30: 30, 31: 31, 32: 32, 33: 33, 35: 34, 36: 35} [model_handling.py at line 1552]  +DEBUG: len(subproc_diagrams_for_config) =  35 [model_handling.py at line 1538]  +DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12, 13: 13, 14: 14, 15: 15, 16: 16, 17: 17, 18: 18, 19: 19, 20: 20, 21: 21, 22: 22, 23: 23, 24: 24, 25: 25, 26: 26, 27: 27, 28: 28, 29: 29, 30: 30, 31: 31, 32: 32, 33: 33, 34: 35, 35: 36} [model_handling.py at line 1562]  +DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12, 13: 13, 14: 14, 15: 15, 16: 16, 17: 17, 18: 18, 19: 19, 20: 20, 21: 21, 22: 22, 23: 23, 24: 24, 25: 25, 26: 26, 27: 27, 28: 28, 29: 29, 30: 30, 31: 31, 32: 32, 33: 33, 35: 34, 36: 35} [model_handling.py at line 1563]  INFO: Creating files in directory P2_gux_ttxgux DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1156]  INFO: Creating files in directory . @@ -532,9 +534,9 @@ FileWriter t t~ g u~ WEIGHTED<=4 @2 INFO: Finding symmetric diagrams for subprocess group gux_ttxgux -DEBUG: len(subproc_diagrams_for_config) =  35 [model_handling.py at line 1527]  -DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12, 13: 13, 14: 14, 15: 15, 16: 16, 17: 17, 18: 18, 19: 19, 20: 20, 21: 21, 22: 22, 23: 23, 24: 24, 25: 25, 26: 26, 27: 27, 28: 28, 29: 29, 30: 30, 31: 31, 32: 32, 33: 33, 34: 35, 35: 36} [model_handling.py at line 1551]  -DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12, 13: 13, 14: 14, 15: 15, 16: 16, 17: 17, 18: 18, 19: 19, 20: 20, 21: 21, 22: 22, 23: 23, 24: 24, 25: 25, 26: 26, 27: 27, 28: 28, 29: 29, 30: 30, 31: 31, 32: 32, 33: 33, 35: 34, 36: 35} [model_handling.py at line 1552]  +DEBUG: len(subproc_diagrams_for_config) =  35 [model_handling.py at line 1538]  +DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12, 13: 13, 14: 14, 15: 15, 16: 16, 17: 17, 18: 18, 19: 19, 20: 20, 21: 21, 22: 22, 23: 23, 24: 24, 25: 25, 26: 26, 27: 27, 28: 28, 29: 29, 30: 30, 31: 31, 32: 32, 33: 33, 34: 35, 35: 36} [model_handling.py at line 1562]  +DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12, 13: 13, 14: 14, 15: 15, 16: 16, 17: 17, 18: 18, 19: 19, 20: 20, 21: 21, 22: 22, 23: 23, 24: 24, 25: 25, 26: 26, 27: 27, 28: 28, 29: 29, 30: 30, 31: 31, 32: 32, 33: 33, 35: 34, 36: 35} [model_handling.py at line 1563]  INFO: Creating files in directory P2_uux_ttxgg DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1156]  INFO: Creating files in directory . @@ -543,9 +545,9 @@ FileWriter t t~ g g WEIGHTED<=4 @2 INFO: Finding symmetric diagrams for subprocess group uux_ttxgg -DEBUG: len(subproc_diagrams_for_config) =  35 [model_handling.py at line 1527]  -DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12, 13: 13, 14: 14, 15: 15, 16: 16, 17: 17, 18: 18, 19: 19, 20: 20, 21: 21, 22: 22, 23: 23, 24: 24, 25: 25, 26: 26, 27: 27, 28: 28, 29: 29, 30: 30, 31: 31, 32: 32, 33: 33, 34: 35, 35: 36} [model_handling.py at line 1551]  -DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12, 13: 13, 14: 14, 15: 15, 16: 16, 17: 17, 18: 18, 19: 19, 20: 20, 21: 21, 22: 22, 23: 23, 24: 24, 25: 25, 26: 26, 27: 27, 28: 28, 29: 29, 30: 30, 31: 31, 32: 32, 33: 33, 35: 34, 36: 35} [model_handling.py at line 1552]  +DEBUG: len(subproc_diagrams_for_config) =  35 [model_handling.py at line 1538]  +DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12, 13: 13, 14: 14, 15: 15, 16: 16, 17: 17, 18: 18, 19: 19, 20: 20, 21: 21, 22: 22, 23: 23, 24: 24, 25: 25, 26: 26, 27: 27, 28: 28, 29: 29, 30: 30, 31: 31, 32: 32, 33: 33, 34: 35, 35: 36} [model_handling.py at line 1562]  +DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12, 13: 13, 14: 14, 15: 15, 16: 16, 17: 17, 18: 18, 19: 19, 20: 20, 21: 21, 22: 22, 23: 23, 24: 24, 25: 25, 26: 26, 27: 27, 28: 28, 29: 29, 30: 30, 31: 31, 32: 32, 33: 33, 35: 34, 36: 35} [model_handling.py at line 1563]  INFO: Creating files in directory P1_gg_ttxg DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1156]  INFO: Creating files in directory . @@ -554,9 +556,9 @@ FileWriter t t~ g WEIGHTED<=3 @1 INFO: Finding symmetric diagrams for subprocess group gg_ttxg -DEBUG: len(subproc_diagrams_for_config) =  15 [model_handling.py at line 1527]  -DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12, 13: 13, 14: 14, 15: 15} [model_handling.py at line 1551]  -DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12, 13: 13, 14: 14, 15: 15} [model_handling.py at line 1552]  +DEBUG: len(subproc_diagrams_for_config) =  15 [model_handling.py at line 1538]  +DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12, 13: 13, 14: 14, 15: 15} [model_handling.py at line 1562]  +DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12, 13: 13, 14: 14, 15: 15} [model_handling.py at line 1563]  INFO: Creating files in directory P2_uu_ttxuu DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1156]  INFO: Creating files in directory . @@ -565,9 +567,9 @@ FileWriter t t~ u u WEIGHTED<=4 @2 INFO: Finding symmetric diagrams for subprocess group uu_ttxuu -DEBUG: len(subproc_diagrams_for_config) =  14 [model_handling.py at line 1527]  -DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12, 13: 13, 14: 14} [model_handling.py at line 1551]  -DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12, 13: 13, 14: 14} [model_handling.py at line 1552]  +DEBUG: len(subproc_diagrams_for_config) =  14 [model_handling.py at line 1538]  +DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12, 13: 13, 14: 14} [model_handling.py at line 1562]  +DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12, 13: 13, 14: 14} [model_handling.py at line 1563]  INFO: Creating files in directory P2_uux_ttxuux DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1156]  INFO: Creating files in directory . @@ -576,9 +578,9 @@ FileWriter t t~ u u~ WEIGHTED<=4 @2 INFO: Finding symmetric diagrams for subprocess group uux_ttxuux -DEBUG: len(subproc_diagrams_for_config) =  14 [model_handling.py at line 1527]  -DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12, 13: 13, 14: 14} [model_handling.py at line 1551]  -DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12, 13: 13, 14: 14} [model_handling.py at line 1552]  +DEBUG: len(subproc_diagrams_for_config) =  14 [model_handling.py at line 1538]  +DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12, 13: 13, 14: 14} [model_handling.py at line 1562]  +DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12, 13: 13, 14: 14} [model_handling.py at line 1563]  INFO: Creating files in directory P2_uxux_ttxuxux DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1156]  INFO: Creating files in directory . @@ -587,9 +589,9 @@ FileWriter t t~ u~ u~ WEIGHTED<=4 @2 INFO: Finding symmetric diagrams for subprocess group uxux_ttxuxux -DEBUG: len(subproc_diagrams_for_config) =  14 [model_handling.py at line 1527]  -DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12, 13: 13, 14: 14} [model_handling.py at line 1551]  -DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12, 13: 13, 14: 14} [model_handling.py at line 1552]  +DEBUG: len(subproc_diagrams_for_config) =  14 [model_handling.py at line 1538]  +DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12, 13: 13, 14: 14} [model_handling.py at line 1562]  +DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12, 13: 13, 14: 14} [model_handling.py at line 1563]  INFO: Creating files in directory P2_uc_ttxuc DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1156]  INFO: Creating files in directory . @@ -598,9 +600,9 @@ FileWriter t t~ u c WEIGHTED<=4 @2 INFO: Finding symmetric diagrams for subprocess group uc_ttxuc -DEBUG: len(subproc_diagrams_for_config) =  7 [model_handling.py at line 1527]  -DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7} [model_handling.py at line 1551]  -DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7} [model_handling.py at line 1552]  +DEBUG: len(subproc_diagrams_for_config) =  7 [model_handling.py at line 1538]  +DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7} [model_handling.py at line 1562]  +DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7} [model_handling.py at line 1563]  INFO: Creating files in directory P2_uux_ttxccx DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1156]  INFO: Creating files in directory . @@ -609,9 +611,9 @@ FileWriter t t~ c c~ WEIGHTED<=4 @2 INFO: Finding symmetric diagrams for subprocess group uux_ttxccx -DEBUG: len(subproc_diagrams_for_config) =  7 [model_handling.py at line 1527]  -DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7} [model_handling.py at line 1551]  -DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7} [model_handling.py at line 1552]  +DEBUG: len(subproc_diagrams_for_config) =  7 [model_handling.py at line 1538]  +DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7} [model_handling.py at line 1562]  +DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7} [model_handling.py at line 1563]  INFO: Creating files in directory P2_ucx_ttxucx DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1156]  INFO: Creating files in directory . @@ -620,9 +622,9 @@ FileWriter t t~ u c~ WEIGHTED<=4 @2 INFO: Finding symmetric diagrams for subprocess group ucx_ttxucx -DEBUG: len(subproc_diagrams_for_config) =  7 [model_handling.py at line 1527]  -DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7} [model_handling.py at line 1551]  -DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7} [model_handling.py at line 1552]  +DEBUG: len(subproc_diagrams_for_config) =  7 [model_handling.py at line 1538]  +DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7} [model_handling.py at line 1562]  +DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7} [model_handling.py at line 1563]  INFO: Creating files in directory P2_uxcx_ttxuxcx DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1156]  INFO: Creating files in directory . @@ -631,9 +633,9 @@ FileWriter t t~ u~ c~ WEIGHTED<=4 @2 INFO: Finding symmetric diagrams for subprocess group uxcx_ttxuxcx -DEBUG: len(subproc_diagrams_for_config) =  7 [model_handling.py at line 1527]  -DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7} [model_handling.py at line 1551]  -DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7} [model_handling.py at line 1552]  +DEBUG: len(subproc_diagrams_for_config) =  7 [model_handling.py at line 1538]  +DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7} [model_handling.py at line 1562]  +DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7} [model_handling.py at line 1563]  INFO: Creating files in directory P1_gu_ttxu DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1156]  INFO: Creating files in directory . @@ -642,9 +644,9 @@ FileWriter t t~ u WEIGHTED<=3 @1 INFO: Finding symmetric diagrams for subprocess group gu_ttxu -DEBUG: len(subproc_diagrams_for_config) =  5 [model_handling.py at line 1527]  -DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5} [model_handling.py at line 1551]  -DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5} [model_handling.py at line 1552]  +DEBUG: len(subproc_diagrams_for_config) =  5 [model_handling.py at line 1538]  +DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5} [model_handling.py at line 1562]  +DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5} [model_handling.py at line 1563]  INFO: Creating files in directory P1_gux_ttxux DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1156]  INFO: Creating files in directory . @@ -653,9 +655,9 @@ FileWriter t t~ u~ WEIGHTED<=3 @1 INFO: Finding symmetric diagrams for subprocess group gux_ttxux -DEBUG: len(subproc_diagrams_for_config) =  5 [model_handling.py at line 1527]  -DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5} [model_handling.py at line 1551]  -DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5} [model_handling.py at line 1552]  +DEBUG: len(subproc_diagrams_for_config) =  5 [model_handling.py at line 1538]  +DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5} [model_handling.py at line 1562]  +DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5} [model_handling.py at line 1563]  INFO: Creating files in directory P1_uux_ttxg DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1156]  INFO: Creating files in directory . @@ -664,9 +666,9 @@ FileWriter t t~ g WEIGHTED<=3 @1 INFO: Finding symmetric diagrams for subprocess group uux_ttxg -DEBUG: len(subproc_diagrams_for_config) =  5 [model_handling.py at line 1527]  -DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5} [model_handling.py at line 1551]  -DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5} [model_handling.py at line 1552]  +DEBUG: len(subproc_diagrams_for_config) =  5 [model_handling.py at line 1538]  +DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5} [model_handling.py at line 1562]  +DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5} [model_handling.py at line 1563]  INFO: Creating files in directory P0_gg_ttx DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1156]  INFO: Creating files in directory . @@ -675,9 +677,9 @@ FileWriter t t~ WEIGHTED<=2 INFO: Finding symmetric diagrams for subprocess group gg_ttx -DEBUG: len(subproc_diagrams_for_config) =  3 [model_handling.py at line 1527]  -DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3} [model_handling.py at line 1551]  -DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3} [model_handling.py at line 1552]  +DEBUG: len(subproc_diagrams_for_config) =  3 [model_handling.py at line 1538]  +DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3} [model_handling.py at line 1562]  +DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3} [model_handling.py at line 1563]  INFO: Creating files in directory P0_uux_ttx DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1156]  INFO: Creating files in directory . @@ -686,25 +688,25 @@ FileWriter t t~ WEIGHTED<=2 INFO: Finding symmetric diagrams for subprocess group uux_ttx -DEBUG: len(subproc_diagrams_for_config) =  1 [model_handling.py at line 1527]  -DEBUG: iconfig_to_diag =  {1: 1} [model_handling.py at line 1551]  -DEBUG: diag_to_iconfig =  {1: 1} [model_handling.py at line 1552]  -Generated helas calls for 18 subprocesses (372 diagrams) in 1.286 s -Wrote files for 810 helas calls in 2.762 s +DEBUG: len(subproc_diagrams_for_config) =  1 [model_handling.py at line 1538]  +DEBUG: iconfig_to_diag =  {1: 1} [model_handling.py at line 1562]  +DEBUG: diag_to_iconfig =  {1: 1} [model_handling.py at line 1563]  +Generated helas calls for 18 subprocesses (372 diagrams) in 0.573 s +Wrote files for 810 helas calls in 28.386 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.340 s +ALOHA: aloha creates 5 routines in 0.178 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 10 routines in 0.315 s +ALOHA: aloha creates 10 routines in 0.151 s VVV1 VVV1 FFV1 @@ -717,120 +719,122 @@ ALOHA: aloha creates 10 routines in 0.315 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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/src/./HelAmps_sm.h +INFO: Created file HelAmps_sm.h in directory /shared/roiser/sw/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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/src/./Parameters_sm.h +FileWriter for /shared/roiser/sw/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: /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/src/. and /shared/roiser/sw/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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/Cards/me5_configuration.txt INFO: Use Fortran compiler gfortran INFO: Use c++ compiler g++ INFO: Generate jpeg diagrams 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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j; patch -p4 -i /shared/roiser/sw/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common patching file SubProcesses/makefile -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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P0_gg_ttx; patch -p6 -i /shared/roiser/sw/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 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 +DEBUG: cd /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P0_uux_ttx; patch -p6 -i /shared/roiser/sw/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file driver.f patching file matrix1.f Hunk #1 succeeded at 74 (offset 3 lines). Hunk #2 succeeded at 230 (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 +DEBUG: cd /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P1_gg_ttxg; patch -p6 -i /shared/roiser/sw/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file driver.f patching file matrix1.f Hunk #2 succeeded at 243 (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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P1_gu_ttxu; patch -p6 -i /shared/roiser/sw/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file driver.f patching file matrix1.f Hunk #1 succeeded at 74 (offset 3 lines). Hunk #2 succeeded at 246 (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 +DEBUG: cd /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P1_gux_ttxux; patch -p6 -i /shared/roiser/sw/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file driver.f patching file matrix1.f Hunk #1 succeeded at 74 (offset 3 lines). Hunk #2 succeeded at 246 (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 +DEBUG: cd /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P1_uux_ttxg; patch -p6 -i /shared/roiser/sw/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file driver.f patching file matrix1.f Hunk #1 succeeded at 74 (offset 3 lines). Hunk #2 succeeded at 246 (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 +DEBUG: cd /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P2_gg_ttxgg; patch -p6 -i /shared/roiser/sw/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file driver.f patching file matrix1.f Hunk #2 succeeded at 275 (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 +DEBUG: cd /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P2_gg_ttxuux; patch -p6 -i /shared/roiser/sw/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file driver.f patching file matrix1.f Hunk #1 succeeded at 74 (offset 3 lines). Hunk #2 succeeded at 278 (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 +DEBUG: cd /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P2_gu_ttxgu; patch -p6 -i /shared/roiser/sw/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file driver.f patching file matrix1.f Hunk #1 succeeded at 74 (offset 3 lines). Hunk #2 succeeded at 278 (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 +DEBUG: cd /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P2_gux_ttxgux; patch -p6 -i /shared/roiser/sw/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file driver.f patching file matrix1.f Hunk #1 succeeded at 74 (offset 3 lines). Hunk #2 succeeded at 278 (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 +DEBUG: cd /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P2_uc_ttxuc; patch -p6 -i /shared/roiser/sw/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file driver.f patching file matrix1.f Hunk #1 succeeded at 76 (offset 5 lines). Hunk #2 succeeded at 280 (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 +DEBUG: cd /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P2_ucx_ttxucx; patch -p6 -i /shared/roiser/sw/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file driver.f patching file matrix1.f Hunk #1 succeeded at 82 (offset 11 lines). Hunk #2 succeeded at 286 (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 +DEBUG: cd /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P2_uu_ttxuu; patch -p6 -i /shared/roiser/sw/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file driver.f patching file matrix1.f Hunk #1 succeeded at 74 (offset 3 lines). Hunk #2 succeeded at 278 (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 +DEBUG: cd /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P2_uux_ttxccx; patch -p6 -i /shared/roiser/sw/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file driver.f patching file matrix1.f Hunk #1 succeeded at 82 (offset 11 lines). Hunk #2 succeeded at 286 (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 +DEBUG: cd /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P2_uux_ttxgg; patch -p6 -i /shared/roiser/sw/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file driver.f patching file matrix1.f Hunk #1 succeeded at 74 (offset 3 lines). Hunk #2 succeeded at 278 (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 +DEBUG: cd /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P2_uux_ttxuux; patch -p6 -i /shared/roiser/sw/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file driver.f patching file matrix1.f Hunk #1 succeeded at 74 (offset 3 lines). Hunk #2 succeeded at 278 (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 +DEBUG: cd /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P2_uxcx_ttxuxcx; patch -p6 -i /shared/roiser/sw/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file driver.f patching file matrix1.f Hunk #1 succeeded at 76 (offset 5 lines). Hunk #2 succeeded at 280 (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 +DEBUG: cd /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/SubProcesses/P2_uxux_ttxuxux; patch -p6 -i /shared/roiser/sw/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file driver.f patching file matrix1.f Hunk #1 succeeded at 74 (offset 3 lines). Hunk #2 succeeded at 278 (offset 51 lines). DEBUG: p.returncode =  0 [output.py at line 263]  -Output to directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j done. +Output to directory /shared/roiser/sw/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 +/shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/README Run "open index.html" to see more information about this process. quit -real 0m11.258s -user 0m9.633s -sys 0m0.984s -Code generation completed in 12 seconds +real 0m38.393s +user 0m5.901s +sys 0m2.452s +Code generation completed in 40 seconds +/shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/bin/internal/banner.py:3309: SyntaxWarning: invalid escape sequence '\s' + function_pat = re.compile('^\s+(?:SUBROUTINE|(?:%(type)s)\s+function)\s+([a-zA-Z]\w*)' \ ************************************************************ * * * W E L C O M E to * @@ -843,7 +847,7 @@ Code generation completed in 12 seconds * * * * * * * * * * * * -* VERSION 3.6.0 * +* VERSION 3.6.2 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -851,10 +855,9 @@ Code generation completed in 12 seconds * 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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/Cards/me5_configuration.txt +INFO: load configuration from /shared/roiser/sw/madgraph4gpu/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/Cards/me5_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 @@ -873,7 +876,7 @@ launch in debug mode * * * * * * * * * * * * -* VERSION 3.6.0 * +* VERSION 3.6.2 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -881,10 +884,9 @@ 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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/Cards/me5_configuration.txt +INFO: load configuration from /shared/roiser/sw/madgraph4gpu/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_pp_tt012j/Cards/me5_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 68b4c46295..a0212bfb62 100644 --- a/epochX/cudacpp/pp_tt012j.mad/Cards/me5_configuration.txt +++ b/epochX/cudacpp/pp_tt012j.mad/Cards/me5_configuration.txt @@ -235,7 +235,7 @@ # pineappl = pineappl -#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo +#mg5_path = /shared/roiser/sw/madgraph4gpu/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo +#mg5_path = /shared/roiser/sw/madgraph4gpu/MG5aMC/mg5amcnlo diff --git a/epochX/cudacpp/pp_tt012j.mad/Cards/proc_card_mg5.dat b/epochX/cudacpp/pp_tt012j.mad/Cards/proc_card_mg5.dat index 33311e49bc..0191086c1d 100644 --- a/epochX/cudacpp/pp_tt012j.mad/Cards/proc_card_mg5.dat +++ b/epochX/cudacpp/pp_tt012j.mad/Cards/proc_card_mg5.dat @@ -8,7 +8,7 @@ #* * * * #* * #* * -#* VERSION 3.6.0 2024-09-30 * +#* VERSION 3.6.2 2025-03-19 * #* * #* WARNING: UNKNOWN DEVELOPMENT VERSION. * #* WARNING: DO NOT USE FOR PRODUCTION * diff --git a/epochX/cudacpp/pp_tt012j.mad/Cards/run_card.dat b/epochX/cudacpp/pp_tt012j.mad/Cards/run_card.dat index 5eb60f35df..fe9c38d826 100644 --- a/epochX/cudacpp/pp_tt012j.mad/Cards/run_card.dat +++ b/epochX/cudacpp/pp_tt012j.mad/Cards/run_card.dat @@ -125,6 +125,7 @@ # Parton level cuts definition * #******************************* 0.0 = dsqrt_shat ! minimal shat for full process + -1 = dsqrt_shatmax ! maximum shat for full process # # #********************************************************************* diff --git a/epochX/cudacpp/pp_tt012j.mad/Cards/run_card_default.dat b/epochX/cudacpp/pp_tt012j.mad/Cards/run_card_default.dat index 38810a6b83..0185201786 100644 --- a/epochX/cudacpp/pp_tt012j.mad/Cards/run_card_default.dat +++ b/epochX/cudacpp/pp_tt012j.mad/Cards/run_card_default.dat @@ -125,6 +125,7 @@ # Parton level cuts definition * #******************************* 0.0 = dsqrt_shat ! minimal shat for full process + -1 = dsqrt_shatmax ! maximum shat for full process # # #********************************************************************* diff --git a/epochX/cudacpp/pp_tt012j.mad/MGMEVersion.txt b/epochX/cudacpp/pp_tt012j.mad/MGMEVersion.txt index 084e244cea..77a069e39b 100644 --- a/epochX/cudacpp/pp_tt012j.mad/MGMEVersion.txt +++ b/epochX/cudacpp/pp_tt012j.mad/MGMEVersion.txt @@ -1 +1 @@ -3.6.0 \ No newline at end of file +3.6.2 \ No newline at end of file diff --git a/epochX/cudacpp/pp_tt012j.mad/Source/alfas_functions.f b/epochX/cudacpp/pp_tt012j.mad/Source/alfas_functions.f index bb69a6384e..84aeff369c 100644 --- a/epochX/cudacpp/pp_tt012j.mad/Source/alfas_functions.f +++ b/epochX/cudacpp/pp_tt012j.mad/Source/alfas_functions.f @@ -188,6 +188,10 @@ SUBROUTINE NEWTON1(T,A_IN,A_OUT,NLOOP,NF) A_OUT=A_IN/(1D0+A_IN*B0(NF)*T) IF (NLOOP .EQ. 1) RETURN + if (1D0+A_IN*B0(NF)*T.le.0d0)THEN + A_OUT = 9d98 + RETURN + ENDIF A_OUT=A_IN/(1D0+B0(NF)*A_IN*T+C1(NF)*A_IN*LOG(1D0+A_IN*B0(NF)*T)) IF (A_OUT .LT. 0D0) AS=0.3D0 30 AS=A_OUT diff --git a/epochX/cudacpp/pp_tt012j.mad/Source/cuts.inc b/epochX/cudacpp/pp_tt012j.mad/Source/cuts.inc index 23d099e5f7..a8ccc7420d 100644 --- a/epochX/cudacpp/pp_tt012j.mad/Source/cuts.inc +++ b/epochX/cudacpp/pp_tt012j.mad/Source/cuts.inc @@ -37,7 +37,7 @@ C REAL*8 misset,missetmax,ptheavy REAL*8 ptllmin,ptllmax integer maxjetflavor - REAl*8 dsqrt_shat + REAl*8 dsqrt_shat,dsqrt_shatmax COMMON /to_min_max_cuts/ & PTJmax,PTBmax,PTAmax,PTLmax, @@ -60,7 +60,7 @@ C & ht2max,ht3max,ht4max, & htjmin,htjmax,ihtmin,ihtmax, & misset,missetmax,ptheavy, - & ptllmin,ptllmax,dsqrt_shat, + & ptllmin,ptllmax,dsqrt_shat,dsqrt_shatmax, & maxjetflavor C diff --git a/epochX/cudacpp/pp_tt012j.mad/Source/make_opts b/epochX/cudacpp/pp_tt012j.mad/Source/make_opts index e4b87ee6ad..f9f7b64bb5 100644 --- a/epochX/cudacpp/pp_tt012j.mad/Source/make_opts +++ b/epochX/cudacpp/pp_tt012j.mad/Source/make_opts @@ -5,8 +5,8 @@ GLOBAL_FLAG=-O3 -ffast-math -fbounds-check MACFLAG= MG5AMC_VERSION=SpecifiedByMG5aMCAtRunTime PYTHIA8_PATH=NotInstalled -STDLIB_FLAG= STDLIB=-lstdc++ +STDLIB_FLAG= #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 291ca907ee..f9321e7a94 100644 --- a/epochX/cudacpp/pp_tt012j.mad/Source/makefile +++ b/epochX/cudacpp/pp_tt012j.mad/Source/makefile @@ -73,6 +73,7 @@ $(BINDIR)gensudgrid: $(GENSUDGRID) $(LIBDIR)libpdf.$(libext) $(LIBDIR)libgammaUP # Dependencies dsample.o: DiscreteSampler.o dsample.f genps.inc StringCast.o vector.inc +pawgraph.o: vector.inc DiscreteSampler.o: StringCast.o invarients.o: invarients.f genps.inc gen_ximprove.o: gen_ximprove.f run_config.inc run_card.inc diff --git a/epochX/cudacpp/pp_tt012j.mad/Source/run_card.inc b/epochX/cudacpp/pp_tt012j.mad/Source/run_card.inc index 2588190439..e169c1f193 100644 --- a/epochX/cudacpp/pp_tt012j.mad/Source/run_card.inc +++ b/epochX/cudacpp/pp_tt012j.mad/Source/run_card.inc @@ -88,6 +88,8 @@ DSQRT_SHAT = 0.000000000000000D+00 + DSQRT_SHATMAX = -1 + LIMHEL = 0.000000000000000D+00 PTJ = 2.000000000000000D+01 diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/Bridge.h b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/Bridge.h index 87aa648dd2..49b928db67 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/Bridge.h +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/Bridge.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: S. Roiser (Nov 2021) for the MG5aMC CUDACPP plugin. -// Further modified by: S. Roiser, J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2021-2025) for the MG5aMC CUDACPP plugin. #ifndef BRIDGE_H #define BRIDGE_H 1 @@ -255,11 +255,15 @@ namespace mg5amcCpu throw std::logic_error( "Bridge constructor: FIXME! cannot choose gputhreads" ); // this should never happen! m_gpublocks = m_nevt / m_gputhreads; } +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Instantiate device Bridge (nevt=" << m_nevt << ", gpublocks=" << m_gpublocks << ", gputhreads=" << m_gputhreads << ", gpublocks*gputhreads=" << m_gpublocks * m_gputhreads << ")" << std::endl; +#endif m_pmek.reset( new MatrixElementKernelDevice( m_devMomentaC, m_devGs, m_devRndHel, m_devRndCol, m_devChannelIds, m_devMEs, m_devSelHel, m_devSelCol, m_gpublocks, m_gputhreads ) ); #else +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Instantiate host Bridge (nevt=" << m_nevt << ")" << std::endl; +#endif m_pmek.reset( new MatrixElementKernelHost( m_hstMomentaC, m_hstGs, m_hstRndHel, m_hstRndCol, m_hstChannelIds, m_hstMEs, m_hstSelHel, m_hstSelCol, m_nevt ) ); #endif // MGONGPUCPP_GPUIMPL // Create a process object, read param card and set parameters @@ -290,8 +294,10 @@ namespace mg5amcCpu throw std::runtime_error( "Bridge: gpublocks*gputhreads must equal m_nevt in set_gpugrid" ); m_gpublocks = gpublocks; m_gputhreads = gputhreads; +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Set grid in Bridge (nevt=" << m_nevt << ", gpublocks=" << m_gpublocks << ", gputhreads=" << m_gputhreads << ", gpublocks*gputhreads=" << m_gpublocks * m_gputhreads << ")" << std::endl; +#endif m_pmek->setGrid( m_gpublocks, m_gputhreads ); } #endif @@ -347,7 +353,9 @@ namespace mg5amcCpu if( goodHelOnly ) return; m_pmek->computeMatrixElements( useChannelIds ); copyHostFromDevice( m_hstMEs, m_devMEs ); +#ifdef MGONGPUCPP_VERBOSE flagAbnormalMEs( m_hstMEs.data(), m_nevt ); +#endif copyHostFromDevice( m_hstSelHel, m_devSelHel ); copyHostFromDevice( m_hstSelCol, m_devSelCol ); if constexpr( std::is_same_v ) @@ -400,7 +408,9 @@ namespace mg5amcCpu } if( goodHelOnly ) return; m_pmek->computeMatrixElements( useChannelIds ); +#ifdef MGONGPUCPP_VERBOSE flagAbnormalMEs( m_hstMEs.data(), m_nevt ); +#endif if constexpr( std::is_same_v ) { memcpy( mes, m_hstMEs.data(), m_hstMEs.bytes() ); diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/GpuRuntime.h b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/GpuRuntime.h index 860c7fde16..6a4b946e74 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/GpuRuntime.h +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/GpuRuntime.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: J. Teig (Jun 2023, based on earlier work by S. Roiser) for the MG5aMC CUDACPP plugin. -// Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2025) for the MG5aMC CUDACPP plugin. #ifndef MG5AMC_GPURUNTIME_H #define MG5AMC_GPURUNTIME_H 1 @@ -50,7 +50,7 @@ namespace mg5amcGpu // Set up CUDA application // ** NB: strictly speaking this is not needed when using the CUDA runtime API ** // Calling cudaSetDevice on startup is useful to properly book-keep the time spent in CUDA initialization - static void setUp( const bool debug = true ) + static void setUp( const bool debug = false ) // ZW: changed debug default to false { // ** NB: it is useful to call cudaSetDevice, or cudaFree, to properly book-keep the time spent in CUDA initialization // ** NB: otherwise, the first CUDA operation (eg a cudaMemcpyToSymbol in CPPProcess ctor) appears to take much longer! @@ -71,7 +71,7 @@ namespace mg5amcGpu // ** NB: strictly speaking this is not needed when using the CUDA runtime API ** // Calling cudaDeviceReset on shutdown is only needed for checking memory leaks in cuda-memcheck // See https://docs.nvidia.com/cuda/cuda-memcheck/index.html#leak-checking - static void tearDown( const bool debug = true ) + static void tearDown( const bool debug = false ) // ZW: changed debug default to false { if( debug ) std::cout << "__GpuRuntime: calling GpuDeviceReset()" << std::endl; checkGpu( gpuDeviceReset() ); diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/MGVersion.txt b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/MGVersion.txt index 084e244cea..77a069e39b 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/MGVersion.txt +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/MGVersion.txt @@ -1 +1 @@ -3.6.0 \ No newline at end of file +3.6.2 \ No newline at end of file diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/MatrixElementKernels.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/MatrixElementKernels.cc index f463977c1a..703ea3781c 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/MatrixElementKernels.cc +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/MatrixElementKernels.cc @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: A. Valassi (Jan 2022) for the MG5aMC CUDACPP plugin. -// Further modified by: J. Teig, A. Valassi (2022-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: J. Teig, A. Valassi, Z. Wettersten (2022-2025) for the MG5aMC CUDACPP plugin. #include "MatrixElementKernels.h" @@ -60,7 +60,9 @@ namespace mg5amcCpu #ifdef MGONGPU_CHANNELID_DEBUG MatrixElementKernelBase::dumpNevtProcessedByChannel(); #endif +#ifdef MGONGPUCPP_VERBOSE MatrixElementKernelBase::dumpSignallingFPEs(); +#endif } //-------------------------------------------------------------------------- diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/MatrixElementKernels.h b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/MatrixElementKernels.h index 7acff4b308..8da04d7945 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/MatrixElementKernels.h +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/MatrixElementKernels.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: A. Valassi (Jan 2022) for the MG5aMC CUDACPP plugin. -// Further modified by: J. Teig, A. Valassi (2022-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: J. Teig, A. Valassi, Z. Wettersten (2022-2025) for the MG5aMC CUDACPP plugin. #ifndef MATRIXELEMENTKERNELS_H #define MATRIXELEMENTKERNELS_H 1 @@ -134,7 +134,7 @@ namespace mg5amcCpu // Does this host system support the SIMD used in the matrix element calculation? // [NB: this is private, SIMD vectorization in mg5amc C++ code is currently only used in the ME calculations below MatrixElementKernelHost!] - static bool hostSupportsSIMD( const bool verbose = true ); + static bool hostSupportsSIMD( const bool verbose = false ); // ZW: default verbose false private: diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/MemoryAccessGs.h b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/MemoryAccessGs.h index 63c17a68fa..50a6aaef4d 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/MemoryAccessGs.h +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/MemoryAccessGs.h @@ -128,6 +128,14 @@ namespace mg5amcCpu #endif } + // Locate a field (output) in a memory buffer (input) from a kernel event-indexing mechanism (internal) + // [Signature (SCALAR OR VECTOR) ===> fptype_sv* kernelAccess( fptype* buffer ) <===] + static __host__ __device__ inline fptype_sv* + kernelAccessP( fptype* buffer ) + { + return reinterpret_cast( buffer ); + } + // Locate a field (output) in a memory buffer (input) from a kernel event-indexing mechanism (internal) and the given field indexes (input) // [Signature (const, SCALAR) ===> const fptype& kernelAccessConst( const fptype* buffer ) <===] static constexpr auto kernelAccessConst_s = diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/MemoryBuffers.h b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/MemoryBuffers.h index 65a101888d..17ba7a89e5 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/MemoryBuffers.h +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/MemoryBuffers.h @@ -13,6 +13,7 @@ #include "CPPProcess.h" #include "GpuRuntime.h" #include "Parameters_sm.h" +#include "processConfig.h" #include @@ -274,7 +275,8 @@ namespace mg5amcCpu typedef BufferBase BufferNumerators; // The size (number of elements) per event in a memory buffer for numerators - constexpr size_t sizePerEventNumerators = 1; + // (should be equal to the number of diagrams in the process) + constexpr size_t sizePerEventNumerators = processConfig::ndiagrams; #ifndef MGONGPUCPP_GPUIMPL // A class encapsulating a C++ host buffer for gs 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 a17c5f1eef..dd239b0581 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 @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -25,6 +25,7 @@ #include "MemoryAccessMatrixElements.h" #include "MemoryAccessMomenta.h" #include "MemoryAccessWavefunctions.h" +#include "processConfig.h" #ifdef MGONGPU_SUPPORTS_MULTICHANNEL #include "MemoryAccessDenominators.h" @@ -96,6 +97,69 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { +#ifdef MGONGPU_SUPPORTS_MULTICHANNEL + __device__ INLINE unsigned int getChannelId( const unsigned int* allChannelIds +#ifndef MGONGPUCPP_GPUIMPL + , + const int ievt00, + bool sanityCheckMixedPrecision = true +#endif + ) + { + unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr +#ifdef MGONGPUCPP_GPUIMPL + using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page + if( allChannelIds != nullptr ) + { + const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) + const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) + // NB: channelIds_sv is a scalar in CUDA + channelId = channelIds_sv; + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + } +#else // Cuda or C++ + using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + if( allChannelIds != nullptr ) + { + // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) + const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 + uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) +#ifndef MGONGPU_CPPSIMD + // NB: channelIds_sv is a scalar in no-SIMD C++ + channelId = channelIds_sv; +#else + // NB: channelIds_sv is a vector in SIMD C++ + channelId = channelIds_sv[0]; // element[0] + for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] + { + assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId + } +#endif + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + if( sanityCheckMixedPrecision ) + { +#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT + // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) + const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 + uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + for( int i = 0; i < neppV; ++i ) + { + assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector + } +#endif + } + } +#endif // MGONGPUCPP_GPUIMPL + return channelId; + } +#endif // MGONGPU_SUPPORTS_MULTICHANNEL + constexpr int nw6 = CPPProcess::nw6; // dimensions of each wavefunction (HELAS KEK 91-11): e.g. 6 for e+ e- -> mu+ mu- (fermions and vectors) constexpr int npar = CPPProcess::npar; // #particles in total (external = initial + final): e.g. 4 for e+ e- -> mu+ mu- constexpr int ncomb = CPPProcess::ncomb; // #helicity combinations: e.g. 16 for e+ e- -> mu+ mu- (2**4 = fermion spin up/down ** npar) @@ -305,7 +369,7 @@ namespace mg5amcCpu COUPs[ndcoup + iicoup] = allCOUPs[ndcoup + iicoup]; // independent couplings, fixed for all events fptype* MEs = E_ACCESS::ieventAccessRecord( allMEs, ievt0 ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); #endif #endif @@ -315,7 +379,7 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Numerators and denominators for the current event (CUDA) or SIMD event page (C++) - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); #endif @@ -335,8 +399,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1 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] ); + if( channelId != 0 ) + { + numerators_sv[0] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[1] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -349,8 +416,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 2 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] ); + if( channelId != 0 ) + { + numerators_sv[1] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= amp_sv[0]; @@ -362,8 +432,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 3 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] ); + if( channelId != 0 ) + { + numerators_sv[2] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] -= amp_sv[0]; @@ -555,7 +628,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- @@ -923,9 +998,6 @@ namespace mg5amcCpu #ifdef MGONGPUCPP_GPUIMPL // Remember: in CUDA this is a kernel for one event, in c++ this processes n events const int ievt = blockDim.x * blockIdx.x + threadIdx.x; // index of event (thread) in grid -#ifdef MGONGPU_SUPPORTS_MULTICHANNEL - using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events -#endif #else //assert( (size_t)(allmomenta) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] //assert( (size_t)(allMEs) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] @@ -933,7 +1005,6 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL using NUM_ACCESS = HostAccessNumerators; // non-trivial access: buffer includes all events using DEN_ACCESS = HostAccessDenominators; // non-trivial access: buffer includes all events - using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events #endif #endif @@ -958,11 +1029,12 @@ namespace mg5amcCpu fptype_sv& MEs_sv = E_ACCESS::kernelAccess( MEs ); MEs_sv = fptype_sv{ 0 }; #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - numerators_sv = fptype_sv{ 0 }; + for( int i = 0; i < processConfig::ndiagrams; ++i ) + numerators_sv[i] = fptype_sv{ 0 }; denominators_sv = fptype_sv{ 0 }; #endif } @@ -975,17 +1047,7 @@ namespace mg5amcCpu // *** START OF PART 1a - CUDA (one event per GPU thread) *** #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) - const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) - // NB: channelIds_sv is a scalar in CUDA - channelId = channelIds_sv; - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) - } + unsigned int channelId = getChannelId( allChannelIds ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (for the single event processed in calculate_wavefunctions) @@ -1100,38 +1162,7 @@ namespace mg5amcCpu const int ievt00 = ipagV2 * neppV; // loop on one SIMD page (neppV events) at a time #endif #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) - const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 - uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) -#ifndef MGONGPU_CPPSIMD - // NB: channelIds_sv is a scalar in no-SIMD C++ - channelId = channelIds_sv; -#else - // NB: channelIds_sv is a vector in SIMD C++ - channelId = channelIds_sv[0]; // element[0] - for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] - { - assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId - } -#endif - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) -#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT - // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) - const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 - uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - for( int i = 0; i < neppV; ++i ) - { - assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector - } -#endif - } + unsigned int channelId = getChannelId( allChannelIds, ievt00 ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (jamp2[nParity][ncolor][neppV] for the SIMD vector - or the two SIMD vectors - of events processed in calculate_wavefunctions) @@ -1304,11 +1335,12 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( allChannelIds != nullptr ) // fix segfault #892 (not 'channelIds[0] != 0') { - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + const unsigned int channelId = getChannelId( allChannelIds, ievt0, false ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - MEs_sv *= numerators_sv / denominators_sv; + MEs_sv *= numerators_sv[channelId - 1] / denominators_sv; } #endif //for( int ieppV = 0; ieppV < neppV; ieppV++ ) diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx/CPPProcess.h b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx/CPPProcess.h index 2d89e0e244..167fe8f7a4 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx/CPPProcess.h +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx/auto_dsig.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx/auto_dsig.f index 19278bca59..4b47d38060 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx/auto_dsig.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C 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 42cc7c9d61..9aac5584ec 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 @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -137,14 +137,14 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDDO QSCALE=QSCALE/2D0 ELSE - QSCALE=DSQRT(Q2FACT(IB(1))) + QSCALE=DSQRT(Q2FACT(1)) ENDIF G1=PDG2PDF(LPP(IB(1)),0, IB(1),XBK(IB(1)), QSCALE) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) IF (DSQRT(Q2FACT(IB(2))).NE.0D0) THEN - QSCALE=DSQRT(Q2FACT(IB(2))) + QSCALE=DSQRT(Q2FACT(2)) ENDIF G2=PDG2PDF(LPP(IB(2)),0, IB(2),XBK(IB(2)), QSCALE) ENDIF @@ -219,7 +219,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -290,6 +290,10 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, INTEGER I_EE C +C STUFF FOR UPC +C + DOUBLE PRECISION PHOTONPDFSQUARE +C C EXTERNAL FUNCTIONS C LOGICAL PASSCUTS @@ -373,12 +377,12 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, IF (ABS(LPP(IB(1))).GE.1) THEN C LP=SIGN(1,LPP(IB(1))) G1(IVEC)=PDG2PDF(LPP(IB(1)),0, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) G2(IVEC)=PDG2PDF(LPP(IB(2)),0, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) ENDIF ENDDO ! IWARP LOOP ENDDO ! CURRWARP LOOP diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx/matrix1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx/matrix1.f index ca1785b808..fccc5a19c5 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx/matrix1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx/matrix1.f @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -307,7 +307,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -350,7 +350,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C INTEGER I,J,M,N COMPLEX*16 ZTEMP, TMP_JAMP(0) - REAL*8 CF(NCOLOR,NCOLOR) + INTEGER CF(NCOLOR*(NCOLOR+1)/2) + INTEGER DENOM, CF_INDEX COMPLEX*16 AMP(NGRAPHS), JAMP(NCOLOR,NAMPSO) COMPLEX*16 W(6,NWAVEFUNCS) C Needed for v4 models @@ -393,11 +394,10 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C C COLOR DATA C - DATA (CF(I, 1),I= 1, 2) /5.333333333333333D+00, - $ -6.666666666666666D-01/ + DATA DENOM/3/ + DATA (CF(I),I= 1, 2) /16,-4/ C 1 T(1,2,3,4) - DATA (CF(I, 2),I= 1, 2) /-6.666666666666666D-01 - $ ,5.333333333333333D+00/ + DATA (CF(I),I= 3, 3) /16/ C 1 T(2,1,3,4) C ---------- C BEGIN CODE @@ -446,10 +446,12 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) MATRIX1 = 0.D0 DO M = 1, NAMPSO + CF_INDEX = 0 DO I = 1, NCOLOR ZTEMP = (0.D0,0.D0) - DO J = 1, NCOLOR - ZTEMP = ZTEMP + CF(J,I)*JAMP(J,M) + DO J = I, NCOLOR + CF_INDEX = CF_INDEX + 1 + ZTEMP = ZTEMP + CF(CF_INDEX)*JAMP(J,M) ENDDO DO N = 1, NAMPSO @@ -458,6 +460,7 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) ENDDO ENDDO ENDDO + MATRIX1 = MATRIX1/DENOM IF(SDE_STRAT.EQ.1)THEN AMP2(1)=AMP2(1)+AMP(1)*DCONJG(AMP(1)) diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx/matrix11.png b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx/matrix11.png new file mode 100644 index 0000000000..9017b25979 Binary files /dev/null and b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx/matrix11.png differ diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx/processConfig.h b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx/processConfig.h new file mode 100644 index 0000000000..8f6a27f796 --- /dev/null +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx/processConfig.h @@ -0,0 +1,16 @@ +// Copyright (C) 2025 CERN and UCLouvain. +// Licensed under the GNU Lesser General Public License (version 3 or later). +// Created by: S. Roiser (May 2025) for the MG5aMC CUDACPP plugin. +// Further modified by: ... for the MG5aMC CUDACPP plugin. + + +#ifndef MG5_CONFIG_SIGMA_SM_GG_TTX_H +#define MG5_CONFIG_SIGMA_SM_GG_TTX_H 1 + +namespace processConfig { + + constexpr int ndiagrams = 3; + +} + +#endif // MG5_CONFIG_SIGMA_SM_GG_TTX_H \ No newline at end of file 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 0979455d7a..744204da44 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 @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -25,6 +25,7 @@ #include "MemoryAccessMatrixElements.h" #include "MemoryAccessMomenta.h" #include "MemoryAccessWavefunctions.h" +#include "processConfig.h" #ifdef MGONGPU_SUPPORTS_MULTICHANNEL #include "MemoryAccessDenominators.h" @@ -99,6 +100,69 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { +#ifdef MGONGPU_SUPPORTS_MULTICHANNEL + __device__ INLINE unsigned int getChannelId( const unsigned int* allChannelIds +#ifndef MGONGPUCPP_GPUIMPL + , + const int ievt00, + bool sanityCheckMixedPrecision = true +#endif + ) + { + unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr +#ifdef MGONGPUCPP_GPUIMPL + using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page + if( allChannelIds != nullptr ) + { + const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) + const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) + // NB: channelIds_sv is a scalar in CUDA + channelId = channelIds_sv; + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + } +#else // Cuda or C++ + using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + if( allChannelIds != nullptr ) + { + // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) + const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 + uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) +#ifndef MGONGPU_CPPSIMD + // NB: channelIds_sv is a scalar in no-SIMD C++ + channelId = channelIds_sv; +#else + // NB: channelIds_sv is a vector in SIMD C++ + channelId = channelIds_sv[0]; // element[0] + for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] + { + assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId + } +#endif + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + if( sanityCheckMixedPrecision ) + { +#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT + // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) + const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 + uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + for( int i = 0; i < neppV; ++i ) + { + assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector + } +#endif + } + } +#endif // MGONGPUCPP_GPUIMPL + return channelId; + } +#endif // MGONGPU_SUPPORTS_MULTICHANNEL + constexpr int nw6 = CPPProcess::nw6; // dimensions of each wavefunction (HELAS KEK 91-11): e.g. 6 for e+ e- -> mu+ mu- (fermions and vectors) constexpr int npar = CPPProcess::npar; // #particles in total (external = initial + final): e.g. 4 for e+ e- -> mu+ mu- constexpr int ncomb = CPPProcess::ncomb; // #helicity combinations: e.g. 16 for e+ e- -> mu+ mu- (2**4 = fermion spin up/down ** npar) @@ -308,7 +372,7 @@ namespace mg5amcCpu COUPs[ndcoup + iicoup] = allCOUPs[ndcoup + iicoup]; // independent couplings, fixed for all events fptype* MEs = E_ACCESS::ieventAccessRecord( allMEs, ievt0 ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); #endif #endif @@ -318,7 +382,7 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Numerators and denominators for the current event (CUDA) or SIMD event page (C++) - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); #endif @@ -338,8 +402,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1 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] ); + if( channelId != 0 ) + { + numerators_sv[0] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 6. * amp_sv[0]; jamp_sv[1] -= 1. / 2. * amp_sv[0]; @@ -532,7 +599,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- @@ -900,9 +969,6 @@ namespace mg5amcCpu #ifdef MGONGPUCPP_GPUIMPL // Remember: in CUDA this is a kernel for one event, in c++ this processes n events const int ievt = blockDim.x * blockIdx.x + threadIdx.x; // index of event (thread) in grid -#ifdef MGONGPU_SUPPORTS_MULTICHANNEL - using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events -#endif #else //assert( (size_t)(allmomenta) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] //assert( (size_t)(allMEs) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] @@ -910,7 +976,6 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL using NUM_ACCESS = HostAccessNumerators; // non-trivial access: buffer includes all events using DEN_ACCESS = HostAccessDenominators; // non-trivial access: buffer includes all events - using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events #endif #endif @@ -935,11 +1000,12 @@ namespace mg5amcCpu fptype_sv& MEs_sv = E_ACCESS::kernelAccess( MEs ); MEs_sv = fptype_sv{ 0 }; #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - numerators_sv = fptype_sv{ 0 }; + for( int i = 0; i < processConfig::ndiagrams; ++i ) + numerators_sv[i] = fptype_sv{ 0 }; denominators_sv = fptype_sv{ 0 }; #endif } @@ -952,17 +1018,7 @@ namespace mg5amcCpu // *** START OF PART 1a - CUDA (one event per GPU thread) *** #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) - const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) - // NB: channelIds_sv is a scalar in CUDA - channelId = channelIds_sv; - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) - } + unsigned int channelId = getChannelId( allChannelIds ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (for the single event processed in calculate_wavefunctions) @@ -1077,38 +1133,7 @@ namespace mg5amcCpu const int ievt00 = ipagV2 * neppV; // loop on one SIMD page (neppV events) at a time #endif #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) - const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 - uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) -#ifndef MGONGPU_CPPSIMD - // NB: channelIds_sv is a scalar in no-SIMD C++ - channelId = channelIds_sv; -#else - // NB: channelIds_sv is a vector in SIMD C++ - channelId = channelIds_sv[0]; // element[0] - for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] - { - assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId - } -#endif - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) -#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT - // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) - const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 - uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - for( int i = 0; i < neppV; ++i ) - { - assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector - } -#endif - } + unsigned int channelId = getChannelId( allChannelIds, ievt00 ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (jamp2[nParity][ncolor][neppV] for the SIMD vector - or the two SIMD vectors - of events processed in calculate_wavefunctions) @@ -1281,11 +1306,12 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( allChannelIds != nullptr ) // fix segfault #892 (not 'channelIds[0] != 0') { - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + const unsigned int channelId = getChannelId( allChannelIds, ievt0, false ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - MEs_sv *= numerators_sv / denominators_sv; + MEs_sv *= numerators_sv[channelId - 1] / denominators_sv; } #endif //for( int ieppV = 0; ieppV < neppV; ieppV++ ) diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_uux_ttx/CPPProcess.h b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_uux_ttx/CPPProcess.h index d6fa3205c0..72dd5c9200 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_uux_ttx/CPPProcess.h +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_uux_ttx/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_uux_ttx/auto_dsig.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_uux_ttx/auto_dsig.f index 6558c40922..6a5d5f05e2 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_uux_ttx/auto_dsig.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_uux_ttx/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C 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 86f844defe..71863d2954 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 @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -140,7 +140,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDDO QSCALE=QSCALE/2D0 ELSE - QSCALE=DSQRT(Q2FACT(IB(1))) + QSCALE=DSQRT(Q2FACT(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) @@ -150,7 +150,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) IF (DSQRT(Q2FACT(IB(2))).NE.0D0) THEN - QSCALE=DSQRT(Q2FACT(IB(2))) + QSCALE=DSQRT(Q2FACT(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) @@ -237,7 +237,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -313,6 +313,10 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, INTEGER I_EE C +C STUFF FOR UPC +C + DOUBLE PRECISION PHOTONPDFSQUARE +C C EXTERNAL FUNCTIONS C LOGICAL PASSCUTS @@ -398,24 +402,24 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, IF (ABS(LPP(IB(1))).GE.1) THEN C LP=SIGN(1,LPP(IB(1))) D1(IVEC)=PDG2PDF(LPP(IB(1)),1, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) U1(IVEC)=PDG2PDF(LPP(IB(1)),2, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) S1(IVEC)=PDG2PDF(LPP(IB(1)),3, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) C1(IVEC)=PDG2PDF(LPP(IB(1)),4, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) CX2(IVEC)=PDG2PDF(LPP(IB(2)),-4, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) SX2(IVEC)=PDG2PDF(LPP(IB(2)),-3, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) UX2(IVEC)=PDG2PDF(LPP(IB(2)),-2, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) DX2(IVEC)=PDG2PDF(LPP(IB(2)),-1, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) ENDIF ENDDO ! IWARP LOOP ENDDO ! CURRWARP LOOP diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_uux_ttx/matrix1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_uux_ttx/matrix1.f index ec88a303fa..ff93a66dbe 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_uux_ttx/matrix1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_uux_ttx/matrix1.f @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -310,7 +310,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -356,7 +356,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C INTEGER I,J,M,N COMPLEX*16 ZTEMP, TMP_JAMP(0) - REAL*8 CF(NCOLOR,NCOLOR) + INTEGER CF(NCOLOR*(NCOLOR+1)/2) + INTEGER DENOM, CF_INDEX COMPLEX*16 AMP(NGRAPHS), JAMP(NCOLOR,NAMPSO) COMPLEX*16 W(6,NWAVEFUNCS) C Needed for v4 models @@ -399,11 +400,10 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C C COLOR DATA C - DATA (CF(I, 1),I= 1, 2) /9.000000000000000D+00 - $ ,3.000000000000000D+00/ + DATA DENOM/1/ + DATA (CF(I),I= 1, 2) /9,6/ C 1 T(2,1) T(3,4) - DATA (CF(I, 2),I= 1, 2) /3.000000000000000D+00 - $ ,9.000000000000000D+00/ + DATA (CF(I),I= 3, 3) /9/ C 1 T(2,4) T(3,1) C ---------- C BEGIN CODE @@ -444,10 +444,12 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) MATRIX1 = 0.D0 DO M = 1, NAMPSO + CF_INDEX = 0 DO I = 1, NCOLOR ZTEMP = (0.D0,0.D0) - DO J = 1, NCOLOR - ZTEMP = ZTEMP + CF(J,I)*JAMP(J,M) + DO J = I, NCOLOR + CF_INDEX = CF_INDEX + 1 + ZTEMP = ZTEMP + CF(CF_INDEX)*JAMP(J,M) ENDDO DO N = 1, NAMPSO @@ -456,6 +458,7 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) ENDDO ENDDO ENDDO + MATRIX1 = MATRIX1/DENOM IF(SDE_STRAT.EQ.1)THEN AMP2(1)=AMP2(1)+AMP(1)*DCONJG(AMP(1)) diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_uux_ttx/matrix11.png b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_uux_ttx/matrix11.png new file mode 100644 index 0000000000..e55364c1a6 Binary files /dev/null and b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_uux_ttx/matrix11.png differ diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_uux_ttx/processConfig.h b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_uux_ttx/processConfig.h new file mode 100644 index 0000000000..771b635b93 --- /dev/null +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_uux_ttx/processConfig.h @@ -0,0 +1,16 @@ +// Copyright (C) 2025 CERN and UCLouvain. +// Licensed under the GNU Lesser General Public License (version 3 or later). +// Created by: S. Roiser (May 2025) for the MG5aMC CUDACPP plugin. +// Further modified by: ... for the MG5aMC CUDACPP plugin. + + +#ifndef MG5_CONFIG_SIGMA_SM_UUX_TTX_H +#define MG5_CONFIG_SIGMA_SM_UUX_TTX_H 1 + +namespace processConfig { + + constexpr int ndiagrams = 1; + +} + +#endif // MG5_CONFIG_SIGMA_SM_UUX_TTX_H \ No newline at end of file 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 5de1c626c8..cd559e5714 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 @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -25,6 +25,7 @@ #include "MemoryAccessMatrixElements.h" #include "MemoryAccessMomenta.h" #include "MemoryAccessWavefunctions.h" +#include "processConfig.h" #ifdef MGONGPU_SUPPORTS_MULTICHANNEL #include "MemoryAccessDenominators.h" @@ -96,6 +97,69 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { +#ifdef MGONGPU_SUPPORTS_MULTICHANNEL + __device__ INLINE unsigned int getChannelId( const unsigned int* allChannelIds +#ifndef MGONGPUCPP_GPUIMPL + , + const int ievt00, + bool sanityCheckMixedPrecision = true +#endif + ) + { + unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr +#ifdef MGONGPUCPP_GPUIMPL + using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page + if( allChannelIds != nullptr ) + { + const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) + const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) + // NB: channelIds_sv is a scalar in CUDA + channelId = channelIds_sv; + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + } +#else // Cuda or C++ + using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + if( allChannelIds != nullptr ) + { + // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) + const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 + uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) +#ifndef MGONGPU_CPPSIMD + // NB: channelIds_sv is a scalar in no-SIMD C++ + channelId = channelIds_sv; +#else + // NB: channelIds_sv is a vector in SIMD C++ + channelId = channelIds_sv[0]; // element[0] + for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] + { + assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId + } +#endif + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + if( sanityCheckMixedPrecision ) + { +#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT + // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) + const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 + uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + for( int i = 0; i < neppV; ++i ) + { + assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector + } +#endif + } + } +#endif // MGONGPUCPP_GPUIMPL + return channelId; + } +#endif // MGONGPU_SUPPORTS_MULTICHANNEL + constexpr int nw6 = CPPProcess::nw6; // dimensions of each wavefunction (HELAS KEK 91-11): e.g. 6 for e+ e- -> mu+ mu- (fermions and vectors) constexpr int npar = CPPProcess::npar; // #particles in total (external = initial + final): e.g. 4 for e+ e- -> mu+ mu- constexpr int ncomb = CPPProcess::ncomb; // #helicity combinations: e.g. 16 for e+ e- -> mu+ mu- (2**4 = fermion spin up/down ** npar) @@ -305,7 +369,7 @@ namespace mg5amcCpu COUPs[ndcoup + iicoup] = allCOUPs[ndcoup + iicoup]; // independent couplings, fixed for all events fptype* MEs = E_ACCESS::ieventAccessRecord( allMEs, ievt0 ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); #endif #endif @@ -315,7 +379,7 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Numerators and denominators for the current event (CUDA) or SIMD event page (C++) - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); #endif @@ -338,8 +402,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1 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] ); + if( channelId != 0 ) + { + numerators_sv[0] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= amp_sv[0]; jamp_sv[2] += amp_sv[0]; @@ -354,8 +421,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 2 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] ); + if( channelId != 0 ) + { + numerators_sv[1] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[5] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -368,8 +438,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 3 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] ); + if( channelId != 0 ) + { + numerators_sv[2] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[2] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -383,8 +456,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 4 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] ); + if( channelId != 0 ) + { + numerators_sv[3] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] -= amp_sv[0]; @@ -396,8 +472,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 5 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] ); + if( channelId != 0 ) + { + numerators_sv[4] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[1] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -410,8 +489,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 6 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] ); + if( channelId != 0 ) + { + numerators_sv[5] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= amp_sv[0]; @@ -424,8 +506,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 7 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] ); + if( channelId != 0 ) + { + numerators_sv[6] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[3] -= amp_sv[0]; @@ -437,8 +522,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 8 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] ); + if( channelId != 0 ) + { + numerators_sv[7] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[3] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[5] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -451,8 +539,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 9 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] ); + if( channelId != 0 ) + { + numerators_sv[8] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[5] -= amp_sv[0]; @@ -464,8 +555,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 10 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] ); + if( channelId != 0 ) + { + numerators_sv[9] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[3] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -478,8 +572,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 11 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] ); + if( channelId != 0 ) + { + numerators_sv[10] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[4] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -492,8 +589,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 12 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] ); + if( channelId != 0 ) + { + numerators_sv[11] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += amp_sv[0]; jamp_sv[2] -= amp_sv[0]; @@ -508,8 +608,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 13 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] ); + if( channelId != 0 ) + { + numerators_sv[12] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] -= amp_sv[0]; @@ -521,8 +624,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 14 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] ); + if( channelId != 0 ) + { + numerators_sv[13] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] -= amp_sv[0]; @@ -534,8 +640,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 15 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] ); + if( channelId != 0 ) + { + numerators_sv[14] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += amp_sv[0]; jamp_sv[1] -= amp_sv[0]; @@ -774,7 +883,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- @@ -1144,9 +1255,6 @@ namespace mg5amcCpu #ifdef MGONGPUCPP_GPUIMPL // Remember: in CUDA this is a kernel for one event, in c++ this processes n events const int ievt = blockDim.x * blockIdx.x + threadIdx.x; // index of event (thread) in grid -#ifdef MGONGPU_SUPPORTS_MULTICHANNEL - using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events -#endif #else //assert( (size_t)(allmomenta) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] //assert( (size_t)(allMEs) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] @@ -1154,7 +1262,6 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL using NUM_ACCESS = HostAccessNumerators; // non-trivial access: buffer includes all events using DEN_ACCESS = HostAccessDenominators; // non-trivial access: buffer includes all events - using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events #endif #endif @@ -1179,11 +1286,12 @@ namespace mg5amcCpu fptype_sv& MEs_sv = E_ACCESS::kernelAccess( MEs ); MEs_sv = fptype_sv{ 0 }; #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - numerators_sv = fptype_sv{ 0 }; + for( int i = 0; i < processConfig::ndiagrams; ++i ) + numerators_sv[i] = fptype_sv{ 0 }; denominators_sv = fptype_sv{ 0 }; #endif } @@ -1196,17 +1304,7 @@ namespace mg5amcCpu // *** START OF PART 1a - CUDA (one event per GPU thread) *** #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) - const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) - // NB: channelIds_sv is a scalar in CUDA - channelId = channelIds_sv; - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) - } + unsigned int channelId = getChannelId( allChannelIds ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (for the single event processed in calculate_wavefunctions) @@ -1321,38 +1419,7 @@ namespace mg5amcCpu const int ievt00 = ipagV2 * neppV; // loop on one SIMD page (neppV events) at a time #endif #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) - const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 - uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) -#ifndef MGONGPU_CPPSIMD - // NB: channelIds_sv is a scalar in no-SIMD C++ - channelId = channelIds_sv; -#else - // NB: channelIds_sv is a vector in SIMD C++ - channelId = channelIds_sv[0]; // element[0] - for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] - { - assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId - } -#endif - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) -#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT - // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) - const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 - uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - for( int i = 0; i < neppV; ++i ) - { - assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector - } -#endif - } + unsigned int channelId = getChannelId( allChannelIds, ievt00 ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (jamp2[nParity][ncolor][neppV] for the SIMD vector - or the two SIMD vectors - of events processed in calculate_wavefunctions) @@ -1525,11 +1592,12 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( allChannelIds != nullptr ) // fix segfault #892 (not 'channelIds[0] != 0') { - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + const unsigned int channelId = getChannelId( allChannelIds, ievt0, false ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - MEs_sv *= numerators_sv / denominators_sv; + MEs_sv *= numerators_sv[channelId - 1] / denominators_sv; } #endif //for( int ieppV = 0; ieppV < neppV; ieppV++ ) diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/CPPProcess.h b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/CPPProcess.h index 2acfa000a7..f052d1a725 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/CPPProcess.h +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/auto_dsig.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/auto_dsig.f index 10496aa04d..b25c70108f 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/auto_dsig.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C 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 7c8695090c..ef24864bf5 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 @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -137,14 +137,14 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDDO QSCALE=QSCALE/2D0 ELSE - QSCALE=DSQRT(Q2FACT(IB(1))) + QSCALE=DSQRT(Q2FACT(1)) ENDIF G1=PDG2PDF(LPP(IB(1)),0, IB(1),XBK(IB(1)), QSCALE) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) IF (DSQRT(Q2FACT(IB(2))).NE.0D0) THEN - QSCALE=DSQRT(Q2FACT(IB(2))) + QSCALE=DSQRT(Q2FACT(2)) ENDIF G2=PDG2PDF(LPP(IB(2)),0, IB(2),XBK(IB(2)), QSCALE) ENDIF @@ -219,7 +219,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -290,6 +290,10 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, INTEGER I_EE C +C STUFF FOR UPC +C + DOUBLE PRECISION PHOTONPDFSQUARE +C C EXTERNAL FUNCTIONS C LOGICAL PASSCUTS @@ -373,12 +377,12 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, IF (ABS(LPP(IB(1))).GE.1) THEN C LP=SIGN(1,LPP(IB(1))) G1(IVEC)=PDG2PDF(LPP(IB(1)),0, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) G2(IVEC)=PDG2PDF(LPP(IB(2)),0, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) ENDIF ENDDO ! IWARP LOOP ENDDO ! CURRWARP LOOP 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 797b19405d..c0a032fb9f 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 @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -323,7 +323,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -366,7 +366,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C INTEGER I,J,M,N COMPLEX*16 ZTEMP, TMP_JAMP(9) - REAL*8 CF(NCOLOR,NCOLOR) + INTEGER CF(NCOLOR*(NCOLOR+1)/2) + INTEGER DENOM, CF_INDEX COMPLEX*16 AMP(NGRAPHS), JAMP(NCOLOR,NAMPSO) COMPLEX*16 W(6,NWAVEFUNCS) C Needed for v4 models @@ -409,33 +410,18 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C C COLOR DATA C - DATA (CF(I, 1),I= 1, 6) /7.111111111111111D+00, - $ -8.888888888888888D-01,-8.888888888888888D-01 - $ ,1.111111111111111D-01,1.111111111111111D-01,1.111111111111111D - $ +00/ + DATA DENOM/9/ + DATA (CF(I),I= 1, 6) /64,-16,-16,2,2,20/ C 1 T(1,2,5,3,4) - DATA (CF(I, 2),I= 1, 6) /-8.888888888888888D-01 - $ ,7.111111111111111D+00,1.111111111111111D-01,1.111111111111111D - $ +00,-8.888888888888888D-01,1.111111111111111D-01/ + DATA (CF(I),I= 7, 11) /64,2,20,-16,2/ C 1 T(1,5,2,3,4) - DATA (CF(I, 3),I= 1, 6) /-8.888888888888888D-01 - $ ,1.111111111111111D-01,7.111111111111111D+00, - $ -8.888888888888888D-01,1.111111111111111D+00,1.111111111111111D - $ -01/ + DATA (CF(I),I= 12, 15) /64,-16,20,2/ C 1 T(2,1,5,3,4) - DATA (CF(I, 4),I= 1, 6) /1.111111111111111D-01 - $ ,1.111111111111111D+00,-8.888888888888888D-01 - $ ,7.111111111111111D+00,1.111111111111111D-01, - $ -8.888888888888888D-01/ + DATA (CF(I),I= 16, 18) /64,2,-16/ C 1 T(2,5,1,3,4) - DATA (CF(I, 5),I= 1, 6) /1.111111111111111D-01, - $ -8.888888888888888D-01,1.111111111111111D+00,1.111111111111111D - $ -01,7.111111111111111D+00,-8.888888888888888D-01/ + DATA (CF(I),I= 19, 20) /64,-16/ C 1 T(5,1,2,3,4) - DATA (CF(I, 6),I= 1, 6) /1.111111111111111D+00 - $ ,1.111111111111111D-01,1.111111111111111D-01, - $ -8.888888888888888D-01,-8.888888888888888D-01 - $ ,7.111111111111111D+00/ + DATA (CF(I),I= 21, 21) /64/ C 1 T(5,2,1,3,4) C ---------- C BEGIN CODE @@ -549,10 +535,12 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) MATRIX1 = 0.D0 DO M = 1, NAMPSO + CF_INDEX = 0 DO I = 1, NCOLOR ZTEMP = (0.D0,0.D0) - DO J = 1, NCOLOR - ZTEMP = ZTEMP + CF(J,I)*JAMP(J,M) + DO J = I, NCOLOR + CF_INDEX = CF_INDEX + 1 + ZTEMP = ZTEMP + CF(CF_INDEX)*JAMP(J,M) ENDDO DO N = 1, NAMPSO @@ -561,6 +549,7 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) ENDDO ENDDO ENDDO + MATRIX1 = MATRIX1/DENOM IF(SDE_STRAT.EQ.1)THEN AMP2(1)=AMP2(1)+AMP(1)*DCONJG(AMP(1)) diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/matrix11.png b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/matrix11.png new file mode 100644 index 0000000000..1d8168c79a Binary files /dev/null and b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/matrix11.png differ diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/matrix12.png b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/matrix12.png new file mode 100644 index 0000000000..b912383fa4 Binary files /dev/null and b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/matrix12.png differ diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/processConfig.h b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/processConfig.h new file mode 100644 index 0000000000..47044dbe6a --- /dev/null +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/processConfig.h @@ -0,0 +1,16 @@ +// Copyright (C) 2025 CERN and UCLouvain. +// Licensed under the GNU Lesser General Public License (version 3 or later). +// Created by: S. Roiser (May 2025) for the MG5aMC CUDACPP plugin. +// Further modified by: ... for the MG5aMC CUDACPP plugin. + + +#ifndef MG5_CONFIG_SIGMA_SM_GG_TTXG_H +#define MG5_CONFIG_SIGMA_SM_GG_TTXG_H 1 + +namespace processConfig { + + constexpr int ndiagrams = 16; + +} + +#endif // MG5_CONFIG_SIGMA_SM_GG_TTXG_H \ No newline at end of file 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 4f8f49270b..4377c78a9e 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 @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -25,6 +25,7 @@ #include "MemoryAccessMatrixElements.h" #include "MemoryAccessMomenta.h" #include "MemoryAccessWavefunctions.h" +#include "processConfig.h" #ifdef MGONGPU_SUPPORTS_MULTICHANNEL #include "MemoryAccessDenominators.h" @@ -99,6 +100,69 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { +#ifdef MGONGPU_SUPPORTS_MULTICHANNEL + __device__ INLINE unsigned int getChannelId( const unsigned int* allChannelIds +#ifndef MGONGPUCPP_GPUIMPL + , + const int ievt00, + bool sanityCheckMixedPrecision = true +#endif + ) + { + unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr +#ifdef MGONGPUCPP_GPUIMPL + using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page + if( allChannelIds != nullptr ) + { + const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) + const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) + // NB: channelIds_sv is a scalar in CUDA + channelId = channelIds_sv; + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + } +#else // Cuda or C++ + using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + if( allChannelIds != nullptr ) + { + // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) + const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 + uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) +#ifndef MGONGPU_CPPSIMD + // NB: channelIds_sv is a scalar in no-SIMD C++ + channelId = channelIds_sv; +#else + // NB: channelIds_sv is a vector in SIMD C++ + channelId = channelIds_sv[0]; // element[0] + for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] + { + assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId + } +#endif + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + if( sanityCheckMixedPrecision ) + { +#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT + // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) + const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 + uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + for( int i = 0; i < neppV; ++i ) + { + assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector + } +#endif + } + } +#endif // MGONGPUCPP_GPUIMPL + return channelId; + } +#endif // MGONGPU_SUPPORTS_MULTICHANNEL + constexpr int nw6 = CPPProcess::nw6; // dimensions of each wavefunction (HELAS KEK 91-11): e.g. 6 for e+ e- -> mu+ mu- (fermions and vectors) constexpr int npar = CPPProcess::npar; // #particles in total (external = initial + final): e.g. 4 for e+ e- -> mu+ mu- constexpr int ncomb = CPPProcess::ncomb; // #helicity combinations: e.g. 16 for e+ e- -> mu+ mu- (2**4 = fermion spin up/down ** npar) @@ -308,7 +372,7 @@ namespace mg5amcCpu COUPs[ndcoup + iicoup] = allCOUPs[ndcoup + iicoup]; // independent couplings, fixed for all events fptype* MEs = E_ACCESS::ieventAccessRecord( allMEs, ievt0 ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); #endif #endif @@ -318,7 +382,7 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Numerators and denominators for the current event (CUDA) or SIMD event page (C++) - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); #endif @@ -341,8 +405,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1 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] ); + if( channelId != 0 ) + { + numerators_sv[0] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= 1. / 2. * amp_sv[0]; jamp_sv[2] += 1. / 6. * amp_sv[0]; @@ -356,8 +423,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 2 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] ); + if( channelId != 0 ) + { + numerators_sv[1] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= 1. / 2. * amp_sv[0]; jamp_sv[1] += 1. / 6. * amp_sv[0]; @@ -370,8 +440,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 3 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] ); + if( channelId != 0 ) + { + numerators_sv[2] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += 1. / 6. * amp_sv[0]; jamp_sv[3] -= 1. / 2. * amp_sv[0]; @@ -384,8 +457,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 4 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] ); + if( channelId != 0 ) + { + numerators_sv[3] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] += 1. / 6. * amp_sv[0]; jamp_sv[3] -= 1. / 2. * amp_sv[0]; @@ -398,8 +474,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 5 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] ); + if( channelId != 0 ) + { + numerators_sv[4] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[3] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -610,7 +689,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- @@ -980,9 +1061,6 @@ namespace mg5amcCpu #ifdef MGONGPUCPP_GPUIMPL // Remember: in CUDA this is a kernel for one event, in c++ this processes n events const int ievt = blockDim.x * blockIdx.x + threadIdx.x; // index of event (thread) in grid -#ifdef MGONGPU_SUPPORTS_MULTICHANNEL - using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events -#endif #else //assert( (size_t)(allmomenta) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] //assert( (size_t)(allMEs) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] @@ -990,7 +1068,6 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL using NUM_ACCESS = HostAccessNumerators; // non-trivial access: buffer includes all events using DEN_ACCESS = HostAccessDenominators; // non-trivial access: buffer includes all events - using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events #endif #endif @@ -1015,11 +1092,12 @@ namespace mg5amcCpu fptype_sv& MEs_sv = E_ACCESS::kernelAccess( MEs ); MEs_sv = fptype_sv{ 0 }; #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - numerators_sv = fptype_sv{ 0 }; + for( int i = 0; i < processConfig::ndiagrams; ++i ) + numerators_sv[i] = fptype_sv{ 0 }; denominators_sv = fptype_sv{ 0 }; #endif } @@ -1032,17 +1110,7 @@ namespace mg5amcCpu // *** START OF PART 1a - CUDA (one event per GPU thread) *** #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) - const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) - // NB: channelIds_sv is a scalar in CUDA - channelId = channelIds_sv; - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) - } + unsigned int channelId = getChannelId( allChannelIds ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (for the single event processed in calculate_wavefunctions) @@ -1157,38 +1225,7 @@ namespace mg5amcCpu const int ievt00 = ipagV2 * neppV; // loop on one SIMD page (neppV events) at a time #endif #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) - const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 - uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) -#ifndef MGONGPU_CPPSIMD - // NB: channelIds_sv is a scalar in no-SIMD C++ - channelId = channelIds_sv; -#else - // NB: channelIds_sv is a vector in SIMD C++ - channelId = channelIds_sv[0]; // element[0] - for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] - { - assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId - } -#endif - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) -#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT - // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) - const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 - uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - for( int i = 0; i < neppV; ++i ) - { - assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector - } -#endif - } + unsigned int channelId = getChannelId( allChannelIds, ievt00 ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (jamp2[nParity][ncolor][neppV] for the SIMD vector - or the two SIMD vectors - of events processed in calculate_wavefunctions) @@ -1361,11 +1398,12 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( allChannelIds != nullptr ) // fix segfault #892 (not 'channelIds[0] != 0') { - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + const unsigned int channelId = getChannelId( allChannelIds, ievt0, false ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - MEs_sv *= numerators_sv / denominators_sv; + MEs_sv *= numerators_sv[channelId - 1] / denominators_sv; } #endif //for( int ieppV = 0; ieppV < neppV; ieppV++ ) diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gu_ttxu/CPPProcess.h b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gu_ttxu/CPPProcess.h index b501a9772e..0db2d57c1d 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gu_ttxu/CPPProcess.h +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gu_ttxu/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gu_ttxu/auto_dsig.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gu_ttxu/auto_dsig.f index b0cc58e89c..04ee9916ca 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gu_ttxu/auto_dsig.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gu_ttxu/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C 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 2b281a8200..2afe71ca6b 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 @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -140,14 +140,14 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDDO QSCALE=QSCALE/2D0 ELSE - QSCALE=DSQRT(Q2FACT(IB(1))) + QSCALE=DSQRT(Q2FACT(1)) ENDIF G1=PDG2PDF(LPP(IB(1)),0, IB(1),XBK(IB(1)), QSCALE) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) IF (DSQRT(Q2FACT(IB(2))).NE.0D0) THEN - QSCALE=DSQRT(Q2FACT(IB(2))) + QSCALE=DSQRT(Q2FACT(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) @@ -234,7 +234,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -309,6 +309,10 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, INTEGER I_EE C +C STUFF FOR UPC +C + DOUBLE PRECISION PHOTONPDFSQUARE +C C EXTERNAL FUNCTIONS C LOGICAL PASSCUTS @@ -393,18 +397,18 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, IF (ABS(LPP(IB(1))).GE.1) THEN C LP=SIGN(1,LPP(IB(1))) G1(IVEC)=PDG2PDF(LPP(IB(1)),0, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) D2(IVEC)=PDG2PDF(LPP(IB(2)),1, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) U2(IVEC)=PDG2PDF(LPP(IB(2)),2, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) S2(IVEC)=PDG2PDF(LPP(IB(2)),3, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) C2(IVEC)=PDG2PDF(LPP(IB(2)),4, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) ENDIF ENDDO ! IWARP LOOP ENDDO ! CURRWARP LOOP diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gu_ttxu/matrix1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gu_ttxu/matrix1.f index 9394a561b8..beb1006203 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gu_ttxu/matrix1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gu_ttxu/matrix1.f @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -326,7 +326,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -372,7 +372,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C INTEGER I,J,M,N COMPLEX*16 ZTEMP, TMP_JAMP(0) - REAL*8 CF(NCOLOR,NCOLOR) + INTEGER CF(NCOLOR*(NCOLOR+1)/2) + INTEGER DENOM, CF_INDEX COMPLEX*16 AMP(NGRAPHS), JAMP(NCOLOR,NAMPSO) COMPLEX*16 W(6,NWAVEFUNCS) C Needed for v4 models @@ -415,21 +416,14 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C C COLOR DATA C - DATA (CF(I, 1),I= 1, 4) /1.200000000000000D+01 - $ ,4.000000000000000D+00,4.000000000000000D+00,0.000000000000000D - $ +00/ + DATA DENOM/1/ + DATA (CF(I),I= 1, 4) /12,8,8,0/ C 1 T(1,3,2) T(5,4) - DATA (CF(I, 2),I= 1, 4) /4.000000000000000D+00 - $ ,1.200000000000000D+01,0.000000000000000D+00,4.000000000000000D - $ +00/ + DATA (CF(I),I= 5, 7) /12,0,8/ C 1 T(1,3,4) T(5,2) - DATA (CF(I, 3),I= 1, 4) /4.000000000000000D+00 - $ ,0.000000000000000D+00,1.200000000000000D+01,4.000000000000000D - $ +00/ + DATA (CF(I),I= 8, 9) /12,8/ C 1 T(1,5,2) T(3,4) - DATA (CF(I, 4),I= 1, 4) /0.000000000000000D+00 - $ ,4.000000000000000D+00,4.000000000000000D+00,1.200000000000000D - $ +01/ + DATA (CF(I),I= 10, 10) /12/ C 1 T(1,5,4) T(3,2) C ---------- C BEGIN CODE @@ -492,10 +486,12 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) MATRIX1 = 0.D0 DO M = 1, NAMPSO + CF_INDEX = 0 DO I = 1, NCOLOR ZTEMP = (0.D0,0.D0) - DO J = 1, NCOLOR - ZTEMP = ZTEMP + CF(J,I)*JAMP(J,M) + DO J = I, NCOLOR + CF_INDEX = CF_INDEX + 1 + ZTEMP = ZTEMP + CF(CF_INDEX)*JAMP(J,M) ENDDO DO N = 1, NAMPSO @@ -504,6 +500,7 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) ENDDO ENDDO ENDDO + MATRIX1 = MATRIX1/DENOM IF(SDE_STRAT.EQ.1)THEN AMP2(1)=AMP2(1)+AMP(1)*DCONJG(AMP(1)) diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gu_ttxu/matrix11.png b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gu_ttxu/matrix11.png new file mode 100644 index 0000000000..46b5244f60 Binary files /dev/null and b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gu_ttxu/matrix11.png differ diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gu_ttxu/processConfig.h b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gu_ttxu/processConfig.h new file mode 100644 index 0000000000..fe66e4e760 --- /dev/null +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gu_ttxu/processConfig.h @@ -0,0 +1,16 @@ +// Copyright (C) 2025 CERN and UCLouvain. +// Licensed under the GNU Lesser General Public License (version 3 or later). +// Created by: S. Roiser (May 2025) for the MG5aMC CUDACPP plugin. +// Further modified by: ... for the MG5aMC CUDACPP plugin. + + +#ifndef MG5_CONFIG_SIGMA_SM_GU_TTXU_H +#define MG5_CONFIG_SIGMA_SM_GU_TTXU_H 1 + +namespace processConfig { + + constexpr int ndiagrams = 5; + +} + +#endif // MG5_CONFIG_SIGMA_SM_GU_TTXU_H \ No newline at end of file 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 e2d65a2667..bb99637e81 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 @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -25,6 +25,7 @@ #include "MemoryAccessMatrixElements.h" #include "MemoryAccessMomenta.h" #include "MemoryAccessWavefunctions.h" +#include "processConfig.h" #ifdef MGONGPU_SUPPORTS_MULTICHANNEL #include "MemoryAccessDenominators.h" @@ -99,6 +100,69 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { +#ifdef MGONGPU_SUPPORTS_MULTICHANNEL + __device__ INLINE unsigned int getChannelId( const unsigned int* allChannelIds +#ifndef MGONGPUCPP_GPUIMPL + , + const int ievt00, + bool sanityCheckMixedPrecision = true +#endif + ) + { + unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr +#ifdef MGONGPUCPP_GPUIMPL + using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page + if( allChannelIds != nullptr ) + { + const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) + const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) + // NB: channelIds_sv is a scalar in CUDA + channelId = channelIds_sv; + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + } +#else // Cuda or C++ + using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + if( allChannelIds != nullptr ) + { + // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) + const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 + uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) +#ifndef MGONGPU_CPPSIMD + // NB: channelIds_sv is a scalar in no-SIMD C++ + channelId = channelIds_sv; +#else + // NB: channelIds_sv is a vector in SIMD C++ + channelId = channelIds_sv[0]; // element[0] + for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] + { + assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId + } +#endif + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + if( sanityCheckMixedPrecision ) + { +#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT + // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) + const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 + uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + for( int i = 0; i < neppV; ++i ) + { + assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector + } +#endif + } + } +#endif // MGONGPUCPP_GPUIMPL + return channelId; + } +#endif // MGONGPU_SUPPORTS_MULTICHANNEL + constexpr int nw6 = CPPProcess::nw6; // dimensions of each wavefunction (HELAS KEK 91-11): e.g. 6 for e+ e- -> mu+ mu- (fermions and vectors) constexpr int npar = CPPProcess::npar; // #particles in total (external = initial + final): e.g. 4 for e+ e- -> mu+ mu- constexpr int ncomb = CPPProcess::ncomb; // #helicity combinations: e.g. 16 for e+ e- -> mu+ mu- (2**4 = fermion spin up/down ** npar) @@ -308,7 +372,7 @@ namespace mg5amcCpu COUPs[ndcoup + iicoup] = allCOUPs[ndcoup + iicoup]; // independent couplings, fixed for all events fptype* MEs = E_ACCESS::ieventAccessRecord( allMEs, ievt0 ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); #endif #endif @@ -318,7 +382,7 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Numerators and denominators for the current event (CUDA) or SIMD event page (C++) - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); #endif @@ -341,8 +405,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1 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] ); + if( channelId != 0 ) + { + numerators_sv[0] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] -= 1. / 6. * amp_sv[0]; jamp_sv[3] += 1. / 2. * amp_sv[0]; @@ -356,8 +423,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 2 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] ); + if( channelId != 0 ) + { + numerators_sv[1] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] -= 1. / 6. * amp_sv[0]; jamp_sv[3] += 1. / 2. * amp_sv[0]; @@ -370,8 +440,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 3 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] ); + if( channelId != 0 ) + { + numerators_sv[2] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 2. * amp_sv[0]; jamp_sv[2] -= 1. / 6. * amp_sv[0]; @@ -384,8 +457,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 4 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] ); + if( channelId != 0 ) + { + numerators_sv[3] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 2. * amp_sv[0]; jamp_sv[1] -= 1. / 6. * amp_sv[0]; @@ -398,8 +474,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 5 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] ); + if( channelId != 0 ) + { + numerators_sv[4] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[3] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -610,7 +689,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- @@ -980,9 +1061,6 @@ namespace mg5amcCpu #ifdef MGONGPUCPP_GPUIMPL // Remember: in CUDA this is a kernel for one event, in c++ this processes n events const int ievt = blockDim.x * blockIdx.x + threadIdx.x; // index of event (thread) in grid -#ifdef MGONGPU_SUPPORTS_MULTICHANNEL - using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events -#endif #else //assert( (size_t)(allmomenta) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] //assert( (size_t)(allMEs) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] @@ -990,7 +1068,6 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL using NUM_ACCESS = HostAccessNumerators; // non-trivial access: buffer includes all events using DEN_ACCESS = HostAccessDenominators; // non-trivial access: buffer includes all events - using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events #endif #endif @@ -1015,11 +1092,12 @@ namespace mg5amcCpu fptype_sv& MEs_sv = E_ACCESS::kernelAccess( MEs ); MEs_sv = fptype_sv{ 0 }; #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - numerators_sv = fptype_sv{ 0 }; + for( int i = 0; i < processConfig::ndiagrams; ++i ) + numerators_sv[i] = fptype_sv{ 0 }; denominators_sv = fptype_sv{ 0 }; #endif } @@ -1032,17 +1110,7 @@ namespace mg5amcCpu // *** START OF PART 1a - CUDA (one event per GPU thread) *** #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) - const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) - // NB: channelIds_sv is a scalar in CUDA - channelId = channelIds_sv; - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) - } + unsigned int channelId = getChannelId( allChannelIds ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (for the single event processed in calculate_wavefunctions) @@ -1157,38 +1225,7 @@ namespace mg5amcCpu const int ievt00 = ipagV2 * neppV; // loop on one SIMD page (neppV events) at a time #endif #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) - const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 - uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) -#ifndef MGONGPU_CPPSIMD - // NB: channelIds_sv is a scalar in no-SIMD C++ - channelId = channelIds_sv; -#else - // NB: channelIds_sv is a vector in SIMD C++ - channelId = channelIds_sv[0]; // element[0] - for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] - { - assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId - } -#endif - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) -#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT - // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) - const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 - uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - for( int i = 0; i < neppV; ++i ) - { - assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector - } -#endif - } + unsigned int channelId = getChannelId( allChannelIds, ievt00 ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (jamp2[nParity][ncolor][neppV] for the SIMD vector - or the two SIMD vectors - of events processed in calculate_wavefunctions) @@ -1361,11 +1398,12 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( allChannelIds != nullptr ) // fix segfault #892 (not 'channelIds[0] != 0') { - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + const unsigned int channelId = getChannelId( allChannelIds, ievt0, false ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - MEs_sv *= numerators_sv / denominators_sv; + MEs_sv *= numerators_sv[channelId - 1] / denominators_sv; } #endif //for( int ieppV = 0; ieppV < neppV; ieppV++ ) diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gux_ttxux/CPPProcess.h b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gux_ttxux/CPPProcess.h index d658e0394e..d18eb18110 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gux_ttxux/CPPProcess.h +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gux_ttxux/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gux_ttxux/auto_dsig.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gux_ttxux/auto_dsig.f index e36675626f..7c2b7d44c2 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gux_ttxux/auto_dsig.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gux_ttxux/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C 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 61bb13c3e7..b869d6cc8f 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 @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -140,14 +140,14 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDDO QSCALE=QSCALE/2D0 ELSE - QSCALE=DSQRT(Q2FACT(IB(1))) + QSCALE=DSQRT(Q2FACT(1)) ENDIF G1=PDG2PDF(LPP(IB(1)),0, IB(1),XBK(IB(1)), QSCALE) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) IF (DSQRT(Q2FACT(IB(2))).NE.0D0) THEN - QSCALE=DSQRT(Q2FACT(IB(2))) + QSCALE=DSQRT(Q2FACT(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) @@ -234,7 +234,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -309,6 +309,10 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, INTEGER I_EE C +C STUFF FOR UPC +C + DOUBLE PRECISION PHOTONPDFSQUARE +C C EXTERNAL FUNCTIONS C LOGICAL PASSCUTS @@ -393,18 +397,18 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, IF (ABS(LPP(IB(1))).GE.1) THEN C LP=SIGN(1,LPP(IB(1))) G1(IVEC)=PDG2PDF(LPP(IB(1)),0, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) CX2(IVEC)=PDG2PDF(LPP(IB(2)),-4, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) SX2(IVEC)=PDG2PDF(LPP(IB(2)),-3, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) UX2(IVEC)=PDG2PDF(LPP(IB(2)),-2, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) DX2(IVEC)=PDG2PDF(LPP(IB(2)),-1, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) ENDIF ENDDO ! IWARP LOOP ENDDO ! CURRWARP LOOP diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gux_ttxux/matrix1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gux_ttxux/matrix1.f index c7fdad381b..ff1fa6c22a 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gux_ttxux/matrix1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gux_ttxux/matrix1.f @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -326,7 +326,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -372,7 +372,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C INTEGER I,J,M,N COMPLEX*16 ZTEMP, TMP_JAMP(0) - REAL*8 CF(NCOLOR,NCOLOR) + INTEGER CF(NCOLOR*(NCOLOR+1)/2) + INTEGER DENOM, CF_INDEX COMPLEX*16 AMP(NGRAPHS), JAMP(NCOLOR,NAMPSO) COMPLEX*16 W(6,NWAVEFUNCS) C Needed for v4 models @@ -415,21 +416,14 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C C COLOR DATA C - DATA (CF(I, 1),I= 1, 4) /1.200000000000000D+01 - $ ,4.000000000000000D+00,4.000000000000000D+00,0.000000000000000D - $ +00/ + DATA DENOM/1/ + DATA (CF(I),I= 1, 4) /12,8,8,0/ C 1 T(1,2,4) T(3,5) - DATA (CF(I, 2),I= 1, 4) /4.000000000000000D+00 - $ ,1.200000000000000D+01,0.000000000000000D+00,4.000000000000000D - $ +00/ + DATA (CF(I),I= 5, 7) /12,0,8/ C 1 T(1,2,5) T(3,4) - DATA (CF(I, 3),I= 1, 4) /4.000000000000000D+00 - $ ,0.000000000000000D+00,1.200000000000000D+01,4.000000000000000D - $ +00/ + DATA (CF(I),I= 8, 9) /12,8/ C 1 T(1,3,4) T(2,5) - DATA (CF(I, 4),I= 1, 4) /0.000000000000000D+00 - $ ,4.000000000000000D+00,4.000000000000000D+00,1.200000000000000D - $ +01/ + DATA (CF(I),I= 10, 10) /12/ C 1 T(1,3,5) T(2,4) C ---------- C BEGIN CODE @@ -492,10 +486,12 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) MATRIX1 = 0.D0 DO M = 1, NAMPSO + CF_INDEX = 0 DO I = 1, NCOLOR ZTEMP = (0.D0,0.D0) - DO J = 1, NCOLOR - ZTEMP = ZTEMP + CF(J,I)*JAMP(J,M) + DO J = I, NCOLOR + CF_INDEX = CF_INDEX + 1 + ZTEMP = ZTEMP + CF(CF_INDEX)*JAMP(J,M) ENDDO DO N = 1, NAMPSO @@ -504,6 +500,7 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) ENDDO ENDDO ENDDO + MATRIX1 = MATRIX1/DENOM IF(SDE_STRAT.EQ.1)THEN AMP2(1)=AMP2(1)+AMP(1)*DCONJG(AMP(1)) diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gux_ttxux/matrix11.png b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gux_ttxux/matrix11.png new file mode 100644 index 0000000000..20f88674c1 Binary files /dev/null and b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gux_ttxux/matrix11.png differ diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gux_ttxux/processConfig.h b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gux_ttxux/processConfig.h new file mode 100644 index 0000000000..89823b9d1d --- /dev/null +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gux_ttxux/processConfig.h @@ -0,0 +1,16 @@ +// Copyright (C) 2025 CERN and UCLouvain. +// Licensed under the GNU Lesser General Public License (version 3 or later). +// Created by: S. Roiser (May 2025) for the MG5aMC CUDACPP plugin. +// Further modified by: ... for the MG5aMC CUDACPP plugin. + + +#ifndef MG5_CONFIG_SIGMA_SM_GUX_TTXUX_H +#define MG5_CONFIG_SIGMA_SM_GUX_TTXUX_H 1 + +namespace processConfig { + + constexpr int ndiagrams = 5; + +} + +#endif // MG5_CONFIG_SIGMA_SM_GUX_TTXUX_H \ No newline at end of file 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 4f41927bc9..0dc7137ad7 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 @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -25,6 +25,7 @@ #include "MemoryAccessMatrixElements.h" #include "MemoryAccessMomenta.h" #include "MemoryAccessWavefunctions.h" +#include "processConfig.h" #ifdef MGONGPU_SUPPORTS_MULTICHANNEL #include "MemoryAccessDenominators.h" @@ -99,6 +100,69 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { +#ifdef MGONGPU_SUPPORTS_MULTICHANNEL + __device__ INLINE unsigned int getChannelId( const unsigned int* allChannelIds +#ifndef MGONGPUCPP_GPUIMPL + , + const int ievt00, + bool sanityCheckMixedPrecision = true +#endif + ) + { + unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr +#ifdef MGONGPUCPP_GPUIMPL + using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page + if( allChannelIds != nullptr ) + { + const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) + const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) + // NB: channelIds_sv is a scalar in CUDA + channelId = channelIds_sv; + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + } +#else // Cuda or C++ + using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + if( allChannelIds != nullptr ) + { + // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) + const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 + uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) +#ifndef MGONGPU_CPPSIMD + // NB: channelIds_sv is a scalar in no-SIMD C++ + channelId = channelIds_sv; +#else + // NB: channelIds_sv is a vector in SIMD C++ + channelId = channelIds_sv[0]; // element[0] + for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] + { + assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId + } +#endif + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + if( sanityCheckMixedPrecision ) + { +#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT + // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) + const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 + uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + for( int i = 0; i < neppV; ++i ) + { + assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector + } +#endif + } + } +#endif // MGONGPUCPP_GPUIMPL + return channelId; + } +#endif // MGONGPU_SUPPORTS_MULTICHANNEL + constexpr int nw6 = CPPProcess::nw6; // dimensions of each wavefunction (HELAS KEK 91-11): e.g. 6 for e+ e- -> mu+ mu- (fermions and vectors) constexpr int npar = CPPProcess::npar; // #particles in total (external = initial + final): e.g. 4 for e+ e- -> mu+ mu- constexpr int ncomb = CPPProcess::ncomb; // #helicity combinations: e.g. 16 for e+ e- -> mu+ mu- (2**4 = fermion spin up/down ** npar) @@ -308,7 +372,7 @@ namespace mg5amcCpu COUPs[ndcoup + iicoup] = allCOUPs[ndcoup + iicoup]; // independent couplings, fixed for all events fptype* MEs = E_ACCESS::ieventAccessRecord( allMEs, ievt0 ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); #endif #endif @@ -318,7 +382,7 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Numerators and denominators for the current event (CUDA) or SIMD event page (C++) - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); #endif @@ -341,8 +405,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1 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] ); + if( channelId != 0 ) + { + numerators_sv[0] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] -= 1. / 2. * amp_sv[0]; jamp_sv[3] += 1. / 6. * amp_sv[0]; @@ -356,8 +423,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 2 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] ); + if( channelId != 0 ) + { + numerators_sv[1] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 6. * amp_sv[0]; jamp_sv[1] -= 1. / 2. * amp_sv[0]; @@ -370,8 +440,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 3 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] ); + if( channelId != 0 ) + { + numerators_sv[2] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 6. * amp_sv[0]; jamp_sv[2] -= 1. / 2. * amp_sv[0]; @@ -384,8 +457,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 4 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] ); + if( channelId != 0 ) + { + numerators_sv[3] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] -= 1. / 2. * amp_sv[0]; jamp_sv[3] += 1. / 6. * amp_sv[0]; @@ -398,8 +474,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 5 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] ); + if( channelId != 0 ) + { + numerators_sv[4] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[2] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -610,7 +689,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- @@ -980,9 +1061,6 @@ namespace mg5amcCpu #ifdef MGONGPUCPP_GPUIMPL // Remember: in CUDA this is a kernel for one event, in c++ this processes n events const int ievt = blockDim.x * blockIdx.x + threadIdx.x; // index of event (thread) in grid -#ifdef MGONGPU_SUPPORTS_MULTICHANNEL - using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events -#endif #else //assert( (size_t)(allmomenta) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] //assert( (size_t)(allMEs) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] @@ -990,7 +1068,6 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL using NUM_ACCESS = HostAccessNumerators; // non-trivial access: buffer includes all events using DEN_ACCESS = HostAccessDenominators; // non-trivial access: buffer includes all events - using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events #endif #endif @@ -1015,11 +1092,12 @@ namespace mg5amcCpu fptype_sv& MEs_sv = E_ACCESS::kernelAccess( MEs ); MEs_sv = fptype_sv{ 0 }; #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - numerators_sv = fptype_sv{ 0 }; + for( int i = 0; i < processConfig::ndiagrams; ++i ) + numerators_sv[i] = fptype_sv{ 0 }; denominators_sv = fptype_sv{ 0 }; #endif } @@ -1032,17 +1110,7 @@ namespace mg5amcCpu // *** START OF PART 1a - CUDA (one event per GPU thread) *** #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) - const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) - // NB: channelIds_sv is a scalar in CUDA - channelId = channelIds_sv; - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) - } + unsigned int channelId = getChannelId( allChannelIds ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (for the single event processed in calculate_wavefunctions) @@ -1157,38 +1225,7 @@ namespace mg5amcCpu const int ievt00 = ipagV2 * neppV; // loop on one SIMD page (neppV events) at a time #endif #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) - const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 - uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) -#ifndef MGONGPU_CPPSIMD - // NB: channelIds_sv is a scalar in no-SIMD C++ - channelId = channelIds_sv; -#else - // NB: channelIds_sv is a vector in SIMD C++ - channelId = channelIds_sv[0]; // element[0] - for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] - { - assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId - } -#endif - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) -#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT - // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) - const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 - uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - for( int i = 0; i < neppV; ++i ) - { - assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector - } -#endif - } + unsigned int channelId = getChannelId( allChannelIds, ievt00 ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (jamp2[nParity][ncolor][neppV] for the SIMD vector - or the two SIMD vectors - of events processed in calculate_wavefunctions) @@ -1361,11 +1398,12 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( allChannelIds != nullptr ) // fix segfault #892 (not 'channelIds[0] != 0') { - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + const unsigned int channelId = getChannelId( allChannelIds, ievt0, false ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - MEs_sv *= numerators_sv / denominators_sv; + MEs_sv *= numerators_sv[channelId - 1] / denominators_sv; } #endif //for( int ieppV = 0; ieppV < neppV; ieppV++ ) diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_uux_ttxg/CPPProcess.h b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_uux_ttxg/CPPProcess.h index ebf14aca9e..a3116a04e7 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_uux_ttxg/CPPProcess.h +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_uux_ttxg/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_uux_ttxg/auto_dsig.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_uux_ttxg/auto_dsig.f index d46dad4fcb..b83f3f262d 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_uux_ttxg/auto_dsig.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_uux_ttxg/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C 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 d8e94d91bb..98820b5316 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 @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -140,7 +140,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDDO QSCALE=QSCALE/2D0 ELSE - QSCALE=DSQRT(Q2FACT(IB(1))) + QSCALE=DSQRT(Q2FACT(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) @@ -150,7 +150,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) IF (DSQRT(Q2FACT(IB(2))).NE.0D0) THEN - QSCALE=DSQRT(Q2FACT(IB(2))) + QSCALE=DSQRT(Q2FACT(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) @@ -237,7 +237,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -313,6 +313,10 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, INTEGER I_EE C +C STUFF FOR UPC +C + DOUBLE PRECISION PHOTONPDFSQUARE +C C EXTERNAL FUNCTIONS C LOGICAL PASSCUTS @@ -398,24 +402,24 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, IF (ABS(LPP(IB(1))).GE.1) THEN C LP=SIGN(1,LPP(IB(1))) D1(IVEC)=PDG2PDF(LPP(IB(1)),1, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) U1(IVEC)=PDG2PDF(LPP(IB(1)),2, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) S1(IVEC)=PDG2PDF(LPP(IB(1)),3, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) C1(IVEC)=PDG2PDF(LPP(IB(1)),4, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) CX2(IVEC)=PDG2PDF(LPP(IB(2)),-4, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) SX2(IVEC)=PDG2PDF(LPP(IB(2)),-3, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) UX2(IVEC)=PDG2PDF(LPP(IB(2)),-2, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) DX2(IVEC)=PDG2PDF(LPP(IB(2)),-1, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) ENDIF ENDDO ! IWARP LOOP ENDDO ! CURRWARP LOOP diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_uux_ttxg/matrix1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_uux_ttxg/matrix1.f index 787dae76b2..2011afe930 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_uux_ttxg/matrix1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_uux_ttxg/matrix1.f @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -326,7 +326,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -372,7 +372,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C INTEGER I,J,M,N COMPLEX*16 ZTEMP, TMP_JAMP(0) - REAL*8 CF(NCOLOR,NCOLOR) + INTEGER CF(NCOLOR*(NCOLOR+1)/2) + INTEGER DENOM, CF_INDEX COMPLEX*16 AMP(NGRAPHS), JAMP(NCOLOR,NAMPSO) COMPLEX*16 W(6,NWAVEFUNCS) C Needed for v4 models @@ -415,21 +416,14 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C C COLOR DATA C - DATA (CF(I, 1),I= 1, 4) /1.200000000000000D+01 - $ ,4.000000000000000D+00,4.000000000000000D+00,0.000000000000000D - $ +00/ + DATA DENOM/1/ + DATA (CF(I),I= 1, 4) /12,8,8,0/ C 1 T(2,1) T(5,3,4) - DATA (CF(I, 2),I= 1, 4) /4.000000000000000D+00 - $ ,1.200000000000000D+01,0.000000000000000D+00,4.000000000000000D - $ +00/ + DATA (CF(I),I= 5, 7) /12,0,8/ C 1 T(2,4) T(5,3,1) - DATA (CF(I, 3),I= 1, 4) /4.000000000000000D+00 - $ ,0.000000000000000D+00,1.200000000000000D+01,4.000000000000000D - $ +00/ + DATA (CF(I),I= 8, 9) /12,8/ C 1 T(3,1) T(5,2,4) - DATA (CF(I, 4),I= 1, 4) /0.000000000000000D+00 - $ ,4.000000000000000D+00,4.000000000000000D+00,1.200000000000000D - $ +01/ + DATA (CF(I),I= 10, 10) /12/ C 1 T(3,4) T(5,2,1) C ---------- C BEGIN CODE @@ -492,10 +486,12 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) MATRIX1 = 0.D0 DO M = 1, NAMPSO + CF_INDEX = 0 DO I = 1, NCOLOR ZTEMP = (0.D0,0.D0) - DO J = 1, NCOLOR - ZTEMP = ZTEMP + CF(J,I)*JAMP(J,M) + DO J = I, NCOLOR + CF_INDEX = CF_INDEX + 1 + ZTEMP = ZTEMP + CF(CF_INDEX)*JAMP(J,M) ENDDO DO N = 1, NAMPSO @@ -504,6 +500,7 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) ENDDO ENDDO ENDDO + MATRIX1 = MATRIX1/DENOM IF(SDE_STRAT.EQ.1)THEN AMP2(1)=AMP2(1)+AMP(1)*DCONJG(AMP(1)) diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_uux_ttxg/matrix11.png b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_uux_ttxg/matrix11.png new file mode 100644 index 0000000000..62bceaf1b9 Binary files /dev/null and b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_uux_ttxg/matrix11.png differ diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_uux_ttxg/processConfig.h b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_uux_ttxg/processConfig.h new file mode 100644 index 0000000000..8754e13596 --- /dev/null +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_uux_ttxg/processConfig.h @@ -0,0 +1,16 @@ +// Copyright (C) 2025 CERN and UCLouvain. +// Licensed under the GNU Lesser General Public License (version 3 or later). +// Created by: S. Roiser (May 2025) for the MG5aMC CUDACPP plugin. +// Further modified by: ... for the MG5aMC CUDACPP plugin. + + +#ifndef MG5_CONFIG_SIGMA_SM_UUX_TTXG_H +#define MG5_CONFIG_SIGMA_SM_UUX_TTXG_H 1 + +namespace processConfig { + + constexpr int ndiagrams = 5; + +} + +#endif // MG5_CONFIG_SIGMA_SM_UUX_TTXG_H \ No newline at end of file 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 da962495fd..aad3612e5a 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 @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -25,6 +25,7 @@ #include "MemoryAccessMatrixElements.h" #include "MemoryAccessMomenta.h" #include "MemoryAccessWavefunctions.h" +#include "processConfig.h" #ifdef MGONGPU_SUPPORTS_MULTICHANNEL #include "MemoryAccessDenominators.h" @@ -96,6 +97,69 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { +#ifdef MGONGPU_SUPPORTS_MULTICHANNEL + __device__ INLINE unsigned int getChannelId( const unsigned int* allChannelIds +#ifndef MGONGPUCPP_GPUIMPL + , + const int ievt00, + bool sanityCheckMixedPrecision = true +#endif + ) + { + unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr +#ifdef MGONGPUCPP_GPUIMPL + using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page + if( allChannelIds != nullptr ) + { + const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) + const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) + // NB: channelIds_sv is a scalar in CUDA + channelId = channelIds_sv; + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + } +#else // Cuda or C++ + using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + if( allChannelIds != nullptr ) + { + // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) + const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 + uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) +#ifndef MGONGPU_CPPSIMD + // NB: channelIds_sv is a scalar in no-SIMD C++ + channelId = channelIds_sv; +#else + // NB: channelIds_sv is a vector in SIMD C++ + channelId = channelIds_sv[0]; // element[0] + for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] + { + assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId + } +#endif + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + if( sanityCheckMixedPrecision ) + { +#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT + // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) + const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 + uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + for( int i = 0; i < neppV; ++i ) + { + assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector + } +#endif + } + } +#endif // MGONGPUCPP_GPUIMPL + return channelId; + } +#endif // MGONGPU_SUPPORTS_MULTICHANNEL + constexpr int nw6 = CPPProcess::nw6; // dimensions of each wavefunction (HELAS KEK 91-11): e.g. 6 for e+ e- -> mu+ mu- (fermions and vectors) constexpr int npar = CPPProcess::npar; // #particles in total (external = initial + final): e.g. 4 for e+ e- -> mu+ mu- constexpr int ncomb = CPPProcess::ncomb; // #helicity combinations: e.g. 16 for e+ e- -> mu+ mu- (2**4 = fermion spin up/down ** npar) @@ -305,7 +369,7 @@ namespace mg5amcCpu COUPs[ndcoup + iicoup] = allCOUPs[ndcoup + iicoup]; // independent couplings, fixed for all events fptype* MEs = E_ACCESS::ieventAccessRecord( allMEs, ievt0 ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); #endif #endif @@ -315,7 +379,7 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Numerators and denominators for the current event (CUDA) or SIMD event page (C++) - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); #endif @@ -374,8 +438,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 2 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] ); + if( channelId != 0 ) + { + numerators_sv[1] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[6] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -394,8 +461,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 3 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] ); + if( channelId != 0 ) + { + numerators_sv[2] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[7] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -414,8 +484,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 4 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] ); + if( channelId != 0 ) + { + numerators_sv[3] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[1] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -435,8 +508,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 5 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] ); + if( channelId != 0 ) + { + numerators_sv[4] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[16] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[17] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -449,8 +525,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 6 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] ); + if( channelId != 0 ) + { + numerators_sv[5] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[12] += amp_sv[0]; jamp_sv[14] -= amp_sv[0]; @@ -465,8 +544,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 7 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] ); + if( channelId != 0 ) + { + numerators_sv[6] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[12] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[14] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -479,8 +561,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 8 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] ); + if( channelId != 0 ) + { + numerators_sv[7] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[22] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[23] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -493,8 +578,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 9 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] ); + if( channelId != 0 ) + { + numerators_sv[8] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[18] += amp_sv[0]; jamp_sv[20] -= amp_sv[0]; @@ -509,8 +597,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 10 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] ); + if( channelId != 0 ) + { + numerators_sv[9] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[18] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[20] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -523,8 +614,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 11 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] ); + if( channelId != 0 ) + { + numerators_sv[10] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[7] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -537,8 +631,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 12 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] ); + if( channelId != 0 ) + { + numerators_sv[11] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += amp_sv[0]; jamp_sv[7] -= amp_sv[0]; @@ -553,8 +650,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 13 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] ); + if( channelId != 0 ) + { + numerators_sv[12] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[6] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -567,8 +667,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 14 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] ); + if( channelId != 0 ) + { + numerators_sv[13] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += amp_sv[0]; jamp_sv[6] -= amp_sv[0]; @@ -583,8 +686,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 15 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] ); + if( channelId != 0 ) + { + numerators_sv[14] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += amp_sv[0]; jamp_sv[1] -= amp_sv[0]; @@ -599,8 +705,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 16 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] ); + if( channelId != 0 ) + { + numerators_sv[15] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[16] += amp_sv[0]; jamp_sv[17] -= amp_sv[0]; @@ -617,8 +726,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 17 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] ); + if( channelId != 0 ) + { + numerators_sv[16] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[3] -= amp_sv[0]; @@ -630,8 +742,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 18 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] ); + if( channelId != 0 ) + { + numerators_sv[17] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[5] -= amp_sv[0]; @@ -643,8 +758,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 19 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] ); + if( channelId != 0 ) + { + numerators_sv[18] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[3] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[5] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -658,8 +776,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 20 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] ); + if( channelId != 0 ) + { + numerators_sv[19] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += amp_sv[0]; jamp_sv[2] -= amp_sv[0]; @@ -674,8 +795,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 21 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] ); + if( channelId != 0 ) + { + numerators_sv[20] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[5] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -688,8 +812,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 22 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] ); + if( channelId != 0 ) + { + numerators_sv[21] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[2] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -702,8 +829,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 23 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] ); + if( channelId != 0 ) + { + numerators_sv[22] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += amp_sv[0]; jamp_sv[2] -= amp_sv[0]; @@ -718,8 +848,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 24 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] ); + if( channelId != 0 ) + { + numerators_sv[23] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[3] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -732,8 +865,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 25 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] ); + if( channelId != 0 ) + { + numerators_sv[24] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[4] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -746,8 +882,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 26 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] ); + if( channelId != 0 ) + { + numerators_sv[25] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] -= amp_sv[0]; @@ -759,8 +898,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 27 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] ); + if( channelId != 0 ) + { + numerators_sv[26] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] -= amp_sv[0]; @@ -772,8 +914,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 28 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] ); + if( channelId != 0 ) + { + numerators_sv[27] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= amp_sv[0]; @@ -785,8 +930,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 29 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] ); + if( channelId != 0 ) + { + numerators_sv[28] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] -= amp_sv[0]; @@ -798,8 +946,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 30 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] ); + if( channelId != 0 ) + { + numerators_sv[29] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[1] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -812,8 +963,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 31 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] ); + if( channelId != 0 ) + { + numerators_sv[30] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += amp_sv[0]; jamp_sv[1] -= amp_sv[0]; @@ -854,8 +1008,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 33 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] ); + if( channelId != 0 ) + { + numerators_sv[32] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[11] -= amp_sv[0]; @@ -867,8 +1024,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 34 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] ); + if( channelId != 0 ) + { + numerators_sv[33] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[9] -= amp_sv[0]; @@ -880,8 +1040,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 35 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] ); + if( channelId != 0 ) + { + numerators_sv[34] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[9] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[11] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -894,8 +1057,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 36 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] ); + if( channelId != 0 ) + { + numerators_sv[35] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[9] += amp_sv[0]; jamp_sv[15] -= amp_sv[0]; @@ -910,8 +1076,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 37 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] ); + if( channelId != 0 ) + { + numerators_sv[36] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[9] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[15] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -924,8 +1093,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 38 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] ); + if( channelId != 0 ) + { + numerators_sv[37] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[21] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[23] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -938,8 +1110,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 39 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] ); + if( channelId != 0 ) + { + numerators_sv[38] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[11] += amp_sv[0]; jamp_sv[15] -= amp_sv[0]; @@ -954,8 +1129,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 40 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] ); + if( channelId != 0 ) + { + numerators_sv[39] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[11] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[21] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -968,8 +1146,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 41 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] ); + if( channelId != 0 ) + { + numerators_sv[40] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[15] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[17] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -982,8 +1163,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 42 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] ); + if( channelId != 0 ) + { + numerators_sv[41] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[17] -= amp_sv[0]; @@ -995,8 +1179,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 43 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] ); + if( channelId != 0 ) + { + numerators_sv[42] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[15] -= amp_sv[0]; @@ -1008,8 +1195,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 44 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] ); + if( channelId != 0 ) + { + numerators_sv[43] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[23] -= amp_sv[0]; @@ -1021,8 +1211,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 45 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] ); + if( channelId != 0 ) + { + numerators_sv[44] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[21] -= amp_sv[0]; @@ -1034,8 +1227,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 46 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] ); + if( channelId != 0 ) + { + numerators_sv[45] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[17] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[23] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1048,8 +1244,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 47 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] ); + if( channelId != 0 ) + { + numerators_sv[46] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[9] += amp_sv[0]; jamp_sv[11] -= amp_sv[0]; @@ -1087,8 +1286,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 49 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] ); + if( channelId != 0 ) + { + numerators_sv[48] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[10] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[11] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1101,8 +1303,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 50 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] ); + if( channelId != 0 ) + { + numerators_sv[49] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[6] += amp_sv[0]; jamp_sv[8] -= amp_sv[0]; @@ -1117,8 +1322,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 51 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] ); + if( channelId != 0 ) + { + numerators_sv[50] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[6] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[8] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1131,8 +1339,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 52 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] ); + if( channelId != 0 ) + { + numerators_sv[51] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[3] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[13] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1145,8 +1356,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 53 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] ); + if( channelId != 0 ) + { + numerators_sv[52] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[3] += amp_sv[0]; jamp_sv[13] -= amp_sv[0]; @@ -1161,8 +1375,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 54 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] ); + if( channelId != 0 ) + { + numerators_sv[53] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[19] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[22] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1175,8 +1392,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 55 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] ); + if( channelId != 0 ) + { + numerators_sv[54] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] += amp_sv[0]; jamp_sv[3] -= amp_sv[0]; @@ -1191,8 +1411,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 56 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] ); + if( channelId != 0 ) + { + numerators_sv[55] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[10] += amp_sv[0]; jamp_sv[11] -= amp_sv[0]; @@ -1207,8 +1430,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 57 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] ); + if( channelId != 0 ) + { + numerators_sv[56] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[3] += cxtype( 0, 1 ) * amp_sv[0]; @@ -1261,8 +1487,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 59 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] ); + if( channelId != 0 ) + { + numerators_sv[58] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[6] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1281,8 +1510,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 60 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] ); + if( channelId != 0 ) + { + numerators_sv[59] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[3] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[6] += cxtype( 0, 1 ) * amp_sv[0]; @@ -1301,8 +1533,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 61 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] ); + if( channelId != 0 ) + { + numerators_sv[60] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[19] += amp_sv[0]; jamp_sv[20] -= amp_sv[0]; @@ -1317,8 +1552,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 62 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] ); + if( channelId != 0 ) + { + numerators_sv[61] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[20] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[21] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1331,8 +1569,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 63 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] ); + if( channelId != 0 ) + { + numerators_sv[62] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] += amp_sv[0]; jamp_sv[6] -= amp_sv[0]; @@ -1347,8 +1588,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 64 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] ); + if( channelId != 0 ) + { + numerators_sv[63] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[12] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1362,8 +1606,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 65 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] ); + if( channelId != 0 ) + { + numerators_sv[64] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[8] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[9] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1376,8 +1623,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 66 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] ); + if( channelId != 0 ) + { + numerators_sv[65] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[7] += amp_sv[0]; jamp_sv[8] -= amp_sv[0]; @@ -1392,8 +1642,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 67 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] ); + if( channelId != 0 ) + { + numerators_sv[66] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[7] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[10] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1406,8 +1659,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 68 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] ); + if( channelId != 0 ) + { + numerators_sv[67] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[5] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[19] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1420,8 +1676,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 69 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] ); + if( channelId != 0 ) + { + numerators_sv[68] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[5] += amp_sv[0]; jamp_sv[13] -= amp_sv[0]; @@ -1436,8 +1695,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 70 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] ); + if( channelId != 0 ) + { + numerators_sv[69] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[13] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[16] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1450,8 +1712,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 71 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] ); + if( channelId != 0 ) + { + numerators_sv[70] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] += amp_sv[0]; jamp_sv[5] -= amp_sv[0]; @@ -1466,8 +1731,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 72 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] ); + if( channelId != 0 ) + { + numerators_sv[71] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[8] += amp_sv[0]; jamp_sv[9] -= amp_sv[0]; @@ -1482,8 +1750,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 73 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] ); + if( channelId != 0 ) + { + numerators_sv[72] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[5] += cxtype( 0, 1 ) * amp_sv[0]; @@ -1536,8 +1807,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 75 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] ); + if( channelId != 0 ) + { + numerators_sv[74] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[7] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1556,8 +1830,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 76 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] ); + if( channelId != 0 ) + { + numerators_sv[75] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[5] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[7] += cxtype( 0, 1 ) * amp_sv[0]; @@ -1576,8 +1853,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 77 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] ); + if( channelId != 0 ) + { + numerators_sv[76] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[13] += amp_sv[0]; jamp_sv[14] -= amp_sv[0]; @@ -1592,8 +1872,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 78 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] ); + if( channelId != 0 ) + { + numerators_sv[77] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[14] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[15] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1606,8 +1889,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 79 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] ); + if( channelId != 0 ) + { + numerators_sv[78] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] += amp_sv[0]; jamp_sv[7] -= amp_sv[0]; @@ -1622,8 +1908,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 80 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] ); + if( channelId != 0 ) + { + numerators_sv[79] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[18] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1636,8 +1925,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 81 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] ); + if( channelId != 0 ) + { + numerators_sv[80] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[7] -= amp_sv[0]; @@ -1649,8 +1941,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 82 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] ); + if( channelId != 0 ) + { + numerators_sv[81] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[10] -= amp_sv[0]; @@ -1662,8 +1957,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 83 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] ); + if( channelId != 0 ) + { + numerators_sv[82] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[6] -= amp_sv[0]; @@ -1675,8 +1973,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 84 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] ); + if( channelId != 0 ) + { + numerators_sv[83] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[8] -= amp_sv[0]; @@ -1688,8 +1989,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 85 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] ); + if( channelId != 0 ) + { + numerators_sv[84] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[6] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[7] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1702,8 +2006,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 86 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] ); + if( channelId != 0 ) + { + numerators_sv[85] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[6] += amp_sv[0]; jamp_sv[7] -= amp_sv[0]; @@ -1718,8 +2025,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 87 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] ); + if( channelId != 0 ) + { + numerators_sv[86] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[16] -= amp_sv[0]; @@ -1731,8 +2041,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 88 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] ); + if( channelId != 0 ) + { + numerators_sv[87] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[13] -= amp_sv[0]; @@ -1744,8 +2057,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 89 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] ); + if( channelId != 0 ) + { + numerators_sv[88] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[22] -= amp_sv[0]; @@ -1757,8 +2073,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 90 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] ); + if( channelId != 0 ) + { + numerators_sv[89] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[19] -= amp_sv[0]; @@ -1770,8 +2089,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 91 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] ); + if( channelId != 0 ) + { + numerators_sv[90] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[16] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[22] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1784,8 +2106,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 92 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] ); + if( channelId != 0 ) + { + numerators_sv[91] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[3] += amp_sv[0]; jamp_sv[5] -= amp_sv[0]; @@ -1834,8 +2159,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 94 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] ); + if( channelId != 0 ) + { + numerators_sv[93] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[2] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1854,8 +2182,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 95 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] ); + if( channelId != 0 ) + { + numerators_sv[94] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[2] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1874,8 +2205,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 96 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] ); + if( channelId != 0 ) + { + numerators_sv[95] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[18] += amp_sv[0]; jamp_sv[19] -= amp_sv[0]; @@ -1890,8 +2224,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 97 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] ); + if( channelId != 0 ) + { + numerators_sv[96] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[18] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[19] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1904,8 +2241,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 98 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] ); + if( channelId != 0 ) + { + numerators_sv[97] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += amp_sv[0]; jamp_sv[2] -= amp_sv[0]; @@ -1920,8 +2260,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 99 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] ); + if( channelId != 0 ) + { + numerators_sv[98] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[8] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[14] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1968,8 +2311,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 101 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] ); + if( channelId != 0 ) + { + numerators_sv[100] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[4] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -1988,8 +2334,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 102 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] ); + if( channelId != 0 ) + { + numerators_sv[101] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[2] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -2008,8 +2357,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 103 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] ); + if( channelId != 0 ) + { + numerators_sv[102] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[12] += amp_sv[0]; jamp_sv[13] -= amp_sv[0]; @@ -2024,8 +2376,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 104 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] ); + if( channelId != 0 ) + { + numerators_sv[103] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[12] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[13] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -2038,8 +2393,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 105 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] ); + if( channelId != 0 ) + { + numerators_sv[104] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += amp_sv[0]; jamp_sv[4] -= amp_sv[0]; @@ -2054,8 +2412,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 106 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] ); + if( channelId != 0 ) + { + numerators_sv[105] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[10] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[20] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -2102,8 +2463,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 108 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] ); + if( channelId != 0 ) + { + numerators_sv[107] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[1] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -2122,8 +2486,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 109 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] ); + if( channelId != 0 ) + { + numerators_sv[108] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[3] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[5] += cxtype( 0, 1 ) * amp_sv[0]; @@ -2142,8 +2509,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 110 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] ); + if( channelId != 0 ) + { + numerators_sv[109] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[12] -= amp_sv[0]; @@ -2155,8 +2525,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 111 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] ); + if( channelId != 0 ) + { + numerators_sv[110] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[14] -= amp_sv[0]; @@ -2168,8 +2541,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 112 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] ); + if( channelId != 0 ) + { + numerators_sv[111] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[18] -= amp_sv[0]; @@ -2181,8 +2557,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 113 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] ); + if( channelId != 0 ) + { + numerators_sv[112] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[20] -= amp_sv[0]; @@ -2718,7 +3097,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- @@ -3090,9 +3471,6 @@ namespace mg5amcCpu #ifdef MGONGPUCPP_GPUIMPL // Remember: in CUDA this is a kernel for one event, in c++ this processes n events const int ievt = blockDim.x * blockIdx.x + threadIdx.x; // index of event (thread) in grid -#ifdef MGONGPU_SUPPORTS_MULTICHANNEL - using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events -#endif #else //assert( (size_t)(allmomenta) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] //assert( (size_t)(allMEs) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] @@ -3100,7 +3478,6 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL using NUM_ACCESS = HostAccessNumerators; // non-trivial access: buffer includes all events using DEN_ACCESS = HostAccessDenominators; // non-trivial access: buffer includes all events - using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events #endif #endif @@ -3125,11 +3502,12 @@ namespace mg5amcCpu fptype_sv& MEs_sv = E_ACCESS::kernelAccess( MEs ); MEs_sv = fptype_sv{ 0 }; #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - numerators_sv = fptype_sv{ 0 }; + for( int i = 0; i < processConfig::ndiagrams; ++i ) + numerators_sv[i] = fptype_sv{ 0 }; denominators_sv = fptype_sv{ 0 }; #endif } @@ -3142,17 +3520,7 @@ namespace mg5amcCpu // *** START OF PART 1a - CUDA (one event per GPU thread) *** #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) - const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) - // NB: channelIds_sv is a scalar in CUDA - channelId = channelIds_sv; - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) - } + unsigned int channelId = getChannelId( allChannelIds ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (for the single event processed in calculate_wavefunctions) @@ -3267,38 +3635,7 @@ namespace mg5amcCpu const int ievt00 = ipagV2 * neppV; // loop on one SIMD page (neppV events) at a time #endif #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) - const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 - uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) -#ifndef MGONGPU_CPPSIMD - // NB: channelIds_sv is a scalar in no-SIMD C++ - channelId = channelIds_sv; -#else - // NB: channelIds_sv is a vector in SIMD C++ - channelId = channelIds_sv[0]; // element[0] - for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] - { - assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId - } -#endif - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) -#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT - // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) - const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 - uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - for( int i = 0; i < neppV; ++i ) - { - assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector - } -#endif - } + unsigned int channelId = getChannelId( allChannelIds, ievt00 ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (jamp2[nParity][ncolor][neppV] for the SIMD vector - or the two SIMD vectors - of events processed in calculate_wavefunctions) @@ -3471,11 +3808,12 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( allChannelIds != nullptr ) // fix segfault #892 (not 'channelIds[0] != 0') { - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + const unsigned int channelId = getChannelId( allChannelIds, ievt0, false ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - MEs_sv *= numerators_sv / denominators_sv; + MEs_sv *= numerators_sv[channelId - 1] / denominators_sv; } #endif //for( int ieppV = 0; ieppV < neppV; ieppV++ ) diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxgg/CPPProcess.h b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxgg/CPPProcess.h index b6e3ba16d4..35780287be 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxgg/CPPProcess.h +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxgg/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxgg/auto_dsig.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxgg/auto_dsig.f index 850bc73f22..bbc27d3f4d 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxgg/auto_dsig.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxgg/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C 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 7af9753fb7..f79911156c 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 @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -137,14 +137,14 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDDO QSCALE=QSCALE/2D0 ELSE - QSCALE=DSQRT(Q2FACT(IB(1))) + QSCALE=DSQRT(Q2FACT(1)) ENDIF G1=PDG2PDF(LPP(IB(1)),0, IB(1),XBK(IB(1)), QSCALE) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) IF (DSQRT(Q2FACT(IB(2))).NE.0D0) THEN - QSCALE=DSQRT(Q2FACT(IB(2))) + QSCALE=DSQRT(Q2FACT(2)) ENDIF G2=PDG2PDF(LPP(IB(2)),0, IB(2),XBK(IB(2)), QSCALE) ENDIF @@ -219,7 +219,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -290,6 +290,10 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, INTEGER I_EE C +C STUFF FOR UPC +C + DOUBLE PRECISION PHOTONPDFSQUARE +C C EXTERNAL FUNCTIONS C LOGICAL PASSCUTS @@ -373,12 +377,12 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, IF (ABS(LPP(IB(1))).GE.1) THEN C LP=SIGN(1,LPP(IB(1))) G1(IVEC)=PDG2PDF(LPP(IB(1)),0, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) G2(IVEC)=PDG2PDF(LPP(IB(2)),0, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) ENDIF ENDDO ! IWARP LOOP ENDDO ! CURRWARP LOOP diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxgg/card.png b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxgg/card.png new file mode 100644 index 0000000000..31ddc02e81 Binary files /dev/null and b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxgg/card.png differ 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 39ecff768a..1357357795 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 @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -355,7 +355,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -398,7 +398,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C INTEGER I,J,M,N COMPLEX*16 ZTEMP, TMP_JAMP(155) - REAL*8 CF(NCOLOR,NCOLOR) + INTEGER CF(NCOLOR*(NCOLOR+1)/2) + INTEGER DENOM, CF_INDEX COMPLEX*16 AMP(NGRAPHS), JAMP(NCOLOR,NAMPSO) COMPLEX*16 W(6,NWAVEFUNCS) C Needed for v4 models @@ -441,397 +442,67 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C C COLOR DATA C - DATA (CF(I, 1),I= 1, 6) /9.481481481481481D+00, - $ -1.185185185185185D+00,-1.185185185185185D+00 - $ ,1.481481481481481D-01,1.481481481481481D-01,1.481481481481481D - $ +00/ - DATA (CF(I, 1),I= 7, 12) /-1.185185185185185D+00 - $ ,1.481481481481481D-01,1.481481481481481D-01, - $ -1.851851851851852D-02,-1.851851851851852D-02, - $ -1.851851851851852D-01/ - DATA (CF(I, 1),I= 13, 18) /1.481481481481481D-01, - $ -1.851851851851852D-02,1.481481481481481D+00, - $ -1.851851851851852D-01,1.314814814814815D+00,1.148148148148148D - $ +00/ - DATA (CF(I, 1),I= 19, 24) /-1.851851851851852D-02, - $ -1.851851851851852D-01,-1.851851851851852D-01 - $ ,1.148148148148148D+00,1.148148148148148D+00, - $ -5.185185185185185D-01/ + DATA DENOM/54/ + DATA (CF(I),I= 1, 24) /512,-128,-128,16,16,160,-128,16,16,-2,-2 + $ ,-20,16,-2,160,-20,142,124,-2,-20,-20,124,124,-56/ C 1 T(1,2,5,6,3,4) - DATA (CF(I, 2),I= 1, 6) /-1.185185185185185D+00 - $ ,9.481481481481481D+00,1.481481481481481D-01,1.481481481481481D - $ +00,-1.185185185185185D+00,1.481481481481481D-01/ - DATA (CF(I, 2),I= 7, 12) /1.481481481481481D-01, - $ -1.185185185185185D+00,-1.851851851851852D-02, - $ -1.851851851851852D-01,1.481481481481481D-01, - $ -1.851851851851852D-02/ - DATA (CF(I, 2),I= 13, 18) /-1.851851851851852D-02, - $ -1.851851851851852D-01,-1.851851851851852D-01 - $ ,1.148148148148148D+00,1.148148148148148D+00, - $ -5.185185185185185D-01/ - DATA (CF(I, 2),I= 19, 24) /1.481481481481481D-01, - $ -1.851851851851852D-02,1.481481481481481D+00, - $ -1.851851851851852D-01,1.314814814814815D+00,1.148148148148148D - $ +00/ + DATA (CF(I),I= 25, 47) /512,16,160,-128,16,16,-128,-2,-20,16,-2, + $ -2,-20,-20,124,124,-56,16,-2,160,-20,142,124/ C 1 T(1,2,6,5,3,4) - DATA (CF(I, 3),I= 1, 6) /-1.185185185185185D+00 - $ ,1.481481481481481D-01,9.481481481481481D+00, - $ -1.185185185185185D+00,1.481481481481481D+00,1.481481481481481D - $ -01/ - DATA (CF(I, 3),I= 7, 12) /1.481481481481481D-01, - $ -1.851851851851852D-02,1.481481481481481D+00, - $ -1.851851851851852D-01,1.314814814814815D+00,1.148148148148148D - $ +00/ - DATA (CF(I, 3),I= 13, 18) /-1.185185185185185D+00 - $ ,1.481481481481481D-01,1.481481481481481D-01, - $ -1.851851851851852D-02,-1.851851851851852D-02, - $ -1.851851851851852D-01/ - DATA (CF(I, 3),I= 19, 24) /-1.851851851851852D-01, - $ -1.851851851851852D-02,1.148148148148148D+00, - $ -5.185185185185185D-01,-1.851851851851852D-01 - $ ,1.148148148148148D+00/ + DATA (CF(I),I= 48, 69) /512,-128,160,16,16,-2,160,-20,142,124, + $ -128,16,16,-2,-2,-20,-20,-2,124,-56,-20,124/ C 1 T(1,5,2,6,3,4) - DATA (CF(I, 4),I= 1, 6) /1.481481481481481D-01 - $ ,1.481481481481481D+00,-1.185185185185185D+00 - $ ,9.481481481481481D+00,1.481481481481481D-01, - $ -1.185185185185185D+00/ - DATA (CF(I, 4),I= 7, 12) /-1.851851851851852D-02, - $ -1.851851851851852D-01,-1.851851851851852D-01 - $ ,1.148148148148148D+00,1.148148148148148D+00, - $ -5.185185185185185D-01/ - DATA (CF(I, 4),I= 13, 18) /1.481481481481481D-01, - $ -1.185185185185185D+00,-1.851851851851852D-02, - $ -1.851851851851852D-01,1.481481481481481D-01, - $ -1.851851851851852D-02/ - DATA (CF(I, 4),I= 19, 24) /-1.851851851851852D-02 - $ ,1.481481481481481D-01,1.314814814814815D+00,1.148148148148148D - $ +00,1.481481481481481D+00,-1.851851851851852D-01/ + DATA (CF(I),I= 70, 90) /512,16,-128,-2,-20,-20,124,124,-56,16, + $ -128,-2,-20,16,-2,-2,16,142,124,160,-20/ C 1 T(1,5,6,2,3,4) - DATA (CF(I, 5),I= 1, 6) /1.481481481481481D-01, - $ -1.185185185185185D+00,1.481481481481481D+00,1.481481481481481D - $ -01,9.481481481481481D+00,-1.185185185185185D+00/ - DATA (CF(I, 5),I= 7, 12) /-1.851851851851852D-02 - $ ,1.481481481481481D-01,1.314814814814815D+00,1.148148148148148D - $ +00,1.481481481481481D+00,-1.851851851851852D-01/ - DATA (CF(I, 5),I= 13, 18) /-1.851851851851852D-01, - $ -1.851851851851852D-02,1.148148148148148D+00, - $ -5.185185185185185D-01,-1.851851851851852D-01 - $ ,1.148148148148148D+00/ - DATA (CF(I, 5),I= 19, 24) /-1.185185185185185D+00 - $ ,1.481481481481481D-01,1.481481481481481D-01, - $ -1.851851851851852D-02,-1.851851851851852D-02, - $ -1.851851851851852D-01/ + DATA (CF(I),I= 91,110) /512,-128,-2,16,142,124,160,-20,-20,-2 + $ ,124,-56,-20,124,-128,16,16,-2,-2,-20/ C 1 T(1,6,2,5,3,4) - DATA (CF(I, 6),I= 1, 6) /1.481481481481481D+00 - $ ,1.481481481481481D-01,1.481481481481481D-01, - $ -1.185185185185185D+00,-1.185185185185185D+00 - $ ,9.481481481481481D+00/ - DATA (CF(I, 6),I= 7, 12) /-1.851851851851852D-01, - $ -1.851851851851852D-02,1.148148148148148D+00, - $ -5.185185185185185D-01,-1.851851851851852D-01 - $ ,1.148148148148148D+00/ - DATA (CF(I, 6),I= 13, 18) /-1.851851851851852D-02 - $ ,1.481481481481481D-01,1.314814814814815D+00,1.148148148148148D - $ +00,1.481481481481481D+00,-1.851851851851852D-01/ - DATA (CF(I, 6),I= 19, 24) /1.481481481481481D-01, - $ -1.185185185185185D+00,-1.851851851851852D-02, - $ -1.851851851851852D-01,1.481481481481481D-01, - $ -1.851851851851852D-02/ + DATA (CF(I),I=111,129) /512,-20,-2,124,-56,-20,124,-2,16,142,124 + $ ,160,-20,16,-128,-2,-20,16,-2/ C 1 T(1,6,5,2,3,4) - DATA (CF(I, 7),I= 1, 6) /-1.185185185185185D+00 - $ ,1.481481481481481D-01,1.481481481481481D-01, - $ -1.851851851851852D-02,-1.851851851851852D-02, - $ -1.851851851851852D-01/ - DATA (CF(I, 7),I= 7, 12) /9.481481481481481D+00, - $ -1.185185185185185D+00,-1.185185185185185D+00 - $ ,1.481481481481481D-01,1.481481481481481D-01,1.481481481481481D - $ +00/ - DATA (CF(I, 7),I= 13, 18) /1.481481481481481D+00, - $ -1.851851851851852D-01,1.481481481481481D-01, - $ -1.851851851851852D-02,1.148148148148148D+00,1.314814814814815D - $ +00/ - DATA (CF(I, 7),I= 19, 24) /-1.851851851851852D-01 - $ ,1.148148148148148D+00,-1.851851851851852D-02, - $ -1.851851851851852D-01,-5.185185185185185D-01 - $ ,1.148148148148148D+00/ + DATA (CF(I),I=130,147) /512,-128,-128,16,16,160,160,-20,16,-2 + $ ,124,142,-20,124,-2,-20,-56,124/ C 1 T(2,1,5,6,3,4) - DATA (CF(I, 8),I= 1, 6) /1.481481481481481D-01, - $ -1.185185185185185D+00,-1.851851851851852D-02, - $ -1.851851851851852D-01,1.481481481481481D-01, - $ -1.851851851851852D-02/ - DATA (CF(I, 8),I= 7, 12) /-1.185185185185185D+00 - $ ,9.481481481481481D+00,1.481481481481481D-01,1.481481481481481D - $ +00,-1.185185185185185D+00,1.481481481481481D-01/ - DATA (CF(I, 8),I= 13, 18) /-1.851851851851852D-01 - $ ,1.148148148148148D+00,-1.851851851851852D-02, - $ -1.851851851851852D-01,-5.185185185185185D-01 - $ ,1.148148148148148D+00/ - DATA (CF(I, 8),I= 19, 24) /1.481481481481481D+00, - $ -1.851851851851852D-01,1.481481481481481D-01, - $ -1.851851851851852D-02,1.148148148148148D+00,1.314814814814815D - $ +00/ + DATA (CF(I),I=148,164) /512,16,160,-128,16,-20,124,-2,-20,-56 + $ ,124,160,-20,16,-2,124,142/ C 1 T(2,1,6,5,3,4) - DATA (CF(I, 9),I= 1, 6) /1.481481481481481D-01, - $ -1.851851851851852D-02,1.481481481481481D+00, - $ -1.851851851851852D-01,1.314814814814815D+00,1.148148148148148D - $ +00/ - DATA (CF(I, 9),I= 7, 12) /-1.185185185185185D+00 - $ ,1.481481481481481D-01,9.481481481481481D+00, - $ -1.185185185185185D+00,1.481481481481481D+00,1.481481481481481D - $ -01/ - DATA (CF(I, 9),I= 13, 18) /1.481481481481481D-01, - $ -1.851851851851852D-02,-1.185185185185185D+00 - $ ,1.481481481481481D-01,-1.851851851851852D-01, - $ -1.851851851851852D-02/ - DATA (CF(I, 9),I= 19, 24) /1.148148148148148D+00, - $ -5.185185185185185D-01,-1.851851851851852D-01, - $ -1.851851851851852D-02,1.148148148148148D+00, - $ -1.851851851851852D-01/ + DATA (CF(I),I=165,180) /512,-128,160,16,16,-2,-128,16,-20,-2,124 + $ ,-56,-20,-2,124,-20/ C 1 T(2,5,1,6,3,4) - DATA (CF(I, 10),I= 1, 6) /-1.851851851851852D-02, - $ -1.851851851851852D-01,-1.851851851851852D-01 - $ ,1.148148148148148D+00,1.148148148148148D+00, - $ -5.185185185185185D-01/ - DATA (CF(I, 10),I= 7, 12) /1.481481481481481D-01 - $ ,1.481481481481481D+00,-1.185185185185185D+00 - $ ,9.481481481481481D+00,1.481481481481481D-01, - $ -1.185185185185185D+00/ - DATA (CF(I, 10),I= 13, 18) /-1.851851851851852D-02, - $ -1.851851851851852D-01,1.481481481481481D-01, - $ -1.185185185185185D+00,-1.851851851851852D-02 - $ ,1.481481481481481D-01/ - DATA (CF(I, 10),I= 19, 24) /1.314814814814815D+00 - $ ,1.148148148148148D+00,-1.851851851851852D-02 - $ ,1.481481481481481D-01,-1.851851851851852D-01 - $ ,1.481481481481481D+00/ + DATA (CF(I),I=181,195) /512,16,-128,-2,-20,16,-128,-2,16,142,124 + $ ,-2,16,-20,160/ C 1 T(2,5,6,1,3,4) - DATA (CF(I, 11),I= 1, 6) /-1.851851851851852D-02 - $ ,1.481481481481481D-01,1.314814814814815D+00,1.148148148148148D - $ +00,1.481481481481481D+00,-1.851851851851852D-01/ - DATA (CF(I, 11),I= 7, 12) /1.481481481481481D-01, - $ -1.185185185185185D+00,1.481481481481481D+00,1.481481481481481D - $ -01,9.481481481481481D+00,-1.185185185185185D+00/ - DATA (CF(I, 11),I= 13, 18) /1.148148148148148D+00, - $ -5.185185185185185D-01,-1.851851851851852D-01, - $ -1.851851851851852D-02,1.148148148148148D+00, - $ -1.851851851851852D-01/ - DATA (CF(I, 11),I= 19, 24) /1.481481481481481D-01, - $ -1.851851851851852D-02,-1.185185185185185D+00 - $ ,1.481481481481481D-01,-1.851851851851852D-01, - $ -1.851851851851852D-02/ + DATA (CF(I),I=196,209) /512,-128,124,-56,-20,-2,124,-20,16,-2, + $ -128,16,-20,-2/ C 1 T(2,6,1,5,3,4) - DATA (CF(I, 12),I= 1, 6) /-1.851851851851852D-01, - $ -1.851851851851852D-02,1.148148148148148D+00, - $ -5.185185185185185D-01,-1.851851851851852D-01 - $ ,1.148148148148148D+00/ - DATA (CF(I, 12),I= 7, 12) /1.481481481481481D+00 - $ ,1.481481481481481D-01,1.481481481481481D-01, - $ -1.185185185185185D+00,-1.185185185185185D+00 - $ ,9.481481481481481D+00/ - DATA (CF(I, 12),I= 13, 18) /1.314814814814815D+00 - $ ,1.148148148148148D+00,-1.851851851851852D-02 - $ ,1.481481481481481D-01,-1.851851851851852D-01 - $ ,1.481481481481481D+00/ - DATA (CF(I, 12),I= 19, 24) /-1.851851851851852D-02, - $ -1.851851851851852D-01,1.481481481481481D-01, - $ -1.185185185185185D+00,-1.851851851851852D-02 - $ ,1.481481481481481D-01/ + DATA (CF(I),I=210,222) /512,142,124,-2,16,-20,160,-2,-20,16,-128 + $ ,-2,16/ C 1 T(2,6,5,1,3,4) - DATA (CF(I, 13),I= 1, 6) /1.481481481481481D-01, - $ -1.851851851851852D-02,-1.185185185185185D+00 - $ ,1.481481481481481D-01,-1.851851851851852D-01, - $ -1.851851851851852D-02/ - DATA (CF(I, 13),I= 7, 12) /1.481481481481481D+00, - $ -1.851851851851852D-01,1.481481481481481D-01, - $ -1.851851851851852D-02,1.148148148148148D+00,1.314814814814815D - $ +00/ - DATA (CF(I, 13),I= 13, 18) /9.481481481481481D+00, - $ -1.185185185185185D+00,-1.185185185185185D+00 - $ ,1.481481481481481D-01,1.481481481481481D-01,1.481481481481481D - $ +00/ - DATA (CF(I, 13),I= 19, 24) /1.148148148148148D+00, - $ -1.851851851851852D-01,-5.185185185185185D-01 - $ ,1.148148148148148D+00,-1.851851851851852D-02, - $ -1.851851851851852D-01/ + DATA (CF(I),I=223,234) /512,-128,-128,16,16,160,124,-20,-56,124, + $ -2,-20/ C 1 T(5,1,2,6,3,4) - DATA (CF(I, 14),I= 1, 6) /-1.851851851851852D-02, - $ -1.851851851851852D-01,1.481481481481481D-01, - $ -1.185185185185185D+00,-1.851851851851852D-02 - $ ,1.481481481481481D-01/ - DATA (CF(I, 14),I= 7, 12) /-1.851851851851852D-01 - $ ,1.148148148148148D+00,-1.851851851851852D-02, - $ -1.851851851851852D-01,-5.185185185185185D-01 - $ ,1.148148148148148D+00/ - DATA (CF(I, 14),I= 13, 18) /-1.185185185185185D+00 - $ ,9.481481481481481D+00,1.481481481481481D-01,1.481481481481481D - $ +00,-1.185185185185185D+00,1.481481481481481D-01/ - DATA (CF(I, 14),I= 19, 24) /-1.851851851851852D-01 - $ ,1.481481481481481D+00,1.148148148148148D+00,1.314814814814815D - $ +00,1.481481481481481D-01,-1.851851851851852D-02/ + DATA (CF(I),I=235,245) /512,16,160,-128,16,-20,160,124,142,16,-2/ C 1 T(5,1,6,2,3,4) - DATA (CF(I, 15),I= 1, 6) /1.481481481481481D+00, - $ -1.851851851851852D-01,1.481481481481481D-01, - $ -1.851851851851852D-02,1.148148148148148D+00,1.314814814814815D - $ +00/ - DATA (CF(I, 15),I= 7, 12) /1.481481481481481D-01, - $ -1.851851851851852D-02,-1.185185185185185D+00 - $ ,1.481481481481481D-01,-1.851851851851852D-01, - $ -1.851851851851852D-02/ - DATA (CF(I, 15),I= 13, 18) /-1.185185185185185D+00 - $ ,1.481481481481481D-01,9.481481481481481D+00, - $ -1.185185185185185D+00,1.481481481481481D+00,1.481481481481481D - $ -01/ - DATA (CF(I, 15),I= 19, 24) /-5.185185185185185D-01 - $ ,1.148148148148148D+00,1.148148148148148D+00, - $ -1.851851851851852D-01,-1.851851851851852D-01, - $ -1.851851851851852D-02/ + DATA (CF(I),I=246,255) /512,-128,160,16,-56,124,124,-20,-20,-2/ C 1 T(5,2,1,6,3,4) - DATA (CF(I, 16),I= 1, 6) /-1.851851851851852D-01 - $ ,1.148148148148148D+00,-1.851851851851852D-02, - $ -1.851851851851852D-01,-5.185185185185185D-01 - $ ,1.148148148148148D+00/ - DATA (CF(I, 16),I= 7, 12) /-1.851851851851852D-02, - $ -1.851851851851852D-01,1.481481481481481D-01, - $ -1.185185185185185D+00,-1.851851851851852D-02 - $ ,1.481481481481481D-01/ - DATA (CF(I, 16),I= 13, 18) /1.481481481481481D-01 - $ ,1.481481481481481D+00,-1.185185185185185D+00 - $ ,9.481481481481481D+00,1.481481481481481D-01, - $ -1.185185185185185D+00/ - DATA (CF(I, 16),I= 19, 24) /1.148148148148148D+00 - $ ,1.314814814814815D+00,-1.851851851851852D-01 - $ ,1.481481481481481D+00,-1.851851851851852D-02 - $ ,1.481481481481481D-01/ + DATA (CF(I),I=256,264) /512,16,-128,124,142,-20,160,-2,16/ C 1 T(5,2,6,1,3,4) - DATA (CF(I, 17),I= 1, 6) /1.314814814814815D+00 - $ ,1.148148148148148D+00,-1.851851851851852D-02 - $ ,1.481481481481481D-01,-1.851851851851852D-01 - $ ,1.481481481481481D+00/ - DATA (CF(I, 17),I= 7, 12) /1.148148148148148D+00, - $ -5.185185185185185D-01,-1.851851851851852D-01, - $ -1.851851851851852D-02,1.148148148148148D+00, - $ -1.851851851851852D-01/ - DATA (CF(I, 17),I= 13, 18) /1.481481481481481D-01, - $ -1.185185185185185D+00,1.481481481481481D+00,1.481481481481481D - $ -01,9.481481481481481D+00,-1.185185185185185D+00/ - DATA (CF(I, 17),I= 19, 24) /-1.851851851851852D-02 - $ ,1.481481481481481D-01,-1.851851851851852D-01, - $ -1.851851851851852D-02,-1.185185185185185D+00 - $ ,1.481481481481481D-01/ + DATA (CF(I),I=265,272) /512,-128,-2,16,-20,-2,-128,16/ C 1 T(5,6,1,2,3,4) - DATA (CF(I, 18),I= 1, 6) /1.148148148148148D+00, - $ -5.185185185185185D-01,-1.851851851851852D-01, - $ -1.851851851851852D-02,1.148148148148148D+00, - $ -1.851851851851852D-01/ - DATA (CF(I, 18),I= 7, 12) /1.314814814814815D+00 - $ ,1.148148148148148D+00,-1.851851851851852D-02 - $ ,1.481481481481481D-01,-1.851851851851852D-01 - $ ,1.481481481481481D+00/ - DATA (CF(I, 18),I= 13, 18) /1.481481481481481D+00 - $ ,1.481481481481481D-01,1.481481481481481D-01, - $ -1.185185185185185D+00,-1.185185185185185D+00 - $ ,9.481481481481481D+00/ - DATA (CF(I, 18),I= 19, 24) /-1.851851851851852D-01, - $ -1.851851851851852D-02,-1.851851851851852D-02 - $ ,1.481481481481481D-01,1.481481481481481D-01, - $ -1.185185185185185D+00/ + DATA (CF(I),I=273,279) /512,-20,-2,-2,16,16,-128/ C 1 T(5,6,2,1,3,4) - DATA (CF(I, 19),I= 1, 6) /-1.851851851851852D-02 - $ ,1.481481481481481D-01,-1.851851851851852D-01, - $ -1.851851851851852D-02,-1.185185185185185D+00 - $ ,1.481481481481481D-01/ - DATA (CF(I, 19),I= 7, 12) /-1.851851851851852D-01 - $ ,1.481481481481481D+00,1.148148148148148D+00,1.314814814814815D - $ +00,1.481481481481481D-01,-1.851851851851852D-02/ - DATA (CF(I, 19),I= 13, 18) /1.148148148148148D+00, - $ -1.851851851851852D-01,-5.185185185185185D-01 - $ ,1.148148148148148D+00,-1.851851851851852D-02, - $ -1.851851851851852D-01/ - DATA (CF(I, 19),I= 19, 24) /9.481481481481481D+00, - $ -1.185185185185185D+00,-1.185185185185185D+00 - $ ,1.481481481481481D-01,1.481481481481481D-01,1.481481481481481D - $ +00/ + DATA (CF(I),I=280,285) /512,-128,-128,16,16,160/ C 1 T(6,1,2,5,3,4) - DATA (CF(I, 20),I= 1, 6) /-1.851851851851852D-01, - $ -1.851851851851852D-02,-1.851851851851852D-02 - $ ,1.481481481481481D-01,1.481481481481481D-01, - $ -1.185185185185185D+00/ - DATA (CF(I, 20),I= 7, 12) /1.148148148148148D+00, - $ -1.851851851851852D-01,-5.185185185185185D-01 - $ ,1.148148148148148D+00,-1.851851851851852D-02, - $ -1.851851851851852D-01/ - DATA (CF(I, 20),I= 13, 18) /-1.851851851851852D-01 - $ ,1.481481481481481D+00,1.148148148148148D+00,1.314814814814815D - $ +00,1.481481481481481D-01,-1.851851851851852D-02/ - DATA (CF(I, 20),I= 19, 24) /-1.185185185185185D+00 - $ ,9.481481481481481D+00,1.481481481481481D-01,1.481481481481481D - $ +00,-1.185185185185185D+00,1.481481481481481D-01/ + DATA (CF(I),I=286,290) /512,16,160,-128,16/ C 1 T(6,1,5,2,3,4) - DATA (CF(I, 21),I= 1, 6) /-1.851851851851852D-01 - $ ,1.481481481481481D+00,1.148148148148148D+00,1.314814814814815D - $ +00,1.481481481481481D-01,-1.851851851851852D-02/ - DATA (CF(I, 21),I= 7, 12) /-1.851851851851852D-02 - $ ,1.481481481481481D-01,-1.851851851851852D-01, - $ -1.851851851851852D-02,-1.185185185185185D+00 - $ ,1.481481481481481D-01/ - DATA (CF(I, 21),I= 13, 18) /-5.185185185185185D-01 - $ ,1.148148148148148D+00,1.148148148148148D+00, - $ -1.851851851851852D-01,-1.851851851851852D-01, - $ -1.851851851851852D-02/ - DATA (CF(I, 21),I= 19, 24) /-1.185185185185185D+00 - $ ,1.481481481481481D-01,9.481481481481481D+00, - $ -1.185185185185185D+00,1.481481481481481D+00,1.481481481481481D - $ -01/ + DATA (CF(I),I=291,294) /512,-128,160,16/ C 1 T(6,2,1,5,3,4) - DATA (CF(I, 22),I= 1, 6) /1.148148148148148D+00, - $ -1.851851851851852D-01,-5.185185185185185D-01 - $ ,1.148148148148148D+00,-1.851851851851852D-02, - $ -1.851851851851852D-01/ - DATA (CF(I, 22),I= 7, 12) /-1.851851851851852D-01, - $ -1.851851851851852D-02,-1.851851851851852D-02 - $ ,1.481481481481481D-01,1.481481481481481D-01, - $ -1.185185185185185D+00/ - DATA (CF(I, 22),I= 13, 18) /1.148148148148148D+00 - $ ,1.314814814814815D+00,-1.851851851851852D-01 - $ ,1.481481481481481D+00,-1.851851851851852D-02 - $ ,1.481481481481481D-01/ - DATA (CF(I, 22),I= 19, 24) /1.481481481481481D-01 - $ ,1.481481481481481D+00,-1.185185185185185D+00 - $ ,9.481481481481481D+00,1.481481481481481D-01, - $ -1.185185185185185D+00/ + DATA (CF(I),I=295,297) /512,16,-128/ C 1 T(6,2,5,1,3,4) - DATA (CF(I, 23),I= 1, 6) /1.148148148148148D+00 - $ ,1.314814814814815D+00,-1.851851851851852D-01 - $ ,1.481481481481481D+00,-1.851851851851852D-02 - $ ,1.481481481481481D-01/ - DATA (CF(I, 23),I= 7, 12) /-5.185185185185185D-01 - $ ,1.148148148148148D+00,1.148148148148148D+00, - $ -1.851851851851852D-01,-1.851851851851852D-01, - $ -1.851851851851852D-02/ - DATA (CF(I, 23),I= 13, 18) /-1.851851851851852D-02 - $ ,1.481481481481481D-01,-1.851851851851852D-01, - $ -1.851851851851852D-02,-1.185185185185185D+00 - $ ,1.481481481481481D-01/ - DATA (CF(I, 23),I= 19, 24) /1.481481481481481D-01, - $ -1.185185185185185D+00,1.481481481481481D+00,1.481481481481481D - $ -01,9.481481481481481D+00,-1.185185185185185D+00/ + DATA (CF(I),I=298,299) /512,-128/ C 1 T(6,5,1,2,3,4) - DATA (CF(I, 24),I= 1, 6) /-5.185185185185185D-01 - $ ,1.148148148148148D+00,1.148148148148148D+00, - $ -1.851851851851852D-01,-1.851851851851852D-01, - $ -1.851851851851852D-02/ - DATA (CF(I, 24),I= 7, 12) /1.148148148148148D+00 - $ ,1.314814814814815D+00,-1.851851851851852D-01 - $ ,1.481481481481481D+00,-1.851851851851852D-02 - $ ,1.481481481481481D-01/ - DATA (CF(I, 24),I= 13, 18) /-1.851851851851852D-01, - $ -1.851851851851852D-02,-1.851851851851852D-02 - $ ,1.481481481481481D-01,1.481481481481481D-01, - $ -1.185185185185185D+00/ - DATA (CF(I, 24),I= 19, 24) /1.481481481481481D+00 - $ ,1.481481481481481D-01,1.481481481481481D-01, - $ -1.185185185185185D+00,-1.185185185185185D+00 - $ ,9.481481481481481D+00/ + DATA (CF(I),I=300,300) /512/ C 1 T(6,5,2,1,3,4) C ---------- C BEGIN CODE @@ -1547,10 +1218,12 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) MATRIX1 = 0.D0 DO M = 1, NAMPSO + CF_INDEX = 0 DO I = 1, NCOLOR ZTEMP = (0.D0,0.D0) - DO J = 1, NCOLOR - ZTEMP = ZTEMP + CF(J,I)*JAMP(J,M) + DO J = I, NCOLOR + CF_INDEX = CF_INDEX + 1 + ZTEMP = ZTEMP + CF(CF_INDEX)*JAMP(J,M) ENDDO DO N = 1, NAMPSO @@ -1559,6 +1232,7 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) ENDDO ENDDO ENDDO + MATRIX1 = MATRIX1/DENOM IF(SDE_STRAT.EQ.1)THEN AMP2(2)=AMP2(2)+AMP(4)*DCONJG(AMP(4)) diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxgg/matrix11.png b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxgg/matrix11.png new file mode 100644 index 0000000000..1c6c5ea264 Binary files /dev/null and b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxgg/matrix11.png differ diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxgg/matrix12.png b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxgg/matrix12.png new file mode 100644 index 0000000000..db89ede876 Binary files /dev/null and b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxgg/matrix12.png differ diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxgg/processConfig.h b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxgg/processConfig.h new file mode 100644 index 0000000000..4f4a3c3bc0 --- /dev/null +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxgg/processConfig.h @@ -0,0 +1,16 @@ +// Copyright (C) 2025 CERN and UCLouvain. +// Licensed under the GNU Lesser General Public License (version 3 or later). +// Created by: S. Roiser (May 2025) for the MG5aMC CUDACPP plugin. +// Further modified by: ... for the MG5aMC CUDACPP plugin. + + +#ifndef MG5_CONFIG_SIGMA_SM_GG_TTXGG_H +#define MG5_CONFIG_SIGMA_SM_GG_TTXGG_H 1 + +namespace processConfig { + + constexpr int ndiagrams = 123; + +} + +#endif // MG5_CONFIG_SIGMA_SM_GG_TTXGG_H \ No newline at end of file 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 70d0f7cb8e..7c493ab814 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 @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -25,6 +25,7 @@ #include "MemoryAccessMatrixElements.h" #include "MemoryAccessMomenta.h" #include "MemoryAccessWavefunctions.h" +#include "processConfig.h" #ifdef MGONGPU_SUPPORTS_MULTICHANNEL #include "MemoryAccessDenominators.h" @@ -99,6 +100,69 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { +#ifdef MGONGPU_SUPPORTS_MULTICHANNEL + __device__ INLINE unsigned int getChannelId( const unsigned int* allChannelIds +#ifndef MGONGPUCPP_GPUIMPL + , + const int ievt00, + bool sanityCheckMixedPrecision = true +#endif + ) + { + unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr +#ifdef MGONGPUCPP_GPUIMPL + using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page + if( allChannelIds != nullptr ) + { + const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) + const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) + // NB: channelIds_sv is a scalar in CUDA + channelId = channelIds_sv; + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + } +#else // Cuda or C++ + using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + if( allChannelIds != nullptr ) + { + // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) + const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 + uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) +#ifndef MGONGPU_CPPSIMD + // NB: channelIds_sv is a scalar in no-SIMD C++ + channelId = channelIds_sv; +#else + // NB: channelIds_sv is a vector in SIMD C++ + channelId = channelIds_sv[0]; // element[0] + for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] + { + assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId + } +#endif + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + if( sanityCheckMixedPrecision ) + { +#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT + // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) + const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 + uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + for( int i = 0; i < neppV; ++i ) + { + assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector + } +#endif + } + } +#endif // MGONGPUCPP_GPUIMPL + return channelId; + } +#endif // MGONGPU_SUPPORTS_MULTICHANNEL + constexpr int nw6 = CPPProcess::nw6; // dimensions of each wavefunction (HELAS KEK 91-11): e.g. 6 for e+ e- -> mu+ mu- (fermions and vectors) constexpr int npar = CPPProcess::npar; // #particles in total (external = initial + final): e.g. 4 for e+ e- -> mu+ mu- constexpr int ncomb = CPPProcess::ncomb; // #helicity combinations: e.g. 16 for e+ e- -> mu+ mu- (2**4 = fermion spin up/down ** npar) @@ -308,7 +372,7 @@ namespace mg5amcCpu COUPs[ndcoup + iicoup] = allCOUPs[ndcoup + iicoup]; // independent couplings, fixed for all events fptype* MEs = E_ACCESS::ieventAccessRecord( allMEs, ievt0 ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); #endif #endif @@ -318,7 +382,7 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Numerators and denominators for the current event (CUDA) or SIMD event page (C++) - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); #endif @@ -344,8 +408,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1 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] ); + if( channelId != 0 ) + { + numerators_sv[0] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[3] += 1. / 6. * cxtype( 0, 1 ) * amp_sv[0]; @@ -360,8 +427,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 2 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] ); + if( channelId != 0 ) + { + numerators_sv[1] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[3] += 1. / 6. * cxtype( 0, 1 ) * amp_sv[0]; @@ -376,8 +446,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 3 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] ); + if( channelId != 0 ) + { + numerators_sv[2] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += 1. / 2. * amp_sv[0]; jamp_sv[2] -= 1. / 2. * amp_sv[0]; @@ -392,8 +465,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 4 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] ); + if( channelId != 0 ) + { + numerators_sv[3] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 6. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[1] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -408,8 +484,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 5 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] ); + if( channelId != 0 ) + { + numerators_sv[4] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 6. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[2] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -425,8 +504,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 6 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] ); + if( channelId != 0 ) + { + numerators_sv[5] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= 1. / 6. * amp_sv[0]; jamp_sv[5] += 1. / 2. * amp_sv[0]; @@ -440,8 +522,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 7 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] ); + if( channelId != 0 ) + { + numerators_sv[6] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] -= 1. / 6. * amp_sv[0]; jamp_sv[5] += 1. / 2. * amp_sv[0]; @@ -454,8 +539,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 8 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] ); + if( channelId != 0 ) + { + numerators_sv[7] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += 1. / 2. * amp_sv[0]; jamp_sv[4] -= 1. / 6. * amp_sv[0]; @@ -468,8 +556,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 9 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] ); + if( channelId != 0 ) + { + numerators_sv[8] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= 1. / 6. * amp_sv[0]; jamp_sv[1] += 1. / 2. * amp_sv[0]; @@ -482,8 +573,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 10 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] ); + if( channelId != 0 ) + { + numerators_sv[9] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[5] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -497,8 +591,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 11 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] ); + if( channelId != 0 ) + { + numerators_sv[10] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[6] += 1. / 2. * amp_sv[0]; jamp_sv[8] -= 1. / 6. * amp_sv[0]; @@ -511,8 +608,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 12 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] ); + if( channelId != 0 ) + { + numerators_sv[11] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] -= 1. / 6. * amp_sv[0]; jamp_sv[10] += 1. / 2. * amp_sv[0]; @@ -525,8 +625,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 13 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] ); + if( channelId != 0 ) + { + numerators_sv[12] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] -= 1. / 6. * amp_sv[0]; jamp_sv[6] += 1. / 2. * amp_sv[0]; @@ -539,8 +642,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 14 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] ); + if( channelId != 0 ) + { + numerators_sv[13] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[8] -= 1. / 6. * amp_sv[0]; jamp_sv[10] += 1. / 2. * amp_sv[0]; @@ -553,8 +659,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 15 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] ); + if( channelId != 0 ) + { + numerators_sv[14] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[6] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[10] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -568,8 +677,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 16 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] ); + if( channelId != 0 ) + { + numerators_sv[15] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[6] += 1. / 2. * amp_sv[0]; jamp_sv[7] -= 1. / 6. * amp_sv[0]; @@ -582,8 +694,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 17 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] ); + if( channelId != 0 ) + { + numerators_sv[16] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] += 1. / 2. * amp_sv[0]; jamp_sv[7] -= 1. / 6. * amp_sv[0]; @@ -596,8 +711,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 18 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] ); + if( channelId != 0 ) + { + numerators_sv[17] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[3] -= 1. / 6. * amp_sv[0]; jamp_sv[6] += 1. / 2. * amp_sv[0]; @@ -610,8 +728,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 19 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] ); + if( channelId != 0 ) + { + numerators_sv[18] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] += 1. / 2. * amp_sv[0]; jamp_sv[3] -= 1. / 6. * amp_sv[0]; @@ -624,8 +745,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 20 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] ); + if( channelId != 0 ) + { + numerators_sv[19] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[6] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -639,8 +763,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 21 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] ); + if( channelId != 0 ) + { + numerators_sv[20] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[7] -= 1. / 6. * amp_sv[0]; jamp_sv[9] += 1. / 2. * amp_sv[0]; @@ -653,8 +780,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 22 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] ); + if( channelId != 0 ) + { + numerators_sv[21] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[5] += 1. / 2. * amp_sv[0]; jamp_sv[7] -= 1. / 6. * amp_sv[0]; @@ -667,8 +797,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 23 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] ); + if( channelId != 0 ) + { + numerators_sv[22] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[5] += 1. / 2. * amp_sv[0]; jamp_sv[11] -= 1. / 6. * amp_sv[0]; @@ -681,8 +814,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 24 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] ); + if( channelId != 0 ) + { + numerators_sv[23] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[9] += 1. / 2. * amp_sv[0]; jamp_sv[11] -= 1. / 6. * amp_sv[0]; @@ -695,8 +831,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 25 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] ); + if( channelId != 0 ) + { + numerators_sv[24] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[5] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[9] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -709,8 +848,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 26 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] ); + if( channelId != 0 ) + { + numerators_sv[25] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[8] -= 1. / 6. * amp_sv[0]; jamp_sv[9] += 1. / 2. * amp_sv[0]; @@ -723,8 +865,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 27 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] ); + if( channelId != 0 ) + { + numerators_sv[26] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[6] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[9] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -737,8 +882,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 28 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] ); + if( channelId != 0 ) + { + numerators_sv[27] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= 1. / 6. * amp_sv[0]; jamp_sv[2] += 1. / 2. * amp_sv[0]; @@ -751,8 +899,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 29 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] ); + if( channelId != 0 ) + { + numerators_sv[28] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[5] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -765,8 +916,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 30 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] ); + if( channelId != 0 ) + { + numerators_sv[29] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[10] += 1. / 2. * amp_sv[0]; jamp_sv[11] -= 1. / 6. * amp_sv[0]; @@ -779,8 +933,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 31 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] ); + if( channelId != 0 ) + { + numerators_sv[30] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[5] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[10] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -793,8 +950,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 32 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] ); + if( channelId != 0 ) + { + numerators_sv[31] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += 1. / 2. * amp_sv[0]; jamp_sv[3] -= 1. / 6. * amp_sv[0]; @@ -807,8 +967,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 33 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] ); + if( channelId != 0 ) + { + numerators_sv[32] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[6] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -843,8 +1006,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 35 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] ); + if( channelId != 0 ) + { + numerators_sv[34] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += 1. / 2. * amp_sv[0]; jamp_sv[5] -= 1. / 2. * amp_sv[0]; @@ -859,8 +1025,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 36 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] ); + if( channelId != 0 ) + { + numerators_sv[35] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] += 1. / 2. * amp_sv[0]; jamp_sv[5] -= 1. / 2. * amp_sv[0]; @@ -1113,7 +1282,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- @@ -1485,9 +1656,6 @@ namespace mg5amcCpu #ifdef MGONGPUCPP_GPUIMPL // Remember: in CUDA this is a kernel for one event, in c++ this processes n events const int ievt = blockDim.x * blockIdx.x + threadIdx.x; // index of event (thread) in grid -#ifdef MGONGPU_SUPPORTS_MULTICHANNEL - using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events -#endif #else //assert( (size_t)(allmomenta) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] //assert( (size_t)(allMEs) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] @@ -1495,7 +1663,6 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL using NUM_ACCESS = HostAccessNumerators; // non-trivial access: buffer includes all events using DEN_ACCESS = HostAccessDenominators; // non-trivial access: buffer includes all events - using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events #endif #endif @@ -1520,11 +1687,12 @@ namespace mg5amcCpu fptype_sv& MEs_sv = E_ACCESS::kernelAccess( MEs ); MEs_sv = fptype_sv{ 0 }; #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - numerators_sv = fptype_sv{ 0 }; + for( int i = 0; i < processConfig::ndiagrams; ++i ) + numerators_sv[i] = fptype_sv{ 0 }; denominators_sv = fptype_sv{ 0 }; #endif } @@ -1537,17 +1705,7 @@ namespace mg5amcCpu // *** START OF PART 1a - CUDA (one event per GPU thread) *** #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) - const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) - // NB: channelIds_sv is a scalar in CUDA - channelId = channelIds_sv; - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) - } + unsigned int channelId = getChannelId( allChannelIds ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (for the single event processed in calculate_wavefunctions) @@ -1662,38 +1820,7 @@ namespace mg5amcCpu const int ievt00 = ipagV2 * neppV; // loop on one SIMD page (neppV events) at a time #endif #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) - const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 - uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) -#ifndef MGONGPU_CPPSIMD - // NB: channelIds_sv is a scalar in no-SIMD C++ - channelId = channelIds_sv; -#else - // NB: channelIds_sv is a vector in SIMD C++ - channelId = channelIds_sv[0]; // element[0] - for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] - { - assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId - } -#endif - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) -#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT - // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) - const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 - uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - for( int i = 0; i < neppV; ++i ) - { - assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector - } -#endif - } + unsigned int channelId = getChannelId( allChannelIds, ievt00 ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (jamp2[nParity][ncolor][neppV] for the SIMD vector - or the two SIMD vectors - of events processed in calculate_wavefunctions) @@ -1866,11 +1993,12 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( allChannelIds != nullptr ) // fix segfault #892 (not 'channelIds[0] != 0') { - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + const unsigned int channelId = getChannelId( allChannelIds, ievt0, false ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - MEs_sv *= numerators_sv / denominators_sv; + MEs_sv *= numerators_sv[channelId - 1] / denominators_sv; } #endif //for( int ieppV = 0; ieppV < neppV; ieppV++ ) diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxuux/CPPProcess.h b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxuux/CPPProcess.h index 84a8066974..df28183fe3 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxuux/CPPProcess.h +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxuux/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxuux/auto_dsig.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxuux/auto_dsig.f index 49cac7230f..f1501ab162 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxuux/auto_dsig.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxuux/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C 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 6e1c3f774f..e7e1a0dc4c 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 @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -140,14 +140,14 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDDO QSCALE=QSCALE/2D0 ELSE - QSCALE=DSQRT(Q2FACT(IB(1))) + QSCALE=DSQRT(Q2FACT(1)) ENDIF G1=PDG2PDF(LPP(IB(1)),0, IB(1),XBK(IB(1)), QSCALE) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) IF (DSQRT(Q2FACT(IB(2))).NE.0D0) THEN - QSCALE=DSQRT(Q2FACT(IB(2))) + QSCALE=DSQRT(Q2FACT(2)) ENDIF G2=PDG2PDF(LPP(IB(2)),0, IB(2),XBK(IB(2)), QSCALE) ENDIF @@ -231,7 +231,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -305,6 +305,10 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, INTEGER I_EE C +C STUFF FOR UPC +C + DOUBLE PRECISION PHOTONPDFSQUARE +C C EXTERNAL FUNCTIONS C LOGICAL PASSCUTS @@ -388,12 +392,12 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, IF (ABS(LPP(IB(1))).GE.1) THEN C LP=SIGN(1,LPP(IB(1))) G1(IVEC)=PDG2PDF(LPP(IB(1)),0, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) G2(IVEC)=PDG2PDF(LPP(IB(2)),0, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) ENDIF ENDDO ! IWARP LOOP ENDDO ! CURRWARP LOOP 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 9fb8f4d180..db378d1148 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 @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -358,7 +358,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -404,7 +404,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C INTEGER I,J,M,N COMPLEX*16 ZTEMP, TMP_JAMP(17) - REAL*8 CF(NCOLOR,NCOLOR) + INTEGER CF(NCOLOR*(NCOLOR+1)/2) + INTEGER DENOM, CF_INDEX COMPLEX*16 AMP(NGRAPHS), JAMP(NCOLOR,NAMPSO) COMPLEX*16 W(6,NWAVEFUNCS) C Needed for v4 models @@ -447,101 +448,30 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C C COLOR DATA C - DATA (CF(I, 1),I= 1, 6) /1.600000000000000D+01 - $ ,5.333333333333333D+00,5.333333333333333D+00,2.000000000000000D - $ +00,0.000000000000000D+00,5.333333333333333D+00/ - DATA (CF(I, 1),I= 7, 12) /-6.666666666666666D-01 - $ ,0.000000000000000D+00,-2.000000000000000D+00, - $ -6.666666666666666D-01,-6.666666666666666D-01 - $ ,2.000000000000000D+00/ + DATA DENOM/3/ + DATA (CF(I),I= 1, 12) /48,32,32,12,0,32,-4,0,-12,-4,-4,12/ C 1 T(1,2,3,4) T(5,6) - DATA (CF(I, 2),I= 1, 6) /5.333333333333333D+00 - $ ,1.600000000000000D+01,2.000000000000000D+00,5.333333333333333D - $ +00,5.333333333333333D+00,0.000000000000000D+00/ - DATA (CF(I, 2),I= 7, 12) /0.000000000000000D+00, - $ -6.666666666666666D-01,-6.666666666666666D-01, - $ -2.000000000000000D+00,2.000000000000000D+00, - $ -6.666666666666666D-01/ + DATA (CF(I),I= 13, 23) /48,12,32,32,0,0,-4,-4,-12,12,-4/ C 1 T(1,2,3,6) T(5,4) - DATA (CF(I, 3),I= 1, 6) /5.333333333333333D+00 - $ ,2.000000000000000D+00,1.600000000000000D+01,5.333333333333333D - $ +00,-6.666666666666666D-01,0.000000000000000D+00/ - DATA (CF(I, 3),I= 7, 12) /0.000000000000000D+00 - $ ,5.333333333333333D+00,-6.666666666666666D-01 - $ ,2.000000000000000D+00,-2.000000000000000D+00, - $ -6.666666666666666D-01/ + DATA (CF(I),I= 24, 33) /48,32,-4,0,0,32,-4,12,-12,-4/ C 1 T(1,2,5,4) T(3,6) - DATA (CF(I, 4),I= 1, 6) /2.000000000000000D+00 - $ ,5.333333333333333D+00,5.333333333333333D+00,1.600000000000000D - $ +01,0.000000000000000D+00,-6.666666666666666D-01/ - DATA (CF(I, 4),I= 7, 12) /5.333333333333333D+00 - $ ,0.000000000000000D+00,2.000000000000000D+00, - $ -6.666666666666666D-01,-6.666666666666666D-01, - $ -2.000000000000000D+00/ + DATA (CF(I),I= 34, 42) /48,0,-4,32,0,12,-4,-4,-12/ C 1 T(1,2,5,6) T(3,4) - DATA (CF(I, 5),I= 1, 6) /0.000000000000000D+00 - $ ,5.333333333333333D+00,-6.666666666666666D-01 - $ ,0.000000000000000D+00,1.600000000000000D+01,5.333333333333333D - $ +00/ - DATA (CF(I, 5),I= 7, 12) /5.333333333333333D+00 - $ ,2.000000000000000D+00,0.000000000000000D+00, - $ -6.666666666666666D-01,5.333333333333333D+00,0.000000000000000D - $ +00/ + DATA (CF(I),I= 43, 50) /48,32,32,12,0,-4,32,0/ C 1 T(1,3,4) T(2,5,6) - DATA (CF(I, 6),I= 1, 6) /5.333333333333333D+00 - $ ,0.000000000000000D+00,0.000000000000000D+00, - $ -6.666666666666666D-01,5.333333333333333D+00,1.600000000000000D - $ +01/ - DATA (CF(I, 6),I= 7, 12) /2.000000000000000D+00 - $ ,5.333333333333333D+00,-6.666666666666666D-01 - $ ,0.000000000000000D+00,0.000000000000000D+00,5.333333333333333D - $ +00/ + DATA (CF(I),I= 51, 57) /48,12,32,-4,0,0,32/ C 1 T(1,3,6) T(2,5,4) - DATA (CF(I, 7),I= 1, 6) /-6.666666666666666D-01 - $ ,0.000000000000000D+00,0.000000000000000D+00,5.333333333333333D - $ +00,5.333333333333333D+00,2.000000000000000D+00/ - DATA (CF(I, 7),I= 7, 12) /1.600000000000000D+01 - $ ,5.333333333333333D+00,5.333333333333333D+00,0.000000000000000D - $ +00,0.000000000000000D+00,-6.666666666666666D-01/ + DATA (CF(I),I= 58, 63) /48,32,32,0,0,-4/ C 1 T(1,5,4) T(2,3,6) - DATA (CF(I, 8),I= 1, 6) /0.000000000000000D+00, - $ -6.666666666666666D-01,5.333333333333333D+00,0.000000000000000D - $ +00,2.000000000000000D+00,5.333333333333333D+00/ - DATA (CF(I, 8),I= 7, 12) /5.333333333333333D+00 - $ ,1.600000000000000D+01,0.000000000000000D+00,5.333333333333333D - $ +00,-6.666666666666666D-01,0.000000000000000D+00/ + DATA (CF(I),I= 64, 68) /48,0,32,-4,0/ C 1 T(1,5,6) T(2,3,4) - DATA (CF(I, 9),I= 1, 6) /-2.000000000000000D+00, - $ -6.666666666666666D-01,-6.666666666666666D-01 - $ ,2.000000000000000D+00,0.000000000000000D+00, - $ -6.666666666666666D-01/ - DATA (CF(I, 9),I= 7, 12) /5.333333333333333D+00 - $ ,0.000000000000000D+00,1.600000000000000D+01,5.333333333333333D - $ +00,5.333333333333333D+00,2.000000000000000D+00/ + DATA (CF(I),I= 69, 72) /48,32,32,12/ C 1 T(2,1,3,4) T(5,6) - DATA (CF(I, 10),I= 1, 6) /-6.666666666666666D-01, - $ -2.000000000000000D+00,2.000000000000000D+00, - $ -6.666666666666666D-01,-6.666666666666666D-01 - $ ,0.000000000000000D+00/ - DATA (CF(I, 10),I= 7, 12) /0.000000000000000D+00 - $ ,5.333333333333333D+00,5.333333333333333D+00,1.600000000000000D - $ +01,2.000000000000000D+00,5.333333333333333D+00/ + DATA (CF(I),I= 73, 75) /48,12,32/ C 1 T(2,1,3,6) T(5,4) - DATA (CF(I, 11),I= 1, 6) /-6.666666666666666D-01 - $ ,2.000000000000000D+00,-2.000000000000000D+00, - $ -6.666666666666666D-01,5.333333333333333D+00,0.000000000000000D - $ +00/ - DATA (CF(I, 11),I= 7, 12) /0.000000000000000D+00, - $ -6.666666666666666D-01,5.333333333333333D+00,2.000000000000000D - $ +00,1.600000000000000D+01,5.333333333333333D+00/ + DATA (CF(I),I= 76, 77) /48,32/ C 1 T(2,1,5,4) T(3,6) - DATA (CF(I, 12),I= 1, 6) /2.000000000000000D+00, - $ -6.666666666666666D-01,-6.666666666666666D-01, - $ -2.000000000000000D+00,0.000000000000000D+00,5.333333333333333D - $ +00/ - DATA (CF(I, 12),I= 7, 12) /-6.666666666666666D-01 - $ ,0.000000000000000D+00,2.000000000000000D+00,5.333333333333333D - $ +00,5.333333333333333D+00,1.600000000000000D+01/ + DATA (CF(I),I= 78, 78) /48/ C 1 T(2,1,5,6) T(3,4) C ---------- C BEGIN CODE @@ -760,10 +690,12 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) MATRIX1 = 0.D0 DO M = 1, NAMPSO + CF_INDEX = 0 DO I = 1, NCOLOR ZTEMP = (0.D0,0.D0) - DO J = 1, NCOLOR - ZTEMP = ZTEMP + CF(J,I)*JAMP(J,M) + DO J = I, NCOLOR + CF_INDEX = CF_INDEX + 1 + ZTEMP = ZTEMP + CF(CF_INDEX)*JAMP(J,M) ENDDO DO N = 1, NAMPSO @@ -772,6 +704,7 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) ENDDO ENDDO ENDDO + MATRIX1 = MATRIX1/DENOM IF(SDE_STRAT.EQ.1)THEN AMP2(1)=AMP2(1)+AMP(1)*DCONJG(AMP(1)) diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxuux/matrix11.png b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxuux/matrix11.png new file mode 100644 index 0000000000..5c0f25217d Binary files /dev/null and b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxuux/matrix11.png differ diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxuux/matrix12.png b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxuux/matrix12.png new file mode 100644 index 0000000000..0acf23f492 Binary files /dev/null and b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxuux/matrix12.png differ diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxuux/processConfig.h b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxuux/processConfig.h new file mode 100644 index 0000000000..e51eb2c6c2 --- /dev/null +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxuux/processConfig.h @@ -0,0 +1,16 @@ +// Copyright (C) 2025 CERN and UCLouvain. +// Licensed under the GNU Lesser General Public License (version 3 or later). +// Created by: S. Roiser (May 2025) for the MG5aMC CUDACPP plugin. +// Further modified by: ... for the MG5aMC CUDACPP plugin. + + +#ifndef MG5_CONFIG_SIGMA_SM_GG_TTXUUX_H +#define MG5_CONFIG_SIGMA_SM_GG_TTXUUX_H 1 + +namespace processConfig { + + constexpr int ndiagrams = 36; + +} + +#endif // MG5_CONFIG_SIGMA_SM_GG_TTXUUX_H \ No newline at end of file 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 ac4bf091b7..5dfcf73aff 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 @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -25,6 +25,7 @@ #include "MemoryAccessMatrixElements.h" #include "MemoryAccessMomenta.h" #include "MemoryAccessWavefunctions.h" +#include "processConfig.h" #ifdef MGONGPU_SUPPORTS_MULTICHANNEL #include "MemoryAccessDenominators.h" @@ -99,6 +100,69 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { +#ifdef MGONGPU_SUPPORTS_MULTICHANNEL + __device__ INLINE unsigned int getChannelId( const unsigned int* allChannelIds +#ifndef MGONGPUCPP_GPUIMPL + , + const int ievt00, + bool sanityCheckMixedPrecision = true +#endif + ) + { + unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr +#ifdef MGONGPUCPP_GPUIMPL + using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page + if( allChannelIds != nullptr ) + { + const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) + const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) + // NB: channelIds_sv is a scalar in CUDA + channelId = channelIds_sv; + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + } +#else // Cuda or C++ + using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + if( allChannelIds != nullptr ) + { + // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) + const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 + uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) +#ifndef MGONGPU_CPPSIMD + // NB: channelIds_sv is a scalar in no-SIMD C++ + channelId = channelIds_sv; +#else + // NB: channelIds_sv is a vector in SIMD C++ + channelId = channelIds_sv[0]; // element[0] + for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] + { + assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId + } +#endif + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + if( sanityCheckMixedPrecision ) + { +#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT + // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) + const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 + uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + for( int i = 0; i < neppV; ++i ) + { + assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector + } +#endif + } + } +#endif // MGONGPUCPP_GPUIMPL + return channelId; + } +#endif // MGONGPU_SUPPORTS_MULTICHANNEL + constexpr int nw6 = CPPProcess::nw6; // dimensions of each wavefunction (HELAS KEK 91-11): e.g. 6 for e+ e- -> mu+ mu- (fermions and vectors) constexpr int npar = CPPProcess::npar; // #particles in total (external = initial + final): e.g. 4 for e+ e- -> mu+ mu- constexpr int ncomb = CPPProcess::ncomb; // #helicity combinations: e.g. 16 for e+ e- -> mu+ mu- (2**4 = fermion spin up/down ** npar) @@ -308,7 +372,7 @@ namespace mg5amcCpu COUPs[ndcoup + iicoup] = allCOUPs[ndcoup + iicoup]; // independent couplings, fixed for all events fptype* MEs = E_ACCESS::ieventAccessRecord( allMEs, ievt0 ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); #endif #endif @@ -318,7 +382,7 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Numerators and denominators for the current event (CUDA) or SIMD event page (C++) - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); #endif @@ -344,8 +408,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1 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] ); + if( channelId != 0 ) + { + numerators_sv[0] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] -= 1. / 6. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[5] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -360,8 +427,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 2 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] ); + if( channelId != 0 ) + { + numerators_sv[1] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[4] -= 1. / 6. * cxtype( 0, 1 ) * amp_sv[0]; @@ -376,8 +446,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 3 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] ); + if( channelId != 0 ) + { + numerators_sv[2] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] -= 1. / 2. * amp_sv[0]; jamp_sv[5] += 1. / 2. * amp_sv[0]; @@ -392,8 +465,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 4 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] ); + if( channelId != 0 ) + { + numerators_sv[3] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[3] -= 1. / 6. * cxtype( 0, 1 ) * amp_sv[0]; @@ -408,8 +484,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 5 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] ); + if( channelId != 0 ) + { + numerators_sv[4] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[3] -= 1. / 6. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[5] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -425,8 +504,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 6 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] ); + if( channelId != 0 ) + { + numerators_sv[5] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= 1. / 2. * amp_sv[0]; jamp_sv[3] += 1. / 6. * amp_sv[0]; @@ -440,8 +522,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 7 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] ); + if( channelId != 0 ) + { + numerators_sv[6] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= 1. / 2. * amp_sv[0]; jamp_sv[1] += 1. / 6. * amp_sv[0]; @@ -454,8 +539,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 8 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] ); + if( channelId != 0 ) + { + numerators_sv[7] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += 1. / 6. * amp_sv[0]; jamp_sv[2] -= 1. / 2. * amp_sv[0]; @@ -468,8 +556,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 9 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] ); + if( channelId != 0 ) + { + numerators_sv[8] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] -= 1. / 2. * amp_sv[0]; jamp_sv[3] += 1. / 6. * amp_sv[0]; @@ -482,8 +573,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 10 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] ); + if( channelId != 0 ) + { + numerators_sv[9] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[2] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -497,8 +591,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 11 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] ); + if( channelId != 0 ) + { + numerators_sv[10] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[7] -= 1. / 2. * amp_sv[0]; jamp_sv[11] += 1. / 6. * amp_sv[0]; @@ -511,8 +608,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 12 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] ); + if( channelId != 0 ) + { + numerators_sv[11] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += 1. / 6. * amp_sv[0]; jamp_sv[8] -= 1. / 2. * amp_sv[0]; @@ -525,8 +625,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 13 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] ); + if( channelId != 0 ) + { + numerators_sv[12] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += 1. / 6. * amp_sv[0]; jamp_sv[7] -= 1. / 2. * amp_sv[0]; @@ -539,8 +642,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 14 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] ); + if( channelId != 0 ) + { + numerators_sv[13] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[8] -= 1. / 2. * amp_sv[0]; jamp_sv[11] += 1. / 6. * amp_sv[0]; @@ -553,8 +659,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 15 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] ); + if( channelId != 0 ) + { + numerators_sv[14] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[7] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[8] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -568,8 +677,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 16 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] ); + if( channelId != 0 ) + { + numerators_sv[15] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[6] += 1. / 6. * amp_sv[0]; jamp_sv[7] -= 1. / 2. * amp_sv[0]; @@ -582,8 +694,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 17 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] ); + if( channelId != 0 ) + { + numerators_sv[16] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[5] -= 1. / 2. * amp_sv[0]; jamp_sv[6] += 1. / 6. * amp_sv[0]; @@ -596,8 +711,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 18 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] ); + if( channelId != 0 ) + { + numerators_sv[17] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] += 1. / 6. * amp_sv[0]; jamp_sv[7] -= 1. / 2. * amp_sv[0]; @@ -610,8 +728,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 19 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] ); + if( channelId != 0 ) + { + numerators_sv[18] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] += 1. / 6. * amp_sv[0]; jamp_sv[5] -= 1. / 2. * amp_sv[0]; @@ -624,8 +745,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 20 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] ); + if( channelId != 0 ) + { + numerators_sv[19] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[5] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[7] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -639,8 +763,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 21 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] ); + if( channelId != 0 ) + { + numerators_sv[20] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[6] += 1. / 6. * amp_sv[0]; jamp_sv[10] -= 1. / 2. * amp_sv[0]; @@ -653,8 +780,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 22 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] ); + if( channelId != 0 ) + { + numerators_sv[21] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= 1. / 2. * amp_sv[0]; jamp_sv[6] += 1. / 6. * amp_sv[0]; @@ -667,8 +797,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 23 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] ); + if( channelId != 0 ) + { + numerators_sv[22] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= 1. / 2. * amp_sv[0]; jamp_sv[9] += 1. / 6. * amp_sv[0]; @@ -681,8 +814,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 24 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] ); + if( channelId != 0 ) + { + numerators_sv[23] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[9] += 1. / 6. * amp_sv[0]; jamp_sv[10] -= 1. / 2. * amp_sv[0]; @@ -695,8 +831,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 25 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] ); + if( channelId != 0 ) + { + numerators_sv[24] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[10] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -709,8 +848,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 26 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] ); + if( channelId != 0 ) + { + numerators_sv[25] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[10] -= 1. / 2. * amp_sv[0]; jamp_sv[11] += 1. / 6. * amp_sv[0]; @@ -723,8 +865,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 27 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] ); + if( channelId != 0 ) + { + numerators_sv[26] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[7] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[10] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -737,8 +882,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 28 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] ); + if( channelId != 0 ) + { + numerators_sv[27] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[3] += 1. / 6. * amp_sv[0]; jamp_sv[5] -= 1. / 2. * amp_sv[0]; @@ -751,8 +899,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 29 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] ); + if( channelId != 0 ) + { + numerators_sv[28] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[5] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -765,8 +916,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 30 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] ); + if( channelId != 0 ) + { + numerators_sv[29] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[8] -= 1. / 2. * amp_sv[0]; jamp_sv[9] += 1. / 6. * amp_sv[0]; @@ -779,8 +933,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 31 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] ); + if( channelId != 0 ) + { + numerators_sv[30] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[8] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -793,8 +950,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 32 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] ); + if( channelId != 0 ) + { + numerators_sv[31] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] -= 1. / 2. * amp_sv[0]; jamp_sv[4] += 1. / 6. * amp_sv[0]; @@ -807,8 +967,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 33 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] ); + if( channelId != 0 ) + { + numerators_sv[32] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[7] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -843,8 +1006,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 35 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] ); + if( channelId != 0 ) + { + numerators_sv[34] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 2. * amp_sv[0]; jamp_sv[2] -= 1. / 2. * amp_sv[0]; @@ -859,8 +1025,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 36 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] ); + if( channelId != 0 ) + { + numerators_sv[35] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 2. * amp_sv[0]; jamp_sv[5] -= 1. / 2. * amp_sv[0]; @@ -1113,7 +1282,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- @@ -1485,9 +1656,6 @@ namespace mg5amcCpu #ifdef MGONGPUCPP_GPUIMPL // Remember: in CUDA this is a kernel for one event, in c++ this processes n events const int ievt = blockDim.x * blockIdx.x + threadIdx.x; // index of event (thread) in grid -#ifdef MGONGPU_SUPPORTS_MULTICHANNEL - using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events -#endif #else //assert( (size_t)(allmomenta) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] //assert( (size_t)(allMEs) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] @@ -1495,7 +1663,6 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL using NUM_ACCESS = HostAccessNumerators; // non-trivial access: buffer includes all events using DEN_ACCESS = HostAccessDenominators; // non-trivial access: buffer includes all events - using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events #endif #endif @@ -1520,11 +1687,12 @@ namespace mg5amcCpu fptype_sv& MEs_sv = E_ACCESS::kernelAccess( MEs ); MEs_sv = fptype_sv{ 0 }; #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - numerators_sv = fptype_sv{ 0 }; + for( int i = 0; i < processConfig::ndiagrams; ++i ) + numerators_sv[i] = fptype_sv{ 0 }; denominators_sv = fptype_sv{ 0 }; #endif } @@ -1537,17 +1705,7 @@ namespace mg5amcCpu // *** START OF PART 1a - CUDA (one event per GPU thread) *** #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) - const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) - // NB: channelIds_sv is a scalar in CUDA - channelId = channelIds_sv; - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) - } + unsigned int channelId = getChannelId( allChannelIds ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (for the single event processed in calculate_wavefunctions) @@ -1662,38 +1820,7 @@ namespace mg5amcCpu const int ievt00 = ipagV2 * neppV; // loop on one SIMD page (neppV events) at a time #endif #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) - const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 - uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) -#ifndef MGONGPU_CPPSIMD - // NB: channelIds_sv is a scalar in no-SIMD C++ - channelId = channelIds_sv; -#else - // NB: channelIds_sv is a vector in SIMD C++ - channelId = channelIds_sv[0]; // element[0] - for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] - { - assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId - } -#endif - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) -#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT - // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) - const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 - uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - for( int i = 0; i < neppV; ++i ) - { - assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector - } -#endif - } + unsigned int channelId = getChannelId( allChannelIds, ievt00 ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (jamp2[nParity][ncolor][neppV] for the SIMD vector - or the two SIMD vectors - of events processed in calculate_wavefunctions) @@ -1866,11 +1993,12 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( allChannelIds != nullptr ) // fix segfault #892 (not 'channelIds[0] != 0') { - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + const unsigned int channelId = getChannelId( allChannelIds, ievt0, false ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - MEs_sv *= numerators_sv / denominators_sv; + MEs_sv *= numerators_sv[channelId - 1] / denominators_sv; } #endif //for( int ieppV = 0; ieppV < neppV; ieppV++ ) diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gu_ttxgu/CPPProcess.h b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gu_ttxgu/CPPProcess.h index f75309f403..e28fbf6ae7 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gu_ttxgu/CPPProcess.h +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gu_ttxgu/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gu_ttxgu/auto_dsig.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gu_ttxgu/auto_dsig.f index 47e378e255..288bf58446 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gu_ttxgu/auto_dsig.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gu_ttxgu/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C 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 756e98881c..fa7524e559 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 @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -140,14 +140,14 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDDO QSCALE=QSCALE/2D0 ELSE - QSCALE=DSQRT(Q2FACT(IB(1))) + QSCALE=DSQRT(Q2FACT(1)) ENDIF G1=PDG2PDF(LPP(IB(1)),0, IB(1),XBK(IB(1)), QSCALE) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) IF (DSQRT(Q2FACT(IB(2))).NE.0D0) THEN - QSCALE=DSQRT(Q2FACT(IB(2))) + QSCALE=DSQRT(Q2FACT(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) @@ -234,7 +234,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -309,6 +309,10 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, INTEGER I_EE C +C STUFF FOR UPC +C + DOUBLE PRECISION PHOTONPDFSQUARE +C C EXTERNAL FUNCTIONS C LOGICAL PASSCUTS @@ -393,18 +397,18 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, IF (ABS(LPP(IB(1))).GE.1) THEN C LP=SIGN(1,LPP(IB(1))) G1(IVEC)=PDG2PDF(LPP(IB(1)),0, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) D2(IVEC)=PDG2PDF(LPP(IB(2)),1, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) U2(IVEC)=PDG2PDF(LPP(IB(2)),2, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) S2(IVEC)=PDG2PDF(LPP(IB(2)),3, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) C2(IVEC)=PDG2PDF(LPP(IB(2)),4, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) ENDIF ENDDO ! IWARP LOOP ENDDO ! CURRWARP LOOP 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 0079f40417..ea95753e80 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 @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -358,7 +358,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -404,7 +404,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C INTEGER I,J,M,N COMPLEX*16 ZTEMP, TMP_JAMP(17) - REAL*8 CF(NCOLOR,NCOLOR) + INTEGER CF(NCOLOR*(NCOLOR+1)/2) + INTEGER DENOM, CF_INDEX COMPLEX*16 AMP(NGRAPHS), JAMP(NCOLOR,NAMPSO) COMPLEX*16 W(6,NWAVEFUNCS) C Needed for v4 models @@ -447,101 +448,30 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C C COLOR DATA C - DATA (CF(I, 1),I= 1, 6) /1.600000000000000D+01 - $ ,5.333333333333333D+00,0.000000000000000D+00,5.333333333333333D - $ +00,-6.666666666666666D-01,0.000000000000000D+00/ - DATA (CF(I, 1),I= 7, 12) /5.333333333333333D+00 - $ ,2.000000000000000D+00,0.000000000000000D+00,5.333333333333333D - $ +00,0.000000000000000D+00,-6.666666666666666D-01/ + DATA DENOM/3/ + DATA (CF(I),I= 1, 12) /48,32,0,32,-4,0,32,12,0,32,0,-4/ C 1 T(1,3,2) T(5,6,4) - DATA (CF(I, 2),I= 1, 6) /5.333333333333333D+00 - $ ,1.600000000000000D+01,5.333333333333333D+00,0.000000000000000D - $ +00,0.000000000000000D+00,-6.666666666666666D-01/ - DATA (CF(I, 2),I= 7, 12) /2.000000000000000D+00 - $ ,5.333333333333333D+00,5.333333333333333D+00,0.000000000000000D - $ +00,-6.666666666666666D-01,0.000000000000000D+00/ + DATA (CF(I),I= 13, 23) /48,32,0,0,-4,12,32,32,0,-4,0/ C 1 T(1,3,4) T(5,6,2) - DATA (CF(I, 3),I= 1, 6) /0.000000000000000D+00 - $ ,5.333333333333333D+00,1.600000000000000D+01,5.333333333333333D - $ +00,5.333333333333333D+00,2.000000000000000D+00/ - DATA (CF(I, 3),I= 7, 12) /-6.666666666666666D-01 - $ ,0.000000000000000D+00,2.000000000000000D+00, - $ -6.666666666666666D-01,-2.000000000000000D+00, - $ -6.666666666666666D-01/ + DATA (CF(I),I= 24, 33) /48,32,32,12,-4,0,12,-4,-12,-4/ C 1 T(1,5,3,2) T(6,4) - DATA (CF(I, 4),I= 1, 6) /5.333333333333333D+00 - $ ,0.000000000000000D+00,5.333333333333333D+00,1.600000000000000D - $ +01,2.000000000000000D+00,5.333333333333333D+00/ - DATA (CF(I, 4),I= 7, 12) /0.000000000000000D+00, - $ -6.666666666666666D-01,-6.666666666666666D-01 - $ ,2.000000000000000D+00,-6.666666666666666D-01, - $ -2.000000000000000D+00/ + DATA (CF(I),I= 34, 42) /48,12,32,0,-4,-4,12,-4,-12/ C 1 T(1,5,3,4) T(6,2) - DATA (CF(I, 5),I= 1, 6) /-6.666666666666666D-01 - $ ,0.000000000000000D+00,5.333333333333333D+00,2.000000000000000D - $ +00,1.600000000000000D+01,5.333333333333333D+00/ - DATA (CF(I, 5),I= 7, 12) /0.000000000000000D+00 - $ ,5.333333333333333D+00,-6.666666666666666D-01, - $ -2.000000000000000D+00,-6.666666666666666D-01 - $ ,2.000000000000000D+00/ + DATA (CF(I),I= 43, 50) /48,32,0,32,-4,-12,-4,12/ C 1 T(1,5,6,2) T(3,4) - DATA (CF(I, 6),I= 1, 6) /0.000000000000000D+00, - $ -6.666666666666666D-01,2.000000000000000D+00,5.333333333333333D - $ +00,5.333333333333333D+00,1.600000000000000D+01/ - DATA (CF(I, 6),I= 7, 12) /5.333333333333333D+00 - $ ,0.000000000000000D+00,-2.000000000000000D+00, - $ -6.666666666666666D-01,2.000000000000000D+00, - $ -6.666666666666666D-01/ + DATA (CF(I),I= 51, 57) /48,32,0,-12,-4,12,-4/ C 1 T(1,5,6,4) T(3,2) - DATA (CF(I, 7),I= 1, 6) /5.333333333333333D+00 - $ ,2.000000000000000D+00,-6.666666666666666D-01 - $ ,0.000000000000000D+00,0.000000000000000D+00,5.333333333333333D - $ +00/ - DATA (CF(I, 7),I= 7, 12) /1.600000000000000D+01 - $ ,5.333333333333333D+00,-6.666666666666666D-01 - $ ,0.000000000000000D+00,5.333333333333333D+00,0.000000000000000D - $ +00/ + DATA (CF(I),I= 58, 63) /48,32,-4,0,32,0/ C 1 T(1,6,2) T(5,3,4) - DATA (CF(I, 8),I= 1, 6) /2.000000000000000D+00 - $ ,5.333333333333333D+00,0.000000000000000D+00, - $ -6.666666666666666D-01,5.333333333333333D+00,0.000000000000000D - $ +00/ - DATA (CF(I, 8),I= 7, 12) /5.333333333333333D+00 - $ ,1.600000000000000D+01,0.000000000000000D+00, - $ -6.666666666666666D-01,0.000000000000000D+00,5.333333333333333D - $ +00/ + DATA (CF(I),I= 64, 68) /48,0,-4,0,32/ C 1 T(1,6,4) T(5,3,2) - DATA (CF(I, 9),I= 1, 6) /0.000000000000000D+00 - $ ,5.333333333333333D+00,2.000000000000000D+00, - $ -6.666666666666666D-01,-6.666666666666666D-01, - $ -2.000000000000000D+00/ - DATA (CF(I, 9),I= 7, 12) /-6.666666666666666D-01 - $ ,0.000000000000000D+00,1.600000000000000D+01,5.333333333333333D - $ +00,2.000000000000000D+00,5.333333333333333D+00/ + DATA (CF(I),I= 69, 72) /48,32,12,32/ C 1 T(3,2) T(5,1,6,4) - DATA (CF(I, 10),I= 1, 6) /5.333333333333333D+00 - $ ,0.000000000000000D+00,-6.666666666666666D-01 - $ ,2.000000000000000D+00,-2.000000000000000D+00, - $ -6.666666666666666D-01/ - DATA (CF(I, 10),I= 7, 12) /0.000000000000000D+00, - $ -6.666666666666666D-01,5.333333333333333D+00,1.600000000000000D - $ +01,5.333333333333333D+00,2.000000000000000D+00/ + DATA (CF(I),I= 73, 75) /48,32,12/ C 1 T(3,4) T(5,1,6,2) - DATA (CF(I, 11),I= 1, 6) /0.000000000000000D+00, - $ -6.666666666666666D-01,-2.000000000000000D+00, - $ -6.666666666666666D-01,-6.666666666666666D-01 - $ ,2.000000000000000D+00/ - DATA (CF(I, 11),I= 7, 12) /5.333333333333333D+00 - $ ,0.000000000000000D+00,2.000000000000000D+00,5.333333333333333D - $ +00,1.600000000000000D+01,5.333333333333333D+00/ + DATA (CF(I),I= 76, 77) /48,32/ C 1 T(5,1,3,2) T(6,4) - DATA (CF(I, 12),I= 1, 6) /-6.666666666666666D-01 - $ ,0.000000000000000D+00,-6.666666666666666D-01, - $ -2.000000000000000D+00,2.000000000000000D+00, - $ -6.666666666666666D-01/ - DATA (CF(I, 12),I= 7, 12) /0.000000000000000D+00 - $ ,5.333333333333333D+00,5.333333333333333D+00,2.000000000000000D - $ +00,5.333333333333333D+00,1.600000000000000D+01/ + DATA (CF(I),I= 78, 78) /48/ C 1 T(5,1,3,4) T(6,2) C ---------- C BEGIN CODE @@ -761,10 +691,12 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) MATRIX1 = 0.D0 DO M = 1, NAMPSO + CF_INDEX = 0 DO I = 1, NCOLOR ZTEMP = (0.D0,0.D0) - DO J = 1, NCOLOR - ZTEMP = ZTEMP + CF(J,I)*JAMP(J,M) + DO J = I, NCOLOR + CF_INDEX = CF_INDEX + 1 + ZTEMP = ZTEMP + CF(CF_INDEX)*JAMP(J,M) ENDDO DO N = 1, NAMPSO @@ -773,6 +705,7 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) ENDDO ENDDO ENDDO + MATRIX1 = MATRIX1/DENOM IF(SDE_STRAT.EQ.1)THEN AMP2(1)=AMP2(1)+AMP(1)*DCONJG(AMP(1)) diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gu_ttxgu/matrix11.png b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gu_ttxgu/matrix11.png new file mode 100644 index 0000000000..b417fbef65 Binary files /dev/null and b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gu_ttxgu/matrix11.png differ diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gu_ttxgu/matrix12.png b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gu_ttxgu/matrix12.png new file mode 100644 index 0000000000..821960ed19 Binary files /dev/null and b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gu_ttxgu/matrix12.png differ diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gu_ttxgu/processConfig.h b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gu_ttxgu/processConfig.h new file mode 100644 index 0000000000..f7b8795d98 --- /dev/null +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gu_ttxgu/processConfig.h @@ -0,0 +1,16 @@ +// Copyright (C) 2025 CERN and UCLouvain. +// Licensed under the GNU Lesser General Public License (version 3 or later). +// Created by: S. Roiser (May 2025) for the MG5aMC CUDACPP plugin. +// Further modified by: ... for the MG5aMC CUDACPP plugin. + + +#ifndef MG5_CONFIG_SIGMA_SM_GU_TTXGU_H +#define MG5_CONFIG_SIGMA_SM_GU_TTXGU_H 1 + +namespace processConfig { + + constexpr int ndiagrams = 36; + +} + +#endif // MG5_CONFIG_SIGMA_SM_GU_TTXGU_H \ No newline at end of file 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 acf1b836af..278550b7df 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 @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -25,6 +25,7 @@ #include "MemoryAccessMatrixElements.h" #include "MemoryAccessMomenta.h" #include "MemoryAccessWavefunctions.h" +#include "processConfig.h" #ifdef MGONGPU_SUPPORTS_MULTICHANNEL #include "MemoryAccessDenominators.h" @@ -99,6 +100,69 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { +#ifdef MGONGPU_SUPPORTS_MULTICHANNEL + __device__ INLINE unsigned int getChannelId( const unsigned int* allChannelIds +#ifndef MGONGPUCPP_GPUIMPL + , + const int ievt00, + bool sanityCheckMixedPrecision = true +#endif + ) + { + unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr +#ifdef MGONGPUCPP_GPUIMPL + using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page + if( allChannelIds != nullptr ) + { + const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) + const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) + // NB: channelIds_sv is a scalar in CUDA + channelId = channelIds_sv; + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + } +#else // Cuda or C++ + using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + if( allChannelIds != nullptr ) + { + // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) + const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 + uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) +#ifndef MGONGPU_CPPSIMD + // NB: channelIds_sv is a scalar in no-SIMD C++ + channelId = channelIds_sv; +#else + // NB: channelIds_sv is a vector in SIMD C++ + channelId = channelIds_sv[0]; // element[0] + for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] + { + assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId + } +#endif + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + if( sanityCheckMixedPrecision ) + { +#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT + // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) + const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 + uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + for( int i = 0; i < neppV; ++i ) + { + assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector + } +#endif + } + } +#endif // MGONGPUCPP_GPUIMPL + return channelId; + } +#endif // MGONGPU_SUPPORTS_MULTICHANNEL + constexpr int nw6 = CPPProcess::nw6; // dimensions of each wavefunction (HELAS KEK 91-11): e.g. 6 for e+ e- -> mu+ mu- (fermions and vectors) constexpr int npar = CPPProcess::npar; // #particles in total (external = initial + final): e.g. 4 for e+ e- -> mu+ mu- constexpr int ncomb = CPPProcess::ncomb; // #helicity combinations: e.g. 16 for e+ e- -> mu+ mu- (2**4 = fermion spin up/down ** npar) @@ -308,7 +372,7 @@ namespace mg5amcCpu COUPs[ndcoup + iicoup] = allCOUPs[ndcoup + iicoup]; // independent couplings, fixed for all events fptype* MEs = E_ACCESS::ieventAccessRecord( allMEs, ievt0 ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); #endif #endif @@ -318,7 +382,7 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Numerators and denominators for the current event (CUDA) or SIMD event page (C++) - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); #endif @@ -344,8 +408,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1 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] ); + if( channelId != 0 ) + { + numerators_sv[0] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[5] += 1. / 6. * cxtype( 0, 1 ) * amp_sv[0]; @@ -360,8 +427,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 2 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] ); + if( channelId != 0 ) + { + numerators_sv[1] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[5] += 1. / 6. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[7] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -376,8 +446,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 3 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] ); + if( channelId != 0 ) + { + numerators_sv[2] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] -= 1. / 2. * amp_sv[0]; jamp_sv[7] += 1. / 2. * amp_sv[0]; @@ -392,8 +465,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 4 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] ); + if( channelId != 0 ) + { + numerators_sv[3] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[6] += 1. / 6. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[7] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -408,8 +484,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 5 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] ); + if( channelId != 0 ) + { + numerators_sv[4] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[6] += 1. / 6. * cxtype( 0, 1 ) * amp_sv[0]; @@ -425,8 +504,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 6 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] ); + if( channelId != 0 ) + { + numerators_sv[5] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[3] += 1. / 2. * amp_sv[0]; jamp_sv[6] -= 1. / 6. * amp_sv[0]; @@ -440,8 +522,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 7 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] ); + if( channelId != 0 ) + { + numerators_sv[6] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] -= 1. / 6. * amp_sv[0]; jamp_sv[3] += 1. / 2. * amp_sv[0]; @@ -454,8 +539,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 8 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] ); + if( channelId != 0 ) + { + numerators_sv[7] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] -= 1. / 6. * amp_sv[0]; jamp_sv[7] += 1. / 2. * amp_sv[0]; @@ -468,8 +556,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 9 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] ); + if( channelId != 0 ) + { + numerators_sv[8] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[6] -= 1. / 6. * amp_sv[0]; jamp_sv[7] += 1. / 2. * amp_sv[0]; @@ -482,8 +573,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 10 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] ); + if( channelId != 0 ) + { + numerators_sv[9] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[3] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[7] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -497,8 +591,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 11 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] ); + if( channelId != 0 ) + { + numerators_sv[10] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 2. * amp_sv[0]; jamp_sv[9] -= 1. / 6. * amp_sv[0]; @@ -511,8 +608,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 12 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] ); + if( channelId != 0 ) + { + numerators_sv[11] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] -= 1. / 6. * amp_sv[0]; jamp_sv[11] += 1. / 2. * amp_sv[0]; @@ -525,8 +625,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 13 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] ); + if( channelId != 0 ) + { + numerators_sv[12] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 2. * amp_sv[0]; jamp_sv[2] -= 1. / 6. * amp_sv[0]; @@ -539,8 +642,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 14 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] ); + if( channelId != 0 ) + { + numerators_sv[13] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[9] -= 1. / 6. * amp_sv[0]; jamp_sv[11] += 1. / 2. * amp_sv[0]; @@ -553,8 +659,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 15 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] ); + if( channelId != 0 ) + { + numerators_sv[14] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[11] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -568,8 +677,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 16 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] ); + if( channelId != 0 ) + { + numerators_sv[15] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 2. * amp_sv[0]; jamp_sv[1] -= 1. / 6. * amp_sv[0]; @@ -582,8 +694,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 17 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] ); + if( channelId != 0 ) + { + numerators_sv[16] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] -= 1. / 6. * amp_sv[0]; jamp_sv[4] += 1. / 2. * amp_sv[0]; @@ -596,8 +711,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 18 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] ); + if( channelId != 0 ) + { + numerators_sv[17] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 2. * amp_sv[0]; jamp_sv[5] -= 1. / 6. * amp_sv[0]; @@ -610,8 +728,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 19 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] ); + if( channelId != 0 ) + { + numerators_sv[18] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] += 1. / 2. * amp_sv[0]; jamp_sv[5] -= 1. / 6. * amp_sv[0]; @@ -624,8 +745,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 20 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] ); + if( channelId != 0 ) + { + numerators_sv[19] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[4] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -639,8 +763,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 21 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] ); + if( channelId != 0 ) + { + numerators_sv[20] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] -= 1. / 6. * amp_sv[0]; jamp_sv[8] += 1. / 2. * amp_sv[0]; @@ -653,8 +780,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 22 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] ); + if( channelId != 0 ) + { + numerators_sv[21] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] -= 1. / 6. * amp_sv[0]; jamp_sv[3] += 1. / 2. * amp_sv[0]; @@ -667,8 +797,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 23 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] ); + if( channelId != 0 ) + { + numerators_sv[22] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[3] += 1. / 2. * amp_sv[0]; jamp_sv[10] -= 1. / 6. * amp_sv[0]; @@ -681,8 +814,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 24 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] ); + if( channelId != 0 ) + { + numerators_sv[23] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[8] += 1. / 2. * amp_sv[0]; jamp_sv[10] -= 1. / 6. * amp_sv[0]; @@ -695,8 +831,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 25 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] ); + if( channelId != 0 ) + { + numerators_sv[24] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[3] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[8] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -709,8 +848,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 26 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] ); + if( channelId != 0 ) + { + numerators_sv[25] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[8] += 1. / 2. * amp_sv[0]; jamp_sv[9] -= 1. / 6. * amp_sv[0]; @@ -723,8 +865,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 27 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] ); + if( channelId != 0 ) + { + numerators_sv[26] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[8] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -737,8 +882,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 28 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] ); + if( channelId != 0 ) + { + numerators_sv[27] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] += 1. / 2. * amp_sv[0]; jamp_sv[6] -= 1. / 6. * amp_sv[0]; @@ -751,8 +899,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 29 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] ); + if( channelId != 0 ) + { + numerators_sv[28] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[3] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[4] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -765,8 +916,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 30 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] ); + if( channelId != 0 ) + { + numerators_sv[29] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[10] -= 1. / 6. * amp_sv[0]; jamp_sv[11] += 1. / 2. * amp_sv[0]; @@ -779,8 +933,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 31 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] ); + if( channelId != 0 ) + { + numerators_sv[30] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[3] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[11] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -793,8 +950,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 32 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] ); + if( channelId != 0 ) + { + numerators_sv[31] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[5] -= 1. / 6. * amp_sv[0]; jamp_sv[7] += 1. / 2. * amp_sv[0]; @@ -807,8 +967,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 33 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] ); + if( channelId != 0 ) + { + numerators_sv[32] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[7] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -843,8 +1006,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 35 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] ); + if( channelId != 0 ) + { + numerators_sv[34] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= 1. / 2. * amp_sv[0]; jamp_sv[3] -= 1. / 2. * amp_sv[0]; @@ -859,8 +1025,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 36 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] ); + if( channelId != 0 ) + { + numerators_sv[35] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= 1. / 2. * amp_sv[0]; jamp_sv[3] -= 1. / 2. * amp_sv[0]; @@ -1113,7 +1282,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- @@ -1485,9 +1656,6 @@ namespace mg5amcCpu #ifdef MGONGPUCPP_GPUIMPL // Remember: in CUDA this is a kernel for one event, in c++ this processes n events const int ievt = blockDim.x * blockIdx.x + threadIdx.x; // index of event (thread) in grid -#ifdef MGONGPU_SUPPORTS_MULTICHANNEL - using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events -#endif #else //assert( (size_t)(allmomenta) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] //assert( (size_t)(allMEs) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] @@ -1495,7 +1663,6 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL using NUM_ACCESS = HostAccessNumerators; // non-trivial access: buffer includes all events using DEN_ACCESS = HostAccessDenominators; // non-trivial access: buffer includes all events - using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events #endif #endif @@ -1520,11 +1687,12 @@ namespace mg5amcCpu fptype_sv& MEs_sv = E_ACCESS::kernelAccess( MEs ); MEs_sv = fptype_sv{ 0 }; #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - numerators_sv = fptype_sv{ 0 }; + for( int i = 0; i < processConfig::ndiagrams; ++i ) + numerators_sv[i] = fptype_sv{ 0 }; denominators_sv = fptype_sv{ 0 }; #endif } @@ -1537,17 +1705,7 @@ namespace mg5amcCpu // *** START OF PART 1a - CUDA (one event per GPU thread) *** #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) - const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) - // NB: channelIds_sv is a scalar in CUDA - channelId = channelIds_sv; - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) - } + unsigned int channelId = getChannelId( allChannelIds ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (for the single event processed in calculate_wavefunctions) @@ -1662,38 +1820,7 @@ namespace mg5amcCpu const int ievt00 = ipagV2 * neppV; // loop on one SIMD page (neppV events) at a time #endif #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) - const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 - uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) -#ifndef MGONGPU_CPPSIMD - // NB: channelIds_sv is a scalar in no-SIMD C++ - channelId = channelIds_sv; -#else - // NB: channelIds_sv is a vector in SIMD C++ - channelId = channelIds_sv[0]; // element[0] - for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] - { - assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId - } -#endif - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) -#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT - // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) - const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 - uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - for( int i = 0; i < neppV; ++i ) - { - assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector - } -#endif - } + unsigned int channelId = getChannelId( allChannelIds, ievt00 ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (jamp2[nParity][ncolor][neppV] for the SIMD vector - or the two SIMD vectors - of events processed in calculate_wavefunctions) @@ -1866,11 +1993,12 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( allChannelIds != nullptr ) // fix segfault #892 (not 'channelIds[0] != 0') { - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + const unsigned int channelId = getChannelId( allChannelIds, ievt0, false ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - MEs_sv *= numerators_sv / denominators_sv; + MEs_sv *= numerators_sv[channelId - 1] / denominators_sv; } #endif //for( int ieppV = 0; ieppV < neppV; ieppV++ ) diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gux_ttxgux/CPPProcess.h b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gux_ttxgux/CPPProcess.h index 531d6bcd03..4e5177e8a0 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gux_ttxgux/CPPProcess.h +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gux_ttxgux/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gux_ttxgux/auto_dsig.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gux_ttxgux/auto_dsig.f index f13f023e7d..717940377e 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gux_ttxgux/auto_dsig.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gux_ttxgux/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C 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 a59705bfaf..b63b44cf5d 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 @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -140,14 +140,14 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDDO QSCALE=QSCALE/2D0 ELSE - QSCALE=DSQRT(Q2FACT(IB(1))) + QSCALE=DSQRT(Q2FACT(1)) ENDIF G1=PDG2PDF(LPP(IB(1)),0, IB(1),XBK(IB(1)), QSCALE) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) IF (DSQRT(Q2FACT(IB(2))).NE.0D0) THEN - QSCALE=DSQRT(Q2FACT(IB(2))) + QSCALE=DSQRT(Q2FACT(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) @@ -234,7 +234,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -309,6 +309,10 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, INTEGER I_EE C +C STUFF FOR UPC +C + DOUBLE PRECISION PHOTONPDFSQUARE +C C EXTERNAL FUNCTIONS C LOGICAL PASSCUTS @@ -393,18 +397,18 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, IF (ABS(LPP(IB(1))).GE.1) THEN C LP=SIGN(1,LPP(IB(1))) G1(IVEC)=PDG2PDF(LPP(IB(1)),0, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) CX2(IVEC)=PDG2PDF(LPP(IB(2)),-4, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) SX2(IVEC)=PDG2PDF(LPP(IB(2)),-3, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) UX2(IVEC)=PDG2PDF(LPP(IB(2)),-2, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) DX2(IVEC)=PDG2PDF(LPP(IB(2)),-1, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) ENDIF ENDDO ! IWARP LOOP ENDDO ! CURRWARP LOOP 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 7cd8b962cc..d4585f3289 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 @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -358,7 +358,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -404,7 +404,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C INTEGER I,J,M,N COMPLEX*16 ZTEMP, TMP_JAMP(17) - REAL*8 CF(NCOLOR,NCOLOR) + INTEGER CF(NCOLOR*(NCOLOR+1)/2) + INTEGER DENOM, CF_INDEX COMPLEX*16 AMP(NGRAPHS), JAMP(NCOLOR,NAMPSO) COMPLEX*16 W(6,NWAVEFUNCS) C Needed for v4 models @@ -447,99 +448,30 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C C COLOR DATA C - DATA (CF(I, 1),I= 1, 6) /1.600000000000000D+01 - $ ,5.333333333333333D+00,5.333333333333333D+00,2.000000000000000D - $ +00,0.000000000000000D+00,5.333333333333333D+00/ - DATA (CF(I, 1),I= 7, 12) /-6.666666666666666D-01 - $ ,0.000000000000000D+00,0.000000000000000D+00,5.333333333333333D - $ +00,-6.666666666666666D-01,0.000000000000000D+00/ + DATA DENOM/3/ + DATA (CF(I),I= 1, 12) /48,32,32,12,0,32,-4,0,0,32,-4,0/ C 1 T(1,2,4) T(5,3,6) - DATA (CF(I, 2),I= 1, 6) /5.333333333333333D+00 - $ ,1.600000000000000D+01,2.000000000000000D+00,5.333333333333333D - $ +00,5.333333333333333D+00,0.000000000000000D+00/ - DATA (CF(I, 2),I= 7, 12) /0.000000000000000D+00, - $ -6.666666666666666D-01,5.333333333333333D+00,0.000000000000000D - $ +00,0.000000000000000D+00,-6.666666666666666D-01/ + DATA (CF(I),I= 13, 23) /48,12,32,32,0,0,-4,32,0,0,-4/ C 1 T(1,2,6) T(5,3,4) - DATA (CF(I, 3),I= 1, 6) /5.333333333333333D+00 - $ ,2.000000000000000D+00,1.600000000000000D+01,5.333333333333333D - $ +00,-6.666666666666666D-01,0.000000000000000D+00/ - DATA (CF(I, 3),I= 7, 12) /0.000000000000000D+00 - $ ,5.333333333333333D+00,-6.666666666666666D-01 - $ ,0.000000000000000D+00,0.000000000000000D+00,5.333333333333333D - $ +00/ + DATA (CF(I),I= 24, 33) /48,32,-4,0,0,32,-4,0,0,32/ C 1 T(1,3,4) T(5,2,6) - DATA (CF(I, 4),I= 1, 6) /2.000000000000000D+00 - $ ,5.333333333333333D+00,5.333333333333333D+00,1.600000000000000D - $ +01,0.000000000000000D+00,-6.666666666666666D-01/ - DATA (CF(I, 4),I= 7, 12) /5.333333333333333D+00 - $ ,0.000000000000000D+00,0.000000000000000D+00, - $ -6.666666666666666D-01,5.333333333333333D+00,0.000000000000000D - $ +00/ + DATA (CF(I),I= 34, 42) /48,0,-4,32,0,0,-4,32,0/ C 1 T(1,3,6) T(5,2,4) - DATA (CF(I, 5),I= 1, 6) /0.000000000000000D+00 - $ ,5.333333333333333D+00,-6.666666666666666D-01 - $ ,0.000000000000000D+00,1.600000000000000D+01,5.333333333333333D - $ +00/ - DATA (CF(I, 5),I= 7, 12) /5.333333333333333D+00 - $ ,2.000000000000000D+00,2.000000000000000D+00, - $ -6.666666666666666D-01,-6.666666666666666D-01, - $ -2.000000000000000D+00/ + DATA (CF(I),I= 43, 50) /48,32,32,12,12,-4,-4,-12/ C 1 T(1,5,2,4) T(3,6) - DATA (CF(I, 6),I= 1, 6) /5.333333333333333D+00 - $ ,0.000000000000000D+00,0.000000000000000D+00, - $ -6.666666666666666D-01,5.333333333333333D+00,1.600000000000000D - $ +01/ - DATA (CF(I, 6),I= 7, 12) /2.000000000000000D+00 - $ ,5.333333333333333D+00,-6.666666666666666D-01 - $ ,2.000000000000000D+00,-2.000000000000000D+00, - $ -6.666666666666666D-01/ + DATA (CF(I),I= 51, 57) /48,12,32,-4,12,-12,-4/ C 1 T(1,5,2,6) T(3,4) - DATA (CF(I, 7),I= 1, 6) /-6.666666666666666D-01 - $ ,0.000000000000000D+00,0.000000000000000D+00,5.333333333333333D - $ +00,5.333333333333333D+00,2.000000000000000D+00/ - DATA (CF(I, 7),I= 7, 12) /1.600000000000000D+01 - $ ,5.333333333333333D+00,-6.666666666666666D-01, - $ -2.000000000000000D+00,2.000000000000000D+00, - $ -6.666666666666666D-01/ + DATA (CF(I),I= 58, 63) /48,32,-4,-12,12,-4/ C 1 T(1,5,3,4) T(2,6) - DATA (CF(I, 8),I= 1, 6) /0.000000000000000D+00, - $ -6.666666666666666D-01,5.333333333333333D+00,0.000000000000000D - $ +00,2.000000000000000D+00,5.333333333333333D+00/ - DATA (CF(I, 8),I= 7, 12) /5.333333333333333D+00 - $ ,1.600000000000000D+01,-2.000000000000000D+00, - $ -6.666666666666666D-01,-6.666666666666666D-01 - $ ,2.000000000000000D+00/ + DATA (CF(I),I= 64, 68) /48,-12,-4,-4,12/ C 1 T(1,5,3,6) T(2,4) - DATA (CF(I, 9),I= 1, 6) /0.000000000000000D+00 - $ ,5.333333333333333D+00,-6.666666666666666D-01 - $ ,0.000000000000000D+00,2.000000000000000D+00, - $ -6.666666666666666D-01/ - DATA (CF(I, 9),I= 7, 12) /-6.666666666666666D-01, - $ -2.000000000000000D+00,1.600000000000000D+01,5.333333333333333D - $ +00,5.333333333333333D+00,2.000000000000000D+00/ + DATA (CF(I),I= 69, 72) /48,32,32,12/ C 1 T(2,4) T(5,1,3,6) - DATA (CF(I, 10),I= 1, 6) /5.333333333333333D+00 - $ ,0.000000000000000D+00,0.000000000000000D+00, - $ -6.666666666666666D-01,-6.666666666666666D-01 - $ ,2.000000000000000D+00/ - DATA (CF(I, 10),I= 7, 12) /-2.000000000000000D+00, - $ -6.666666666666666D-01,5.333333333333333D+00,1.600000000000000D - $ +01,2.000000000000000D+00,5.333333333333333D+00/ + DATA (CF(I),I= 73, 75) /48,12,32/ C 1 T(2,6) T(5,1,3,4) - DATA (CF(I, 11),I= 1, 6) /-6.666666666666666D-01 - $ ,0.000000000000000D+00,0.000000000000000D+00,5.333333333333333D - $ +00,-6.666666666666666D-01,-2.000000000000000D+00/ - DATA (CF(I, 11),I= 7, 12) /2.000000000000000D+00, - $ -6.666666666666666D-01,5.333333333333333D+00,2.000000000000000D - $ +00,1.600000000000000D+01,5.333333333333333D+00/ + DATA (CF(I),I= 76, 77) /48,32/ C 1 T(3,4) T(5,1,2,6) - DATA (CF(I, 12),I= 1, 6) /0.000000000000000D+00, - $ -6.666666666666666D-01,5.333333333333333D+00,0.000000000000000D - $ +00,-2.000000000000000D+00,-6.666666666666666D-01/ - DATA (CF(I, 12),I= 7, 12) /-6.666666666666666D-01 - $ ,2.000000000000000D+00,2.000000000000000D+00,5.333333333333333D - $ +00,5.333333333333333D+00,1.600000000000000D+01/ + DATA (CF(I),I= 78, 78) /48/ C 1 T(3,6) T(5,1,2,4) C ---------- C BEGIN CODE @@ -758,10 +690,12 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) MATRIX1 = 0.D0 DO M = 1, NAMPSO + CF_INDEX = 0 DO I = 1, NCOLOR ZTEMP = (0.D0,0.D0) - DO J = 1, NCOLOR - ZTEMP = ZTEMP + CF(J,I)*JAMP(J,M) + DO J = I, NCOLOR + CF_INDEX = CF_INDEX + 1 + ZTEMP = ZTEMP + CF(CF_INDEX)*JAMP(J,M) ENDDO DO N = 1, NAMPSO @@ -770,6 +704,7 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) ENDDO ENDDO ENDDO + MATRIX1 = MATRIX1/DENOM IF(SDE_STRAT.EQ.1)THEN AMP2(1)=AMP2(1)+AMP(1)*DCONJG(AMP(1)) diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gux_ttxgux/matrix11.png b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gux_ttxgux/matrix11.png new file mode 100644 index 0000000000..f10365fe0f Binary files /dev/null and b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gux_ttxgux/matrix11.png differ diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gux_ttxgux/matrix12.png b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gux_ttxgux/matrix12.png new file mode 100644 index 0000000000..da244d34ca Binary files /dev/null and b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gux_ttxgux/matrix12.png differ diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gux_ttxgux/processConfig.h b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gux_ttxgux/processConfig.h new file mode 100644 index 0000000000..94a05c400f --- /dev/null +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gux_ttxgux/processConfig.h @@ -0,0 +1,16 @@ +// Copyright (C) 2025 CERN and UCLouvain. +// Licensed under the GNU Lesser General Public License (version 3 or later). +// Created by: S. Roiser (May 2025) for the MG5aMC CUDACPP plugin. +// Further modified by: ... for the MG5aMC CUDACPP plugin. + + +#ifndef MG5_CONFIG_SIGMA_SM_GUX_TTXGUX_H +#define MG5_CONFIG_SIGMA_SM_GUX_TTXGUX_H 1 + +namespace processConfig { + + constexpr int ndiagrams = 36; + +} + +#endif // MG5_CONFIG_SIGMA_SM_GUX_TTXGUX_H \ No newline at end of file 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 d34888db6a..05be30b53c 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 @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -25,6 +25,7 @@ #include "MemoryAccessMatrixElements.h" #include "MemoryAccessMomenta.h" #include "MemoryAccessWavefunctions.h" +#include "processConfig.h" #ifdef MGONGPU_SUPPORTS_MULTICHANNEL #include "MemoryAccessDenominators.h" @@ -101,6 +102,69 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { +#ifdef MGONGPU_SUPPORTS_MULTICHANNEL + __device__ INLINE unsigned int getChannelId( const unsigned int* allChannelIds +#ifndef MGONGPUCPP_GPUIMPL + , + const int ievt00, + bool sanityCheckMixedPrecision = true +#endif + ) + { + unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr +#ifdef MGONGPUCPP_GPUIMPL + using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page + if( allChannelIds != nullptr ) + { + const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) + const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) + // NB: channelIds_sv is a scalar in CUDA + channelId = channelIds_sv; + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + } +#else // Cuda or C++ + using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + if( allChannelIds != nullptr ) + { + // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) + const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 + uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) +#ifndef MGONGPU_CPPSIMD + // NB: channelIds_sv is a scalar in no-SIMD C++ + channelId = channelIds_sv; +#else + // NB: channelIds_sv is a vector in SIMD C++ + channelId = channelIds_sv[0]; // element[0] + for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] + { + assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId + } +#endif + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + if( sanityCheckMixedPrecision ) + { +#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT + // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) + const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 + uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + for( int i = 0; i < neppV; ++i ) + { + assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector + } +#endif + } + } +#endif // MGONGPUCPP_GPUIMPL + return channelId; + } +#endif // MGONGPU_SUPPORTS_MULTICHANNEL + constexpr int nw6 = CPPProcess::nw6; // dimensions of each wavefunction (HELAS KEK 91-11): e.g. 6 for e+ e- -> mu+ mu- (fermions and vectors) constexpr int npar = CPPProcess::npar; // #particles in total (external = initial + final): e.g. 4 for e+ e- -> mu+ mu- constexpr int ncomb = CPPProcess::ncomb; // #helicity combinations: e.g. 16 for e+ e- -> mu+ mu- (2**4 = fermion spin up/down ** npar) @@ -310,7 +374,7 @@ namespace mg5amcCpu COUPs[ndcoup + iicoup] = allCOUPs[ndcoup + iicoup]; // independent couplings, fixed for all events fptype* MEs = E_ACCESS::ieventAccessRecord( allMEs, ievt0 ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); #endif #endif @@ -320,7 +384,7 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Numerators and denominators for the current event (CUDA) or SIMD event page (C++) - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); #endif @@ -346,8 +410,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1 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] ); + if( channelId != 0 ) + { + numerators_sv[0] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 4. * amp_sv[0]; jamp_sv[1] -= 1. / 12. * amp_sv[0]; @@ -362,8 +429,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 2 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] ); + if( channelId != 0 ) + { + numerators_sv[1] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] -= 1. / 12. * amp_sv[0]; jamp_sv[2] -= 1. / 12. * amp_sv[0]; @@ -378,8 +448,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 3 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] ); + if( channelId != 0 ) + { + numerators_sv[2] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= 1. / 4. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[3] += 1. / 4. * cxtype( 0, 1 ) * amp_sv[0]; @@ -392,8 +465,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 4 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] ); + if( channelId != 0 ) + { + numerators_sv[3] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 4. * amp_sv[0]; jamp_sv[2] -= 1. / 12. * amp_sv[0]; @@ -408,8 +484,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 5 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] ); + if( channelId != 0 ) + { + numerators_sv[4] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] -= 1. / 12. * amp_sv[0]; jamp_sv[3] += 1. / 4. * amp_sv[0]; @@ -424,8 +503,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 6 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] ); + if( channelId != 0 ) + { + numerators_sv[5] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] -= 1. / 12. * amp_sv[0]; jamp_sv[3] += 1. / 4. * amp_sv[0]; @@ -440,8 +522,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 7 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] ); + if( channelId != 0 ) + { + numerators_sv[6] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 4. * amp_sv[0]; jamp_sv[1] -= 1. / 12. * amp_sv[0]; @@ -688,7 +773,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- @@ -1060,9 +1147,6 @@ namespace mg5amcCpu #ifdef MGONGPUCPP_GPUIMPL // Remember: in CUDA this is a kernel for one event, in c++ this processes n events const int ievt = blockDim.x * blockIdx.x + threadIdx.x; // index of event (thread) in grid -#ifdef MGONGPU_SUPPORTS_MULTICHANNEL - using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events -#endif #else //assert( (size_t)(allmomenta) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] //assert( (size_t)(allMEs) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] @@ -1070,7 +1154,6 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL using NUM_ACCESS = HostAccessNumerators; // non-trivial access: buffer includes all events using DEN_ACCESS = HostAccessDenominators; // non-trivial access: buffer includes all events - using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events #endif #endif @@ -1095,11 +1178,12 @@ namespace mg5amcCpu fptype_sv& MEs_sv = E_ACCESS::kernelAccess( MEs ); MEs_sv = fptype_sv{ 0 }; #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - numerators_sv = fptype_sv{ 0 }; + for( int i = 0; i < processConfig::ndiagrams; ++i ) + numerators_sv[i] = fptype_sv{ 0 }; denominators_sv = fptype_sv{ 0 }; #endif } @@ -1112,17 +1196,7 @@ namespace mg5amcCpu // *** START OF PART 1a - CUDA (one event per GPU thread) *** #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) - const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) - // NB: channelIds_sv is a scalar in CUDA - channelId = channelIds_sv; - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) - } + unsigned int channelId = getChannelId( allChannelIds ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (for the single event processed in calculate_wavefunctions) @@ -1237,38 +1311,7 @@ namespace mg5amcCpu const int ievt00 = ipagV2 * neppV; // loop on one SIMD page (neppV events) at a time #endif #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) - const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 - uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) -#ifndef MGONGPU_CPPSIMD - // NB: channelIds_sv is a scalar in no-SIMD C++ - channelId = channelIds_sv; -#else - // NB: channelIds_sv is a vector in SIMD C++ - channelId = channelIds_sv[0]; // element[0] - for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] - { - assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId - } -#endif - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) -#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT - // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) - const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 - uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - for( int i = 0; i < neppV; ++i ) - { - assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector - } -#endif - } + unsigned int channelId = getChannelId( allChannelIds, ievt00 ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (jamp2[nParity][ncolor][neppV] for the SIMD vector - or the two SIMD vectors - of events processed in calculate_wavefunctions) @@ -1441,11 +1484,12 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( allChannelIds != nullptr ) // fix segfault #892 (not 'channelIds[0] != 0') { - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + const unsigned int channelId = getChannelId( allChannelIds, ievt0, false ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - MEs_sv *= numerators_sv / denominators_sv; + MEs_sv *= numerators_sv[channelId - 1] / denominators_sv; } #endif //for( int ieppV = 0; ieppV < neppV; ieppV++ ) diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uc_ttxuc/CPPProcess.h b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uc_ttxuc/CPPProcess.h index 08510dfc85..2ed7fd78ca 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uc_ttxuc/CPPProcess.h +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uc_ttxuc/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uc_ttxuc/auto_dsig.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uc_ttxuc/auto_dsig.f index bb9d2c55fb..679ae9b6f6 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uc_ttxuc/auto_dsig.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uc_ttxuc/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C 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 b76b7c4456..ea57242a73 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 @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -142,7 +142,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDDO QSCALE=QSCALE/2D0 ELSE - QSCALE=DSQRT(Q2FACT(IB(1))) + QSCALE=DSQRT(Q2FACT(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) @@ -151,7 +151,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) IF (DSQRT(Q2FACT(IB(2))).NE.0D0) THEN - QSCALE=DSQRT(Q2FACT(IB(2))) + QSCALE=DSQRT(Q2FACT(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) @@ -243,7 +243,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -321,6 +321,10 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, INTEGER I_EE C +C STUFF FOR UPC +C + DOUBLE PRECISION PHOTONPDFSQUARE +C C EXTERNAL FUNCTIONS C LOGICAL PASSCUTS @@ -406,20 +410,20 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, IF (ABS(LPP(IB(1))).GE.1) THEN C LP=SIGN(1,LPP(IB(1))) D1(IVEC)=PDG2PDF(LPP(IB(1)),1, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) U1(IVEC)=PDG2PDF(LPP(IB(1)),2, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) C1(IVEC)=PDG2PDF(LPP(IB(1)),4, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) D2(IVEC)=PDG2PDF(LPP(IB(2)),1, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) S2(IVEC)=PDG2PDF(LPP(IB(2)),3, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) C2(IVEC)=PDG2PDF(LPP(IB(2)),4, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) ENDIF ENDDO ! IWARP LOOP ENDDO ! CURRWARP LOOP 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 bfe665d186..9ea012209a 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 @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -360,7 +360,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -408,7 +408,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C INTEGER I,J,M,N COMPLEX*16 ZTEMP, TMP_JAMP(8) - REAL*8 CF(NCOLOR,NCOLOR) + INTEGER CF(NCOLOR*(NCOLOR+1)/2) + INTEGER DENOM, CF_INDEX COMPLEX*16 AMP(NGRAPHS), JAMP(NCOLOR,NAMPSO) COMPLEX*16 W(6,NWAVEFUNCS) C Needed for v4 models @@ -451,29 +452,18 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C C COLOR DATA C - DATA (CF(I, 1),I= 1, 6) /2.700000000000000D+01 - $ ,9.000000000000000D+00,9.000000000000000D+00,3.000000000000000D - $ +00,3.000000000000000D+00,9.000000000000000D+00/ + DATA DENOM/1/ + DATA (CF(I),I= 1, 6) /27,18,18,6,6,18/ C 1 T(3,1) T(5,2) T(6,4) - DATA (CF(I, 2),I= 1, 6) /9.000000000000000D+00 - $ ,2.700000000000000D+01,3.000000000000000D+00,9.000000000000000D - $ +00,9.000000000000000D+00,3.000000000000000D+00/ + DATA (CF(I),I= 7, 11) /27,6,18,18,6/ C 1 T(3,1) T(5,4) T(6,2) - DATA (CF(I, 3),I= 1, 6) /9.000000000000000D+00 - $ ,3.000000000000000D+00,2.700000000000000D+01,9.000000000000000D - $ +00,9.000000000000000D+00,3.000000000000000D+00/ + DATA (CF(I),I= 12, 15) /27,18,18,6/ C 1 T(3,2) T(5,1) T(6,4) - DATA (CF(I, 4),I= 1, 6) /3.000000000000000D+00 - $ ,9.000000000000000D+00,9.000000000000000D+00,2.700000000000000D - $ +01,3.000000000000000D+00,9.000000000000000D+00/ + DATA (CF(I),I= 16, 18) /27,6,18/ C 1 T(3,2) T(5,4) T(6,1) - DATA (CF(I, 5),I= 1, 6) /3.000000000000000D+00 - $ ,9.000000000000000D+00,9.000000000000000D+00,3.000000000000000D - $ +00,2.700000000000000D+01,9.000000000000000D+00/ + DATA (CF(I),I= 19, 20) /27,18/ C 1 T(3,4) T(5,1) T(6,2) - DATA (CF(I, 6),I= 1, 6) /9.000000000000000D+00 - $ ,3.000000000000000D+00,3.000000000000000D+00,9.000000000000000D - $ +00,9.000000000000000D+00,2.700000000000000D+01/ + DATA (CF(I),I= 21, 21) /27/ C 1 T(3,4) T(5,2) T(6,1) C ---------- C BEGIN CODE @@ -553,10 +543,12 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) MATRIX1 = 0.D0 DO M = 1, NAMPSO + CF_INDEX = 0 DO I = 1, NCOLOR ZTEMP = (0.D0,0.D0) - DO J = 1, NCOLOR - ZTEMP = ZTEMP + CF(J,I)*JAMP(J,M) + DO J = I, NCOLOR + CF_INDEX = CF_INDEX + 1 + ZTEMP = ZTEMP + CF(CF_INDEX)*JAMP(J,M) ENDDO DO N = 1, NAMPSO @@ -565,6 +557,7 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) ENDDO ENDDO ENDDO + MATRIX1 = MATRIX1/DENOM IF(SDE_STRAT.EQ.1)THEN AMP2(1)=AMP2(1)+AMP(1)*DCONJG(AMP(1)) diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uc_ttxuc/matrix11.png b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uc_ttxuc/matrix11.png new file mode 100644 index 0000000000..7c163ae8fb Binary files /dev/null and b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uc_ttxuc/matrix11.png differ diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uc_ttxuc/matrix12.png b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uc_ttxuc/matrix12.png new file mode 100644 index 0000000000..e7acefbc86 Binary files /dev/null and b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uc_ttxuc/matrix12.png differ diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uc_ttxuc/processConfig.h b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uc_ttxuc/processConfig.h new file mode 100644 index 0000000000..9a17b225fd --- /dev/null +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uc_ttxuc/processConfig.h @@ -0,0 +1,16 @@ +// Copyright (C) 2025 CERN and UCLouvain. +// Licensed under the GNU Lesser General Public License (version 3 or later). +// Created by: S. Roiser (May 2025) for the MG5aMC CUDACPP plugin. +// Further modified by: ... for the MG5aMC CUDACPP plugin. + + +#ifndef MG5_CONFIG_SIGMA_SM_UC_TTXUC_H +#define MG5_CONFIG_SIGMA_SM_UC_TTXUC_H 1 + +namespace processConfig { + + constexpr int ndiagrams = 7; + +} + +#endif // MG5_CONFIG_SIGMA_SM_UC_TTXUC_H \ No newline at end of file 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 66e4b80f71..b0cd3067e0 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 @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -25,6 +25,7 @@ #include "MemoryAccessMatrixElements.h" #include "MemoryAccessMomenta.h" #include "MemoryAccessWavefunctions.h" +#include "processConfig.h" #ifdef MGONGPU_SUPPORTS_MULTICHANNEL #include "MemoryAccessDenominators.h" @@ -107,6 +108,69 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { +#ifdef MGONGPU_SUPPORTS_MULTICHANNEL + __device__ INLINE unsigned int getChannelId( const unsigned int* allChannelIds +#ifndef MGONGPUCPP_GPUIMPL + , + const int ievt00, + bool sanityCheckMixedPrecision = true +#endif + ) + { + unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr +#ifdef MGONGPUCPP_GPUIMPL + using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page + if( allChannelIds != nullptr ) + { + const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) + const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) + // NB: channelIds_sv is a scalar in CUDA + channelId = channelIds_sv; + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + } +#else // Cuda or C++ + using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + if( allChannelIds != nullptr ) + { + // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) + const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 + uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) +#ifndef MGONGPU_CPPSIMD + // NB: channelIds_sv is a scalar in no-SIMD C++ + channelId = channelIds_sv; +#else + // NB: channelIds_sv is a vector in SIMD C++ + channelId = channelIds_sv[0]; // element[0] + for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] + { + assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId + } +#endif + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + if( sanityCheckMixedPrecision ) + { +#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT + // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) + const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 + uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + for( int i = 0; i < neppV; ++i ) + { + assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector + } +#endif + } + } +#endif // MGONGPUCPP_GPUIMPL + return channelId; + } +#endif // MGONGPU_SUPPORTS_MULTICHANNEL + constexpr int nw6 = CPPProcess::nw6; // dimensions of each wavefunction (HELAS KEK 91-11): e.g. 6 for e+ e- -> mu+ mu- (fermions and vectors) constexpr int npar = CPPProcess::npar; // #particles in total (external = initial + final): e.g. 4 for e+ e- -> mu+ mu- constexpr int ncomb = CPPProcess::ncomb; // #helicity combinations: e.g. 16 for e+ e- -> mu+ mu- (2**4 = fermion spin up/down ** npar) @@ -316,7 +380,7 @@ namespace mg5amcCpu COUPs[ndcoup + iicoup] = allCOUPs[ndcoup + iicoup]; // independent couplings, fixed for all events fptype* MEs = E_ACCESS::ieventAccessRecord( allMEs, ievt0 ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); #endif #endif @@ -326,7 +390,7 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Numerators and denominators for the current event (CUDA) or SIMD event page (C++) - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); #endif @@ -352,8 +416,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1 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] ); + if( channelId != 0 ) + { + numerators_sv[0] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] -= 1. / 4. * amp_sv[0]; jamp_sv[3] += 1. / 12. * amp_sv[0]; @@ -368,8 +435,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 2 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] ); + if( channelId != 0 ) + { + numerators_sv[1] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] -= 1. / 4. * amp_sv[0]; jamp_sv[3] += 1. / 12. * amp_sv[0]; @@ -384,8 +454,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 3 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] ); + if( channelId != 0 ) + { + numerators_sv[2] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] -= 1. / 4. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[2] += 1. / 4. * cxtype( 0, 1 ) * amp_sv[0]; @@ -398,8 +471,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 4 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] ); + if( channelId != 0 ) + { + numerators_sv[3] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 12. * amp_sv[0]; jamp_sv[2] -= 1. / 4. * amp_sv[0]; @@ -414,8 +490,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 5 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] ); + if( channelId != 0 ) + { + numerators_sv[4] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 12. * amp_sv[0]; jamp_sv[1] -= 1. / 4. * amp_sv[0]; @@ -430,8 +509,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 6 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] ); + if( channelId != 0 ) + { + numerators_sv[5] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 12. * amp_sv[0]; jamp_sv[1] -= 1. / 4. * amp_sv[0]; @@ -446,8 +528,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 7 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] ); + if( channelId != 0 ) + { + numerators_sv[6] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 12. * amp_sv[0]; jamp_sv[2] -= 1. / 4. * amp_sv[0]; @@ -694,7 +779,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- @@ -1066,9 +1153,6 @@ namespace mg5amcCpu #ifdef MGONGPUCPP_GPUIMPL // Remember: in CUDA this is a kernel for one event, in c++ this processes n events const int ievt = blockDim.x * blockIdx.x + threadIdx.x; // index of event (thread) in grid -#ifdef MGONGPU_SUPPORTS_MULTICHANNEL - using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events -#endif #else //assert( (size_t)(allmomenta) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] //assert( (size_t)(allMEs) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] @@ -1076,7 +1160,6 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL using NUM_ACCESS = HostAccessNumerators; // non-trivial access: buffer includes all events using DEN_ACCESS = HostAccessDenominators; // non-trivial access: buffer includes all events - using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events #endif #endif @@ -1101,11 +1184,12 @@ namespace mg5amcCpu fptype_sv& MEs_sv = E_ACCESS::kernelAccess( MEs ); MEs_sv = fptype_sv{ 0 }; #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - numerators_sv = fptype_sv{ 0 }; + for( int i = 0; i < processConfig::ndiagrams; ++i ) + numerators_sv[i] = fptype_sv{ 0 }; denominators_sv = fptype_sv{ 0 }; #endif } @@ -1118,17 +1202,7 @@ namespace mg5amcCpu // *** START OF PART 1a - CUDA (one event per GPU thread) *** #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) - const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) - // NB: channelIds_sv is a scalar in CUDA - channelId = channelIds_sv; - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) - } + unsigned int channelId = getChannelId( allChannelIds ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (for the single event processed in calculate_wavefunctions) @@ -1243,38 +1317,7 @@ namespace mg5amcCpu const int ievt00 = ipagV2 * neppV; // loop on one SIMD page (neppV events) at a time #endif #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) - const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 - uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) -#ifndef MGONGPU_CPPSIMD - // NB: channelIds_sv is a scalar in no-SIMD C++ - channelId = channelIds_sv; -#else - // NB: channelIds_sv is a vector in SIMD C++ - channelId = channelIds_sv[0]; // element[0] - for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] - { - assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId - } -#endif - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) -#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT - // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) - const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 - uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - for( int i = 0; i < neppV; ++i ) - { - assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector - } -#endif - } + unsigned int channelId = getChannelId( allChannelIds, ievt00 ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (jamp2[nParity][ncolor][neppV] for the SIMD vector - or the two SIMD vectors - of events processed in calculate_wavefunctions) @@ -1447,11 +1490,12 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( allChannelIds != nullptr ) // fix segfault #892 (not 'channelIds[0] != 0') { - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + const unsigned int channelId = getChannelId( allChannelIds, ievt0, false ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - MEs_sv *= numerators_sv / denominators_sv; + MEs_sv *= numerators_sv[channelId - 1] / denominators_sv; } #endif //for( int ieppV = 0; ieppV < neppV; ieppV++ ) diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_ucx_ttxucx/CPPProcess.h b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_ucx_ttxucx/CPPProcess.h index 04b9f5bcb1..d12d4278a4 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_ucx_ttxucx/CPPProcess.h +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_ucx_ttxucx/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_ucx_ttxucx/auto_dsig.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_ucx_ttxucx/auto_dsig.f index 5046df7e56..e922b7f223 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_ucx_ttxucx/auto_dsig.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_ucx_ttxucx/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C 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 848991a32a..af922b32b4 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 @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -148,7 +148,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDDO QSCALE=QSCALE/2D0 ELSE - QSCALE=DSQRT(Q2FACT(IB(1))) + QSCALE=DSQRT(Q2FACT(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) @@ -158,7 +158,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) IF (DSQRT(Q2FACT(IB(2))).NE.0D0) THEN - QSCALE=DSQRT(Q2FACT(IB(2))) + QSCALE=DSQRT(Q2FACT(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) @@ -269,7 +269,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -353,6 +353,10 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, INTEGER I_EE C +C STUFF FOR UPC +C + DOUBLE PRECISION PHOTONPDFSQUARE +C C EXTERNAL FUNCTIONS C LOGICAL PASSCUTS @@ -438,24 +442,24 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, IF (ABS(LPP(IB(1))).GE.1) THEN C LP=SIGN(1,LPP(IB(1))) D1(IVEC)=PDG2PDF(LPP(IB(1)),1, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) U1(IVEC)=PDG2PDF(LPP(IB(1)),2, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) S1(IVEC)=PDG2PDF(LPP(IB(1)),3, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) C1(IVEC)=PDG2PDF(LPP(IB(1)),4, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) CX2(IVEC)=PDG2PDF(LPP(IB(2)),-4, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) SX2(IVEC)=PDG2PDF(LPP(IB(2)),-3, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) UX2(IVEC)=PDG2PDF(LPP(IB(2)),-2, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) DX2(IVEC)=PDG2PDF(LPP(IB(2)),-1, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) ENDIF ENDDO ! IWARP LOOP ENDDO ! CURRWARP LOOP 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 5dcb5155f3..8936b8858a 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 @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -366,7 +366,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -420,7 +420,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C INTEGER I,J,M,N COMPLEX*16 ZTEMP, TMP_JAMP(8) - REAL*8 CF(NCOLOR,NCOLOR) + INTEGER CF(NCOLOR*(NCOLOR+1)/2) + INTEGER DENOM, CF_INDEX COMPLEX*16 AMP(NGRAPHS), JAMP(NCOLOR,NAMPSO) COMPLEX*16 W(6,NWAVEFUNCS) C Needed for v4 models @@ -463,29 +464,18 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C C COLOR DATA C - DATA (CF(I, 1),I= 1, 6) /2.700000000000000D+01 - $ ,9.000000000000000D+00,9.000000000000000D+00,3.000000000000000D - $ +00,3.000000000000000D+00,9.000000000000000D+00/ + DATA DENOM/1/ + DATA (CF(I),I= 1, 6) /27,18,18,6,6,18/ C 1 T(2,1) T(3,4) T(5,6) - DATA (CF(I, 2),I= 1, 6) /9.000000000000000D+00 - $ ,2.700000000000000D+01,3.000000000000000D+00,9.000000000000000D - $ +00,9.000000000000000D+00,3.000000000000000D+00/ + DATA (CF(I),I= 7, 11) /27,6,18,18,6/ C 1 T(2,1) T(3,6) T(5,4) - DATA (CF(I, 3),I= 1, 6) /9.000000000000000D+00 - $ ,3.000000000000000D+00,2.700000000000000D+01,9.000000000000000D - $ +00,9.000000000000000D+00,3.000000000000000D+00/ + DATA (CF(I),I= 12, 15) /27,18,18,6/ C 1 T(2,4) T(3,1) T(5,6) - DATA (CF(I, 4),I= 1, 6) /3.000000000000000D+00 - $ ,9.000000000000000D+00,9.000000000000000D+00,2.700000000000000D - $ +01,3.000000000000000D+00,9.000000000000000D+00/ + DATA (CF(I),I= 16, 18) /27,6,18/ C 1 T(2,4) T(3,6) T(5,1) - DATA (CF(I, 5),I= 1, 6) /3.000000000000000D+00 - $ ,9.000000000000000D+00,9.000000000000000D+00,3.000000000000000D - $ +00,2.700000000000000D+01,9.000000000000000D+00/ + DATA (CF(I),I= 19, 20) /27,18/ C 1 T(2,6) T(3,1) T(5,4) - DATA (CF(I, 6),I= 1, 6) /9.000000000000000D+00 - $ ,3.000000000000000D+00,3.000000000000000D+00,9.000000000000000D - $ +00,9.000000000000000D+00,2.700000000000000D+01/ + DATA (CF(I),I= 21, 21) /27/ C 1 T(2,6) T(3,4) T(5,1) C ---------- C BEGIN CODE @@ -565,10 +555,12 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) MATRIX1 = 0.D0 DO M = 1, NAMPSO + CF_INDEX = 0 DO I = 1, NCOLOR ZTEMP = (0.D0,0.D0) - DO J = 1, NCOLOR - ZTEMP = ZTEMP + CF(J,I)*JAMP(J,M) + DO J = I, NCOLOR + CF_INDEX = CF_INDEX + 1 + ZTEMP = ZTEMP + CF(CF_INDEX)*JAMP(J,M) ENDDO DO N = 1, NAMPSO @@ -577,6 +569,7 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) ENDDO ENDDO ENDDO + MATRIX1 = MATRIX1/DENOM IF(SDE_STRAT.EQ.1)THEN AMP2(1)=AMP2(1)+AMP(1)*DCONJG(AMP(1)) diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_ucx_ttxucx/matrix11.png b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_ucx_ttxucx/matrix11.png new file mode 100644 index 0000000000..b68fcd17d9 Binary files /dev/null and b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_ucx_ttxucx/matrix11.png differ diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_ucx_ttxucx/matrix12.png b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_ucx_ttxucx/matrix12.png new file mode 100644 index 0000000000..24af0c85c6 Binary files /dev/null and b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_ucx_ttxucx/matrix12.png differ diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_ucx_ttxucx/processConfig.h b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_ucx_ttxucx/processConfig.h new file mode 100644 index 0000000000..f52e249e91 --- /dev/null +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_ucx_ttxucx/processConfig.h @@ -0,0 +1,16 @@ +// Copyright (C) 2025 CERN and UCLouvain. +// Licensed under the GNU Lesser General Public License (version 3 or later). +// Created by: S. Roiser (May 2025) for the MG5aMC CUDACPP plugin. +// Further modified by: ... for the MG5aMC CUDACPP plugin. + + +#ifndef MG5_CONFIG_SIGMA_SM_UCX_TTXUCX_H +#define MG5_CONFIG_SIGMA_SM_UCX_TTXUCX_H 1 + +namespace processConfig { + + constexpr int ndiagrams = 7; + +} + +#endif // MG5_CONFIG_SIGMA_SM_UCX_TTXUCX_H \ No newline at end of file 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 8d266e82b7..edd133faea 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 @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -25,6 +25,7 @@ #include "MemoryAccessMatrixElements.h" #include "MemoryAccessMomenta.h" #include "MemoryAccessWavefunctions.h" +#include "processConfig.h" #ifdef MGONGPU_SUPPORTS_MULTICHANNEL #include "MemoryAccessDenominators.h" @@ -99,6 +100,69 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { +#ifdef MGONGPU_SUPPORTS_MULTICHANNEL + __device__ INLINE unsigned int getChannelId( const unsigned int* allChannelIds +#ifndef MGONGPUCPP_GPUIMPL + , + const int ievt00, + bool sanityCheckMixedPrecision = true +#endif + ) + { + unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr +#ifdef MGONGPUCPP_GPUIMPL + using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page + if( allChannelIds != nullptr ) + { + const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) + const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) + // NB: channelIds_sv is a scalar in CUDA + channelId = channelIds_sv; + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + } +#else // Cuda or C++ + using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + if( allChannelIds != nullptr ) + { + // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) + const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 + uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) +#ifndef MGONGPU_CPPSIMD + // NB: channelIds_sv is a scalar in no-SIMD C++ + channelId = channelIds_sv; +#else + // NB: channelIds_sv is a vector in SIMD C++ + channelId = channelIds_sv[0]; // element[0] + for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] + { + assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId + } +#endif + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + if( sanityCheckMixedPrecision ) + { +#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT + // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) + const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 + uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + for( int i = 0; i < neppV; ++i ) + { + assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector + } +#endif + } + } +#endif // MGONGPUCPP_GPUIMPL + return channelId; + } +#endif // MGONGPU_SUPPORTS_MULTICHANNEL + constexpr int nw6 = CPPProcess::nw6; // dimensions of each wavefunction (HELAS KEK 91-11): e.g. 6 for e+ e- -> mu+ mu- (fermions and vectors) constexpr int npar = CPPProcess::npar; // #particles in total (external = initial + final): e.g. 4 for e+ e- -> mu+ mu- constexpr int ncomb = CPPProcess::ncomb; // #helicity combinations: e.g. 16 for e+ e- -> mu+ mu- (2**4 = fermion spin up/down ** npar) @@ -308,7 +372,7 @@ namespace mg5amcCpu COUPs[ndcoup + iicoup] = allCOUPs[ndcoup + iicoup]; // independent couplings, fixed for all events fptype* MEs = E_ACCESS::ieventAccessRecord( allMEs, ievt0 ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); #endif #endif @@ -318,7 +382,7 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Numerators and denominators for the current event (CUDA) or SIMD event page (C++) - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); #endif @@ -344,8 +408,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1 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] ); + if( channelId != 0 ) + { + numerators_sv[0] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 4. * amp_sv[0]; jamp_sv[1] -= 1. / 12. * amp_sv[0]; @@ -360,8 +427,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 2 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] ); + if( channelId != 0 ) + { + numerators_sv[1] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] -= 1. / 12. * amp_sv[0]; jamp_sv[2] -= 1. / 12. * amp_sv[0]; @@ -376,8 +446,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 3 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] ); + if( channelId != 0 ) + { + numerators_sv[2] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= 1. / 4. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[3] += 1. / 4. * cxtype( 0, 1 ) * amp_sv[0]; @@ -390,8 +463,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 4 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] ); + if( channelId != 0 ) + { + numerators_sv[3] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 4. * amp_sv[0]; jamp_sv[2] -= 1. / 12. * amp_sv[0]; @@ -406,8 +482,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 5 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] ); + if( channelId != 0 ) + { + numerators_sv[4] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] -= 1. / 12. * amp_sv[0]; jamp_sv[3] += 1. / 4. * amp_sv[0]; @@ -424,8 +503,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 6 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] ); + if( channelId != 0 ) + { + numerators_sv[5] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 12. * amp_sv[0]; jamp_sv[1] -= 1. / 4. * amp_sv[0]; @@ -440,8 +522,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 7 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] ); + if( channelId != 0 ) + { + numerators_sv[6] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 12. * amp_sv[0]; jamp_sv[2] -= 1. / 4. * amp_sv[0]; @@ -456,8 +541,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 8 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] ); + if( channelId != 0 ) + { + numerators_sv[7] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += 1. / 4. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[2] -= 1. / 4. * cxtype( 0, 1 ) * amp_sv[0]; @@ -470,8 +558,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 9 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] ); + if( channelId != 0 ) + { + numerators_sv[8] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] -= 1. / 4. * amp_sv[0]; jamp_sv[3] += 1. / 12. * amp_sv[0]; @@ -486,8 +577,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 10 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] ); + if( channelId != 0 ) + { + numerators_sv[9] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] -= 1. / 4. * amp_sv[0]; jamp_sv[3] += 1. / 12. * amp_sv[0]; @@ -502,8 +596,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 11 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] ); + if( channelId != 0 ) + { + numerators_sv[10] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 12. * amp_sv[0]; jamp_sv[2] -= 1. / 4. * amp_sv[0]; @@ -518,8 +615,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 12 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] ); + if( channelId != 0 ) + { + numerators_sv[11] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 12. * amp_sv[0]; jamp_sv[1] -= 1. / 4. * amp_sv[0]; @@ -534,8 +634,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 13 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] ); + if( channelId != 0 ) + { + numerators_sv[12] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] -= 1. / 12. * amp_sv[0]; jamp_sv[3] += 1. / 4. * amp_sv[0]; @@ -550,8 +653,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 14 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] ); + if( channelId != 0 ) + { + numerators_sv[13] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 4. * amp_sv[0]; jamp_sv[1] -= 1. / 12. * amp_sv[0]; @@ -798,7 +904,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- @@ -1170,9 +1278,6 @@ namespace mg5amcCpu #ifdef MGONGPUCPP_GPUIMPL // Remember: in CUDA this is a kernel for one event, in c++ this processes n events const int ievt = blockDim.x * blockIdx.x + threadIdx.x; // index of event (thread) in grid -#ifdef MGONGPU_SUPPORTS_MULTICHANNEL - using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events -#endif #else //assert( (size_t)(allmomenta) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] //assert( (size_t)(allMEs) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] @@ -1180,7 +1285,6 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL using NUM_ACCESS = HostAccessNumerators; // non-trivial access: buffer includes all events using DEN_ACCESS = HostAccessDenominators; // non-trivial access: buffer includes all events - using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events #endif #endif @@ -1205,11 +1309,12 @@ namespace mg5amcCpu fptype_sv& MEs_sv = E_ACCESS::kernelAccess( MEs ); MEs_sv = fptype_sv{ 0 }; #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - numerators_sv = fptype_sv{ 0 }; + for( int i = 0; i < processConfig::ndiagrams; ++i ) + numerators_sv[i] = fptype_sv{ 0 }; denominators_sv = fptype_sv{ 0 }; #endif } @@ -1222,17 +1327,7 @@ namespace mg5amcCpu // *** START OF PART 1a - CUDA (one event per GPU thread) *** #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) - const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) - // NB: channelIds_sv is a scalar in CUDA - channelId = channelIds_sv; - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) - } + unsigned int channelId = getChannelId( allChannelIds ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (for the single event processed in calculate_wavefunctions) @@ -1347,38 +1442,7 @@ namespace mg5amcCpu const int ievt00 = ipagV2 * neppV; // loop on one SIMD page (neppV events) at a time #endif #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) - const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 - uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) -#ifndef MGONGPU_CPPSIMD - // NB: channelIds_sv is a scalar in no-SIMD C++ - channelId = channelIds_sv; -#else - // NB: channelIds_sv is a vector in SIMD C++ - channelId = channelIds_sv[0]; // element[0] - for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] - { - assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId - } -#endif - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) -#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT - // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) - const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 - uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - for( int i = 0; i < neppV; ++i ) - { - assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector - } -#endif - } + unsigned int channelId = getChannelId( allChannelIds, ievt00 ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (jamp2[nParity][ncolor][neppV] for the SIMD vector - or the two SIMD vectors - of events processed in calculate_wavefunctions) @@ -1551,11 +1615,12 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( allChannelIds != nullptr ) // fix segfault #892 (not 'channelIds[0] != 0') { - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + const unsigned int channelId = getChannelId( allChannelIds, ievt0, false ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - MEs_sv *= numerators_sv / denominators_sv; + MEs_sv *= numerators_sv[channelId - 1] / denominators_sv; } #endif //for( int ieppV = 0; ieppV < neppV; ieppV++ ) diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uu_ttxuu/CPPProcess.h b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uu_ttxuu/CPPProcess.h index fd123d932d..32144c2f8e 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uu_ttxuu/CPPProcess.h +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uu_ttxuu/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uu_ttxuu/auto_dsig.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uu_ttxuu/auto_dsig.f index 77164138e6..650e42d27b 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uu_ttxuu/auto_dsig.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uu_ttxuu/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C 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 f03c7f3b0c..63aadb5257 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 @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -140,7 +140,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDDO QSCALE=QSCALE/2D0 ELSE - QSCALE=DSQRT(Q2FACT(IB(1))) + QSCALE=DSQRT(Q2FACT(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) @@ -150,7 +150,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) IF (DSQRT(Q2FACT(IB(2))).NE.0D0) THEN - QSCALE=DSQRT(Q2FACT(IB(2))) + QSCALE=DSQRT(Q2FACT(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) @@ -237,7 +237,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -313,6 +313,10 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, INTEGER I_EE C +C STUFF FOR UPC +C + DOUBLE PRECISION PHOTONPDFSQUARE +C C EXTERNAL FUNCTIONS C LOGICAL PASSCUTS @@ -398,24 +402,24 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, IF (ABS(LPP(IB(1))).GE.1) THEN C LP=SIGN(1,LPP(IB(1))) D1(IVEC)=PDG2PDF(LPP(IB(1)),1, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) U1(IVEC)=PDG2PDF(LPP(IB(1)),2, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) S1(IVEC)=PDG2PDF(LPP(IB(1)),3, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) C1(IVEC)=PDG2PDF(LPP(IB(1)),4, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) D2(IVEC)=PDG2PDF(LPP(IB(2)),1, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) U2(IVEC)=PDG2PDF(LPP(IB(2)),2, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) S2(IVEC)=PDG2PDF(LPP(IB(2)),3, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) C2(IVEC)=PDG2PDF(LPP(IB(2)),4, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) ENDIF ENDDO ! IWARP LOOP ENDDO ! CURRWARP LOOP 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 8b80833180..bfbd5d3ac8 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 @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -358,7 +358,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -404,7 +404,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C INTEGER I,J,M,N COMPLEX*16 ZTEMP, TMP_JAMP(16) - REAL*8 CF(NCOLOR,NCOLOR) + INTEGER CF(NCOLOR*(NCOLOR+1)/2) + INTEGER DENOM, CF_INDEX COMPLEX*16 AMP(NGRAPHS), JAMP(NCOLOR,NAMPSO) COMPLEX*16 W(6,NWAVEFUNCS) C Needed for v4 models @@ -447,29 +448,18 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C C COLOR DATA C - DATA (CF(I, 1),I= 1, 6) /2.700000000000000D+01 - $ ,9.000000000000000D+00,9.000000000000000D+00,3.000000000000000D - $ +00,3.000000000000000D+00,9.000000000000000D+00/ + DATA DENOM/1/ + DATA (CF(I),I= 1, 6) /27,18,18,6,6,18/ C 1 T(3,1) T(5,2) T(6,4) - DATA (CF(I, 2),I= 1, 6) /9.000000000000000D+00 - $ ,2.700000000000000D+01,3.000000000000000D+00,9.000000000000000D - $ +00,9.000000000000000D+00,3.000000000000000D+00/ + DATA (CF(I),I= 7, 11) /27,6,18,18,6/ C 1 T(3,1) T(5,4) T(6,2) - DATA (CF(I, 3),I= 1, 6) /9.000000000000000D+00 - $ ,3.000000000000000D+00,2.700000000000000D+01,9.000000000000000D - $ +00,9.000000000000000D+00,3.000000000000000D+00/ + DATA (CF(I),I= 12, 15) /27,18,18,6/ C 1 T(3,2) T(5,1) T(6,4) - DATA (CF(I, 4),I= 1, 6) /3.000000000000000D+00 - $ ,9.000000000000000D+00,9.000000000000000D+00,2.700000000000000D - $ +01,3.000000000000000D+00,9.000000000000000D+00/ + DATA (CF(I),I= 16, 18) /27,6,18/ C 1 T(3,2) T(5,4) T(6,1) - DATA (CF(I, 5),I= 1, 6) /3.000000000000000D+00 - $ ,9.000000000000000D+00,9.000000000000000D+00,3.000000000000000D - $ +00,2.700000000000000D+01,9.000000000000000D+00/ + DATA (CF(I),I= 19, 20) /27,18/ C 1 T(3,4) T(5,1) T(6,2) - DATA (CF(I, 6),I= 1, 6) /9.000000000000000D+00 - $ ,3.000000000000000D+00,3.000000000000000D+00,9.000000000000000D - $ +00,9.000000000000000D+00,2.700000000000000D+01/ + DATA (CF(I),I= 21, 21) /27/ C 1 T(3,4) T(5,2) T(6,1) C ---------- C BEGIN CODE @@ -585,10 +575,12 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) MATRIX1 = 0.D0 DO M = 1, NAMPSO + CF_INDEX = 0 DO I = 1, NCOLOR ZTEMP = (0.D0,0.D0) - DO J = 1, NCOLOR - ZTEMP = ZTEMP + CF(J,I)*JAMP(J,M) + DO J = I, NCOLOR + CF_INDEX = CF_INDEX + 1 + ZTEMP = ZTEMP + CF(CF_INDEX)*JAMP(J,M) ENDDO DO N = 1, NAMPSO @@ -597,6 +589,7 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) ENDDO ENDDO ENDDO + MATRIX1 = MATRIX1/DENOM IF(SDE_STRAT.EQ.1)THEN AMP2(1)=AMP2(1)+AMP(1)*DCONJG(AMP(1)) diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uu_ttxuu/matrix11.png b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uu_ttxuu/matrix11.png new file mode 100644 index 0000000000..6fc66c1956 Binary files /dev/null and b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uu_ttxuu/matrix11.png differ diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uu_ttxuu/matrix12.png b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uu_ttxuu/matrix12.png new file mode 100644 index 0000000000..72144536fc Binary files /dev/null and b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uu_ttxuu/matrix12.png differ diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uu_ttxuu/processConfig.h b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uu_ttxuu/processConfig.h new file mode 100644 index 0000000000..8f10a6d734 --- /dev/null +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uu_ttxuu/processConfig.h @@ -0,0 +1,16 @@ +// Copyright (C) 2025 CERN and UCLouvain. +// Licensed under the GNU Lesser General Public License (version 3 or later). +// Created by: S. Roiser (May 2025) for the MG5aMC CUDACPP plugin. +// Further modified by: ... for the MG5aMC CUDACPP plugin. + + +#ifndef MG5_CONFIG_SIGMA_SM_UU_TTXUU_H +#define MG5_CONFIG_SIGMA_SM_UU_TTXUU_H 1 + +namespace processConfig { + + constexpr int ndiagrams = 14; + +} + +#endif // MG5_CONFIG_SIGMA_SM_UU_TTXUU_H \ No newline at end of file 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 1b918bae84..3d0bb538d6 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 @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -25,6 +25,7 @@ #include "MemoryAccessMatrixElements.h" #include "MemoryAccessMomenta.h" #include "MemoryAccessWavefunctions.h" +#include "processConfig.h" #ifdef MGONGPU_SUPPORTS_MULTICHANNEL #include "MemoryAccessDenominators.h" @@ -107,6 +108,69 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { +#ifdef MGONGPU_SUPPORTS_MULTICHANNEL + __device__ INLINE unsigned int getChannelId( const unsigned int* allChannelIds +#ifndef MGONGPUCPP_GPUIMPL + , + const int ievt00, + bool sanityCheckMixedPrecision = true +#endif + ) + { + unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr +#ifdef MGONGPUCPP_GPUIMPL + using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page + if( allChannelIds != nullptr ) + { + const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) + const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) + // NB: channelIds_sv is a scalar in CUDA + channelId = channelIds_sv; + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + } +#else // Cuda or C++ + using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + if( allChannelIds != nullptr ) + { + // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) + const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 + uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) +#ifndef MGONGPU_CPPSIMD + // NB: channelIds_sv is a scalar in no-SIMD C++ + channelId = channelIds_sv; +#else + // NB: channelIds_sv is a vector in SIMD C++ + channelId = channelIds_sv[0]; // element[0] + for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] + { + assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId + } +#endif + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + if( sanityCheckMixedPrecision ) + { +#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT + // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) + const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 + uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + for( int i = 0; i < neppV; ++i ) + { + assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector + } +#endif + } + } +#endif // MGONGPUCPP_GPUIMPL + return channelId; + } +#endif // MGONGPU_SUPPORTS_MULTICHANNEL + constexpr int nw6 = CPPProcess::nw6; // dimensions of each wavefunction (HELAS KEK 91-11): e.g. 6 for e+ e- -> mu+ mu- (fermions and vectors) constexpr int npar = CPPProcess::npar; // #particles in total (external = initial + final): e.g. 4 for e+ e- -> mu+ mu- constexpr int ncomb = CPPProcess::ncomb; // #helicity combinations: e.g. 16 for e+ e- -> mu+ mu- (2**4 = fermion spin up/down ** npar) @@ -316,7 +380,7 @@ namespace mg5amcCpu COUPs[ndcoup + iicoup] = allCOUPs[ndcoup + iicoup]; // independent couplings, fixed for all events fptype* MEs = E_ACCESS::ieventAccessRecord( allMEs, ievt0 ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); #endif #endif @@ -326,7 +390,7 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Numerators and denominators for the current event (CUDA) or SIMD event page (C++) - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); #endif @@ -352,8 +416,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1 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] ); + if( channelId != 0 ) + { + numerators_sv[0] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 36. * amp_sv[0]; jamp_sv[1] -= 1. / 12. * amp_sv[0]; @@ -368,8 +435,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 2 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] ); + if( channelId != 0 ) + { + numerators_sv[1] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 36. * amp_sv[0]; jamp_sv[1] -= 1. / 12. * amp_sv[0]; @@ -384,8 +454,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 3 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] ); + if( channelId != 0 ) + { + numerators_sv[2] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[3] += 1. / 4. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[4] -= 1. / 4. * cxtype( 0, 1 ) * amp_sv[0]; @@ -398,8 +471,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 4 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] ); + if( channelId != 0 ) + { + numerators_sv[3] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 36. * amp_sv[0]; jamp_sv[1] -= 1. / 12. * amp_sv[0]; @@ -414,8 +490,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 5 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] ); + if( channelId != 0 ) + { + numerators_sv[4] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 36. * amp_sv[0]; jamp_sv[1] -= 1. / 12. * amp_sv[0]; @@ -430,8 +509,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 6 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] ); + if( channelId != 0 ) + { + numerators_sv[5] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 36. * amp_sv[0]; jamp_sv[2] -= 1. / 12. * amp_sv[0]; @@ -446,8 +528,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 7 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] ); + if( channelId != 0 ) + { + numerators_sv[6] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 36. * amp_sv[0]; jamp_sv[2] -= 1. / 12. * amp_sv[0]; @@ -694,7 +779,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- @@ -1066,9 +1153,6 @@ namespace mg5amcCpu #ifdef MGONGPUCPP_GPUIMPL // Remember: in CUDA this is a kernel for one event, in c++ this processes n events const int ievt = blockDim.x * blockIdx.x + threadIdx.x; // index of event (thread) in grid -#ifdef MGONGPU_SUPPORTS_MULTICHANNEL - using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events -#endif #else //assert( (size_t)(allmomenta) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] //assert( (size_t)(allMEs) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] @@ -1076,7 +1160,6 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL using NUM_ACCESS = HostAccessNumerators; // non-trivial access: buffer includes all events using DEN_ACCESS = HostAccessDenominators; // non-trivial access: buffer includes all events - using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events #endif #endif @@ -1101,11 +1184,12 @@ namespace mg5amcCpu fptype_sv& MEs_sv = E_ACCESS::kernelAccess( MEs ); MEs_sv = fptype_sv{ 0 }; #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - numerators_sv = fptype_sv{ 0 }; + for( int i = 0; i < processConfig::ndiagrams; ++i ) + numerators_sv[i] = fptype_sv{ 0 }; denominators_sv = fptype_sv{ 0 }; #endif } @@ -1118,17 +1202,7 @@ namespace mg5amcCpu // *** START OF PART 1a - CUDA (one event per GPU thread) *** #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) - const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) - // NB: channelIds_sv is a scalar in CUDA - channelId = channelIds_sv; - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) - } + unsigned int channelId = getChannelId( allChannelIds ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (for the single event processed in calculate_wavefunctions) @@ -1243,38 +1317,7 @@ namespace mg5amcCpu const int ievt00 = ipagV2 * neppV; // loop on one SIMD page (neppV events) at a time #endif #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) - const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 - uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) -#ifndef MGONGPU_CPPSIMD - // NB: channelIds_sv is a scalar in no-SIMD C++ - channelId = channelIds_sv; -#else - // NB: channelIds_sv is a vector in SIMD C++ - channelId = channelIds_sv[0]; // element[0] - for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] - { - assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId - } -#endif - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) -#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT - // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) - const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 - uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - for( int i = 0; i < neppV; ++i ) - { - assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector - } -#endif - } + unsigned int channelId = getChannelId( allChannelIds, ievt00 ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (jamp2[nParity][ncolor][neppV] for the SIMD vector - or the two SIMD vectors - of events processed in calculate_wavefunctions) @@ -1447,11 +1490,12 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( allChannelIds != nullptr ) // fix segfault #892 (not 'channelIds[0] != 0') { - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + const unsigned int channelId = getChannelId( allChannelIds, ievt0, false ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - MEs_sv *= numerators_sv / denominators_sv; + MEs_sv *= numerators_sv[channelId - 1] / denominators_sv; } #endif //for( int ieppV = 0; ieppV < neppV; ieppV++ ) diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxccx/CPPProcess.h b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxccx/CPPProcess.h index 87faf25dfb..d210469055 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxccx/CPPProcess.h +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxccx/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxccx/auto_dsig.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxccx/auto_dsig.f index e3f26606a1..bb0e56154b 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxccx/auto_dsig.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxccx/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C 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 74f009d272..5285d2a803 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 @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -148,7 +148,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDDO QSCALE=QSCALE/2D0 ELSE - QSCALE=DSQRT(Q2FACT(IB(1))) + QSCALE=DSQRT(Q2FACT(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) @@ -158,7 +158,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) IF (DSQRT(Q2FACT(IB(2))).NE.0D0) THEN - QSCALE=DSQRT(Q2FACT(IB(2))) + QSCALE=DSQRT(Q2FACT(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) @@ -269,7 +269,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -353,6 +353,10 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, INTEGER I_EE C +C STUFF FOR UPC +C + DOUBLE PRECISION PHOTONPDFSQUARE +C C EXTERNAL FUNCTIONS C LOGICAL PASSCUTS @@ -438,24 +442,24 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, IF (ABS(LPP(IB(1))).GE.1) THEN C LP=SIGN(1,LPP(IB(1))) D1(IVEC)=PDG2PDF(LPP(IB(1)),1, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) U1(IVEC)=PDG2PDF(LPP(IB(1)),2, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) S1(IVEC)=PDG2PDF(LPP(IB(1)),3, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) C1(IVEC)=PDG2PDF(LPP(IB(1)),4, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) CX2(IVEC)=PDG2PDF(LPP(IB(2)),-4, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) SX2(IVEC)=PDG2PDF(LPP(IB(2)),-3, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) UX2(IVEC)=PDG2PDF(LPP(IB(2)),-2, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) DX2(IVEC)=PDG2PDF(LPP(IB(2)),-1, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) ENDIF ENDDO ! IWARP LOOP ENDDO ! CURRWARP LOOP diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxccx/matrix1.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxccx/matrix1.f index 728711155f..302ca4bbd2 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxccx/matrix1.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxccx/matrix1.f @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -366,7 +366,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -420,7 +420,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C INTEGER I,J,M,N COMPLEX*16 ZTEMP, TMP_JAMP(8) - REAL*8 CF(NCOLOR,NCOLOR) + INTEGER CF(NCOLOR*(NCOLOR+1)/2) + INTEGER DENOM, CF_INDEX COMPLEX*16 AMP(NGRAPHS), JAMP(NCOLOR,NAMPSO) COMPLEX*16 W(6,NWAVEFUNCS) C Needed for v4 models @@ -463,29 +464,18 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C C COLOR DATA C - DATA (CF(I, 1),I= 1, 6) /2.700000000000000D+01 - $ ,9.000000000000000D+00,9.000000000000000D+00,3.000000000000000D - $ +00,3.000000000000000D+00,9.000000000000000D+00/ + DATA DENOM/1/ + DATA (CF(I),I= 1, 6) /27,18,18,6,6,18/ C 1 T(2,1) T(3,4) T(5,6) - DATA (CF(I, 2),I= 1, 6) /9.000000000000000D+00 - $ ,2.700000000000000D+01,3.000000000000000D+00,9.000000000000000D - $ +00,9.000000000000000D+00,3.000000000000000D+00/ + DATA (CF(I),I= 7, 11) /27,6,18,18,6/ C 1 T(2,1) T(3,6) T(5,4) - DATA (CF(I, 3),I= 1, 6) /9.000000000000000D+00 - $ ,3.000000000000000D+00,2.700000000000000D+01,9.000000000000000D - $ +00,9.000000000000000D+00,3.000000000000000D+00/ + DATA (CF(I),I= 12, 15) /27,18,18,6/ C 1 T(2,4) T(3,1) T(5,6) - DATA (CF(I, 4),I= 1, 6) /3.000000000000000D+00 - $ ,9.000000000000000D+00,9.000000000000000D+00,2.700000000000000D - $ +01,3.000000000000000D+00,9.000000000000000D+00/ + DATA (CF(I),I= 16, 18) /27,6,18/ C 1 T(2,4) T(3,6) T(5,1) - DATA (CF(I, 5),I= 1, 6) /3.000000000000000D+00 - $ ,9.000000000000000D+00,9.000000000000000D+00,3.000000000000000D - $ +00,2.700000000000000D+01,9.000000000000000D+00/ + DATA (CF(I),I= 19, 20) /27,18/ C 1 T(2,6) T(3,1) T(5,4) - DATA (CF(I, 6),I= 1, 6) /9.000000000000000D+00 - $ ,3.000000000000000D+00,3.000000000000000D+00,9.000000000000000D - $ +00,9.000000000000000D+00,2.700000000000000D+01/ + DATA (CF(I),I= 21, 21) /27/ C 1 T(2,6) T(3,4) T(5,1) C ---------- C BEGIN CODE @@ -565,10 +555,12 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) MATRIX1 = 0.D0 DO M = 1, NAMPSO + CF_INDEX = 0 DO I = 1, NCOLOR ZTEMP = (0.D0,0.D0) - DO J = 1, NCOLOR - ZTEMP = ZTEMP + CF(J,I)*JAMP(J,M) + DO J = I, NCOLOR + CF_INDEX = CF_INDEX + 1 + ZTEMP = ZTEMP + CF(CF_INDEX)*JAMP(J,M) ENDDO DO N = 1, NAMPSO @@ -577,6 +569,7 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) ENDDO ENDDO ENDDO + MATRIX1 = MATRIX1/DENOM IF(SDE_STRAT.EQ.1)THEN AMP2(1)=AMP2(1)+AMP(1)*DCONJG(AMP(1)) diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxccx/matrix11.png b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxccx/matrix11.png new file mode 100644 index 0000000000..e5baa92655 Binary files /dev/null and b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxccx/matrix11.png differ diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxccx/matrix12.png b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxccx/matrix12.png new file mode 100644 index 0000000000..c3aeba1bd6 Binary files /dev/null and b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxccx/matrix12.png differ diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxccx/processConfig.h b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxccx/processConfig.h new file mode 100644 index 0000000000..2dfae1920f --- /dev/null +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxccx/processConfig.h @@ -0,0 +1,16 @@ +// Copyright (C) 2025 CERN and UCLouvain. +// Licensed under the GNU Lesser General Public License (version 3 or later). +// Created by: S. Roiser (May 2025) for the MG5aMC CUDACPP plugin. +// Further modified by: ... for the MG5aMC CUDACPP plugin. + + +#ifndef MG5_CONFIG_SIGMA_SM_UUX_TTXCCX_H +#define MG5_CONFIG_SIGMA_SM_UUX_TTXCCX_H 1 + +namespace processConfig { + + constexpr int ndiagrams = 7; + +} + +#endif // MG5_CONFIG_SIGMA_SM_UUX_TTXCCX_H \ No newline at end of file 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 1c575b7757..bdfe7f9261 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 @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -25,6 +25,7 @@ #include "MemoryAccessMatrixElements.h" #include "MemoryAccessMomenta.h" #include "MemoryAccessWavefunctions.h" +#include "processConfig.h" #ifdef MGONGPU_SUPPORTS_MULTICHANNEL #include "MemoryAccessDenominators.h" @@ -99,6 +100,69 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { +#ifdef MGONGPU_SUPPORTS_MULTICHANNEL + __device__ INLINE unsigned int getChannelId( const unsigned int* allChannelIds +#ifndef MGONGPUCPP_GPUIMPL + , + const int ievt00, + bool sanityCheckMixedPrecision = true +#endif + ) + { + unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr +#ifdef MGONGPUCPP_GPUIMPL + using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page + if( allChannelIds != nullptr ) + { + const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) + const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) + // NB: channelIds_sv is a scalar in CUDA + channelId = channelIds_sv; + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + } +#else // Cuda or C++ + using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + if( allChannelIds != nullptr ) + { + // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) + const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 + uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) +#ifndef MGONGPU_CPPSIMD + // NB: channelIds_sv is a scalar in no-SIMD C++ + channelId = channelIds_sv; +#else + // NB: channelIds_sv is a vector in SIMD C++ + channelId = channelIds_sv[0]; // element[0] + for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] + { + assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId + } +#endif + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + if( sanityCheckMixedPrecision ) + { +#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT + // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) + const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 + uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + for( int i = 0; i < neppV; ++i ) + { + assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector + } +#endif + } + } +#endif // MGONGPUCPP_GPUIMPL + return channelId; + } +#endif // MGONGPU_SUPPORTS_MULTICHANNEL + constexpr int nw6 = CPPProcess::nw6; // dimensions of each wavefunction (HELAS KEK 91-11): e.g. 6 for e+ e- -> mu+ mu- (fermions and vectors) constexpr int npar = CPPProcess::npar; // #particles in total (external = initial + final): e.g. 4 for e+ e- -> mu+ mu- constexpr int ncomb = CPPProcess::ncomb; // #helicity combinations: e.g. 16 for e+ e- -> mu+ mu- (2**4 = fermion spin up/down ** npar) @@ -308,7 +372,7 @@ namespace mg5amcCpu COUPs[ndcoup + iicoup] = allCOUPs[ndcoup + iicoup]; // independent couplings, fixed for all events fptype* MEs = E_ACCESS::ieventAccessRecord( allMEs, ievt0 ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); #endif #endif @@ -318,7 +382,7 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Numerators and denominators for the current event (CUDA) or SIMD event page (C++) - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); #endif @@ -344,8 +408,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1 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] ); + if( channelId != 0 ) + { + numerators_sv[0] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[5] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -360,8 +427,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 2 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] ); + if( channelId != 0 ) + { + numerators_sv[1] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[3] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -376,8 +446,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 3 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] ); + if( channelId != 0 ) + { + numerators_sv[2] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] -= 1. / 2. * amp_sv[0]; jamp_sv[3] += 1. / 2. * amp_sv[0]; @@ -392,8 +465,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 4 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] ); + if( channelId != 0 ) + { + numerators_sv[3] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= 1. / 6. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[1] += 1. / 6. * cxtype( 0, 1 ) * amp_sv[0]; @@ -408,8 +484,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 5 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] ); + if( channelId != 0 ) + { + numerators_sv[4] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= 1. / 6. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[1] += 1. / 6. * cxtype( 0, 1 ) * amp_sv[0]; @@ -425,8 +504,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 6 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] ); + if( channelId != 0 ) + { + numerators_sv[5] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 6. * amp_sv[0]; jamp_sv[10] -= 1. / 2. * amp_sv[0]; @@ -440,8 +522,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 7 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] ); + if( channelId != 0 ) + { + numerators_sv[6] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[10] -= 1. / 2. * amp_sv[0]; jamp_sv[11] += 1. / 6. * amp_sv[0]; @@ -454,8 +539,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 8 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] ); + if( channelId != 0 ) + { + numerators_sv[7] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] -= 1. / 2. * amp_sv[0]; jamp_sv[11] += 1. / 6. * amp_sv[0]; @@ -468,8 +556,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 9 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] ); + if( channelId != 0 ) + { + numerators_sv[8] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 6. * amp_sv[0]; jamp_sv[2] -= 1. / 2. * amp_sv[0]; @@ -482,8 +573,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 10 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] ); + if( channelId != 0 ) + { + numerators_sv[9] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[10] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -497,8 +591,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 11 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] ); + if( channelId != 0 ) + { + numerators_sv[10] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += 1. / 6. * amp_sv[0]; jamp_sv[9] -= 1. / 2. * amp_sv[0]; @@ -511,8 +608,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 12 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] ); + if( channelId != 0 ) + { + numerators_sv[11] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[5] -= 1. / 2. * amp_sv[0]; jamp_sv[11] += 1. / 6. * amp_sv[0]; @@ -525,8 +625,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 13 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] ); + if( channelId != 0 ) + { + numerators_sv[12] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[9] -= 1. / 2. * amp_sv[0]; jamp_sv[11] += 1. / 6. * amp_sv[0]; @@ -539,8 +642,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 14 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] ); + if( channelId != 0 ) + { + numerators_sv[13] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += 1. / 6. * amp_sv[0]; jamp_sv[5] -= 1. / 2. * amp_sv[0]; @@ -553,8 +659,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 15 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] ); + if( channelId != 0 ) + { + numerators_sv[14] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[5] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[9] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -568,8 +677,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 16 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] ); + if( channelId != 0 ) + { + numerators_sv[15] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[8] += 1. / 6. * amp_sv[0]; jamp_sv[9] -= 1. / 2. * amp_sv[0]; @@ -582,8 +694,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 17 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] ); + if( channelId != 0 ) + { + numerators_sv[16] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] -= 1. / 2. * amp_sv[0]; jamp_sv[8] += 1. / 6. * amp_sv[0]; @@ -596,8 +711,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 18 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] ); + if( channelId != 0 ) + { + numerators_sv[17] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[6] += 1. / 6. * amp_sv[0]; jamp_sv[9] -= 1. / 2. * amp_sv[0]; @@ -610,8 +728,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 19 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] ); + if( channelId != 0 ) + { + numerators_sv[18] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] -= 1. / 2. * amp_sv[0]; jamp_sv[6] += 1. / 6. * amp_sv[0]; @@ -624,8 +745,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 20 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] ); + if( channelId != 0 ) + { + numerators_sv[19] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[9] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -639,8 +763,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 21 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] ); + if( channelId != 0 ) + { + numerators_sv[20] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[3] -= 1. / 2. * amp_sv[0]; jamp_sv[8] += 1. / 6. * amp_sv[0]; @@ -653,8 +780,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 22 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] ); + if( channelId != 0 ) + { + numerators_sv[21] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[8] += 1. / 6. * amp_sv[0]; jamp_sv[10] -= 1. / 2. * amp_sv[0]; @@ -667,8 +797,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 23 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] ); + if( channelId != 0 ) + { + numerators_sv[22] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[7] += 1. / 6. * amp_sv[0]; jamp_sv[10] -= 1. / 2. * amp_sv[0]; @@ -681,8 +814,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 24 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] ); + if( channelId != 0 ) + { + numerators_sv[23] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[3] -= 1. / 2. * amp_sv[0]; jamp_sv[7] += 1. / 6. * amp_sv[0]; @@ -695,8 +831,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 25 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] ); + if( channelId != 0 ) + { + numerators_sv[24] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[3] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[10] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -709,8 +848,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 26 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] ); + if( channelId != 0 ) + { + numerators_sv[25] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += 1. / 6. * amp_sv[0]; jamp_sv[3] -= 1. / 2. * amp_sv[0]; @@ -723,8 +865,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 27 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] ); + if( channelId != 0 ) + { + numerators_sv[26] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[3] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[9] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -737,8 +882,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 28 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] ); + if( channelId != 0 ) + { + numerators_sv[27] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 6. * amp_sv[0]; jamp_sv[4] -= 1. / 2. * amp_sv[0]; @@ -751,8 +899,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 29 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] ); + if( channelId != 0 ) + { + numerators_sv[28] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[10] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -765,8 +916,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 30 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] ); + if( channelId != 0 ) + { + numerators_sv[29] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[5] -= 1. / 2. * amp_sv[0]; jamp_sv[7] += 1. / 6. * amp_sv[0]; @@ -779,8 +933,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 31 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] ); + if( channelId != 0 ) + { + numerators_sv[30] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[5] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[10] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -793,8 +950,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 32 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] ); + if( channelId != 0 ) + { + numerators_sv[31] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] -= 1. / 2. * amp_sv[0]; jamp_sv[6] += 1. / 6. * amp_sv[0]; @@ -807,8 +967,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 33 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] ); + if( channelId != 0 ) + { + numerators_sv[32] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[9] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -843,8 +1006,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 35 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] ); + if( channelId != 0 ) + { + numerators_sv[34] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] -= 1. / 2. * amp_sv[0]; jamp_sv[5] -= 1. / 2. * amp_sv[0]; @@ -859,8 +1025,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 36 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] ); + if( channelId != 0 ) + { + numerators_sv[35] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[3] -= 1. / 2. * amp_sv[0]; jamp_sv[4] -= 1. / 2. * amp_sv[0]; @@ -1113,7 +1282,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- @@ -1485,9 +1656,6 @@ namespace mg5amcCpu #ifdef MGONGPUCPP_GPUIMPL // Remember: in CUDA this is a kernel for one event, in c++ this processes n events const int ievt = blockDim.x * blockIdx.x + threadIdx.x; // index of event (thread) in grid -#ifdef MGONGPU_SUPPORTS_MULTICHANNEL - using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events -#endif #else //assert( (size_t)(allmomenta) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] //assert( (size_t)(allMEs) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] @@ -1495,7 +1663,6 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL using NUM_ACCESS = HostAccessNumerators; // non-trivial access: buffer includes all events using DEN_ACCESS = HostAccessDenominators; // non-trivial access: buffer includes all events - using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events #endif #endif @@ -1520,11 +1687,12 @@ namespace mg5amcCpu fptype_sv& MEs_sv = E_ACCESS::kernelAccess( MEs ); MEs_sv = fptype_sv{ 0 }; #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - numerators_sv = fptype_sv{ 0 }; + for( int i = 0; i < processConfig::ndiagrams; ++i ) + numerators_sv[i] = fptype_sv{ 0 }; denominators_sv = fptype_sv{ 0 }; #endif } @@ -1537,17 +1705,7 @@ namespace mg5amcCpu // *** START OF PART 1a - CUDA (one event per GPU thread) *** #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) - const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) - // NB: channelIds_sv is a scalar in CUDA - channelId = channelIds_sv; - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) - } + unsigned int channelId = getChannelId( allChannelIds ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (for the single event processed in calculate_wavefunctions) @@ -1662,38 +1820,7 @@ namespace mg5amcCpu const int ievt00 = ipagV2 * neppV; // loop on one SIMD page (neppV events) at a time #endif #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) - const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 - uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) -#ifndef MGONGPU_CPPSIMD - // NB: channelIds_sv is a scalar in no-SIMD C++ - channelId = channelIds_sv; -#else - // NB: channelIds_sv is a vector in SIMD C++ - channelId = channelIds_sv[0]; // element[0] - for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] - { - assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId - } -#endif - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) -#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT - // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) - const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 - uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - for( int i = 0; i < neppV; ++i ) - { - assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector - } -#endif - } + unsigned int channelId = getChannelId( allChannelIds, ievt00 ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (jamp2[nParity][ncolor][neppV] for the SIMD vector - or the two SIMD vectors - of events processed in calculate_wavefunctions) @@ -1866,11 +1993,12 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( allChannelIds != nullptr ) // fix segfault #892 (not 'channelIds[0] != 0') { - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + const unsigned int channelId = getChannelId( allChannelIds, ievt0, false ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - MEs_sv *= numerators_sv / denominators_sv; + MEs_sv *= numerators_sv[channelId - 1] / denominators_sv; } #endif //for( int ieppV = 0; ieppV < neppV; ieppV++ ) diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg/CPPProcess.h b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg/CPPProcess.h index 0689624568..9f6d1e73d8 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg/CPPProcess.h +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg/auto_dsig.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg/auto_dsig.f index 5787ba42b2..c6e0ad713c 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg/auto_dsig.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C 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 75d947b792..4f87d87a30 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 @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -140,7 +140,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDDO QSCALE=QSCALE/2D0 ELSE - QSCALE=DSQRT(Q2FACT(IB(1))) + QSCALE=DSQRT(Q2FACT(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) @@ -150,7 +150,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) IF (DSQRT(Q2FACT(IB(2))).NE.0D0) THEN - QSCALE=DSQRT(Q2FACT(IB(2))) + QSCALE=DSQRT(Q2FACT(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) @@ -237,7 +237,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -313,6 +313,10 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, INTEGER I_EE C +C STUFF FOR UPC +C + DOUBLE PRECISION PHOTONPDFSQUARE +C C EXTERNAL FUNCTIONS C LOGICAL PASSCUTS @@ -398,24 +402,24 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, IF (ABS(LPP(IB(1))).GE.1) THEN C LP=SIGN(1,LPP(IB(1))) D1(IVEC)=PDG2PDF(LPP(IB(1)),1, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) U1(IVEC)=PDG2PDF(LPP(IB(1)),2, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) S1(IVEC)=PDG2PDF(LPP(IB(1)),3, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) C1(IVEC)=PDG2PDF(LPP(IB(1)),4, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) CX2(IVEC)=PDG2PDF(LPP(IB(2)),-4, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) SX2(IVEC)=PDG2PDF(LPP(IB(2)),-3, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) UX2(IVEC)=PDG2PDF(LPP(IB(2)),-2, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) DX2(IVEC)=PDG2PDF(LPP(IB(2)),-1, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) ENDIF ENDDO ! IWARP LOOP ENDDO ! CURRWARP LOOP 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 65c377ffc0..594b3ed260 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 @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -358,7 +358,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -404,7 +404,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C INTEGER I,J,M,N COMPLEX*16 ZTEMP, TMP_JAMP(17) - REAL*8 CF(NCOLOR,NCOLOR) + INTEGER CF(NCOLOR*(NCOLOR+1)/2) + INTEGER DENOM, CF_INDEX COMPLEX*16 AMP(NGRAPHS), JAMP(NCOLOR,NAMPSO) COMPLEX*16 W(6,NWAVEFUNCS) C Needed for v4 models @@ -447,101 +448,30 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C C COLOR DATA C - DATA (CF(I, 1),I= 1, 6) /1.600000000000000D+01, - $ -2.000000000000000D+00,5.333333333333333D+00, - $ -6.666666666666666D-01,5.333333333333333D+00, - $ -6.666666666666666D-01/ - DATA (CF(I, 1),I= 7, 12) /2.000000000000000D+00 - $ ,2.000000000000000D+00,0.000000000000000D+00, - $ -6.666666666666666D-01,5.333333333333333D+00,0.000000000000000D - $ +00/ + DATA DENOM/3/ + DATA (CF(I),I= 1, 12) /48,-12,32,-4,32,-4,12,12,0,-4,32,0/ C 1 T(2,1) T(5,6,3,4) - DATA (CF(I, 2),I= 1, 6) /-2.000000000000000D+00 - $ ,1.600000000000000D+01,-6.666666666666666D-01 - $ ,5.333333333333333D+00,-6.666666666666666D-01 - $ ,5.333333333333333D+00/ - DATA (CF(I, 2),I= 7, 12) /2.000000000000000D+00 - $ ,2.000000000000000D+00,0.000000000000000D+00,5.333333333333333D - $ +00,-6.666666666666666D-01,0.000000000000000D+00/ + DATA (CF(I),I= 13, 23) /48,-4,32,-4,32,12,12,0,32,-4,0/ C 1 T(2,1) T(6,5,3,4) - DATA (CF(I, 3),I= 1, 6) /5.333333333333333D+00, - $ -6.666666666666666D-01,1.600000000000000D+01, - $ -2.000000000000000D+00,2.000000000000000D+00,2.000000000000000D - $ +00/ - DATA (CF(I, 3),I= 7, 12) /5.333333333333333D+00, - $ -6.666666666666666D-01,-6.666666666666666D-01 - $ ,0.000000000000000D+00,0.000000000000000D+00,5.333333333333333D - $ +00/ + DATA (CF(I),I= 24, 33) /48,-12,12,12,32,-4,-4,0,0,32/ C 1 T(2,4) T(5,6,3,1) - DATA (CF(I, 4),I= 1, 6) /-6.666666666666666D-01 - $ ,5.333333333333333D+00,-2.000000000000000D+00 - $ ,1.600000000000000D+01,2.000000000000000D+00,2.000000000000000D - $ +00/ - DATA (CF(I, 4),I= 7, 12) /-6.666666666666666D-01 - $ ,5.333333333333333D+00,5.333333333333333D+00,0.000000000000000D - $ +00,0.000000000000000D+00,-6.666666666666666D-01/ + DATA (CF(I),I= 34, 42) /48,12,12,-4,32,32,0,0,-4/ C 1 T(2,4) T(6,5,3,1) - DATA (CF(I, 5),I= 1, 6) /5.333333333333333D+00, - $ -6.666666666666666D-01,2.000000000000000D+00,2.000000000000000D - $ +00,1.600000000000000D+01,-2.000000000000000D+00/ - DATA (CF(I, 5),I= 7, 12) /5.333333333333333D+00, - $ -6.666666666666666D-01,5.333333333333333D+00,0.000000000000000D - $ +00,0.000000000000000D+00,-6.666666666666666D-01/ + DATA (CF(I),I= 43, 50) /48,-12,32,-4,32,0,0,-4/ C 1 T(3,1) T(5,6,2,4) - DATA (CF(I, 6),I= 1, 6) /-6.666666666666666D-01 - $ ,5.333333333333333D+00,2.000000000000000D+00,2.000000000000000D - $ +00,-2.000000000000000D+00,1.600000000000000D+01/ - DATA (CF(I, 6),I= 7, 12) /-6.666666666666666D-01 - $ ,5.333333333333333D+00,-6.666666666666666D-01 - $ ,0.000000000000000D+00,0.000000000000000D+00,5.333333333333333D - $ +00/ + DATA (CF(I),I= 51, 57) /48,-4,32,-4,0,0,32/ C 1 T(3,1) T(6,5,2,4) - DATA (CF(I, 7),I= 1, 6) /2.000000000000000D+00 - $ ,2.000000000000000D+00,5.333333333333333D+00, - $ -6.666666666666666D-01,5.333333333333333D+00, - $ -6.666666666666666D-01/ - DATA (CF(I, 7),I= 7, 12) /1.600000000000000D+01, - $ -2.000000000000000D+00,0.000000000000000D+00,5.333333333333333D - $ +00,-6.666666666666666D-01,0.000000000000000D+00/ + DATA (CF(I),I= 58, 63) /48,-12,0,32,-4,0/ C 1 T(3,4) T(5,6,2,1) - DATA (CF(I, 8),I= 1, 6) /2.000000000000000D+00 - $ ,2.000000000000000D+00,-6.666666666666666D-01 - $ ,5.333333333333333D+00,-6.666666666666666D-01 - $ ,5.333333333333333D+00/ - DATA (CF(I, 8),I= 7, 12) /-2.000000000000000D+00 - $ ,1.600000000000000D+01,0.000000000000000D+00, - $ -6.666666666666666D-01,5.333333333333333D+00,0.000000000000000D - $ +00/ + DATA (CF(I),I= 64, 68) /48,0,-4,32,0/ C 1 T(3,4) T(6,5,2,1) - DATA (CF(I, 9),I= 1, 6) /0.000000000000000D+00 - $ ,0.000000000000000D+00,-6.666666666666666D-01 - $ ,5.333333333333333D+00,5.333333333333333D+00, - $ -6.666666666666666D-01/ - DATA (CF(I, 9),I= 7, 12) /0.000000000000000D+00 - $ ,0.000000000000000D+00,1.600000000000000D+01,5.333333333333333D - $ +00,5.333333333333333D+00,2.000000000000000D+00/ + DATA (CF(I),I= 69, 72) /48,32,32,12/ C 1 T(5,2,1) T(6,3,4) - DATA (CF(I, 10),I= 1, 6) /-6.666666666666666D-01 - $ ,5.333333333333333D+00,0.000000000000000D+00,0.000000000000000D - $ +00,0.000000000000000D+00,0.000000000000000D+00/ - DATA (CF(I, 10),I= 7, 12) /5.333333333333333D+00, - $ -6.666666666666666D-01,5.333333333333333D+00,1.600000000000000D - $ +01,2.000000000000000D+00,5.333333333333333D+00/ + DATA (CF(I),I= 73, 75) /48,12,32/ C 1 T(5,2,4) T(6,3,1) - DATA (CF(I, 11),I= 1, 6) /5.333333333333333D+00, - $ -6.666666666666666D-01,0.000000000000000D+00,0.000000000000000D - $ +00,0.000000000000000D+00,0.000000000000000D+00/ - DATA (CF(I, 11),I= 7, 12) /-6.666666666666666D-01 - $ ,5.333333333333333D+00,5.333333333333333D+00,2.000000000000000D - $ +00,1.600000000000000D+01,5.333333333333333D+00/ + DATA (CF(I),I= 76, 77) /48,32/ C 1 T(5,3,1) T(6,2,4) - DATA (CF(I, 12),I= 1, 6) /0.000000000000000D+00 - $ ,0.000000000000000D+00,5.333333333333333D+00, - $ -6.666666666666666D-01,-6.666666666666666D-01 - $ ,5.333333333333333D+00/ - DATA (CF(I, 12),I= 7, 12) /0.000000000000000D+00 - $ ,0.000000000000000D+00,2.000000000000000D+00,5.333333333333333D - $ +00,5.333333333333333D+00,1.600000000000000D+01/ + DATA (CF(I),I= 78, 78) /48/ C 1 T(5,3,4) T(6,2,1) C ---------- C BEGIN CODE @@ -761,10 +691,12 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) MATRIX1 = 0.D0 DO M = 1, NAMPSO + CF_INDEX = 0 DO I = 1, NCOLOR ZTEMP = (0.D0,0.D0) - DO J = 1, NCOLOR - ZTEMP = ZTEMP + CF(J,I)*JAMP(J,M) + DO J = I, NCOLOR + CF_INDEX = CF_INDEX + 1 + ZTEMP = ZTEMP + CF(CF_INDEX)*JAMP(J,M) ENDDO DO N = 1, NAMPSO @@ -773,6 +705,7 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) ENDDO ENDDO ENDDO + MATRIX1 = MATRIX1/DENOM IF(SDE_STRAT.EQ.1)THEN AMP2(1)=AMP2(1)+AMP(1)*DCONJG(AMP(1)) diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg/matrix11.png b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg/matrix11.png new file mode 100644 index 0000000000..a033774c89 Binary files /dev/null and b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg/matrix11.png differ diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg/matrix12.png b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg/matrix12.png new file mode 100644 index 0000000000..d53c251baa Binary files /dev/null and b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg/matrix12.png differ diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg/processConfig.h b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg/processConfig.h new file mode 100644 index 0000000000..25081a00da --- /dev/null +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg/processConfig.h @@ -0,0 +1,16 @@ +// Copyright (C) 2025 CERN and UCLouvain. +// Licensed under the GNU Lesser General Public License (version 3 or later). +// Created by: S. Roiser (May 2025) for the MG5aMC CUDACPP plugin. +// Further modified by: ... for the MG5aMC CUDACPP plugin. + + +#ifndef MG5_CONFIG_SIGMA_SM_UUX_TTXGG_H +#define MG5_CONFIG_SIGMA_SM_UUX_TTXGG_H 1 + +namespace processConfig { + + constexpr int ndiagrams = 36; + +} + +#endif // MG5_CONFIG_SIGMA_SM_UUX_TTXGG_H \ No newline at end of file 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 e6d6423d5e..ddfceba368 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 @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -25,6 +25,7 @@ #include "MemoryAccessMatrixElements.h" #include "MemoryAccessMomenta.h" #include "MemoryAccessWavefunctions.h" +#include "processConfig.h" #ifdef MGONGPU_SUPPORTS_MULTICHANNEL #include "MemoryAccessDenominators.h" @@ -99,6 +100,69 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { +#ifdef MGONGPU_SUPPORTS_MULTICHANNEL + __device__ INLINE unsigned int getChannelId( const unsigned int* allChannelIds +#ifndef MGONGPUCPP_GPUIMPL + , + const int ievt00, + bool sanityCheckMixedPrecision = true +#endif + ) + { + unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr +#ifdef MGONGPUCPP_GPUIMPL + using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page + if( allChannelIds != nullptr ) + { + const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) + const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) + // NB: channelIds_sv is a scalar in CUDA + channelId = channelIds_sv; + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + } +#else // Cuda or C++ + using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + if( allChannelIds != nullptr ) + { + // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) + const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 + uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) +#ifndef MGONGPU_CPPSIMD + // NB: channelIds_sv is a scalar in no-SIMD C++ + channelId = channelIds_sv; +#else + // NB: channelIds_sv is a vector in SIMD C++ + channelId = channelIds_sv[0]; // element[0] + for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] + { + assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId + } +#endif + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + if( sanityCheckMixedPrecision ) + { +#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT + // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) + const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 + uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + for( int i = 0; i < neppV; ++i ) + { + assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector + } +#endif + } + } +#endif // MGONGPUCPP_GPUIMPL + return channelId; + } +#endif // MGONGPU_SUPPORTS_MULTICHANNEL + constexpr int nw6 = CPPProcess::nw6; // dimensions of each wavefunction (HELAS KEK 91-11): e.g. 6 for e+ e- -> mu+ mu- (fermions and vectors) constexpr int npar = CPPProcess::npar; // #particles in total (external = initial + final): e.g. 4 for e+ e- -> mu+ mu- constexpr int ncomb = CPPProcess::ncomb; // #helicity combinations: e.g. 16 for e+ e- -> mu+ mu- (2**4 = fermion spin up/down ** npar) @@ -308,7 +372,7 @@ namespace mg5amcCpu COUPs[ndcoup + iicoup] = allCOUPs[ndcoup + iicoup]; // independent couplings, fixed for all events fptype* MEs = E_ACCESS::ieventAccessRecord( allMEs, ievt0 ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); #endif #endif @@ -318,7 +382,7 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Numerators and denominators for the current event (CUDA) or SIMD event page (C++) - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); #endif @@ -344,8 +408,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1 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] ); + if( channelId != 0 ) + { + numerators_sv[0] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 36. * amp_sv[0]; jamp_sv[1] -= 1. / 12. * amp_sv[0]; @@ -360,8 +427,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 2 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] ); + if( channelId != 0 ) + { + numerators_sv[1] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 36. * amp_sv[0]; jamp_sv[1] -= 1. / 12. * amp_sv[0]; @@ -376,8 +446,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 3 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] ); + if( channelId != 0 ) + { + numerators_sv[2] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[3] += 1. / 4. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[4] -= 1. / 4. * cxtype( 0, 1 ) * amp_sv[0]; @@ -390,8 +463,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 4 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] ); + if( channelId != 0 ) + { + numerators_sv[3] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 36. * amp_sv[0]; jamp_sv[1] -= 1. / 12. * amp_sv[0]; @@ -406,8 +482,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 5 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] ); + if( channelId != 0 ) + { + numerators_sv[4] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 36. * amp_sv[0]; jamp_sv[1] -= 1. / 12. * amp_sv[0]; @@ -424,8 +503,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 6 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] ); + if( channelId != 0 ) + { + numerators_sv[5] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] -= 1. / 4. * amp_sv[0]; jamp_sv[3] += 1. / 12. * amp_sv[0]; @@ -440,8 +522,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 7 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] ); + if( channelId != 0 ) + { + numerators_sv[6] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] -= 1. / 4. * amp_sv[0]; jamp_sv[3] += 1. / 12. * amp_sv[0]; @@ -456,8 +541,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 8 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] ); + if( channelId != 0 ) + { + numerators_sv[7] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] -= 1. / 4. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[2] += 1. / 4. * cxtype( 0, 1 ) * amp_sv[0]; @@ -470,8 +558,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 9 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] ); + if( channelId != 0 ) + { + numerators_sv[8] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 12. * amp_sv[0]; jamp_sv[2] -= 1. / 4. * amp_sv[0]; @@ -486,8 +577,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 10 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] ); + if( channelId != 0 ) + { + numerators_sv[9] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 12. * amp_sv[0]; jamp_sv[1] -= 1. / 4. * amp_sv[0]; @@ -502,8 +596,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 11 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] ); + if( channelId != 0 ) + { + numerators_sv[10] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 12. * amp_sv[0]; jamp_sv[1] -= 1. / 4. * amp_sv[0]; @@ -518,8 +615,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 12 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] ); + if( channelId != 0 ) + { + numerators_sv[11] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 12. * amp_sv[0]; jamp_sv[2] -= 1. / 4. * amp_sv[0]; @@ -534,8 +634,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 13 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] ); + if( channelId != 0 ) + { + numerators_sv[12] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 36. * amp_sv[0]; jamp_sv[2] -= 1. / 12. * amp_sv[0]; @@ -550,8 +653,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 14 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] ); + if( channelId != 0 ) + { + numerators_sv[13] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 36. * amp_sv[0]; jamp_sv[2] -= 1. / 12. * amp_sv[0]; @@ -798,7 +904,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- @@ -1170,9 +1278,6 @@ namespace mg5amcCpu #ifdef MGONGPUCPP_GPUIMPL // Remember: in CUDA this is a kernel for one event, in c++ this processes n events const int ievt = blockDim.x * blockIdx.x + threadIdx.x; // index of event (thread) in grid -#ifdef MGONGPU_SUPPORTS_MULTICHANNEL - using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events -#endif #else //assert( (size_t)(allmomenta) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] //assert( (size_t)(allMEs) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] @@ -1180,7 +1285,6 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL using NUM_ACCESS = HostAccessNumerators; // non-trivial access: buffer includes all events using DEN_ACCESS = HostAccessDenominators; // non-trivial access: buffer includes all events - using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events #endif #endif @@ -1205,11 +1309,12 @@ namespace mg5amcCpu fptype_sv& MEs_sv = E_ACCESS::kernelAccess( MEs ); MEs_sv = fptype_sv{ 0 }; #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - numerators_sv = fptype_sv{ 0 }; + for( int i = 0; i < processConfig::ndiagrams; ++i ) + numerators_sv[i] = fptype_sv{ 0 }; denominators_sv = fptype_sv{ 0 }; #endif } @@ -1222,17 +1327,7 @@ namespace mg5amcCpu // *** START OF PART 1a - CUDA (one event per GPU thread) *** #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) - const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) - // NB: channelIds_sv is a scalar in CUDA - channelId = channelIds_sv; - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) - } + unsigned int channelId = getChannelId( allChannelIds ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (for the single event processed in calculate_wavefunctions) @@ -1347,38 +1442,7 @@ namespace mg5amcCpu const int ievt00 = ipagV2 * neppV; // loop on one SIMD page (neppV events) at a time #endif #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) - const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 - uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) -#ifndef MGONGPU_CPPSIMD - // NB: channelIds_sv is a scalar in no-SIMD C++ - channelId = channelIds_sv; -#else - // NB: channelIds_sv is a vector in SIMD C++ - channelId = channelIds_sv[0]; // element[0] - for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] - { - assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId - } -#endif - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) -#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT - // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) - const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 - uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - for( int i = 0; i < neppV; ++i ) - { - assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector - } -#endif - } + unsigned int channelId = getChannelId( allChannelIds, ievt00 ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (jamp2[nParity][ncolor][neppV] for the SIMD vector - or the two SIMD vectors - of events processed in calculate_wavefunctions) @@ -1551,11 +1615,12 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( allChannelIds != nullptr ) // fix segfault #892 (not 'channelIds[0] != 0') { - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + const unsigned int channelId = getChannelId( allChannelIds, ievt0, false ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - MEs_sv *= numerators_sv / denominators_sv; + MEs_sv *= numerators_sv[channelId - 1] / denominators_sv; } #endif //for( int ieppV = 0; ieppV < neppV; ieppV++ ) diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxuux/CPPProcess.h b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxuux/CPPProcess.h index de4fd12c37..d61cca972b 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxuux/CPPProcess.h +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxuux/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxuux/auto_dsig.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxuux/auto_dsig.f index 639c7207e3..a6822d8039 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxuux/auto_dsig.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxuux/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C 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 8fc5eeb386..1a2a1fcc8b 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 @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -140,7 +140,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDDO QSCALE=QSCALE/2D0 ELSE - QSCALE=DSQRT(Q2FACT(IB(1))) + QSCALE=DSQRT(Q2FACT(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) @@ -150,7 +150,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) IF (DSQRT(Q2FACT(IB(2))).NE.0D0) THEN - QSCALE=DSQRT(Q2FACT(IB(2))) + QSCALE=DSQRT(Q2FACT(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) @@ -237,7 +237,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -313,6 +313,10 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, INTEGER I_EE C +C STUFF FOR UPC +C + DOUBLE PRECISION PHOTONPDFSQUARE +C C EXTERNAL FUNCTIONS C LOGICAL PASSCUTS @@ -398,24 +402,24 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, IF (ABS(LPP(IB(1))).GE.1) THEN C LP=SIGN(1,LPP(IB(1))) D1(IVEC)=PDG2PDF(LPP(IB(1)),1, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) U1(IVEC)=PDG2PDF(LPP(IB(1)),2, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) S1(IVEC)=PDG2PDF(LPP(IB(1)),3, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) C1(IVEC)=PDG2PDF(LPP(IB(1)),4, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) CX2(IVEC)=PDG2PDF(LPP(IB(2)),-4, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) SX2(IVEC)=PDG2PDF(LPP(IB(2)),-3, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) UX2(IVEC)=PDG2PDF(LPP(IB(2)),-2, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) DX2(IVEC)=PDG2PDF(LPP(IB(2)),-1, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) ENDIF ENDDO ! IWARP LOOP ENDDO ! CURRWARP LOOP 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 9a6d844439..a20e35e5ec 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 @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -358,7 +358,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -404,7 +404,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C INTEGER I,J,M,N COMPLEX*16 ZTEMP, TMP_JAMP(16) - REAL*8 CF(NCOLOR,NCOLOR) + INTEGER CF(NCOLOR*(NCOLOR+1)/2) + INTEGER DENOM, CF_INDEX COMPLEX*16 AMP(NGRAPHS), JAMP(NCOLOR,NAMPSO) COMPLEX*16 W(6,NWAVEFUNCS) C Needed for v4 models @@ -447,29 +448,18 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C C COLOR DATA C - DATA (CF(I, 1),I= 1, 6) /2.700000000000000D+01 - $ ,9.000000000000000D+00,9.000000000000000D+00,3.000000000000000D - $ +00,3.000000000000000D+00,9.000000000000000D+00/ + DATA DENOM/1/ + DATA (CF(I),I= 1, 6) /27,18,18,6,6,18/ C 1 T(2,1) T(3,4) T(5,6) - DATA (CF(I, 2),I= 1, 6) /9.000000000000000D+00 - $ ,2.700000000000000D+01,3.000000000000000D+00,9.000000000000000D - $ +00,9.000000000000000D+00,3.000000000000000D+00/ + DATA (CF(I),I= 7, 11) /27,6,18,18,6/ C 1 T(2,1) T(3,6) T(5,4) - DATA (CF(I, 3),I= 1, 6) /9.000000000000000D+00 - $ ,3.000000000000000D+00,2.700000000000000D+01,9.000000000000000D - $ +00,9.000000000000000D+00,3.000000000000000D+00/ + DATA (CF(I),I= 12, 15) /27,18,18,6/ C 1 T(2,4) T(3,1) T(5,6) - DATA (CF(I, 4),I= 1, 6) /3.000000000000000D+00 - $ ,9.000000000000000D+00,9.000000000000000D+00,2.700000000000000D - $ +01,3.000000000000000D+00,9.000000000000000D+00/ + DATA (CF(I),I= 16, 18) /27,6,18/ C 1 T(2,4) T(3,6) T(5,1) - DATA (CF(I, 5),I= 1, 6) /3.000000000000000D+00 - $ ,9.000000000000000D+00,9.000000000000000D+00,3.000000000000000D - $ +00,2.700000000000000D+01,9.000000000000000D+00/ + DATA (CF(I),I= 19, 20) /27,18/ C 1 T(2,6) T(3,1) T(5,4) - DATA (CF(I, 6),I= 1, 6) /9.000000000000000D+00 - $ ,3.000000000000000D+00,3.000000000000000D+00,9.000000000000000D - $ +00,9.000000000000000D+00,2.700000000000000D+01/ + DATA (CF(I),I= 21, 21) /27/ C 1 T(2,6) T(3,4) T(5,1) C ---------- C BEGIN CODE @@ -585,10 +575,12 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) MATRIX1 = 0.D0 DO M = 1, NAMPSO + CF_INDEX = 0 DO I = 1, NCOLOR ZTEMP = (0.D0,0.D0) - DO J = 1, NCOLOR - ZTEMP = ZTEMP + CF(J,I)*JAMP(J,M) + DO J = I, NCOLOR + CF_INDEX = CF_INDEX + 1 + ZTEMP = ZTEMP + CF(CF_INDEX)*JAMP(J,M) ENDDO DO N = 1, NAMPSO @@ -597,6 +589,7 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) ENDDO ENDDO ENDDO + MATRIX1 = MATRIX1/DENOM IF(SDE_STRAT.EQ.1)THEN AMP2(1)=AMP2(1)+AMP(1)*DCONJG(AMP(1)) diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxuux/matrix11.png b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxuux/matrix11.png new file mode 100644 index 0000000000..5281cf97ff Binary files /dev/null and b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxuux/matrix11.png differ diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxuux/matrix12.png b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxuux/matrix12.png new file mode 100644 index 0000000000..816068689e Binary files /dev/null and b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxuux/matrix12.png differ diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxuux/processConfig.h b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxuux/processConfig.h new file mode 100644 index 0000000000..e6c319de76 --- /dev/null +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxuux/processConfig.h @@ -0,0 +1,16 @@ +// Copyright (C) 2025 CERN and UCLouvain. +// Licensed under the GNU Lesser General Public License (version 3 or later). +// Created by: S. Roiser (May 2025) for the MG5aMC CUDACPP plugin. +// Further modified by: ... for the MG5aMC CUDACPP plugin. + + +#ifndef MG5_CONFIG_SIGMA_SM_UUX_TTXUUX_H +#define MG5_CONFIG_SIGMA_SM_UUX_TTXUUX_H 1 + +namespace processConfig { + + constexpr int ndiagrams = 14; + +} + +#endif // MG5_CONFIG_SIGMA_SM_UUX_TTXUUX_H \ No newline at end of file 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 bf560d981f..bbc0e7764a 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 @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -25,6 +25,7 @@ #include "MemoryAccessMatrixElements.h" #include "MemoryAccessMomenta.h" #include "MemoryAccessWavefunctions.h" +#include "processConfig.h" #ifdef MGONGPU_SUPPORTS_MULTICHANNEL #include "MemoryAccessDenominators.h" @@ -101,6 +102,69 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { +#ifdef MGONGPU_SUPPORTS_MULTICHANNEL + __device__ INLINE unsigned int getChannelId( const unsigned int* allChannelIds +#ifndef MGONGPUCPP_GPUIMPL + , + const int ievt00, + bool sanityCheckMixedPrecision = true +#endif + ) + { + unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr +#ifdef MGONGPUCPP_GPUIMPL + using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page + if( allChannelIds != nullptr ) + { + const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) + const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) + // NB: channelIds_sv is a scalar in CUDA + channelId = channelIds_sv; + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + } +#else // Cuda or C++ + using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + if( allChannelIds != nullptr ) + { + // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) + const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 + uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) +#ifndef MGONGPU_CPPSIMD + // NB: channelIds_sv is a scalar in no-SIMD C++ + channelId = channelIds_sv; +#else + // NB: channelIds_sv is a vector in SIMD C++ + channelId = channelIds_sv[0]; // element[0] + for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] + { + assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId + } +#endif + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + if( sanityCheckMixedPrecision ) + { +#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT + // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) + const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 + uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + for( int i = 0; i < neppV; ++i ) + { + assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector + } +#endif + } + } +#endif // MGONGPUCPP_GPUIMPL + return channelId; + } +#endif // MGONGPU_SUPPORTS_MULTICHANNEL + constexpr int nw6 = CPPProcess::nw6; // dimensions of each wavefunction (HELAS KEK 91-11): e.g. 6 for e+ e- -> mu+ mu- (fermions and vectors) constexpr int npar = CPPProcess::npar; // #particles in total (external = initial + final): e.g. 4 for e+ e- -> mu+ mu- constexpr int ncomb = CPPProcess::ncomb; // #helicity combinations: e.g. 16 for e+ e- -> mu+ mu- (2**4 = fermion spin up/down ** npar) @@ -310,7 +374,7 @@ namespace mg5amcCpu COUPs[ndcoup + iicoup] = allCOUPs[ndcoup + iicoup]; // independent couplings, fixed for all events fptype* MEs = E_ACCESS::ieventAccessRecord( allMEs, ievt0 ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); #endif #endif @@ -320,7 +384,7 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Numerators and denominators for the current event (CUDA) or SIMD event page (C++) - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); #endif @@ -346,8 +410,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1 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] ); + if( channelId != 0 ) + { + numerators_sv[0] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] -= 1. / 12. * amp_sv[0]; jamp_sv[2] -= 1. / 12. * amp_sv[0]; @@ -362,8 +429,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 2 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] ); + if( channelId != 0 ) + { + numerators_sv[1] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 4. * amp_sv[0]; jamp_sv[1] -= 1. / 12. * amp_sv[0]; @@ -378,8 +448,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 3 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] ); + if( channelId != 0 ) + { + numerators_sv[2] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 4. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[4] -= 1. / 4. * cxtype( 0, 1 ) * amp_sv[0]; @@ -392,8 +465,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 4 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] ); + if( channelId != 0 ) + { + numerators_sv[3] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] -= 1. / 12. * amp_sv[0]; jamp_sv[3] += 1. / 36. * amp_sv[0]; @@ -408,8 +484,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 5 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] ); + if( channelId != 0 ) + { + numerators_sv[4] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 4. * amp_sv[0]; jamp_sv[2] -= 1. / 12. * amp_sv[0]; @@ -424,8 +503,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 6 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] ); + if( channelId != 0 ) + { + numerators_sv[5] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 4. * amp_sv[0]; jamp_sv[1] -= 1. / 12. * amp_sv[0]; @@ -440,8 +522,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 7 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] ); + if( channelId != 0 ) + { + numerators_sv[6] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] -= 1. / 12. * amp_sv[0]; jamp_sv[3] += 1. / 36. * amp_sv[0]; @@ -688,7 +773,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- @@ -1060,9 +1147,6 @@ namespace mg5amcCpu #ifdef MGONGPUCPP_GPUIMPL // Remember: in CUDA this is a kernel for one event, in c++ this processes n events const int ievt = blockDim.x * blockIdx.x + threadIdx.x; // index of event (thread) in grid -#ifdef MGONGPU_SUPPORTS_MULTICHANNEL - using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events -#endif #else //assert( (size_t)(allmomenta) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] //assert( (size_t)(allMEs) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] @@ -1070,7 +1154,6 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL using NUM_ACCESS = HostAccessNumerators; // non-trivial access: buffer includes all events using DEN_ACCESS = HostAccessDenominators; // non-trivial access: buffer includes all events - using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events #endif #endif @@ -1095,11 +1178,12 @@ namespace mg5amcCpu fptype_sv& MEs_sv = E_ACCESS::kernelAccess( MEs ); MEs_sv = fptype_sv{ 0 }; #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - numerators_sv = fptype_sv{ 0 }; + for( int i = 0; i < processConfig::ndiagrams; ++i ) + numerators_sv[i] = fptype_sv{ 0 }; denominators_sv = fptype_sv{ 0 }; #endif } @@ -1112,17 +1196,7 @@ namespace mg5amcCpu // *** START OF PART 1a - CUDA (one event per GPU thread) *** #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) - const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) - // NB: channelIds_sv is a scalar in CUDA - channelId = channelIds_sv; - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) - } + unsigned int channelId = getChannelId( allChannelIds ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (for the single event processed in calculate_wavefunctions) @@ -1237,38 +1311,7 @@ namespace mg5amcCpu const int ievt00 = ipagV2 * neppV; // loop on one SIMD page (neppV events) at a time #endif #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) - const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 - uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) -#ifndef MGONGPU_CPPSIMD - // NB: channelIds_sv is a scalar in no-SIMD C++ - channelId = channelIds_sv; -#else - // NB: channelIds_sv is a vector in SIMD C++ - channelId = channelIds_sv[0]; // element[0] - for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] - { - assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId - } -#endif - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) -#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT - // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) - const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 - uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - for( int i = 0; i < neppV; ++i ) - { - assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector - } -#endif - } + unsigned int channelId = getChannelId( allChannelIds, ievt00 ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (jamp2[nParity][ncolor][neppV] for the SIMD vector - or the two SIMD vectors - of events processed in calculate_wavefunctions) @@ -1441,11 +1484,12 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( allChannelIds != nullptr ) // fix segfault #892 (not 'channelIds[0] != 0') { - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + const unsigned int channelId = getChannelId( allChannelIds, ievt0, false ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - MEs_sv *= numerators_sv / denominators_sv; + MEs_sv *= numerators_sv[channelId - 1] / denominators_sv; } #endif //for( int ieppV = 0; ieppV < neppV; ieppV++ ) diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxcx_ttxuxcx/CPPProcess.h b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxcx_ttxuxcx/CPPProcess.h index 13a02cdb83..01ad188163 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxcx_ttxuxcx/CPPProcess.h +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxcx_ttxuxcx/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxcx_ttxuxcx/auto_dsig.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxcx_ttxuxcx/auto_dsig.f index bf9951e502..9578dc7e87 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxcx_ttxuxcx/auto_dsig.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxcx_ttxuxcx/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C 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 24b0abb30c..34401887a2 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 @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -142,7 +142,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDDO QSCALE=QSCALE/2D0 ELSE - QSCALE=DSQRT(Q2FACT(IB(1))) + QSCALE=DSQRT(Q2FACT(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) @@ -151,7 +151,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) IF (DSQRT(Q2FACT(IB(2))).NE.0D0) THEN - QSCALE=DSQRT(Q2FACT(IB(2))) + QSCALE=DSQRT(Q2FACT(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) @@ -243,7 +243,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -321,6 +321,10 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, INTEGER I_EE C +C STUFF FOR UPC +C + DOUBLE PRECISION PHOTONPDFSQUARE +C C EXTERNAL FUNCTIONS C LOGICAL PASSCUTS @@ -406,20 +410,20 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, IF (ABS(LPP(IB(1))).GE.1) THEN C LP=SIGN(1,LPP(IB(1))) CX1(IVEC)=PDG2PDF(LPP(IB(1)),-4, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) UX1(IVEC)=PDG2PDF(LPP(IB(1)),-2, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) DX1(IVEC)=PDG2PDF(LPP(IB(1)),-1, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) CX2(IVEC)=PDG2PDF(LPP(IB(2)),-4, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) SX2(IVEC)=PDG2PDF(LPP(IB(2)),-3, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) DX2(IVEC)=PDG2PDF(LPP(IB(2)),-1, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) ENDIF ENDDO ! IWARP LOOP ENDDO ! CURRWARP LOOP 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 2a76dfeffb..991a639c73 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 @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -360,7 +360,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -408,7 +408,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C INTEGER I,J,M,N COMPLEX*16 ZTEMP, TMP_JAMP(8) - REAL*8 CF(NCOLOR,NCOLOR) + INTEGER CF(NCOLOR*(NCOLOR+1)/2) + INTEGER DENOM, CF_INDEX COMPLEX*16 AMP(NGRAPHS), JAMP(NCOLOR,NAMPSO) COMPLEX*16 W(6,NWAVEFUNCS) C Needed for v4 models @@ -451,29 +452,18 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C C COLOR DATA C - DATA (CF(I, 1),I= 1, 6) /2.700000000000000D+01 - $ ,9.000000000000000D+00,9.000000000000000D+00,3.000000000000000D - $ +00,3.000000000000000D+00,9.000000000000000D+00/ + DATA DENOM/1/ + DATA (CF(I),I= 1, 6) /27,18,18,6,6,18/ C 1 T(1,4) T(2,5) T(3,6) - DATA (CF(I, 2),I= 1, 6) /9.000000000000000D+00 - $ ,2.700000000000000D+01,3.000000000000000D+00,9.000000000000000D - $ +00,9.000000000000000D+00,3.000000000000000D+00/ + DATA (CF(I),I= 7, 11) /27,6,18,18,6/ C 1 T(1,4) T(2,6) T(3,5) - DATA (CF(I, 3),I= 1, 6) /9.000000000000000D+00 - $ ,3.000000000000000D+00,2.700000000000000D+01,9.000000000000000D - $ +00,9.000000000000000D+00,3.000000000000000D+00/ + DATA (CF(I),I= 12, 15) /27,18,18,6/ C 1 T(1,5) T(2,4) T(3,6) - DATA (CF(I, 4),I= 1, 6) /3.000000000000000D+00 - $ ,9.000000000000000D+00,9.000000000000000D+00,2.700000000000000D - $ +01,3.000000000000000D+00,9.000000000000000D+00/ + DATA (CF(I),I= 16, 18) /27,6,18/ C 1 T(1,5) T(2,6) T(3,4) - DATA (CF(I, 5),I= 1, 6) /3.000000000000000D+00 - $ ,9.000000000000000D+00,9.000000000000000D+00,3.000000000000000D - $ +00,2.700000000000000D+01,9.000000000000000D+00/ + DATA (CF(I),I= 19, 20) /27,18/ C 1 T(1,6) T(2,4) T(3,5) - DATA (CF(I, 6),I= 1, 6) /9.000000000000000D+00 - $ ,3.000000000000000D+00,3.000000000000000D+00,9.000000000000000D - $ +00,9.000000000000000D+00,2.700000000000000D+01/ + DATA (CF(I),I= 21, 21) /27/ C 1 T(1,6) T(2,5) T(3,4) C ---------- C BEGIN CODE @@ -553,10 +543,12 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) MATRIX1 = 0.D0 DO M = 1, NAMPSO + CF_INDEX = 0 DO I = 1, NCOLOR ZTEMP = (0.D0,0.D0) - DO J = 1, NCOLOR - ZTEMP = ZTEMP + CF(J,I)*JAMP(J,M) + DO J = I, NCOLOR + CF_INDEX = CF_INDEX + 1 + ZTEMP = ZTEMP + CF(CF_INDEX)*JAMP(J,M) ENDDO DO N = 1, NAMPSO @@ -565,6 +557,7 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) ENDDO ENDDO ENDDO + MATRIX1 = MATRIX1/DENOM IF(SDE_STRAT.EQ.1)THEN AMP2(1)=AMP2(1)+AMP(1)*DCONJG(AMP(1)) diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxcx_ttxuxcx/matrix11.png b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxcx_ttxuxcx/matrix11.png new file mode 100644 index 0000000000..983dbde504 Binary files /dev/null and b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxcx_ttxuxcx/matrix11.png differ diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxcx_ttxuxcx/matrix12.png b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxcx_ttxuxcx/matrix12.png new file mode 100644 index 0000000000..2830bc90dd Binary files /dev/null and b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxcx_ttxuxcx/matrix12.png differ diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxcx_ttxuxcx/processConfig.h b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxcx_ttxuxcx/processConfig.h new file mode 100644 index 0000000000..7adcbeb7fc --- /dev/null +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxcx_ttxuxcx/processConfig.h @@ -0,0 +1,16 @@ +// Copyright (C) 2025 CERN and UCLouvain. +// Licensed under the GNU Lesser General Public License (version 3 or later). +// Created by: S. Roiser (May 2025) for the MG5aMC CUDACPP plugin. +// Further modified by: ... for the MG5aMC CUDACPP plugin. + + +#ifndef MG5_CONFIG_SIGMA_SM_UXCX_TTXUXCX_H +#define MG5_CONFIG_SIGMA_SM_UXCX_TTXUXCX_H 1 + +namespace processConfig { + + constexpr int ndiagrams = 7; + +} + +#endif // MG5_CONFIG_SIGMA_SM_UXCX_TTXUXCX_H \ No newline at end of file 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 83faf9192b..6f9870f1ef 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 @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -25,6 +25,7 @@ #include "MemoryAccessMatrixElements.h" #include "MemoryAccessMomenta.h" #include "MemoryAccessWavefunctions.h" +#include "processConfig.h" #ifdef MGONGPU_SUPPORTS_MULTICHANNEL #include "MemoryAccessDenominators.h" @@ -99,6 +100,69 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { +#ifdef MGONGPU_SUPPORTS_MULTICHANNEL + __device__ INLINE unsigned int getChannelId( const unsigned int* allChannelIds +#ifndef MGONGPUCPP_GPUIMPL + , + const int ievt00, + bool sanityCheckMixedPrecision = true +#endif + ) + { + unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr +#ifdef MGONGPUCPP_GPUIMPL + using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page + if( allChannelIds != nullptr ) + { + const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) + const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) + // NB: channelIds_sv is a scalar in CUDA + channelId = channelIds_sv; + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + } +#else // Cuda or C++ + using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + if( allChannelIds != nullptr ) + { + // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) + const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 + uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) +#ifndef MGONGPU_CPPSIMD + // NB: channelIds_sv is a scalar in no-SIMD C++ + channelId = channelIds_sv; +#else + // NB: channelIds_sv is a vector in SIMD C++ + channelId = channelIds_sv[0]; // element[0] + for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] + { + assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId + } +#endif + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + if( sanityCheckMixedPrecision ) + { +#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT + // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) + const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 + uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + for( int i = 0; i < neppV; ++i ) + { + assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector + } +#endif + } + } +#endif // MGONGPUCPP_GPUIMPL + return channelId; + } +#endif // MGONGPU_SUPPORTS_MULTICHANNEL + constexpr int nw6 = CPPProcess::nw6; // dimensions of each wavefunction (HELAS KEK 91-11): e.g. 6 for e+ e- -> mu+ mu- (fermions and vectors) constexpr int npar = CPPProcess::npar; // #particles in total (external = initial + final): e.g. 4 for e+ e- -> mu+ mu- constexpr int ncomb = CPPProcess::ncomb; // #helicity combinations: e.g. 16 for e+ e- -> mu+ mu- (2**4 = fermion spin up/down ** npar) @@ -308,7 +372,7 @@ namespace mg5amcCpu COUPs[ndcoup + iicoup] = allCOUPs[ndcoup + iicoup]; // independent couplings, fixed for all events fptype* MEs = E_ACCESS::ieventAccessRecord( allMEs, ievt0 ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); #endif #endif @@ -318,7 +382,7 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Numerators and denominators for the current event (CUDA) or SIMD event page (C++) - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); #endif @@ -344,8 +408,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1 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] ); + if( channelId != 0 ) + { + numerators_sv[0] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] -= 1. / 12. * amp_sv[0]; jamp_sv[2] -= 1. / 12. * amp_sv[0]; @@ -360,8 +427,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 2 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] ); + if( channelId != 0 ) + { + numerators_sv[1] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 4. * amp_sv[0]; jamp_sv[1] -= 1. / 12. * amp_sv[0]; @@ -376,8 +446,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 3 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] ); + if( channelId != 0 ) + { + numerators_sv[2] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 4. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[4] -= 1. / 4. * cxtype( 0, 1 ) * amp_sv[0]; @@ -390,8 +463,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 4 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] ); + if( channelId != 0 ) + { + numerators_sv[3] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] -= 1. / 12. * amp_sv[0]; jamp_sv[3] += 1. / 36. * amp_sv[0]; @@ -406,8 +482,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 5 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] ); + if( channelId != 0 ) + { + numerators_sv[4] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 4. * amp_sv[0]; jamp_sv[2] -= 1. / 12. * amp_sv[0]; @@ -424,8 +503,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 6 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] ); + if( channelId != 0 ) + { + numerators_sv[5] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 12. * amp_sv[0]; jamp_sv[1] -= 1. / 4. * amp_sv[0]; @@ -440,8 +522,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 7 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] ); + if( channelId != 0 ) + { + numerators_sv[6] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 12. * amp_sv[0]; jamp_sv[2] -= 1. / 4. * amp_sv[0]; @@ -456,8 +541,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 8 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] ); + if( channelId != 0 ) + { + numerators_sv[7] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += 1. / 4. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[2] -= 1. / 4. * cxtype( 0, 1 ) * amp_sv[0]; @@ -470,8 +558,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 9 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] ); + if( channelId != 0 ) + { + numerators_sv[8] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 12. * amp_sv[0]; jamp_sv[1] -= 1. / 4. * amp_sv[0]; @@ -486,8 +577,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 10 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] ); + if( channelId != 0 ) + { + numerators_sv[9] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 12. * amp_sv[0]; jamp_sv[2] -= 1. / 4. * amp_sv[0]; @@ -502,8 +596,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 11 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] ); + if( channelId != 0 ) + { + numerators_sv[10] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] -= 1. / 4. * amp_sv[0]; jamp_sv[3] += 1. / 12. * amp_sv[0]; @@ -518,8 +615,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 12 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] ); + if( channelId != 0 ) + { + numerators_sv[11] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] -= 1. / 4. * amp_sv[0]; jamp_sv[3] += 1. / 12. * amp_sv[0]; @@ -534,8 +634,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 13 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] ); + if( channelId != 0 ) + { + numerators_sv[12] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 4. * amp_sv[0]; jamp_sv[1] -= 1. / 12. * amp_sv[0]; @@ -550,8 +653,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 14 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] ); + if( channelId != 0 ) + { + numerators_sv[13] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] -= 1. / 12. * amp_sv[0]; jamp_sv[3] += 1. / 36. * amp_sv[0]; @@ -798,7 +904,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- @@ -1170,9 +1278,6 @@ namespace mg5amcCpu #ifdef MGONGPUCPP_GPUIMPL // Remember: in CUDA this is a kernel for one event, in c++ this processes n events const int ievt = blockDim.x * blockIdx.x + threadIdx.x; // index of event (thread) in grid -#ifdef MGONGPU_SUPPORTS_MULTICHANNEL - using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events -#endif #else //assert( (size_t)(allmomenta) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] //assert( (size_t)(allMEs) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] @@ -1180,7 +1285,6 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL using NUM_ACCESS = HostAccessNumerators; // non-trivial access: buffer includes all events using DEN_ACCESS = HostAccessDenominators; // non-trivial access: buffer includes all events - using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events #endif #endif @@ -1205,11 +1309,12 @@ namespace mg5amcCpu fptype_sv& MEs_sv = E_ACCESS::kernelAccess( MEs ); MEs_sv = fptype_sv{ 0 }; #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - numerators_sv = fptype_sv{ 0 }; + for( int i = 0; i < processConfig::ndiagrams; ++i ) + numerators_sv[i] = fptype_sv{ 0 }; denominators_sv = fptype_sv{ 0 }; #endif } @@ -1222,17 +1327,7 @@ namespace mg5amcCpu // *** START OF PART 1a - CUDA (one event per GPU thread) *** #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) - const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) - // NB: channelIds_sv is a scalar in CUDA - channelId = channelIds_sv; - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) - } + unsigned int channelId = getChannelId( allChannelIds ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (for the single event processed in calculate_wavefunctions) @@ -1347,38 +1442,7 @@ namespace mg5amcCpu const int ievt00 = ipagV2 * neppV; // loop on one SIMD page (neppV events) at a time #endif #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) - const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 - uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) -#ifndef MGONGPU_CPPSIMD - // NB: channelIds_sv is a scalar in no-SIMD C++ - channelId = channelIds_sv; -#else - // NB: channelIds_sv is a vector in SIMD C++ - channelId = channelIds_sv[0]; // element[0] - for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] - { - assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId - } -#endif - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) -#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT - // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) - const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 - uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - for( int i = 0; i < neppV; ++i ) - { - assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector - } -#endif - } + unsigned int channelId = getChannelId( allChannelIds, ievt00 ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (jamp2[nParity][ncolor][neppV] for the SIMD vector - or the two SIMD vectors - of events processed in calculate_wavefunctions) @@ -1551,11 +1615,12 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( allChannelIds != nullptr ) // fix segfault #892 (not 'channelIds[0] != 0') { - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + const unsigned int channelId = getChannelId( allChannelIds, ievt0, false ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - MEs_sv *= numerators_sv / denominators_sv; + MEs_sv *= numerators_sv[channelId - 1] / denominators_sv; } #endif //for( int ieppV = 0; ieppV < neppV; ieppV++ ) diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxux_ttxuxux/CPPProcess.h b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxux_ttxuxux/CPPProcess.h index 0b67fca178..1413e54c6f 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxux_ttxuxux/CPPProcess.h +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxux_ttxuxux/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxux_ttxuxux/auto_dsig.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxux_ttxuxux/auto_dsig.f index f8d2319067..bf95a1a6e3 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxux_ttxuxux/auto_dsig.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxux_ttxuxux/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C 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 f9adb0c2a2..9b23b247d8 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 @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -140,7 +140,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDDO QSCALE=QSCALE/2D0 ELSE - QSCALE=DSQRT(Q2FACT(IB(1))) + QSCALE=DSQRT(Q2FACT(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) @@ -150,7 +150,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) IF (DSQRT(Q2FACT(IB(2))).NE.0D0) THEN - QSCALE=DSQRT(Q2FACT(IB(2))) + QSCALE=DSQRT(Q2FACT(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) @@ -237,7 +237,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -313,6 +313,10 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, INTEGER I_EE C +C STUFF FOR UPC +C + DOUBLE PRECISION PHOTONPDFSQUARE +C C EXTERNAL FUNCTIONS C LOGICAL PASSCUTS @@ -398,24 +402,24 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, IF (ABS(LPP(IB(1))).GE.1) THEN C LP=SIGN(1,LPP(IB(1))) CX1(IVEC)=PDG2PDF(LPP(IB(1)),-4, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) SX1(IVEC)=PDG2PDF(LPP(IB(1)),-3, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) UX1(IVEC)=PDG2PDF(LPP(IB(1)),-2, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) DX1(IVEC)=PDG2PDF(LPP(IB(1)),-1, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) CX2(IVEC)=PDG2PDF(LPP(IB(2)),-4, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) SX2(IVEC)=PDG2PDF(LPP(IB(2)),-3, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) UX2(IVEC)=PDG2PDF(LPP(IB(2)),-2, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) DX2(IVEC)=PDG2PDF(LPP(IB(2)),-1, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) ENDIF ENDDO ! IWARP LOOP ENDDO ! CURRWARP LOOP 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 35761964e7..3b286148c7 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 @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -358,7 +358,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -404,7 +404,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C INTEGER I,J,M,N COMPLEX*16 ZTEMP, TMP_JAMP(16) - REAL*8 CF(NCOLOR,NCOLOR) + INTEGER CF(NCOLOR*(NCOLOR+1)/2) + INTEGER DENOM, CF_INDEX COMPLEX*16 AMP(NGRAPHS), JAMP(NCOLOR,NAMPSO) COMPLEX*16 W(6,NWAVEFUNCS) C Needed for v4 models @@ -447,29 +448,18 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C C COLOR DATA C - DATA (CF(I, 1),I= 1, 6) /2.700000000000000D+01 - $ ,9.000000000000000D+00,9.000000000000000D+00,3.000000000000000D - $ +00,3.000000000000000D+00,9.000000000000000D+00/ + DATA DENOM/1/ + DATA (CF(I),I= 1, 6) /27,18,18,6,6,18/ C 1 T(1,4) T(2,5) T(3,6) - DATA (CF(I, 2),I= 1, 6) /9.000000000000000D+00 - $ ,2.700000000000000D+01,3.000000000000000D+00,9.000000000000000D - $ +00,9.000000000000000D+00,3.000000000000000D+00/ + DATA (CF(I),I= 7, 11) /27,6,18,18,6/ C 1 T(1,4) T(2,6) T(3,5) - DATA (CF(I, 3),I= 1, 6) /9.000000000000000D+00 - $ ,3.000000000000000D+00,2.700000000000000D+01,9.000000000000000D - $ +00,9.000000000000000D+00,3.000000000000000D+00/ + DATA (CF(I),I= 12, 15) /27,18,18,6/ C 1 T(1,5) T(2,4) T(3,6) - DATA (CF(I, 4),I= 1, 6) /3.000000000000000D+00 - $ ,9.000000000000000D+00,9.000000000000000D+00,2.700000000000000D - $ +01,3.000000000000000D+00,9.000000000000000D+00/ + DATA (CF(I),I= 16, 18) /27,6,18/ C 1 T(1,5) T(2,6) T(3,4) - DATA (CF(I, 5),I= 1, 6) /3.000000000000000D+00 - $ ,9.000000000000000D+00,9.000000000000000D+00,3.000000000000000D - $ +00,2.700000000000000D+01,9.000000000000000D+00/ + DATA (CF(I),I= 19, 20) /27,18/ C 1 T(1,6) T(2,4) T(3,5) - DATA (CF(I, 6),I= 1, 6) /9.000000000000000D+00 - $ ,3.000000000000000D+00,3.000000000000000D+00,9.000000000000000D - $ +00,9.000000000000000D+00,2.700000000000000D+01/ + DATA (CF(I),I= 21, 21) /27/ C 1 T(1,6) T(2,5) T(3,4) C ---------- C BEGIN CODE @@ -585,10 +575,12 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) MATRIX1 = 0.D0 DO M = 1, NAMPSO + CF_INDEX = 0 DO I = 1, NCOLOR ZTEMP = (0.D0,0.D0) - DO J = 1, NCOLOR - ZTEMP = ZTEMP + CF(J,I)*JAMP(J,M) + DO J = I, NCOLOR + CF_INDEX = CF_INDEX + 1 + ZTEMP = ZTEMP + CF(CF_INDEX)*JAMP(J,M) ENDDO DO N = 1, NAMPSO @@ -597,6 +589,7 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) ENDDO ENDDO ENDDO + MATRIX1 = MATRIX1/DENOM IF(SDE_STRAT.EQ.1)THEN AMP2(1)=AMP2(1)+AMP(1)*DCONJG(AMP(1)) diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxux_ttxuxux/matrix11.png b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxux_ttxuxux/matrix11.png new file mode 100644 index 0000000000..6b16e3b82c Binary files /dev/null and b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxux_ttxuxux/matrix11.png differ diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxux_ttxuxux/matrix12.png b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxux_ttxuxux/matrix12.png new file mode 100644 index 0000000000..9a97e91cb0 Binary files /dev/null and b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxux_ttxuxux/matrix12.png differ diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxux_ttxuxux/processConfig.h b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxux_ttxuxux/processConfig.h new file mode 100644 index 0000000000..368fc584e6 --- /dev/null +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxux_ttxuxux/processConfig.h @@ -0,0 +1,16 @@ +// Copyright (C) 2025 CERN and UCLouvain. +// Licensed under the GNU Lesser General Public License (version 3 or later). +// Created by: S. Roiser (May 2025) for the MG5aMC CUDACPP plugin. +// Further modified by: ... for the MG5aMC CUDACPP plugin. + + +#ifndef MG5_CONFIG_SIGMA_SM_UXUX_TTXUXUX_H +#define MG5_CONFIG_SIGMA_SM_UXUX_TTXUXUX_H 1 + +namespace processConfig { + + constexpr int ndiagrams = 14; + +} + +#endif // MG5_CONFIG_SIGMA_SM_UXUX_TTXUXUX_H \ No newline at end of file diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/cuts.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/cuts.f index 7898714201..bd50ab1357 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/cuts.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/cuts.f @@ -307,12 +307,18 @@ LOGICAL FUNCTION PASSCUTS(P, VECSIZE_USED) c c Limit S_hat c - if (dsqrt_shat.ne.0d0)then - if (nincoming.eq.2.and.sumdot(p(0,1),p(0,2),1d0) .lt. dsqrt_shat**2) then - passcuts=.false. - return - endif - endif + if(nincoming.eq.2) then + if (dsqrt_shat.ne.0d0.or.dsqrt_shatmax.ne.-1d0)then + xvar = sumdot(p(0,1),p(0,2),1d0) + if (xvar .lt. dsqrt_shat**2)then + passcuts=.false. + return + else if (dsqrt_shatmax.ne.-1d0 .and. xvar .gt. dsqrt_shatmax**2)then + passcuts = .false. + return + endif + endif + endif C $B$ DESACTIVATE_CUT $E$ !This is a tag for MadWeight if(debug) write (*,*) '=============================' diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/genps.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/genps.f index 1c32e93f5d..8503bdbec8 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/genps.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/genps.f @@ -1373,6 +1373,10 @@ subroutine gen_s(x,smin,smax,spole,swidth,s,jac,pass) double precision smin,smax,spole,swidth,s,jac double precision x logical pass + include 'maxparticles.inc' + include '../../Source/vector.inc' + include 'run.inc' + include 'cuts.inc' c c Local c @@ -1384,6 +1388,10 @@ subroutine gen_s(x,smin,smax,spole,swidth,s,jac,pass) c----- c Begin Code c----- + if (dsqrt_shatmax.ne.-1d0)then + smax = min(smax, dsqrt_shatmax**2) + endif + pass=.true. if (jac .eq. 0 .and. .not. warned0) then print*,'Input jacobian 0 in genps' @@ -1628,7 +1636,10 @@ SUBROUTINE GENCMS(S,X1,X2,X,SMIN,SJACOBI) DOUBLE PRECISION ETA,ETAMIN,ETAMAX logical warned data warned/.false./ - + include 'maxparticles.inc' + include '../../Source/vector.inc' + include 'run.inc' + include 'cuts.inc' C------------ C BEGIN CODE C------------ @@ -1645,7 +1656,11 @@ SUBROUTINE GENCMS(S,X1,X2,X,SMIN,SJACOBI) C IF THERE IS NO S CHANNEL POLE USE BELOW: TAUMIN = 0d0 !SMIN/S !keep scale fix - TAUMAX = 1D0 + if (dsqrt_shatmax.ne.-1d0)then + TAUMAX=dsqrt_shatmax**2/S + else + TAUMAX = 1D0 + endif TAU = (TAUMAX-TAUMIN)*X(1)+TAUMIN SJACOBI= sjacobi*(TAUMAX-TAUMIN) @@ -1915,7 +1930,7 @@ double precision function get_channel_cut(p, config) if(sde_strat.eq.2)then t = dot(ptemp(0,-i), ptemp(0,-i)) Mass = prmass(-i, config) - get_channel_cut = get_channel_cut / ((t-Mass)*(t+Mass)+stot*1d-10)**2 + get_channel_cut = get_channel_cut / (t-Mass**2+stot*1d-10)**2 endif c write(*,*) i, "t, Mass, fact", t, Mass, ((t-Mass)*(t+Mass))**2,get_channel_cut t = t/stot @@ -1930,9 +1945,9 @@ double precision function get_channel_cut(p, config) t = dot(ptemp(0,-i), ptemp(0,-i)) Mass = prmass(-i, config) Width = prwidth(-i, config) - tmp = (t-Mass)*(t+Mass) + tmp = (t-Mass**2) tmp2 = Mass*Width - get_channel_cut = get_channel_cut* (tmp**2 - tmp2**2)/(tmp**2 + tmp2**2)**2 + get_channel_cut = get_channel_cut/(tmp**2 + tmp2**2) endif c write(*,*) i, "s, Mass, Width, fact", t, Mass, Width, (((t-Mass)*(t+Mass) )**2 + Width**2*Mass**2), get_channel_cut endif diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/myamp.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/myamp.f index 9e5f8d44dd..5360566ef4 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/myamp.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/myamp.f @@ -231,6 +231,7 @@ subroutine set_peaks double precision x1,x2,xk(nexternal) double precision dr,mtot,etot,xqfact double precision spmass + double precision stot ! technically the min with dsqrt_shatmax**2 with the physical one integer i, iconfig, l1, l2, j, nt, nbw, iproc, k integer iden_part(-nexternal+1:nexternal) @@ -285,8 +286,8 @@ subroutine set_peaks integer lbw(0:nexternal) !Use of B.W. common /to_BW/ lbw - double precision stot,m1,m2 - common/to_stot/stot,m1,m2 + double precision real_stot,m1,m2 + common/to_stot/real_stot,m1,m2 include 'coupl.inc' ! needs VECSIZE_MEMMAX (defined in vector.inc) include 'cuts.inc' @@ -309,6 +310,12 @@ subroutine set_peaks c----- c Begin Code c----- + if (dsqrt_shatmax.ne.-1)then + stot = min(real_stot, dsqrt_shatmax**2) + else + stot = real_stot + endif + iconfig = this_config c needs to be initialise to avoid segfault do i = -nexternal,-1 diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/Gridpack/gridrun b/epochX/cudacpp/pp_tt012j.mad/bin/internal/Gridpack/gridrun index 8c8f7d3940..01d4ab53f5 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/Gridpack/gridrun +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/Gridpack/gridrun @@ -91,7 +91,7 @@ import internal.madevent_interface as cmd_interface try: - cmd_line = cmd_interface.GridPackCmd(me_dir=root_path, nb_event=args[0], seed=args[1], gran=args[2]) + cmd_line = cmd_interface.GridPackCmd(me_dir=root_path, nb_event=args[0], seed=args[1], gran=args[2], nprocs=args[3], maxevts=args[4]) except KeyboardInterrupt: print('Quit on KeyboardInterrupt') diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/Gridpack/run.sh b/epochX/cudacpp/pp_tt012j.mad/bin/internal/Gridpack/run.sh index 20adf572c2..2d149f96be 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/Gridpack/run.sh +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/Gridpack/run.sh @@ -14,6 +14,18 @@ # USAGE : run [num_events] [iseed] ## ############################################################################# +function usage() { + local retcode="${1:-1}" # default return code is 1 + echo "Usage:" + echo " run.sh [options] [num events] [seed]" + echo " run.sh [options] [num events] [seed] [granularity]" + echo "Options:" + echo " -h, --help print this message and exit" + echo " -p, --parallel [num procs] number of processes to run in parallel" + echo " -m, --maxevts [num events] maximum number of unweighted events per job" + exit $retcode +} + if [[ -d ./madevent ]]; then DIR='./madevent' else @@ -32,23 +44,46 @@ export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${PWD}/madevent/lib:${PWD}/HELAS/lib # For Mac OS X export DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:${PWD}/madevent/lib:${PWD}/HELAS/lib +pos_args=() +nprocs=1 +maxevts=2500 -if [[ ($1 != "") && ("$2" != "") && ("$3" == "") ]]; then - num_events=$1 - seed=$2 - gran=1 -elif [[ ($1 != "") && ("$2" != "") && ("$3" != "") ]]; then - num_events=$1 - seed=$2 - gran=$3 -else - echo "Warning: input is not correct. script requires two arguments: NB_EVENT SEED" -fi +while [[ $# -gt 0 ]]; do + case $1 in + -h|--help) + usage 0 ;; + -p|--parallel) + nprocs="$2" && shift && shift ;; + -m|--maxevts) + maxevts="$2" && shift && shift ;; + -*) + echo "Error: Unknown option $1" && usage ;; + *) + pos_args+=("$1") && shift ;; + esac +done + +case `echo "${pos_args[@]}" | wc -w | tr -d " "` in + "2") + num_events=${pos_args[0]} + seed=${pos_args[1]} + gran=1 + ;; + "3") + num_events=${pos_args[0]} + seed=${pos_args[1]} + gran=${pos_args[2]} + ;; + *) + echo "Error: number of arguments is not correct" + usage + ;; +esac -echo "Now generating $num_events events with random seed $seed and granularity $gran" +echo "Now generating $num_events events with random seed $seed and granularity $gran using $nprocs processes" ############ RUN THE PYTHON CODE ##################### -${DIR}/bin/gridrun $num_events $seed $gran +${DIR}/bin/gridrun $num_events $seed $gran $nprocs $maxevts ######################################################## ########### POSTPROCESSING ##################### diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/banner.py b/epochX/cudacpp/pp_tt012j.mad/bin/internal/banner.py index 42d82818d0..022861fc31 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/banner.py +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/banner.py @@ -353,7 +353,7 @@ def modify_init_cross(self, cross, allow_zero=False): assert "init" in self cross = dict(cross) - for key in cross.keys(): + for key in list(cross.keys()): if isinstance(key, str) and key.isdigit() and int(key) not in cross: cross[int(key)] = cross[key] @@ -3318,7 +3318,6 @@ def retro_compatible_custom_fct(lines, mode=None): for i,line in enumerate(lines[:]): if search and re.search(include_pat, line): name = re.findall(include_pat, line)[0] - misc.sprint('DETECTED INCLUDE', name) if 'vector.inc' in name: search = False if 'run.inc' in name: @@ -3326,7 +3325,6 @@ def retro_compatible_custom_fct(lines, mode=None): search = False sol.append(line) if re.search(function_pat, line): - misc.sprint("DETECTED FCT") search = True return sol @@ -4201,6 +4199,7 @@ def default_setup(self): self.add_param("bwcutoff", 15.0) self.add_param("cut_decays", False, cut='d') self.add_param('dsqrt_shat',0., cut=True) + self.add_param('dsqrt_shatmax', -1, cut=True) self.add_param("nhel", 0, include=False) self.add_param("limhel", 1e-8, hidden=True, comment="threshold to determine if an helicity contributes when not MC over helicity.") #pt cut @@ -5577,6 +5576,9 @@ def default_setup(self): #technical self.add_param('folding', [1,1,1], include=False) + + #bias + self.add_param('flavour_bias',[5,1], hidden=True, comment="Example: '5,100' means that the probability to generate an event with a bottom (or anti-bottom) quark is increased by a factor 100, but the weight of those events is reduced by a factor 100. Requires that the 'event_norm' is set to 'bias'.") #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]") @@ -5790,6 +5792,17 @@ def check_validity(self): if self['mcatnlo_delta'] and not self['parton_shower'].lower() == 'pythia8': raise InvalidRunCard("MC@NLO-DELTA only possible with matching to Pythia8") + # check that the flavour_bias is consistent + if len(self['flavour_bias']) != 2: + raise InvalidRunCard("'flavour_bias' should contain exactly two numbers: the abs(PDG) of the flavour to enhance, and the enhancement multiplication factor.") + for i in self['flavour_bias']: + if i < 0: + raise InvalidRunCard("flavour and multiplication factor should be positive in the flavour_bias parameter") + if self['flavour_bias'][1] != 1 and self['event_norm'] != 'bias': + logger.warning('Non-trivial flavour enhancement factor: setting event normalisation to "bias"') + self['event_norm']='bias' + + # check that ebeam is bigger than the proton mass. for i in [1,2]: # do not for proton mass if not proton PDF (or when scan initialization) 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 bc785b5de6..a34705f6bc 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 @@ -1092,11 +1092,11 @@ def write_summary(self, path, order=None, lastline=False, nbcol=20): to_print = self.cross[-1:] for info in to_print: name = info['run_name'] - bench = info['bench'] + bench = [float(x) for x in info['bench']] data = [] for k in keys: if k in info: - data.append(info[k]) + data.append(float(info[k])) else: data.append(0.) ff.write(formatting % tuple([name] + bench + data)) 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 9ff7390cf5..541cd6294b 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 @@ -750,8 +750,8 @@ def __init__(self, me_dir, options, *args, **opts): else: self.ninitial = self.proc_characteristics['ninitial'] - def make_make_all_html_results(self, folder_names = [], jobs=[]): - return sum_html.make_all_html_results(self, folder_names, jobs) + def make_make_all_html_results(self, folder_names = [], jobs=[], get_attr=None): + return sum_html.make_all_html_results(self, folder_names, jobs, get_attr) def write_RunWeb(self, me_dir): @@ -3831,7 +3831,7 @@ def store_scan_result(self): """return the information that need to be kept for the scan summary. Auto-width are automatically added.""" - return {'cross': self.results.current['cross']} + return {'cross': self.results.current['cross'], 'error': self.results.current['error']} def add_error_log_in_html(self, errortype=None): @@ -5135,10 +5135,10 @@ def init_run(self, cards): self.special_shortcut.update( {'ebeam':([float],['run_card ebeam1 %(0)s', 'run_card ebeam2 %(0)s']), 'lpp': ([int],['run_card lpp1 %(0)s', 'run_card lpp2 %(0)s' ]), - 'lhc': ([int],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), + 'lhc': ([float],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), 'lep': ([int],['run_card lpp1 0', 'run_card lpp2 0', 'run_card ebeam1 %(0)s/2', 'run_card ebeam2 %(0)s/2']), 'ilc': ([int],['run_card lpp1 0', 'run_card lpp2 0', 'run_card ebeam1 %(0)s/2', 'run_card ebeam2 %(0)s/2']), - 'lcc': ([int],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), + 'lcc': ([float],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), 'fixed_scale': ([float],['run_card fixed_fac_scale T', 'run_card fixed_ren_scale T', 'run_card scale %(0)s', 'run_card dsqrt_q2fact1 %(0)s' ,'run_card dsqrt_q2fact2 %(0)s']), 'no_parton_cut':([],['run_card nocut T']), 'cm_velocity':([float], [lambda self :self.set_CM_velocity]), @@ -6740,7 +6740,15 @@ def postcmd(self, stop, line): return ending_question - + def help_update(self): + logger.info(""" syntax: update dependent: Change the mass/width of particles which are not free parameter for the model. + update missing: add to the current param_card missing blocks/parameters. + update to_slha1: pass SLHA2 card to SLHA1 convention. (beta) + update to_slha2: pass SLHA1 card to SLHA2 convention. (beta) + update to_full [run_card] + update XXX [where XXX correspond to a hidden block of the run_card]: + supported block are %s + """, ', '.join(self.update_block)) def do_update(self, line, timer=0): @@ -6756,6 +6764,8 @@ def do_update(self, line, timer=0): logger.warning('miss an argument (dependent or missing). Please retry') return + args[0] = args[0].lower() + if args[0] == 'dependent': if not self.mother_interface: logger.warning('Failed to update dependent parameter. This might create trouble for external program (like MadSpin/shower/...)') @@ -6805,10 +6815,11 @@ def do_update(self, line, timer=0): self.modified_card.add('run') # delay writting of the run_card logger.info('add optional block %s to the run_card', args[0]) else: - self.help_update() + self.do_help('update') logger.warning('unvalid options for update command. Please retry') + def update_to_full(self, line): """ trigger via update to_full LINE""" 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 789976beee..c321fd88e5 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/extended_cmd.py +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/extended_cmd.py @@ -1317,6 +1317,8 @@ def nice_error_handling(self, error, line): debug_file = open(self.debug_output, 'a') traceback.print_exc(file=debug_file) + if __debug__: + traceback.print_exc() if hasattr(error, 'filename'): debug_file.write("Related File: %s\n" % error.filename) # Create a nice error output @@ -1928,7 +1930,8 @@ def do_display(self, line, output=sys.stdout): for i, name in enumerate(split): try: __import__('.'.join(split[:i+1])) - exec('%s=sys.modules[\'%s\']' % (split[i], '.'.join(split[:i+1]))) + tmp = {} + exec('%s=sys.modules[\'%s\']' % (split[i], '.'.join(split[:i+1])), globals(),tmp) except ImportError: try: var = eval(args[1]) @@ -1939,7 +1942,7 @@ def do_display(self, line, output=sys.stdout): outstr += 'EXTERNAL:\n' outstr += misc.nice_representation(var, nb_space=4) else: - var = eval(args[1]) + var = eval(args[1], globals(), tmp) outstr += 'EXTERNAL:\n' outstr += misc.nice_representation(var, nb_space=4) diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/file_writers.py b/epochX/cudacpp/pp_tt012j.mad/bin/internal/file_writers.py index 526756129f..74ba0d195c 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/file_writers.py +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/file_writers.py @@ -140,10 +140,6 @@ def preprocess_template(self, input_lines, context={}): else: raise self.FileWriterError("%s not string" % repr(input_lines)) - # Setup the contextual environment - for contextual_variable, value in context.items(): - exec('%s=%s'%(str(contextual_variable),repr(value))) - res = [] # The variable below tracks the conditional statements structure if_stack = [] @@ -166,7 +162,7 @@ def preprocess_template(self, input_lines, context={}): # Treat an if statement elif preproc_command.group('command')=='if': try: - if_stack.append(eval(preproc_command.group('body'))==True) + if_stack.append(eval(preproc_command.group('body'), globals(), context)==True) except Exception as e: raise self.FilePreProcessingError('Could not evaluate'+\ "python expression '%s' given the context %s provided."%\ diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/files.py b/epochX/cudacpp/pp_tt012j.mad/bin/internal/files.py index 551b71ddb6..3061b007e7 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/files.py +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/files.py @@ -147,9 +147,14 @@ def cp(path1, path2, log=True, error=False): path2 = format_path(path2) try: shutil.copy(path1, path2) + except shutil.Error as why: + logger.debug('no cp since identical: %s', why) + return except IOError as why: import madgraph.various.misc as misc try: + if 'same file' in str(why): + return if os.path.exists(path2): path2 = os.path.join(path2, os.path.split(path1)[1]) misc.copytree(path1, path2) @@ -157,12 +162,10 @@ def cp(path1, path2, log=True, error=False): if error: raise if log: - logger.warning(why) + logger.warning("fail to cp", path1, path2, why) else: - misc.sprint("fail to cp", why) - except shutil.Error: - # idetical file - pass + misc.sprint("fail to cp",path1,path2, why) + def rm(path, log=True): """removes path, that can be a single element or a list""" diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/gen_cardhtml-pl b/epochX/cudacpp/pp_tt012j.mad/bin/internal/gen_cardhtml-pl index 1810c6c082..6e0e06533d 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/gen_cardhtml-pl +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/gen_cardhtml-pl @@ -137,7 +137,7 @@ until($listpos>$#incard){ print PAGE " Model: $model \n"; print PAGE " \n \n
\n"; print PAGE " \n"; - print PAGE "\"\" \n"; + print PAGE "\"\" \n"; print PAGE "
\n"; print PAGE " \n \n \n"; print PAGE " \n"; diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/gen_crossxhtml.py b/epochX/cudacpp/pp_tt012j.mad/bin/internal/gen_crossxhtml.py index 681bf9d09b..3114a4350c 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/gen_crossxhtml.py +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/gen_crossxhtml.py @@ -133,7 +133,7 @@ class AllResults(dict): web = False - _run_entries = ['cross', 'error','nb_event_pythia','run_mode','run_statistics', + _run_entries = ['cross', 'error','axsec','nb_event_pythia','run_mode','run_statistics', 'nb_event','cross_pythia','error_pythia', 'nb_event_pythia8','cross_pythia8','error_pythia8', 'shower_dir'] diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/gen_jpeg-pl b/epochX/cudacpp/pp_tt012j.mad/bin/internal/gen_jpeg-pl index 87d03da394..31b7e9fe55 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/gen_jpeg-pl +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/gen_jpeg-pl @@ -1,16 +1,16 @@ #!/usr/bin/perl -w #--------------------------------------------------------------------- -# Run GS to create jpeg files defined as $gs +# Run GS to create PNG files defined as $gs #--------------------------------------------------------------------- -system("/bin/bash -c \"rm -f matrix*.jpg\" "); +system("/bin/bash -c \"rm -f matrix*.png\" "); $imatrix = ""; if (! -e "matrix.ps") {$imatrix = 1;} -$max_jpg = 2; -if ($imatrix eq "") {$max_jpg = 5;} -# add 1 to max_jpg, to get max_jpg pages -$max_jpg += 1; +$max_png = 2; +if ($imatrix eq "") {$max_png = 5;} +# add 1 to max_png, to get max_png pages +$max_png += 1; open(PAGE,"> diagrams.html") || die "Error creating diagrams.html"; print PAGE "\ \n"; print PAGE "\ \n"; @@ -21,22 +21,22 @@ while ( -e "matrix$imatrix.ps"){ open(IN, "< matrix$imatrix.ps") || die "No file matrix$imatrix.ps"; open(OUT, "> matrix-1.ps") || die "Could not open file matrix-1.ps"; while () { - if ($_ =~ m/^%%Page: $max_jpg $max_jpg/) {last;} + if ($_ =~ m/^%%Page: $max_png $max_png/) {last;} else {print OUT $_, "\n";} } close(OUT); close(IN); - system "/bin/bash -c \"nice gs \-sDEVICE\=jpeg \-sOutputFile\=matrix$imatrix\%00d.jpg \-q \-dNOPAUSE \-dBATCH matrix-1.ps > /dev/null\""; + system "/bin/bash -c \"nice gs \-sDEVICE\=pngmono \-r150 \-sOutputFile\=matrix$imatrix\%00d.png \-q \-dNOPAUSE \-dBATCH matrix-1.ps > /dev/null\""; system "rm -f matrix-1.ps"; -# Determine how many jpg files we have +# Determine how many png files we have $pages=1; - while(-e "matrix$imatrix$pages.jpg"){ + while(-e "matrix$imatrix$pages.png"){ $pages++; }#end of while #reduce it by one - if ($pages > $max_jpg){ + if ($pages > $max_png){ $pages -= 1; } # Find name of process @@ -45,24 +45,24 @@ while ( -e "matrix$imatrix.ps"){ if ($proc =~ /Process: (.+?)(\s\w+=\d+)*$/) { $proc = $1; } print PAGE "

To save bandwidth not all diagrams were converted to jpeg."; + if (-e "matrix$imatrix$max_png.png" ) { + print PAGE "

To save bandwidth not all diagrams were converted to PNG."; print PAGE "

To view all diagrams click on "; print PAGE "\ postscript. \<\/A\> \ \n"; # # Delete files which aren't included in diagrams.html # - system ("/bin/bash -c \"rm -f matrix$max_jpg.jpg\" "); + system ("/bin/bash -c \"rm -f matrix$max_png.png\" "); } # -# Now create jpeg file for card +# Now create PNG file for card # - if (! -e "../../HTML/card.jpg") { + if (! -e "../../HTML/card.png") { system ("/bin/bash -c \"head -352 matrix$imatrix.ps >& junk.ps\" "); open(JUNK,">> junk.ps") || die "Error opening junk.ps"; @@ -72,7 +72,7 @@ while ( -e "matrix$imatrix.ps"){ system ("/bin/bash -c \"cat matrix$imatrix.ps | sed 1,352d >> junk.ps\" "); - system "/bin/bash -c \"nice gs \-sDEVICE\=jpeg \-sOutputFile\=card.jpg \-q \-dNOPAUSE \-dBATCH \-g180x150 ./junk.ps; rm -f junk.ps; cp -p card.jpg ../../HTML/card.jpg > /dev/null\" "; + system "/bin/bash -c \"nice gs \-sDEVICE\=pngmono \-sOutputFile\=card.png \-q \-dNOPAUSE \-dBATCH \-g180x150 ./junk.ps; rm -f junk.ps; cp -p card.png ../../HTML/card.png > /dev/null\" "; } if ($imatrix eq "") {$imatrix = 0;} $imatrix = $imatrix + 1; @@ -82,3 +82,4 @@ print PAGE "\n"; print PAGE "\<\/BODY\> \n"; print PAGE "\<\/HTML\> \n"; close(PAGE); + 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 415ecc9de0..d5d7fc8faf 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/gen_ximprove.py +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/gen_ximprove.py @@ -30,6 +30,7 @@ import stat import sys import six +import time from six.moves import range from six.moves import zip @@ -304,6 +305,7 @@ def get_helicity(self, to_submit=True, clean=True): logger.debug('(%s) nb_hel: %s zero amp: %s bad_amps_hel: %s/%s', split_file[-1], len(good_hels),len(bad_amps),len(bad_amps_perhel), len(good_hels)*nb_amp ) if len(good_hels) == 1: files.cp(matrix_file, matrix_file.replace('orig','optim')) + files.cp(matrix_file.replace('.f','.o'), matrix_file.replace('orig','optim').replace('.f','.o')) continue # avoid optimization if onlye one helicity gauge = self.cmd.proc_characteristics['gauge'] @@ -1059,6 +1061,7 @@ def __init__(self, cmd, opt=None): # parameter for the gridpack run self.nreq = 2000 self.iseed = 4321 + self.maxevts = 2500 # placeholder for information self.results = 0 #updated in launch/update_html @@ -1200,6 +1203,10 @@ def reset_multijob(self): def write_multijob(self, Channel, nb_split): """ """ if nb_split <=1: + try: + os.remove(pjoin(self.me_dir, 'SubProcesses', Channel.get('name'), 'multijob.dat')) + except OSError: + pass return f = open(pjoin(self.me_dir, 'SubProcesses', Channel.get('name'), 'multijob.dat'), 'w') f.write('%i\n' % nb_split) @@ -1828,17 +1835,17 @@ class gen_ximprove_gridpack(gen_ximprove_v4): 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 gen_events_security = 1.00 - def __new__(cls, *args, **opts): + def __new__(cls, cmd, opts): cls.force_class = 'gridpack' - return super(gen_ximprove_gridpack, cls).__new__(cls, *args, **opts) + return super(gen_ximprove_gridpack, cls).__new__(cls, cmd, opts) - def __init__(self, *args, **opts): + def __init__(self, cmd, opts): self.ngran = -1 + self.nprocs = 1 self.gscalefact = {} self.readonly = False if 'ngran' in opts: @@ -1846,9 +1853,18 @@ def __init__(self, *args, **opts): # del opts['ngran'] if 'readonly' in opts: self.readonly = opts['readonly'] - super(gen_ximprove_gridpack,self).__init__(*args, **opts) + if 'nprocs' in opts: + self.nprocs = int(opts['nprocs']) + if 'maxevts' in opts and self.nprocs > 1: + self.max_request_event = int(opts['maxevts']) + super(gen_ximprove_gridpack,self).__init__(cmd, opts) if self.ngran == -1: self.ngran = 1 + + if self.nprocs > 1: + self.combining_job = 0 + else: + self.combining_job = sys.maxsize def find_job_for_event(self): """return the list of channel that need to be improved""" @@ -1876,8 +1892,8 @@ def find_job_for_event(self): continue # no event to generate events self.gscalefact[tag] = max(1, 1/(goal_lum * C.get('axsec')/ self.ngran)) #need to generate events - logger.debug('request events for ', C.get('name'), 'cross=', - C.get('axsec'), 'needed events = ', goal_lum * C.get('axsec')) + logger.debug('request events for %s cross=%d needed events = %d', + C.get('name'), C.get('axsec'), goal_lum * C.get('axsec')) to_refine.append(C) logger.info('need to improve %s channels' % len(to_refine)) @@ -1897,8 +1913,13 @@ def get_job_for_event(self): 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 - + nb_split = int(max(1,((needed_event-1)// self.max_request_event) +1)) + if not self.split_channels: + nb_split = 1 + if nb_split > self.max_splitting: + 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')) @@ -1908,13 +1929,16 @@ def get_job_for_event(self): nevents = self.max_event_in_iter if nevents < self.min_event_in_iter: + nb_split = int(nb_split * nevents / self.min_event_in_iter) + 1 # sr dangerous? nevents = self.min_event_in_iter # # 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) - + # write the multi-job information + self.write_multijob(C, nb_split) + #create the info dict assume no splitting for the default info = {'name': self.cmd.results.current['run_name'], 'script_name': 'unknown', @@ -1925,7 +1949,7 @@ def get_job_for_event(self): 'nevents': nevents, #int(nevents*self.gen_events_security)+1, 'maxiter': self.max_iter, 'miniter': self.min_iter, - 'precision': -1*int(needed_event)/C.get('axsec'), + 'precision': -goal_lum/nb_split, # -1*int(needed_event)/C.get('axsec'), 'requested_event': needed_event, 'nhel': self.run_card['nhel'], 'channel': C.name.replace('G',''), @@ -1938,27 +1962,59 @@ def get_job_for_event(self): basedir = pjoin(os.path.dirname(__file__), '..','..','SubProcesses', info['P_dir'], info['directory']) info['base_directory'] = basedir - jobs.append(info) - + if nb_split == 1: + jobs.append(info) + else: + for i in range(nb_split): + new_info = dict(info) + new_info['offset'] = i+1 + new_info['directory'] += self.alphabet[i % 26] + str((i+1)//26) + new_info['base_directory'] = info['directory'] + jobs.append(new_info) write_dir = '.' if self.readonly else None self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), jobs, write_dir) + if self.nprocs > 1: + nprocs_cluster = cluster.MultiCore(nb_core=self.nprocs) + gridpack_start = time.time() + def gridpack_wait_monitoring(Idle, Running, Done): + if Idle+Running+Done == 0: + return + logger.info("Gridpack event generation: %s Idle, %s Running, %s Done [%s]" + % (Idle, Running, Done, misc.format_time(time.time()-gridpack_start))) + done = [] for j in jobs: - if j['P_dir'] in done: - continue - done.append(j['P_dir']) + if self.nprocs == 1: + if j['P_dir'] in done: + continue + done.append(j['P_dir']) + # Give a little status. Sometimes these jobs run very long, and having hours without any + # console output can be a bit frightening and make users think we are looping. + if len(done)%5==0: + logger.info(f"Working on job {len(done)} of {len(jobs)}") + # set the working directory path. pwd = pjoin(os.getcwd(),j['P_dir']) if self.readonly else pjoin(self.me_dir, 'SubProcesses', j['P_dir']) - exe = pjoin(pwd, 'ajob1') + exe = pjoin(pwd, j['script_name']) st = os.stat(exe) os.chmod(exe, st.st_mode | stat.S_IEXEC) # run the code\ - cluster.onecore.launch_and_wait(exe, cwd=pwd, packet_member=j['packet']) + if self.nprocs == 1: + cluster.onecore.launch_and_wait(exe, cwd=pwd, packet_member=j['packet']) + else: + nprocs_cluster.cluster_submit(exe, cwd=pwd, packet_member=j['packet']) write_dir = '.' if self.readonly else pjoin(self.me_dir, 'SubProcesses') + if self.nprocs > 1: + nprocs_cluster.wait(self.me_dir, gridpack_wait_monitoring) + + if self.readonly: + combine_runs.CombineRuns(write_dir) + else: + combine_runs.CombineRuns(self.me_dir) self.check_events(goal_lum, to_refine, jobs, write_dir) def check_events(self, goal_lum, to_refine, jobs, Sdir): diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/hel_recycle.py b/epochX/cudacpp/pp_tt012j.mad/bin/internal/hel_recycle.py index 1471de4bcb..978ba6575e 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/hel_recycle.py +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/hel_recycle.py @@ -550,7 +550,7 @@ def get_jamp_lines(self, line): def get_amp2_lines(self, line): if line.startswith(' DO I = 1, NCOLOR'): self.in_amp2 = False - elif not line.isspace(): + elif not line.isspace() and 'DENOM' not in line: self.template_dict['amp2_lines'] += f'{line[0:6]} {self.add_indices(line[6:])}' def prepare_bools(self): diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/histograms.py b/epochX/cudacpp/pp_tt012j.mad/bin/internal/histograms.py index 51ae2914fc..d68c560806 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/histograms.py +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/histograms.py @@ -1149,11 +1149,8 @@ def parse_one_histo_from_stream(self, stream, all_weight_header, boundaries = [0.0,0.0] for j, weight in \ enumerate(HwU.histo_bin_weight_re.finditer(line_bin)): - if (j == len(weight_header)): - continue - if j == len(all_weight_header): - raise HwU.ParseError("There is more bin weights"+\ - " specified than expected (%i)"%len(weight_header)) + #if (j == len(weight_header)): + # continue if selected_central_weight == all_weight_header[j]: bin_weights['central'] = float(weight.group('weight')) if all_weight_header[j] == 'boundary_xmin': @@ -2480,14 +2477,14 @@ def get_main_central_plot_lines(HwU_name, block_position, color_index, # return [template_no_stat%rep_dic]+\ # ([template%rep_dic] if show_mc_uncertainties else []) - # The use of sqrt(-1) is just a trick to prevent the line to display + # The use of 1/0 is just a trick to prevent the line to display res = [] - rep_dic['data'] = '($3 < 0 ? sqrt(-1) : $3)' + rep_dic['data'] = '($3 < 0 ? 1/0 : $3)' res.append(template_no_stat%rep_dic) rep_dic['title'] = " title ''" if show_mc_uncertainties: res.append(template%rep_dic) - rep_dic['data'] = '($3 >= 0 ? sqrt(-1) : abs($3))' + rep_dic['data'] = '($3 >= 0 ? 1/0 : abs($3))' rep_dic['ls'] = ' ls %d'%(100+color_index) res.append(template_no_stat%rep_dic) if show_mc_uncertainties: @@ -2739,13 +2736,13 @@ def ratio_no_correlations(wgtsA, wgtsB): """#-- rendering subhistograms '%(subhistogram_type)s' %(unset label)s %(set_format_y)s +%(set_yscale)s set yrange [%(ymin).4e:%(ymax).4e] set origin %(origin_x).4e, %(origin_y).4e set size %(size_x).4e, %(size_y).4e set mytics %(mytics)d %(set_ytics)s %(set_format_x)s -%(set_yscale)s %(set_ylabel)s %(set_histo_label)s plot \\""" @@ -2878,7 +2875,7 @@ def ratio_no_correlations(wgtsA, wgtsB): # We decide to show uncertainties in the main plot only if they # are part of a monocolor band. Otherwise, they will only be - # shown in the first subplot. Notice that plotting 'sqrt(-1)' + # shown in the first subplot. Notice that plotting '1/0' # is just a trick so as to have only the key printed with no # line @@ -2890,7 +2887,7 @@ def ratio_no_correlations(wgtsA, wgtsB): '%s, scale variation'%title, band='scale' in use_band) else: uncertainty_plot_lines[-1]['scale'] = \ - ["sqrt(-1) ls %d title '%s'"%(color_index+10,'%s, scale variation'%title)] + ["1/0 ls %d title '%s'"%(color_index+10,'%s, scale variation'%title)] # And now PDF_variation if available if not PDF_var_pos is None and len(PDF_var_pos)>0: if 'pdf' in use_band: @@ -2899,7 +2896,7 @@ def ratio_no_correlations(wgtsA, wgtsB): '%s, PDF variation'%title, band='pdf' in use_band) else: uncertainty_plot_lines[-1]['pdf'] = \ - ["sqrt(-1) ls %d title '%s'"%(color_index+20,'%s, PDF variation'%title)] + ["1/0 ls %d title '%s'"%(color_index+20,'%s, PDF variation'%title)] # And now merging variation if available if not merging_var_pos is None and len(merging_var_pos)>0: if 'merging_scale' in use_band: @@ -2908,7 +2905,7 @@ def ratio_no_correlations(wgtsA, wgtsB): '%s, merging scale variation'%title, band='merging_scale' in use_band) else: uncertainty_plot_lines[-1]['merging_scale'] = \ - ["sqrt(-1) ls %d title '%s'"%(color_index+30,'%s, merging scale variation'%title)] + ["1/0 ls %d title '%s'"%(color_index+30,'%s, merging scale variation'%title)] # And now alpsfact variation if available if not alpsfact_var_pos is None and len(alpsfact_var_pos)>0: if 'alpsfact' in use_band: @@ -2917,7 +2914,7 @@ def ratio_no_correlations(wgtsA, wgtsB): '%s, alpsfact variation'%title, band='alpsfact' in use_band) else: uncertainty_plot_lines[-1]['alpsfact'] = \ - ["sqrt(-1) ls %d title '%s'"%(color_index+40,'%s, alpsfact variation'%title)] + ["1/0 ls %d title '%s'"%(color_index+40,'%s, alpsfact variation'%title)] # plot_lines.append( # "'%s' index %d using (($1+$2)/2):3 ls %d title '%s'"\ 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 0924927785..ba08c10340 100644 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/launch_plugin.py +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/launch_plugin.py @@ -33,7 +33,7 @@ def compile(self, *args, **opts): if 'cwd' in opts and os.path.basename(opts['cwd']) == 'Source': path = pjoin(opts['cwd'], 'make_opts') common_run_interface.CommonRunCmd.update_make_opts_full(path, - {'FPTYPE': self.run_card['floating_type'] }) + {'override FPTYPE': self.run_card['floating_type'] }) misc.sprint('FPTYPE checked') cudacpp_supported_backends = [ 'fortran', 'cuda', 'hip', 'cpp', 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z', 'cppauto' ] if args and args[0][0] == 'madevent' and hasattr(self, 'run_card'): @@ -76,7 +76,7 @@ def reset_makeopts(self, old_value, new_value, name): if not hasattr(self, 'path'): raise Exception if name == 'floating_type': - common_run_interface.CommonRunCmd.update_make_opts_full({'FPTYPE': new_value}) + common_run_interface.CommonRunCmd.update_make_opts_full({'override FPTYPE': new_value}) else: raise Exception Sourcedir = pjoin(os.path.dirname(os.path.dirname(self.path)), 'Source') diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/lhe_parser.py b/epochX/cudacpp/pp_tt012j.mad/bin/internal/lhe_parser.py index f6e47956cd..76ded329c0 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/lhe_parser.py +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/lhe_parser.py @@ -2953,8 +2953,8 @@ def pt(self): @property def pseudorapidity(self): - norm = math.sqrt(self.px**2 + self.py**2+self.pz**2) - return 0.5* math.log((norm - self.pz) / (norm + self.pz)) + norm = math.sqrt(self.px**2 + self.py**2 + self.pz**2) + return 0.5* math.log((norm + self.pz) / (norm - self.pz)) @property def rapidity(self): 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 85e5bcf5e3..2852f1d4d8 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/madevent_interface.py +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/madevent_interface.py @@ -1171,10 +1171,10 @@ def check_survey(self, args, cmd='survey'): for opt,value in self._survey_options.items(): if arg.startswith('--%s=' % opt): exec('self.opts[\'%s\'] = %s(arg.split(\'=\')[-1])' % \ - (opt, value[0])) + (opt, value[0]), globals(), {'self':self, 'arg':arg}) arg = "" if arg != "": raise Exception - except Exception: + except Exception as error: self.help_survey() raise self.InvalidCmd('invalid %s argument'% arg) @@ -3656,9 +3656,11 @@ def do_refine(self, line): else: self.refine_mode = "new" - cross, error = self.make_make_all_html_results() + cross, error, across = self.make_make_all_html_results(get_attr=('xsec','xerru','axsec')) + self.results.add_detail('cross', cross) self.results.add_detail('error', error) + self.results.add_detail('axsec', across) self.results.add_detail('run_statistics', dict(self.results.get_detail('run_statistics'))) @@ -3786,7 +3788,7 @@ def split(a, n): for i, local_G in enumerate(split(Gdirs, nb_chunk)): line = [pjoin(self.me_dir, "Events", self.run_name, "partials%d.lhe.gz" % i)] line.append(pjoin(self.me_dir, 'Events', self.run_name, '%s_%s_banner.txt' % (self.run_name, tag))) - line.append(str(self.results.current['cross'])) + line.append(str(self.results.current.get('axsec'))) line += local_G partials_info.append(self.do_combine_events_partial(' '.join(line), preprocess_only=True)) mycluster.submit(sys.executable, @@ -6749,7 +6751,7 @@ def get_subP_ids(path): class GridPackCmd(MadEventCmd): """The command for the gridpack --Those are not suppose to be use interactively--""" - def __init__(self, me_dir = None, nb_event=0, seed=0, gran=-1, *completekey, **stdin): + def __init__(self, me_dir = None, nb_event=0, seed=0, gran=-1, nprocs=1, maxevts=2500, *completekey, **stdin): """Initialize the command and directly run""" # Initialize properly @@ -6759,6 +6761,8 @@ 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.nprocs = nprocs + self.maxevts = maxevts self.options['automatic_html_opening'] = False #write the grid_card.dat on disk @@ -6874,7 +6878,7 @@ def launch(self, nb_event, seed): #misc.call([pjoin(self.me_dir,'bin','refine4grid'), # str(nb_event), '0', 'Madevent','1','GridRun_%s' % seed], # cwd=self.me_dir) - self.refine4grid(nb_event) + self.gridpack_cross = self.refine4grid(nb_event) # 3) Combine the events/pythia/... self.exec_cmd('combine_events') @@ -6902,6 +6906,8 @@ def refine4grid(self, nb_event): precision = nb_event + across= self.make_make_all_html_results(get_attr='axsec') + self.opts = dict([(key,value[1]) for (key,value) in \ self._survey_options.items()]) @@ -6915,8 +6921,9 @@ def refine4grid(self, nb_event): 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} + refine_opt = {'err_goal': nb_event, 'split_channels': True, + 'ngran':self.granularity, 'readonly': self.readonly, + 'nprocs': self.nprocs, 'maxevts': self.maxevts} 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 @@ -6926,7 +6933,7 @@ def refine4grid(self, nb_event): #print 'run combine!!!' #combine_runs.CombineRuns(self.me_dir) - return + return across #update html output Presults = sum_html.collect_result(self) cross, error = Presults.xsec, Presults.xerru @@ -7051,10 +7058,14 @@ def do_combine_events(self, line): sum_axsec += result.get('axsec')*gscalefact[Gdir] if len(AllEvent) >= 80: #perform a partial unweighting - if self.results.current['cross'] == 0 and self.run_card['gridpack']: - nb_event= self.nb_event + if not self.results.current.get('axsec'): + if self.run_card['gridpack'] and self.gridpack_cross: + nb_event = min(abs(1.05*self.nb_event*sum_axsec/self.gridpack_cross),self.nb_event) + else: + nb_event= self.nb_event else: - nb_event = min(abs(1.01*self.nb_event*sum_axsec/self.results.current['cross']),self.run_card['nevents']) + nb_event = min(abs(1.01*self.nb_event*sum_axsec/self.results.current.get('axsec')),self.run_card['nevents'], self.nb_event, self.gridpack_cross, sum_axsec) + misc.sprint(nb_event, self.results.current.get('axsec'), self.gridpack_cross) AllEvent.unweight(pjoin(outdir, self.run_name, "partials%s.lhe.gz" % partials), get_wgt, log_level=5, trunc_error=1e-2, event_target=nb_event) AllEvent = lhe_parser.MultiEventFile() @@ -7068,6 +7079,7 @@ def do_combine_events(self, line): for data in partials_info: AllEvent.add(*data) + sum_xsec += data[1] if not hasattr(self,'proc_characteristic'): self.proc_characteristic = self.get_characteristics() diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/restore_data b/epochX/cudacpp/pp_tt012j.mad/bin/internal/restore_data index 6205bb9567..407ed7aa91 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/restore_data +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/restore_data @@ -48,8 +48,17 @@ for i in `cat subproc.mg` ; do cd ../ done +# check if we are on a Mac, otherwise assume Linux +if [[ "$OSTYPE" == "darwin"* ]]; then + # no nproc on Mac, so use sysctl instead + # use -S1024 because there is a limit on the length of the command + xargs_opts="-P $(sysctl -n hw.ncpu) -S1024" +else + xargs_opts="-P $(nproc --all)" +fi + find . -mindepth 2 -maxdepth 2 -type d -name 'G*' -print0 \ - | xargs --null -P "$(nproc --all)" -I{} bash -c " + | xargs --null ${xargs_opts} -I{} bash -c " cd {} for j in $1_results.dat ; do if [[ -e \$j ]] ; then diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/sum_html.py b/epochX/cudacpp/pp_tt012j.mad/bin/internal/sum_html.py index 9dd5826f71..fb8dd3a74a 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/sum_html.py +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/sum_html.py @@ -770,7 +770,7 @@ def collect_result(cmd, folder_names=[], jobs=None, main_dir=None): return all -def make_all_html_results(cmd, folder_names = [], jobs=[]): +def make_all_html_results(cmd, folder_names = [], jobs=[], get_attr=None): """ folder_names and jobs have been added for the amcatnlo runs """ run = cmd.results.current['run_name'] if not os.path.exists(pjoin(cmd.me_dir, 'HTML', run)): @@ -794,7 +794,12 @@ def make_all_html_results(cmd, folder_names = [], jobs=[]): fsock.write('%s

' % Presults.get_html(run, unit, cmd.me_dir)) fsock.write('%s
' % P_text) - return Presults.xsec, Presults.xerru + if not get_attr: + return Presults.xsec, Presults.xerru + else: + if isinstance(get_attr, tuple): + return [getattr(Presults, _) for _ in get_attr] + return getattr(Presults, get_attr) diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/internal/ufomodel/write_param_card.py b/epochX/cudacpp/pp_tt012j.mad/bin/internal/ufomodel/write_param_card.py index 57a85b0614..33a89259f8 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/ufomodel/write_param_card.py +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/ufomodel/write_param_card.py @@ -116,9 +116,10 @@ def write_param(self, param, lhablock): def write_dep_param_block(self, lhablock): import cmath from parameters import all_parameters + param_values = {'cmath':cmath} for parameter in all_parameters: try: - exec("%s = %s" % (parameter.name, parameter.value)) + exec("%s = %s" % (parameter.name, parameter.value), globals(), param_values) except Exception: pass text = "## Not dependent paramater.\n" @@ -134,7 +135,7 @@ def write_dep_param_block(self, lhablock): prefix = "DECAY " for part, param in data: if isinstance(param.value, str): - value = complex(eval(param.value)).real + value = complex(eval(param.value, globals(), param_values)).real else: value = param.value diff --git a/epochX/cudacpp/pp_tt012j.mad/bin/madevent b/epochX/cudacpp/pp_tt012j.mad/bin/madevent index dff9711b73..9c5363e682 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/madevent +++ b/epochX/cudacpp/pp_tt012j.mad/bin/madevent @@ -178,6 +178,17 @@ force_run = False if (args and args[0] == 'treatcards'): force_run=True + +# check that madgraph is not in PYTHONPATH +try: + import madgraph +except ImportError: + pass +else: + logger.getLogger('madgraph').error('Looks like you do have madgraph in your PYTHONPATH (or you run this executable from the main MG5aMC directory). This executable will likely not work in such case.') + + + # Call the cmd interface main loop try: if '-h' in args or '--help' in args: diff --git a/epochX/cudacpp/pp_tt012j.mad/src/HelAmps_sm.h b/epochX/cudacpp/pp_tt012j.mad/src/HelAmps_sm.h index 53dd560ed6..921ace57e7 100644 --- a/epochX/cudacpp/pp_tt012j.mad/src/HelAmps_sm.h +++ b/epochX/cudacpp/pp_tt012j.mad/src/HelAmps_sm.h @@ -8,7 +8,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/pp_tt012j.mad/src/Parameters_sm.cc b/epochX/cudacpp/pp_tt012j.mad/src/Parameters_sm.cc index 47a3a011b8..d17aac5b5c 100644 --- a/epochX/cudacpp/pp_tt012j.mad/src/Parameters_sm.cc +++ b/epochX/cudacpp/pp_tt012j.mad/src/Parameters_sm.cc @@ -7,7 +7,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/pp_tt012j.mad/src/Parameters_sm.h b/epochX/cudacpp/pp_tt012j.mad/src/Parameters_sm.h index 76066c7bb1..63f7d185bd 100644 --- a/epochX/cudacpp/pp_tt012j.mad/src/Parameters_sm.h +++ b/epochX/cudacpp/pp_tt012j.mad/src/Parameters_sm.h @@ -7,7 +7,7 @@ // Further modified by: A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/CODEGEN_mad_smeft_gg_tttt_log.txt b/epochX/cudacpp/smeft_gg_tttt.mad/CODEGEN_mad_smeft_gg_tttt_log.txt index 85f434b58f..e16c922a03 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/CODEGEN_mad_smeft_gg_tttt_log.txt +++ b/epochX/cudacpp/smeft_gg_tttt.mad/CODEGEN_mad_smeft_gg_tttt_log.txt @@ -1,8 +1,11 @@ +WARNING:root:python3.12 support is still experimental. For the moment re-weighting is NOT working and do expect a LOT of syntax warning. We do not advise python3.12 for production for the moment. +Running MG5 in debug mode +Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT +Plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT has marked as NOT being validated with this version: 3.6.2. +It has been validated for the last time with version: 3.6.0 Note that this is a development version. This version is intended for development/beta testing and NOT for production. This version has not been fully tested (if at all) and might have limited user support (if at all) -Running MG5 in debug mode -Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT ************************************************************ * * * W E L C O M E to * @@ -15,7 +18,7 @@ Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT * * * * * * * * * * * * -* VERSION 3.6.0 2024-09-30 * +* VERSION 3.6.2 2025-03-19 * * * * WARNING: UNKNOWN DEVELOPMENT VERSION. * * WARNING: DO NOT USE FOR PRODUCTION * @@ -46,17 +49,16 @@ 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/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt.mg +import /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt.mg The import format was not given, so we guess it as command set stdout_level DEBUG set output information to level: 10 set zerowidth_tchannel F set auto_convert_model T save options auto_convert_model -save configuration file to /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +save configuration file to /shared/roiser/sw/madgraph4gpu/MG5aMC/mg5amcnlo/input/mg5_configuration.txt import model SMEFTsim_topU3l_MwScheme_UFO -massless_4t INFO: load particles INFO: load vertices @@ -73,7 +75,7 @@ INFO: load vertices DEBUG: MG5 converter defines FFFF26 to Gamma(-2,-4,-3)*Gamma(-2,2,-6)*Gamma(-1,-6,-5)*Gamma(-1,4,-4)*ProjP(-5,1)*ProjP(-3,3) + Gamma(-2,-4,-3)*Gamma(-2,4,-6)*Gamma(-1,-6,-5)*Gamma(-1,2,-4)*ProjP(-5,3)*ProjP(-3,1) + Gamma(-2,-4,-3)*Gamma(-2,2,-6)*Gamma(-1,-6,-5)*Gamma(-1,4,-4)*ProjM(-5,1)*ProjM(-3,3) + Gamma(-2,-4,-3)*Gamma(-2,4,-6)*Gamma(-1,-6,-5)*Gamma(-1,2,-4)*ProjM(-5,3)*ProjM(-3,1)  DEBUG: MG5 converter defines FFFF27 to ProjP(2,1)*ProjP(4,3) + ProjM(2,1)*ProjM(4,3)  DEBUG: MG5 converter defines FFFF112 to ProjM(2,3)*ProjM(4,1) + ProjP(2,3)*ProjP(4,1)  -DEBUG: model prefixing takes 0.12868547439575195  +DEBUG: model prefixing takes 0.04109644889831543  INFO: Change particles name to pass to MG5 convention Defined multiparticle p = g u c d s u~ c~ d~ s~ Defined multiparticle j = g u c d s u~ c~ d~ s~ @@ -88,21 +90,21 @@ INFO: Please specify coupling orders to bypass this step. INFO: Trying coupling order WEIGHTED<=4: WEIGTHED IS QCD+2*QED+99*SMHLOOP+99*NP+99*NPshifts+99*NPprop+99*NPcpv+NPcbb+NPcbB+NPcbBB+NPcbd1+NPcbd8+NPcbe+NPcbG+NPcbH+NPcbj1+NPcbj8+NPcbl+NPcbu1+NPcbu8+NPcbW+NPcdB+NPcdd1+NPcdd8+NPcdG+NPcdH+NPcdW+NPceB+NPced+NPcee+NPceH+NPceu+NPceW+NPcG+NPcGtil+NPcH+NPcHB+NPcHbox+NPcHbq+NPcHBtil+NPcHd+NPcHDD+NPcHe+NPcHG+NPcHGtil+NPcHj1+NPcHj3+NPcHl1+NPcHl3+NPcHQ1+NPcHQ3+NPcHt+NPcHtb+NPcHu+NPcHud+NPcHW+NPcHWB+NPcHWBtil+NPcHWtil+NPcjd1+NPcjd8+NPcje+NPcjj11+NPcjj18+NPcjj31+NPcjj38+NPcjQbd1+NPcjQbd8+NPcjQtu1+NPcjQtu8+NPcjtQd1+NPcjtQd8+NPcju1+NPcju8+NPcjujd1+NPcjujd11+NPcjujd8+NPcjujd81+NPcjuQb1+NPcjuQb8+NPcld+NPcle+NPclebQ+NPcledj+NPcleju1+NPcleju3+NPcleQt1+NPcleQt3+NPclj1+NPclj3+NPcll+NPcll1+NPclu+NPcQb1+NPcQb8+NPcQd1+NPcQd8+NPcQe+NPcQj11+NPcQj18+NPcQj31+NPcQj38+NPcQl1+NPcQl3+NPcQQ1+NPcQQ8+NPcQt1+NPcQt8+NPcQtjd1+NPcQtjd8+NPcQtQb1+NPcQtQb8+NPcQu1+NPcQu8+NPcQujb1+NPcQujb8+NPctB+NPctb1+NPctb8+NPctd1+NPctd8+NPcte+NPctG+NPctH+NPctj1+NPctj8+NPctl+NPctt+NPctu1+NPctu8+NPctW+NPcuB+NPcud1+NPcud8+NPcuG+NPcuH+NPcutbd1+NPcutbd8+NPcuu1+NPcuu8+NPcuW+NPcW+NPcWtil+NPQjujb8 INFO: Trying process: g g > t t~ t t~ WEIGHTED<=4 @1 INFO: Process has 72 diagrams -1 processes with 72 diagrams generated in 3.699 s +1 processes with 72 diagrams generated in 1.408 s Total: 1 processes with 72 diagrams output madevent_simd ../TMPOUT/CODEGEN_mad_smeft_gg_tttt --hel_recycling=False --vector_size=32 Output will be done with PLUGIN: CUDACPP_OUTPUT Addition matrix-element will be done with PLUGIN: CUDACPP_OUTPUT -DEBUG: opt['output_options']['vector_size'] =  32 [export_v4.py at line 4334]  +DEBUG: opt['output_options']['vector_size'] =  32 [export_v4.py at line 4166]  Output will be done with PLUGIN: CUDACPP_OUTPUT DEBUG: Entering PLUGIN_ProcessExporter.__init__ (initialise the exporter) [output.py at line 171]  INFO: initialize a new directory: CODEGEN_mad_smeft_gg_tttt INFO: remove old information in CODEGEN_mad_smeft_gg_tttt DEBUG: Entering PLUGIN_ProcessExporter.copy_template (initialise the directory) [output.py at line 176]  -WARNING: File exists /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt  -INFO: Creating subdirectories in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt -WARNING: File exists /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt/Cards  -WARNING: File exists /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt/SubProcesses  +WARNING: File exists /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt  +INFO: Creating subdirectories in directory /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt +WARNING: File exists /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt/Cards  +WARNING: File exists /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt/SubProcesses  INFO: Organizing processes into subprocess groups INFO: Generating Helas calls for process: g g > t t~ t t~ WEIGHTED<=4 @1 INFO: Processing color information for process: g g > t t~ t t~ @1 @@ -114,25 +116,25 @@ FileWriter t t~ t t~ WEIGHTED<=4 @1 INFO: Finding symmetric diagrams for subprocess group gg_ttxttx -DEBUG: len(subproc_diagrams_for_config) =  70 [model_handling.py at line 1527]  -DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12, 13: 13, 14: 14, 15: 15, 16: 16, 17: 17, 18: 18, 19: 19, 20: 20, 21: 21, 22: 22, 23: 23, 24: 24, 25: 25, 26: 26, 27: 27, 28: 28, 29: 29, 30: 30, 31: 31, 32: 32, 33: 33, 34: 34, 35: 35, 36: 36, 37: 37, 38: 38, 39: 39, 40: 40, 41: 41, 42: 42, 43: 43, 44: 44, 45: 45, 46: 46, 47: 47, 48: 48, 49: 49, 50: 50, 51: 51, 52: 52, 53: 53, 54: 54, 55: 55, 56: 56, 57: 57, 58: 58, 59: 59, 60: 60, 61: 61, 62: 62, 63: 63, 64: 64, 65: 65, 66: 66, 67: 68, 68: 69, 69: 71, 70: 72} [model_handling.py at line 1551]  -DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12, 13: 13, 14: 14, 15: 15, 16: 16, 17: 17, 18: 18, 19: 19, 20: 20, 21: 21, 22: 22, 23: 23, 24: 24, 25: 25, 26: 26, 27: 27, 28: 28, 29: 29, 30: 30, 31: 31, 32: 32, 33: 33, 34: 34, 35: 35, 36: 36, 37: 37, 38: 38, 39: 39, 40: 40, 41: 41, 42: 42, 43: 43, 44: 44, 45: 45, 46: 46, 47: 47, 48: 48, 49: 49, 50: 50, 51: 51, 52: 52, 53: 53, 54: 54, 55: 55, 56: 56, 57: 57, 58: 58, 59: 59, 60: 60, 61: 61, 62: 62, 63: 63, 64: 64, 65: 65, 66: 66, 68: 67, 69: 68, 71: 69, 72: 70} [model_handling.py at line 1552]  -Generated helas calls for 1 subprocesses (72 diagrams) in 0.189 s -Wrote files for 119 helas calls in 0.388 s +DEBUG: len(subproc_diagrams_for_config) =  70 [model_handling.py at line 1538]  +DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12, 13: 13, 14: 14, 15: 15, 16: 16, 17: 17, 18: 18, 19: 19, 20: 20, 21: 21, 22: 22, 23: 23, 24: 24, 25: 25, 26: 26, 27: 27, 28: 28, 29: 29, 30: 30, 31: 31, 32: 32, 33: 33, 34: 34, 35: 35, 36: 36, 37: 37, 38: 38, 39: 39, 40: 40, 41: 41, 42: 42, 43: 43, 44: 44, 45: 45, 46: 46, 47: 47, 48: 48, 49: 49, 50: 50, 51: 51, 52: 52, 53: 53, 54: 54, 55: 55, 56: 56, 57: 57, 58: 58, 59: 59, 60: 60, 61: 61, 62: 62, 63: 63, 64: 64, 65: 65, 66: 66, 67: 68, 68: 69, 69: 71, 70: 72} [model_handling.py at line 1562]  +DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12, 13: 13, 14: 14, 15: 15, 16: 16, 17: 17, 18: 18, 19: 19, 20: 20, 21: 21, 22: 22, 23: 23, 24: 24, 25: 25, 26: 26, 27: 27, 28: 28, 29: 29, 30: 30, 31: 31, 32: 32, 33: 33, 34: 34, 35: 35, 36: 36, 37: 37, 38: 38, 39: 39, 40: 40, 41: 41, 42: 42, 43: 43, 44: 44, 45: 45, 46: 46, 47: 47, 48: 48, 49: 49, 50: 50, 51: 51, 52: 52, 53: 53, 54: 54, 55: 55, 56: 56, 57: 57, 58: 58, 59: 59, 60: 60, 61: 61, 62: 62, 63: 63, 64: 64, 65: 65, 66: 66, 68: 67, 69: 68, 71: 69, 72: 70} [model_handling.py at line 1563]  +Generated helas calls for 1 subprocesses (72 diagrams) in 0.068 s +Wrote files for 119 helas calls in 1.958 s ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates VVV5 routines ALOHA: aloha creates FFV1 routines ALOHA: aloha creates VVVV1 routines ALOHA: aloha creates VVVV9 routines ALOHA: aloha creates VVVV10 routines -ALOHA: aloha creates 5 routines in 0.319 s +ALOHA: aloha creates 5 routines in 0.151 s ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates VVV5 routines ALOHA: aloha creates FFV1 routines ALOHA: aloha creates VVVV1 routines ALOHA: aloha creates VVVV9 routines ALOHA: aloha creates VVVV10 routines -ALOHA: aloha creates 10 routines in 0.341 s +ALOHA: aloha creates 10 routines in 0.143 s VVV5 VVV5 FFV1 @@ -142,38 +144,40 @@ ALOHA: aloha creates 10 routines in 0.341 s VVVV1 VVVV9 VVVV10 -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt/src/./HelAmps_SMEFTsim_topU3l_MwScheme_UFO.h -INFO: Created file HelAmps_SMEFTsim_topU3l_MwScheme_UFO.h in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt/src/. +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt/src/./HelAmps_SMEFTsim_topU3l_MwScheme_UFO.h +INFO: Created file HelAmps_SMEFTsim_topU3l_MwScheme_UFO.h in directory /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt/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_smeft_gg_tttt/src/./Parameters_SMEFTsim_topU3l_MwScheme_UFO.h -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt/src/./Parameters_SMEFTsim_topU3l_MwScheme_UFO.cc +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt/src/./Parameters_SMEFTsim_topU3l_MwScheme_UFO.h +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt/src/./Parameters_SMEFTsim_topU3l_MwScheme_UFO.cc INFO: Created files Parameters_SMEFTsim_topU3l_MwScheme_UFO.h and Parameters_SMEFTsim_topU3l_MwScheme_UFO.cc in directory -INFO: /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt/src/. and /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt/src/. +INFO: /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt/src/. and /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt/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_smeft_gg_tttt/Cards/me5_configuration.txt +save configuration file to /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt/Cards/me5_configuration.txt INFO: Use Fortran compiler gfortran INFO: Use c++ compiler g++ INFO: Generate jpeg diagrams INFO: Generate web pages -DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt; patch -p4 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common +DEBUG: cd /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt; patch -p4 -i /shared/roiser/sw/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common patching file SubProcesses/makefile -DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt/SubProcesses/P1_gg_ttxttx; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +DEBUG: cd /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt/SubProcesses/P1_gg_ttxttx; patch -p6 -i /shared/roiser/sw/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file driver.f patching file matrix1.f Hunk #2 succeeded at 275 (offset 48 lines). DEBUG: p.returncode =  0 [output.py at line 263]  -Output to directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt done. +Output to directory /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt done. Type "launch" to generate events from this process, or see -/data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt/README +/shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt/README Run "open index.html" to see more information about this process. quit -real 0m7.169s -user 0m6.853s -sys 0m0.298s -Code generation completed in 7 seconds +real 0m9.466s +user 0m3.333s +sys 0m0.694s +Code generation completed in 10 seconds +/shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt/bin/internal/banner.py:3309: SyntaxWarning: invalid escape sequence '\s' + function_pat = re.compile('^\s+(?:SUBROUTINE|(?:%(type)s)\s+function)\s+([a-zA-Z]\w*)' \ ************************************************************ * * * W E L C O M E to * @@ -186,7 +190,7 @@ Code generation completed in 7 seconds * * * * * * * * * * * * -* VERSION 3.6.0 * +* VERSION 3.6.2 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -194,10 +198,9 @@ Code generation completed in 7 seconds * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt/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_smeft_gg_tttt/Cards/me5_configuration.txt -Using default text editor "vi". Set another one in ./input/mg5_configuration.txt +INFO: load configuration from /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt/Cards/me5_configuration.txt +INFO: load configuration from /shared/roiser/sw/madgraph4gpu/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt/Cards/me5_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 @@ -216,7 +219,7 @@ launch in debug mode * * * * * * * * * * * * -* VERSION 3.6.0 * +* VERSION 3.6.2 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -224,10 +227,9 @@ launch in debug mode * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt/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_smeft_gg_tttt/Cards/me5_configuration.txt -Using default text editor "vi". Set another one in ./input/mg5_configuration.txt +INFO: load configuration from /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt/Cards/me5_configuration.txt +INFO: load configuration from /shared/roiser/sw/madgraph4gpu/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_smeft_gg_tttt/Cards/me5_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/smeft_gg_tttt.mad/Cards/ident_card.dat b/epochX/cudacpp/smeft_gg_tttt.mad/Cards/ident_card.dat index 7758c3603b..ee875f040f 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/Cards/ident_card.dat +++ b/epochX/cudacpp/smeft_gg_tttt.mad/Cards/ident_card.dat @@ -216,17 +216,19 @@ decay 23 mdl_WZ decay 24 mdl_WW decay 25 mdl_WH decay 6 mdl_WT +mass 1 mdl_MD mass 11 mdl_Me mass 13 mdl_MMU mass 15 mdl_MTA -mass 1 mdl_MD +mass 2 mdl_MU mass 23 mdl_MZ mass 25 mdl_MH -mass 2 mdl_MU mass 3 mdl_MS mass 4 mdl_MC mass 5 mdl_MB mass 6 mdl_MT +smeft 1 mdl_cG +smeft 10 mdl_cuHRe smeft 100 mdl_ceHRe smeft 101 mdl_ceWRe smeft 102 mdl_ceBRe @@ -237,7 +239,7 @@ smeft 106 mdl_cll smeft 107 mdl_cll1 smeft 108 mdl_clj1 smeft 109 mdl_clj3 -smeft 10 mdl_cuHRe +smeft 11 mdl_ctHRe smeft 110 mdl_cQl1 smeft 111 mdl_cQl3 smeft 112 mdl_cee @@ -248,7 +250,7 @@ smeft 116 mdl_cbe smeft 117 mdl_cje smeft 118 mdl_cQe smeft 119 mdl_clu -smeft 11 mdl_ctHRe +smeft 12 mdl_cdHRe smeft 120 mdl_ctl smeft 121 mdl_cld smeft 122 mdl_cbl @@ -259,7 +261,6 @@ smeft 126 mdl_cleju1Re smeft 127 mdl_cleQt1Re smeft 128 mdl_cleju3Re smeft 129 mdl_cleQt3Re -smeft 12 mdl_cdHRe smeft 13 mdl_cbHRe smeft 14 mdl_cuGRe smeft 15 mdl_ctGRe @@ -267,7 +268,7 @@ smeft 16 mdl_cuWRe smeft 17 mdl_ctWRe smeft 18 mdl_cuBRe smeft 19 mdl_ctBRe -smeft 1 mdl_cG +smeft 2 mdl_cW smeft 20 mdl_cdGRe smeft 21 mdl_cbGRe smeft 22 mdl_cdWRe @@ -278,7 +279,7 @@ smeft 26 mdl_cHj1 smeft 27 mdl_cHQ1 smeft 28 mdl_cHj3 smeft 29 mdl_cHQ3 -smeft 2 mdl_cW +smeft 3 mdl_cH smeft 30 mdl_cHu smeft 31 mdl_cHt smeft 32 mdl_cHd @@ -289,7 +290,7 @@ smeft 36 mdl_cjj11 smeft 37 mdl_cjj18 smeft 38 mdl_cjj31 smeft 39 mdl_cjj38 -smeft 3 mdl_cH +smeft 4 mdl_cHbox smeft 40 mdl_cQj11 smeft 41 mdl_cQj18 smeft 42 mdl_cQj31 @@ -300,7 +301,7 @@ smeft 46 mdl_cuu1 smeft 47 mdl_cuu8 smeft 48 mdl_ctt smeft 49 mdl_ctu1 -smeft 4 mdl_cHbox +smeft 5 mdl_cHDD smeft 50 mdl_ctu8 smeft 51 mdl_cdd1 smeft 52 mdl_cdd8 @@ -311,7 +312,7 @@ smeft 56 mdl_cud1 smeft 57 mdl_ctb1 smeft 58 mdl_ctd1 smeft 59 mdl_cbu1 -smeft 5 mdl_cHDD +smeft 6 mdl_cHG smeft 60 mdl_cud8 smeft 61 mdl_ctb8 smeft 62 mdl_ctd8 @@ -322,7 +323,7 @@ smeft 66 mdl_cju1 smeft 67 mdl_cQu1 smeft 68 mdl_cju8 smeft 69 mdl_cQu8 -smeft 6 mdl_cHG +smeft 7 mdl_cHW smeft 70 mdl_ctj1 smeft 71 mdl_ctj8 smeft 72 mdl_cQt1 @@ -333,7 +334,7 @@ smeft 76 mdl_cQd1 smeft 77 mdl_cQd8 smeft 78 mdl_cbj1 smeft 79 mdl_cbj8 -smeft 7 mdl_cHW +smeft 8 mdl_cHB smeft 80 mdl_cQb1 smeft 81 mdl_cQb8 smeft 82 mdl_cjQtu1Re @@ -344,7 +345,7 @@ smeft 86 mdl_cjujd1Re smeft 87 mdl_cjujd8Re smeft 88 mdl_cjujd11Re smeft 89 mdl_cjujd81Re -smeft 8 mdl_cHB +smeft 9 mdl_cHWB smeft 90 mdl_cQtjd1Re smeft 91 mdl_cQtjd8Re smeft 92 mdl_cjuQb1Re @@ -355,7 +356,7 @@ smeft 96 mdl_cjtQd1Re smeft 97 mdl_cjtQd8Re smeft 98 mdl_cQtQb1Re smeft 99 mdl_cQtQb8Re -smeft 9 mdl_cHWB +smeftcpv 1 mdl_cGtil smeftcpv 10 mdl_ctWIm smeftcpv 11 mdl_cuBIm smeftcpv 12 mdl_ctBIm @@ -366,7 +367,7 @@ smeftcpv 16 mdl_cbWIm smeftcpv 17 mdl_cdBIm smeftcpv 18 mdl_cbBIm smeftcpv 19 mdl_cuHIm -smeftcpv 1 mdl_cGtil +smeftcpv 2 mdl_cWtil smeftcpv 20 mdl_ctHIm smeftcpv 21 mdl_cdHIm smeftcpv 22 mdl_cbHIm @@ -377,7 +378,7 @@ smeftcpv 26 mdl_cutbd8Im smeftcpv 27 mdl_cjQtu1Im smeftcpv 28 mdl_cjQtu8Im smeftcpv 29 mdl_cjQbd1Im -smeftcpv 2 mdl_cWtil +smeftcpv 3 mdl_cHGtil smeftcpv 30 mdl_cjQbd8Im smeftcpv 31 mdl_cjujd1Im smeftcpv 32 mdl_cjujd8Im @@ -388,7 +389,7 @@ smeftcpv 36 mdl_cQtjd8Im smeftcpv 37 mdl_cjuQb1Im smeftcpv 38 mdl_cjuQb8Im smeftcpv 39 mdl_cQujb1Im -smeftcpv 3 mdl_cHGtil +smeftcpv 4 mdl_cHWtil smeftcpv 40 mdl_cQujb8Im smeftcpv 41 mdl_cjtQd1Im smeftcpv 42 mdl_cjtQd8Im @@ -399,12 +400,11 @@ smeftcpv 46 mdl_ceWIm smeftcpv 47 mdl_ceBIm smeftcpv 48 mdl_cledjIm smeftcpv 49 mdl_clebQIm -smeftcpv 4 mdl_cHWtil +smeftcpv 5 mdl_cHBtil smeftcpv 50 mdl_cleju1Im smeftcpv 51 mdl_cleju3Im smeftcpv 52 mdl_cleQt1Im smeftcpv 53 mdl_cleQt3Im -smeftcpv 5 mdl_cHBtil smeftcpv 6 mdl_cHWBtil smeftcpv 7 mdl_cuGIm smeftcpv 8 mdl_ctGIm @@ -414,10 +414,10 @@ sminputs 1 mdl_MW sminputs 2 mdl_Gf sminputs 3 aS switches 1 mdl_linearPropCorrections +yukawa 1 mdl_ymdo yukawa 11 mdl_yme yukawa 13 mdl_ymm yukawa 15 mdl_ymtau -yukawa 1 mdl_ymdo yukawa 2 mdl_ymup yukawa 3 mdl_yms yukawa 4 mdl_ymc diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/Cards/me5_configuration.txt b/epochX/cudacpp/smeft_gg_tttt.mad/Cards/me5_configuration.txt index 68b4c46295..a0212bfb62 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/Cards/me5_configuration.txt +++ b/epochX/cudacpp/smeft_gg_tttt.mad/Cards/me5_configuration.txt @@ -235,7 +235,7 @@ # pineappl = pineappl -#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo +#mg5_path = /shared/roiser/sw/madgraph4gpu/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo +#mg5_path = /shared/roiser/sw/madgraph4gpu/MG5aMC/mg5amcnlo diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/Cards/proc_card_mg5.dat b/epochX/cudacpp/smeft_gg_tttt.mad/Cards/proc_card_mg5.dat index 9bcf8cac8c..96a3c39299 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/Cards/proc_card_mg5.dat +++ b/epochX/cudacpp/smeft_gg_tttt.mad/Cards/proc_card_mg5.dat @@ -8,7 +8,7 @@ #* * * * #* * #* * -#* VERSION 3.6.0 2024-09-30 * +#* VERSION 3.6.2 2025-03-19 * #* * #* WARNING: UNKNOWN DEVELOPMENT VERSION. * #* WARNING: DO NOT USE FOR PRODUCTION * diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/Cards/run_card.dat b/epochX/cudacpp/smeft_gg_tttt.mad/Cards/run_card.dat index 6b82577032..000832aacd 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/Cards/run_card.dat +++ b/epochX/cudacpp/smeft_gg_tttt.mad/Cards/run_card.dat @@ -107,6 +107,7 @@ # Parton level cuts definition * #******************************* 0.0 = dsqrt_shat ! minimal shat for full process + -1 = dsqrt_shatmax ! maximum shat for full process # # #********************************************************************* diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/Cards/run_card_default.dat b/epochX/cudacpp/smeft_gg_tttt.mad/Cards/run_card_default.dat index b8db871c35..85e1d39035 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/Cards/run_card_default.dat +++ b/epochX/cudacpp/smeft_gg_tttt.mad/Cards/run_card_default.dat @@ -107,6 +107,7 @@ # Parton level cuts definition * #******************************* 0.0 = dsqrt_shat ! minimal shat for full process + -1 = dsqrt_shatmax ! maximum shat for full process # # #********************************************************************* diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/MGMEVersion.txt b/epochX/cudacpp/smeft_gg_tttt.mad/MGMEVersion.txt index 084e244cea..77a069e39b 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/MGMEVersion.txt +++ b/epochX/cudacpp/smeft_gg_tttt.mad/MGMEVersion.txt @@ -1 +1 @@ -3.6.0 \ No newline at end of file +3.6.2 \ No newline at end of file diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/Source/alfas_functions.f b/epochX/cudacpp/smeft_gg_tttt.mad/Source/alfas_functions.f index bb69a6384e..84aeff369c 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/Source/alfas_functions.f +++ b/epochX/cudacpp/smeft_gg_tttt.mad/Source/alfas_functions.f @@ -188,6 +188,10 @@ SUBROUTINE NEWTON1(T,A_IN,A_OUT,NLOOP,NF) A_OUT=A_IN/(1D0+A_IN*B0(NF)*T) IF (NLOOP .EQ. 1) RETURN + if (1D0+A_IN*B0(NF)*T.le.0d0)THEN + A_OUT = 9d98 + RETURN + ENDIF A_OUT=A_IN/(1D0+B0(NF)*A_IN*T+C1(NF)*A_IN*LOG(1D0+A_IN*B0(NF)*T)) IF (A_OUT .LT. 0D0) AS=0.3D0 30 AS=A_OUT diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/Source/cuts.inc b/epochX/cudacpp/smeft_gg_tttt.mad/Source/cuts.inc index 23d099e5f7..a8ccc7420d 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/Source/cuts.inc +++ b/epochX/cudacpp/smeft_gg_tttt.mad/Source/cuts.inc @@ -37,7 +37,7 @@ C REAL*8 misset,missetmax,ptheavy REAL*8 ptllmin,ptllmax integer maxjetflavor - REAl*8 dsqrt_shat + REAl*8 dsqrt_shat,dsqrt_shatmax COMMON /to_min_max_cuts/ & PTJmax,PTBmax,PTAmax,PTLmax, @@ -60,7 +60,7 @@ C & ht2max,ht3max,ht4max, & htjmin,htjmax,ihtmin,ihtmax, & misset,missetmax,ptheavy, - & ptllmin,ptllmax,dsqrt_shat, + & ptllmin,ptllmax,dsqrt_shat,dsqrt_shatmax, & maxjetflavor C diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/Source/make_opts b/epochX/cudacpp/smeft_gg_tttt.mad/Source/make_opts index e4b87ee6ad..f9f7b64bb5 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/Source/make_opts +++ b/epochX/cudacpp/smeft_gg_tttt.mad/Source/make_opts @@ -5,8 +5,8 @@ GLOBAL_FLAG=-O3 -ffast-math -fbounds-check MACFLAG= MG5AMC_VERSION=SpecifiedByMG5aMCAtRunTime PYTHIA8_PATH=NotInstalled -STDLIB_FLAG= STDLIB=-lstdc++ +STDLIB_FLAG= #end_of_make_opts_variables BIASLIBDIR=../../../lib/ diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/Source/makefile b/epochX/cudacpp/smeft_gg_tttt.mad/Source/makefile index 291ca907ee..f9321e7a94 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/Source/makefile +++ b/epochX/cudacpp/smeft_gg_tttt.mad/Source/makefile @@ -73,6 +73,7 @@ $(BINDIR)gensudgrid: $(GENSUDGRID) $(LIBDIR)libpdf.$(libext) $(LIBDIR)libgammaUP # Dependencies dsample.o: DiscreteSampler.o dsample.f genps.inc StringCast.o vector.inc +pawgraph.o: vector.inc DiscreteSampler.o: StringCast.o invarients.o: invarients.f genps.inc gen_ximprove.o: gen_ximprove.f run_config.inc run_card.inc diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/Source/param_card.inc b/epochX/cudacpp/smeft_gg_tttt.mad/Source/param_card.inc index dab3aac603..e7bc7ae438 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/Source/param_card.inc +++ b/epochX/cudacpp/smeft_gg_tttt.mad/Source/param_card.inc @@ -2,17 +2,19 @@ MDL_WW = 2.085000D+00 MDL_WH = 4.070000D-03 MDL_WT = 1.330000D+00 + MDL_MD = 4.670000D-03 MDL_ME = 5.110000D-04 MDL_MMU = 1.056600D-01 MDL_MTA = 1.777000D+00 - MDL_MD = 4.670000D-03 + MDL_MU = 2.160000D-03 MDL_MZ = 9.118760D+01 MDL_MH = 1.250900D+02 - MDL_MU = 2.160000D-03 MDL_MS = 9.300000D-02 MDL_MC = 1.270000D+00 MDL_MB = 4.180000D+00 MDL_MT = 1.727600D+02 + MDL_CG = 0.000000D+00 + MDL_CUHRE = 0.000000D+00 MDL_CEHRE = 0.000000D+00 MDL_CEWRE = 0.000000D+00 MDL_CEBRE = 0.000000D+00 @@ -23,7 +25,7 @@ MDL_CLL1 = 0.000000D+00 MDL_CLJ1 = 0.000000D+00 MDL_CLJ3 = 0.000000D+00 - MDL_CUHRE = 0.000000D+00 + MDL_CTHRE = 0.000000D+00 MDL_CQL1 = 0.000000D+00 MDL_CQL3 = 0.000000D+00 MDL_CEE = 0.000000D+00 @@ -34,7 +36,7 @@ MDL_CJE = 0.000000D+00 MDL_CQE = 0.000000D+00 MDL_CLU = 0.000000D+00 - MDL_CTHRE = 0.000000D+00 + MDL_CDHRE = 0.000000D+00 MDL_CTL = 0.000000D+00 MDL_CLD = 0.000000D+00 MDL_CBL = 0.000000D+00 @@ -45,7 +47,6 @@ MDL_CLEQT1RE = 0.000000D+00 MDL_CLEJU3RE = 0.000000D+00 MDL_CLEQT3RE = 0.000000D+00 - MDL_CDHRE = 0.000000D+00 MDL_CBHRE = 0.000000D+00 MDL_CUGRE = 0.000000D+00 MDL_CTGRE = 0.000000D+00 @@ -53,7 +54,7 @@ MDL_CTWRE = 0.000000D+00 MDL_CUBRE = 0.000000D+00 MDL_CTBRE = 0.000000D+00 - MDL_CG = 0.000000D+00 + MDL_CW = 0.000000D+00 MDL_CDGRE = 0.000000D+00 MDL_CBGRE = 0.000000D+00 MDL_CDWRE = 0.000000D+00 @@ -64,7 +65,7 @@ MDL_CHQ1 = 0.000000D+00 MDL_CHJ3 = 0.000000D+00 MDL_CHQ3 = 0.000000D+00 - MDL_CW = 0.000000D+00 + MDL_CH = 0.000000D+00 MDL_CHU = 0.000000D+00 MDL_CHT = 0.000000D+00 MDL_CHD = 0.000000D+00 @@ -75,7 +76,7 @@ MDL_CJJ18 = 0.000000D+00 MDL_CJJ31 = 0.000000D+00 MDL_CJJ38 = 0.000000D+00 - MDL_CH = 0.000000D+00 + MDL_CHBOX = 0.000000D+00 MDL_CQJ11 = 0.000000D+00 MDL_CQJ18 = 0.000000D+00 MDL_CQJ31 = 0.000000D+00 @@ -86,7 +87,7 @@ MDL_CUU8 = 0.000000D+00 MDL_CTT = 0.000000D+00 MDL_CTU1 = 0.000000D+00 - MDL_CHBOX = 0.000000D+00 + MDL_CHDD = 0.000000D+00 MDL_CTU8 = 0.000000D+00 MDL_CDD1 = 0.000000D+00 MDL_CDD8 = 0.000000D+00 @@ -97,7 +98,7 @@ MDL_CTB1 = 0.000000D+00 MDL_CTD1 = 0.000000D+00 MDL_CBU1 = 0.000000D+00 - MDL_CHDD = 0.000000D+00 + MDL_CHG = 0.000000D+00 MDL_CUD8 = 0.000000D+00 MDL_CTB8 = 0.000000D+00 MDL_CTD8 = 0.000000D+00 @@ -108,7 +109,7 @@ MDL_CQU1 = 0.000000D+00 MDL_CJU8 = 0.000000D+00 MDL_CQU8 = 0.000000D+00 - MDL_CHG = 0.000000D+00 + MDL_CHW = 0.000000D+00 MDL_CTJ1 = 0.000000D+00 MDL_CTJ8 = 0.000000D+00 MDL_CQT1 = 0.000000D+00 @@ -119,7 +120,7 @@ MDL_CQD8 = 0.000000D+00 MDL_CBJ1 = 0.000000D+00 MDL_CBJ8 = 0.000000D+00 - MDL_CHW = 0.000000D+00 + MDL_CHB = 0.000000D+00 MDL_CQB1 = 0.000000D+00 MDL_CQB8 = 0.000000D+00 MDL_CJQTU1RE = 0.000000D+00 @@ -130,7 +131,7 @@ MDL_CJUJD8RE = 0.000000D+00 MDL_CJUJD11RE = 0.000000D+00 MDL_CJUJD81RE = 0.000000D+00 - MDL_CHB = 0.000000D+00 + MDL_CHWB = 0.000000D+00 MDL_CQTJD1RE = 0.000000D+00 MDL_CQTJD8RE = 0.000000D+00 MDL_CJUQB1RE = 0.000000D+00 @@ -141,7 +142,7 @@ MDL_CJTQD8RE = 0.000000D+00 MDL_CQTQB1RE = 0.000000D+00 MDL_CQTQB8RE = 0.000000D+00 - MDL_CHWB = 0.000000D+00 + MDL_CGTIL = 0.000000D+00 MDL_CTWIM = 0.000000D+00 MDL_CUBIM = 0.000000D+00 MDL_CTBIM = 0.000000D+00 @@ -152,7 +153,7 @@ MDL_CDBIM = 0.000000D+00 MDL_CBBIM = 0.000000D+00 MDL_CUHIM = 0.000000D+00 - MDL_CGTIL = 0.000000D+00 + MDL_CWTIL = 0.000000D+00 MDL_CTHIM = 0.000000D+00 MDL_CDHIM = 0.000000D+00 MDL_CBHIM = 0.000000D+00 @@ -163,7 +164,7 @@ MDL_CJQTU1IM = 0.000000D+00 MDL_CJQTU8IM = 0.000000D+00 MDL_CJQBD1IM = 0.000000D+00 - MDL_CWTIL = 0.000000D+00 + MDL_CHGTIL = 0.000000D+00 MDL_CJQBD8IM = 0.000000D+00 MDL_CJUJD1IM = 0.000000D+00 MDL_CJUJD8IM = 0.000000D+00 @@ -174,7 +175,7 @@ MDL_CJUQB1IM = 0.000000D+00 MDL_CJUQB8IM = 0.000000D+00 MDL_CQUJB1IM = 0.000000D+00 - MDL_CHGTIL = 0.000000D+00 + MDL_CHWTIL = 0.000000D+00 MDL_CQUJB8IM = 0.000000D+00 MDL_CJTQD1IM = 0.000000D+00 MDL_CJTQD8IM = 0.000000D+00 @@ -185,12 +186,11 @@ MDL_CEBIM = 0.000000D+00 MDL_CLEDJIM = 0.000000D+00 MDL_CLEBQIM = 0.000000D+00 - MDL_CHWTIL = 0.000000D+00 + MDL_CHBTIL = 0.000000D+00 MDL_CLEJU1IM = 0.000000D+00 MDL_CLEJU3IM = 0.000000D+00 MDL_CLEQT1IM = 0.000000D+00 MDL_CLEQT3IM = 0.000000D+00 - MDL_CHBTIL = 0.000000D+00 MDL_CHWBTIL = 0.000000D+00 MDL_CUGIM = 0.000000D+00 MDL_CTGIM = 0.000000D+00 @@ -200,10 +200,10 @@ MDL_GF = 1.166379D-05 AS = 1.179000D-01 MDL_LINEARPROPCORRECTIONS = 0.000000D+00 + MDL_YMDO = 4.670000D-03 MDL_YME = 5.110000D-04 MDL_YMM = 1.056600D-01 MDL_YMTAU = 1.777000D+00 - MDL_YMDO = 4.670000D-03 MDL_YMUP = 2.160000D-03 MDL_YMS = 9.300000D-02 MDL_YMC = 1.270000D+00 diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/Source/run_card.inc b/epochX/cudacpp/smeft_gg_tttt.mad/Source/run_card.inc index 1a1bc782bd..8bd5f73840 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/Source/run_card.inc +++ b/epochX/cudacpp/smeft_gg_tttt.mad/Source/run_card.inc @@ -88,6 +88,8 @@ DSQRT_SHAT = 0.000000000000000D+00 + DSQRT_SHATMAX = -1 + LIMHEL = 0.000000000000000D+00 PTJ = 2.000000000000000D+01 diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/Bridge.h b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/Bridge.h index 87aa648dd2..49b928db67 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/Bridge.h +++ b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/Bridge.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: S. Roiser (Nov 2021) for the MG5aMC CUDACPP plugin. -// Further modified by: S. Roiser, J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2021-2025) for the MG5aMC CUDACPP plugin. #ifndef BRIDGE_H #define BRIDGE_H 1 @@ -255,11 +255,15 @@ namespace mg5amcCpu throw std::logic_error( "Bridge constructor: FIXME! cannot choose gputhreads" ); // this should never happen! m_gpublocks = m_nevt / m_gputhreads; } +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Instantiate device Bridge (nevt=" << m_nevt << ", gpublocks=" << m_gpublocks << ", gputhreads=" << m_gputhreads << ", gpublocks*gputhreads=" << m_gpublocks * m_gputhreads << ")" << std::endl; +#endif m_pmek.reset( new MatrixElementKernelDevice( m_devMomentaC, m_devGs, m_devRndHel, m_devRndCol, m_devChannelIds, m_devMEs, m_devSelHel, m_devSelCol, m_gpublocks, m_gputhreads ) ); #else +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Instantiate host Bridge (nevt=" << m_nevt << ")" << std::endl; +#endif m_pmek.reset( new MatrixElementKernelHost( m_hstMomentaC, m_hstGs, m_hstRndHel, m_hstRndCol, m_hstChannelIds, m_hstMEs, m_hstSelHel, m_hstSelCol, m_nevt ) ); #endif // MGONGPUCPP_GPUIMPL // Create a process object, read param card and set parameters @@ -290,8 +294,10 @@ namespace mg5amcCpu throw std::runtime_error( "Bridge: gpublocks*gputhreads must equal m_nevt in set_gpugrid" ); m_gpublocks = gpublocks; m_gputhreads = gputhreads; +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Set grid in Bridge (nevt=" << m_nevt << ", gpublocks=" << m_gpublocks << ", gputhreads=" << m_gputhreads << ", gpublocks*gputhreads=" << m_gpublocks * m_gputhreads << ")" << std::endl; +#endif m_pmek->setGrid( m_gpublocks, m_gputhreads ); } #endif @@ -347,7 +353,9 @@ namespace mg5amcCpu if( goodHelOnly ) return; m_pmek->computeMatrixElements( useChannelIds ); copyHostFromDevice( m_hstMEs, m_devMEs ); +#ifdef MGONGPUCPP_VERBOSE flagAbnormalMEs( m_hstMEs.data(), m_nevt ); +#endif copyHostFromDevice( m_hstSelHel, m_devSelHel ); copyHostFromDevice( m_hstSelCol, m_devSelCol ); if constexpr( std::is_same_v ) @@ -400,7 +408,9 @@ namespace mg5amcCpu } if( goodHelOnly ) return; m_pmek->computeMatrixElements( useChannelIds ); +#ifdef MGONGPUCPP_VERBOSE flagAbnormalMEs( m_hstMEs.data(), m_nevt ); +#endif if constexpr( std::is_same_v ) { memcpy( mes, m_hstMEs.data(), m_hstMEs.bytes() ); diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/GpuRuntime.h b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/GpuRuntime.h index 860c7fde16..6a4b946e74 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/GpuRuntime.h +++ b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/GpuRuntime.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: J. Teig (Jun 2023, based on earlier work by S. Roiser) for the MG5aMC CUDACPP plugin. -// Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2025) for the MG5aMC CUDACPP plugin. #ifndef MG5AMC_GPURUNTIME_H #define MG5AMC_GPURUNTIME_H 1 @@ -50,7 +50,7 @@ namespace mg5amcGpu // Set up CUDA application // ** NB: strictly speaking this is not needed when using the CUDA runtime API ** // Calling cudaSetDevice on startup is useful to properly book-keep the time spent in CUDA initialization - static void setUp( const bool debug = true ) + static void setUp( const bool debug = false ) // ZW: changed debug default to false { // ** NB: it is useful to call cudaSetDevice, or cudaFree, to properly book-keep the time spent in CUDA initialization // ** NB: otherwise, the first CUDA operation (eg a cudaMemcpyToSymbol in CPPProcess ctor) appears to take much longer! @@ -71,7 +71,7 @@ namespace mg5amcGpu // ** NB: strictly speaking this is not needed when using the CUDA runtime API ** // Calling cudaDeviceReset on shutdown is only needed for checking memory leaks in cuda-memcheck // See https://docs.nvidia.com/cuda/cuda-memcheck/index.html#leak-checking - static void tearDown( const bool debug = true ) + static void tearDown( const bool debug = false ) // ZW: changed debug default to false { if( debug ) std::cout << "__GpuRuntime: calling GpuDeviceReset()" << std::endl; checkGpu( gpuDeviceReset() ); diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/MGVersion.txt b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/MGVersion.txt index 084e244cea..77a069e39b 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/MGVersion.txt +++ b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/MGVersion.txt @@ -1 +1 @@ -3.6.0 \ No newline at end of file +3.6.2 \ No newline at end of file diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/MatrixElementKernels.cc b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/MatrixElementKernels.cc index f463977c1a..703ea3781c 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/MatrixElementKernels.cc +++ b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/MatrixElementKernels.cc @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: A. Valassi (Jan 2022) for the MG5aMC CUDACPP plugin. -// Further modified by: J. Teig, A. Valassi (2022-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: J. Teig, A. Valassi, Z. Wettersten (2022-2025) for the MG5aMC CUDACPP plugin. #include "MatrixElementKernels.h" @@ -60,7 +60,9 @@ namespace mg5amcCpu #ifdef MGONGPU_CHANNELID_DEBUG MatrixElementKernelBase::dumpNevtProcessedByChannel(); #endif +#ifdef MGONGPUCPP_VERBOSE MatrixElementKernelBase::dumpSignallingFPEs(); +#endif } //-------------------------------------------------------------------------- diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/MatrixElementKernels.h b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/MatrixElementKernels.h index 7acff4b308..8da04d7945 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/MatrixElementKernels.h +++ b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/MatrixElementKernels.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: A. Valassi (Jan 2022) for the MG5aMC CUDACPP plugin. -// Further modified by: J. Teig, A. Valassi (2022-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: J. Teig, A. Valassi, Z. Wettersten (2022-2025) for the MG5aMC CUDACPP plugin. #ifndef MATRIXELEMENTKERNELS_H #define MATRIXELEMENTKERNELS_H 1 @@ -134,7 +134,7 @@ namespace mg5amcCpu // Does this host system support the SIMD used in the matrix element calculation? // [NB: this is private, SIMD vectorization in mg5amc C++ code is currently only used in the ME calculations below MatrixElementKernelHost!] - static bool hostSupportsSIMD( const bool verbose = true ); + static bool hostSupportsSIMD( const bool verbose = false ); // ZW: default verbose false private: diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/MemoryAccessGs.h b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/MemoryAccessGs.h index 63c17a68fa..50a6aaef4d 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/MemoryAccessGs.h +++ b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/MemoryAccessGs.h @@ -128,6 +128,14 @@ namespace mg5amcCpu #endif } + // Locate a field (output) in a memory buffer (input) from a kernel event-indexing mechanism (internal) + // [Signature (SCALAR OR VECTOR) ===> fptype_sv* kernelAccess( fptype* buffer ) <===] + static __host__ __device__ inline fptype_sv* + kernelAccessP( fptype* buffer ) + { + return reinterpret_cast( buffer ); + } + // Locate a field (output) in a memory buffer (input) from a kernel event-indexing mechanism (internal) and the given field indexes (input) // [Signature (const, SCALAR) ===> const fptype& kernelAccessConst( const fptype* buffer ) <===] static constexpr auto kernelAccessConst_s = diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/MemoryBuffers.h b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/MemoryBuffers.h index 2f711d8cc1..517396f37e 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/MemoryBuffers.h +++ b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/MemoryBuffers.h @@ -13,6 +13,7 @@ #include "CPPProcess.h" #include "GpuRuntime.h" #include "Parameters_SMEFTsim_topU3l_MwScheme_UFO.h" +#include "processConfig.h" #include @@ -274,7 +275,8 @@ namespace mg5amcCpu typedef BufferBase BufferNumerators; // The size (number of elements) per event in a memory buffer for numerators - constexpr size_t sizePerEventNumerators = 1; + // (should be equal to the number of diagrams in the process) + constexpr size_t sizePerEventNumerators = processConfig::ndiagrams; #ifndef MGONGPUCPP_GPUIMPL // A class encapsulating a C++ host buffer for gs diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/P1_gg_ttxttx/CPPProcess.cc b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/P1_gg_ttxttx/CPPProcess.cc index 96d77e5403..6e4cb7748c 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/P1_gg_ttxttx/CPPProcess.cc +++ b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/P1_gg_ttxttx/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -25,6 +25,7 @@ #include "MemoryAccessMatrixElements.h" #include "MemoryAccessMomenta.h" #include "MemoryAccessWavefunctions.h" +#include "processConfig.h" #ifdef MGONGPU_SUPPORTS_MULTICHANNEL #include "MemoryAccessDenominators.h" @@ -96,6 +97,69 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { +#ifdef MGONGPU_SUPPORTS_MULTICHANNEL + __device__ INLINE unsigned int getChannelId( const unsigned int* allChannelIds +#ifndef MGONGPUCPP_GPUIMPL + , + const int ievt00, + bool sanityCheckMixedPrecision = true +#endif + ) + { + unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr +#ifdef MGONGPUCPP_GPUIMPL + using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page + if( allChannelIds != nullptr ) + { + const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) + const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) + // NB: channelIds_sv is a scalar in CUDA + channelId = channelIds_sv; + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + } +#else // Cuda or C++ + using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + if( allChannelIds != nullptr ) + { + // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) + const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 + uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) +#ifndef MGONGPU_CPPSIMD + // NB: channelIds_sv is a scalar in no-SIMD C++ + channelId = channelIds_sv; +#else + // NB: channelIds_sv is a vector in SIMD C++ + channelId = channelIds_sv[0]; // element[0] + for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] + { + assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId + } +#endif + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + if( sanityCheckMixedPrecision ) + { +#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT + // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) + const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 + uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + for( int i = 0; i < neppV; ++i ) + { + assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector + } +#endif + } + } +#endif // MGONGPUCPP_GPUIMPL + return channelId; + } +#endif // MGONGPU_SUPPORTS_MULTICHANNEL + constexpr int nw6 = CPPProcess::nw6; // dimensions of each wavefunction (HELAS KEK 91-11): e.g. 6 for e+ e- -> mu+ mu- (fermions and vectors) constexpr int npar = CPPProcess::npar; // #particles in total (external = initial + final): e.g. 4 for e+ e- -> mu+ mu- constexpr int ncomb = CPPProcess::ncomb; // #helicity combinations: e.g. 16 for e+ e- -> mu+ mu- (2**4 = fermion spin up/down ** npar) @@ -305,7 +369,7 @@ namespace mg5amcCpu COUPs[ndcoup + iicoup] = allCOUPs[ndcoup + iicoup]; // independent couplings, fixed for all events fptype* MEs = E_ACCESS::ieventAccessRecord( allMEs, ievt0 ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); #endif #endif @@ -315,7 +379,7 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Numerators and denominators for the current event (CUDA) or SIMD event page (C++) - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); #endif @@ -341,8 +405,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1 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] ); + if( channelId != 0 ) + { + numerators_sv[0] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[3] += 1. / 6. * cxtype( 0, 1 ) * amp_sv[0]; @@ -357,8 +424,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 2 FFV1_0( w_fp[9], 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] ); + if( channelId != 0 ) + { + numerators_sv[1] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[3] += 1. / 6. * cxtype( 0, 1 ) * amp_sv[0]; @@ -373,8 +443,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 3 VVV5_0( w_fp[6], w_fp[7], w_fp[10], 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] ); + if( channelId != 0 ) + { + numerators_sv[2] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += 1. / 2. * amp_sv[0]; jamp_sv[2] -= 1. / 2. * amp_sv[0]; @@ -390,8 +463,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 4 FFV1_0( w_fp[12], w_fp[4], w_fp[11], 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] ); + if( channelId != 0 ) + { + numerators_sv[3] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[2] -= 1. / 6. * cxtype( 0, 1 ) * amp_sv[0]; @@ -406,8 +482,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 5 FFV1_0( w_fp[3], w_fp[8], w_fp[11], 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] ); + if( channelId != 0 ) + { + numerators_sv[4] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] -= 1. / 6. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[3] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -422,8 +501,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 6 VVV5_0( w_fp[6], w_fp[11], w_fp[8], COUPs[0], 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] ); + if( channelId != 0 ) + { + numerators_sv[5] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= 1. / 2. * amp_sv[0]; jamp_sv[3] += 1. / 2. * amp_sv[0]; @@ -438,8 +520,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 7 FFV1_0( w_fp[5], w_fp[13], w_fp[8], 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] ); + if( channelId != 0 ) + { + numerators_sv[6] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[1] -= 1. / 6. * cxtype( 0, 1 ) * amp_sv[0]; @@ -454,8 +539,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 8 FFV1_0( w_fp[9], w_fp[2], w_fp[8], 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] ); + if( channelId != 0 ) + { + numerators_sv[7] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] -= 1. / 6. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[3] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -470,8 +558,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 9 FFV1_0( w_fp[3], w_fp[13], w_fp[10], 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] ); + if( channelId != 0 ) + { + numerators_sv[8] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 6. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[1] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -486,8 +577,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 10 FFV1_0( w_fp[12], w_fp[2], w_fp[10], 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] ); + if( channelId != 0 ) + { + numerators_sv[9] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 6. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[2] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -504,8 +598,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 11 FFV1_0( w_fp[13], w_fp[4], w_fp[9], 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] ); + if( channelId != 0 ) + { + numerators_sv[10] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= 1. / 2. * amp_sv[0]; jamp_sv[5] += 1. / 6. * amp_sv[0]; @@ -518,8 +615,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 12 FFV1_0( w_fp[13], w_fp[12], w_fp[10], 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] ); + if( channelId != 0 ) + { + numerators_sv[11] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= 1. / 6. * amp_sv[0]; jamp_sv[5] += 1. / 2. * amp_sv[0]; @@ -533,8 +633,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 13 FFV1_0( w_fp[5], w_fp[6], w_fp[14], 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] ); + if( channelId != 0 ) + { + numerators_sv[12] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] -= 1. / 6. * amp_sv[0]; jamp_sv[5] += 1. / 2. * amp_sv[0]; @@ -547,8 +650,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 14 FFV1_0( w_fp[3], w_fp[6], w_fp[9], 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] ); + if( channelId != 0 ) + { + numerators_sv[13] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] -= 1. / 2. * amp_sv[0]; jamp_sv[5] += 1. / 6. * amp_sv[0]; @@ -561,8 +667,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 15 FFV1_0( w_fp[15], w_fp[4], w_fp[14], 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] ); + if( channelId != 0 ) + { + numerators_sv[14] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += 1. / 2. * amp_sv[0]; jamp_sv[4] -= 1. / 6. * amp_sv[0]; @@ -575,8 +684,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 16 FFV1_0( w_fp[15], w_fp[12], w_fp[8], 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] ); + if( channelId != 0 ) + { + numerators_sv[15] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += 1. / 6. * amp_sv[0]; jamp_sv[4] -= 1. / 2. * amp_sv[0]; @@ -589,8 +701,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 17 FFV1_0( w_fp[5], w_fp[16], w_fp[8], 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] ); + if( channelId != 0 ) + { + numerators_sv[16] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= 1. / 2. * amp_sv[0]; jamp_sv[1] += 1. / 6. * amp_sv[0]; @@ -603,8 +718,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 18 VVV5_0( w_fp[1], w_fp[8], w_fp[9], 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] ); + if( channelId != 0 ) + { + numerators_sv[17] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[4] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -617,8 +735,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 19 FFV1_0( w_fp[3], w_fp[16], 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] ); + if( channelId != 0 ) + { + numerators_sv[18] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= 1. / 6. * amp_sv[0]; jamp_sv[1] += 1. / 2. * amp_sv[0]; @@ -631,8 +752,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 20 VVV5_0( w_fp[1], w_fp[10], 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] ); + if( channelId != 0 ) + { + numerators_sv[19] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[5] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -647,8 +771,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 21 FFV1_0( w_fp[5], w_fp[16], w_fp[9], 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] ); + if( channelId != 0 ) + { + numerators_sv[20] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[6] += 1. / 6. * amp_sv[0]; jamp_sv[8] -= 1. / 2. * amp_sv[0]; @@ -661,8 +788,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 22 FFV1_0( w_fp[14], w_fp[16], w_fp[10], 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] ); + if( channelId != 0 ) + { + numerators_sv[21] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[6] += 1. / 2. * amp_sv[0]; jamp_sv[8] -= 1. / 6. * amp_sv[0]; @@ -675,8 +805,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 23 FFV1_0( w_fp[5], w_fp[6], w_fp[12], 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] ); + if( channelId != 0 ) + { + numerators_sv[22] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] -= 1. / 6. * amp_sv[0]; jamp_sv[10] += 1. / 2. * amp_sv[0]; @@ -689,8 +822,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 24 FFV1_0( w_fp[14], w_fp[6], w_fp[11], 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] ); + if( channelId != 0 ) + { + numerators_sv[23] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] -= 1. / 2. * amp_sv[0]; jamp_sv[10] += 1. / 6. * amp_sv[0]; @@ -703,8 +839,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 25 FFV1_0( w_fp[15], w_fp[4], w_fp[12], 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] ); + if( channelId != 0 ) + { + numerators_sv[24] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] -= 1. / 6. * amp_sv[0]; jamp_sv[6] += 1. / 2. * amp_sv[0]; @@ -717,8 +856,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 26 FFV1_0( w_fp[15], w_fp[2], w_fp[9], 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] ); + if( channelId != 0 ) + { + numerators_sv[25] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] -= 1. / 2. * amp_sv[0]; jamp_sv[6] += 1. / 6. * amp_sv[0]; @@ -731,8 +873,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 27 FFV1_0( w_fp[17], w_fp[4], 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] ); + if( channelId != 0 ) + { + numerators_sv[26] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[8] -= 1. / 2. * amp_sv[0]; jamp_sv[10] += 1. / 6. * amp_sv[0]; @@ -745,8 +890,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 28 VVV5_0( w_fp[1], w_fp[11], w_fp[9], 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] ); + if( channelId != 0 ) + { + numerators_sv[27] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[8] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -759,8 +907,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 29 FFV1_0( w_fp[17], w_fp[2], w_fp[10], 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] ); + if( channelId != 0 ) + { + numerators_sv[28] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[8] -= 1. / 6. * amp_sv[0]; jamp_sv[10] += 1. / 2. * amp_sv[0]; @@ -773,8 +924,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 30 VVV5_0( w_fp[1], w_fp[10], w_fp[12], 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] ); + if( channelId != 0 ) + { + numerators_sv[29] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[6] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[10] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -788,8 +942,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 31 FFV1_0( w_fp[5], w_fp[16], w_fp[17], 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] ); + if( channelId != 0 ) + { + numerators_sv[30] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[6] += 1. / 6. * amp_sv[0]; jamp_sv[7] -= 1. / 2. * amp_sv[0]; @@ -802,8 +959,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 32 FFV1_0( w_fp[3], w_fp[16], w_fp[9], 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] ); + if( channelId != 0 ) + { + numerators_sv[31] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[6] += 1. / 2. * amp_sv[0]; jamp_sv[7] -= 1. / 6. * amp_sv[0]; @@ -816,8 +976,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 33 FFV1_0( w_fp[13], w_fp[2], w_fp[9], 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] ); + if( channelId != 0 ) + { + numerators_sv[32] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] += 1. / 2. * amp_sv[0]; jamp_sv[7] -= 1. / 6. * amp_sv[0]; @@ -830,8 +993,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 34 FFV1_0( w_fp[13], w_fp[12], w_fp[11], 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] ); + if( channelId != 0 ) + { + numerators_sv[33] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] += 1. / 6. * amp_sv[0]; jamp_sv[7] -= 1. / 2. * amp_sv[0]; @@ -844,8 +1010,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 35 FFV1_0( w_fp[15], w_fp[2], w_fp[17], 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] ); + if( channelId != 0 ) + { + numerators_sv[34] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[3] -= 1. / 2. * amp_sv[0]; jamp_sv[6] += 1. / 6. * amp_sv[0]; @@ -858,8 +1027,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 36 FFV1_0( w_fp[15], w_fp[12], w_fp[7], 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] ); + if( channelId != 0 ) + { + numerators_sv[35] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[3] -= 1. / 6. * amp_sv[0]; jamp_sv[6] += 1. / 2. * amp_sv[0]; @@ -872,8 +1044,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 37 FFV1_0( w_fp[5], w_fp[14], w_fp[7], 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] ); + if( channelId != 0 ) + { + numerators_sv[36] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] += 1. / 2. * amp_sv[0]; jamp_sv[3] -= 1. / 6. * amp_sv[0]; @@ -886,8 +1061,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 38 VVV5_0( w_fp[1], w_fp[7], w_fp[9], COUPs[0], 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] ); + if( channelId != 0 ) + { + numerators_sv[37] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[6] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -900,8 +1078,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 39 FFV1_0( w_fp[3], w_fp[14], w_fp[11], 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] ); + if( channelId != 0 ) + { + numerators_sv[38] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] += 1. / 6. * amp_sv[0]; jamp_sv[3] -= 1. / 2. * amp_sv[0]; @@ -914,8 +1095,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 40 VVV5_0( w_fp[1], w_fp[11], w_fp[17], COUPs[0], 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] ); + if( channelId != 0 ) + { + numerators_sv[39] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[3] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[7] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -929,8 +1113,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 41 FFV1_0( w_fp[3], w_fp[16], w_fp[14], 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] ); + if( channelId != 0 ) + { + numerators_sv[40] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[7] -= 1. / 6. * amp_sv[0]; jamp_sv[9] += 1. / 2. * amp_sv[0]; @@ -943,8 +1130,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 42 FFV1_0( w_fp[17], w_fp[16], w_fp[8], 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] ); + if( channelId != 0 ) + { + numerators_sv[41] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[7] -= 1. / 2. * amp_sv[0]; jamp_sv[9] += 1. / 6. * amp_sv[0]; @@ -957,8 +1147,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 43 FFV1_0( w_fp[13], w_fp[4], w_fp[9], 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] ); + if( channelId != 0 ) + { + numerators_sv[42] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[5] += 1. / 6. * amp_sv[0]; jamp_sv[7] -= 1. / 2. * amp_sv[0]; @@ -971,8 +1164,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 44 FFV1_0( w_fp[13], w_fp[2], w_fp[14], 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] ); + if( channelId != 0 ) + { + numerators_sv[43] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[5] += 1. / 2. * amp_sv[0]; jamp_sv[7] -= 1. / 6. * amp_sv[0]; @@ -985,8 +1181,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 45 FFV1_0( w_fp[3], w_fp[6], 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] ); + if( channelId != 0 ) + { + numerators_sv[44] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[5] += 1. / 6. * amp_sv[0]; jamp_sv[11] -= 1. / 2. * amp_sv[0]; @@ -999,8 +1198,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 46 FFV1_0( w_fp[17], w_fp[6], w_fp[7], 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] ); + if( channelId != 0 ) + { + numerators_sv[45] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[5] += 1. / 2. * amp_sv[0]; jamp_sv[11] -= 1. / 6. * amp_sv[0]; @@ -1013,8 +1215,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 47 FFV1_0( w_fp[12], w_fp[4], w_fp[7], 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] ); + if( channelId != 0 ) + { + numerators_sv[46] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[9] += 1. / 2. * amp_sv[0]; jamp_sv[11] -= 1. / 6. * amp_sv[0]; @@ -1027,8 +1232,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 48 VVV5_0( w_fp[1], w_fp[7], w_fp[14], COUPs[0], 1.0, &_fp[0] ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - if( channelId == 48 ) numerators_sv += cxabs2( amp_sv[0] ); - if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); + if( channelId != 0 ) + { + numerators_sv[47] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[5] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[9] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -1041,8 +1249,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 49 FFV1_0( w_fp[12], w_fp[2], w_fp[8], 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] ); + if( channelId != 0 ) + { + numerators_sv[48] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[9] += 1. / 6. * amp_sv[0]; jamp_sv[11] -= 1. / 2. * amp_sv[0]; @@ -1055,8 +1266,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 50 VVV5_0( w_fp[1], w_fp[8], w_fp[9], COUPs[0], 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] ); + if( channelId != 0 ) + { + numerators_sv[49] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[7] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[11] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -1069,8 +1283,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 51 FFV1_0( w_fp[5], w_fp[9], w_fp[8], 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] ); + if( channelId != 0 ) + { + numerators_sv[50] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[8] -= 1. / 2. * amp_sv[0]; jamp_sv[9] += 1. / 6. * amp_sv[0]; @@ -1083,8 +1300,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 52 FFV1_0( w_fp[5], w_fp[16], w_fp[12], 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] ); + if( channelId != 0 ) + { + numerators_sv[51] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[7] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[8] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -1097,8 +1317,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 53 FFV1_0( w_fp[3], w_fp[9], w_fp[10], 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] ); + if( channelId != 0 ) + { + numerators_sv[52] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[8] -= 1. / 6. * amp_sv[0]; jamp_sv[9] += 1. / 2. * amp_sv[0]; @@ -1111,8 +1334,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 54 FFV1_0( w_fp[3], w_fp[16], 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] ); + if( channelId != 0 ) + { + numerators_sv[53] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[6] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[9] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -1125,8 +1351,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 55 FFV1_0( w_fp[16], w_fp[4], w_fp[11], 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] ); + if( channelId != 0 ) + { + numerators_sv[54] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= 1. / 2. * amp_sv[0]; jamp_sv[2] += 1. / 6. * amp_sv[0]; @@ -1139,8 +1368,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 56 FFV1_0( w_fp[13], w_fp[4], w_fp[14], 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] ); + if( channelId != 0 ) + { + numerators_sv[55] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[7] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -1153,8 +1385,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 57 FFV1_0( w_fp[16], w_fp[2], w_fp[10], 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] ); + if( channelId != 0 ) + { + numerators_sv[56] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= 1. / 6. * amp_sv[0]; jamp_sv[2] += 1. / 2. * amp_sv[0]; @@ -1167,8 +1402,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 58 FFV1_0( w_fp[13], w_fp[2], w_fp[9], 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] ); + if( channelId != 0 ) + { + numerators_sv[57] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[5] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -1181,8 +1419,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 59 FFV1_0( w_fp[5], w_fp[13], w_fp[7], 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] ); + if( channelId != 0 ) + { + numerators_sv[58] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[10] += 1. / 2. * amp_sv[0]; jamp_sv[11] -= 1. / 6. * amp_sv[0]; @@ -1195,8 +1436,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 60 FFV1_0( w_fp[5], w_fp[6], w_fp[16], COUPs[1], 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] ); + if( channelId != 0 ) + { + numerators_sv[59] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[5] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[10] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -1209,8 +1453,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 61 FFV1_0( w_fp[3], w_fp[13], w_fp[11], 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] ); + if( channelId != 0 ) + { + numerators_sv[60] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[10] += 1. / 6. * amp_sv[0]; jamp_sv[11] -= 1. / 2. * amp_sv[0]; @@ -1223,8 +1470,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 62 FFV1_0( w_fp[3], w_fp[6], w_fp[14], 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] ); + if( channelId != 0 ) + { + numerators_sv[61] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[4] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[11] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -1237,8 +1487,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 63 FFV1_0( w_fp[6], w_fp[4], w_fp[7], 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] ); + if( channelId != 0 ) + { + numerators_sv[62] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += 1. / 2. * amp_sv[0]; jamp_sv[3] -= 1. / 6. * amp_sv[0]; @@ -1251,8 +1504,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 64 FFV1_0( w_fp[15], w_fp[4], w_fp[16], 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] ); + if( channelId != 0 ) + { + numerators_sv[63] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[6] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -1265,8 +1521,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 65 FFV1_0( w_fp[6], w_fp[2], w_fp[8], 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] ); + if( channelId != 0 ) + { + numerators_sv[64] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += 1. / 6. * amp_sv[0]; jamp_sv[3] -= 1. / 2. * amp_sv[0]; @@ -1279,8 +1538,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 66 FFV1_0( w_fp[15], w_fp[2], w_fp[12], 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] ); + if( channelId != 0 ) + { + numerators_sv[65] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[3] -= 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[4] += 1. / 2. * cxtype( 0, 1 ) * amp_sv[0]; @@ -1315,8 +1577,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 68 VVV5_0( w_fp[1], w_fp[10], w_fp[16], COUPs[0], 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] ); + if( channelId != 0 ) + { + numerators_sv[67] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += 1. / 2. * amp_sv[0]; jamp_sv[5] -= 1. / 2. * amp_sv[0]; @@ -1331,8 +1596,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 69 VVV5_0( w_fp[1], w_fp[7], w_fp[9], COUPs[0], 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] ); + if( channelId != 0 ) + { + numerators_sv[68] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[2] += 1. / 2. * amp_sv[0]; jamp_sv[5] -= 1. / 2. * amp_sv[0]; @@ -1369,8 +1637,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 71 VVV5_0( w_fp[1], w_fp[8], w_fp[14], COUPs[0], 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] ); + if( channelId != 0 ) + { + numerators_sv[70] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= 1. / 2. * amp_sv[0]; jamp_sv[4] += 1. / 2. * amp_sv[0]; @@ -1385,8 +1656,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 72 VVV5_0( w_fp[1], w_fp[11], w_fp[12], COUPs[0], 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] ); + if( channelId != 0 ) + { + numerators_sv[71] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[3] -= 1. / 2. * amp_sv[0]; jamp_sv[4] += 1. / 2. * amp_sv[0]; @@ -1639,7 +1913,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- @@ -2011,9 +2287,6 @@ namespace mg5amcCpu #ifdef MGONGPUCPP_GPUIMPL // Remember: in CUDA this is a kernel for one event, in c++ this processes n events const int ievt = blockDim.x * blockIdx.x + threadIdx.x; // index of event (thread) in grid -#ifdef MGONGPU_SUPPORTS_MULTICHANNEL - using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events -#endif #else //assert( (size_t)(allmomenta) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] //assert( (size_t)(allMEs) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] @@ -2021,7 +2294,6 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL using NUM_ACCESS = HostAccessNumerators; // non-trivial access: buffer includes all events using DEN_ACCESS = HostAccessDenominators; // non-trivial access: buffer includes all events - using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events #endif #endif @@ -2046,11 +2318,12 @@ namespace mg5amcCpu fptype_sv& MEs_sv = E_ACCESS::kernelAccess( MEs ); MEs_sv = fptype_sv{ 0 }; #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - numerators_sv = fptype_sv{ 0 }; + for( int i = 0; i < processConfig::ndiagrams; ++i ) + numerators_sv[i] = fptype_sv{ 0 }; denominators_sv = fptype_sv{ 0 }; #endif } @@ -2063,17 +2336,7 @@ namespace mg5amcCpu // *** START OF PART 1a - CUDA (one event per GPU thread) *** #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) - const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) - // NB: channelIds_sv is a scalar in CUDA - channelId = channelIds_sv; - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) - } + unsigned int channelId = getChannelId( allChannelIds ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (for the single event processed in calculate_wavefunctions) @@ -2188,38 +2451,7 @@ namespace mg5amcCpu const int ievt00 = ipagV2 * neppV; // loop on one SIMD page (neppV events) at a time #endif #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) - const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 - uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) -#ifndef MGONGPU_CPPSIMD - // NB: channelIds_sv is a scalar in no-SIMD C++ - channelId = channelIds_sv; -#else - // NB: channelIds_sv is a vector in SIMD C++ - channelId = channelIds_sv[0]; // element[0] - for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] - { - assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId - } -#endif - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) -#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT - // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) - const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 - uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - for( int i = 0; i < neppV; ++i ) - { - assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector - } -#endif - } + unsigned int channelId = getChannelId( allChannelIds, ievt00 ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (jamp2[nParity][ncolor][neppV] for the SIMD vector - or the two SIMD vectors - of events processed in calculate_wavefunctions) @@ -2392,11 +2624,12 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( allChannelIds != nullptr ) // fix segfault #892 (not 'channelIds[0] != 0') { - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + const unsigned int channelId = getChannelId( allChannelIds, ievt0, false ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - MEs_sv *= numerators_sv / denominators_sv; + MEs_sv *= numerators_sv[channelId - 1] / denominators_sv; } #endif //for( int ieppV = 0; ieppV < neppV; ieppV++ ) diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/P1_gg_ttxttx/CPPProcess.h b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/P1_gg_ttxttx/CPPProcess.h index d207c3303f..9672910a40 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/P1_gg_ttxttx/CPPProcess.h +++ b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/P1_gg_ttxttx/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/P1_gg_ttxttx/auto_dsig.f b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/P1_gg_ttxttx/auto_dsig.f index ef1e17705f..f26b24a4db 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/P1_gg_ttxttx/auto_dsig.f +++ b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/P1_gg_ttxttx/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/P1_gg_ttxttx/auto_dsig1.f b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/P1_gg_ttxttx/auto_dsig1.f index 2086a21e98..e3b8a0e311 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/P1_gg_ttxttx/auto_dsig1.f +++ b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/P1_gg_ttxttx/auto_dsig1.f @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -137,14 +137,14 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDDO QSCALE=QSCALE/2D0 ELSE - QSCALE=DSQRT(Q2FACT(IB(1))) + QSCALE=DSQRT(Q2FACT(1)) ENDIF G1=PDG2PDF(LPP(IB(1)),0, IB(1),XBK(IB(1)), QSCALE) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) IF (DSQRT(Q2FACT(IB(2))).NE.0D0) THEN - QSCALE=DSQRT(Q2FACT(IB(2))) + QSCALE=DSQRT(Q2FACT(2)) ENDIF G2=PDG2PDF(LPP(IB(2)),0, IB(2),XBK(IB(2)), QSCALE) ENDIF @@ -219,7 +219,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -290,6 +290,10 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, INTEGER I_EE C +C STUFF FOR UPC +C + DOUBLE PRECISION PHOTONPDFSQUARE +C C EXTERNAL FUNCTIONS C LOGICAL PASSCUTS @@ -373,12 +377,12 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, IF (ABS(LPP(IB(1))).GE.1) THEN C LP=SIGN(1,LPP(IB(1))) G1(IVEC)=PDG2PDF(LPP(IB(1)),0, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) G2(IVEC)=PDG2PDF(LPP(IB(2)),0, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) ENDIF ENDDO ! IWARP LOOP ENDDO ! CURRWARP LOOP diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/P1_gg_ttxttx/card.png b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/P1_gg_ttxttx/card.png new file mode 100644 index 0000000000..e1361e8acf Binary files /dev/null and b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/P1_gg_ttxttx/card.png differ diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/P1_gg_ttxttx/matrix1.f b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/P1_gg_ttxttx/matrix1.f index 45032ad41c..05f315f1e7 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/P1_gg_ttxttx/matrix1.f +++ b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/P1_gg_ttxttx/matrix1.f @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -355,7 +355,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -398,7 +398,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C INTEGER I,J,M,N COMPLEX*16 ZTEMP, TMP_JAMP(34) - REAL*8 CF(NCOLOR,NCOLOR) + INTEGER CF(NCOLOR*(NCOLOR+1)/2) + INTEGER DENOM, CF_INDEX COMPLEX*16 AMP(NGRAPHS), JAMP(NCOLOR,NAMPSO) COMPLEX*16 W(6,NWAVEFUNCS) C Needed for v4 models @@ -441,101 +442,30 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C C COLOR DATA C - DATA (CF(I, 1),I= 1, 6) /1.600000000000000D+01 - $ ,5.333333333333333D+00,5.333333333333333D+00,2.000000000000000D - $ +00,0.000000000000000D+00,5.333333333333333D+00/ - DATA (CF(I, 1),I= 7, 12) /-6.666666666666666D-01 - $ ,0.000000000000000D+00,-2.000000000000000D+00, - $ -6.666666666666666D-01,-6.666666666666666D-01 - $ ,2.000000000000000D+00/ + DATA DENOM/3/ + DATA (CF(I),I= 1, 12) /48,32,32,12,0,32,-4,0,-12,-4,-4,12/ C 1 T(1,2,3,4) T(5,6) - DATA (CF(I, 2),I= 1, 6) /5.333333333333333D+00 - $ ,1.600000000000000D+01,2.000000000000000D+00,5.333333333333333D - $ +00,5.333333333333333D+00,0.000000000000000D+00/ - DATA (CF(I, 2),I= 7, 12) /0.000000000000000D+00, - $ -6.666666666666666D-01,-6.666666666666666D-01, - $ -2.000000000000000D+00,2.000000000000000D+00, - $ -6.666666666666666D-01/ + DATA (CF(I),I= 13, 23) /48,12,32,32,0,0,-4,-4,-12,12,-4/ C 1 T(1,2,3,6) T(5,4) - DATA (CF(I, 3),I= 1, 6) /5.333333333333333D+00 - $ ,2.000000000000000D+00,1.600000000000000D+01,5.333333333333333D - $ +00,-6.666666666666666D-01,0.000000000000000D+00/ - DATA (CF(I, 3),I= 7, 12) /0.000000000000000D+00 - $ ,5.333333333333333D+00,-6.666666666666666D-01 - $ ,2.000000000000000D+00,-2.000000000000000D+00, - $ -6.666666666666666D-01/ + DATA (CF(I),I= 24, 33) /48,32,-4,0,0,32,-4,12,-12,-4/ C 1 T(1,2,5,4) T(3,6) - DATA (CF(I, 4),I= 1, 6) /2.000000000000000D+00 - $ ,5.333333333333333D+00,5.333333333333333D+00,1.600000000000000D - $ +01,0.000000000000000D+00,-6.666666666666666D-01/ - DATA (CF(I, 4),I= 7, 12) /5.333333333333333D+00 - $ ,0.000000000000000D+00,2.000000000000000D+00, - $ -6.666666666666666D-01,-6.666666666666666D-01, - $ -2.000000000000000D+00/ + DATA (CF(I),I= 34, 42) /48,0,-4,32,0,12,-4,-4,-12/ C 1 T(1,2,5,6) T(3,4) - DATA (CF(I, 5),I= 1, 6) /0.000000000000000D+00 - $ ,5.333333333333333D+00,-6.666666666666666D-01 - $ ,0.000000000000000D+00,1.600000000000000D+01,5.333333333333333D - $ +00/ - DATA (CF(I, 5),I= 7, 12) /5.333333333333333D+00 - $ ,2.000000000000000D+00,0.000000000000000D+00, - $ -6.666666666666666D-01,5.333333333333333D+00,0.000000000000000D - $ +00/ + DATA (CF(I),I= 43, 50) /48,32,32,12,0,-4,32,0/ C 1 T(1,3,4) T(2,5,6) - DATA (CF(I, 6),I= 1, 6) /5.333333333333333D+00 - $ ,0.000000000000000D+00,0.000000000000000D+00, - $ -6.666666666666666D-01,5.333333333333333D+00,1.600000000000000D - $ +01/ - DATA (CF(I, 6),I= 7, 12) /2.000000000000000D+00 - $ ,5.333333333333333D+00,-6.666666666666666D-01 - $ ,0.000000000000000D+00,0.000000000000000D+00,5.333333333333333D - $ +00/ + DATA (CF(I),I= 51, 57) /48,12,32,-4,0,0,32/ C 1 T(1,3,6) T(2,5,4) - DATA (CF(I, 7),I= 1, 6) /-6.666666666666666D-01 - $ ,0.000000000000000D+00,0.000000000000000D+00,5.333333333333333D - $ +00,5.333333333333333D+00,2.000000000000000D+00/ - DATA (CF(I, 7),I= 7, 12) /1.600000000000000D+01 - $ ,5.333333333333333D+00,5.333333333333333D+00,0.000000000000000D - $ +00,0.000000000000000D+00,-6.666666666666666D-01/ + DATA (CF(I),I= 58, 63) /48,32,32,0,0,-4/ C 1 T(1,5,4) T(2,3,6) - DATA (CF(I, 8),I= 1, 6) /0.000000000000000D+00, - $ -6.666666666666666D-01,5.333333333333333D+00,0.000000000000000D - $ +00,2.000000000000000D+00,5.333333333333333D+00/ - DATA (CF(I, 8),I= 7, 12) /5.333333333333333D+00 - $ ,1.600000000000000D+01,0.000000000000000D+00,5.333333333333333D - $ +00,-6.666666666666666D-01,0.000000000000000D+00/ + DATA (CF(I),I= 64, 68) /48,0,32,-4,0/ C 1 T(1,5,6) T(2,3,4) - DATA (CF(I, 9),I= 1, 6) /-2.000000000000000D+00, - $ -6.666666666666666D-01,-6.666666666666666D-01 - $ ,2.000000000000000D+00,0.000000000000000D+00, - $ -6.666666666666666D-01/ - DATA (CF(I, 9),I= 7, 12) /5.333333333333333D+00 - $ ,0.000000000000000D+00,1.600000000000000D+01,5.333333333333333D - $ +00,5.333333333333333D+00,2.000000000000000D+00/ + DATA (CF(I),I= 69, 72) /48,32,32,12/ C 1 T(2,1,3,4) T(5,6) - DATA (CF(I, 10),I= 1, 6) /-6.666666666666666D-01, - $ -2.000000000000000D+00,2.000000000000000D+00, - $ -6.666666666666666D-01,-6.666666666666666D-01 - $ ,0.000000000000000D+00/ - DATA (CF(I, 10),I= 7, 12) /0.000000000000000D+00 - $ ,5.333333333333333D+00,5.333333333333333D+00,1.600000000000000D - $ +01,2.000000000000000D+00,5.333333333333333D+00/ + DATA (CF(I),I= 73, 75) /48,12,32/ C 1 T(2,1,3,6) T(5,4) - DATA (CF(I, 11),I= 1, 6) /-6.666666666666666D-01 - $ ,2.000000000000000D+00,-2.000000000000000D+00, - $ -6.666666666666666D-01,5.333333333333333D+00,0.000000000000000D - $ +00/ - DATA (CF(I, 11),I= 7, 12) /0.000000000000000D+00, - $ -6.666666666666666D-01,5.333333333333333D+00,2.000000000000000D - $ +00,1.600000000000000D+01,5.333333333333333D+00/ + DATA (CF(I),I= 76, 77) /48,32/ C 1 T(2,1,5,4) T(3,6) - DATA (CF(I, 12),I= 1, 6) /2.000000000000000D+00, - $ -6.666666666666666D-01,-6.666666666666666D-01, - $ -2.000000000000000D+00,0.000000000000000D+00,5.333333333333333D - $ +00/ - DATA (CF(I, 12),I= 7, 12) /-6.666666666666666D-01 - $ ,0.000000000000000D+00,2.000000000000000D+00,5.333333333333333D - $ +00,5.333333333333333D+00,1.600000000000000D+01/ + DATA (CF(I),I= 78, 78) /48/ C 1 T(2,1,5,6) T(3,4) C ---------- C BEGIN CODE @@ -910,10 +840,12 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) MATRIX1 = 0.D0 DO M = 1, NAMPSO + CF_INDEX = 0 DO I = 1, NCOLOR ZTEMP = (0.D0,0.D0) - DO J = 1, NCOLOR - ZTEMP = ZTEMP + CF(J,I)*JAMP(J,M) + DO J = I, NCOLOR + CF_INDEX = CF_INDEX + 1 + ZTEMP = ZTEMP + CF(CF_INDEX)*JAMP(J,M) ENDDO DO N = 1, NAMPSO @@ -922,6 +854,7 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) ENDDO ENDDO ENDDO + MATRIX1 = MATRIX1/DENOM IF(SDE_STRAT.EQ.1)THEN AMP2(1)=AMP2(1)+AMP(1)*DCONJG(AMP(1)) diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/P1_gg_ttxttx/matrix11.png b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/P1_gg_ttxttx/matrix11.png new file mode 100644 index 0000000000..17cb9b92cf Binary files /dev/null and b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/P1_gg_ttxttx/matrix11.png differ diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/P1_gg_ttxttx/matrix12.png b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/P1_gg_ttxttx/matrix12.png new file mode 100644 index 0000000000..f5f3bdf0b7 Binary files /dev/null and b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/P1_gg_ttxttx/matrix12.png differ diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/P1_gg_ttxttx/processConfig.h b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/P1_gg_ttxttx/processConfig.h new file mode 100644 index 0000000000..b9f07de180 --- /dev/null +++ b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/P1_gg_ttxttx/processConfig.h @@ -0,0 +1,16 @@ +// Copyright (C) 2025 CERN and UCLouvain. +// Licensed under the GNU Lesser General Public License (version 3 or later). +// Created by: S. Roiser (May 2025) for the MG5aMC CUDACPP plugin. +// Further modified by: ... for the MG5aMC CUDACPP plugin. + + +#ifndef MG5_CONFIG_SIGMA_SMEFTSIM_TOPU3L_MWSCHEME_UFO_GG_TTXTTX_H +#define MG5_CONFIG_SIGMA_SMEFTSIM_TOPU3L_MWSCHEME_UFO_GG_TTXTTX_H 1 + +namespace processConfig { + + constexpr int ndiagrams = 72; + +} + +#endif // MG5_CONFIG_SIGMA_SMEFTSIM_TOPU3L_MWSCHEME_UFO_GG_TTXTTX_H \ No newline at end of file diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/cuts.f b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/cuts.f index 7898714201..bd50ab1357 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/cuts.f +++ b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/cuts.f @@ -307,12 +307,18 @@ LOGICAL FUNCTION PASSCUTS(P, VECSIZE_USED) c c Limit S_hat c - if (dsqrt_shat.ne.0d0)then - if (nincoming.eq.2.and.sumdot(p(0,1),p(0,2),1d0) .lt. dsqrt_shat**2) then - passcuts=.false. - return - endif - endif + if(nincoming.eq.2) then + if (dsqrt_shat.ne.0d0.or.dsqrt_shatmax.ne.-1d0)then + xvar = sumdot(p(0,1),p(0,2),1d0) + if (xvar .lt. dsqrt_shat**2)then + passcuts=.false. + return + else if (dsqrt_shatmax.ne.-1d0 .and. xvar .gt. dsqrt_shatmax**2)then + passcuts = .false. + return + endif + endif + endif C $B$ DESACTIVATE_CUT $E$ !This is a tag for MadWeight if(debug) write (*,*) '=============================' diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/genps.f b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/genps.f index 1c32e93f5d..8503bdbec8 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/genps.f +++ b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/genps.f @@ -1373,6 +1373,10 @@ subroutine gen_s(x,smin,smax,spole,swidth,s,jac,pass) double precision smin,smax,spole,swidth,s,jac double precision x logical pass + include 'maxparticles.inc' + include '../../Source/vector.inc' + include 'run.inc' + include 'cuts.inc' c c Local c @@ -1384,6 +1388,10 @@ subroutine gen_s(x,smin,smax,spole,swidth,s,jac,pass) c----- c Begin Code c----- + if (dsqrt_shatmax.ne.-1d0)then + smax = min(smax, dsqrt_shatmax**2) + endif + pass=.true. if (jac .eq. 0 .and. .not. warned0) then print*,'Input jacobian 0 in genps' @@ -1628,7 +1636,10 @@ SUBROUTINE GENCMS(S,X1,X2,X,SMIN,SJACOBI) DOUBLE PRECISION ETA,ETAMIN,ETAMAX logical warned data warned/.false./ - + include 'maxparticles.inc' + include '../../Source/vector.inc' + include 'run.inc' + include 'cuts.inc' C------------ C BEGIN CODE C------------ @@ -1645,7 +1656,11 @@ SUBROUTINE GENCMS(S,X1,X2,X,SMIN,SJACOBI) C IF THERE IS NO S CHANNEL POLE USE BELOW: TAUMIN = 0d0 !SMIN/S !keep scale fix - TAUMAX = 1D0 + if (dsqrt_shatmax.ne.-1d0)then + TAUMAX=dsqrt_shatmax**2/S + else + TAUMAX = 1D0 + endif TAU = (TAUMAX-TAUMIN)*X(1)+TAUMIN SJACOBI= sjacobi*(TAUMAX-TAUMIN) @@ -1915,7 +1930,7 @@ double precision function get_channel_cut(p, config) if(sde_strat.eq.2)then t = dot(ptemp(0,-i), ptemp(0,-i)) Mass = prmass(-i, config) - get_channel_cut = get_channel_cut / ((t-Mass)*(t+Mass)+stot*1d-10)**2 + get_channel_cut = get_channel_cut / (t-Mass**2+stot*1d-10)**2 endif c write(*,*) i, "t, Mass, fact", t, Mass, ((t-Mass)*(t+Mass))**2,get_channel_cut t = t/stot @@ -1930,9 +1945,9 @@ double precision function get_channel_cut(p, config) t = dot(ptemp(0,-i), ptemp(0,-i)) Mass = prmass(-i, config) Width = prwidth(-i, config) - tmp = (t-Mass)*(t+Mass) + tmp = (t-Mass**2) tmp2 = Mass*Width - get_channel_cut = get_channel_cut* (tmp**2 - tmp2**2)/(tmp**2 + tmp2**2)**2 + get_channel_cut = get_channel_cut/(tmp**2 + tmp2**2) endif c write(*,*) i, "s, Mass, Width, fact", t, Mass, Width, (((t-Mass)*(t+Mass) )**2 + Width**2*Mass**2), get_channel_cut endif diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/myamp.f b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/myamp.f index 9e5f8d44dd..5360566ef4 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/myamp.f +++ b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/myamp.f @@ -231,6 +231,7 @@ subroutine set_peaks double precision x1,x2,xk(nexternal) double precision dr,mtot,etot,xqfact double precision spmass + double precision stot ! technically the min with dsqrt_shatmax**2 with the physical one integer i, iconfig, l1, l2, j, nt, nbw, iproc, k integer iden_part(-nexternal+1:nexternal) @@ -285,8 +286,8 @@ subroutine set_peaks integer lbw(0:nexternal) !Use of B.W. common /to_BW/ lbw - double precision stot,m1,m2 - common/to_stot/stot,m1,m2 + double precision real_stot,m1,m2 + common/to_stot/real_stot,m1,m2 include 'coupl.inc' ! needs VECSIZE_MEMMAX (defined in vector.inc) include 'cuts.inc' @@ -309,6 +310,12 @@ subroutine set_peaks c----- c Begin Code c----- + if (dsqrt_shatmax.ne.-1)then + stot = min(real_stot, dsqrt_shatmax**2) + else + stot = real_stot + endif + iconfig = this_config c needs to be initialise to avoid segfault do i = -nexternal,-1 diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/Gridpack/gridrun b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/Gridpack/gridrun index 8c8f7d3940..01d4ab53f5 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/Gridpack/gridrun +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/Gridpack/gridrun @@ -91,7 +91,7 @@ import internal.madevent_interface as cmd_interface try: - cmd_line = cmd_interface.GridPackCmd(me_dir=root_path, nb_event=args[0], seed=args[1], gran=args[2]) + cmd_line = cmd_interface.GridPackCmd(me_dir=root_path, nb_event=args[0], seed=args[1], gran=args[2], nprocs=args[3], maxevts=args[4]) except KeyboardInterrupt: print('Quit on KeyboardInterrupt') diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/Gridpack/run.sh b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/Gridpack/run.sh index 20adf572c2..2d149f96be 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/Gridpack/run.sh +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/Gridpack/run.sh @@ -14,6 +14,18 @@ # USAGE : run [num_events] [iseed] ## ############################################################################# +function usage() { + local retcode="${1:-1}" # default return code is 1 + echo "Usage:" + echo " run.sh [options] [num events] [seed]" + echo " run.sh [options] [num events] [seed] [granularity]" + echo "Options:" + echo " -h, --help print this message and exit" + echo " -p, --parallel [num procs] number of processes to run in parallel" + echo " -m, --maxevts [num events] maximum number of unweighted events per job" + exit $retcode +} + if [[ -d ./madevent ]]; then DIR='./madevent' else @@ -32,23 +44,46 @@ export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${PWD}/madevent/lib:${PWD}/HELAS/lib # For Mac OS X export DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:${PWD}/madevent/lib:${PWD}/HELAS/lib +pos_args=() +nprocs=1 +maxevts=2500 -if [[ ($1 != "") && ("$2" != "") && ("$3" == "") ]]; then - num_events=$1 - seed=$2 - gran=1 -elif [[ ($1 != "") && ("$2" != "") && ("$3" != "") ]]; then - num_events=$1 - seed=$2 - gran=$3 -else - echo "Warning: input is not correct. script requires two arguments: NB_EVENT SEED" -fi +while [[ $# -gt 0 ]]; do + case $1 in + -h|--help) + usage 0 ;; + -p|--parallel) + nprocs="$2" && shift && shift ;; + -m|--maxevts) + maxevts="$2" && shift && shift ;; + -*) + echo "Error: Unknown option $1" && usage ;; + *) + pos_args+=("$1") && shift ;; + esac +done + +case `echo "${pos_args[@]}" | wc -w | tr -d " "` in + "2") + num_events=${pos_args[0]} + seed=${pos_args[1]} + gran=1 + ;; + "3") + num_events=${pos_args[0]} + seed=${pos_args[1]} + gran=${pos_args[2]} + ;; + *) + echo "Error: number of arguments is not correct" + usage + ;; +esac -echo "Now generating $num_events events with random seed $seed and granularity $gran" +echo "Now generating $num_events events with random seed $seed and granularity $gran using $nprocs processes" ############ RUN THE PYTHON CODE ##################### -${DIR}/bin/gridrun $num_events $seed $gran +${DIR}/bin/gridrun $num_events $seed $gran $nprocs $maxevts ######################################################## ########### POSTPROCESSING ##################### diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/banner.py b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/banner.py index 42d82818d0..022861fc31 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/banner.py +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/banner.py @@ -353,7 +353,7 @@ def modify_init_cross(self, cross, allow_zero=False): assert "init" in self cross = dict(cross) - for key in cross.keys(): + for key in list(cross.keys()): if isinstance(key, str) and key.isdigit() and int(key) not in cross: cross[int(key)] = cross[key] @@ -3318,7 +3318,6 @@ def retro_compatible_custom_fct(lines, mode=None): for i,line in enumerate(lines[:]): if search and re.search(include_pat, line): name = re.findall(include_pat, line)[0] - misc.sprint('DETECTED INCLUDE', name) if 'vector.inc' in name: search = False if 'run.inc' in name: @@ -3326,7 +3325,6 @@ def retro_compatible_custom_fct(lines, mode=None): search = False sol.append(line) if re.search(function_pat, line): - misc.sprint("DETECTED FCT") search = True return sol @@ -4201,6 +4199,7 @@ def default_setup(self): self.add_param("bwcutoff", 15.0) self.add_param("cut_decays", False, cut='d') self.add_param('dsqrt_shat',0., cut=True) + self.add_param('dsqrt_shatmax', -1, cut=True) self.add_param("nhel", 0, include=False) self.add_param("limhel", 1e-8, hidden=True, comment="threshold to determine if an helicity contributes when not MC over helicity.") #pt cut @@ -5577,6 +5576,9 @@ def default_setup(self): #technical self.add_param('folding', [1,1,1], include=False) + + #bias + self.add_param('flavour_bias',[5,1], hidden=True, comment="Example: '5,100' means that the probability to generate an event with a bottom (or anti-bottom) quark is increased by a factor 100, but the weight of those events is reduced by a factor 100. Requires that the 'event_norm' is set to 'bias'.") #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]") @@ -5790,6 +5792,17 @@ def check_validity(self): if self['mcatnlo_delta'] and not self['parton_shower'].lower() == 'pythia8': raise InvalidRunCard("MC@NLO-DELTA only possible with matching to Pythia8") + # check that the flavour_bias is consistent + if len(self['flavour_bias']) != 2: + raise InvalidRunCard("'flavour_bias' should contain exactly two numbers: the abs(PDG) of the flavour to enhance, and the enhancement multiplication factor.") + for i in self['flavour_bias']: + if i < 0: + raise InvalidRunCard("flavour and multiplication factor should be positive in the flavour_bias parameter") + if self['flavour_bias'][1] != 1 and self['event_norm'] != 'bias': + logger.warning('Non-trivial flavour enhancement factor: setting event normalisation to "bias"') + self['event_norm']='bias' + + # check that ebeam is bigger than the proton mass. for i in [1,2]: # do not for proton mass if not proton PDF (or when scan initialization) diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/check_param_card.py b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/check_param_card.py index bc785b5de6..a34705f6bc 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/check_param_card.py +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/check_param_card.py @@ -1092,11 +1092,11 @@ def write_summary(self, path, order=None, lastline=False, nbcol=20): to_print = self.cross[-1:] for info in to_print: name = info['run_name'] - bench = info['bench'] + bench = [float(x) for x in info['bench']] data = [] for k in keys: if k in info: - data.append(info[k]) + data.append(float(info[k])) else: data.append(0.) ff.write(formatting % tuple([name] + bench + data)) diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/common_run_interface.py b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/common_run_interface.py index 9ff7390cf5..541cd6294b 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/common_run_interface.py +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/common_run_interface.py @@ -750,8 +750,8 @@ def __init__(self, me_dir, options, *args, **opts): else: self.ninitial = self.proc_characteristics['ninitial'] - def make_make_all_html_results(self, folder_names = [], jobs=[]): - return sum_html.make_all_html_results(self, folder_names, jobs) + def make_make_all_html_results(self, folder_names = [], jobs=[], get_attr=None): + return sum_html.make_all_html_results(self, folder_names, jobs, get_attr) def write_RunWeb(self, me_dir): @@ -3831,7 +3831,7 @@ def store_scan_result(self): """return the information that need to be kept for the scan summary. Auto-width are automatically added.""" - return {'cross': self.results.current['cross']} + return {'cross': self.results.current['cross'], 'error': self.results.current['error']} def add_error_log_in_html(self, errortype=None): @@ -5135,10 +5135,10 @@ def init_run(self, cards): self.special_shortcut.update( {'ebeam':([float],['run_card ebeam1 %(0)s', 'run_card ebeam2 %(0)s']), 'lpp': ([int],['run_card lpp1 %(0)s', 'run_card lpp2 %(0)s' ]), - 'lhc': ([int],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), + 'lhc': ([float],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), 'lep': ([int],['run_card lpp1 0', 'run_card lpp2 0', 'run_card ebeam1 %(0)s/2', 'run_card ebeam2 %(0)s/2']), 'ilc': ([int],['run_card lpp1 0', 'run_card lpp2 0', 'run_card ebeam1 %(0)s/2', 'run_card ebeam2 %(0)s/2']), - 'lcc': ([int],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), + 'lcc': ([float],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), 'fixed_scale': ([float],['run_card fixed_fac_scale T', 'run_card fixed_ren_scale T', 'run_card scale %(0)s', 'run_card dsqrt_q2fact1 %(0)s' ,'run_card dsqrt_q2fact2 %(0)s']), 'no_parton_cut':([],['run_card nocut T']), 'cm_velocity':([float], [lambda self :self.set_CM_velocity]), @@ -6740,7 +6740,15 @@ def postcmd(self, stop, line): return ending_question - + def help_update(self): + logger.info(""" syntax: update dependent: Change the mass/width of particles which are not free parameter for the model. + update missing: add to the current param_card missing blocks/parameters. + update to_slha1: pass SLHA2 card to SLHA1 convention. (beta) + update to_slha2: pass SLHA1 card to SLHA2 convention. (beta) + update to_full [run_card] + update XXX [where XXX correspond to a hidden block of the run_card]: + supported block are %s + """, ', '.join(self.update_block)) def do_update(self, line, timer=0): @@ -6756,6 +6764,8 @@ def do_update(self, line, timer=0): logger.warning('miss an argument (dependent or missing). Please retry') return + args[0] = args[0].lower() + if args[0] == 'dependent': if not self.mother_interface: logger.warning('Failed to update dependent parameter. This might create trouble for external program (like MadSpin/shower/...)') @@ -6805,10 +6815,11 @@ def do_update(self, line, timer=0): self.modified_card.add('run') # delay writting of the run_card logger.info('add optional block %s to the run_card', args[0]) else: - self.help_update() + self.do_help('update') logger.warning('unvalid options for update command. Please retry') + def update_to_full(self, line): """ trigger via update to_full LINE""" diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/extended_cmd.py b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/extended_cmd.py index 789976beee..c321fd88e5 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/extended_cmd.py +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/extended_cmd.py @@ -1317,6 +1317,8 @@ def nice_error_handling(self, error, line): debug_file = open(self.debug_output, 'a') traceback.print_exc(file=debug_file) + if __debug__: + traceback.print_exc() if hasattr(error, 'filename'): debug_file.write("Related File: %s\n" % error.filename) # Create a nice error output @@ -1928,7 +1930,8 @@ def do_display(self, line, output=sys.stdout): for i, name in enumerate(split): try: __import__('.'.join(split[:i+1])) - exec('%s=sys.modules[\'%s\']' % (split[i], '.'.join(split[:i+1]))) + tmp = {} + exec('%s=sys.modules[\'%s\']' % (split[i], '.'.join(split[:i+1])), globals(),tmp) except ImportError: try: var = eval(args[1]) @@ -1939,7 +1942,7 @@ def do_display(self, line, output=sys.stdout): outstr += 'EXTERNAL:\n' outstr += misc.nice_representation(var, nb_space=4) else: - var = eval(args[1]) + var = eval(args[1], globals(), tmp) outstr += 'EXTERNAL:\n' outstr += misc.nice_representation(var, nb_space=4) diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/file_writers.py b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/file_writers.py index 526756129f..74ba0d195c 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/file_writers.py +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/file_writers.py @@ -140,10 +140,6 @@ def preprocess_template(self, input_lines, context={}): else: raise self.FileWriterError("%s not string" % repr(input_lines)) - # Setup the contextual environment - for contextual_variable, value in context.items(): - exec('%s=%s'%(str(contextual_variable),repr(value))) - res = [] # The variable below tracks the conditional statements structure if_stack = [] @@ -166,7 +162,7 @@ def preprocess_template(self, input_lines, context={}): # Treat an if statement elif preproc_command.group('command')=='if': try: - if_stack.append(eval(preproc_command.group('body'))==True) + if_stack.append(eval(preproc_command.group('body'), globals(), context)==True) except Exception as e: raise self.FilePreProcessingError('Could not evaluate'+\ "python expression '%s' given the context %s provided."%\ diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/files.py b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/files.py index 551b71ddb6..3061b007e7 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/files.py +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/files.py @@ -147,9 +147,14 @@ def cp(path1, path2, log=True, error=False): path2 = format_path(path2) try: shutil.copy(path1, path2) + except shutil.Error as why: + logger.debug('no cp since identical: %s', why) + return except IOError as why: import madgraph.various.misc as misc try: + if 'same file' in str(why): + return if os.path.exists(path2): path2 = os.path.join(path2, os.path.split(path1)[1]) misc.copytree(path1, path2) @@ -157,12 +162,10 @@ def cp(path1, path2, log=True, error=False): if error: raise if log: - logger.warning(why) + logger.warning("fail to cp", path1, path2, why) else: - misc.sprint("fail to cp", why) - except shutil.Error: - # idetical file - pass + misc.sprint("fail to cp",path1,path2, why) + def rm(path, log=True): """removes path, that can be a single element or a list""" diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/gen_cardhtml-pl b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/gen_cardhtml-pl index 1810c6c082..6e0e06533d 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/gen_cardhtml-pl +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/gen_cardhtml-pl @@ -137,7 +137,7 @@ until($listpos>$#incard){ print PAGE " Model: $model \n"; print PAGE " \n \n
\n"; print PAGE " \n"; - print PAGE "\"\" \n"; + print PAGE "\"\" \n"; print PAGE "
\n"; print PAGE " \n \n \n"; print PAGE " \n"; diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/gen_crossxhtml.py b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/gen_crossxhtml.py index 681bf9d09b..3114a4350c 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/gen_crossxhtml.py +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/gen_crossxhtml.py @@ -133,7 +133,7 @@ class AllResults(dict): web = False - _run_entries = ['cross', 'error','nb_event_pythia','run_mode','run_statistics', + _run_entries = ['cross', 'error','axsec','nb_event_pythia','run_mode','run_statistics', 'nb_event','cross_pythia','error_pythia', 'nb_event_pythia8','cross_pythia8','error_pythia8', 'shower_dir'] diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/gen_jpeg-pl b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/gen_jpeg-pl index 87d03da394..31b7e9fe55 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/gen_jpeg-pl +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/gen_jpeg-pl @@ -1,16 +1,16 @@ #!/usr/bin/perl -w #--------------------------------------------------------------------- -# Run GS to create jpeg files defined as $gs +# Run GS to create PNG files defined as $gs #--------------------------------------------------------------------- -system("/bin/bash -c \"rm -f matrix*.jpg\" "); +system("/bin/bash -c \"rm -f matrix*.png\" "); $imatrix = ""; if (! -e "matrix.ps") {$imatrix = 1;} -$max_jpg = 2; -if ($imatrix eq "") {$max_jpg = 5;} -# add 1 to max_jpg, to get max_jpg pages -$max_jpg += 1; +$max_png = 2; +if ($imatrix eq "") {$max_png = 5;} +# add 1 to max_png, to get max_png pages +$max_png += 1; open(PAGE,"> diagrams.html") || die "Error creating diagrams.html"; print PAGE "\ \n"; print PAGE "\ \n"; @@ -21,22 +21,22 @@ while ( -e "matrix$imatrix.ps"){ open(IN, "< matrix$imatrix.ps") || die "No file matrix$imatrix.ps"; open(OUT, "> matrix-1.ps") || die "Could not open file matrix-1.ps"; while () { - if ($_ =~ m/^%%Page: $max_jpg $max_jpg/) {last;} + if ($_ =~ m/^%%Page: $max_png $max_png/) {last;} else {print OUT $_, "\n";} } close(OUT); close(IN); - system "/bin/bash -c \"nice gs \-sDEVICE\=jpeg \-sOutputFile\=matrix$imatrix\%00d.jpg \-q \-dNOPAUSE \-dBATCH matrix-1.ps > /dev/null\""; + system "/bin/bash -c \"nice gs \-sDEVICE\=pngmono \-r150 \-sOutputFile\=matrix$imatrix\%00d.png \-q \-dNOPAUSE \-dBATCH matrix-1.ps > /dev/null\""; system "rm -f matrix-1.ps"; -# Determine how many jpg files we have +# Determine how many png files we have $pages=1; - while(-e "matrix$imatrix$pages.jpg"){ + while(-e "matrix$imatrix$pages.png"){ $pages++; }#end of while #reduce it by one - if ($pages > $max_jpg){ + if ($pages > $max_png){ $pages -= 1; } # Find name of process @@ -45,24 +45,24 @@ while ( -e "matrix$imatrix.ps"){ if ($proc =~ /Process: (.+?)(\s\w+=\d+)*$/) { $proc = $1; } print PAGE "

To save bandwidth not all diagrams were converted to jpeg."; + if (-e "matrix$imatrix$max_png.png" ) { + print PAGE "

To save bandwidth not all diagrams were converted to PNG."; print PAGE "

To view all diagrams click on "; print PAGE "\ postscript. \<\/A\> \ \n"; # # Delete files which aren't included in diagrams.html # - system ("/bin/bash -c \"rm -f matrix$max_jpg.jpg\" "); + system ("/bin/bash -c \"rm -f matrix$max_png.png\" "); } # -# Now create jpeg file for card +# Now create PNG file for card # - if (! -e "../../HTML/card.jpg") { + if (! -e "../../HTML/card.png") { system ("/bin/bash -c \"head -352 matrix$imatrix.ps >& junk.ps\" "); open(JUNK,">> junk.ps") || die "Error opening junk.ps"; @@ -72,7 +72,7 @@ while ( -e "matrix$imatrix.ps"){ system ("/bin/bash -c \"cat matrix$imatrix.ps | sed 1,352d >> junk.ps\" "); - system "/bin/bash -c \"nice gs \-sDEVICE\=jpeg \-sOutputFile\=card.jpg \-q \-dNOPAUSE \-dBATCH \-g180x150 ./junk.ps; rm -f junk.ps; cp -p card.jpg ../../HTML/card.jpg > /dev/null\" "; + system "/bin/bash -c \"nice gs \-sDEVICE\=pngmono \-sOutputFile\=card.png \-q \-dNOPAUSE \-dBATCH \-g180x150 ./junk.ps; rm -f junk.ps; cp -p card.png ../../HTML/card.png > /dev/null\" "; } if ($imatrix eq "") {$imatrix = 0;} $imatrix = $imatrix + 1; @@ -82,3 +82,4 @@ print PAGE "\n"; print PAGE "\<\/BODY\> \n"; print PAGE "\<\/HTML\> \n"; close(PAGE); + diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/gen_ximprove.py b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/gen_ximprove.py index 415ecc9de0..d5d7fc8faf 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/gen_ximprove.py +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/gen_ximprove.py @@ -30,6 +30,7 @@ import stat import sys import six +import time from six.moves import range from six.moves import zip @@ -304,6 +305,7 @@ def get_helicity(self, to_submit=True, clean=True): logger.debug('(%s) nb_hel: %s zero amp: %s bad_amps_hel: %s/%s', split_file[-1], len(good_hels),len(bad_amps),len(bad_amps_perhel), len(good_hels)*nb_amp ) if len(good_hels) == 1: files.cp(matrix_file, matrix_file.replace('orig','optim')) + files.cp(matrix_file.replace('.f','.o'), matrix_file.replace('orig','optim').replace('.f','.o')) continue # avoid optimization if onlye one helicity gauge = self.cmd.proc_characteristics['gauge'] @@ -1059,6 +1061,7 @@ def __init__(self, cmd, opt=None): # parameter for the gridpack run self.nreq = 2000 self.iseed = 4321 + self.maxevts = 2500 # placeholder for information self.results = 0 #updated in launch/update_html @@ -1200,6 +1203,10 @@ def reset_multijob(self): def write_multijob(self, Channel, nb_split): """ """ if nb_split <=1: + try: + os.remove(pjoin(self.me_dir, 'SubProcesses', Channel.get('name'), 'multijob.dat')) + except OSError: + pass return f = open(pjoin(self.me_dir, 'SubProcesses', Channel.get('name'), 'multijob.dat'), 'w') f.write('%i\n' % nb_split) @@ -1828,17 +1835,17 @@ class gen_ximprove_gridpack(gen_ximprove_v4): 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 gen_events_security = 1.00 - def __new__(cls, *args, **opts): + def __new__(cls, cmd, opts): cls.force_class = 'gridpack' - return super(gen_ximprove_gridpack, cls).__new__(cls, *args, **opts) + return super(gen_ximprove_gridpack, cls).__new__(cls, cmd, opts) - def __init__(self, *args, **opts): + def __init__(self, cmd, opts): self.ngran = -1 + self.nprocs = 1 self.gscalefact = {} self.readonly = False if 'ngran' in opts: @@ -1846,9 +1853,18 @@ def __init__(self, *args, **opts): # del opts['ngran'] if 'readonly' in opts: self.readonly = opts['readonly'] - super(gen_ximprove_gridpack,self).__init__(*args, **opts) + if 'nprocs' in opts: + self.nprocs = int(opts['nprocs']) + if 'maxevts' in opts and self.nprocs > 1: + self.max_request_event = int(opts['maxevts']) + super(gen_ximprove_gridpack,self).__init__(cmd, opts) if self.ngran == -1: self.ngran = 1 + + if self.nprocs > 1: + self.combining_job = 0 + else: + self.combining_job = sys.maxsize def find_job_for_event(self): """return the list of channel that need to be improved""" @@ -1876,8 +1892,8 @@ def find_job_for_event(self): continue # no event to generate events self.gscalefact[tag] = max(1, 1/(goal_lum * C.get('axsec')/ self.ngran)) #need to generate events - logger.debug('request events for ', C.get('name'), 'cross=', - C.get('axsec'), 'needed events = ', goal_lum * C.get('axsec')) + logger.debug('request events for %s cross=%d needed events = %d', + C.get('name'), C.get('axsec'), goal_lum * C.get('axsec')) to_refine.append(C) logger.info('need to improve %s channels' % len(to_refine)) @@ -1897,8 +1913,13 @@ def get_job_for_event(self): 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 - + nb_split = int(max(1,((needed_event-1)// self.max_request_event) +1)) + if not self.split_channels: + nb_split = 1 + if nb_split > self.max_splitting: + 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')) @@ -1908,13 +1929,16 @@ def get_job_for_event(self): nevents = self.max_event_in_iter if nevents < self.min_event_in_iter: + nb_split = int(nb_split * nevents / self.min_event_in_iter) + 1 # sr dangerous? nevents = self.min_event_in_iter # # 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) - + # write the multi-job information + self.write_multijob(C, nb_split) + #create the info dict assume no splitting for the default info = {'name': self.cmd.results.current['run_name'], 'script_name': 'unknown', @@ -1925,7 +1949,7 @@ def get_job_for_event(self): 'nevents': nevents, #int(nevents*self.gen_events_security)+1, 'maxiter': self.max_iter, 'miniter': self.min_iter, - 'precision': -1*int(needed_event)/C.get('axsec'), + 'precision': -goal_lum/nb_split, # -1*int(needed_event)/C.get('axsec'), 'requested_event': needed_event, 'nhel': self.run_card['nhel'], 'channel': C.name.replace('G',''), @@ -1938,27 +1962,59 @@ def get_job_for_event(self): basedir = pjoin(os.path.dirname(__file__), '..','..','SubProcesses', info['P_dir'], info['directory']) info['base_directory'] = basedir - jobs.append(info) - + if nb_split == 1: + jobs.append(info) + else: + for i in range(nb_split): + new_info = dict(info) + new_info['offset'] = i+1 + new_info['directory'] += self.alphabet[i % 26] + str((i+1)//26) + new_info['base_directory'] = info['directory'] + jobs.append(new_info) write_dir = '.' if self.readonly else None self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), jobs, write_dir) + if self.nprocs > 1: + nprocs_cluster = cluster.MultiCore(nb_core=self.nprocs) + gridpack_start = time.time() + def gridpack_wait_monitoring(Idle, Running, Done): + if Idle+Running+Done == 0: + return + logger.info("Gridpack event generation: %s Idle, %s Running, %s Done [%s]" + % (Idle, Running, Done, misc.format_time(time.time()-gridpack_start))) + done = [] for j in jobs: - if j['P_dir'] in done: - continue - done.append(j['P_dir']) + if self.nprocs == 1: + if j['P_dir'] in done: + continue + done.append(j['P_dir']) + # Give a little status. Sometimes these jobs run very long, and having hours without any + # console output can be a bit frightening and make users think we are looping. + if len(done)%5==0: + logger.info(f"Working on job {len(done)} of {len(jobs)}") + # set the working directory path. pwd = pjoin(os.getcwd(),j['P_dir']) if self.readonly else pjoin(self.me_dir, 'SubProcesses', j['P_dir']) - exe = pjoin(pwd, 'ajob1') + exe = pjoin(pwd, j['script_name']) st = os.stat(exe) os.chmod(exe, st.st_mode | stat.S_IEXEC) # run the code\ - cluster.onecore.launch_and_wait(exe, cwd=pwd, packet_member=j['packet']) + if self.nprocs == 1: + cluster.onecore.launch_and_wait(exe, cwd=pwd, packet_member=j['packet']) + else: + nprocs_cluster.cluster_submit(exe, cwd=pwd, packet_member=j['packet']) write_dir = '.' if self.readonly else pjoin(self.me_dir, 'SubProcesses') + if self.nprocs > 1: + nprocs_cluster.wait(self.me_dir, gridpack_wait_monitoring) + + if self.readonly: + combine_runs.CombineRuns(write_dir) + else: + combine_runs.CombineRuns(self.me_dir) self.check_events(goal_lum, to_refine, jobs, write_dir) def check_events(self, goal_lum, to_refine, jobs, Sdir): diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/hel_recycle.py b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/hel_recycle.py index 1471de4bcb..978ba6575e 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/hel_recycle.py +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/hel_recycle.py @@ -550,7 +550,7 @@ def get_jamp_lines(self, line): def get_amp2_lines(self, line): if line.startswith(' DO I = 1, NCOLOR'): self.in_amp2 = False - elif not line.isspace(): + elif not line.isspace() and 'DENOM' not in line: self.template_dict['amp2_lines'] += f'{line[0:6]} {self.add_indices(line[6:])}' def prepare_bools(self): diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/histograms.py b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/histograms.py index 51ae2914fc..d68c560806 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/histograms.py +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/histograms.py @@ -1149,11 +1149,8 @@ def parse_one_histo_from_stream(self, stream, all_weight_header, boundaries = [0.0,0.0] for j, weight in \ enumerate(HwU.histo_bin_weight_re.finditer(line_bin)): - if (j == len(weight_header)): - continue - if j == len(all_weight_header): - raise HwU.ParseError("There is more bin weights"+\ - " specified than expected (%i)"%len(weight_header)) + #if (j == len(weight_header)): + # continue if selected_central_weight == all_weight_header[j]: bin_weights['central'] = float(weight.group('weight')) if all_weight_header[j] == 'boundary_xmin': @@ -2480,14 +2477,14 @@ def get_main_central_plot_lines(HwU_name, block_position, color_index, # return [template_no_stat%rep_dic]+\ # ([template%rep_dic] if show_mc_uncertainties else []) - # The use of sqrt(-1) is just a trick to prevent the line to display + # The use of 1/0 is just a trick to prevent the line to display res = [] - rep_dic['data'] = '($3 < 0 ? sqrt(-1) : $3)' + rep_dic['data'] = '($3 < 0 ? 1/0 : $3)' res.append(template_no_stat%rep_dic) rep_dic['title'] = " title ''" if show_mc_uncertainties: res.append(template%rep_dic) - rep_dic['data'] = '($3 >= 0 ? sqrt(-1) : abs($3))' + rep_dic['data'] = '($3 >= 0 ? 1/0 : abs($3))' rep_dic['ls'] = ' ls %d'%(100+color_index) res.append(template_no_stat%rep_dic) if show_mc_uncertainties: @@ -2739,13 +2736,13 @@ def ratio_no_correlations(wgtsA, wgtsB): """#-- rendering subhistograms '%(subhistogram_type)s' %(unset label)s %(set_format_y)s +%(set_yscale)s set yrange [%(ymin).4e:%(ymax).4e] set origin %(origin_x).4e, %(origin_y).4e set size %(size_x).4e, %(size_y).4e set mytics %(mytics)d %(set_ytics)s %(set_format_x)s -%(set_yscale)s %(set_ylabel)s %(set_histo_label)s plot \\""" @@ -2878,7 +2875,7 @@ def ratio_no_correlations(wgtsA, wgtsB): # We decide to show uncertainties in the main plot only if they # are part of a monocolor band. Otherwise, they will only be - # shown in the first subplot. Notice that plotting 'sqrt(-1)' + # shown in the first subplot. Notice that plotting '1/0' # is just a trick so as to have only the key printed with no # line @@ -2890,7 +2887,7 @@ def ratio_no_correlations(wgtsA, wgtsB): '%s, scale variation'%title, band='scale' in use_band) else: uncertainty_plot_lines[-1]['scale'] = \ - ["sqrt(-1) ls %d title '%s'"%(color_index+10,'%s, scale variation'%title)] + ["1/0 ls %d title '%s'"%(color_index+10,'%s, scale variation'%title)] # And now PDF_variation if available if not PDF_var_pos is None and len(PDF_var_pos)>0: if 'pdf' in use_band: @@ -2899,7 +2896,7 @@ def ratio_no_correlations(wgtsA, wgtsB): '%s, PDF variation'%title, band='pdf' in use_band) else: uncertainty_plot_lines[-1]['pdf'] = \ - ["sqrt(-1) ls %d title '%s'"%(color_index+20,'%s, PDF variation'%title)] + ["1/0 ls %d title '%s'"%(color_index+20,'%s, PDF variation'%title)] # And now merging variation if available if not merging_var_pos is None and len(merging_var_pos)>0: if 'merging_scale' in use_band: @@ -2908,7 +2905,7 @@ def ratio_no_correlations(wgtsA, wgtsB): '%s, merging scale variation'%title, band='merging_scale' in use_band) else: uncertainty_plot_lines[-1]['merging_scale'] = \ - ["sqrt(-1) ls %d title '%s'"%(color_index+30,'%s, merging scale variation'%title)] + ["1/0 ls %d title '%s'"%(color_index+30,'%s, merging scale variation'%title)] # And now alpsfact variation if available if not alpsfact_var_pos is None and len(alpsfact_var_pos)>0: if 'alpsfact' in use_band: @@ -2917,7 +2914,7 @@ def ratio_no_correlations(wgtsA, wgtsB): '%s, alpsfact variation'%title, band='alpsfact' in use_band) else: uncertainty_plot_lines[-1]['alpsfact'] = \ - ["sqrt(-1) ls %d title '%s'"%(color_index+40,'%s, alpsfact variation'%title)] + ["1/0 ls %d title '%s'"%(color_index+40,'%s, alpsfact variation'%title)] # plot_lines.append( # "'%s' index %d using (($1+$2)/2):3 ls %d title '%s'"\ diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/launch_plugin.py b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/launch_plugin.py index 0924927785..ba08c10340 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/launch_plugin.py +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/launch_plugin.py @@ -33,7 +33,7 @@ def compile(self, *args, **opts): if 'cwd' in opts and os.path.basename(opts['cwd']) == 'Source': path = pjoin(opts['cwd'], 'make_opts') common_run_interface.CommonRunCmd.update_make_opts_full(path, - {'FPTYPE': self.run_card['floating_type'] }) + {'override FPTYPE': self.run_card['floating_type'] }) misc.sprint('FPTYPE checked') cudacpp_supported_backends = [ 'fortran', 'cuda', 'hip', 'cpp', 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z', 'cppauto' ] if args and args[0][0] == 'madevent' and hasattr(self, 'run_card'): @@ -76,7 +76,7 @@ def reset_makeopts(self, old_value, new_value, name): if not hasattr(self, 'path'): raise Exception if name == 'floating_type': - common_run_interface.CommonRunCmd.update_make_opts_full({'FPTYPE': new_value}) + common_run_interface.CommonRunCmd.update_make_opts_full({'override FPTYPE': new_value}) else: raise Exception Sourcedir = pjoin(os.path.dirname(os.path.dirname(self.path)), 'Source') diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/lhe_parser.py b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/lhe_parser.py index f6e47956cd..76ded329c0 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/lhe_parser.py +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/lhe_parser.py @@ -2953,8 +2953,8 @@ def pt(self): @property def pseudorapidity(self): - norm = math.sqrt(self.px**2 + self.py**2+self.pz**2) - return 0.5* math.log((norm - self.pz) / (norm + self.pz)) + norm = math.sqrt(self.px**2 + self.py**2 + self.pz**2) + return 0.5* math.log((norm + self.pz) / (norm - self.pz)) @property def rapidity(self): diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/madevent_interface.py b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/madevent_interface.py index 85e5bcf5e3..2852f1d4d8 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/madevent_interface.py +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/madevent_interface.py @@ -1171,10 +1171,10 @@ def check_survey(self, args, cmd='survey'): for opt,value in self._survey_options.items(): if arg.startswith('--%s=' % opt): exec('self.opts[\'%s\'] = %s(arg.split(\'=\')[-1])' % \ - (opt, value[0])) + (opt, value[0]), globals(), {'self':self, 'arg':arg}) arg = "" if arg != "": raise Exception - except Exception: + except Exception as error: self.help_survey() raise self.InvalidCmd('invalid %s argument'% arg) @@ -3656,9 +3656,11 @@ def do_refine(self, line): else: self.refine_mode = "new" - cross, error = self.make_make_all_html_results() + cross, error, across = self.make_make_all_html_results(get_attr=('xsec','xerru','axsec')) + self.results.add_detail('cross', cross) self.results.add_detail('error', error) + self.results.add_detail('axsec', across) self.results.add_detail('run_statistics', dict(self.results.get_detail('run_statistics'))) @@ -3786,7 +3788,7 @@ def split(a, n): for i, local_G in enumerate(split(Gdirs, nb_chunk)): line = [pjoin(self.me_dir, "Events", self.run_name, "partials%d.lhe.gz" % i)] line.append(pjoin(self.me_dir, 'Events', self.run_name, '%s_%s_banner.txt' % (self.run_name, tag))) - line.append(str(self.results.current['cross'])) + line.append(str(self.results.current.get('axsec'))) line += local_G partials_info.append(self.do_combine_events_partial(' '.join(line), preprocess_only=True)) mycluster.submit(sys.executable, @@ -6749,7 +6751,7 @@ def get_subP_ids(path): class GridPackCmd(MadEventCmd): """The command for the gridpack --Those are not suppose to be use interactively--""" - def __init__(self, me_dir = None, nb_event=0, seed=0, gran=-1, *completekey, **stdin): + def __init__(self, me_dir = None, nb_event=0, seed=0, gran=-1, nprocs=1, maxevts=2500, *completekey, **stdin): """Initialize the command and directly run""" # Initialize properly @@ -6759,6 +6761,8 @@ 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.nprocs = nprocs + self.maxevts = maxevts self.options['automatic_html_opening'] = False #write the grid_card.dat on disk @@ -6874,7 +6878,7 @@ def launch(self, nb_event, seed): #misc.call([pjoin(self.me_dir,'bin','refine4grid'), # str(nb_event), '0', 'Madevent','1','GridRun_%s' % seed], # cwd=self.me_dir) - self.refine4grid(nb_event) + self.gridpack_cross = self.refine4grid(nb_event) # 3) Combine the events/pythia/... self.exec_cmd('combine_events') @@ -6902,6 +6906,8 @@ def refine4grid(self, nb_event): precision = nb_event + across= self.make_make_all_html_results(get_attr='axsec') + self.opts = dict([(key,value[1]) for (key,value) in \ self._survey_options.items()]) @@ -6915,8 +6921,9 @@ def refine4grid(self, nb_event): 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} + refine_opt = {'err_goal': nb_event, 'split_channels': True, + 'ngran':self.granularity, 'readonly': self.readonly, + 'nprocs': self.nprocs, 'maxevts': self.maxevts} 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 @@ -6926,7 +6933,7 @@ def refine4grid(self, nb_event): #print 'run combine!!!' #combine_runs.CombineRuns(self.me_dir) - return + return across #update html output Presults = sum_html.collect_result(self) cross, error = Presults.xsec, Presults.xerru @@ -7051,10 +7058,14 @@ def do_combine_events(self, line): sum_axsec += result.get('axsec')*gscalefact[Gdir] if len(AllEvent) >= 80: #perform a partial unweighting - if self.results.current['cross'] == 0 and self.run_card['gridpack']: - nb_event= self.nb_event + if not self.results.current.get('axsec'): + if self.run_card['gridpack'] and self.gridpack_cross: + nb_event = min(abs(1.05*self.nb_event*sum_axsec/self.gridpack_cross),self.nb_event) + else: + nb_event= self.nb_event else: - nb_event = min(abs(1.01*self.nb_event*sum_axsec/self.results.current['cross']),self.run_card['nevents']) + nb_event = min(abs(1.01*self.nb_event*sum_axsec/self.results.current.get('axsec')),self.run_card['nevents'], self.nb_event, self.gridpack_cross, sum_axsec) + misc.sprint(nb_event, self.results.current.get('axsec'), self.gridpack_cross) AllEvent.unweight(pjoin(outdir, self.run_name, "partials%s.lhe.gz" % partials), get_wgt, log_level=5, trunc_error=1e-2, event_target=nb_event) AllEvent = lhe_parser.MultiEventFile() @@ -7068,6 +7079,7 @@ def do_combine_events(self, line): for data in partials_info: AllEvent.add(*data) + sum_xsec += data[1] if not hasattr(self,'proc_characteristic'): self.proc_characteristic = self.get_characteristics() diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/restore_data b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/restore_data index 6205bb9567..407ed7aa91 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/restore_data +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/restore_data @@ -48,8 +48,17 @@ for i in `cat subproc.mg` ; do cd ../ done +# check if we are on a Mac, otherwise assume Linux +if [[ "$OSTYPE" == "darwin"* ]]; then + # no nproc on Mac, so use sysctl instead + # use -S1024 because there is a limit on the length of the command + xargs_opts="-P $(sysctl -n hw.ncpu) -S1024" +else + xargs_opts="-P $(nproc --all)" +fi + find . -mindepth 2 -maxdepth 2 -type d -name 'G*' -print0 \ - | xargs --null -P "$(nproc --all)" -I{} bash -c " + | xargs --null ${xargs_opts} -I{} bash -c " cd {} for j in $1_results.dat ; do if [[ -e \$j ]] ; then diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/sum_html.py b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/sum_html.py index 9dd5826f71..fb8dd3a74a 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/sum_html.py +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/sum_html.py @@ -770,7 +770,7 @@ def collect_result(cmd, folder_names=[], jobs=None, main_dir=None): return all -def make_all_html_results(cmd, folder_names = [], jobs=[]): +def make_all_html_results(cmd, folder_names = [], jobs=[], get_attr=None): """ folder_names and jobs have been added for the amcatnlo runs """ run = cmd.results.current['run_name'] if not os.path.exists(pjoin(cmd.me_dir, 'HTML', run)): @@ -794,7 +794,12 @@ def make_all_html_results(cmd, folder_names = [], jobs=[]): fsock.write('%s

' % Presults.get_html(run, unit, cmd.me_dir)) fsock.write('%s
' % P_text) - return Presults.xsec, Presults.xerru + if not get_attr: + return Presults.xsec, Presults.xerru + else: + if isinstance(get_attr, tuple): + return [getattr(Presults, _) for _ in get_attr] + return getattr(Presults, get_attr) diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/ufomodel/write_param_card.py b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/ufomodel/write_param_card.py index 57a85b0614..33a89259f8 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/ufomodel/write_param_card.py +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/ufomodel/write_param_card.py @@ -116,9 +116,10 @@ def write_param(self, param, lhablock): def write_dep_param_block(self, lhablock): import cmath from parameters import all_parameters + param_values = {'cmath':cmath} for parameter in all_parameters: try: - exec("%s = %s" % (parameter.name, parameter.value)) + exec("%s = %s" % (parameter.name, parameter.value), globals(), param_values) except Exception: pass text = "## Not dependent paramater.\n" @@ -134,7 +135,7 @@ def write_dep_param_block(self, lhablock): prefix = "DECAY " for part, param in data: if isinstance(param.value, str): - value = complex(eval(param.value)).real + value = complex(eval(param.value, globals(), param_values)).real else: value = param.value diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/bin/madevent b/epochX/cudacpp/smeft_gg_tttt.mad/bin/madevent index dff9711b73..9c5363e682 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/madevent +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/madevent @@ -178,6 +178,17 @@ force_run = False if (args and args[0] == 'treatcards'): force_run=True + +# check that madgraph is not in PYTHONPATH +try: + import madgraph +except ImportError: + pass +else: + logger.getLogger('madgraph').error('Looks like you do have madgraph in your PYTHONPATH (or you run this executable from the main MG5aMC directory). This executable will likely not work in such case.') + + + # Call the cmd interface main loop try: if '-h' in args or '--help' in args: diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/src/HelAmps_SMEFTsim_topU3l_MwScheme_UFO.h b/epochX/cudacpp/smeft_gg_tttt.mad/src/HelAmps_SMEFTsim_topU3l_MwScheme_UFO.h index 98fc59d3ea..5d28898a46 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/src/HelAmps_SMEFTsim_topU3l_MwScheme_UFO.h +++ b/epochX/cudacpp/smeft_gg_tttt.mad/src/HelAmps_SMEFTsim_topU3l_MwScheme_UFO.h @@ -8,7 +8,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/src/Parameters_SMEFTsim_topU3l_MwScheme_UFO.cc b/epochX/cudacpp/smeft_gg_tttt.mad/src/Parameters_SMEFTsim_topU3l_MwScheme_UFO.cc index e394058ac8..9508cf2675 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/src/Parameters_SMEFTsim_topU3l_MwScheme_UFO.cc +++ b/epochX/cudacpp/smeft_gg_tttt.mad/src/Parameters_SMEFTsim_topU3l_MwScheme_UFO.cc @@ -7,7 +7,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/src/Parameters_SMEFTsim_topU3l_MwScheme_UFO.h b/epochX/cudacpp/smeft_gg_tttt.mad/src/Parameters_SMEFTsim_topU3l_MwScheme_UFO.h index 6d053c0d16..42aa13c6b6 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/src/Parameters_SMEFTsim_topU3l_MwScheme_UFO.h +++ b/epochX/cudacpp/smeft_gg_tttt.mad/src/Parameters_SMEFTsim_topU3l_MwScheme_UFO.h @@ -7,7 +7,7 @@ // Further modified by: A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/smeft_gg_tttt.sa/CODEGEN_cudacpp_smeft_gg_tttt_log.txt b/epochX/cudacpp/smeft_gg_tttt.sa/CODEGEN_cudacpp_smeft_gg_tttt_log.txt index 5444229389..595d436617 100644 --- a/epochX/cudacpp/smeft_gg_tttt.sa/CODEGEN_cudacpp_smeft_gg_tttt_log.txt +++ b/epochX/cudacpp/smeft_gg_tttt.sa/CODEGEN_cudacpp_smeft_gg_tttt_log.txt @@ -1,8 +1,11 @@ +WARNING:root:python3.12 support is still experimental. For the moment re-weighting is NOT working and do expect a LOT of syntax warning. We do not advise python3.12 for production for the moment. +Running MG5 in debug mode +Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT +Plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT has marked as NOT being validated with this version: 3.6.2. +It has been validated for the last time with version: 3.6.0 Note that this is a development version. This version is intended for development/beta testing and NOT for production. This version has not been fully tested (if at all) and might have limited user support (if at all) -Running MG5 in debug mode -Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT ************************************************************ * * * W E L C O M E to * @@ -15,7 +18,7 @@ Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT * * * * * * * * * * * * -* VERSION 3.6.0 2024-09-30 * +* VERSION 3.6.2 2025-03-19 * * * * WARNING: UNKNOWN DEVELOPMENT VERSION. * * WARNING: DO NOT USE FOR PRODUCTION * @@ -46,17 +49,16 @@ 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/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_smeft_gg_tttt.mg +import /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_smeft_gg_tttt.mg The import format was not given, so we guess it as command set stdout_level DEBUG set output information to level: 10 set zerowidth_tchannel F set auto_convert_model T save options auto_convert_model -save configuration file to /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +save configuration file to /shared/roiser/sw/madgraph4gpu/MG5aMC/mg5amcnlo/input/mg5_configuration.txt import model SMEFTsim_topU3l_MwScheme_UFO -massless_4t INFO: load particles INFO: load vertices @@ -73,7 +75,7 @@ INFO: load vertices DEBUG: MG5 converter defines FFFF26 to Gamma(-2,-4,-3)*Gamma(-2,2,-6)*Gamma(-1,-6,-5)*Gamma(-1,4,-4)*ProjP(-5,1)*ProjP(-3,3) + Gamma(-2,-4,-3)*Gamma(-2,4,-6)*Gamma(-1,-6,-5)*Gamma(-1,2,-4)*ProjP(-5,3)*ProjP(-3,1) + Gamma(-2,-4,-3)*Gamma(-2,2,-6)*Gamma(-1,-6,-5)*Gamma(-1,4,-4)*ProjM(-5,1)*ProjM(-3,3) + Gamma(-2,-4,-3)*Gamma(-2,4,-6)*Gamma(-1,-6,-5)*Gamma(-1,2,-4)*ProjM(-5,3)*ProjM(-3,1)  DEBUG: MG5 converter defines FFFF27 to ProjP(2,1)*ProjP(4,3) + ProjM(2,1)*ProjM(4,3)  DEBUG: MG5 converter defines FFFF112 to ProjM(2,3)*ProjM(4,1) + ProjP(2,3)*ProjP(4,1)  -DEBUG: model prefixing takes 0.12831377983093262  +DEBUG: model prefixing takes 0.034125328063964844  INFO: Change particles name to pass to MG5 convention Defined multiparticle p = g u c d s u~ c~ d~ s~ Defined multiparticle j = g u c d s u~ c~ d~ s~ @@ -88,13 +90,13 @@ INFO: Please specify coupling orders to bypass this step. INFO: Trying coupling order WEIGHTED<=4: WEIGTHED IS QCD+2*QED+99*SMHLOOP+99*NP+99*NPshifts+99*NPprop+99*NPcpv+NPcbb+NPcbB+NPcbBB+NPcbd1+NPcbd8+NPcbe+NPcbG+NPcbH+NPcbj1+NPcbj8+NPcbl+NPcbu1+NPcbu8+NPcbW+NPcdB+NPcdd1+NPcdd8+NPcdG+NPcdH+NPcdW+NPceB+NPced+NPcee+NPceH+NPceu+NPceW+NPcG+NPcGtil+NPcH+NPcHB+NPcHbox+NPcHbq+NPcHBtil+NPcHd+NPcHDD+NPcHe+NPcHG+NPcHGtil+NPcHj1+NPcHj3+NPcHl1+NPcHl3+NPcHQ1+NPcHQ3+NPcHt+NPcHtb+NPcHu+NPcHud+NPcHW+NPcHWB+NPcHWBtil+NPcHWtil+NPcjd1+NPcjd8+NPcje+NPcjj11+NPcjj18+NPcjj31+NPcjj38+NPcjQbd1+NPcjQbd8+NPcjQtu1+NPcjQtu8+NPcjtQd1+NPcjtQd8+NPcju1+NPcju8+NPcjujd1+NPcjujd11+NPcjujd8+NPcjujd81+NPcjuQb1+NPcjuQb8+NPcld+NPcle+NPclebQ+NPcledj+NPcleju1+NPcleju3+NPcleQt1+NPcleQt3+NPclj1+NPclj3+NPcll+NPcll1+NPclu+NPcQb1+NPcQb8+NPcQd1+NPcQd8+NPcQe+NPcQj11+NPcQj18+NPcQj31+NPcQj38+NPcQl1+NPcQl3+NPcQQ1+NPcQQ8+NPcQt1+NPcQt8+NPcQtjd1+NPcQtjd8+NPcQtQb1+NPcQtQb8+NPcQu1+NPcQu8+NPcQujb1+NPcQujb8+NPctB+NPctb1+NPctb8+NPctd1+NPctd8+NPcte+NPctG+NPctH+NPctj1+NPctj8+NPctl+NPctt+NPctu1+NPctu8+NPctW+NPcuB+NPcud1+NPcud8+NPcuG+NPcuH+NPcutbd1+NPcutbd8+NPcuu1+NPcuu8+NPcuW+NPcW+NPcWtil+NPQjujb8 INFO: Trying process: g g > t t~ t t~ WEIGHTED<=4 @1 INFO: Process has 72 diagrams -1 processes with 72 diagrams generated in 3.671 s +1 processes with 72 diagrams generated in 1.407 s Total: 1 processes with 72 diagrams output standalone_cudacpp ../TMPOUT/CODEGEN_cudacpp_smeft_gg_tttt Output will be done with PLUGIN: CUDACPP_OUTPUT DEBUG: Entering PLUGIN_ProcessExporter.__init__ (initialise the exporter) [output.py at line 171]  DEBUG: Entering PLUGIN_ProcessExporter.copy_template (initialise the directory) [output.py at line 176]  -INFO: Creating subdirectories in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_smeft_gg_tttt +INFO: Creating subdirectories in directory /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_smeft_gg_tttt INFO: Organizing processes into subprocess groups INFO: Generating Helas calls for process: g g > t t~ t t~ WEIGHTED<=4 @1 INFO: Processing color information for process: g g > t t~ t t~ @1 @@ -103,18 +105,18 @@ INFO: Processing color information for process: g g > t t~ t t~ @1 DEBUG: type(fortran_model)= [output.py at line 220]  DEBUG: type(me)= me=0 [output.py at line 221]  DEBUG: "need to link", self.to_link_in_P =  need to link ['nvtx.h', 'timer.h', 'timermap.h', 'ompnumthreads.h', 'GpuRuntime.h', 'GpuAbstraction.h', 'MemoryAccessHelpers.h', 'MemoryAccessVectors.h', 'MemoryAccessMatrixElements.h', 'MemoryAccessMomenta.h', 'MemoryAccessRandomNumbers.h', 'MemoryAccessWeights.h', 'MemoryAccessAmplitudes.h', 'MemoryAccessWavefunctions.h', 'MemoryAccessGs.h', 'MemoryAccessCouplingsFixed.h', 'MemoryAccessNumerators.h', 'MemoryAccessDenominators.h', 'MemoryAccessChannelIds.h', 'EventStatistics.h', 'CommonRandomNumbers.h', 'CrossSectionKernels.cc', 'CrossSectionKernels.h', 'MatrixElementKernels.cc', 'MatrixElementKernels.h', 'RamboSamplingKernels.cc', 'RamboSamplingKernels.h', 'RandomNumberKernels.h', 'CommonRandomNumberKernel.cc', 'CurandRandomNumberKernel.cc', 'HiprandRandomNumberKernel.cc', 'Bridge.h', 'BridgeKernels.cc', 'BridgeKernels.h', 'fbridge.cc', 'fbridge.inc', 'fsampler.cc', 'fsampler.inc', 'MadgraphTest.h', 'runTest.cc', 'testmisc.cc', 'testxxx_cc_ref.txt', 'valgrind.h', 'cudacpp.mk', 'testxxx.cc', 'MemoryBuffers.h', 'MemoryAccessCouplings.h', 'perf.py', 'profile.sh'] [output.py at line 222]  -INFO: Creating files in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_smeft_gg_tttt/SubProcesses/P1_Sigma_SMEFTsim_topU3l_MwScheme_UFO_gg_ttxttx -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_smeft_gg_tttt/SubProcesses/P1_Sigma_SMEFTsim_topU3l_MwScheme_UFO_gg_ttxttx/./CPPProcess.h -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_smeft_gg_tttt/SubProcesses/P1_Sigma_SMEFTsim_topU3l_MwScheme_UFO_gg_ttxttx/./CPPProcess.cc -INFO: Created files CPPProcess.h and CPPProcess.cc in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_smeft_gg_tttt/SubProcesses/P1_Sigma_SMEFTsim_topU3l_MwScheme_UFO_gg_ttxttx/. -Generated helas calls for 1 subprocesses (72 diagrams) in 0.186 s +INFO: Creating files in directory /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_smeft_gg_tttt/SubProcesses/P1_Sigma_SMEFTsim_topU3l_MwScheme_UFO_gg_ttxttx +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_smeft_gg_tttt/SubProcesses/P1_Sigma_SMEFTsim_topU3l_MwScheme_UFO_gg_ttxttx/./CPPProcess.h +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_smeft_gg_tttt/SubProcesses/P1_Sigma_SMEFTsim_topU3l_MwScheme_UFO_gg_ttxttx/./CPPProcess.cc +INFO: Created files CPPProcess.h and CPPProcess.cc in directory /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_smeft_gg_tttt/SubProcesses/P1_Sigma_SMEFTsim_topU3l_MwScheme_UFO_gg_ttxttx/. +Generated helas calls for 1 subprocesses (72 diagrams) in 0.094 s ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates VVV5 routines ALOHA: aloha creates FFV1 routines ALOHA: aloha creates VVVV1 routines ALOHA: aloha creates VVVV9 routines ALOHA: aloha creates VVVV10 routines -ALOHA: aloha creates 5 routines in 0.316 s +ALOHA: aloha creates 5 routines in 0.141 s VVV5 VVV5 FFV1 @@ -124,17 +126,17 @@ ALOHA: aloha creates 5 routines in 0.316 s VVVV1 VVVV9 VVVV10 -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_smeft_gg_tttt/src/./HelAmps_SMEFTsim_topU3l_MwScheme_UFO.h -INFO: Created file HelAmps_SMEFTsim_topU3l_MwScheme_UFO.h in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_smeft_gg_tttt/src/. +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_smeft_gg_tttt/src/./HelAmps_SMEFTsim_topU3l_MwScheme_UFO.h +INFO: Created file HelAmps_SMEFTsim_topU3l_MwScheme_UFO.h in directory /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_smeft_gg_tttt/src/. super_write_set_parameters_onlyfixMajorana (hardcoded=False) super_write_set_parameters_onlyfixMajorana (hardcoded=True) -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_smeft_gg_tttt/src/./Parameters_SMEFTsim_topU3l_MwScheme_UFO.h -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_smeft_gg_tttt/src/./Parameters_SMEFTsim_topU3l_MwScheme_UFO.cc +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_smeft_gg_tttt/src/./Parameters_SMEFTsim_topU3l_MwScheme_UFO.h +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_smeft_gg_tttt/src/./Parameters_SMEFTsim_topU3l_MwScheme_UFO.cc INFO: Created files Parameters_SMEFTsim_topU3l_MwScheme_UFO.h and Parameters_SMEFTsim_topU3l_MwScheme_UFO.cc in directory -INFO: /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_smeft_gg_tttt/src/. and /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_smeft_gg_tttt/src/. +INFO: /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_smeft_gg_tttt/src/. and /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_smeft_gg_tttt/src/. quit -real 0m5.073s -user 0m4.975s -sys 0m0.073s -Code generation completed in 5 seconds +real 0m3.197s +user 0m2.112s +sys 0m0.129s +Code generation completed in 3 seconds diff --git a/epochX/cudacpp/smeft_gg_tttt.sa/SubProcesses/Bridge.h b/epochX/cudacpp/smeft_gg_tttt.sa/SubProcesses/Bridge.h index 87aa648dd2..49b928db67 100644 --- a/epochX/cudacpp/smeft_gg_tttt.sa/SubProcesses/Bridge.h +++ b/epochX/cudacpp/smeft_gg_tttt.sa/SubProcesses/Bridge.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: S. Roiser (Nov 2021) for the MG5aMC CUDACPP plugin. -// Further modified by: S. Roiser, J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2021-2025) for the MG5aMC CUDACPP plugin. #ifndef BRIDGE_H #define BRIDGE_H 1 @@ -255,11 +255,15 @@ namespace mg5amcCpu throw std::logic_error( "Bridge constructor: FIXME! cannot choose gputhreads" ); // this should never happen! m_gpublocks = m_nevt / m_gputhreads; } +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Instantiate device Bridge (nevt=" << m_nevt << ", gpublocks=" << m_gpublocks << ", gputhreads=" << m_gputhreads << ", gpublocks*gputhreads=" << m_gpublocks * m_gputhreads << ")" << std::endl; +#endif m_pmek.reset( new MatrixElementKernelDevice( m_devMomentaC, m_devGs, m_devRndHel, m_devRndCol, m_devChannelIds, m_devMEs, m_devSelHel, m_devSelCol, m_gpublocks, m_gputhreads ) ); #else +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Instantiate host Bridge (nevt=" << m_nevt << ")" << std::endl; +#endif m_pmek.reset( new MatrixElementKernelHost( m_hstMomentaC, m_hstGs, m_hstRndHel, m_hstRndCol, m_hstChannelIds, m_hstMEs, m_hstSelHel, m_hstSelCol, m_nevt ) ); #endif // MGONGPUCPP_GPUIMPL // Create a process object, read param card and set parameters @@ -290,8 +294,10 @@ namespace mg5amcCpu throw std::runtime_error( "Bridge: gpublocks*gputhreads must equal m_nevt in set_gpugrid" ); m_gpublocks = gpublocks; m_gputhreads = gputhreads; +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Set grid in Bridge (nevt=" << m_nevt << ", gpublocks=" << m_gpublocks << ", gputhreads=" << m_gputhreads << ", gpublocks*gputhreads=" << m_gpublocks * m_gputhreads << ")" << std::endl; +#endif m_pmek->setGrid( m_gpublocks, m_gputhreads ); } #endif @@ -347,7 +353,9 @@ namespace mg5amcCpu if( goodHelOnly ) return; m_pmek->computeMatrixElements( useChannelIds ); copyHostFromDevice( m_hstMEs, m_devMEs ); +#ifdef MGONGPUCPP_VERBOSE flagAbnormalMEs( m_hstMEs.data(), m_nevt ); +#endif copyHostFromDevice( m_hstSelHel, m_devSelHel ); copyHostFromDevice( m_hstSelCol, m_devSelCol ); if constexpr( std::is_same_v ) @@ -400,7 +408,9 @@ namespace mg5amcCpu } if( goodHelOnly ) return; m_pmek->computeMatrixElements( useChannelIds ); +#ifdef MGONGPUCPP_VERBOSE flagAbnormalMEs( m_hstMEs.data(), m_nevt ); +#endif if constexpr( std::is_same_v ) { memcpy( mes, m_hstMEs.data(), m_hstMEs.bytes() ); diff --git a/epochX/cudacpp/smeft_gg_tttt.sa/SubProcesses/GpuRuntime.h b/epochX/cudacpp/smeft_gg_tttt.sa/SubProcesses/GpuRuntime.h index 860c7fde16..6a4b946e74 100644 --- a/epochX/cudacpp/smeft_gg_tttt.sa/SubProcesses/GpuRuntime.h +++ b/epochX/cudacpp/smeft_gg_tttt.sa/SubProcesses/GpuRuntime.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: J. Teig (Jun 2023, based on earlier work by S. Roiser) for the MG5aMC CUDACPP plugin. -// Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2025) for the MG5aMC CUDACPP plugin. #ifndef MG5AMC_GPURUNTIME_H #define MG5AMC_GPURUNTIME_H 1 @@ -50,7 +50,7 @@ namespace mg5amcGpu // Set up CUDA application // ** NB: strictly speaking this is not needed when using the CUDA runtime API ** // Calling cudaSetDevice on startup is useful to properly book-keep the time spent in CUDA initialization - static void setUp( const bool debug = true ) + static void setUp( const bool debug = false ) // ZW: changed debug default to false { // ** NB: it is useful to call cudaSetDevice, or cudaFree, to properly book-keep the time spent in CUDA initialization // ** NB: otherwise, the first CUDA operation (eg a cudaMemcpyToSymbol in CPPProcess ctor) appears to take much longer! @@ -71,7 +71,7 @@ namespace mg5amcGpu // ** NB: strictly speaking this is not needed when using the CUDA runtime API ** // Calling cudaDeviceReset on shutdown is only needed for checking memory leaks in cuda-memcheck // See https://docs.nvidia.com/cuda/cuda-memcheck/index.html#leak-checking - static void tearDown( const bool debug = true ) + static void tearDown( const bool debug = false ) // ZW: changed debug default to false { if( debug ) std::cout << "__GpuRuntime: calling GpuDeviceReset()" << std::endl; checkGpu( gpuDeviceReset() ); diff --git a/epochX/cudacpp/smeft_gg_tttt.sa/SubProcesses/MatrixElementKernels.cc b/epochX/cudacpp/smeft_gg_tttt.sa/SubProcesses/MatrixElementKernels.cc index f463977c1a..703ea3781c 100644 --- a/epochX/cudacpp/smeft_gg_tttt.sa/SubProcesses/MatrixElementKernels.cc +++ b/epochX/cudacpp/smeft_gg_tttt.sa/SubProcesses/MatrixElementKernels.cc @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: A. Valassi (Jan 2022) for the MG5aMC CUDACPP plugin. -// Further modified by: J. Teig, A. Valassi (2022-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: J. Teig, A. Valassi, Z. Wettersten (2022-2025) for the MG5aMC CUDACPP plugin. #include "MatrixElementKernels.h" @@ -60,7 +60,9 @@ namespace mg5amcCpu #ifdef MGONGPU_CHANNELID_DEBUG MatrixElementKernelBase::dumpNevtProcessedByChannel(); #endif +#ifdef MGONGPUCPP_VERBOSE MatrixElementKernelBase::dumpSignallingFPEs(); +#endif } //-------------------------------------------------------------------------- diff --git a/epochX/cudacpp/smeft_gg_tttt.sa/SubProcesses/MatrixElementKernels.h b/epochX/cudacpp/smeft_gg_tttt.sa/SubProcesses/MatrixElementKernels.h index 7acff4b308..8da04d7945 100644 --- a/epochX/cudacpp/smeft_gg_tttt.sa/SubProcesses/MatrixElementKernels.h +++ b/epochX/cudacpp/smeft_gg_tttt.sa/SubProcesses/MatrixElementKernels.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: A. Valassi (Jan 2022) for the MG5aMC CUDACPP plugin. -// Further modified by: J. Teig, A. Valassi (2022-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: J. Teig, A. Valassi, Z. Wettersten (2022-2025) for the MG5aMC CUDACPP plugin. #ifndef MATRIXELEMENTKERNELS_H #define MATRIXELEMENTKERNELS_H 1 @@ -134,7 +134,7 @@ namespace mg5amcCpu // Does this host system support the SIMD used in the matrix element calculation? // [NB: this is private, SIMD vectorization in mg5amc C++ code is currently only used in the ME calculations below MatrixElementKernelHost!] - static bool hostSupportsSIMD( const bool verbose = true ); + static bool hostSupportsSIMD( const bool verbose = false ); // ZW: default verbose false private: diff --git a/epochX/cudacpp/smeft_gg_tttt.sa/SubProcesses/MemoryAccessGs.h b/epochX/cudacpp/smeft_gg_tttt.sa/SubProcesses/MemoryAccessGs.h index 63c17a68fa..50a6aaef4d 100644 --- a/epochX/cudacpp/smeft_gg_tttt.sa/SubProcesses/MemoryAccessGs.h +++ b/epochX/cudacpp/smeft_gg_tttt.sa/SubProcesses/MemoryAccessGs.h @@ -128,6 +128,14 @@ namespace mg5amcCpu #endif } + // Locate a field (output) in a memory buffer (input) from a kernel event-indexing mechanism (internal) + // [Signature (SCALAR OR VECTOR) ===> fptype_sv* kernelAccess( fptype* buffer ) <===] + static __host__ __device__ inline fptype_sv* + kernelAccessP( fptype* buffer ) + { + return reinterpret_cast( buffer ); + } + // Locate a field (output) in a memory buffer (input) from a kernel event-indexing mechanism (internal) and the given field indexes (input) // [Signature (const, SCALAR) ===> const fptype& kernelAccessConst( const fptype* buffer ) <===] static constexpr auto kernelAccessConst_s = diff --git a/epochX/cudacpp/smeft_gg_tttt.sa/SubProcesses/MemoryBuffers.h b/epochX/cudacpp/smeft_gg_tttt.sa/SubProcesses/MemoryBuffers.h index 2f711d8cc1..517396f37e 100644 --- a/epochX/cudacpp/smeft_gg_tttt.sa/SubProcesses/MemoryBuffers.h +++ b/epochX/cudacpp/smeft_gg_tttt.sa/SubProcesses/MemoryBuffers.h @@ -13,6 +13,7 @@ #include "CPPProcess.h" #include "GpuRuntime.h" #include "Parameters_SMEFTsim_topU3l_MwScheme_UFO.h" +#include "processConfig.h" #include @@ -274,7 +275,8 @@ namespace mg5amcCpu typedef BufferBase BufferNumerators; // The size (number of elements) per event in a memory buffer for numerators - constexpr size_t sizePerEventNumerators = 1; + // (should be equal to the number of diagrams in the process) + constexpr size_t sizePerEventNumerators = processConfig::ndiagrams; #ifndef MGONGPUCPP_GPUIMPL // A class encapsulating a C++ host buffer for gs diff --git a/epochX/cudacpp/smeft_gg_tttt.sa/SubProcesses/P1_Sigma_SMEFTsim_topU3l_MwScheme_UFO_gg_ttxttx/CPPProcess.cc b/epochX/cudacpp/smeft_gg_tttt.sa/SubProcesses/P1_Sigma_SMEFTsim_topU3l_MwScheme_UFO_gg_ttxttx/CPPProcess.cc index 6a64c39915..83d82d86f0 100644 --- a/epochX/cudacpp/smeft_gg_tttt.sa/SubProcesses/P1_Sigma_SMEFTsim_topU3l_MwScheme_UFO_gg_ttxttx/CPPProcess.cc +++ b/epochX/cudacpp/smeft_gg_tttt.sa/SubProcesses/P1_Sigma_SMEFTsim_topU3l_MwScheme_UFO_gg_ttxttx/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -25,6 +25,7 @@ #include "MemoryAccessMatrixElements.h" #include "MemoryAccessMomenta.h" #include "MemoryAccessWavefunctions.h" +#include "processConfig.h" #ifdef MGONGPU_SUPPORTS_MULTICHANNEL #include "MemoryAccessDenominators.h" @@ -96,6 +97,69 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { +#ifdef MGONGPU_SUPPORTS_MULTICHANNEL + __device__ INLINE unsigned int getChannelId( const unsigned int* allChannelIds +#ifndef MGONGPUCPP_GPUIMPL + , + const int ievt00, + bool sanityCheckMixedPrecision = true +#endif + ) + { + unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr +#ifdef MGONGPUCPP_GPUIMPL + using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page + if( allChannelIds != nullptr ) + { + const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) + const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) + // NB: channelIds_sv is a scalar in CUDA + channelId = channelIds_sv; + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + } +#else // Cuda or C++ + using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + if( allChannelIds != nullptr ) + { + // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) + const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 + uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) +#ifndef MGONGPU_CPPSIMD + // NB: channelIds_sv is a scalar in no-SIMD C++ + channelId = channelIds_sv; +#else + // NB: channelIds_sv is a vector in SIMD C++ + channelId = channelIds_sv[0]; // element[0] + for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] + { + assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId + } +#endif + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + if( sanityCheckMixedPrecision ) + { +#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT + // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) + const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 + uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + for( int i = 0; i < neppV; ++i ) + { + assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector + } +#endif + } + } +#endif // MGONGPUCPP_GPUIMPL + return channelId; + } +#endif // MGONGPU_SUPPORTS_MULTICHANNEL + constexpr int nw6 = CPPProcess::nw6; // dimensions of each wavefunction (HELAS KEK 91-11): e.g. 6 for e+ e- -> mu+ mu- (fermions and vectors) constexpr int npar = CPPProcess::npar; // #particles in total (external = initial + final): e.g. 4 for e+ e- -> mu+ mu- constexpr int ncomb = CPPProcess::ncomb; // #helicity combinations: e.g. 16 for e+ e- -> mu+ mu- (2**4 = fermion spin up/down ** npar) @@ -305,7 +369,7 @@ namespace mg5amcCpu COUPs[ndcoup + iicoup] = allCOUPs[ndcoup + iicoup]; // independent couplings, fixed for all events fptype* MEs = E_ACCESS::ieventAccessRecord( allMEs, ievt0 ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); #endif #endif @@ -315,7 +379,7 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Numerators and denominators for the current event (CUDA) or SIMD event page (C++) - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); #endif @@ -1587,7 +1651,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- @@ -1959,9 +2025,6 @@ namespace mg5amcCpu #ifdef MGONGPUCPP_GPUIMPL // Remember: in CUDA this is a kernel for one event, in c++ this processes n events const int ievt = blockDim.x * blockIdx.x + threadIdx.x; // index of event (thread) in grid -#ifdef MGONGPU_SUPPORTS_MULTICHANNEL - using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events -#endif #else //assert( (size_t)(allmomenta) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] //assert( (size_t)(allMEs) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] @@ -1969,7 +2032,6 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL using NUM_ACCESS = HostAccessNumerators; // non-trivial access: buffer includes all events using DEN_ACCESS = HostAccessDenominators; // non-trivial access: buffer includes all events - using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events #endif #endif @@ -1994,11 +2056,12 @@ namespace mg5amcCpu fptype_sv& MEs_sv = E_ACCESS::kernelAccess( MEs ); MEs_sv = fptype_sv{ 0 }; #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - numerators_sv = fptype_sv{ 0 }; + for( int i = 0; i < processConfig::ndiagrams; ++i ) + numerators_sv[i] = fptype_sv{ 0 }; denominators_sv = fptype_sv{ 0 }; #endif } @@ -2011,17 +2074,7 @@ namespace mg5amcCpu // *** START OF PART 1a - CUDA (one event per GPU thread) *** #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) - const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) - // NB: channelIds_sv is a scalar in CUDA - channelId = channelIds_sv; - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) - } + unsigned int channelId = getChannelId( allChannelIds ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (for the single event processed in calculate_wavefunctions) @@ -2136,38 +2189,7 @@ namespace mg5amcCpu const int ievt00 = ipagV2 * neppV; // loop on one SIMD page (neppV events) at a time #endif #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) - const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 - uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) -#ifndef MGONGPU_CPPSIMD - // NB: channelIds_sv is a scalar in no-SIMD C++ - channelId = channelIds_sv; -#else - // NB: channelIds_sv is a vector in SIMD C++ - channelId = channelIds_sv[0]; // element[0] - for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] - { - assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId - } -#endif - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) -#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT - // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) - const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 - uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - for( int i = 0; i < neppV; ++i ) - { - assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector - } -#endif - } + unsigned int channelId = getChannelId( allChannelIds, ievt00 ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (jamp2[nParity][ncolor][neppV] for the SIMD vector - or the two SIMD vectors - of events processed in calculate_wavefunctions) @@ -2340,11 +2362,12 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( allChannelIds != nullptr ) // fix segfault #892 (not 'channelIds[0] != 0') { - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + const unsigned int channelId = getChannelId( allChannelIds, ievt0, false ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - MEs_sv *= numerators_sv / denominators_sv; + MEs_sv *= numerators_sv[channelId - 1] / denominators_sv; } #endif //for( int ieppV = 0; ieppV < neppV; ieppV++ ) diff --git a/epochX/cudacpp/smeft_gg_tttt.sa/SubProcesses/P1_Sigma_SMEFTsim_topU3l_MwScheme_UFO_gg_ttxttx/CPPProcess.h b/epochX/cudacpp/smeft_gg_tttt.sa/SubProcesses/P1_Sigma_SMEFTsim_topU3l_MwScheme_UFO_gg_ttxttx/CPPProcess.h index d207c3303f..9672910a40 100644 --- a/epochX/cudacpp/smeft_gg_tttt.sa/SubProcesses/P1_Sigma_SMEFTsim_topU3l_MwScheme_UFO_gg_ttxttx/CPPProcess.h +++ b/epochX/cudacpp/smeft_gg_tttt.sa/SubProcesses/P1_Sigma_SMEFTsim_topU3l_MwScheme_UFO_gg_ttxttx/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/smeft_gg_tttt.sa/SubProcesses/P1_Sigma_SMEFTsim_topU3l_MwScheme_UFO_gg_ttxttx/processConfig.h b/epochX/cudacpp/smeft_gg_tttt.sa/SubProcesses/P1_Sigma_SMEFTsim_topU3l_MwScheme_UFO_gg_ttxttx/processConfig.h new file mode 100644 index 0000000000..b9f07de180 --- /dev/null +++ b/epochX/cudacpp/smeft_gg_tttt.sa/SubProcesses/P1_Sigma_SMEFTsim_topU3l_MwScheme_UFO_gg_ttxttx/processConfig.h @@ -0,0 +1,16 @@ +// Copyright (C) 2025 CERN and UCLouvain. +// Licensed under the GNU Lesser General Public License (version 3 or later). +// Created by: S. Roiser (May 2025) for the MG5aMC CUDACPP plugin. +// Further modified by: ... for the MG5aMC CUDACPP plugin. + + +#ifndef MG5_CONFIG_SIGMA_SMEFTSIM_TOPU3L_MWSCHEME_UFO_GG_TTXTTX_H +#define MG5_CONFIG_SIGMA_SMEFTSIM_TOPU3L_MWSCHEME_UFO_GG_TTXTTX_H 1 + +namespace processConfig { + + constexpr int ndiagrams = 72; + +} + +#endif // MG5_CONFIG_SIGMA_SMEFTSIM_TOPU3L_MWSCHEME_UFO_GG_TTXTTX_H \ No newline at end of file diff --git a/epochX/cudacpp/smeft_gg_tttt.sa/src/HelAmps_SMEFTsim_topU3l_MwScheme_UFO.h b/epochX/cudacpp/smeft_gg_tttt.sa/src/HelAmps_SMEFTsim_topU3l_MwScheme_UFO.h index 98fc59d3ea..5d28898a46 100644 --- a/epochX/cudacpp/smeft_gg_tttt.sa/src/HelAmps_SMEFTsim_topU3l_MwScheme_UFO.h +++ b/epochX/cudacpp/smeft_gg_tttt.sa/src/HelAmps_SMEFTsim_topU3l_MwScheme_UFO.h @@ -8,7 +8,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/smeft_gg_tttt.sa/src/Parameters_SMEFTsim_topU3l_MwScheme_UFO.cc b/epochX/cudacpp/smeft_gg_tttt.sa/src/Parameters_SMEFTsim_topU3l_MwScheme_UFO.cc index e394058ac8..9508cf2675 100644 --- a/epochX/cudacpp/smeft_gg_tttt.sa/src/Parameters_SMEFTsim_topU3l_MwScheme_UFO.cc +++ b/epochX/cudacpp/smeft_gg_tttt.sa/src/Parameters_SMEFTsim_topU3l_MwScheme_UFO.cc @@ -7,7 +7,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/smeft_gg_tttt.sa/src/Parameters_SMEFTsim_topU3l_MwScheme_UFO.h b/epochX/cudacpp/smeft_gg_tttt.sa/src/Parameters_SMEFTsim_topU3l_MwScheme_UFO.h index 6d053c0d16..42aa13c6b6 100644 --- a/epochX/cudacpp/smeft_gg_tttt.sa/src/Parameters_SMEFTsim_topU3l_MwScheme_UFO.h +++ b/epochX/cudacpp/smeft_gg_tttt.sa/src/Parameters_SMEFTsim_topU3l_MwScheme_UFO.h @@ -7,7 +7,7 @@ // Further modified by: A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/CODEGEN_mad_susy_gg_t1t1_log.txt b/epochX/cudacpp/susy_gg_t1t1.mad/CODEGEN_mad_susy_gg_t1t1_log.txt index 1690ef1273..ad4ffdb55f 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/CODEGEN_mad_susy_gg_t1t1_log.txt +++ b/epochX/cudacpp/susy_gg_t1t1.mad/CODEGEN_mad_susy_gg_t1t1_log.txt @@ -1,8 +1,11 @@ +WARNING:root:python3.12 support is still experimental. For the moment re-weighting is NOT working and do expect a LOT of syntax warning. We do not advise python3.12 for production for the moment. +Running MG5 in debug mode +Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT +Plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT has marked as NOT being validated with this version: 3.6.2. +It has been validated for the last time with version: 3.6.0 Note that this is a development version. This version is intended for development/beta testing and NOT for production. This version has not been fully tested (if at all) and might have limited user support (if at all) -Running MG5 in debug mode -Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT ************************************************************ * * * W E L C O M E to * @@ -15,7 +18,7 @@ Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT * * * * * * * * * * * * -* VERSION 3.6.0 2024-09-30 * +* VERSION 3.6.2 2025-03-19 * * * * WARNING: UNKNOWN DEVELOPMENT VERSION. * * WARNING: DO NOT USE FOR PRODUCTION * @@ -46,10 +49,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 Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt -import /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1.mg +import /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1.mg The import format was not given, so we guess it as command set stdout_level DEBUG set output information to level: 10 @@ -550,21 +552,21 @@ 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 > t1 t1~ WEIGHTED<=2 @1 INFO: Process has 6 diagrams -1 processes with 6 diagrams generated in 0.124 s +1 processes with 6 diagrams generated in 0.069 s Total: 1 processes with 6 diagrams output madevent_simd ../TMPOUT/CODEGEN_mad_susy_gg_t1t1 --hel_recycling=False --vector_size=32 Output will be done with PLUGIN: CUDACPP_OUTPUT Addition matrix-element will be done with PLUGIN: CUDACPP_OUTPUT -DEBUG: opt['output_options']['vector_size'] =  32 [export_v4.py at line 4334]  +DEBUG: opt['output_options']['vector_size'] =  32 [export_v4.py at line 4166]  Output will be done with PLUGIN: CUDACPP_OUTPUT DEBUG: Entering PLUGIN_ProcessExporter.__init__ (initialise the exporter) [output.py at line 171]  INFO: initialize a new directory: CODEGEN_mad_susy_gg_t1t1 INFO: remove old information in CODEGEN_mad_susy_gg_t1t1 DEBUG: Entering PLUGIN_ProcessExporter.copy_template (initialise the directory) [output.py at line 176]  -WARNING: File exists /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1  -INFO: Creating subdirectories in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1 -WARNING: File exists /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1/Cards  -WARNING: File exists /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1/SubProcesses  +WARNING: File exists /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1  +INFO: Creating subdirectories in directory /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1 +WARNING: File exists /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1/Cards  +WARNING: File exists /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1/SubProcesses  INFO: Organizing processes into subprocess groups INFO: Generating Helas calls for process: g g > t1 t1~ WEIGHTED<=2 @1 INFO: Processing color information for process: g g > t1 t1~ @1 @@ -576,58 +578,60 @@ FileWriter t1 t1~ WEIGHTED<=2 @1 INFO: Finding symmetric diagrams for subprocess group gg_t1t1x -DEBUG: len(subproc_diagrams_for_config) =  5 [model_handling.py at line 1527]  -DEBUG: iconfig_to_diag =  {1: 2, 2: 3, 3: 4, 4: 5, 5: 6} [model_handling.py at line 1551]  -DEBUG: diag_to_iconfig =  {2: 1, 3: 2, 4: 3, 5: 4, 6: 5} [model_handling.py at line 1552]  -Generated helas calls for 1 subprocesses (6 diagrams) in 0.009 s -Wrote files for 16 helas calls in 0.082 s +DEBUG: len(subproc_diagrams_for_config) =  5 [model_handling.py at line 1538]  +DEBUG: iconfig_to_diag =  {1: 2, 2: 3, 3: 4, 4: 5, 5: 6} [model_handling.py at line 1562]  +DEBUG: diag_to_iconfig =  {2: 1, 3: 2, 4: 3, 5: 4, 6: 5} [model_handling.py at line 1563]  +Generated helas calls for 1 subprocesses (6 diagrams) in 0.006 s +Wrote files for 16 helas calls in 0.746 s ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates VVV1 set of routines with options: P0 ALOHA: aloha creates VSS1 routines ALOHA: aloha creates VVSS1 routines -ALOHA: aloha creates 3 routines in 0.186 s +ALOHA: aloha creates 3 routines in 0.086 s ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates VVV1 set of routines with options: P0 ALOHA: aloha creates VSS1 routines ALOHA: aloha creates VVSS1 routines -ALOHA: aloha creates 6 routines in 0.184 s +ALOHA: aloha creates 6 routines in 0.077 s VVV1 VSS1 VSS1 VSS1 VVSS1 -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1/src/./HelAmps_MSSM_SLHA2.h -INFO: Created file HelAmps_MSSM_SLHA2.h in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1/src/. +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1/src/./HelAmps_MSSM_SLHA2.h +INFO: Created file HelAmps_MSSM_SLHA2.h in directory /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1/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_susy_gg_t1t1/src/./Parameters_MSSM_SLHA2.h -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1/src/./Parameters_MSSM_SLHA2.cc +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1/src/./Parameters_MSSM_SLHA2.h +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1/src/./Parameters_MSSM_SLHA2.cc INFO: Created files Parameters_MSSM_SLHA2.h and Parameters_MSSM_SLHA2.cc in directory -INFO: /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1/src/. and /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1/src/. +INFO: /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1/src/. and /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1/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_susy_gg_t1t1/Cards/me5_configuration.txt +save configuration file to /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1/Cards/me5_configuration.txt INFO: Use Fortran compiler gfortran INFO: Use c++ compiler g++ INFO: Generate jpeg diagrams INFO: Generate web pages -DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1; patch -p4 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common +DEBUG: cd /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1; patch -p4 -i /shared/roiser/sw/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common patching file SubProcesses/makefile -DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1/SubProcesses/P1_gg_t1t1x; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 +DEBUG: cd /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1/SubProcesses/P1_gg_t1t1x; patch -p6 -i /shared/roiser/sw/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file driver.f patching file matrix1.f Hunk #2 succeeded at 215 (offset -12 lines). DEBUG: p.returncode =  0 [output.py at line 263]  -Output to directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1 done. +Output to directory /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1 done. Type "launch" to generate events from this process, or see -/data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1/README +/shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1/README Run "open index.html" to see more information about this process. quit -real 0m2.996s -user 0m2.690s -sys 0m0.299s -Code generation completed in 3 seconds +real 0m7.114s +user 0m1.722s +sys 0m0.685s +Code generation completed in 8 seconds +/shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1/bin/internal/banner.py:3309: SyntaxWarning: invalid escape sequence '\s' + function_pat = re.compile('^\s+(?:SUBROUTINE|(?:%(type)s)\s+function)\s+([a-zA-Z]\w*)' \ ************************************************************ * * * W E L C O M E to * @@ -640,7 +644,7 @@ Code generation completed in 3 seconds * * * * * * * * * * * * -* VERSION 3.6.0 * +* VERSION 3.6.2 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -648,10 +652,9 @@ Code generation completed in 3 seconds * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1/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_susy_gg_t1t1/Cards/me5_configuration.txt -Using default text editor "vi". Set another one in ./input/mg5_configuration.txt +INFO: load configuration from /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1/Cards/me5_configuration.txt +INFO: load configuration from /shared/roiser/sw/madgraph4gpu/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1/Cards/me5_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 @@ -670,7 +673,7 @@ launch in debug mode * * * * * * * * * * * * -* VERSION 3.6.0 * +* VERSION 3.6.2 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -678,10 +681,9 @@ launch in debug mode * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1/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_susy_gg_t1t1/Cards/me5_configuration.txt -Using default text editor "vi". Set another one in ./input/mg5_configuration.txt +INFO: load configuration from /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1/Cards/me5_configuration.txt +INFO: load configuration from /shared/roiser/sw/madgraph4gpu/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_t1t1/Cards/me5_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/susy_gg_t1t1.mad/Cards/ident_card.dat b/epochX/cudacpp/susy_gg_t1t1.mad/Cards/ident_card.dat index 9cfb7ac1a2..0c5a1bdd83 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/Cards/ident_card.dat +++ b/epochX/cudacpp/susy_gg_t1t1.mad/Cards/ident_card.dat @@ -232,9 +232,9 @@ mse2 3 3 mdl_RmE23x3 msl2 1 1 mdl_RmL21x1 msl2 3 3 mdl_RmL23x3 msoft 1 mdl_RMx1 +msoft 2 mdl_RMx2 msoft 21 mdl_mHd2 msoft 22 mdl_mHu2 -msoft 2 mdl_RMx2 msoft 3 mdl_RMx3 msq2 1 1 mdl_RmQ21x1 msq2 3 3 mdl_RmQ23x3 diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/Cards/me5_configuration.txt b/epochX/cudacpp/susy_gg_t1t1.mad/Cards/me5_configuration.txt index 68b4c46295..a0212bfb62 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/Cards/me5_configuration.txt +++ b/epochX/cudacpp/susy_gg_t1t1.mad/Cards/me5_configuration.txt @@ -235,7 +235,7 @@ # pineappl = pineappl -#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo +#mg5_path = /shared/roiser/sw/madgraph4gpu/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo +#mg5_path = /shared/roiser/sw/madgraph4gpu/MG5aMC/mg5amcnlo diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/Cards/proc_card_mg5.dat b/epochX/cudacpp/susy_gg_t1t1.mad/Cards/proc_card_mg5.dat index 9025117612..34ff9bfe0b 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/Cards/proc_card_mg5.dat +++ b/epochX/cudacpp/susy_gg_t1t1.mad/Cards/proc_card_mg5.dat @@ -8,7 +8,7 @@ #* * * * #* * #* * -#* VERSION 3.6.0 2024-09-30 * +#* VERSION 3.6.2 2025-03-19 * #* * #* WARNING: UNKNOWN DEVELOPMENT VERSION. * #* WARNING: DO NOT USE FOR PRODUCTION * diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/Cards/run_card.dat b/epochX/cudacpp/susy_gg_t1t1.mad/Cards/run_card.dat index 6b82577032..000832aacd 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/Cards/run_card.dat +++ b/epochX/cudacpp/susy_gg_t1t1.mad/Cards/run_card.dat @@ -107,6 +107,7 @@ # Parton level cuts definition * #******************************* 0.0 = dsqrt_shat ! minimal shat for full process + -1 = dsqrt_shatmax ! maximum shat for full process # # #********************************************************************* diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/Cards/run_card_default.dat b/epochX/cudacpp/susy_gg_t1t1.mad/Cards/run_card_default.dat index b8db871c35..85e1d39035 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/Cards/run_card_default.dat +++ b/epochX/cudacpp/susy_gg_t1t1.mad/Cards/run_card_default.dat @@ -107,6 +107,7 @@ # Parton level cuts definition * #******************************* 0.0 = dsqrt_shat ! minimal shat for full process + -1 = dsqrt_shatmax ! maximum shat for full process # # #********************************************************************* diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/MGMEVersion.txt b/epochX/cudacpp/susy_gg_t1t1.mad/MGMEVersion.txt index 084e244cea..77a069e39b 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/MGMEVersion.txt +++ b/epochX/cudacpp/susy_gg_t1t1.mad/MGMEVersion.txt @@ -1 +1 @@ -3.6.0 \ No newline at end of file +3.6.2 \ No newline at end of file diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/Source/alfas_functions.f b/epochX/cudacpp/susy_gg_t1t1.mad/Source/alfas_functions.f index bb69a6384e..84aeff369c 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/Source/alfas_functions.f +++ b/epochX/cudacpp/susy_gg_t1t1.mad/Source/alfas_functions.f @@ -188,6 +188,10 @@ SUBROUTINE NEWTON1(T,A_IN,A_OUT,NLOOP,NF) A_OUT=A_IN/(1D0+A_IN*B0(NF)*T) IF (NLOOP .EQ. 1) RETURN + if (1D0+A_IN*B0(NF)*T.le.0d0)THEN + A_OUT = 9d98 + RETURN + ENDIF A_OUT=A_IN/(1D0+B0(NF)*A_IN*T+C1(NF)*A_IN*LOG(1D0+A_IN*B0(NF)*T)) IF (A_OUT .LT. 0D0) AS=0.3D0 30 AS=A_OUT diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/Source/cuts.inc b/epochX/cudacpp/susy_gg_t1t1.mad/Source/cuts.inc index 23d099e5f7..a8ccc7420d 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/Source/cuts.inc +++ b/epochX/cudacpp/susy_gg_t1t1.mad/Source/cuts.inc @@ -37,7 +37,7 @@ C REAL*8 misset,missetmax,ptheavy REAL*8 ptllmin,ptllmax integer maxjetflavor - REAl*8 dsqrt_shat + REAl*8 dsqrt_shat,dsqrt_shatmax COMMON /to_min_max_cuts/ & PTJmax,PTBmax,PTAmax,PTLmax, @@ -60,7 +60,7 @@ C & ht2max,ht3max,ht4max, & htjmin,htjmax,ihtmin,ihtmax, & misset,missetmax,ptheavy, - & ptllmin,ptllmax,dsqrt_shat, + & ptllmin,ptllmax,dsqrt_shat,dsqrt_shatmax, & maxjetflavor C diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/Source/make_opts b/epochX/cudacpp/susy_gg_t1t1.mad/Source/make_opts index e4b87ee6ad..f9f7b64bb5 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/Source/make_opts +++ b/epochX/cudacpp/susy_gg_t1t1.mad/Source/make_opts @@ -5,8 +5,8 @@ GLOBAL_FLAG=-O3 -ffast-math -fbounds-check MACFLAG= MG5AMC_VERSION=SpecifiedByMG5aMCAtRunTime PYTHIA8_PATH=NotInstalled -STDLIB_FLAG= STDLIB=-lstdc++ +STDLIB_FLAG= #end_of_make_opts_variables BIASLIBDIR=../../../lib/ diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/Source/makefile b/epochX/cudacpp/susy_gg_t1t1.mad/Source/makefile index 291ca907ee..f9321e7a94 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/Source/makefile +++ b/epochX/cudacpp/susy_gg_t1t1.mad/Source/makefile @@ -73,6 +73,7 @@ $(BINDIR)gensudgrid: $(GENSUDGRID) $(LIBDIR)libpdf.$(libext) $(LIBDIR)libgammaUP # Dependencies dsample.o: DiscreteSampler.o dsample.f genps.inc StringCast.o vector.inc +pawgraph.o: vector.inc DiscreteSampler.o: StringCast.o invarients.o: invarients.f genps.inc gen_ximprove.o: gen_ximprove.f run_config.inc run_card.inc diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/Source/param_card.inc b/epochX/cudacpp/susy_gg_t1t1.mad/Source/param_card.inc index 6acb037f00..a3d72e8ed8 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/Source/param_card.inc +++ b/epochX/cudacpp/susy_gg_t1t1.mad/Source/param_card.inc @@ -81,9 +81,9 @@ MDL_RML21X1 = 3.815567D+04 MDL_RML23X3 = 3.782868D+04 MDL_RMX1 = 1.013965D+02 + MDL_RMX2 = 1.915042D+02 MDL_MHD2 = 3.233749D+04 MDL_MHU2 = -1.288001D+05 - MDL_RMX2 = 1.915042D+02 MDL_RMX3 = 5.882630D+02 MDL_RMQ21X1 = 2.998367D+05 MDL_RMQ23X3 = 2.487654D+05 diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/Source/run_card.inc b/epochX/cudacpp/susy_gg_t1t1.mad/Source/run_card.inc index 1a1bc782bd..8bd5f73840 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/Source/run_card.inc +++ b/epochX/cudacpp/susy_gg_t1t1.mad/Source/run_card.inc @@ -88,6 +88,8 @@ DSQRT_SHAT = 0.000000000000000D+00 + DSQRT_SHATMAX = -1 + LIMHEL = 0.000000000000000D+00 PTJ = 2.000000000000000D+01 diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/Bridge.h b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/Bridge.h index 87aa648dd2..49b928db67 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/Bridge.h +++ b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/Bridge.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: S. Roiser (Nov 2021) for the MG5aMC CUDACPP plugin. -// Further modified by: S. Roiser, J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2021-2025) for the MG5aMC CUDACPP plugin. #ifndef BRIDGE_H #define BRIDGE_H 1 @@ -255,11 +255,15 @@ namespace mg5amcCpu throw std::logic_error( "Bridge constructor: FIXME! cannot choose gputhreads" ); // this should never happen! m_gpublocks = m_nevt / m_gputhreads; } +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Instantiate device Bridge (nevt=" << m_nevt << ", gpublocks=" << m_gpublocks << ", gputhreads=" << m_gputhreads << ", gpublocks*gputhreads=" << m_gpublocks * m_gputhreads << ")" << std::endl; +#endif m_pmek.reset( new MatrixElementKernelDevice( m_devMomentaC, m_devGs, m_devRndHel, m_devRndCol, m_devChannelIds, m_devMEs, m_devSelHel, m_devSelCol, m_gpublocks, m_gputhreads ) ); #else +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Instantiate host Bridge (nevt=" << m_nevt << ")" << std::endl; +#endif m_pmek.reset( new MatrixElementKernelHost( m_hstMomentaC, m_hstGs, m_hstRndHel, m_hstRndCol, m_hstChannelIds, m_hstMEs, m_hstSelHel, m_hstSelCol, m_nevt ) ); #endif // MGONGPUCPP_GPUIMPL // Create a process object, read param card and set parameters @@ -290,8 +294,10 @@ namespace mg5amcCpu throw std::runtime_error( "Bridge: gpublocks*gputhreads must equal m_nevt in set_gpugrid" ); m_gpublocks = gpublocks; m_gputhreads = gputhreads; +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Set grid in Bridge (nevt=" << m_nevt << ", gpublocks=" << m_gpublocks << ", gputhreads=" << m_gputhreads << ", gpublocks*gputhreads=" << m_gpublocks * m_gputhreads << ")" << std::endl; +#endif m_pmek->setGrid( m_gpublocks, m_gputhreads ); } #endif @@ -347,7 +353,9 @@ namespace mg5amcCpu if( goodHelOnly ) return; m_pmek->computeMatrixElements( useChannelIds ); copyHostFromDevice( m_hstMEs, m_devMEs ); +#ifdef MGONGPUCPP_VERBOSE flagAbnormalMEs( m_hstMEs.data(), m_nevt ); +#endif copyHostFromDevice( m_hstSelHel, m_devSelHel ); copyHostFromDevice( m_hstSelCol, m_devSelCol ); if constexpr( std::is_same_v ) @@ -400,7 +408,9 @@ namespace mg5amcCpu } if( goodHelOnly ) return; m_pmek->computeMatrixElements( useChannelIds ); +#ifdef MGONGPUCPP_VERBOSE flagAbnormalMEs( m_hstMEs.data(), m_nevt ); +#endif if constexpr( std::is_same_v ) { memcpy( mes, m_hstMEs.data(), m_hstMEs.bytes() ); diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/GpuRuntime.h b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/GpuRuntime.h index 860c7fde16..6a4b946e74 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/GpuRuntime.h +++ b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/GpuRuntime.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: J. Teig (Jun 2023, based on earlier work by S. Roiser) for the MG5aMC CUDACPP plugin. -// Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2025) for the MG5aMC CUDACPP plugin. #ifndef MG5AMC_GPURUNTIME_H #define MG5AMC_GPURUNTIME_H 1 @@ -50,7 +50,7 @@ namespace mg5amcGpu // Set up CUDA application // ** NB: strictly speaking this is not needed when using the CUDA runtime API ** // Calling cudaSetDevice on startup is useful to properly book-keep the time spent in CUDA initialization - static void setUp( const bool debug = true ) + static void setUp( const bool debug = false ) // ZW: changed debug default to false { // ** NB: it is useful to call cudaSetDevice, or cudaFree, to properly book-keep the time spent in CUDA initialization // ** NB: otherwise, the first CUDA operation (eg a cudaMemcpyToSymbol in CPPProcess ctor) appears to take much longer! @@ -71,7 +71,7 @@ namespace mg5amcGpu // ** NB: strictly speaking this is not needed when using the CUDA runtime API ** // Calling cudaDeviceReset on shutdown is only needed for checking memory leaks in cuda-memcheck // See https://docs.nvidia.com/cuda/cuda-memcheck/index.html#leak-checking - static void tearDown( const bool debug = true ) + static void tearDown( const bool debug = false ) // ZW: changed debug default to false { if( debug ) std::cout << "__GpuRuntime: calling GpuDeviceReset()" << std::endl; checkGpu( gpuDeviceReset() ); diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/MGVersion.txt b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/MGVersion.txt index 084e244cea..77a069e39b 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/MGVersion.txt +++ b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/MGVersion.txt @@ -1 +1 @@ -3.6.0 \ No newline at end of file +3.6.2 \ No newline at end of file diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/MatrixElementKernels.cc b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/MatrixElementKernels.cc index f463977c1a..703ea3781c 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/MatrixElementKernels.cc +++ b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/MatrixElementKernels.cc @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: A. Valassi (Jan 2022) for the MG5aMC CUDACPP plugin. -// Further modified by: J. Teig, A. Valassi (2022-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: J. Teig, A. Valassi, Z. Wettersten (2022-2025) for the MG5aMC CUDACPP plugin. #include "MatrixElementKernels.h" @@ -60,7 +60,9 @@ namespace mg5amcCpu #ifdef MGONGPU_CHANNELID_DEBUG MatrixElementKernelBase::dumpNevtProcessedByChannel(); #endif +#ifdef MGONGPUCPP_VERBOSE MatrixElementKernelBase::dumpSignallingFPEs(); +#endif } //-------------------------------------------------------------------------- diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/MatrixElementKernels.h b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/MatrixElementKernels.h index 7acff4b308..8da04d7945 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/MatrixElementKernels.h +++ b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/MatrixElementKernels.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: A. Valassi (Jan 2022) for the MG5aMC CUDACPP plugin. -// Further modified by: J. Teig, A. Valassi (2022-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: J. Teig, A. Valassi, Z. Wettersten (2022-2025) for the MG5aMC CUDACPP plugin. #ifndef MATRIXELEMENTKERNELS_H #define MATRIXELEMENTKERNELS_H 1 @@ -134,7 +134,7 @@ namespace mg5amcCpu // Does this host system support the SIMD used in the matrix element calculation? // [NB: this is private, SIMD vectorization in mg5amc C++ code is currently only used in the ME calculations below MatrixElementKernelHost!] - static bool hostSupportsSIMD( const bool verbose = true ); + static bool hostSupportsSIMD( const bool verbose = false ); // ZW: default verbose false private: diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/MemoryAccessGs.h b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/MemoryAccessGs.h index 63c17a68fa..50a6aaef4d 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/MemoryAccessGs.h +++ b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/MemoryAccessGs.h @@ -128,6 +128,14 @@ namespace mg5amcCpu #endif } + // Locate a field (output) in a memory buffer (input) from a kernel event-indexing mechanism (internal) + // [Signature (SCALAR OR VECTOR) ===> fptype_sv* kernelAccess( fptype* buffer ) <===] + static __host__ __device__ inline fptype_sv* + kernelAccessP( fptype* buffer ) + { + return reinterpret_cast( buffer ); + } + // Locate a field (output) in a memory buffer (input) from a kernel event-indexing mechanism (internal) and the given field indexes (input) // [Signature (const, SCALAR) ===> const fptype& kernelAccessConst( const fptype* buffer ) <===] static constexpr auto kernelAccessConst_s = diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/MemoryBuffers.h b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/MemoryBuffers.h index 5bd3053393..ac5f50dc7e 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/MemoryBuffers.h +++ b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/MemoryBuffers.h @@ -13,6 +13,7 @@ #include "CPPProcess.h" #include "GpuRuntime.h" #include "Parameters_MSSM_SLHA2.h" +#include "processConfig.h" #include @@ -274,7 +275,8 @@ namespace mg5amcCpu typedef BufferBase BufferNumerators; // The size (number of elements) per event in a memory buffer for numerators - constexpr size_t sizePerEventNumerators = 1; + // (should be equal to the number of diagrams in the process) + constexpr size_t sizePerEventNumerators = processConfig::ndiagrams; #ifndef MGONGPUCPP_GPUIMPL // A class encapsulating a C++ host buffer for gs diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/P1_gg_t1t1x/CPPProcess.cc b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/P1_gg_t1t1x/CPPProcess.cc index 1b3601c86b..565ed216a5 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/P1_gg_t1t1x/CPPProcess.cc +++ b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/P1_gg_t1t1x/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -25,6 +25,7 @@ #include "MemoryAccessMatrixElements.h" #include "MemoryAccessMomenta.h" #include "MemoryAccessWavefunctions.h" +#include "processConfig.h" #ifdef MGONGPU_SUPPORTS_MULTICHANNEL #include "MemoryAccessDenominators.h" @@ -96,6 +97,69 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { +#ifdef MGONGPU_SUPPORTS_MULTICHANNEL + __device__ INLINE unsigned int getChannelId( const unsigned int* allChannelIds +#ifndef MGONGPUCPP_GPUIMPL + , + const int ievt00, + bool sanityCheckMixedPrecision = true +#endif + ) + { + unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr +#ifdef MGONGPUCPP_GPUIMPL + using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page + if( allChannelIds != nullptr ) + { + const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) + const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) + // NB: channelIds_sv is a scalar in CUDA + channelId = channelIds_sv; + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + } +#else // Cuda or C++ + using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + if( allChannelIds != nullptr ) + { + // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) + const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 + uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) +#ifndef MGONGPU_CPPSIMD + // NB: channelIds_sv is a scalar in no-SIMD C++ + channelId = channelIds_sv; +#else + // NB: channelIds_sv is a vector in SIMD C++ + channelId = channelIds_sv[0]; // element[0] + for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] + { + assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId + } +#endif + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + if( sanityCheckMixedPrecision ) + { +#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT + // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) + const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 + uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + for( int i = 0; i < neppV; ++i ) + { + assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector + } +#endif + } + } +#endif // MGONGPUCPP_GPUIMPL + return channelId; + } +#endif // MGONGPU_SUPPORTS_MULTICHANNEL + constexpr int nw6 = CPPProcess::nw6; // dimensions of each wavefunction (HELAS KEK 91-11): e.g. 6 for e+ e- -> mu+ mu- (fermions and vectors) constexpr int npar = CPPProcess::npar; // #particles in total (external = initial + final): e.g. 4 for e+ e- -> mu+ mu- constexpr int ncomb = CPPProcess::ncomb; // #helicity combinations: e.g. 16 for e+ e- -> mu+ mu- (2**4 = fermion spin up/down ** npar) @@ -305,7 +369,7 @@ namespace mg5amcCpu COUPs[ndcoup + iicoup] = allCOUPs[ndcoup + iicoup]; // independent couplings, fixed for all events fptype* MEs = E_ACCESS::ieventAccessRecord( allMEs, ievt0 ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); #endif #endif @@ -315,7 +379,7 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Numerators and denominators for the current event (CUDA) or SIMD event page (C++) - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); #endif @@ -344,8 +408,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 2 VSS1_0( w_fp[4], w_fp[3], w_fp[2], 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] ); + if( channelId != 0 ) + { + numerators_sv[1] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[1] += cxtype( 0, 1 ) * amp_sv[0]; @@ -358,8 +425,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 3 VSS1_0( w_fp[1], w_fp[3], w_fp[4], COUPs[2], 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] ); + if( channelId != 0 ) + { + numerators_sv[2] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += amp_sv[0]; @@ -371,8 +441,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 4 VSS1_0( w_fp[1], w_fp[3], w_fp[4], COUPs[3], 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] ); + if( channelId != 0 ) + { + numerators_sv[3] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += amp_sv[0]; @@ -384,8 +457,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 5 VSS1_0( w_fp[1], w_fp[4], w_fp[2], COUPs[2], 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] ); + if( channelId != 0 ) + { + numerators_sv[4] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += amp_sv[0]; @@ -397,8 +473,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 6 VSS1_0( w_fp[1], w_fp[2], w_fp[4], COUPs[3], -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] ); + if( channelId != 0 ) + { + numerators_sv[5] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] += amp_sv[0]; @@ -578,7 +657,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- @@ -946,9 +1027,6 @@ namespace mg5amcCpu #ifdef MGONGPUCPP_GPUIMPL // Remember: in CUDA this is a kernel for one event, in c++ this processes n events const int ievt = blockDim.x * blockIdx.x + threadIdx.x; // index of event (thread) in grid -#ifdef MGONGPU_SUPPORTS_MULTICHANNEL - using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events -#endif #else //assert( (size_t)(allmomenta) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] //assert( (size_t)(allMEs) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] @@ -956,7 +1034,6 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL using NUM_ACCESS = HostAccessNumerators; // non-trivial access: buffer includes all events using DEN_ACCESS = HostAccessDenominators; // non-trivial access: buffer includes all events - using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events #endif #endif @@ -981,11 +1058,12 @@ namespace mg5amcCpu fptype_sv& MEs_sv = E_ACCESS::kernelAccess( MEs ); MEs_sv = fptype_sv{ 0 }; #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - numerators_sv = fptype_sv{ 0 }; + for( int i = 0; i < processConfig::ndiagrams; ++i ) + numerators_sv[i] = fptype_sv{ 0 }; denominators_sv = fptype_sv{ 0 }; #endif } @@ -998,17 +1076,7 @@ namespace mg5amcCpu // *** START OF PART 1a - CUDA (one event per GPU thread) *** #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) - const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) - // NB: channelIds_sv is a scalar in CUDA - channelId = channelIds_sv; - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) - } + unsigned int channelId = getChannelId( allChannelIds ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (for the single event processed in calculate_wavefunctions) @@ -1123,38 +1191,7 @@ namespace mg5amcCpu const int ievt00 = ipagV2 * neppV; // loop on one SIMD page (neppV events) at a time #endif #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) - const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 - uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) -#ifndef MGONGPU_CPPSIMD - // NB: channelIds_sv is a scalar in no-SIMD C++ - channelId = channelIds_sv; -#else - // NB: channelIds_sv is a vector in SIMD C++ - channelId = channelIds_sv[0]; // element[0] - for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] - { - assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId - } -#endif - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) -#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT - // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) - const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 - uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - for( int i = 0; i < neppV; ++i ) - { - assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector - } -#endif - } + unsigned int channelId = getChannelId( allChannelIds, ievt00 ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (jamp2[nParity][ncolor][neppV] for the SIMD vector - or the two SIMD vectors - of events processed in calculate_wavefunctions) @@ -1327,11 +1364,12 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( allChannelIds != nullptr ) // fix segfault #892 (not 'channelIds[0] != 0') { - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + const unsigned int channelId = getChannelId( allChannelIds, ievt0, false ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - MEs_sv *= numerators_sv / denominators_sv; + MEs_sv *= numerators_sv[channelId - 1] / denominators_sv; } #endif //for( int ieppV = 0; ieppV < neppV; ieppV++ ) diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/P1_gg_t1t1x/CPPProcess.h b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/P1_gg_t1t1x/CPPProcess.h index d48c729c48..07a31771d8 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/P1_gg_t1t1x/CPPProcess.h +++ b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/P1_gg_t1t1x/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/P1_gg_t1t1x/auto_dsig.f b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/P1_gg_t1t1x/auto_dsig.f index 28f44ab169..9e2acdc418 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/P1_gg_t1t1x/auto_dsig.f +++ b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/P1_gg_t1t1x/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/P1_gg_t1t1x/auto_dsig1.f b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/P1_gg_t1t1x/auto_dsig1.f index 40fbb596f2..ad9ea5451b 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/P1_gg_t1t1x/auto_dsig1.f +++ b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/P1_gg_t1t1x/auto_dsig1.f @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -137,14 +137,14 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDDO QSCALE=QSCALE/2D0 ELSE - QSCALE=DSQRT(Q2FACT(IB(1))) + QSCALE=DSQRT(Q2FACT(1)) ENDIF G1=PDG2PDF(LPP(IB(1)),0, IB(1),XBK(IB(1)), QSCALE) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) IF (DSQRT(Q2FACT(IB(2))).NE.0D0) THEN - QSCALE=DSQRT(Q2FACT(IB(2))) + QSCALE=DSQRT(Q2FACT(2)) ENDIF G2=PDG2PDF(LPP(IB(2)),0, IB(2),XBK(IB(2)), QSCALE) ENDIF @@ -219,7 +219,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -290,6 +290,10 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, INTEGER I_EE C +C STUFF FOR UPC +C + DOUBLE PRECISION PHOTONPDFSQUARE +C C EXTERNAL FUNCTIONS C LOGICAL PASSCUTS @@ -373,12 +377,12 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, IF (ABS(LPP(IB(1))).GE.1) THEN C LP=SIGN(1,LPP(IB(1))) G1(IVEC)=PDG2PDF(LPP(IB(1)),0, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) G2(IVEC)=PDG2PDF(LPP(IB(2)),0, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) ENDIF ENDDO ! IWARP LOOP ENDDO ! CURRWARP LOOP diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/P1_gg_t1t1x/card.png b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/P1_gg_t1t1x/card.png new file mode 100644 index 0000000000..105ad1fe24 Binary files /dev/null and b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/P1_gg_t1t1x/card.png differ diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/P1_gg_t1t1x/matrix1.f b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/P1_gg_t1t1x/matrix1.f index 1a1830b77a..b0d0f941da 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/P1_gg_t1t1x/matrix1.f +++ b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/P1_gg_t1t1x/matrix1.f @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -295,7 +295,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -338,7 +338,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C INTEGER I,J,M,N COMPLEX*16 ZTEMP, TMP_JAMP(0) - REAL*8 CF(NCOLOR,NCOLOR) + INTEGER CF(NCOLOR*(NCOLOR+1)/2) + INTEGER DENOM, CF_INDEX COMPLEX*16 AMP(NGRAPHS), JAMP(NCOLOR,NAMPSO) COMPLEX*16 W(6,NWAVEFUNCS) C Needed for v4 models @@ -383,11 +384,10 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C C COLOR DATA C - DATA (CF(I, 1),I= 1, 2) /5.333333333333333D+00, - $ -6.666666666666666D-01/ + DATA DENOM/3/ + DATA (CF(I),I= 1, 2) /16,-4/ C 1 T(1,2,3,4) - DATA (CF(I, 2),I= 1, 2) /-6.666666666666666D-01 - $ ,5.333333333333333D+00/ + DATA (CF(I),I= 3, 3) /16/ C 1 T(2,1,3,4) C ---------- C BEGIN CODE @@ -451,10 +451,12 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) MATRIX1 = 0.D0 DO M = 1, NAMPSO + CF_INDEX = 0 DO I = 1, NCOLOR ZTEMP = (0.D0,0.D0) - DO J = 1, NCOLOR - ZTEMP = ZTEMP + CF(J,I)*JAMP(J,M) + DO J = I, NCOLOR + CF_INDEX = CF_INDEX + 1 + ZTEMP = ZTEMP + CF(CF_INDEX)*JAMP(J,M) ENDDO DO N = 1, NAMPSO @@ -463,6 +465,7 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) ENDDO ENDDO ENDDO + MATRIX1 = MATRIX1/DENOM IF(SDE_STRAT.EQ.1)THEN AMP2(2)=AMP2(2)+AMP(3)*DCONJG(AMP(3)) diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/P1_gg_t1t1x/matrix11.png b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/P1_gg_t1t1x/matrix11.png new file mode 100644 index 0000000000..5a25e7e011 Binary files /dev/null and b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/P1_gg_t1t1x/matrix11.png differ diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/P1_gg_t1t1x/processConfig.h b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/P1_gg_t1t1x/processConfig.h new file mode 100644 index 0000000000..998cb0ade6 --- /dev/null +++ b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/P1_gg_t1t1x/processConfig.h @@ -0,0 +1,16 @@ +// Copyright (C) 2025 CERN and UCLouvain. +// Licensed under the GNU Lesser General Public License (version 3 or later). +// Created by: S. Roiser (May 2025) for the MG5aMC CUDACPP plugin. +// Further modified by: ... for the MG5aMC CUDACPP plugin. + + +#ifndef MG5_CONFIG_SIGMA_MSSM_SLHA2_GG_T1T1X_H +#define MG5_CONFIG_SIGMA_MSSM_SLHA2_GG_T1T1X_H 1 + +namespace processConfig { + + constexpr int ndiagrams = 6; + +} + +#endif // MG5_CONFIG_SIGMA_MSSM_SLHA2_GG_T1T1X_H \ No newline at end of file diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/cuts.f b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/cuts.f index 7898714201..bd50ab1357 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/cuts.f +++ b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/cuts.f @@ -307,12 +307,18 @@ LOGICAL FUNCTION PASSCUTS(P, VECSIZE_USED) c c Limit S_hat c - if (dsqrt_shat.ne.0d0)then - if (nincoming.eq.2.and.sumdot(p(0,1),p(0,2),1d0) .lt. dsqrt_shat**2) then - passcuts=.false. - return - endif - endif + if(nincoming.eq.2) then + if (dsqrt_shat.ne.0d0.or.dsqrt_shatmax.ne.-1d0)then + xvar = sumdot(p(0,1),p(0,2),1d0) + if (xvar .lt. dsqrt_shat**2)then + passcuts=.false. + return + else if (dsqrt_shatmax.ne.-1d0 .and. xvar .gt. dsqrt_shatmax**2)then + passcuts = .false. + return + endif + endif + endif C $B$ DESACTIVATE_CUT $E$ !This is a tag for MadWeight if(debug) write (*,*) '=============================' diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/genps.f b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/genps.f index 1c32e93f5d..8503bdbec8 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/genps.f +++ b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/genps.f @@ -1373,6 +1373,10 @@ subroutine gen_s(x,smin,smax,spole,swidth,s,jac,pass) double precision smin,smax,spole,swidth,s,jac double precision x logical pass + include 'maxparticles.inc' + include '../../Source/vector.inc' + include 'run.inc' + include 'cuts.inc' c c Local c @@ -1384,6 +1388,10 @@ subroutine gen_s(x,smin,smax,spole,swidth,s,jac,pass) c----- c Begin Code c----- + if (dsqrt_shatmax.ne.-1d0)then + smax = min(smax, dsqrt_shatmax**2) + endif + pass=.true. if (jac .eq. 0 .and. .not. warned0) then print*,'Input jacobian 0 in genps' @@ -1628,7 +1636,10 @@ SUBROUTINE GENCMS(S,X1,X2,X,SMIN,SJACOBI) DOUBLE PRECISION ETA,ETAMIN,ETAMAX logical warned data warned/.false./ - + include 'maxparticles.inc' + include '../../Source/vector.inc' + include 'run.inc' + include 'cuts.inc' C------------ C BEGIN CODE C------------ @@ -1645,7 +1656,11 @@ SUBROUTINE GENCMS(S,X1,X2,X,SMIN,SJACOBI) C IF THERE IS NO S CHANNEL POLE USE BELOW: TAUMIN = 0d0 !SMIN/S !keep scale fix - TAUMAX = 1D0 + if (dsqrt_shatmax.ne.-1d0)then + TAUMAX=dsqrt_shatmax**2/S + else + TAUMAX = 1D0 + endif TAU = (TAUMAX-TAUMIN)*X(1)+TAUMIN SJACOBI= sjacobi*(TAUMAX-TAUMIN) @@ -1915,7 +1930,7 @@ double precision function get_channel_cut(p, config) if(sde_strat.eq.2)then t = dot(ptemp(0,-i), ptemp(0,-i)) Mass = prmass(-i, config) - get_channel_cut = get_channel_cut / ((t-Mass)*(t+Mass)+stot*1d-10)**2 + get_channel_cut = get_channel_cut / (t-Mass**2+stot*1d-10)**2 endif c write(*,*) i, "t, Mass, fact", t, Mass, ((t-Mass)*(t+Mass))**2,get_channel_cut t = t/stot @@ -1930,9 +1945,9 @@ double precision function get_channel_cut(p, config) t = dot(ptemp(0,-i), ptemp(0,-i)) Mass = prmass(-i, config) Width = prwidth(-i, config) - tmp = (t-Mass)*(t+Mass) + tmp = (t-Mass**2) tmp2 = Mass*Width - get_channel_cut = get_channel_cut* (tmp**2 - tmp2**2)/(tmp**2 + tmp2**2)**2 + get_channel_cut = get_channel_cut/(tmp**2 + tmp2**2) endif c write(*,*) i, "s, Mass, Width, fact", t, Mass, Width, (((t-Mass)*(t+Mass) )**2 + Width**2*Mass**2), get_channel_cut endif diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/myamp.f b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/myamp.f index 9e5f8d44dd..5360566ef4 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/myamp.f +++ b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/myamp.f @@ -231,6 +231,7 @@ subroutine set_peaks double precision x1,x2,xk(nexternal) double precision dr,mtot,etot,xqfact double precision spmass + double precision stot ! technically the min with dsqrt_shatmax**2 with the physical one integer i, iconfig, l1, l2, j, nt, nbw, iproc, k integer iden_part(-nexternal+1:nexternal) @@ -285,8 +286,8 @@ subroutine set_peaks integer lbw(0:nexternal) !Use of B.W. common /to_BW/ lbw - double precision stot,m1,m2 - common/to_stot/stot,m1,m2 + double precision real_stot,m1,m2 + common/to_stot/real_stot,m1,m2 include 'coupl.inc' ! needs VECSIZE_MEMMAX (defined in vector.inc) include 'cuts.inc' @@ -309,6 +310,12 @@ subroutine set_peaks c----- c Begin Code c----- + if (dsqrt_shatmax.ne.-1)then + stot = min(real_stot, dsqrt_shatmax**2) + else + stot = real_stot + endif + iconfig = this_config c needs to be initialise to avoid segfault do i = -nexternal,-1 diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/Gridpack/gridrun b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/Gridpack/gridrun index 8c8f7d3940..01d4ab53f5 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/Gridpack/gridrun +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/Gridpack/gridrun @@ -91,7 +91,7 @@ import internal.madevent_interface as cmd_interface try: - cmd_line = cmd_interface.GridPackCmd(me_dir=root_path, nb_event=args[0], seed=args[1], gran=args[2]) + cmd_line = cmd_interface.GridPackCmd(me_dir=root_path, nb_event=args[0], seed=args[1], gran=args[2], nprocs=args[3], maxevts=args[4]) except KeyboardInterrupt: print('Quit on KeyboardInterrupt') diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/Gridpack/run.sh b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/Gridpack/run.sh index 20adf572c2..2d149f96be 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/Gridpack/run.sh +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/Gridpack/run.sh @@ -14,6 +14,18 @@ # USAGE : run [num_events] [iseed] ## ############################################################################# +function usage() { + local retcode="${1:-1}" # default return code is 1 + echo "Usage:" + echo " run.sh [options] [num events] [seed]" + echo " run.sh [options] [num events] [seed] [granularity]" + echo "Options:" + echo " -h, --help print this message and exit" + echo " -p, --parallel [num procs] number of processes to run in parallel" + echo " -m, --maxevts [num events] maximum number of unweighted events per job" + exit $retcode +} + if [[ -d ./madevent ]]; then DIR='./madevent' else @@ -32,23 +44,46 @@ export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${PWD}/madevent/lib:${PWD}/HELAS/lib # For Mac OS X export DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:${PWD}/madevent/lib:${PWD}/HELAS/lib +pos_args=() +nprocs=1 +maxevts=2500 -if [[ ($1 != "") && ("$2" != "") && ("$3" == "") ]]; then - num_events=$1 - seed=$2 - gran=1 -elif [[ ($1 != "") && ("$2" != "") && ("$3" != "") ]]; then - num_events=$1 - seed=$2 - gran=$3 -else - echo "Warning: input is not correct. script requires two arguments: NB_EVENT SEED" -fi +while [[ $# -gt 0 ]]; do + case $1 in + -h|--help) + usage 0 ;; + -p|--parallel) + nprocs="$2" && shift && shift ;; + -m|--maxevts) + maxevts="$2" && shift && shift ;; + -*) + echo "Error: Unknown option $1" && usage ;; + *) + pos_args+=("$1") && shift ;; + esac +done + +case `echo "${pos_args[@]}" | wc -w | tr -d " "` in + "2") + num_events=${pos_args[0]} + seed=${pos_args[1]} + gran=1 + ;; + "3") + num_events=${pos_args[0]} + seed=${pos_args[1]} + gran=${pos_args[2]} + ;; + *) + echo "Error: number of arguments is not correct" + usage + ;; +esac -echo "Now generating $num_events events with random seed $seed and granularity $gran" +echo "Now generating $num_events events with random seed $seed and granularity $gran using $nprocs processes" ############ RUN THE PYTHON CODE ##################### -${DIR}/bin/gridrun $num_events $seed $gran +${DIR}/bin/gridrun $num_events $seed $gran $nprocs $maxevts ######################################################## ########### POSTPROCESSING ##################### diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/banner.py b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/banner.py index 42d82818d0..022861fc31 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/banner.py +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/banner.py @@ -353,7 +353,7 @@ def modify_init_cross(self, cross, allow_zero=False): assert "init" in self cross = dict(cross) - for key in cross.keys(): + for key in list(cross.keys()): if isinstance(key, str) and key.isdigit() and int(key) not in cross: cross[int(key)] = cross[key] @@ -3318,7 +3318,6 @@ def retro_compatible_custom_fct(lines, mode=None): for i,line in enumerate(lines[:]): if search and re.search(include_pat, line): name = re.findall(include_pat, line)[0] - misc.sprint('DETECTED INCLUDE', name) if 'vector.inc' in name: search = False if 'run.inc' in name: @@ -3326,7 +3325,6 @@ def retro_compatible_custom_fct(lines, mode=None): search = False sol.append(line) if re.search(function_pat, line): - misc.sprint("DETECTED FCT") search = True return sol @@ -4201,6 +4199,7 @@ def default_setup(self): self.add_param("bwcutoff", 15.0) self.add_param("cut_decays", False, cut='d') self.add_param('dsqrt_shat',0., cut=True) + self.add_param('dsqrt_shatmax', -1, cut=True) self.add_param("nhel", 0, include=False) self.add_param("limhel", 1e-8, hidden=True, comment="threshold to determine if an helicity contributes when not MC over helicity.") #pt cut @@ -5577,6 +5576,9 @@ def default_setup(self): #technical self.add_param('folding', [1,1,1], include=False) + + #bias + self.add_param('flavour_bias',[5,1], hidden=True, comment="Example: '5,100' means that the probability to generate an event with a bottom (or anti-bottom) quark is increased by a factor 100, but the weight of those events is reduced by a factor 100. Requires that the 'event_norm' is set to 'bias'.") #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]") @@ -5790,6 +5792,17 @@ def check_validity(self): if self['mcatnlo_delta'] and not self['parton_shower'].lower() == 'pythia8': raise InvalidRunCard("MC@NLO-DELTA only possible with matching to Pythia8") + # check that the flavour_bias is consistent + if len(self['flavour_bias']) != 2: + raise InvalidRunCard("'flavour_bias' should contain exactly two numbers: the abs(PDG) of the flavour to enhance, and the enhancement multiplication factor.") + for i in self['flavour_bias']: + if i < 0: + raise InvalidRunCard("flavour and multiplication factor should be positive in the flavour_bias parameter") + if self['flavour_bias'][1] != 1 and self['event_norm'] != 'bias': + logger.warning('Non-trivial flavour enhancement factor: setting event normalisation to "bias"') + self['event_norm']='bias' + + # check that ebeam is bigger than the proton mass. for i in [1,2]: # do not for proton mass if not proton PDF (or when scan initialization) diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/check_param_card.py b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/check_param_card.py index bc785b5de6..a34705f6bc 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/check_param_card.py +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/check_param_card.py @@ -1092,11 +1092,11 @@ def write_summary(self, path, order=None, lastline=False, nbcol=20): to_print = self.cross[-1:] for info in to_print: name = info['run_name'] - bench = info['bench'] + bench = [float(x) for x in info['bench']] data = [] for k in keys: if k in info: - data.append(info[k]) + data.append(float(info[k])) else: data.append(0.) ff.write(formatting % tuple([name] + bench + data)) diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/common_run_interface.py b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/common_run_interface.py index 9ff7390cf5..541cd6294b 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/common_run_interface.py +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/common_run_interface.py @@ -750,8 +750,8 @@ def __init__(self, me_dir, options, *args, **opts): else: self.ninitial = self.proc_characteristics['ninitial'] - def make_make_all_html_results(self, folder_names = [], jobs=[]): - return sum_html.make_all_html_results(self, folder_names, jobs) + def make_make_all_html_results(self, folder_names = [], jobs=[], get_attr=None): + return sum_html.make_all_html_results(self, folder_names, jobs, get_attr) def write_RunWeb(self, me_dir): @@ -3831,7 +3831,7 @@ def store_scan_result(self): """return the information that need to be kept for the scan summary. Auto-width are automatically added.""" - return {'cross': self.results.current['cross']} + return {'cross': self.results.current['cross'], 'error': self.results.current['error']} def add_error_log_in_html(self, errortype=None): @@ -5135,10 +5135,10 @@ def init_run(self, cards): self.special_shortcut.update( {'ebeam':([float],['run_card ebeam1 %(0)s', 'run_card ebeam2 %(0)s']), 'lpp': ([int],['run_card lpp1 %(0)s', 'run_card lpp2 %(0)s' ]), - 'lhc': ([int],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), + 'lhc': ([float],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), 'lep': ([int],['run_card lpp1 0', 'run_card lpp2 0', 'run_card ebeam1 %(0)s/2', 'run_card ebeam2 %(0)s/2']), 'ilc': ([int],['run_card lpp1 0', 'run_card lpp2 0', 'run_card ebeam1 %(0)s/2', 'run_card ebeam2 %(0)s/2']), - 'lcc': ([int],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), + 'lcc': ([float],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), 'fixed_scale': ([float],['run_card fixed_fac_scale T', 'run_card fixed_ren_scale T', 'run_card scale %(0)s', 'run_card dsqrt_q2fact1 %(0)s' ,'run_card dsqrt_q2fact2 %(0)s']), 'no_parton_cut':([],['run_card nocut T']), 'cm_velocity':([float], [lambda self :self.set_CM_velocity]), @@ -6740,7 +6740,15 @@ def postcmd(self, stop, line): return ending_question - + def help_update(self): + logger.info(""" syntax: update dependent: Change the mass/width of particles which are not free parameter for the model. + update missing: add to the current param_card missing blocks/parameters. + update to_slha1: pass SLHA2 card to SLHA1 convention. (beta) + update to_slha2: pass SLHA1 card to SLHA2 convention. (beta) + update to_full [run_card] + update XXX [where XXX correspond to a hidden block of the run_card]: + supported block are %s + """, ', '.join(self.update_block)) def do_update(self, line, timer=0): @@ -6756,6 +6764,8 @@ def do_update(self, line, timer=0): logger.warning('miss an argument (dependent or missing). Please retry') return + args[0] = args[0].lower() + if args[0] == 'dependent': if not self.mother_interface: logger.warning('Failed to update dependent parameter. This might create trouble for external program (like MadSpin/shower/...)') @@ -6805,10 +6815,11 @@ def do_update(self, line, timer=0): self.modified_card.add('run') # delay writting of the run_card logger.info('add optional block %s to the run_card', args[0]) else: - self.help_update() + self.do_help('update') logger.warning('unvalid options for update command. Please retry') + def update_to_full(self, line): """ trigger via update to_full LINE""" diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/extended_cmd.py b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/extended_cmd.py index 789976beee..c321fd88e5 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/extended_cmd.py +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/extended_cmd.py @@ -1317,6 +1317,8 @@ def nice_error_handling(self, error, line): debug_file = open(self.debug_output, 'a') traceback.print_exc(file=debug_file) + if __debug__: + traceback.print_exc() if hasattr(error, 'filename'): debug_file.write("Related File: %s\n" % error.filename) # Create a nice error output @@ -1928,7 +1930,8 @@ def do_display(self, line, output=sys.stdout): for i, name in enumerate(split): try: __import__('.'.join(split[:i+1])) - exec('%s=sys.modules[\'%s\']' % (split[i], '.'.join(split[:i+1]))) + tmp = {} + exec('%s=sys.modules[\'%s\']' % (split[i], '.'.join(split[:i+1])), globals(),tmp) except ImportError: try: var = eval(args[1]) @@ -1939,7 +1942,7 @@ def do_display(self, line, output=sys.stdout): outstr += 'EXTERNAL:\n' outstr += misc.nice_representation(var, nb_space=4) else: - var = eval(args[1]) + var = eval(args[1], globals(), tmp) outstr += 'EXTERNAL:\n' outstr += misc.nice_representation(var, nb_space=4) diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/file_writers.py b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/file_writers.py index 526756129f..74ba0d195c 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/file_writers.py +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/file_writers.py @@ -140,10 +140,6 @@ def preprocess_template(self, input_lines, context={}): else: raise self.FileWriterError("%s not string" % repr(input_lines)) - # Setup the contextual environment - for contextual_variable, value in context.items(): - exec('%s=%s'%(str(contextual_variable),repr(value))) - res = [] # The variable below tracks the conditional statements structure if_stack = [] @@ -166,7 +162,7 @@ def preprocess_template(self, input_lines, context={}): # Treat an if statement elif preproc_command.group('command')=='if': try: - if_stack.append(eval(preproc_command.group('body'))==True) + if_stack.append(eval(preproc_command.group('body'), globals(), context)==True) except Exception as e: raise self.FilePreProcessingError('Could not evaluate'+\ "python expression '%s' given the context %s provided."%\ diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/files.py b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/files.py index 551b71ddb6..3061b007e7 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/files.py +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/files.py @@ -147,9 +147,14 @@ def cp(path1, path2, log=True, error=False): path2 = format_path(path2) try: shutil.copy(path1, path2) + except shutil.Error as why: + logger.debug('no cp since identical: %s', why) + return except IOError as why: import madgraph.various.misc as misc try: + if 'same file' in str(why): + return if os.path.exists(path2): path2 = os.path.join(path2, os.path.split(path1)[1]) misc.copytree(path1, path2) @@ -157,12 +162,10 @@ def cp(path1, path2, log=True, error=False): if error: raise if log: - logger.warning(why) + logger.warning("fail to cp", path1, path2, why) else: - misc.sprint("fail to cp", why) - except shutil.Error: - # idetical file - pass + misc.sprint("fail to cp",path1,path2, why) + def rm(path, log=True): """removes path, that can be a single element or a list""" diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/gen_cardhtml-pl b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/gen_cardhtml-pl index 1810c6c082..6e0e06533d 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/gen_cardhtml-pl +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/gen_cardhtml-pl @@ -137,7 +137,7 @@ until($listpos>$#incard){ print PAGE " Model: $model \n"; print PAGE " \n \n
\n"; print PAGE " \n"; - print PAGE "\"\" \n"; + print PAGE "\"\" \n"; print PAGE "
\n"; print PAGE " \n \n \n"; print PAGE " \n"; diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/gen_crossxhtml.py b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/gen_crossxhtml.py index 681bf9d09b..3114a4350c 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/gen_crossxhtml.py +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/gen_crossxhtml.py @@ -133,7 +133,7 @@ class AllResults(dict): web = False - _run_entries = ['cross', 'error','nb_event_pythia','run_mode','run_statistics', + _run_entries = ['cross', 'error','axsec','nb_event_pythia','run_mode','run_statistics', 'nb_event','cross_pythia','error_pythia', 'nb_event_pythia8','cross_pythia8','error_pythia8', 'shower_dir'] diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/gen_jpeg-pl b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/gen_jpeg-pl index 87d03da394..31b7e9fe55 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/gen_jpeg-pl +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/gen_jpeg-pl @@ -1,16 +1,16 @@ #!/usr/bin/perl -w #--------------------------------------------------------------------- -# Run GS to create jpeg files defined as $gs +# Run GS to create PNG files defined as $gs #--------------------------------------------------------------------- -system("/bin/bash -c \"rm -f matrix*.jpg\" "); +system("/bin/bash -c \"rm -f matrix*.png\" "); $imatrix = ""; if (! -e "matrix.ps") {$imatrix = 1;} -$max_jpg = 2; -if ($imatrix eq "") {$max_jpg = 5;} -# add 1 to max_jpg, to get max_jpg pages -$max_jpg += 1; +$max_png = 2; +if ($imatrix eq "") {$max_png = 5;} +# add 1 to max_png, to get max_png pages +$max_png += 1; open(PAGE,"> diagrams.html") || die "Error creating diagrams.html"; print PAGE "\ \n"; print PAGE "\ \n"; @@ -21,22 +21,22 @@ while ( -e "matrix$imatrix.ps"){ open(IN, "< matrix$imatrix.ps") || die "No file matrix$imatrix.ps"; open(OUT, "> matrix-1.ps") || die "Could not open file matrix-1.ps"; while () { - if ($_ =~ m/^%%Page: $max_jpg $max_jpg/) {last;} + if ($_ =~ m/^%%Page: $max_png $max_png/) {last;} else {print OUT $_, "\n";} } close(OUT); close(IN); - system "/bin/bash -c \"nice gs \-sDEVICE\=jpeg \-sOutputFile\=matrix$imatrix\%00d.jpg \-q \-dNOPAUSE \-dBATCH matrix-1.ps > /dev/null\""; + system "/bin/bash -c \"nice gs \-sDEVICE\=pngmono \-r150 \-sOutputFile\=matrix$imatrix\%00d.png \-q \-dNOPAUSE \-dBATCH matrix-1.ps > /dev/null\""; system "rm -f matrix-1.ps"; -# Determine how many jpg files we have +# Determine how many png files we have $pages=1; - while(-e "matrix$imatrix$pages.jpg"){ + while(-e "matrix$imatrix$pages.png"){ $pages++; }#end of while #reduce it by one - if ($pages > $max_jpg){ + if ($pages > $max_png){ $pages -= 1; } # Find name of process @@ -45,24 +45,24 @@ while ( -e "matrix$imatrix.ps"){ if ($proc =~ /Process: (.+?)(\s\w+=\d+)*$/) { $proc = $1; } print PAGE "

To save bandwidth not all diagrams were converted to jpeg."; + if (-e "matrix$imatrix$max_png.png" ) { + print PAGE "

To save bandwidth not all diagrams were converted to PNG."; print PAGE "

To view all diagrams click on "; print PAGE "\ postscript. \<\/A\> \ \n"; # # Delete files which aren't included in diagrams.html # - system ("/bin/bash -c \"rm -f matrix$max_jpg.jpg\" "); + system ("/bin/bash -c \"rm -f matrix$max_png.png\" "); } # -# Now create jpeg file for card +# Now create PNG file for card # - if (! -e "../../HTML/card.jpg") { + if (! -e "../../HTML/card.png") { system ("/bin/bash -c \"head -352 matrix$imatrix.ps >& junk.ps\" "); open(JUNK,">> junk.ps") || die "Error opening junk.ps"; @@ -72,7 +72,7 @@ while ( -e "matrix$imatrix.ps"){ system ("/bin/bash -c \"cat matrix$imatrix.ps | sed 1,352d >> junk.ps\" "); - system "/bin/bash -c \"nice gs \-sDEVICE\=jpeg \-sOutputFile\=card.jpg \-q \-dNOPAUSE \-dBATCH \-g180x150 ./junk.ps; rm -f junk.ps; cp -p card.jpg ../../HTML/card.jpg > /dev/null\" "; + system "/bin/bash -c \"nice gs \-sDEVICE\=pngmono \-sOutputFile\=card.png \-q \-dNOPAUSE \-dBATCH \-g180x150 ./junk.ps; rm -f junk.ps; cp -p card.png ../../HTML/card.png > /dev/null\" "; } if ($imatrix eq "") {$imatrix = 0;} $imatrix = $imatrix + 1; @@ -82,3 +82,4 @@ print PAGE "\n"; print PAGE "\<\/BODY\> \n"; print PAGE "\<\/HTML\> \n"; close(PAGE); + diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/gen_ximprove.py b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/gen_ximprove.py index 415ecc9de0..d5d7fc8faf 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/gen_ximprove.py +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/gen_ximprove.py @@ -30,6 +30,7 @@ import stat import sys import six +import time from six.moves import range from six.moves import zip @@ -304,6 +305,7 @@ def get_helicity(self, to_submit=True, clean=True): logger.debug('(%s) nb_hel: %s zero amp: %s bad_amps_hel: %s/%s', split_file[-1], len(good_hels),len(bad_amps),len(bad_amps_perhel), len(good_hels)*nb_amp ) if len(good_hels) == 1: files.cp(matrix_file, matrix_file.replace('orig','optim')) + files.cp(matrix_file.replace('.f','.o'), matrix_file.replace('orig','optim').replace('.f','.o')) continue # avoid optimization if onlye one helicity gauge = self.cmd.proc_characteristics['gauge'] @@ -1059,6 +1061,7 @@ def __init__(self, cmd, opt=None): # parameter for the gridpack run self.nreq = 2000 self.iseed = 4321 + self.maxevts = 2500 # placeholder for information self.results = 0 #updated in launch/update_html @@ -1200,6 +1203,10 @@ def reset_multijob(self): def write_multijob(self, Channel, nb_split): """ """ if nb_split <=1: + try: + os.remove(pjoin(self.me_dir, 'SubProcesses', Channel.get('name'), 'multijob.dat')) + except OSError: + pass return f = open(pjoin(self.me_dir, 'SubProcesses', Channel.get('name'), 'multijob.dat'), 'w') f.write('%i\n' % nb_split) @@ -1828,17 +1835,17 @@ class gen_ximprove_gridpack(gen_ximprove_v4): 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 gen_events_security = 1.00 - def __new__(cls, *args, **opts): + def __new__(cls, cmd, opts): cls.force_class = 'gridpack' - return super(gen_ximprove_gridpack, cls).__new__(cls, *args, **opts) + return super(gen_ximprove_gridpack, cls).__new__(cls, cmd, opts) - def __init__(self, *args, **opts): + def __init__(self, cmd, opts): self.ngran = -1 + self.nprocs = 1 self.gscalefact = {} self.readonly = False if 'ngran' in opts: @@ -1846,9 +1853,18 @@ def __init__(self, *args, **opts): # del opts['ngran'] if 'readonly' in opts: self.readonly = opts['readonly'] - super(gen_ximprove_gridpack,self).__init__(*args, **opts) + if 'nprocs' in opts: + self.nprocs = int(opts['nprocs']) + if 'maxevts' in opts and self.nprocs > 1: + self.max_request_event = int(opts['maxevts']) + super(gen_ximprove_gridpack,self).__init__(cmd, opts) if self.ngran == -1: self.ngran = 1 + + if self.nprocs > 1: + self.combining_job = 0 + else: + self.combining_job = sys.maxsize def find_job_for_event(self): """return the list of channel that need to be improved""" @@ -1876,8 +1892,8 @@ def find_job_for_event(self): continue # no event to generate events self.gscalefact[tag] = max(1, 1/(goal_lum * C.get('axsec')/ self.ngran)) #need to generate events - logger.debug('request events for ', C.get('name'), 'cross=', - C.get('axsec'), 'needed events = ', goal_lum * C.get('axsec')) + logger.debug('request events for %s cross=%d needed events = %d', + C.get('name'), C.get('axsec'), goal_lum * C.get('axsec')) to_refine.append(C) logger.info('need to improve %s channels' % len(to_refine)) @@ -1897,8 +1913,13 @@ def get_job_for_event(self): 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 - + nb_split = int(max(1,((needed_event-1)// self.max_request_event) +1)) + if not self.split_channels: + nb_split = 1 + if nb_split > self.max_splitting: + 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')) @@ -1908,13 +1929,16 @@ def get_job_for_event(self): nevents = self.max_event_in_iter if nevents < self.min_event_in_iter: + nb_split = int(nb_split * nevents / self.min_event_in_iter) + 1 # sr dangerous? nevents = self.min_event_in_iter # # 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) - + # write the multi-job information + self.write_multijob(C, nb_split) + #create the info dict assume no splitting for the default info = {'name': self.cmd.results.current['run_name'], 'script_name': 'unknown', @@ -1925,7 +1949,7 @@ def get_job_for_event(self): 'nevents': nevents, #int(nevents*self.gen_events_security)+1, 'maxiter': self.max_iter, 'miniter': self.min_iter, - 'precision': -1*int(needed_event)/C.get('axsec'), + 'precision': -goal_lum/nb_split, # -1*int(needed_event)/C.get('axsec'), 'requested_event': needed_event, 'nhel': self.run_card['nhel'], 'channel': C.name.replace('G',''), @@ -1938,27 +1962,59 @@ def get_job_for_event(self): basedir = pjoin(os.path.dirname(__file__), '..','..','SubProcesses', info['P_dir'], info['directory']) info['base_directory'] = basedir - jobs.append(info) - + if nb_split == 1: + jobs.append(info) + else: + for i in range(nb_split): + new_info = dict(info) + new_info['offset'] = i+1 + new_info['directory'] += self.alphabet[i % 26] + str((i+1)//26) + new_info['base_directory'] = info['directory'] + jobs.append(new_info) write_dir = '.' if self.readonly else None self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), jobs, write_dir) + if self.nprocs > 1: + nprocs_cluster = cluster.MultiCore(nb_core=self.nprocs) + gridpack_start = time.time() + def gridpack_wait_monitoring(Idle, Running, Done): + if Idle+Running+Done == 0: + return + logger.info("Gridpack event generation: %s Idle, %s Running, %s Done [%s]" + % (Idle, Running, Done, misc.format_time(time.time()-gridpack_start))) + done = [] for j in jobs: - if j['P_dir'] in done: - continue - done.append(j['P_dir']) + if self.nprocs == 1: + if j['P_dir'] in done: + continue + done.append(j['P_dir']) + # Give a little status. Sometimes these jobs run very long, and having hours without any + # console output can be a bit frightening and make users think we are looping. + if len(done)%5==0: + logger.info(f"Working on job {len(done)} of {len(jobs)}") + # set the working directory path. pwd = pjoin(os.getcwd(),j['P_dir']) if self.readonly else pjoin(self.me_dir, 'SubProcesses', j['P_dir']) - exe = pjoin(pwd, 'ajob1') + exe = pjoin(pwd, j['script_name']) st = os.stat(exe) os.chmod(exe, st.st_mode | stat.S_IEXEC) # run the code\ - cluster.onecore.launch_and_wait(exe, cwd=pwd, packet_member=j['packet']) + if self.nprocs == 1: + cluster.onecore.launch_and_wait(exe, cwd=pwd, packet_member=j['packet']) + else: + nprocs_cluster.cluster_submit(exe, cwd=pwd, packet_member=j['packet']) write_dir = '.' if self.readonly else pjoin(self.me_dir, 'SubProcesses') + if self.nprocs > 1: + nprocs_cluster.wait(self.me_dir, gridpack_wait_monitoring) + + if self.readonly: + combine_runs.CombineRuns(write_dir) + else: + combine_runs.CombineRuns(self.me_dir) self.check_events(goal_lum, to_refine, jobs, write_dir) def check_events(self, goal_lum, to_refine, jobs, Sdir): diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/hel_recycle.py b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/hel_recycle.py index 1471de4bcb..978ba6575e 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/hel_recycle.py +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/hel_recycle.py @@ -550,7 +550,7 @@ def get_jamp_lines(self, line): def get_amp2_lines(self, line): if line.startswith(' DO I = 1, NCOLOR'): self.in_amp2 = False - elif not line.isspace(): + elif not line.isspace() and 'DENOM' not in line: self.template_dict['amp2_lines'] += f'{line[0:6]} {self.add_indices(line[6:])}' def prepare_bools(self): diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/histograms.py b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/histograms.py index 51ae2914fc..d68c560806 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/histograms.py +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/histograms.py @@ -1149,11 +1149,8 @@ def parse_one_histo_from_stream(self, stream, all_weight_header, boundaries = [0.0,0.0] for j, weight in \ enumerate(HwU.histo_bin_weight_re.finditer(line_bin)): - if (j == len(weight_header)): - continue - if j == len(all_weight_header): - raise HwU.ParseError("There is more bin weights"+\ - " specified than expected (%i)"%len(weight_header)) + #if (j == len(weight_header)): + # continue if selected_central_weight == all_weight_header[j]: bin_weights['central'] = float(weight.group('weight')) if all_weight_header[j] == 'boundary_xmin': @@ -2480,14 +2477,14 @@ def get_main_central_plot_lines(HwU_name, block_position, color_index, # return [template_no_stat%rep_dic]+\ # ([template%rep_dic] if show_mc_uncertainties else []) - # The use of sqrt(-1) is just a trick to prevent the line to display + # The use of 1/0 is just a trick to prevent the line to display res = [] - rep_dic['data'] = '($3 < 0 ? sqrt(-1) : $3)' + rep_dic['data'] = '($3 < 0 ? 1/0 : $3)' res.append(template_no_stat%rep_dic) rep_dic['title'] = " title ''" if show_mc_uncertainties: res.append(template%rep_dic) - rep_dic['data'] = '($3 >= 0 ? sqrt(-1) : abs($3))' + rep_dic['data'] = '($3 >= 0 ? 1/0 : abs($3))' rep_dic['ls'] = ' ls %d'%(100+color_index) res.append(template_no_stat%rep_dic) if show_mc_uncertainties: @@ -2739,13 +2736,13 @@ def ratio_no_correlations(wgtsA, wgtsB): """#-- rendering subhistograms '%(subhistogram_type)s' %(unset label)s %(set_format_y)s +%(set_yscale)s set yrange [%(ymin).4e:%(ymax).4e] set origin %(origin_x).4e, %(origin_y).4e set size %(size_x).4e, %(size_y).4e set mytics %(mytics)d %(set_ytics)s %(set_format_x)s -%(set_yscale)s %(set_ylabel)s %(set_histo_label)s plot \\""" @@ -2878,7 +2875,7 @@ def ratio_no_correlations(wgtsA, wgtsB): # We decide to show uncertainties in the main plot only if they # are part of a monocolor band. Otherwise, they will only be - # shown in the first subplot. Notice that plotting 'sqrt(-1)' + # shown in the first subplot. Notice that plotting '1/0' # is just a trick so as to have only the key printed with no # line @@ -2890,7 +2887,7 @@ def ratio_no_correlations(wgtsA, wgtsB): '%s, scale variation'%title, band='scale' in use_band) else: uncertainty_plot_lines[-1]['scale'] = \ - ["sqrt(-1) ls %d title '%s'"%(color_index+10,'%s, scale variation'%title)] + ["1/0 ls %d title '%s'"%(color_index+10,'%s, scale variation'%title)] # And now PDF_variation if available if not PDF_var_pos is None and len(PDF_var_pos)>0: if 'pdf' in use_band: @@ -2899,7 +2896,7 @@ def ratio_no_correlations(wgtsA, wgtsB): '%s, PDF variation'%title, band='pdf' in use_band) else: uncertainty_plot_lines[-1]['pdf'] = \ - ["sqrt(-1) ls %d title '%s'"%(color_index+20,'%s, PDF variation'%title)] + ["1/0 ls %d title '%s'"%(color_index+20,'%s, PDF variation'%title)] # And now merging variation if available if not merging_var_pos is None and len(merging_var_pos)>0: if 'merging_scale' in use_band: @@ -2908,7 +2905,7 @@ def ratio_no_correlations(wgtsA, wgtsB): '%s, merging scale variation'%title, band='merging_scale' in use_band) else: uncertainty_plot_lines[-1]['merging_scale'] = \ - ["sqrt(-1) ls %d title '%s'"%(color_index+30,'%s, merging scale variation'%title)] + ["1/0 ls %d title '%s'"%(color_index+30,'%s, merging scale variation'%title)] # And now alpsfact variation if available if not alpsfact_var_pos is None and len(alpsfact_var_pos)>0: if 'alpsfact' in use_band: @@ -2917,7 +2914,7 @@ def ratio_no_correlations(wgtsA, wgtsB): '%s, alpsfact variation'%title, band='alpsfact' in use_band) else: uncertainty_plot_lines[-1]['alpsfact'] = \ - ["sqrt(-1) ls %d title '%s'"%(color_index+40,'%s, alpsfact variation'%title)] + ["1/0 ls %d title '%s'"%(color_index+40,'%s, alpsfact variation'%title)] # plot_lines.append( # "'%s' index %d using (($1+$2)/2):3 ls %d title '%s'"\ diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/launch_plugin.py b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/launch_plugin.py index 0924927785..ba08c10340 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/launch_plugin.py +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/launch_plugin.py @@ -33,7 +33,7 @@ def compile(self, *args, **opts): if 'cwd' in opts and os.path.basename(opts['cwd']) == 'Source': path = pjoin(opts['cwd'], 'make_opts') common_run_interface.CommonRunCmd.update_make_opts_full(path, - {'FPTYPE': self.run_card['floating_type'] }) + {'override FPTYPE': self.run_card['floating_type'] }) misc.sprint('FPTYPE checked') cudacpp_supported_backends = [ 'fortran', 'cuda', 'hip', 'cpp', 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z', 'cppauto' ] if args and args[0][0] == 'madevent' and hasattr(self, 'run_card'): @@ -76,7 +76,7 @@ def reset_makeopts(self, old_value, new_value, name): if not hasattr(self, 'path'): raise Exception if name == 'floating_type': - common_run_interface.CommonRunCmd.update_make_opts_full({'FPTYPE': new_value}) + common_run_interface.CommonRunCmd.update_make_opts_full({'override FPTYPE': new_value}) else: raise Exception Sourcedir = pjoin(os.path.dirname(os.path.dirname(self.path)), 'Source') diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/lhe_parser.py b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/lhe_parser.py index f6e47956cd..76ded329c0 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/lhe_parser.py +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/lhe_parser.py @@ -2953,8 +2953,8 @@ def pt(self): @property def pseudorapidity(self): - norm = math.sqrt(self.px**2 + self.py**2+self.pz**2) - return 0.5* math.log((norm - self.pz) / (norm + self.pz)) + norm = math.sqrt(self.px**2 + self.py**2 + self.pz**2) + return 0.5* math.log((norm + self.pz) / (norm - self.pz)) @property def rapidity(self): diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/madevent_interface.py b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/madevent_interface.py index 85e5bcf5e3..2852f1d4d8 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/madevent_interface.py +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/madevent_interface.py @@ -1171,10 +1171,10 @@ def check_survey(self, args, cmd='survey'): for opt,value in self._survey_options.items(): if arg.startswith('--%s=' % opt): exec('self.opts[\'%s\'] = %s(arg.split(\'=\')[-1])' % \ - (opt, value[0])) + (opt, value[0]), globals(), {'self':self, 'arg':arg}) arg = "" if arg != "": raise Exception - except Exception: + except Exception as error: self.help_survey() raise self.InvalidCmd('invalid %s argument'% arg) @@ -3656,9 +3656,11 @@ def do_refine(self, line): else: self.refine_mode = "new" - cross, error = self.make_make_all_html_results() + cross, error, across = self.make_make_all_html_results(get_attr=('xsec','xerru','axsec')) + self.results.add_detail('cross', cross) self.results.add_detail('error', error) + self.results.add_detail('axsec', across) self.results.add_detail('run_statistics', dict(self.results.get_detail('run_statistics'))) @@ -3786,7 +3788,7 @@ def split(a, n): for i, local_G in enumerate(split(Gdirs, nb_chunk)): line = [pjoin(self.me_dir, "Events", self.run_name, "partials%d.lhe.gz" % i)] line.append(pjoin(self.me_dir, 'Events', self.run_name, '%s_%s_banner.txt' % (self.run_name, tag))) - line.append(str(self.results.current['cross'])) + line.append(str(self.results.current.get('axsec'))) line += local_G partials_info.append(self.do_combine_events_partial(' '.join(line), preprocess_only=True)) mycluster.submit(sys.executable, @@ -6749,7 +6751,7 @@ def get_subP_ids(path): class GridPackCmd(MadEventCmd): """The command for the gridpack --Those are not suppose to be use interactively--""" - def __init__(self, me_dir = None, nb_event=0, seed=0, gran=-1, *completekey, **stdin): + def __init__(self, me_dir = None, nb_event=0, seed=0, gran=-1, nprocs=1, maxevts=2500, *completekey, **stdin): """Initialize the command and directly run""" # Initialize properly @@ -6759,6 +6761,8 @@ 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.nprocs = nprocs + self.maxevts = maxevts self.options['automatic_html_opening'] = False #write the grid_card.dat on disk @@ -6874,7 +6878,7 @@ def launch(self, nb_event, seed): #misc.call([pjoin(self.me_dir,'bin','refine4grid'), # str(nb_event), '0', 'Madevent','1','GridRun_%s' % seed], # cwd=self.me_dir) - self.refine4grid(nb_event) + self.gridpack_cross = self.refine4grid(nb_event) # 3) Combine the events/pythia/... self.exec_cmd('combine_events') @@ -6902,6 +6906,8 @@ def refine4grid(self, nb_event): precision = nb_event + across= self.make_make_all_html_results(get_attr='axsec') + self.opts = dict([(key,value[1]) for (key,value) in \ self._survey_options.items()]) @@ -6915,8 +6921,9 @@ def refine4grid(self, nb_event): 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} + refine_opt = {'err_goal': nb_event, 'split_channels': True, + 'ngran':self.granularity, 'readonly': self.readonly, + 'nprocs': self.nprocs, 'maxevts': self.maxevts} 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 @@ -6926,7 +6933,7 @@ def refine4grid(self, nb_event): #print 'run combine!!!' #combine_runs.CombineRuns(self.me_dir) - return + return across #update html output Presults = sum_html.collect_result(self) cross, error = Presults.xsec, Presults.xerru @@ -7051,10 +7058,14 @@ def do_combine_events(self, line): sum_axsec += result.get('axsec')*gscalefact[Gdir] if len(AllEvent) >= 80: #perform a partial unweighting - if self.results.current['cross'] == 0 and self.run_card['gridpack']: - nb_event= self.nb_event + if not self.results.current.get('axsec'): + if self.run_card['gridpack'] and self.gridpack_cross: + nb_event = min(abs(1.05*self.nb_event*sum_axsec/self.gridpack_cross),self.nb_event) + else: + nb_event= self.nb_event else: - nb_event = min(abs(1.01*self.nb_event*sum_axsec/self.results.current['cross']),self.run_card['nevents']) + nb_event = min(abs(1.01*self.nb_event*sum_axsec/self.results.current.get('axsec')),self.run_card['nevents'], self.nb_event, self.gridpack_cross, sum_axsec) + misc.sprint(nb_event, self.results.current.get('axsec'), self.gridpack_cross) AllEvent.unweight(pjoin(outdir, self.run_name, "partials%s.lhe.gz" % partials), get_wgt, log_level=5, trunc_error=1e-2, event_target=nb_event) AllEvent = lhe_parser.MultiEventFile() @@ -7068,6 +7079,7 @@ def do_combine_events(self, line): for data in partials_info: AllEvent.add(*data) + sum_xsec += data[1] if not hasattr(self,'proc_characteristic'): self.proc_characteristic = self.get_characteristics() diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/restore_data b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/restore_data index 6205bb9567..407ed7aa91 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/restore_data +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/restore_data @@ -48,8 +48,17 @@ for i in `cat subproc.mg` ; do cd ../ done +# check if we are on a Mac, otherwise assume Linux +if [[ "$OSTYPE" == "darwin"* ]]; then + # no nproc on Mac, so use sysctl instead + # use -S1024 because there is a limit on the length of the command + xargs_opts="-P $(sysctl -n hw.ncpu) -S1024" +else + xargs_opts="-P $(nproc --all)" +fi + find . -mindepth 2 -maxdepth 2 -type d -name 'G*' -print0 \ - | xargs --null -P "$(nproc --all)" -I{} bash -c " + | xargs --null ${xargs_opts} -I{} bash -c " cd {} for j in $1_results.dat ; do if [[ -e \$j ]] ; then diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/sum_html.py b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/sum_html.py index 9dd5826f71..fb8dd3a74a 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/sum_html.py +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/sum_html.py @@ -770,7 +770,7 @@ def collect_result(cmd, folder_names=[], jobs=None, main_dir=None): return all -def make_all_html_results(cmd, folder_names = [], jobs=[]): +def make_all_html_results(cmd, folder_names = [], jobs=[], get_attr=None): """ folder_names and jobs have been added for the amcatnlo runs """ run = cmd.results.current['run_name'] if not os.path.exists(pjoin(cmd.me_dir, 'HTML', run)): @@ -794,7 +794,12 @@ def make_all_html_results(cmd, folder_names = [], jobs=[]): fsock.write('%s

' % Presults.get_html(run, unit, cmd.me_dir)) fsock.write('%s
' % P_text) - return Presults.xsec, Presults.xerru + if not get_attr: + return Presults.xsec, Presults.xerru + else: + if isinstance(get_attr, tuple): + return [getattr(Presults, _) for _ in get_attr] + return getattr(Presults, get_attr) diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/bin/madevent b/epochX/cudacpp/susy_gg_t1t1.mad/bin/madevent index dff9711b73..9c5363e682 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/madevent +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/madevent @@ -178,6 +178,17 @@ force_run = False if (args and args[0] == 'treatcards'): force_run=True + +# check that madgraph is not in PYTHONPATH +try: + import madgraph +except ImportError: + pass +else: + logger.getLogger('madgraph').error('Looks like you do have madgraph in your PYTHONPATH (or you run this executable from the main MG5aMC directory). This executable will likely not work in such case.') + + + # Call the cmd interface main loop try: if '-h' in args or '--help' in args: diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/src/HelAmps_MSSM_SLHA2.h b/epochX/cudacpp/susy_gg_t1t1.mad/src/HelAmps_MSSM_SLHA2.h index ec627d7759..f05906d14b 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/src/HelAmps_MSSM_SLHA2.h +++ b/epochX/cudacpp/susy_gg_t1t1.mad/src/HelAmps_MSSM_SLHA2.h @@ -8,7 +8,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/src/Parameters_MSSM_SLHA2.cc b/epochX/cudacpp/susy_gg_t1t1.mad/src/Parameters_MSSM_SLHA2.cc index d596fdf1ec..5ca089b9f5 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/src/Parameters_MSSM_SLHA2.cc +++ b/epochX/cudacpp/susy_gg_t1t1.mad/src/Parameters_MSSM_SLHA2.cc @@ -7,7 +7,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/src/Parameters_MSSM_SLHA2.h b/epochX/cudacpp/susy_gg_t1t1.mad/src/Parameters_MSSM_SLHA2.h index 26a532156c..07fc1620c5 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/src/Parameters_MSSM_SLHA2.h +++ b/epochX/cudacpp/susy_gg_t1t1.mad/src/Parameters_MSSM_SLHA2.h @@ -7,7 +7,7 @@ // Further modified by: A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/susy_gg_t1t1.sa/CODEGEN_cudacpp_susy_gg_t1t1_log.txt b/epochX/cudacpp/susy_gg_t1t1.sa/CODEGEN_cudacpp_susy_gg_t1t1_log.txt index 45c009959b..e5467cdc87 100644 --- a/epochX/cudacpp/susy_gg_t1t1.sa/CODEGEN_cudacpp_susy_gg_t1t1_log.txt +++ b/epochX/cudacpp/susy_gg_t1t1.sa/CODEGEN_cudacpp_susy_gg_t1t1_log.txt @@ -1,8 +1,11 @@ +WARNING:root:python3.12 support is still experimental. For the moment re-weighting is NOT working and do expect a LOT of syntax warning. We do not advise python3.12 for production for the moment. +Running MG5 in debug mode +Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT +Plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT has marked as NOT being validated with this version: 3.6.2. +It has been validated for the last time with version: 3.6.0 Note that this is a development version. This version is intended for development/beta testing and NOT for production. This version has not been fully tested (if at all) and might have limited user support (if at all) -Running MG5 in debug mode -Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT ************************************************************ * * * W E L C O M E to * @@ -15,7 +18,7 @@ Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT * * * * * * * * * * * * -* VERSION 3.6.0 2024-09-30 * +* VERSION 3.6.2 2025-03-19 * * * * WARNING: UNKNOWN DEVELOPMENT VERSION. * * WARNING: DO NOT USE FOR PRODUCTION * @@ -46,10 +49,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 Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt -import /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_t1t1.mg +import /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_t1t1.mg The import format was not given, so we guess it as command set stdout_level DEBUG set output information to level: 10 @@ -550,13 +552,13 @@ 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 > t1 t1~ WEIGHTED<=2 @1 INFO: Process has 6 diagrams -1 processes with 6 diagrams generated in 0.122 s +1 processes with 6 diagrams generated in 0.072 s Total: 1 processes with 6 diagrams output standalone_cudacpp ../TMPOUT/CODEGEN_cudacpp_susy_gg_t1t1 Output will be done with PLUGIN: CUDACPP_OUTPUT DEBUG: Entering PLUGIN_ProcessExporter.__init__ (initialise the exporter) [output.py at line 171]  DEBUG: Entering PLUGIN_ProcessExporter.copy_template (initialise the directory) [output.py at line 176]  -INFO: Creating subdirectories in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_t1t1 +INFO: Creating subdirectories in directory /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_t1t1 INFO: Organizing processes into subprocess groups INFO: Generating Helas calls for process: g g > t1 t1~ WEIGHTED<=2 @1 INFO: Processing color information for process: g g > t1 t1~ @1 @@ -565,32 +567,32 @@ INFO: Processing color information for process: g g > t1 t1~ @1 DEBUG: type(fortran_model)= [output.py at line 220]  DEBUG: type(me)= me=0 [output.py at line 221]  DEBUG: "need to link", self.to_link_in_P =  need to link ['nvtx.h', 'timer.h', 'timermap.h', 'ompnumthreads.h', 'GpuRuntime.h', 'GpuAbstraction.h', 'MemoryAccessHelpers.h', 'MemoryAccessVectors.h', 'MemoryAccessMatrixElements.h', 'MemoryAccessMomenta.h', 'MemoryAccessRandomNumbers.h', 'MemoryAccessWeights.h', 'MemoryAccessAmplitudes.h', 'MemoryAccessWavefunctions.h', 'MemoryAccessGs.h', 'MemoryAccessCouplingsFixed.h', 'MemoryAccessNumerators.h', 'MemoryAccessDenominators.h', 'MemoryAccessChannelIds.h', 'EventStatistics.h', 'CommonRandomNumbers.h', 'CrossSectionKernels.cc', 'CrossSectionKernels.h', 'MatrixElementKernels.cc', 'MatrixElementKernels.h', 'RamboSamplingKernels.cc', 'RamboSamplingKernels.h', 'RandomNumberKernels.h', 'CommonRandomNumberKernel.cc', 'CurandRandomNumberKernel.cc', 'HiprandRandomNumberKernel.cc', 'Bridge.h', 'BridgeKernels.cc', 'BridgeKernels.h', 'fbridge.cc', 'fbridge.inc', 'fsampler.cc', 'fsampler.inc', 'MadgraphTest.h', 'runTest.cc', 'testmisc.cc', 'testxxx_cc_ref.txt', 'valgrind.h', 'cudacpp.mk', 'testxxx.cc', 'MemoryBuffers.h', 'MemoryAccessCouplings.h', 'perf.py', 'profile.sh'] [output.py at line 222]  -INFO: Creating files in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_t1t1/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_t1t1x -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_t1t1/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_t1t1x/./CPPProcess.h -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_t1t1/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_t1t1x/./CPPProcess.cc -INFO: Created files CPPProcess.h and CPPProcess.cc in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_t1t1/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_t1t1x/. -Generated helas calls for 1 subprocesses (6 diagrams) in 0.008 s +INFO: Creating files in directory /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_t1t1/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_t1t1x +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_t1t1/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_t1t1x/./CPPProcess.h +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_t1t1/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_t1t1x/./CPPProcess.cc +INFO: Created files CPPProcess.h and CPPProcess.cc in directory /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_t1t1/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_t1t1x/. +Generated helas calls for 1 subprocesses (6 diagrams) in 0.005 s ALOHA: aloha starts to compute helicity amplitudes ALOHA: aloha creates VVV1 set of routines with options: P0 ALOHA: aloha creates VSS1 routines ALOHA: aloha creates VVSS1 routines -ALOHA: aloha creates 3 routines in 0.182 s +ALOHA: aloha creates 3 routines in 0.090 s VVV1 VSS1 VSS1 VSS1 VVSS1 -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_t1t1/src/./HelAmps_MSSM_SLHA2.h -INFO: Created file HelAmps_MSSM_SLHA2.h in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_t1t1/src/. +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_t1t1/src/./HelAmps_MSSM_SLHA2.h +INFO: Created file HelAmps_MSSM_SLHA2.h in directory /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_t1t1/src/. super_write_set_parameters_onlyfixMajorana (hardcoded=False) super_write_set_parameters_onlyfixMajorana (hardcoded=True) -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_t1t1/src/./Parameters_MSSM_SLHA2.h -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_t1t1/src/./Parameters_MSSM_SLHA2.cc +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_t1t1/src/./Parameters_MSSM_SLHA2.h +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_t1t1/src/./Parameters_MSSM_SLHA2.cc INFO: Created files Parameters_MSSM_SLHA2.h and Parameters_MSSM_SLHA2.cc in directory -INFO: /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_t1t1/src/. and /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_t1t1/src/. +INFO: /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_t1t1/src/. and /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_t1t1/src/. quit -real 0m1.324s -user 0m1.250s -sys 0m0.065s -Code generation completed in 1 seconds +real 0m2.636s +user 0m0.809s +sys 0m0.145s +Code generation completed in 3 seconds diff --git a/epochX/cudacpp/susy_gg_t1t1.sa/SubProcesses/Bridge.h b/epochX/cudacpp/susy_gg_t1t1.sa/SubProcesses/Bridge.h index 87aa648dd2..49b928db67 100644 --- a/epochX/cudacpp/susy_gg_t1t1.sa/SubProcesses/Bridge.h +++ b/epochX/cudacpp/susy_gg_t1t1.sa/SubProcesses/Bridge.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: S. Roiser (Nov 2021) for the MG5aMC CUDACPP plugin. -// Further modified by: S. Roiser, J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2021-2025) for the MG5aMC CUDACPP plugin. #ifndef BRIDGE_H #define BRIDGE_H 1 @@ -255,11 +255,15 @@ namespace mg5amcCpu throw std::logic_error( "Bridge constructor: FIXME! cannot choose gputhreads" ); // this should never happen! m_gpublocks = m_nevt / m_gputhreads; } +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Instantiate device Bridge (nevt=" << m_nevt << ", gpublocks=" << m_gpublocks << ", gputhreads=" << m_gputhreads << ", gpublocks*gputhreads=" << m_gpublocks * m_gputhreads << ")" << std::endl; +#endif m_pmek.reset( new MatrixElementKernelDevice( m_devMomentaC, m_devGs, m_devRndHel, m_devRndCol, m_devChannelIds, m_devMEs, m_devSelHel, m_devSelCol, m_gpublocks, m_gputhreads ) ); #else +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Instantiate host Bridge (nevt=" << m_nevt << ")" << std::endl; +#endif m_pmek.reset( new MatrixElementKernelHost( m_hstMomentaC, m_hstGs, m_hstRndHel, m_hstRndCol, m_hstChannelIds, m_hstMEs, m_hstSelHel, m_hstSelCol, m_nevt ) ); #endif // MGONGPUCPP_GPUIMPL // Create a process object, read param card and set parameters @@ -290,8 +294,10 @@ namespace mg5amcCpu throw std::runtime_error( "Bridge: gpublocks*gputhreads must equal m_nevt in set_gpugrid" ); m_gpublocks = gpublocks; m_gputhreads = gputhreads; +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Set grid in Bridge (nevt=" << m_nevt << ", gpublocks=" << m_gpublocks << ", gputhreads=" << m_gputhreads << ", gpublocks*gputhreads=" << m_gpublocks * m_gputhreads << ")" << std::endl; +#endif m_pmek->setGrid( m_gpublocks, m_gputhreads ); } #endif @@ -347,7 +353,9 @@ namespace mg5amcCpu if( goodHelOnly ) return; m_pmek->computeMatrixElements( useChannelIds ); copyHostFromDevice( m_hstMEs, m_devMEs ); +#ifdef MGONGPUCPP_VERBOSE flagAbnormalMEs( m_hstMEs.data(), m_nevt ); +#endif copyHostFromDevice( m_hstSelHel, m_devSelHel ); copyHostFromDevice( m_hstSelCol, m_devSelCol ); if constexpr( std::is_same_v ) @@ -400,7 +408,9 @@ namespace mg5amcCpu } if( goodHelOnly ) return; m_pmek->computeMatrixElements( useChannelIds ); +#ifdef MGONGPUCPP_VERBOSE flagAbnormalMEs( m_hstMEs.data(), m_nevt ); +#endif if constexpr( std::is_same_v ) { memcpy( mes, m_hstMEs.data(), m_hstMEs.bytes() ); diff --git a/epochX/cudacpp/susy_gg_t1t1.sa/SubProcesses/GpuRuntime.h b/epochX/cudacpp/susy_gg_t1t1.sa/SubProcesses/GpuRuntime.h index 860c7fde16..6a4b946e74 100644 --- a/epochX/cudacpp/susy_gg_t1t1.sa/SubProcesses/GpuRuntime.h +++ b/epochX/cudacpp/susy_gg_t1t1.sa/SubProcesses/GpuRuntime.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: J. Teig (Jun 2023, based on earlier work by S. Roiser) for the MG5aMC CUDACPP plugin. -// Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2025) for the MG5aMC CUDACPP plugin. #ifndef MG5AMC_GPURUNTIME_H #define MG5AMC_GPURUNTIME_H 1 @@ -50,7 +50,7 @@ namespace mg5amcGpu // Set up CUDA application // ** NB: strictly speaking this is not needed when using the CUDA runtime API ** // Calling cudaSetDevice on startup is useful to properly book-keep the time spent in CUDA initialization - static void setUp( const bool debug = true ) + static void setUp( const bool debug = false ) // ZW: changed debug default to false { // ** NB: it is useful to call cudaSetDevice, or cudaFree, to properly book-keep the time spent in CUDA initialization // ** NB: otherwise, the first CUDA operation (eg a cudaMemcpyToSymbol in CPPProcess ctor) appears to take much longer! @@ -71,7 +71,7 @@ namespace mg5amcGpu // ** NB: strictly speaking this is not needed when using the CUDA runtime API ** // Calling cudaDeviceReset on shutdown is only needed for checking memory leaks in cuda-memcheck // See https://docs.nvidia.com/cuda/cuda-memcheck/index.html#leak-checking - static void tearDown( const bool debug = true ) + static void tearDown( const bool debug = false ) // ZW: changed debug default to false { if( debug ) std::cout << "__GpuRuntime: calling GpuDeviceReset()" << std::endl; checkGpu( gpuDeviceReset() ); diff --git a/epochX/cudacpp/susy_gg_t1t1.sa/SubProcesses/MatrixElementKernels.cc b/epochX/cudacpp/susy_gg_t1t1.sa/SubProcesses/MatrixElementKernels.cc index f463977c1a..703ea3781c 100644 --- a/epochX/cudacpp/susy_gg_t1t1.sa/SubProcesses/MatrixElementKernels.cc +++ b/epochX/cudacpp/susy_gg_t1t1.sa/SubProcesses/MatrixElementKernels.cc @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: A. Valassi (Jan 2022) for the MG5aMC CUDACPP plugin. -// Further modified by: J. Teig, A. Valassi (2022-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: J. Teig, A. Valassi, Z. Wettersten (2022-2025) for the MG5aMC CUDACPP plugin. #include "MatrixElementKernels.h" @@ -60,7 +60,9 @@ namespace mg5amcCpu #ifdef MGONGPU_CHANNELID_DEBUG MatrixElementKernelBase::dumpNevtProcessedByChannel(); #endif +#ifdef MGONGPUCPP_VERBOSE MatrixElementKernelBase::dumpSignallingFPEs(); +#endif } //-------------------------------------------------------------------------- diff --git a/epochX/cudacpp/susy_gg_t1t1.sa/SubProcesses/MatrixElementKernels.h b/epochX/cudacpp/susy_gg_t1t1.sa/SubProcesses/MatrixElementKernels.h index 7acff4b308..8da04d7945 100644 --- a/epochX/cudacpp/susy_gg_t1t1.sa/SubProcesses/MatrixElementKernels.h +++ b/epochX/cudacpp/susy_gg_t1t1.sa/SubProcesses/MatrixElementKernels.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: A. Valassi (Jan 2022) for the MG5aMC CUDACPP plugin. -// Further modified by: J. Teig, A. Valassi (2022-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: J. Teig, A. Valassi, Z. Wettersten (2022-2025) for the MG5aMC CUDACPP plugin. #ifndef MATRIXELEMENTKERNELS_H #define MATRIXELEMENTKERNELS_H 1 @@ -134,7 +134,7 @@ namespace mg5amcCpu // Does this host system support the SIMD used in the matrix element calculation? // [NB: this is private, SIMD vectorization in mg5amc C++ code is currently only used in the ME calculations below MatrixElementKernelHost!] - static bool hostSupportsSIMD( const bool verbose = true ); + static bool hostSupportsSIMD( const bool verbose = false ); // ZW: default verbose false private: diff --git a/epochX/cudacpp/susy_gg_t1t1.sa/SubProcesses/MemoryAccessGs.h b/epochX/cudacpp/susy_gg_t1t1.sa/SubProcesses/MemoryAccessGs.h index 63c17a68fa..50a6aaef4d 100644 --- a/epochX/cudacpp/susy_gg_t1t1.sa/SubProcesses/MemoryAccessGs.h +++ b/epochX/cudacpp/susy_gg_t1t1.sa/SubProcesses/MemoryAccessGs.h @@ -128,6 +128,14 @@ namespace mg5amcCpu #endif } + // Locate a field (output) in a memory buffer (input) from a kernel event-indexing mechanism (internal) + // [Signature (SCALAR OR VECTOR) ===> fptype_sv* kernelAccess( fptype* buffer ) <===] + static __host__ __device__ inline fptype_sv* + kernelAccessP( fptype* buffer ) + { + return reinterpret_cast( buffer ); + } + // Locate a field (output) in a memory buffer (input) from a kernel event-indexing mechanism (internal) and the given field indexes (input) // [Signature (const, SCALAR) ===> const fptype& kernelAccessConst( const fptype* buffer ) <===] static constexpr auto kernelAccessConst_s = diff --git a/epochX/cudacpp/susy_gg_t1t1.sa/SubProcesses/MemoryBuffers.h b/epochX/cudacpp/susy_gg_t1t1.sa/SubProcesses/MemoryBuffers.h index 5bd3053393..ac5f50dc7e 100644 --- a/epochX/cudacpp/susy_gg_t1t1.sa/SubProcesses/MemoryBuffers.h +++ b/epochX/cudacpp/susy_gg_t1t1.sa/SubProcesses/MemoryBuffers.h @@ -13,6 +13,7 @@ #include "CPPProcess.h" #include "GpuRuntime.h" #include "Parameters_MSSM_SLHA2.h" +#include "processConfig.h" #include @@ -274,7 +275,8 @@ namespace mg5amcCpu typedef BufferBase BufferNumerators; // The size (number of elements) per event in a memory buffer for numerators - constexpr size_t sizePerEventNumerators = 1; + // (should be equal to the number of diagrams in the process) + constexpr size_t sizePerEventNumerators = processConfig::ndiagrams; #ifndef MGONGPUCPP_GPUIMPL // A class encapsulating a C++ host buffer for gs diff --git a/epochX/cudacpp/susy_gg_t1t1.sa/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_t1t1x/CPPProcess.cc b/epochX/cudacpp/susy_gg_t1t1.sa/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_t1t1x/CPPProcess.cc index 1d53b4a535..ed1f554d68 100644 --- a/epochX/cudacpp/susy_gg_t1t1.sa/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_t1t1x/CPPProcess.cc +++ b/epochX/cudacpp/susy_gg_t1t1.sa/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_t1t1x/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -25,6 +25,7 @@ #include "MemoryAccessMatrixElements.h" #include "MemoryAccessMomenta.h" #include "MemoryAccessWavefunctions.h" +#include "processConfig.h" #ifdef MGONGPU_SUPPORTS_MULTICHANNEL #include "MemoryAccessDenominators.h" @@ -96,6 +97,69 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { +#ifdef MGONGPU_SUPPORTS_MULTICHANNEL + __device__ INLINE unsigned int getChannelId( const unsigned int* allChannelIds +#ifndef MGONGPUCPP_GPUIMPL + , + const int ievt00, + bool sanityCheckMixedPrecision = true +#endif + ) + { + unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr +#ifdef MGONGPUCPP_GPUIMPL + using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page + if( allChannelIds != nullptr ) + { + const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) + const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) + // NB: channelIds_sv is a scalar in CUDA + channelId = channelIds_sv; + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + } +#else // Cuda or C++ + using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + if( allChannelIds != nullptr ) + { + // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) + const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 + uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) +#ifndef MGONGPU_CPPSIMD + // NB: channelIds_sv is a scalar in no-SIMD C++ + channelId = channelIds_sv; +#else + // NB: channelIds_sv is a vector in SIMD C++ + channelId = channelIds_sv[0]; // element[0] + for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] + { + assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId + } +#endif + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + if( sanityCheckMixedPrecision ) + { +#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT + // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) + const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 + uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + for( int i = 0; i < neppV; ++i ) + { + assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector + } +#endif + } + } +#endif // MGONGPUCPP_GPUIMPL + return channelId; + } +#endif // MGONGPU_SUPPORTS_MULTICHANNEL + constexpr int nw6 = CPPProcess::nw6; // dimensions of each wavefunction (HELAS KEK 91-11): e.g. 6 for e+ e- -> mu+ mu- (fermions and vectors) constexpr int npar = CPPProcess::npar; // #particles in total (external = initial + final): e.g. 4 for e+ e- -> mu+ mu- constexpr int ncomb = CPPProcess::ncomb; // #helicity combinations: e.g. 16 for e+ e- -> mu+ mu- (2**4 = fermion spin up/down ** npar) @@ -305,7 +369,7 @@ namespace mg5amcCpu COUPs[ndcoup + iicoup] = allCOUPs[ndcoup + iicoup]; // independent couplings, fixed for all events fptype* MEs = E_ACCESS::ieventAccessRecord( allMEs, ievt0 ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); #endif #endif @@ -315,7 +379,7 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Numerators and denominators for the current event (CUDA) or SIMD event page (C++) - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); #endif @@ -579,7 +643,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- @@ -947,9 +1013,6 @@ namespace mg5amcCpu #ifdef MGONGPUCPP_GPUIMPL // Remember: in CUDA this is a kernel for one event, in c++ this processes n events const int ievt = blockDim.x * blockIdx.x + threadIdx.x; // index of event (thread) in grid -#ifdef MGONGPU_SUPPORTS_MULTICHANNEL - using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events -#endif #else //assert( (size_t)(allmomenta) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] //assert( (size_t)(allMEs) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] @@ -957,7 +1020,6 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL using NUM_ACCESS = HostAccessNumerators; // non-trivial access: buffer includes all events using DEN_ACCESS = HostAccessDenominators; // non-trivial access: buffer includes all events - using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events #endif #endif @@ -982,11 +1044,12 @@ namespace mg5amcCpu fptype_sv& MEs_sv = E_ACCESS::kernelAccess( MEs ); MEs_sv = fptype_sv{ 0 }; #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - numerators_sv = fptype_sv{ 0 }; + for( int i = 0; i < processConfig::ndiagrams; ++i ) + numerators_sv[i] = fptype_sv{ 0 }; denominators_sv = fptype_sv{ 0 }; #endif } @@ -999,17 +1062,7 @@ namespace mg5amcCpu // *** START OF PART 1a - CUDA (one event per GPU thread) *** #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) - const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) - // NB: channelIds_sv is a scalar in CUDA - channelId = channelIds_sv; - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) - } + unsigned int channelId = getChannelId( allChannelIds ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (for the single event processed in calculate_wavefunctions) @@ -1124,38 +1177,7 @@ namespace mg5amcCpu const int ievt00 = ipagV2 * neppV; // loop on one SIMD page (neppV events) at a time #endif #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) - const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 - uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) -#ifndef MGONGPU_CPPSIMD - // NB: channelIds_sv is a scalar in no-SIMD C++ - channelId = channelIds_sv; -#else - // NB: channelIds_sv is a vector in SIMD C++ - channelId = channelIds_sv[0]; // element[0] - for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] - { - assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId - } -#endif - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) -#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT - // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) - const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 - uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - for( int i = 0; i < neppV; ++i ) - { - assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector - } -#endif - } + unsigned int channelId = getChannelId( allChannelIds, ievt00 ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (jamp2[nParity][ncolor][neppV] for the SIMD vector - or the two SIMD vectors - of events processed in calculate_wavefunctions) @@ -1328,11 +1350,12 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( allChannelIds != nullptr ) // fix segfault #892 (not 'channelIds[0] != 0') { - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + const unsigned int channelId = getChannelId( allChannelIds, ievt0, false ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - MEs_sv *= numerators_sv / denominators_sv; + MEs_sv *= numerators_sv[channelId - 1] / denominators_sv; } #endif //for( int ieppV = 0; ieppV < neppV; ieppV++ ) diff --git a/epochX/cudacpp/susy_gg_t1t1.sa/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_t1t1x/CPPProcess.h b/epochX/cudacpp/susy_gg_t1t1.sa/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_t1t1x/CPPProcess.h index d48c729c48..07a31771d8 100644 --- a/epochX/cudacpp/susy_gg_t1t1.sa/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_t1t1x/CPPProcess.h +++ b/epochX/cudacpp/susy_gg_t1t1.sa/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_t1t1x/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/susy_gg_t1t1.sa/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_t1t1x/processConfig.h b/epochX/cudacpp/susy_gg_t1t1.sa/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_t1t1x/processConfig.h new file mode 100644 index 0000000000..998cb0ade6 --- /dev/null +++ b/epochX/cudacpp/susy_gg_t1t1.sa/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_t1t1x/processConfig.h @@ -0,0 +1,16 @@ +// Copyright (C) 2025 CERN and UCLouvain. +// Licensed under the GNU Lesser General Public License (version 3 or later). +// Created by: S. Roiser (May 2025) for the MG5aMC CUDACPP plugin. +// Further modified by: ... for the MG5aMC CUDACPP plugin. + + +#ifndef MG5_CONFIG_SIGMA_MSSM_SLHA2_GG_T1T1X_H +#define MG5_CONFIG_SIGMA_MSSM_SLHA2_GG_T1T1X_H 1 + +namespace processConfig { + + constexpr int ndiagrams = 6; + +} + +#endif // MG5_CONFIG_SIGMA_MSSM_SLHA2_GG_T1T1X_H \ No newline at end of file diff --git a/epochX/cudacpp/susy_gg_t1t1.sa/src/HelAmps_MSSM_SLHA2.h b/epochX/cudacpp/susy_gg_t1t1.sa/src/HelAmps_MSSM_SLHA2.h index ec627d7759..f05906d14b 100644 --- a/epochX/cudacpp/susy_gg_t1t1.sa/src/HelAmps_MSSM_SLHA2.h +++ b/epochX/cudacpp/susy_gg_t1t1.sa/src/HelAmps_MSSM_SLHA2.h @@ -8,7 +8,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/susy_gg_t1t1.sa/src/Parameters_MSSM_SLHA2.cc b/epochX/cudacpp/susy_gg_t1t1.sa/src/Parameters_MSSM_SLHA2.cc index d596fdf1ec..5ca089b9f5 100644 --- a/epochX/cudacpp/susy_gg_t1t1.sa/src/Parameters_MSSM_SLHA2.cc +++ b/epochX/cudacpp/susy_gg_t1t1.sa/src/Parameters_MSSM_SLHA2.cc @@ -7,7 +7,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/susy_gg_t1t1.sa/src/Parameters_MSSM_SLHA2.h b/epochX/cudacpp/susy_gg_t1t1.sa/src/Parameters_MSSM_SLHA2.h index 26a532156c..07fc1620c5 100644 --- a/epochX/cudacpp/susy_gg_t1t1.sa/src/Parameters_MSSM_SLHA2.h +++ b/epochX/cudacpp/susy_gg_t1t1.sa/src/Parameters_MSSM_SLHA2.h @@ -7,7 +7,7 @@ // Further modified by: A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/susy_gg_tt.mad/CODEGEN_mad_susy_gg_tt_log.txt b/epochX/cudacpp/susy_gg_tt.mad/CODEGEN_mad_susy_gg_tt_log.txt index 9e7dad46ce..80f5b82746 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/CODEGEN_mad_susy_gg_tt_log.txt +++ b/epochX/cudacpp/susy_gg_tt.mad/CODEGEN_mad_susy_gg_tt_log.txt @@ -1,8 +1,11 @@ +WARNING:root:python3.12 support is still experimental. For the moment re-weighting is NOT working and do expect a LOT of syntax warning. We do not advise python3.12 for production for the moment. +Running MG5 in debug mode +Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT +Plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT has marked as NOT being validated with this version: 3.6.2. +It has been validated for the last time with version: 3.6.0 Note that this is a development version. This version is intended for development/beta testing and NOT for production. This version has not been fully tested (if at all) and might have limited user support (if at all) -Running MG5 in debug mode -Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT ************************************************************ * * * W E L C O M E to * @@ -15,7 +18,7 @@ Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT * * * * * * * * * * * * -* VERSION 3.6.0 2024-09-30 * +* VERSION 3.6.2 2025-03-19 * * * * WARNING: UNKNOWN DEVELOPMENT VERSION. * * WARNING: DO NOT USE FOR PRODUCTION * @@ -46,10 +49,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 Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt -import /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt.mg +import /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_susy_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 @@ -550,21 +552,21 @@ 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.118 s +1 processes with 3 diagrams generated in 0.052 s Total: 1 processes with 3 diagrams output madevent_simd ../TMPOUT/CODEGEN_mad_susy_gg_tt --hel_recycling=False --vector_size=32 Output will be done with PLUGIN: CUDACPP_OUTPUT Addition matrix-element will be done with PLUGIN: CUDACPP_OUTPUT -DEBUG: opt['output_options']['vector_size'] =  32 [export_v4.py at line 4334]  +DEBUG: opt['output_options']['vector_size'] =  32 [export_v4.py at line 4166]  Output will be done with PLUGIN: CUDACPP_OUTPUT DEBUG: Entering PLUGIN_ProcessExporter.__init__ (initialise the exporter) [output.py at line 171]  INFO: initialize a new directory: CODEGEN_mad_susy_gg_tt INFO: remove old information in CODEGEN_mad_susy_gg_tt DEBUG: Entering PLUGIN_ProcessExporter.copy_template (initialise the directory) [output.py at line 176]  -WARNING: File exists /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt  -INFO: Creating subdirectories in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt -WARNING: File exists /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt/Cards  -WARNING: File exists /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt/SubProcesses  +WARNING: File exists /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt  +INFO: Creating subdirectories in directory /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt +WARNING: File exists /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt/Cards  +WARNING: File exists /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_susy_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 @@ -576,54 +578,56 @@ FileWriter t t~ WEIGHTED<=2 @1 INFO: Finding symmetric diagrams for subprocess group gg_ttx -DEBUG: len(subproc_diagrams_for_config) =  3 [model_handling.py at line 1527]  -DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3} [model_handling.py at line 1551]  -DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3} [model_handling.py at line 1552]  +DEBUG: len(subproc_diagrams_for_config) =  3 [model_handling.py at line 1538]  +DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3} [model_handling.py at line 1562]  +DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3} [model_handling.py at line 1563]  Generated helas calls for 1 subprocesses (3 diagrams) in 0.007 s -Wrote files for 10 helas calls in 0.076 s +Wrote files for 10 helas calls in 2.134 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.137 s +ALOHA: aloha creates 2 routines in 0.070 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 4 routines in 0.133 s +ALOHA: aloha creates 4 routines in 0.060 s VVV1 FFV1 FFV1 FFV1 -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt/src/./HelAmps_MSSM_SLHA2.h -INFO: Created file HelAmps_MSSM_SLHA2.h in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt/src/. +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt/src/./HelAmps_MSSM_SLHA2.h +INFO: Created file HelAmps_MSSM_SLHA2.h in directory /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_susy_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_susy_gg_tt/src/./Parameters_MSSM_SLHA2.h -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt/src/./Parameters_MSSM_SLHA2.cc +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt/src/./Parameters_MSSM_SLHA2.h +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt/src/./Parameters_MSSM_SLHA2.cc INFO: Created files Parameters_MSSM_SLHA2.h and Parameters_MSSM_SLHA2.cc in directory -INFO: /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt/src/. and /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt/src/. +INFO: /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt/src/. and /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_susy_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_susy_gg_tt/Cards/me5_configuration.txt +save configuration file to /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt/Cards/me5_configuration.txt INFO: Use Fortran compiler gfortran INFO: Use c++ compiler g++ INFO: Generate jpeg diagrams INFO: Generate web pages -DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt; patch -p4 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common +DEBUG: cd /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt; patch -p4 -i /shared/roiser/sw/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common patching file SubProcesses/makefile -DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_susy_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 /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt/SubProcesses/P1_gg_ttx; patch -p6 -i /shared/roiser/sw/madgraph4gpu/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1 patching file driver.f patching file matrix1.f DEBUG: p.returncode =  0 [output.py at line 263]  -Output to directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt done. +Output to directory /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt done. Type "launch" to generate events from this process, or see -/data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt/README +/shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt/README Run "open index.html" to see more information about this process. quit -real 0m2.854s -user 0m2.558s -sys 0m0.284s -Code generation completed in 3 seconds +real 0m9.583s +user 0m1.731s +sys 0m0.761s +Code generation completed in 10 seconds +/shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt/bin/internal/banner.py:3309: SyntaxWarning: invalid escape sequence '\s' + function_pat = re.compile('^\s+(?:SUBROUTINE|(?:%(type)s)\s+function)\s+([a-zA-Z]\w*)' \ ************************************************************ * * * W E L C O M E to * @@ -636,7 +640,7 @@ Code generation completed in 3 seconds * * * * * * * * * * * * -* VERSION 3.6.0 * +* VERSION 3.6.2 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -644,10 +648,9 @@ Code generation completed in 3 seconds * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_susy_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_susy_gg_tt/Cards/me5_configuration.txt -Using default text editor "vi". Set another one in ./input/mg5_configuration.txt +INFO: load configuration from /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt/Cards/me5_configuration.txt +INFO: load configuration from /shared/roiser/sw/madgraph4gpu/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt/Cards/me5_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 @@ -666,7 +669,7 @@ launch in debug mode * * * * * * * * * * * * -* VERSION 3.6.0 * +* VERSION 3.6.2 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * @@ -674,10 +677,9 @@ launch in debug mode * Type 'help' for in-line help. * * * ************************************************************ -INFO: load configuration from /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_susy_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_susy_gg_tt/Cards/me5_configuration.txt -Using default text editor "vi". Set another one in ./input/mg5_configuration.txt +INFO: load configuration from /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt/Cards/me5_configuration.txt +INFO: load configuration from /shared/roiser/sw/madgraph4gpu/MG5aMC/mg5amcnlo/input/mg5_configuration.txt +INFO: load configuration from /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_mad_susy_gg_tt/Cards/me5_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/susy_gg_tt.mad/Cards/ident_card.dat b/epochX/cudacpp/susy_gg_tt.mad/Cards/ident_card.dat index 9cfb7ac1a2..0c5a1bdd83 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/Cards/ident_card.dat +++ b/epochX/cudacpp/susy_gg_tt.mad/Cards/ident_card.dat @@ -232,9 +232,9 @@ mse2 3 3 mdl_RmE23x3 msl2 1 1 mdl_RmL21x1 msl2 3 3 mdl_RmL23x3 msoft 1 mdl_RMx1 +msoft 2 mdl_RMx2 msoft 21 mdl_mHd2 msoft 22 mdl_mHu2 -msoft 2 mdl_RMx2 msoft 3 mdl_RMx3 msq2 1 1 mdl_RmQ21x1 msq2 3 3 mdl_RmQ23x3 diff --git a/epochX/cudacpp/susy_gg_tt.mad/Cards/me5_configuration.txt b/epochX/cudacpp/susy_gg_tt.mad/Cards/me5_configuration.txt index 68b4c46295..a0212bfb62 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/Cards/me5_configuration.txt +++ b/epochX/cudacpp/susy_gg_tt.mad/Cards/me5_configuration.txt @@ -235,7 +235,7 @@ # pineappl = pineappl -#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo +#mg5_path = /shared/roiser/sw/madgraph4gpu/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo +#mg5_path = /shared/roiser/sw/madgraph4gpu/MG5aMC/mg5amcnlo diff --git a/epochX/cudacpp/susy_gg_tt.mad/Cards/proc_card_mg5.dat b/epochX/cudacpp/susy_gg_tt.mad/Cards/proc_card_mg5.dat index 25f63a3016..012955821d 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/Cards/proc_card_mg5.dat +++ b/epochX/cudacpp/susy_gg_tt.mad/Cards/proc_card_mg5.dat @@ -8,7 +8,7 @@ #* * * * #* * #* * -#* VERSION 3.6.0 2024-09-30 * +#* VERSION 3.6.2 2025-03-19 * #* * #* WARNING: UNKNOWN DEVELOPMENT VERSION. * #* WARNING: DO NOT USE FOR PRODUCTION * diff --git a/epochX/cudacpp/susy_gg_tt.mad/Cards/run_card.dat b/epochX/cudacpp/susy_gg_tt.mad/Cards/run_card.dat index 6b82577032..000832aacd 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/Cards/run_card.dat +++ b/epochX/cudacpp/susy_gg_tt.mad/Cards/run_card.dat @@ -107,6 +107,7 @@ # Parton level cuts definition * #******************************* 0.0 = dsqrt_shat ! minimal shat for full process + -1 = dsqrt_shatmax ! maximum shat for full process # # #********************************************************************* diff --git a/epochX/cudacpp/susy_gg_tt.mad/Cards/run_card_default.dat b/epochX/cudacpp/susy_gg_tt.mad/Cards/run_card_default.dat index b8db871c35..85e1d39035 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/Cards/run_card_default.dat +++ b/epochX/cudacpp/susy_gg_tt.mad/Cards/run_card_default.dat @@ -107,6 +107,7 @@ # Parton level cuts definition * #******************************* 0.0 = dsqrt_shat ! minimal shat for full process + -1 = dsqrt_shatmax ! maximum shat for full process # # #********************************************************************* diff --git a/epochX/cudacpp/susy_gg_tt.mad/MGMEVersion.txt b/epochX/cudacpp/susy_gg_tt.mad/MGMEVersion.txt index 084e244cea..77a069e39b 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/MGMEVersion.txt +++ b/epochX/cudacpp/susy_gg_tt.mad/MGMEVersion.txt @@ -1 +1 @@ -3.6.0 \ No newline at end of file +3.6.2 \ No newline at end of file diff --git a/epochX/cudacpp/susy_gg_tt.mad/Source/alfas_functions.f b/epochX/cudacpp/susy_gg_tt.mad/Source/alfas_functions.f index bb69a6384e..84aeff369c 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/Source/alfas_functions.f +++ b/epochX/cudacpp/susy_gg_tt.mad/Source/alfas_functions.f @@ -188,6 +188,10 @@ SUBROUTINE NEWTON1(T,A_IN,A_OUT,NLOOP,NF) A_OUT=A_IN/(1D0+A_IN*B0(NF)*T) IF (NLOOP .EQ. 1) RETURN + if (1D0+A_IN*B0(NF)*T.le.0d0)THEN + A_OUT = 9d98 + RETURN + ENDIF A_OUT=A_IN/(1D0+B0(NF)*A_IN*T+C1(NF)*A_IN*LOG(1D0+A_IN*B0(NF)*T)) IF (A_OUT .LT. 0D0) AS=0.3D0 30 AS=A_OUT diff --git a/epochX/cudacpp/susy_gg_tt.mad/Source/cuts.inc b/epochX/cudacpp/susy_gg_tt.mad/Source/cuts.inc index 23d099e5f7..a8ccc7420d 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/Source/cuts.inc +++ b/epochX/cudacpp/susy_gg_tt.mad/Source/cuts.inc @@ -37,7 +37,7 @@ C REAL*8 misset,missetmax,ptheavy REAL*8 ptllmin,ptllmax integer maxjetflavor - REAl*8 dsqrt_shat + REAl*8 dsqrt_shat,dsqrt_shatmax COMMON /to_min_max_cuts/ & PTJmax,PTBmax,PTAmax,PTLmax, @@ -60,7 +60,7 @@ C & ht2max,ht3max,ht4max, & htjmin,htjmax,ihtmin,ihtmax, & misset,missetmax,ptheavy, - & ptllmin,ptllmax,dsqrt_shat, + & ptllmin,ptllmax,dsqrt_shat,dsqrt_shatmax, & maxjetflavor C diff --git a/epochX/cudacpp/susy_gg_tt.mad/Source/make_opts b/epochX/cudacpp/susy_gg_tt.mad/Source/make_opts index e4b87ee6ad..f9f7b64bb5 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/Source/make_opts +++ b/epochX/cudacpp/susy_gg_tt.mad/Source/make_opts @@ -5,8 +5,8 @@ GLOBAL_FLAG=-O3 -ffast-math -fbounds-check MACFLAG= MG5AMC_VERSION=SpecifiedByMG5aMCAtRunTime PYTHIA8_PATH=NotInstalled -STDLIB_FLAG= STDLIB=-lstdc++ +STDLIB_FLAG= #end_of_make_opts_variables BIASLIBDIR=../../../lib/ diff --git a/epochX/cudacpp/susy_gg_tt.mad/Source/makefile b/epochX/cudacpp/susy_gg_tt.mad/Source/makefile index 291ca907ee..f9321e7a94 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/Source/makefile +++ b/epochX/cudacpp/susy_gg_tt.mad/Source/makefile @@ -73,6 +73,7 @@ $(BINDIR)gensudgrid: $(GENSUDGRID) $(LIBDIR)libpdf.$(libext) $(LIBDIR)libgammaUP # Dependencies dsample.o: DiscreteSampler.o dsample.f genps.inc StringCast.o vector.inc +pawgraph.o: vector.inc DiscreteSampler.o: StringCast.o invarients.o: invarients.f genps.inc gen_ximprove.o: gen_ximprove.f run_config.inc run_card.inc diff --git a/epochX/cudacpp/susy_gg_tt.mad/Source/param_card.inc b/epochX/cudacpp/susy_gg_tt.mad/Source/param_card.inc index 6acb037f00..a3d72e8ed8 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/Source/param_card.inc +++ b/epochX/cudacpp/susy_gg_tt.mad/Source/param_card.inc @@ -81,9 +81,9 @@ MDL_RML21X1 = 3.815567D+04 MDL_RML23X3 = 3.782868D+04 MDL_RMX1 = 1.013965D+02 + MDL_RMX2 = 1.915042D+02 MDL_MHD2 = 3.233749D+04 MDL_MHU2 = -1.288001D+05 - MDL_RMX2 = 1.915042D+02 MDL_RMX3 = 5.882630D+02 MDL_RMQ21X1 = 2.998367D+05 MDL_RMQ23X3 = 2.487654D+05 diff --git a/epochX/cudacpp/susy_gg_tt.mad/Source/run_card.inc b/epochX/cudacpp/susy_gg_tt.mad/Source/run_card.inc index 1a1bc782bd..8bd5f73840 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/Source/run_card.inc +++ b/epochX/cudacpp/susy_gg_tt.mad/Source/run_card.inc @@ -88,6 +88,8 @@ DSQRT_SHAT = 0.000000000000000D+00 + DSQRT_SHATMAX = -1 + LIMHEL = 0.000000000000000D+00 PTJ = 2.000000000000000D+01 diff --git a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/Bridge.h b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/Bridge.h index 87aa648dd2..49b928db67 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/Bridge.h +++ b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/Bridge.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: S. Roiser (Nov 2021) for the MG5aMC CUDACPP plugin. -// Further modified by: S. Roiser, J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2021-2025) for the MG5aMC CUDACPP plugin. #ifndef BRIDGE_H #define BRIDGE_H 1 @@ -255,11 +255,15 @@ namespace mg5amcCpu throw std::logic_error( "Bridge constructor: FIXME! cannot choose gputhreads" ); // this should never happen! m_gpublocks = m_nevt / m_gputhreads; } +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Instantiate device Bridge (nevt=" << m_nevt << ", gpublocks=" << m_gpublocks << ", gputhreads=" << m_gputhreads << ", gpublocks*gputhreads=" << m_gpublocks * m_gputhreads << ")" << std::endl; +#endif m_pmek.reset( new MatrixElementKernelDevice( m_devMomentaC, m_devGs, m_devRndHel, m_devRndCol, m_devChannelIds, m_devMEs, m_devSelHel, m_devSelCol, m_gpublocks, m_gputhreads ) ); #else +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Instantiate host Bridge (nevt=" << m_nevt << ")" << std::endl; +#endif m_pmek.reset( new MatrixElementKernelHost( m_hstMomentaC, m_hstGs, m_hstRndHel, m_hstRndCol, m_hstChannelIds, m_hstMEs, m_hstSelHel, m_hstSelCol, m_nevt ) ); #endif // MGONGPUCPP_GPUIMPL // Create a process object, read param card and set parameters @@ -290,8 +294,10 @@ namespace mg5amcCpu throw std::runtime_error( "Bridge: gpublocks*gputhreads must equal m_nevt in set_gpugrid" ); m_gpublocks = gpublocks; m_gputhreads = gputhreads; +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Set grid in Bridge (nevt=" << m_nevt << ", gpublocks=" << m_gpublocks << ", gputhreads=" << m_gputhreads << ", gpublocks*gputhreads=" << m_gpublocks * m_gputhreads << ")" << std::endl; +#endif m_pmek->setGrid( m_gpublocks, m_gputhreads ); } #endif @@ -347,7 +353,9 @@ namespace mg5amcCpu if( goodHelOnly ) return; m_pmek->computeMatrixElements( useChannelIds ); copyHostFromDevice( m_hstMEs, m_devMEs ); +#ifdef MGONGPUCPP_VERBOSE flagAbnormalMEs( m_hstMEs.data(), m_nevt ); +#endif copyHostFromDevice( m_hstSelHel, m_devSelHel ); copyHostFromDevice( m_hstSelCol, m_devSelCol ); if constexpr( std::is_same_v ) @@ -400,7 +408,9 @@ namespace mg5amcCpu } if( goodHelOnly ) return; m_pmek->computeMatrixElements( useChannelIds ); +#ifdef MGONGPUCPP_VERBOSE flagAbnormalMEs( m_hstMEs.data(), m_nevt ); +#endif if constexpr( std::is_same_v ) { memcpy( mes, m_hstMEs.data(), m_hstMEs.bytes() ); diff --git a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/GpuRuntime.h b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/GpuRuntime.h index 860c7fde16..6a4b946e74 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/GpuRuntime.h +++ b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/GpuRuntime.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: J. Teig (Jun 2023, based on earlier work by S. Roiser) for the MG5aMC CUDACPP plugin. -// Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2025) for the MG5aMC CUDACPP plugin. #ifndef MG5AMC_GPURUNTIME_H #define MG5AMC_GPURUNTIME_H 1 @@ -50,7 +50,7 @@ namespace mg5amcGpu // Set up CUDA application // ** NB: strictly speaking this is not needed when using the CUDA runtime API ** // Calling cudaSetDevice on startup is useful to properly book-keep the time spent in CUDA initialization - static void setUp( const bool debug = true ) + static void setUp( const bool debug = false ) // ZW: changed debug default to false { // ** NB: it is useful to call cudaSetDevice, or cudaFree, to properly book-keep the time spent in CUDA initialization // ** NB: otherwise, the first CUDA operation (eg a cudaMemcpyToSymbol in CPPProcess ctor) appears to take much longer! @@ -71,7 +71,7 @@ namespace mg5amcGpu // ** NB: strictly speaking this is not needed when using the CUDA runtime API ** // Calling cudaDeviceReset on shutdown is only needed for checking memory leaks in cuda-memcheck // See https://docs.nvidia.com/cuda/cuda-memcheck/index.html#leak-checking - static void tearDown( const bool debug = true ) + static void tearDown( const bool debug = false ) // ZW: changed debug default to false { if( debug ) std::cout << "__GpuRuntime: calling GpuDeviceReset()" << std::endl; checkGpu( gpuDeviceReset() ); diff --git a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/MGVersion.txt b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/MGVersion.txt index 084e244cea..77a069e39b 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/MGVersion.txt +++ b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/MGVersion.txt @@ -1 +1 @@ -3.6.0 \ No newline at end of file +3.6.2 \ No newline at end of file diff --git a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/MatrixElementKernels.cc b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/MatrixElementKernels.cc index f463977c1a..703ea3781c 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/MatrixElementKernels.cc +++ b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/MatrixElementKernels.cc @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: A. Valassi (Jan 2022) for the MG5aMC CUDACPP plugin. -// Further modified by: J. Teig, A. Valassi (2022-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: J. Teig, A. Valassi, Z. Wettersten (2022-2025) for the MG5aMC CUDACPP plugin. #include "MatrixElementKernels.h" @@ -60,7 +60,9 @@ namespace mg5amcCpu #ifdef MGONGPU_CHANNELID_DEBUG MatrixElementKernelBase::dumpNevtProcessedByChannel(); #endif +#ifdef MGONGPUCPP_VERBOSE MatrixElementKernelBase::dumpSignallingFPEs(); +#endif } //-------------------------------------------------------------------------- diff --git a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/MatrixElementKernels.h b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/MatrixElementKernels.h index 7acff4b308..8da04d7945 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/MatrixElementKernels.h +++ b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/MatrixElementKernels.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: A. Valassi (Jan 2022) for the MG5aMC CUDACPP plugin. -// Further modified by: J. Teig, A. Valassi (2022-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: J. Teig, A. Valassi, Z. Wettersten (2022-2025) for the MG5aMC CUDACPP plugin. #ifndef MATRIXELEMENTKERNELS_H #define MATRIXELEMENTKERNELS_H 1 @@ -134,7 +134,7 @@ namespace mg5amcCpu // Does this host system support the SIMD used in the matrix element calculation? // [NB: this is private, SIMD vectorization in mg5amc C++ code is currently only used in the ME calculations below MatrixElementKernelHost!] - static bool hostSupportsSIMD( const bool verbose = true ); + static bool hostSupportsSIMD( const bool verbose = false ); // ZW: default verbose false private: diff --git a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/MemoryAccessGs.h b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/MemoryAccessGs.h index 63c17a68fa..50a6aaef4d 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/MemoryAccessGs.h +++ b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/MemoryAccessGs.h @@ -128,6 +128,14 @@ namespace mg5amcCpu #endif } + // Locate a field (output) in a memory buffer (input) from a kernel event-indexing mechanism (internal) + // [Signature (SCALAR OR VECTOR) ===> fptype_sv* kernelAccess( fptype* buffer ) <===] + static __host__ __device__ inline fptype_sv* + kernelAccessP( fptype* buffer ) + { + return reinterpret_cast( buffer ); + } + // Locate a field (output) in a memory buffer (input) from a kernel event-indexing mechanism (internal) and the given field indexes (input) // [Signature (const, SCALAR) ===> const fptype& kernelAccessConst( const fptype* buffer ) <===] static constexpr auto kernelAccessConst_s = diff --git a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/MemoryBuffers.h b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/MemoryBuffers.h index 5bd3053393..ac5f50dc7e 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/MemoryBuffers.h +++ b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/MemoryBuffers.h @@ -13,6 +13,7 @@ #include "CPPProcess.h" #include "GpuRuntime.h" #include "Parameters_MSSM_SLHA2.h" +#include "processConfig.h" #include @@ -274,7 +275,8 @@ namespace mg5amcCpu typedef BufferBase BufferNumerators; // The size (number of elements) per event in a memory buffer for numerators - constexpr size_t sizePerEventNumerators = 1; + // (should be equal to the number of diagrams in the process) + constexpr size_t sizePerEventNumerators = processConfig::ndiagrams; #ifndef MGONGPUCPP_GPUIMPL // A class encapsulating a C++ host buffer for gs diff --git a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/P1_gg_ttx/CPPProcess.cc b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/P1_gg_ttx/CPPProcess.cc index 5c62f1bfad..53ccffcff2 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/P1_gg_ttx/CPPProcess.cc +++ b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/P1_gg_ttx/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -25,6 +25,7 @@ #include "MemoryAccessMatrixElements.h" #include "MemoryAccessMomenta.h" #include "MemoryAccessWavefunctions.h" +#include "processConfig.h" #ifdef MGONGPU_SUPPORTS_MULTICHANNEL #include "MemoryAccessDenominators.h" @@ -96,6 +97,69 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { +#ifdef MGONGPU_SUPPORTS_MULTICHANNEL + __device__ INLINE unsigned int getChannelId( const unsigned int* allChannelIds +#ifndef MGONGPUCPP_GPUIMPL + , + const int ievt00, + bool sanityCheckMixedPrecision = true +#endif + ) + { + unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr +#ifdef MGONGPUCPP_GPUIMPL + using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page + if( allChannelIds != nullptr ) + { + const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) + const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) + // NB: channelIds_sv is a scalar in CUDA + channelId = channelIds_sv; + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + } +#else // Cuda or C++ + using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + if( allChannelIds != nullptr ) + { + // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) + const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 + uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) +#ifndef MGONGPU_CPPSIMD + // NB: channelIds_sv is a scalar in no-SIMD C++ + channelId = channelIds_sv; +#else + // NB: channelIds_sv is a vector in SIMD C++ + channelId = channelIds_sv[0]; // element[0] + for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] + { + assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId + } +#endif + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + if( sanityCheckMixedPrecision ) + { +#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT + // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) + const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 + uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + for( int i = 0; i < neppV; ++i ) + { + assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector + } +#endif + } + } +#endif // MGONGPUCPP_GPUIMPL + return channelId; + } +#endif // MGONGPU_SUPPORTS_MULTICHANNEL + constexpr int nw6 = CPPProcess::nw6; // dimensions of each wavefunction (HELAS KEK 91-11): e.g. 6 for e+ e- -> mu+ mu- (fermions and vectors) constexpr int npar = CPPProcess::npar; // #particles in total (external = initial + final): e.g. 4 for e+ e- -> mu+ mu- constexpr int ncomb = CPPProcess::ncomb; // #helicity combinations: e.g. 16 for e+ e- -> mu+ mu- (2**4 = fermion spin up/down ** npar) @@ -305,7 +369,7 @@ namespace mg5amcCpu COUPs[ndcoup + iicoup] = allCOUPs[ndcoup + iicoup]; // independent couplings, fixed for all events fptype* MEs = E_ACCESS::ieventAccessRecord( allMEs, ievt0 ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); #endif #endif @@ -315,7 +379,7 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Numerators and denominators for the current event (CUDA) or SIMD event page (C++) - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); #endif @@ -335,8 +399,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 1 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] ); + if( channelId != 0 ) + { + numerators_sv[0] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] += cxtype( 0, 1 ) * amp_sv[0]; jamp_sv[1] -= cxtype( 0, 1 ) * amp_sv[0]; @@ -349,8 +416,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 2 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] ); + if( channelId != 0 ) + { + numerators_sv[1] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[0] -= amp_sv[0]; @@ -362,8 +432,11 @@ namespace mg5amcCpu // Amplitude(s) for diagram number 3 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] ); + if( channelId != 0 ) + { + numerators_sv[2] += cxabs2( amp_sv[0] ); + denominators_sv += cxabs2( amp_sv[0] ); + } #endif jamp_sv[1] -= amp_sv[0]; @@ -555,7 +628,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- @@ -923,9 +998,6 @@ namespace mg5amcCpu #ifdef MGONGPUCPP_GPUIMPL // Remember: in CUDA this is a kernel for one event, in c++ this processes n events const int ievt = blockDim.x * blockIdx.x + threadIdx.x; // index of event (thread) in grid -#ifdef MGONGPU_SUPPORTS_MULTICHANNEL - using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events -#endif #else //assert( (size_t)(allmomenta) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] //assert( (size_t)(allMEs) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] @@ -933,7 +1005,6 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL using NUM_ACCESS = HostAccessNumerators; // non-trivial access: buffer includes all events using DEN_ACCESS = HostAccessDenominators; // non-trivial access: buffer includes all events - using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events #endif #endif @@ -958,11 +1029,12 @@ namespace mg5amcCpu fptype_sv& MEs_sv = E_ACCESS::kernelAccess( MEs ); MEs_sv = fptype_sv{ 0 }; #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - numerators_sv = fptype_sv{ 0 }; + for( int i = 0; i < processConfig::ndiagrams; ++i ) + numerators_sv[i] = fptype_sv{ 0 }; denominators_sv = fptype_sv{ 0 }; #endif } @@ -975,17 +1047,7 @@ namespace mg5amcCpu // *** START OF PART 1a - CUDA (one event per GPU thread) *** #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) - const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) - // NB: channelIds_sv is a scalar in CUDA - channelId = channelIds_sv; - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) - } + unsigned int channelId = getChannelId( allChannelIds ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (for the single event processed in calculate_wavefunctions) @@ -1100,38 +1162,7 @@ namespace mg5amcCpu const int ievt00 = ipagV2 * neppV; // loop on one SIMD page (neppV events) at a time #endif #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) - const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 - uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) -#ifndef MGONGPU_CPPSIMD - // NB: channelIds_sv is a scalar in no-SIMD C++ - channelId = channelIds_sv; -#else - // NB: channelIds_sv is a vector in SIMD C++ - channelId = channelIds_sv[0]; // element[0] - for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] - { - assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId - } -#endif - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) -#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT - // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) - const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 - uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - for( int i = 0; i < neppV; ++i ) - { - assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector - } -#endif - } + unsigned int channelId = getChannelId( allChannelIds, ievt00 ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (jamp2[nParity][ncolor][neppV] for the SIMD vector - or the two SIMD vectors - of events processed in calculate_wavefunctions) @@ -1304,11 +1335,12 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( allChannelIds != nullptr ) // fix segfault #892 (not 'channelIds[0] != 0') { - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + const unsigned int channelId = getChannelId( allChannelIds, ievt0, false ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - MEs_sv *= numerators_sv / denominators_sv; + MEs_sv *= numerators_sv[channelId - 1] / denominators_sv; } #endif //for( int ieppV = 0; ieppV < neppV; ieppV++ ) diff --git a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/P1_gg_ttx/CPPProcess.h b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/P1_gg_ttx/CPPProcess.h index 24c27005b8..7a900b2e53 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/P1_gg_ttx/CPPProcess.h +++ b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/P1_gg_ttx/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/P1_gg_ttx/auto_dsig.f b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/P1_gg_ttx/auto_dsig.f index bc9bcfeb9b..5d6ef2ba62 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/P1_gg_ttx/auto_dsig.f +++ b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/P1_gg_ttx/auto_dsig.f @@ -376,7 +376,7 @@ SUBROUTINE DSIG_VEC(ALL_P,ALL_WGT,ALL_XBK,ALL_Q2FACT,ALL_CM_RAP DOUBLE PRECISION FUNCTION DSIG(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C diff --git a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/P1_gg_ttx/auto_dsig1.f b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/P1_gg_ttx/auto_dsig1.f index db3c284caa..f46e9bfaf0 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/P1_gg_ttx/auto_dsig1.f +++ b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/P1_gg_ttx/auto_dsig1.f @@ -1,7 +1,7 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -137,14 +137,14 @@ DOUBLE PRECISION FUNCTION DSIG1(PP,WGT,IMODE) ENDDO QSCALE=QSCALE/2D0 ELSE - QSCALE=DSQRT(Q2FACT(IB(1))) + QSCALE=DSQRT(Q2FACT(1)) ENDIF G1=PDG2PDF(LPP(IB(1)),0, IB(1),XBK(IB(1)), QSCALE) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) IF (DSQRT(Q2FACT(IB(2))).NE.0D0) THEN - QSCALE=DSQRT(Q2FACT(IB(2))) + QSCALE=DSQRT(Q2FACT(2)) ENDIF G2=PDG2PDF(LPP(IB(2)),0, IB(2),XBK(IB(2)), QSCALE) ENDIF @@ -219,7 +219,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, $ ICONF_VEC, IMIRROR_VEC, VECSIZE_USED) C **************************************************** C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -290,6 +290,10 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, INTEGER I_EE C +C STUFF FOR UPC +C + DOUBLE PRECISION PHOTONPDFSQUARE +C C EXTERNAL FUNCTIONS C LOGICAL PASSCUTS @@ -373,12 +377,12 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, IF (ABS(LPP(IB(1))).GE.1) THEN C LP=SIGN(1,LPP(IB(1))) G1(IVEC)=PDG2PDF(LPP(IB(1)),0, IB(1),ALL_XBK(IB(1),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(1), IVEC))) + $ ,DSQRT(ALL_Q2FACT(1, IVEC))) ENDIF IF (ABS(LPP(IB(2))).GE.1) THEN C LP=SIGN(1,LPP(IB(2))) G2(IVEC)=PDG2PDF(LPP(IB(2)),0, IB(2),ALL_XBK(IB(2),IVEC) - $ ,DSQRT(ALL_Q2FACT(IB(2), IVEC))) + $ ,DSQRT(ALL_Q2FACT(2, IVEC))) ENDIF ENDDO ! IWARP LOOP ENDDO ! CURRWARP LOOP diff --git a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/P1_gg_ttx/card.png b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/P1_gg_ttx/card.png new file mode 100644 index 0000000000..03ecfdfe16 Binary files /dev/null and b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/P1_gg_ttx/card.png differ diff --git a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/P1_gg_ttx/matrix1.f b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/P1_gg_ttx/matrix1.f index c9610a83ed..830fa90006 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/P1_gg_ttx/matrix1.f +++ b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/P1_gg_ttx/matrix1.f @@ -1,7 +1,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, $ ICOL) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -307,7 +307,7 @@ SUBROUTINE SMATRIX1(P, RHEL, RCOL, CHANNEL, IVEC, ANS, IHEL, REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C -C Generated by MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +C Generated by MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 C By the MadGraph5_aMC@NLO Development Team C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch C @@ -350,7 +350,8 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C INTEGER I,J,M,N COMPLEX*16 ZTEMP, TMP_JAMP(0) - REAL*8 CF(NCOLOR,NCOLOR) + INTEGER CF(NCOLOR*(NCOLOR+1)/2) + INTEGER DENOM, CF_INDEX COMPLEX*16 AMP(NGRAPHS), JAMP(NCOLOR,NAMPSO) COMPLEX*16 W(6,NWAVEFUNCS) C Needed for v4 models @@ -393,11 +394,10 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) C C COLOR DATA C - DATA (CF(I, 1),I= 1, 2) /5.333333333333333D+00, - $ -6.666666666666666D-01/ + DATA DENOM/3/ + DATA (CF(I),I= 1, 2) /16,-4/ C 1 T(1,2,3,4) - DATA (CF(I, 2),I= 1, 2) /-6.666666666666666D-01 - $ ,5.333333333333333D+00/ + DATA (CF(I),I= 3, 3) /16/ C 1 T(2,1,3,4) C ---------- C BEGIN CODE @@ -446,10 +446,12 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) MATRIX1 = 0.D0 DO M = 1, NAMPSO + CF_INDEX = 0 DO I = 1, NCOLOR ZTEMP = (0.D0,0.D0) - DO J = 1, NCOLOR - ZTEMP = ZTEMP + CF(J,I)*JAMP(J,M) + DO J = I, NCOLOR + CF_INDEX = CF_INDEX + 1 + ZTEMP = ZTEMP + CF(CF_INDEX)*JAMP(J,M) ENDDO DO N = 1, NAMPSO @@ -458,6 +460,7 @@ REAL*8 FUNCTION MATRIX1(P,NHEL,IC, IHEL,AMP2, JAMP2, IVEC) ENDDO ENDDO ENDDO + MATRIX1 = MATRIX1/DENOM IF(SDE_STRAT.EQ.1)THEN AMP2(1)=AMP2(1)+AMP(1)*DCONJG(AMP(1)) diff --git a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/P1_gg_ttx/matrix11.png b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/P1_gg_ttx/matrix11.png new file mode 100644 index 0000000000..9017b25979 Binary files /dev/null and b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/P1_gg_ttx/matrix11.png differ diff --git a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/P1_gg_ttx/processConfig.h b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/P1_gg_ttx/processConfig.h new file mode 100644 index 0000000000..04a79dca0d --- /dev/null +++ b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/P1_gg_ttx/processConfig.h @@ -0,0 +1,16 @@ +// Copyright (C) 2025 CERN and UCLouvain. +// Licensed under the GNU Lesser General Public License (version 3 or later). +// Created by: S. Roiser (May 2025) for the MG5aMC CUDACPP plugin. +// Further modified by: ... for the MG5aMC CUDACPP plugin. + + +#ifndef MG5_CONFIG_SIGMA_MSSM_SLHA2_GG_TTX_H +#define MG5_CONFIG_SIGMA_MSSM_SLHA2_GG_TTX_H 1 + +namespace processConfig { + + constexpr int ndiagrams = 3; + +} + +#endif // MG5_CONFIG_SIGMA_MSSM_SLHA2_GG_TTX_H \ No newline at end of file diff --git a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/cuts.f b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/cuts.f index 7898714201..bd50ab1357 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/cuts.f +++ b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/cuts.f @@ -307,12 +307,18 @@ LOGICAL FUNCTION PASSCUTS(P, VECSIZE_USED) c c Limit S_hat c - if (dsqrt_shat.ne.0d0)then - if (nincoming.eq.2.and.sumdot(p(0,1),p(0,2),1d0) .lt. dsqrt_shat**2) then - passcuts=.false. - return - endif - endif + if(nincoming.eq.2) then + if (dsqrt_shat.ne.0d0.or.dsqrt_shatmax.ne.-1d0)then + xvar = sumdot(p(0,1),p(0,2),1d0) + if (xvar .lt. dsqrt_shat**2)then + passcuts=.false. + return + else if (dsqrt_shatmax.ne.-1d0 .and. xvar .gt. dsqrt_shatmax**2)then + passcuts = .false. + return + endif + endif + endif C $B$ DESACTIVATE_CUT $E$ !This is a tag for MadWeight if(debug) write (*,*) '=============================' diff --git a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/genps.f b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/genps.f index 1c32e93f5d..8503bdbec8 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/genps.f +++ b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/genps.f @@ -1373,6 +1373,10 @@ subroutine gen_s(x,smin,smax,spole,swidth,s,jac,pass) double precision smin,smax,spole,swidth,s,jac double precision x logical pass + include 'maxparticles.inc' + include '../../Source/vector.inc' + include 'run.inc' + include 'cuts.inc' c c Local c @@ -1384,6 +1388,10 @@ subroutine gen_s(x,smin,smax,spole,swidth,s,jac,pass) c----- c Begin Code c----- + if (dsqrt_shatmax.ne.-1d0)then + smax = min(smax, dsqrt_shatmax**2) + endif + pass=.true. if (jac .eq. 0 .and. .not. warned0) then print*,'Input jacobian 0 in genps' @@ -1628,7 +1636,10 @@ SUBROUTINE GENCMS(S,X1,X2,X,SMIN,SJACOBI) DOUBLE PRECISION ETA,ETAMIN,ETAMAX logical warned data warned/.false./ - + include 'maxparticles.inc' + include '../../Source/vector.inc' + include 'run.inc' + include 'cuts.inc' C------------ C BEGIN CODE C------------ @@ -1645,7 +1656,11 @@ SUBROUTINE GENCMS(S,X1,X2,X,SMIN,SJACOBI) C IF THERE IS NO S CHANNEL POLE USE BELOW: TAUMIN = 0d0 !SMIN/S !keep scale fix - TAUMAX = 1D0 + if (dsqrt_shatmax.ne.-1d0)then + TAUMAX=dsqrt_shatmax**2/S + else + TAUMAX = 1D0 + endif TAU = (TAUMAX-TAUMIN)*X(1)+TAUMIN SJACOBI= sjacobi*(TAUMAX-TAUMIN) @@ -1915,7 +1930,7 @@ double precision function get_channel_cut(p, config) if(sde_strat.eq.2)then t = dot(ptemp(0,-i), ptemp(0,-i)) Mass = prmass(-i, config) - get_channel_cut = get_channel_cut / ((t-Mass)*(t+Mass)+stot*1d-10)**2 + get_channel_cut = get_channel_cut / (t-Mass**2+stot*1d-10)**2 endif c write(*,*) i, "t, Mass, fact", t, Mass, ((t-Mass)*(t+Mass))**2,get_channel_cut t = t/stot @@ -1930,9 +1945,9 @@ double precision function get_channel_cut(p, config) t = dot(ptemp(0,-i), ptemp(0,-i)) Mass = prmass(-i, config) Width = prwidth(-i, config) - tmp = (t-Mass)*(t+Mass) + tmp = (t-Mass**2) tmp2 = Mass*Width - get_channel_cut = get_channel_cut* (tmp**2 - tmp2**2)/(tmp**2 + tmp2**2)**2 + get_channel_cut = get_channel_cut/(tmp**2 + tmp2**2) endif c write(*,*) i, "s, Mass, Width, fact", t, Mass, Width, (((t-Mass)*(t+Mass) )**2 + Width**2*Mass**2), get_channel_cut endif diff --git a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/myamp.f b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/myamp.f index 9e5f8d44dd..5360566ef4 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/myamp.f +++ b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/myamp.f @@ -231,6 +231,7 @@ subroutine set_peaks double precision x1,x2,xk(nexternal) double precision dr,mtot,etot,xqfact double precision spmass + double precision stot ! technically the min with dsqrt_shatmax**2 with the physical one integer i, iconfig, l1, l2, j, nt, nbw, iproc, k integer iden_part(-nexternal+1:nexternal) @@ -285,8 +286,8 @@ subroutine set_peaks integer lbw(0:nexternal) !Use of B.W. common /to_BW/ lbw - double precision stot,m1,m2 - common/to_stot/stot,m1,m2 + double precision real_stot,m1,m2 + common/to_stot/real_stot,m1,m2 include 'coupl.inc' ! needs VECSIZE_MEMMAX (defined in vector.inc) include 'cuts.inc' @@ -309,6 +310,12 @@ subroutine set_peaks c----- c Begin Code c----- + if (dsqrt_shatmax.ne.-1)then + stot = min(real_stot, dsqrt_shatmax**2) + else + stot = real_stot + endif + iconfig = this_config c needs to be initialise to avoid segfault do i = -nexternal,-1 diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/Gridpack/gridrun b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/Gridpack/gridrun index 8c8f7d3940..01d4ab53f5 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/Gridpack/gridrun +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/Gridpack/gridrun @@ -91,7 +91,7 @@ import internal.madevent_interface as cmd_interface try: - cmd_line = cmd_interface.GridPackCmd(me_dir=root_path, nb_event=args[0], seed=args[1], gran=args[2]) + cmd_line = cmd_interface.GridPackCmd(me_dir=root_path, nb_event=args[0], seed=args[1], gran=args[2], nprocs=args[3], maxevts=args[4]) except KeyboardInterrupt: print('Quit on KeyboardInterrupt') diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/Gridpack/run.sh b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/Gridpack/run.sh index 20adf572c2..2d149f96be 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/Gridpack/run.sh +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/Gridpack/run.sh @@ -14,6 +14,18 @@ # USAGE : run [num_events] [iseed] ## ############################################################################# +function usage() { + local retcode="${1:-1}" # default return code is 1 + echo "Usage:" + echo " run.sh [options] [num events] [seed]" + echo " run.sh [options] [num events] [seed] [granularity]" + echo "Options:" + echo " -h, --help print this message and exit" + echo " -p, --parallel [num procs] number of processes to run in parallel" + echo " -m, --maxevts [num events] maximum number of unweighted events per job" + exit $retcode +} + if [[ -d ./madevent ]]; then DIR='./madevent' else @@ -32,23 +44,46 @@ export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${PWD}/madevent/lib:${PWD}/HELAS/lib # For Mac OS X export DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:${PWD}/madevent/lib:${PWD}/HELAS/lib +pos_args=() +nprocs=1 +maxevts=2500 -if [[ ($1 != "") && ("$2" != "") && ("$3" == "") ]]; then - num_events=$1 - seed=$2 - gran=1 -elif [[ ($1 != "") && ("$2" != "") && ("$3" != "") ]]; then - num_events=$1 - seed=$2 - gran=$3 -else - echo "Warning: input is not correct. script requires two arguments: NB_EVENT SEED" -fi +while [[ $# -gt 0 ]]; do + case $1 in + -h|--help) + usage 0 ;; + -p|--parallel) + nprocs="$2" && shift && shift ;; + -m|--maxevts) + maxevts="$2" && shift && shift ;; + -*) + echo "Error: Unknown option $1" && usage ;; + *) + pos_args+=("$1") && shift ;; + esac +done + +case `echo "${pos_args[@]}" | wc -w | tr -d " "` in + "2") + num_events=${pos_args[0]} + seed=${pos_args[1]} + gran=1 + ;; + "3") + num_events=${pos_args[0]} + seed=${pos_args[1]} + gran=${pos_args[2]} + ;; + *) + echo "Error: number of arguments is not correct" + usage + ;; +esac -echo "Now generating $num_events events with random seed $seed and granularity $gran" +echo "Now generating $num_events events with random seed $seed and granularity $gran using $nprocs processes" ############ RUN THE PYTHON CODE ##################### -${DIR}/bin/gridrun $num_events $seed $gran +${DIR}/bin/gridrun $num_events $seed $gran $nprocs $maxevts ######################################################## ########### POSTPROCESSING ##################### diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/banner.py b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/banner.py index 42d82818d0..022861fc31 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/banner.py +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/banner.py @@ -353,7 +353,7 @@ def modify_init_cross(self, cross, allow_zero=False): assert "init" in self cross = dict(cross) - for key in cross.keys(): + for key in list(cross.keys()): if isinstance(key, str) and key.isdigit() and int(key) not in cross: cross[int(key)] = cross[key] @@ -3318,7 +3318,6 @@ def retro_compatible_custom_fct(lines, mode=None): for i,line in enumerate(lines[:]): if search and re.search(include_pat, line): name = re.findall(include_pat, line)[0] - misc.sprint('DETECTED INCLUDE', name) if 'vector.inc' in name: search = False if 'run.inc' in name: @@ -3326,7 +3325,6 @@ def retro_compatible_custom_fct(lines, mode=None): search = False sol.append(line) if re.search(function_pat, line): - misc.sprint("DETECTED FCT") search = True return sol @@ -4201,6 +4199,7 @@ def default_setup(self): self.add_param("bwcutoff", 15.0) self.add_param("cut_decays", False, cut='d') self.add_param('dsqrt_shat',0., cut=True) + self.add_param('dsqrt_shatmax', -1, cut=True) self.add_param("nhel", 0, include=False) self.add_param("limhel", 1e-8, hidden=True, comment="threshold to determine if an helicity contributes when not MC over helicity.") #pt cut @@ -5577,6 +5576,9 @@ def default_setup(self): #technical self.add_param('folding', [1,1,1], include=False) + + #bias + self.add_param('flavour_bias',[5,1], hidden=True, comment="Example: '5,100' means that the probability to generate an event with a bottom (or anti-bottom) quark is increased by a factor 100, but the weight of those events is reduced by a factor 100. Requires that the 'event_norm' is set to 'bias'.") #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]") @@ -5790,6 +5792,17 @@ def check_validity(self): if self['mcatnlo_delta'] and not self['parton_shower'].lower() == 'pythia8': raise InvalidRunCard("MC@NLO-DELTA only possible with matching to Pythia8") + # check that the flavour_bias is consistent + if len(self['flavour_bias']) != 2: + raise InvalidRunCard("'flavour_bias' should contain exactly two numbers: the abs(PDG) of the flavour to enhance, and the enhancement multiplication factor.") + for i in self['flavour_bias']: + if i < 0: + raise InvalidRunCard("flavour and multiplication factor should be positive in the flavour_bias parameter") + if self['flavour_bias'][1] != 1 and self['event_norm'] != 'bias': + logger.warning('Non-trivial flavour enhancement factor: setting event normalisation to "bias"') + self['event_norm']='bias' + + # check that ebeam is bigger than the proton mass. for i in [1,2]: # do not for proton mass if not proton PDF (or when scan initialization) diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/check_param_card.py b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/check_param_card.py index bc785b5de6..a34705f6bc 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/check_param_card.py +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/check_param_card.py @@ -1092,11 +1092,11 @@ def write_summary(self, path, order=None, lastline=False, nbcol=20): to_print = self.cross[-1:] for info in to_print: name = info['run_name'] - bench = info['bench'] + bench = [float(x) for x in info['bench']] data = [] for k in keys: if k in info: - data.append(info[k]) + data.append(float(info[k])) else: data.append(0.) ff.write(formatting % tuple([name] + bench + data)) diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/common_run_interface.py b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/common_run_interface.py index 9ff7390cf5..541cd6294b 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/common_run_interface.py +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/common_run_interface.py @@ -750,8 +750,8 @@ def __init__(self, me_dir, options, *args, **opts): else: self.ninitial = self.proc_characteristics['ninitial'] - def make_make_all_html_results(self, folder_names = [], jobs=[]): - return sum_html.make_all_html_results(self, folder_names, jobs) + def make_make_all_html_results(self, folder_names = [], jobs=[], get_attr=None): + return sum_html.make_all_html_results(self, folder_names, jobs, get_attr) def write_RunWeb(self, me_dir): @@ -3831,7 +3831,7 @@ def store_scan_result(self): """return the information that need to be kept for the scan summary. Auto-width are automatically added.""" - return {'cross': self.results.current['cross']} + return {'cross': self.results.current['cross'], 'error': self.results.current['error']} def add_error_log_in_html(self, errortype=None): @@ -5135,10 +5135,10 @@ def init_run(self, cards): self.special_shortcut.update( {'ebeam':([float],['run_card ebeam1 %(0)s', 'run_card ebeam2 %(0)s']), 'lpp': ([int],['run_card lpp1 %(0)s', 'run_card lpp2 %(0)s' ]), - 'lhc': ([int],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), + 'lhc': ([float],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), 'lep': ([int],['run_card lpp1 0', 'run_card lpp2 0', 'run_card ebeam1 %(0)s/2', 'run_card ebeam2 %(0)s/2']), 'ilc': ([int],['run_card lpp1 0', 'run_card lpp2 0', 'run_card ebeam1 %(0)s/2', 'run_card ebeam2 %(0)s/2']), - 'lcc': ([int],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), + 'lcc': ([float],['run_card lpp1 1', 'run_card lpp2 1', 'run_card ebeam1 %(0)s*1000/2', 'run_card ebeam2 %(0)s*1000/2']), 'fixed_scale': ([float],['run_card fixed_fac_scale T', 'run_card fixed_ren_scale T', 'run_card scale %(0)s', 'run_card dsqrt_q2fact1 %(0)s' ,'run_card dsqrt_q2fact2 %(0)s']), 'no_parton_cut':([],['run_card nocut T']), 'cm_velocity':([float], [lambda self :self.set_CM_velocity]), @@ -6740,7 +6740,15 @@ def postcmd(self, stop, line): return ending_question - + def help_update(self): + logger.info(""" syntax: update dependent: Change the mass/width of particles which are not free parameter for the model. + update missing: add to the current param_card missing blocks/parameters. + update to_slha1: pass SLHA2 card to SLHA1 convention. (beta) + update to_slha2: pass SLHA1 card to SLHA2 convention. (beta) + update to_full [run_card] + update XXX [where XXX correspond to a hidden block of the run_card]: + supported block are %s + """, ', '.join(self.update_block)) def do_update(self, line, timer=0): @@ -6756,6 +6764,8 @@ def do_update(self, line, timer=0): logger.warning('miss an argument (dependent or missing). Please retry') return + args[0] = args[0].lower() + if args[0] == 'dependent': if not self.mother_interface: logger.warning('Failed to update dependent parameter. This might create trouble for external program (like MadSpin/shower/...)') @@ -6805,10 +6815,11 @@ def do_update(self, line, timer=0): self.modified_card.add('run') # delay writting of the run_card logger.info('add optional block %s to the run_card', args[0]) else: - self.help_update() + self.do_help('update') logger.warning('unvalid options for update command. Please retry') + def update_to_full(self, line): """ trigger via update to_full LINE""" diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/extended_cmd.py b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/extended_cmd.py index 789976beee..c321fd88e5 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/extended_cmd.py +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/extended_cmd.py @@ -1317,6 +1317,8 @@ def nice_error_handling(self, error, line): debug_file = open(self.debug_output, 'a') traceback.print_exc(file=debug_file) + if __debug__: + traceback.print_exc() if hasattr(error, 'filename'): debug_file.write("Related File: %s\n" % error.filename) # Create a nice error output @@ -1928,7 +1930,8 @@ def do_display(self, line, output=sys.stdout): for i, name in enumerate(split): try: __import__('.'.join(split[:i+1])) - exec('%s=sys.modules[\'%s\']' % (split[i], '.'.join(split[:i+1]))) + tmp = {} + exec('%s=sys.modules[\'%s\']' % (split[i], '.'.join(split[:i+1])), globals(),tmp) except ImportError: try: var = eval(args[1]) @@ -1939,7 +1942,7 @@ def do_display(self, line, output=sys.stdout): outstr += 'EXTERNAL:\n' outstr += misc.nice_representation(var, nb_space=4) else: - var = eval(args[1]) + var = eval(args[1], globals(), tmp) outstr += 'EXTERNAL:\n' outstr += misc.nice_representation(var, nb_space=4) diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/file_writers.py b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/file_writers.py index 526756129f..74ba0d195c 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/file_writers.py +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/file_writers.py @@ -140,10 +140,6 @@ def preprocess_template(self, input_lines, context={}): else: raise self.FileWriterError("%s not string" % repr(input_lines)) - # Setup the contextual environment - for contextual_variable, value in context.items(): - exec('%s=%s'%(str(contextual_variable),repr(value))) - res = [] # The variable below tracks the conditional statements structure if_stack = [] @@ -166,7 +162,7 @@ def preprocess_template(self, input_lines, context={}): # Treat an if statement elif preproc_command.group('command')=='if': try: - if_stack.append(eval(preproc_command.group('body'))==True) + if_stack.append(eval(preproc_command.group('body'), globals(), context)==True) except Exception as e: raise self.FilePreProcessingError('Could not evaluate'+\ "python expression '%s' given the context %s provided."%\ diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/files.py b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/files.py index 551b71ddb6..3061b007e7 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/files.py +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/files.py @@ -147,9 +147,14 @@ def cp(path1, path2, log=True, error=False): path2 = format_path(path2) try: shutil.copy(path1, path2) + except shutil.Error as why: + logger.debug('no cp since identical: %s', why) + return except IOError as why: import madgraph.various.misc as misc try: + if 'same file' in str(why): + return if os.path.exists(path2): path2 = os.path.join(path2, os.path.split(path1)[1]) misc.copytree(path1, path2) @@ -157,12 +162,10 @@ def cp(path1, path2, log=True, error=False): if error: raise if log: - logger.warning(why) + logger.warning("fail to cp", path1, path2, why) else: - misc.sprint("fail to cp", why) - except shutil.Error: - # idetical file - pass + misc.sprint("fail to cp",path1,path2, why) + def rm(path, log=True): """removes path, that can be a single element or a list""" diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/gen_cardhtml-pl b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/gen_cardhtml-pl index 1810c6c082..6e0e06533d 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/gen_cardhtml-pl +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/gen_cardhtml-pl @@ -137,7 +137,7 @@ until($listpos>$#incard){ print PAGE " Model: $model \n"; print PAGE " \n \n
\n"; print PAGE " \n"; - print PAGE "\"\" \n"; + print PAGE "\"\" \n"; print PAGE "
\n"; print PAGE " \n \n \n"; print PAGE " \n"; diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/gen_crossxhtml.py b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/gen_crossxhtml.py index 681bf9d09b..3114a4350c 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/gen_crossxhtml.py +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/gen_crossxhtml.py @@ -133,7 +133,7 @@ class AllResults(dict): web = False - _run_entries = ['cross', 'error','nb_event_pythia','run_mode','run_statistics', + _run_entries = ['cross', 'error','axsec','nb_event_pythia','run_mode','run_statistics', 'nb_event','cross_pythia','error_pythia', 'nb_event_pythia8','cross_pythia8','error_pythia8', 'shower_dir'] diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/gen_jpeg-pl b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/gen_jpeg-pl index 87d03da394..31b7e9fe55 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/gen_jpeg-pl +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/gen_jpeg-pl @@ -1,16 +1,16 @@ #!/usr/bin/perl -w #--------------------------------------------------------------------- -# Run GS to create jpeg files defined as $gs +# Run GS to create PNG files defined as $gs #--------------------------------------------------------------------- -system("/bin/bash -c \"rm -f matrix*.jpg\" "); +system("/bin/bash -c \"rm -f matrix*.png\" "); $imatrix = ""; if (! -e "matrix.ps") {$imatrix = 1;} -$max_jpg = 2; -if ($imatrix eq "") {$max_jpg = 5;} -# add 1 to max_jpg, to get max_jpg pages -$max_jpg += 1; +$max_png = 2; +if ($imatrix eq "") {$max_png = 5;} +# add 1 to max_png, to get max_png pages +$max_png += 1; open(PAGE,"> diagrams.html") || die "Error creating diagrams.html"; print PAGE "\ \n"; print PAGE "\ \n"; @@ -21,22 +21,22 @@ while ( -e "matrix$imatrix.ps"){ open(IN, "< matrix$imatrix.ps") || die "No file matrix$imatrix.ps"; open(OUT, "> matrix-1.ps") || die "Could not open file matrix-1.ps"; while () { - if ($_ =~ m/^%%Page: $max_jpg $max_jpg/) {last;} + if ($_ =~ m/^%%Page: $max_png $max_png/) {last;} else {print OUT $_, "\n";} } close(OUT); close(IN); - system "/bin/bash -c \"nice gs \-sDEVICE\=jpeg \-sOutputFile\=matrix$imatrix\%00d.jpg \-q \-dNOPAUSE \-dBATCH matrix-1.ps > /dev/null\""; + system "/bin/bash -c \"nice gs \-sDEVICE\=pngmono \-r150 \-sOutputFile\=matrix$imatrix\%00d.png \-q \-dNOPAUSE \-dBATCH matrix-1.ps > /dev/null\""; system "rm -f matrix-1.ps"; -# Determine how many jpg files we have +# Determine how many png files we have $pages=1; - while(-e "matrix$imatrix$pages.jpg"){ + while(-e "matrix$imatrix$pages.png"){ $pages++; }#end of while #reduce it by one - if ($pages > $max_jpg){ + if ($pages > $max_png){ $pages -= 1; } # Find name of process @@ -45,24 +45,24 @@ while ( -e "matrix$imatrix.ps"){ if ($proc =~ /Process: (.+?)(\s\w+=\d+)*$/) { $proc = $1; } print PAGE "

To save bandwidth not all diagrams were converted to jpeg."; + if (-e "matrix$imatrix$max_png.png" ) { + print PAGE "

To save bandwidth not all diagrams were converted to PNG."; print PAGE "

To view all diagrams click on "; print PAGE "\ postscript. \<\/A\> \ \n"; # # Delete files which aren't included in diagrams.html # - system ("/bin/bash -c \"rm -f matrix$max_jpg.jpg\" "); + system ("/bin/bash -c \"rm -f matrix$max_png.png\" "); } # -# Now create jpeg file for card +# Now create PNG file for card # - if (! -e "../../HTML/card.jpg") { + if (! -e "../../HTML/card.png") { system ("/bin/bash -c \"head -352 matrix$imatrix.ps >& junk.ps\" "); open(JUNK,">> junk.ps") || die "Error opening junk.ps"; @@ -72,7 +72,7 @@ while ( -e "matrix$imatrix.ps"){ system ("/bin/bash -c \"cat matrix$imatrix.ps | sed 1,352d >> junk.ps\" "); - system "/bin/bash -c \"nice gs \-sDEVICE\=jpeg \-sOutputFile\=card.jpg \-q \-dNOPAUSE \-dBATCH \-g180x150 ./junk.ps; rm -f junk.ps; cp -p card.jpg ../../HTML/card.jpg > /dev/null\" "; + system "/bin/bash -c \"nice gs \-sDEVICE\=pngmono \-sOutputFile\=card.png \-q \-dNOPAUSE \-dBATCH \-g180x150 ./junk.ps; rm -f junk.ps; cp -p card.png ../../HTML/card.png > /dev/null\" "; } if ($imatrix eq "") {$imatrix = 0;} $imatrix = $imatrix + 1; @@ -82,3 +82,4 @@ print PAGE "\n"; print PAGE "\<\/BODY\> \n"; print PAGE "\<\/HTML\> \n"; close(PAGE); + diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/gen_ximprove.py b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/gen_ximprove.py index 415ecc9de0..d5d7fc8faf 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/gen_ximprove.py +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/gen_ximprove.py @@ -30,6 +30,7 @@ import stat import sys import six +import time from six.moves import range from six.moves import zip @@ -304,6 +305,7 @@ def get_helicity(self, to_submit=True, clean=True): logger.debug('(%s) nb_hel: %s zero amp: %s bad_amps_hel: %s/%s', split_file[-1], len(good_hels),len(bad_amps),len(bad_amps_perhel), len(good_hels)*nb_amp ) if len(good_hels) == 1: files.cp(matrix_file, matrix_file.replace('orig','optim')) + files.cp(matrix_file.replace('.f','.o'), matrix_file.replace('orig','optim').replace('.f','.o')) continue # avoid optimization if onlye one helicity gauge = self.cmd.proc_characteristics['gauge'] @@ -1059,6 +1061,7 @@ def __init__(self, cmd, opt=None): # parameter for the gridpack run self.nreq = 2000 self.iseed = 4321 + self.maxevts = 2500 # placeholder for information self.results = 0 #updated in launch/update_html @@ -1200,6 +1203,10 @@ def reset_multijob(self): def write_multijob(self, Channel, nb_split): """ """ if nb_split <=1: + try: + os.remove(pjoin(self.me_dir, 'SubProcesses', Channel.get('name'), 'multijob.dat')) + except OSError: + pass return f = open(pjoin(self.me_dir, 'SubProcesses', Channel.get('name'), 'multijob.dat'), 'w') f.write('%i\n' % nb_split) @@ -1828,17 +1835,17 @@ class gen_ximprove_gridpack(gen_ximprove_v4): 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 gen_events_security = 1.00 - def __new__(cls, *args, **opts): + def __new__(cls, cmd, opts): cls.force_class = 'gridpack' - return super(gen_ximprove_gridpack, cls).__new__(cls, *args, **opts) + return super(gen_ximprove_gridpack, cls).__new__(cls, cmd, opts) - def __init__(self, *args, **opts): + def __init__(self, cmd, opts): self.ngran = -1 + self.nprocs = 1 self.gscalefact = {} self.readonly = False if 'ngran' in opts: @@ -1846,9 +1853,18 @@ def __init__(self, *args, **opts): # del opts['ngran'] if 'readonly' in opts: self.readonly = opts['readonly'] - super(gen_ximprove_gridpack,self).__init__(*args, **opts) + if 'nprocs' in opts: + self.nprocs = int(opts['nprocs']) + if 'maxevts' in opts and self.nprocs > 1: + self.max_request_event = int(opts['maxevts']) + super(gen_ximprove_gridpack,self).__init__(cmd, opts) if self.ngran == -1: self.ngran = 1 + + if self.nprocs > 1: + self.combining_job = 0 + else: + self.combining_job = sys.maxsize def find_job_for_event(self): """return the list of channel that need to be improved""" @@ -1876,8 +1892,8 @@ def find_job_for_event(self): continue # no event to generate events self.gscalefact[tag] = max(1, 1/(goal_lum * C.get('axsec')/ self.ngran)) #need to generate events - logger.debug('request events for ', C.get('name'), 'cross=', - C.get('axsec'), 'needed events = ', goal_lum * C.get('axsec')) + logger.debug('request events for %s cross=%d needed events = %d', + C.get('name'), C.get('axsec'), goal_lum * C.get('axsec')) to_refine.append(C) logger.info('need to improve %s channels' % len(to_refine)) @@ -1897,8 +1913,13 @@ def get_job_for_event(self): 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 - + nb_split = int(max(1,((needed_event-1)// self.max_request_event) +1)) + if not self.split_channels: + nb_split = 1 + if nb_split > self.max_splitting: + 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')) @@ -1908,13 +1929,16 @@ def get_job_for_event(self): nevents = self.max_event_in_iter if nevents < self.min_event_in_iter: + nb_split = int(nb_split * nevents / self.min_event_in_iter) + 1 # sr dangerous? nevents = self.min_event_in_iter # # 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) - + # write the multi-job information + self.write_multijob(C, nb_split) + #create the info dict assume no splitting for the default info = {'name': self.cmd.results.current['run_name'], 'script_name': 'unknown', @@ -1925,7 +1949,7 @@ def get_job_for_event(self): 'nevents': nevents, #int(nevents*self.gen_events_security)+1, 'maxiter': self.max_iter, 'miniter': self.min_iter, - 'precision': -1*int(needed_event)/C.get('axsec'), + 'precision': -goal_lum/nb_split, # -1*int(needed_event)/C.get('axsec'), 'requested_event': needed_event, 'nhel': self.run_card['nhel'], 'channel': C.name.replace('G',''), @@ -1938,27 +1962,59 @@ def get_job_for_event(self): basedir = pjoin(os.path.dirname(__file__), '..','..','SubProcesses', info['P_dir'], info['directory']) info['base_directory'] = basedir - jobs.append(info) - + if nb_split == 1: + jobs.append(info) + else: + for i in range(nb_split): + new_info = dict(info) + new_info['offset'] = i+1 + new_info['directory'] += self.alphabet[i % 26] + str((i+1)//26) + new_info['base_directory'] = info['directory'] + jobs.append(new_info) write_dir = '.' if self.readonly else None self.create_ajob(pjoin(self.me_dir, 'SubProcesses', 'refine.sh'), jobs, write_dir) + if self.nprocs > 1: + nprocs_cluster = cluster.MultiCore(nb_core=self.nprocs) + gridpack_start = time.time() + def gridpack_wait_monitoring(Idle, Running, Done): + if Idle+Running+Done == 0: + return + logger.info("Gridpack event generation: %s Idle, %s Running, %s Done [%s]" + % (Idle, Running, Done, misc.format_time(time.time()-gridpack_start))) + done = [] for j in jobs: - if j['P_dir'] in done: - continue - done.append(j['P_dir']) + if self.nprocs == 1: + if j['P_dir'] in done: + continue + done.append(j['P_dir']) + # Give a little status. Sometimes these jobs run very long, and having hours without any + # console output can be a bit frightening and make users think we are looping. + if len(done)%5==0: + logger.info(f"Working on job {len(done)} of {len(jobs)}") + # set the working directory path. pwd = pjoin(os.getcwd(),j['P_dir']) if self.readonly else pjoin(self.me_dir, 'SubProcesses', j['P_dir']) - exe = pjoin(pwd, 'ajob1') + exe = pjoin(pwd, j['script_name']) st = os.stat(exe) os.chmod(exe, st.st_mode | stat.S_IEXEC) # run the code\ - cluster.onecore.launch_and_wait(exe, cwd=pwd, packet_member=j['packet']) + if self.nprocs == 1: + cluster.onecore.launch_and_wait(exe, cwd=pwd, packet_member=j['packet']) + else: + nprocs_cluster.cluster_submit(exe, cwd=pwd, packet_member=j['packet']) write_dir = '.' if self.readonly else pjoin(self.me_dir, 'SubProcesses') + if self.nprocs > 1: + nprocs_cluster.wait(self.me_dir, gridpack_wait_monitoring) + + if self.readonly: + combine_runs.CombineRuns(write_dir) + else: + combine_runs.CombineRuns(self.me_dir) self.check_events(goal_lum, to_refine, jobs, write_dir) def check_events(self, goal_lum, to_refine, jobs, Sdir): diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/hel_recycle.py b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/hel_recycle.py index 1471de4bcb..978ba6575e 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/hel_recycle.py +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/hel_recycle.py @@ -550,7 +550,7 @@ def get_jamp_lines(self, line): def get_amp2_lines(self, line): if line.startswith(' DO I = 1, NCOLOR'): self.in_amp2 = False - elif not line.isspace(): + elif not line.isspace() and 'DENOM' not in line: self.template_dict['amp2_lines'] += f'{line[0:6]} {self.add_indices(line[6:])}' def prepare_bools(self): diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/histograms.py b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/histograms.py index 51ae2914fc..d68c560806 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/histograms.py +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/histograms.py @@ -1149,11 +1149,8 @@ def parse_one_histo_from_stream(self, stream, all_weight_header, boundaries = [0.0,0.0] for j, weight in \ enumerate(HwU.histo_bin_weight_re.finditer(line_bin)): - if (j == len(weight_header)): - continue - if j == len(all_weight_header): - raise HwU.ParseError("There is more bin weights"+\ - " specified than expected (%i)"%len(weight_header)) + #if (j == len(weight_header)): + # continue if selected_central_weight == all_weight_header[j]: bin_weights['central'] = float(weight.group('weight')) if all_weight_header[j] == 'boundary_xmin': @@ -2480,14 +2477,14 @@ def get_main_central_plot_lines(HwU_name, block_position, color_index, # return [template_no_stat%rep_dic]+\ # ([template%rep_dic] if show_mc_uncertainties else []) - # The use of sqrt(-1) is just a trick to prevent the line to display + # The use of 1/0 is just a trick to prevent the line to display res = [] - rep_dic['data'] = '($3 < 0 ? sqrt(-1) : $3)' + rep_dic['data'] = '($3 < 0 ? 1/0 : $3)' res.append(template_no_stat%rep_dic) rep_dic['title'] = " title ''" if show_mc_uncertainties: res.append(template%rep_dic) - rep_dic['data'] = '($3 >= 0 ? sqrt(-1) : abs($3))' + rep_dic['data'] = '($3 >= 0 ? 1/0 : abs($3))' rep_dic['ls'] = ' ls %d'%(100+color_index) res.append(template_no_stat%rep_dic) if show_mc_uncertainties: @@ -2739,13 +2736,13 @@ def ratio_no_correlations(wgtsA, wgtsB): """#-- rendering subhistograms '%(subhistogram_type)s' %(unset label)s %(set_format_y)s +%(set_yscale)s set yrange [%(ymin).4e:%(ymax).4e] set origin %(origin_x).4e, %(origin_y).4e set size %(size_x).4e, %(size_y).4e set mytics %(mytics)d %(set_ytics)s %(set_format_x)s -%(set_yscale)s %(set_ylabel)s %(set_histo_label)s plot \\""" @@ -2878,7 +2875,7 @@ def ratio_no_correlations(wgtsA, wgtsB): # We decide to show uncertainties in the main plot only if they # are part of a monocolor band. Otherwise, they will only be - # shown in the first subplot. Notice that plotting 'sqrt(-1)' + # shown in the first subplot. Notice that plotting '1/0' # is just a trick so as to have only the key printed with no # line @@ -2890,7 +2887,7 @@ def ratio_no_correlations(wgtsA, wgtsB): '%s, scale variation'%title, band='scale' in use_band) else: uncertainty_plot_lines[-1]['scale'] = \ - ["sqrt(-1) ls %d title '%s'"%(color_index+10,'%s, scale variation'%title)] + ["1/0 ls %d title '%s'"%(color_index+10,'%s, scale variation'%title)] # And now PDF_variation if available if not PDF_var_pos is None and len(PDF_var_pos)>0: if 'pdf' in use_band: @@ -2899,7 +2896,7 @@ def ratio_no_correlations(wgtsA, wgtsB): '%s, PDF variation'%title, band='pdf' in use_band) else: uncertainty_plot_lines[-1]['pdf'] = \ - ["sqrt(-1) ls %d title '%s'"%(color_index+20,'%s, PDF variation'%title)] + ["1/0 ls %d title '%s'"%(color_index+20,'%s, PDF variation'%title)] # And now merging variation if available if not merging_var_pos is None and len(merging_var_pos)>0: if 'merging_scale' in use_band: @@ -2908,7 +2905,7 @@ def ratio_no_correlations(wgtsA, wgtsB): '%s, merging scale variation'%title, band='merging_scale' in use_band) else: uncertainty_plot_lines[-1]['merging_scale'] = \ - ["sqrt(-1) ls %d title '%s'"%(color_index+30,'%s, merging scale variation'%title)] + ["1/0 ls %d title '%s'"%(color_index+30,'%s, merging scale variation'%title)] # And now alpsfact variation if available if not alpsfact_var_pos is None and len(alpsfact_var_pos)>0: if 'alpsfact' in use_band: @@ -2917,7 +2914,7 @@ def ratio_no_correlations(wgtsA, wgtsB): '%s, alpsfact variation'%title, band='alpsfact' in use_band) else: uncertainty_plot_lines[-1]['alpsfact'] = \ - ["sqrt(-1) ls %d title '%s'"%(color_index+40,'%s, alpsfact variation'%title)] + ["1/0 ls %d title '%s'"%(color_index+40,'%s, alpsfact variation'%title)] # plot_lines.append( # "'%s' index %d using (($1+$2)/2):3 ls %d title '%s'"\ diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/launch_plugin.py b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/launch_plugin.py index 0924927785..ba08c10340 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/launch_plugin.py +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/launch_plugin.py @@ -33,7 +33,7 @@ def compile(self, *args, **opts): if 'cwd' in opts and os.path.basename(opts['cwd']) == 'Source': path = pjoin(opts['cwd'], 'make_opts') common_run_interface.CommonRunCmd.update_make_opts_full(path, - {'FPTYPE': self.run_card['floating_type'] }) + {'override FPTYPE': self.run_card['floating_type'] }) misc.sprint('FPTYPE checked') cudacpp_supported_backends = [ 'fortran', 'cuda', 'hip', 'cpp', 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z', 'cppauto' ] if args and args[0][0] == 'madevent' and hasattr(self, 'run_card'): @@ -76,7 +76,7 @@ def reset_makeopts(self, old_value, new_value, name): if not hasattr(self, 'path'): raise Exception if name == 'floating_type': - common_run_interface.CommonRunCmd.update_make_opts_full({'FPTYPE': new_value}) + common_run_interface.CommonRunCmd.update_make_opts_full({'override FPTYPE': new_value}) else: raise Exception Sourcedir = pjoin(os.path.dirname(os.path.dirname(self.path)), 'Source') diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/lhe_parser.py b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/lhe_parser.py index f6e47956cd..76ded329c0 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/lhe_parser.py +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/lhe_parser.py @@ -2953,8 +2953,8 @@ def pt(self): @property def pseudorapidity(self): - norm = math.sqrt(self.px**2 + self.py**2+self.pz**2) - return 0.5* math.log((norm - self.pz) / (norm + self.pz)) + norm = math.sqrt(self.px**2 + self.py**2 + self.pz**2) + return 0.5* math.log((norm + self.pz) / (norm - self.pz)) @property def rapidity(self): diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/madevent_interface.py b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/madevent_interface.py index 85e5bcf5e3..2852f1d4d8 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/madevent_interface.py +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/madevent_interface.py @@ -1171,10 +1171,10 @@ def check_survey(self, args, cmd='survey'): for opt,value in self._survey_options.items(): if arg.startswith('--%s=' % opt): exec('self.opts[\'%s\'] = %s(arg.split(\'=\')[-1])' % \ - (opt, value[0])) + (opt, value[0]), globals(), {'self':self, 'arg':arg}) arg = "" if arg != "": raise Exception - except Exception: + except Exception as error: self.help_survey() raise self.InvalidCmd('invalid %s argument'% arg) @@ -3656,9 +3656,11 @@ def do_refine(self, line): else: self.refine_mode = "new" - cross, error = self.make_make_all_html_results() + cross, error, across = self.make_make_all_html_results(get_attr=('xsec','xerru','axsec')) + self.results.add_detail('cross', cross) self.results.add_detail('error', error) + self.results.add_detail('axsec', across) self.results.add_detail('run_statistics', dict(self.results.get_detail('run_statistics'))) @@ -3786,7 +3788,7 @@ def split(a, n): for i, local_G in enumerate(split(Gdirs, nb_chunk)): line = [pjoin(self.me_dir, "Events", self.run_name, "partials%d.lhe.gz" % i)] line.append(pjoin(self.me_dir, 'Events', self.run_name, '%s_%s_banner.txt' % (self.run_name, tag))) - line.append(str(self.results.current['cross'])) + line.append(str(self.results.current.get('axsec'))) line += local_G partials_info.append(self.do_combine_events_partial(' '.join(line), preprocess_only=True)) mycluster.submit(sys.executable, @@ -6749,7 +6751,7 @@ def get_subP_ids(path): class GridPackCmd(MadEventCmd): """The command for the gridpack --Those are not suppose to be use interactively--""" - def __init__(self, me_dir = None, nb_event=0, seed=0, gran=-1, *completekey, **stdin): + def __init__(self, me_dir = None, nb_event=0, seed=0, gran=-1, nprocs=1, maxevts=2500, *completekey, **stdin): """Initialize the command and directly run""" # Initialize properly @@ -6759,6 +6761,8 @@ 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.nprocs = nprocs + self.maxevts = maxevts self.options['automatic_html_opening'] = False #write the grid_card.dat on disk @@ -6874,7 +6878,7 @@ def launch(self, nb_event, seed): #misc.call([pjoin(self.me_dir,'bin','refine4grid'), # str(nb_event), '0', 'Madevent','1','GridRun_%s' % seed], # cwd=self.me_dir) - self.refine4grid(nb_event) + self.gridpack_cross = self.refine4grid(nb_event) # 3) Combine the events/pythia/... self.exec_cmd('combine_events') @@ -6902,6 +6906,8 @@ def refine4grid(self, nb_event): precision = nb_event + across= self.make_make_all_html_results(get_attr='axsec') + self.opts = dict([(key,value[1]) for (key,value) in \ self._survey_options.items()]) @@ -6915,8 +6921,9 @@ def refine4grid(self, nb_event): 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} + refine_opt = {'err_goal': nb_event, 'split_channels': True, + 'ngran':self.granularity, 'readonly': self.readonly, + 'nprocs': self.nprocs, 'maxevts': self.maxevts} 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 @@ -6926,7 +6933,7 @@ def refine4grid(self, nb_event): #print 'run combine!!!' #combine_runs.CombineRuns(self.me_dir) - return + return across #update html output Presults = sum_html.collect_result(self) cross, error = Presults.xsec, Presults.xerru @@ -7051,10 +7058,14 @@ def do_combine_events(self, line): sum_axsec += result.get('axsec')*gscalefact[Gdir] if len(AllEvent) >= 80: #perform a partial unweighting - if self.results.current['cross'] == 0 and self.run_card['gridpack']: - nb_event= self.nb_event + if not self.results.current.get('axsec'): + if self.run_card['gridpack'] and self.gridpack_cross: + nb_event = min(abs(1.05*self.nb_event*sum_axsec/self.gridpack_cross),self.nb_event) + else: + nb_event= self.nb_event else: - nb_event = min(abs(1.01*self.nb_event*sum_axsec/self.results.current['cross']),self.run_card['nevents']) + nb_event = min(abs(1.01*self.nb_event*sum_axsec/self.results.current.get('axsec')),self.run_card['nevents'], self.nb_event, self.gridpack_cross, sum_axsec) + misc.sprint(nb_event, self.results.current.get('axsec'), self.gridpack_cross) AllEvent.unweight(pjoin(outdir, self.run_name, "partials%s.lhe.gz" % partials), get_wgt, log_level=5, trunc_error=1e-2, event_target=nb_event) AllEvent = lhe_parser.MultiEventFile() @@ -7068,6 +7079,7 @@ def do_combine_events(self, line): for data in partials_info: AllEvent.add(*data) + sum_xsec += data[1] if not hasattr(self,'proc_characteristic'): self.proc_characteristic = self.get_characteristics() diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/restore_data b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/restore_data index 6205bb9567..407ed7aa91 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/restore_data +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/restore_data @@ -48,8 +48,17 @@ for i in `cat subproc.mg` ; do cd ../ done +# check if we are on a Mac, otherwise assume Linux +if [[ "$OSTYPE" == "darwin"* ]]; then + # no nproc on Mac, so use sysctl instead + # use -S1024 because there is a limit on the length of the command + xargs_opts="-P $(sysctl -n hw.ncpu) -S1024" +else + xargs_opts="-P $(nproc --all)" +fi + find . -mindepth 2 -maxdepth 2 -type d -name 'G*' -print0 \ - | xargs --null -P "$(nproc --all)" -I{} bash -c " + | xargs --null ${xargs_opts} -I{} bash -c " cd {} for j in $1_results.dat ; do if [[ -e \$j ]] ; then diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/sum_html.py b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/sum_html.py index 9dd5826f71..fb8dd3a74a 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/sum_html.py +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/sum_html.py @@ -770,7 +770,7 @@ def collect_result(cmd, folder_names=[], jobs=None, main_dir=None): return all -def make_all_html_results(cmd, folder_names = [], jobs=[]): +def make_all_html_results(cmd, folder_names = [], jobs=[], get_attr=None): """ folder_names and jobs have been added for the amcatnlo runs """ run = cmd.results.current['run_name'] if not os.path.exists(pjoin(cmd.me_dir, 'HTML', run)): @@ -794,7 +794,12 @@ def make_all_html_results(cmd, folder_names = [], jobs=[]): fsock.write('%s

' % Presults.get_html(run, unit, cmd.me_dir)) fsock.write('%s
' % P_text) - return Presults.xsec, Presults.xerru + if not get_attr: + return Presults.xsec, Presults.xerru + else: + if isinstance(get_attr, tuple): + return [getattr(Presults, _) for _ in get_attr] + return getattr(Presults, get_attr) diff --git a/epochX/cudacpp/susy_gg_tt.mad/bin/madevent b/epochX/cudacpp/susy_gg_tt.mad/bin/madevent index dff9711b73..9c5363e682 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/madevent +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/madevent @@ -178,6 +178,17 @@ force_run = False if (args and args[0] == 'treatcards'): force_run=True + +# check that madgraph is not in PYTHONPATH +try: + import madgraph +except ImportError: + pass +else: + logger.getLogger('madgraph').error('Looks like you do have madgraph in your PYTHONPATH (or you run this executable from the main MG5aMC directory). This executable will likely not work in such case.') + + + # Call the cmd interface main loop try: if '-h' in args or '--help' in args: diff --git a/epochX/cudacpp/susy_gg_tt.mad/src/HelAmps_MSSM_SLHA2.h b/epochX/cudacpp/susy_gg_tt.mad/src/HelAmps_MSSM_SLHA2.h index 9ed58e24f1..460544122c 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/src/HelAmps_MSSM_SLHA2.h +++ b/epochX/cudacpp/susy_gg_tt.mad/src/HelAmps_MSSM_SLHA2.h @@ -8,7 +8,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/susy_gg_tt.mad/src/Parameters_MSSM_SLHA2.cc b/epochX/cudacpp/susy_gg_tt.mad/src/Parameters_MSSM_SLHA2.cc index aa00d6a9e4..aa7f4d3b2e 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/src/Parameters_MSSM_SLHA2.cc +++ b/epochX/cudacpp/susy_gg_tt.mad/src/Parameters_MSSM_SLHA2.cc @@ -7,7 +7,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/susy_gg_tt.mad/src/Parameters_MSSM_SLHA2.h b/epochX/cudacpp/susy_gg_tt.mad/src/Parameters_MSSM_SLHA2.h index 3e29f2ccbe..6cb2039b6b 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/src/Parameters_MSSM_SLHA2.h +++ b/epochX/cudacpp/susy_gg_tt.mad/src/Parameters_MSSM_SLHA2.h @@ -7,7 +7,7 @@ // Further modified by: A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/susy_gg_tt.sa/CODEGEN_cudacpp_susy_gg_tt_log.txt b/epochX/cudacpp/susy_gg_tt.sa/CODEGEN_cudacpp_susy_gg_tt_log.txt index 420090461f..64dc5c4851 100644 --- a/epochX/cudacpp/susy_gg_tt.sa/CODEGEN_cudacpp_susy_gg_tt_log.txt +++ b/epochX/cudacpp/susy_gg_tt.sa/CODEGEN_cudacpp_susy_gg_tt_log.txt @@ -1,8 +1,11 @@ +WARNING:root:python3.12 support is still experimental. For the moment re-weighting is NOT working and do expect a LOT of syntax warning. We do not advise python3.12 for production for the moment. +Running MG5 in debug mode +Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT +Plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT has marked as NOT being validated with this version: 3.6.2. +It has been validated for the last time with version: 3.6.0 Note that this is a development version. This version is intended for development/beta testing and NOT for production. This version has not been fully tested (if at all) and might have limited user support (if at all) -Running MG5 in debug mode -Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT ************************************************************ * * * W E L C O M E to * @@ -15,7 +18,7 @@ Loading plugin MG5aMC_PLUGIN.CUDACPP_OUTPUT * * * * * * * * * * * * -* VERSION 3.6.0 2024-09-30 * +* VERSION 3.6.2 2025-03-19 * * * * WARNING: UNKNOWN DEVELOPMENT VERSION. * * WARNING: DO NOT USE FOR PRODUCTION * @@ -46,15 +49,18 @@ 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/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_tt.mg +import /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_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 set zerowidth_tchannel F import model MSSM_SLHA2 +INFO: reload from .py file +INFO: load particles +INFO: load vertices +DEBUG: model prefixing takes 0.22474145889282227  INFO: Restrict model MSSM_SLHA2 with file models/MSSM_SLHA2/restrict_default.dat . INFO: Detect SLHA2 format. keeping restricted parameter in the param_card DEBUG: Simplifying conditional expressions  @@ -550,13 +556,13 @@ 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.118 s +1 processes with 3 diagrams generated in 0.064 s Total: 1 processes with 3 diagrams output standalone_cudacpp ../TMPOUT/CODEGEN_cudacpp_susy_gg_tt Output will be done with PLUGIN: CUDACPP_OUTPUT DEBUG: Entering PLUGIN_ProcessExporter.__init__ (initialise the exporter) [output.py at line 171]  DEBUG: Entering PLUGIN_ProcessExporter.copy_template (initialise the directory) [output.py at line 176]  -INFO: Creating subdirectories in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_tt +INFO: Creating subdirectories in directory /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_tt 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 @@ -565,30 +571,30 @@ INFO: Processing color information for process: g g > t t~ @1 DEBUG: type(fortran_model)= [output.py at line 220]  DEBUG: type(me)= me=0 [output.py at line 221]  DEBUG: "need to link", self.to_link_in_P =  need to link ['nvtx.h', 'timer.h', 'timermap.h', 'ompnumthreads.h', 'GpuRuntime.h', 'GpuAbstraction.h', 'MemoryAccessHelpers.h', 'MemoryAccessVectors.h', 'MemoryAccessMatrixElements.h', 'MemoryAccessMomenta.h', 'MemoryAccessRandomNumbers.h', 'MemoryAccessWeights.h', 'MemoryAccessAmplitudes.h', 'MemoryAccessWavefunctions.h', 'MemoryAccessGs.h', 'MemoryAccessCouplingsFixed.h', 'MemoryAccessNumerators.h', 'MemoryAccessDenominators.h', 'MemoryAccessChannelIds.h', 'EventStatistics.h', 'CommonRandomNumbers.h', 'CrossSectionKernels.cc', 'CrossSectionKernels.h', 'MatrixElementKernels.cc', 'MatrixElementKernels.h', 'RamboSamplingKernels.cc', 'RamboSamplingKernels.h', 'RandomNumberKernels.h', 'CommonRandomNumberKernel.cc', 'CurandRandomNumberKernel.cc', 'HiprandRandomNumberKernel.cc', 'Bridge.h', 'BridgeKernels.cc', 'BridgeKernels.h', 'fbridge.cc', 'fbridge.inc', 'fsampler.cc', 'fsampler.inc', 'MadgraphTest.h', 'runTest.cc', 'testmisc.cc', 'testxxx_cc_ref.txt', 'valgrind.h', 'cudacpp.mk', 'testxxx.cc', 'MemoryBuffers.h', 'MemoryAccessCouplings.h', 'perf.py', 'profile.sh'] [output.py at line 222]  -INFO: Creating files in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_tt/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_ttx -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_tt/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_ttx/./CPPProcess.h -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_tt/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_ttx/./CPPProcess.cc -INFO: Created files CPPProcess.h and CPPProcess.cc in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_tt/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_ttx/. -Generated helas calls for 1 subprocesses (3 diagrams) in 0.006 s +INFO: Creating files in directory /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_tt/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_ttx +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_tt/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_ttx/./CPPProcess.h +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_tt/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_ttx/./CPPProcess.cc +INFO: Created files CPPProcess.h and CPPProcess.cc in directory /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_tt/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_ttx/. +Generated helas calls for 1 subprocesses (3 diagrams) in 0.007 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.136 s +ALOHA: aloha creates 2 routines in 0.061 s VVV1 FFV1 FFV1 FFV1 -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_tt/src/./HelAmps_MSSM_SLHA2.h -INFO: Created file HelAmps_MSSM_SLHA2.h in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_tt/src/. +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_tt/src/./HelAmps_MSSM_SLHA2.h +INFO: Created file HelAmps_MSSM_SLHA2.h in directory /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_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_cudacpp_susy_gg_tt/src/./Parameters_MSSM_SLHA2.h -FileWriter for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_tt/src/./Parameters_MSSM_SLHA2.cc +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_tt/src/./Parameters_MSSM_SLHA2.h +FileWriter for /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_tt/src/./Parameters_MSSM_SLHA2.cc INFO: Created files Parameters_MSSM_SLHA2.h and Parameters_MSSM_SLHA2.cc in directory -INFO: /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_tt/src/. and /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_tt/src/. +INFO: /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_tt/src/. and /shared/roiser/sw/madgraph4gpu/MG5aMC/TMPOUT/CODEGEN_cudacpp_susy_gg_tt/src/. quit -real 0m1.291s -user 0m1.202s -sys 0m0.072s +real 0m2.763s +user 0m1.078s +sys 0m0.145s Code generation completed in 2 seconds diff --git a/epochX/cudacpp/susy_gg_tt.sa/SubProcesses/Bridge.h b/epochX/cudacpp/susy_gg_tt.sa/SubProcesses/Bridge.h index 87aa648dd2..49b928db67 100644 --- a/epochX/cudacpp/susy_gg_tt.sa/SubProcesses/Bridge.h +++ b/epochX/cudacpp/susy_gg_tt.sa/SubProcesses/Bridge.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: S. Roiser (Nov 2021) for the MG5aMC CUDACPP plugin. -// Further modified by: S. Roiser, J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2021-2025) for the MG5aMC CUDACPP plugin. #ifndef BRIDGE_H #define BRIDGE_H 1 @@ -255,11 +255,15 @@ namespace mg5amcCpu throw std::logic_error( "Bridge constructor: FIXME! cannot choose gputhreads" ); // this should never happen! m_gpublocks = m_nevt / m_gputhreads; } +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Instantiate device Bridge (nevt=" << m_nevt << ", gpublocks=" << m_gpublocks << ", gputhreads=" << m_gputhreads << ", gpublocks*gputhreads=" << m_gpublocks * m_gputhreads << ")" << std::endl; +#endif m_pmek.reset( new MatrixElementKernelDevice( m_devMomentaC, m_devGs, m_devRndHel, m_devRndCol, m_devChannelIds, m_devMEs, m_devSelHel, m_devSelCol, m_gpublocks, m_gputhreads ) ); #else +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Instantiate host Bridge (nevt=" << m_nevt << ")" << std::endl; +#endif m_pmek.reset( new MatrixElementKernelHost( m_hstMomentaC, m_hstGs, m_hstRndHel, m_hstRndCol, m_hstChannelIds, m_hstMEs, m_hstSelHel, m_hstSelCol, m_nevt ) ); #endif // MGONGPUCPP_GPUIMPL // Create a process object, read param card and set parameters @@ -290,8 +294,10 @@ namespace mg5amcCpu throw std::runtime_error( "Bridge: gpublocks*gputhreads must equal m_nevt in set_gpugrid" ); m_gpublocks = gpublocks; m_gputhreads = gputhreads; +#ifdef MGONGPUCPP_VERBOSE std::cout << "WARNING! Set grid in Bridge (nevt=" << m_nevt << ", gpublocks=" << m_gpublocks << ", gputhreads=" << m_gputhreads << ", gpublocks*gputhreads=" << m_gpublocks * m_gputhreads << ")" << std::endl; +#endif m_pmek->setGrid( m_gpublocks, m_gputhreads ); } #endif @@ -347,7 +353,9 @@ namespace mg5amcCpu if( goodHelOnly ) return; m_pmek->computeMatrixElements( useChannelIds ); copyHostFromDevice( m_hstMEs, m_devMEs ); +#ifdef MGONGPUCPP_VERBOSE flagAbnormalMEs( m_hstMEs.data(), m_nevt ); +#endif copyHostFromDevice( m_hstSelHel, m_devSelHel ); copyHostFromDevice( m_hstSelCol, m_devSelCol ); if constexpr( std::is_same_v ) @@ -400,7 +408,9 @@ namespace mg5amcCpu } if( goodHelOnly ) return; m_pmek->computeMatrixElements( useChannelIds ); +#ifdef MGONGPUCPP_VERBOSE flagAbnormalMEs( m_hstMEs.data(), m_nevt ); +#endif if constexpr( std::is_same_v ) { memcpy( mes, m_hstMEs.data(), m_hstMEs.bytes() ); diff --git a/epochX/cudacpp/susy_gg_tt.sa/SubProcesses/GpuRuntime.h b/epochX/cudacpp/susy_gg_tt.sa/SubProcesses/GpuRuntime.h index 860c7fde16..6a4b946e74 100644 --- a/epochX/cudacpp/susy_gg_tt.sa/SubProcesses/GpuRuntime.h +++ b/epochX/cudacpp/susy_gg_tt.sa/SubProcesses/GpuRuntime.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: J. Teig (Jun 2023, based on earlier work by S. Roiser) for the MG5aMC CUDACPP plugin. -// Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2025) for the MG5aMC CUDACPP plugin. #ifndef MG5AMC_GPURUNTIME_H #define MG5AMC_GPURUNTIME_H 1 @@ -50,7 +50,7 @@ namespace mg5amcGpu // Set up CUDA application // ** NB: strictly speaking this is not needed when using the CUDA runtime API ** // Calling cudaSetDevice on startup is useful to properly book-keep the time spent in CUDA initialization - static void setUp( const bool debug = true ) + static void setUp( const bool debug = false ) // ZW: changed debug default to false { // ** NB: it is useful to call cudaSetDevice, or cudaFree, to properly book-keep the time spent in CUDA initialization // ** NB: otherwise, the first CUDA operation (eg a cudaMemcpyToSymbol in CPPProcess ctor) appears to take much longer! @@ -71,7 +71,7 @@ namespace mg5amcGpu // ** NB: strictly speaking this is not needed when using the CUDA runtime API ** // Calling cudaDeviceReset on shutdown is only needed for checking memory leaks in cuda-memcheck // See https://docs.nvidia.com/cuda/cuda-memcheck/index.html#leak-checking - static void tearDown( const bool debug = true ) + static void tearDown( const bool debug = false ) // ZW: changed debug default to false { if( debug ) std::cout << "__GpuRuntime: calling GpuDeviceReset()" << std::endl; checkGpu( gpuDeviceReset() ); diff --git a/epochX/cudacpp/susy_gg_tt.sa/SubProcesses/MatrixElementKernels.cc b/epochX/cudacpp/susy_gg_tt.sa/SubProcesses/MatrixElementKernels.cc index f463977c1a..703ea3781c 100644 --- a/epochX/cudacpp/susy_gg_tt.sa/SubProcesses/MatrixElementKernels.cc +++ b/epochX/cudacpp/susy_gg_tt.sa/SubProcesses/MatrixElementKernels.cc @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: A. Valassi (Jan 2022) for the MG5aMC CUDACPP plugin. -// Further modified by: J. Teig, A. Valassi (2022-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: J. Teig, A. Valassi, Z. Wettersten (2022-2025) for the MG5aMC CUDACPP plugin. #include "MatrixElementKernels.h" @@ -60,7 +60,9 @@ namespace mg5amcCpu #ifdef MGONGPU_CHANNELID_DEBUG MatrixElementKernelBase::dumpNevtProcessedByChannel(); #endif +#ifdef MGONGPUCPP_VERBOSE MatrixElementKernelBase::dumpSignallingFPEs(); +#endif } //-------------------------------------------------------------------------- diff --git a/epochX/cudacpp/susy_gg_tt.sa/SubProcesses/MatrixElementKernels.h b/epochX/cudacpp/susy_gg_tt.sa/SubProcesses/MatrixElementKernels.h index 7acff4b308..8da04d7945 100644 --- a/epochX/cudacpp/susy_gg_tt.sa/SubProcesses/MatrixElementKernels.h +++ b/epochX/cudacpp/susy_gg_tt.sa/SubProcesses/MatrixElementKernels.h @@ -1,7 +1,7 @@ // Copyright (C) 2020-2024 CERN and UCLouvain. // Licensed under the GNU Lesser General Public License (version 3 or later). // Created by: A. Valassi (Jan 2022) for the MG5aMC CUDACPP plugin. -// Further modified by: J. Teig, A. Valassi (2022-2024) for the MG5aMC CUDACPP plugin. +// Further modified by: J. Teig, A. Valassi, Z. Wettersten (2022-2025) for the MG5aMC CUDACPP plugin. #ifndef MATRIXELEMENTKERNELS_H #define MATRIXELEMENTKERNELS_H 1 @@ -134,7 +134,7 @@ namespace mg5amcCpu // Does this host system support the SIMD used in the matrix element calculation? // [NB: this is private, SIMD vectorization in mg5amc C++ code is currently only used in the ME calculations below MatrixElementKernelHost!] - static bool hostSupportsSIMD( const bool verbose = true ); + static bool hostSupportsSIMD( const bool verbose = false ); // ZW: default verbose false private: diff --git a/epochX/cudacpp/susy_gg_tt.sa/SubProcesses/MemoryAccessGs.h b/epochX/cudacpp/susy_gg_tt.sa/SubProcesses/MemoryAccessGs.h index 63c17a68fa..50a6aaef4d 100644 --- a/epochX/cudacpp/susy_gg_tt.sa/SubProcesses/MemoryAccessGs.h +++ b/epochX/cudacpp/susy_gg_tt.sa/SubProcesses/MemoryAccessGs.h @@ -128,6 +128,14 @@ namespace mg5amcCpu #endif } + // Locate a field (output) in a memory buffer (input) from a kernel event-indexing mechanism (internal) + // [Signature (SCALAR OR VECTOR) ===> fptype_sv* kernelAccess( fptype* buffer ) <===] + static __host__ __device__ inline fptype_sv* + kernelAccessP( fptype* buffer ) + { + return reinterpret_cast( buffer ); + } + // Locate a field (output) in a memory buffer (input) from a kernel event-indexing mechanism (internal) and the given field indexes (input) // [Signature (const, SCALAR) ===> const fptype& kernelAccessConst( const fptype* buffer ) <===] static constexpr auto kernelAccessConst_s = diff --git a/epochX/cudacpp/susy_gg_tt.sa/SubProcesses/MemoryBuffers.h b/epochX/cudacpp/susy_gg_tt.sa/SubProcesses/MemoryBuffers.h index 5bd3053393..ac5f50dc7e 100644 --- a/epochX/cudacpp/susy_gg_tt.sa/SubProcesses/MemoryBuffers.h +++ b/epochX/cudacpp/susy_gg_tt.sa/SubProcesses/MemoryBuffers.h @@ -13,6 +13,7 @@ #include "CPPProcess.h" #include "GpuRuntime.h" #include "Parameters_MSSM_SLHA2.h" +#include "processConfig.h" #include @@ -274,7 +275,8 @@ namespace mg5amcCpu typedef BufferBase BufferNumerators; // The size (number of elements) per event in a memory buffer for numerators - constexpr size_t sizePerEventNumerators = 1; + // (should be equal to the number of diagrams in the process) + constexpr size_t sizePerEventNumerators = processConfig::ndiagrams; #ifndef MGONGPUCPP_GPUIMPL // A class encapsulating a C++ host buffer for gs diff --git a/epochX/cudacpp/susy_gg_tt.sa/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_ttx/CPPProcess.cc b/epochX/cudacpp/susy_gg_tt.sa/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_ttx/CPPProcess.cc index 6867c6d67d..69a253f83b 100644 --- a/epochX/cudacpp/susy_gg_tt.sa/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_ttx/CPPProcess.cc +++ b/epochX/cudacpp/susy_gg_tt.sa/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_ttx/CPPProcess.cc @@ -7,7 +7,7 @@ // Further modified by: S. Hageboeck, O. Mattelaer, S. Roiser, J. Teig, A. Valassi, Z. Wettersten (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -25,6 +25,7 @@ #include "MemoryAccessMatrixElements.h" #include "MemoryAccessMomenta.h" #include "MemoryAccessWavefunctions.h" +#include "processConfig.h" #ifdef MGONGPU_SUPPORTS_MULTICHANNEL #include "MemoryAccessDenominators.h" @@ -96,6 +97,69 @@ namespace mg5amcGpu namespace mg5amcCpu #endif { +#ifdef MGONGPU_SUPPORTS_MULTICHANNEL + __device__ INLINE unsigned int getChannelId( const unsigned int* allChannelIds +#ifndef MGONGPUCPP_GPUIMPL + , + const int ievt00, + bool sanityCheckMixedPrecision = true +#endif + ) + { + unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr +#ifdef MGONGPUCPP_GPUIMPL + using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page + if( allChannelIds != nullptr ) + { + const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) + const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) + // NB: channelIds_sv is a scalar in CUDA + channelId = channelIds_sv; + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + } +#else // Cuda or C++ + using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events + // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) + // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + if( allChannelIds != nullptr ) + { + // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) + const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 + uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) +#ifndef MGONGPU_CPPSIMD + // NB: channelIds_sv is a scalar in no-SIMD C++ + channelId = channelIds_sv; +#else + // NB: channelIds_sv is a vector in SIMD C++ + channelId = channelIds_sv[0]; // element[0] + for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] + { + assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId + } +#endif + assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) + if( sanityCheckMixedPrecision ) + { +#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT + // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) + const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 + uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) + // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 + for( int i = 0; i < neppV; ++i ) + { + assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector + } +#endif + } + } +#endif // MGONGPUCPP_GPUIMPL + return channelId; + } +#endif // MGONGPU_SUPPORTS_MULTICHANNEL + constexpr int nw6 = CPPProcess::nw6; // dimensions of each wavefunction (HELAS KEK 91-11): e.g. 6 for e+ e- -> mu+ mu- (fermions and vectors) constexpr int npar = CPPProcess::npar; // #particles in total (external = initial + final): e.g. 4 for e+ e- -> mu+ mu- constexpr int ncomb = CPPProcess::ncomb; // #helicity combinations: e.g. 16 for e+ e- -> mu+ mu- (2**4 = fermion spin up/down ** npar) @@ -305,7 +369,7 @@ namespace mg5amcCpu COUPs[ndcoup + iicoup] = allCOUPs[ndcoup + iicoup]; // independent couplings, fixed for all events fptype* MEs = E_ACCESS::ieventAccessRecord( allMEs, ievt0 ); #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); #endif #endif @@ -315,7 +379,7 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL // Numerators and denominators for the current event (CUDA) or SIMD event page (C++) - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); #endif @@ -552,7 +616,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- @@ -920,9 +986,6 @@ namespace mg5amcCpu #ifdef MGONGPUCPP_GPUIMPL // Remember: in CUDA this is a kernel for one event, in c++ this processes n events const int ievt = blockDim.x * blockIdx.x + threadIdx.x; // index of event (thread) in grid -#ifdef MGONGPU_SUPPORTS_MULTICHANNEL - using CID_ACCESS = DeviceAccessChannelIds; // non-trivial access: buffer includes all events -#endif #else //assert( (size_t)(allmomenta) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] //assert( (size_t)(allMEs) % mgOnGpu::cppAlign == 0 ); // SANITY CHECK: require SIMD-friendly alignment [COMMENT OUT TO TEST MISALIGNED ACCESS] @@ -930,7 +993,6 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL using NUM_ACCESS = HostAccessNumerators; // non-trivial access: buffer includes all events using DEN_ACCESS = HostAccessDenominators; // non-trivial access: buffer includes all events - using CID_ACCESS = HostAccessChannelIds; // non-trivial access: buffer includes all events #endif #endif @@ -955,11 +1017,12 @@ namespace mg5amcCpu fptype_sv& MEs_sv = E_ACCESS::kernelAccess( MEs ); MEs_sv = fptype_sv{ 0 }; #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - numerators_sv = fptype_sv{ 0 }; + for( int i = 0; i < processConfig::ndiagrams; ++i ) + numerators_sv[i] = fptype_sv{ 0 }; denominators_sv = fptype_sv{ 0 }; #endif } @@ -972,17 +1035,7 @@ namespace mg5amcCpu // *** START OF PART 1a - CUDA (one event per GPU thread) *** #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the current event (CUDA) or for the whole SIMD event page (C++) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a SIMD event page - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - const unsigned int* channelIds = allChannelIds; // fix #899 (distinguish channelIds and allChannelIds) - const uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) - // NB: channelIds_sv is a scalar in CUDA - channelId = channelIds_sv; - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) - } + unsigned int channelId = getChannelId( allChannelIds ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (for the single event processed in calculate_wavefunctions) @@ -1097,38 +1150,7 @@ namespace mg5amcCpu const int ievt00 = ipagV2 * neppV; // loop on one SIMD page (neppV events) at a time #endif #ifdef MGONGPU_SUPPORTS_MULTICHANNEL - // SCALAR channelId for the whole SIMD neppV2 event page (C++), i.e. one or two neppV event page(s) - // The cudacpp implementation ASSUMES (and checks! #898) that all channelIds are the same in a neppV2 SIMD event page - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - unsigned int channelId = 0; // disable multichannel single-diagram enhancement unless allChannelIds != nullptr - if( allChannelIds != nullptr ) - { - // First - and/or only - neppV page of channels (iParity=0 => ievt0 = ievt00 + 0 * neppV) - const unsigned int* channelIds = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 ); // fix bug #899/#911 - uint_sv channelIds_sv = CID_ACCESS::kernelAccessConst( channelIds ); // fix #895 (compute this only once for all diagrams) -#ifndef MGONGPU_CPPSIMD - // NB: channelIds_sv is a scalar in no-SIMD C++ - channelId = channelIds_sv; -#else - // NB: channelIds_sv is a vector in SIMD C++ - channelId = channelIds_sv[0]; // element[0] - for( int i = 1; i < neppV; ++i ) // elements[1...neppV-1] - { - assert( channelId == channelIds_sv[i] ); // SANITY CHECK #898: check that all events in a SIMD vector have the same channelId - } -#endif - assert( channelId > 0 ); // SANITY CHECK: scalar channelId must be > 0 if multichannel is enabled (allChannelIds != nullptr) -#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT - // Second neppV page of channels (iParity=1 => ievt0 = ievt00 + 1 * neppV) - const unsigned int* channelIds2 = CID_ACCESS::ieventAccessRecordConst( allChannelIds, ievt00 + neppV ); // fix bug #899/#911 - uint_v channelIds2_v = CID_ACCESS::kernelAccessConst( channelIds2 ); // fix #895 (compute this only once for all diagrams) - // **NB! in "mixed" precision, using SIMD, calculate_wavefunctions computes MEs for TWO neppV pages with a single channelId! #924 - for( int i = 0; i < neppV; ++i ) - { - assert( channelId == channelIds2_v[i] ); // SANITY CHECKS #898 #924: all events in the 2nd SIMD vector have the same channelId as that of the 1st SIMD vector - } -#endif - } + unsigned int channelId = getChannelId( allChannelIds, ievt00 ); #endif // Running sum of partial amplitudes squared for event by event color selection (#402) // (jamp2[nParity][ncolor][neppV] for the SIMD vector - or the two SIMD vectors - of events processed in calculate_wavefunctions) @@ -1301,11 +1323,12 @@ namespace mg5amcCpu #ifdef MGONGPU_SUPPORTS_MULTICHANNEL if( allChannelIds != nullptr ) // fix segfault #892 (not 'channelIds[0] != 0') { - fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 ); + const unsigned int channelId = getChannelId( allChannelIds, ievt0, false ); + fptype* numerators = NUM_ACCESS::ieventAccessRecord( allNumerators, ievt0 * processConfig::ndiagrams ); fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 ); - fptype_sv& numerators_sv = NUM_ACCESS::kernelAccess( numerators ); + fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators ); fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators ); - MEs_sv *= numerators_sv / denominators_sv; + MEs_sv *= numerators_sv[channelId - 1] / denominators_sv; } #endif //for( int ieppV = 0; ieppV < neppV; ieppV++ ) diff --git a/epochX/cudacpp/susy_gg_tt.sa/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_ttx/CPPProcess.h b/epochX/cudacpp/susy_gg_tt.sa/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_ttx/CPPProcess.h index 24c27005b8..7a900b2e53 100644 --- a/epochX/cudacpp/susy_gg_tt.sa/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_ttx/CPPProcess.h +++ b/epochX/cudacpp/susy_gg_tt.sa/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_ttx/CPPProcess.h @@ -7,7 +7,7 @@ // Further modified by: O. Mattelaer, S. Roiser, J. Teig, A. Valassi (2020-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/susy_gg_tt.sa/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_ttx/processConfig.h b/epochX/cudacpp/susy_gg_tt.sa/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_ttx/processConfig.h new file mode 100644 index 0000000000..04a79dca0d --- /dev/null +++ b/epochX/cudacpp/susy_gg_tt.sa/SubProcesses/P1_Sigma_MSSM_SLHA2_gg_ttx/processConfig.h @@ -0,0 +1,16 @@ +// Copyright (C) 2025 CERN and UCLouvain. +// Licensed under the GNU Lesser General Public License (version 3 or later). +// Created by: S. Roiser (May 2025) for the MG5aMC CUDACPP plugin. +// Further modified by: ... for the MG5aMC CUDACPP plugin. + + +#ifndef MG5_CONFIG_SIGMA_MSSM_SLHA2_GG_TTX_H +#define MG5_CONFIG_SIGMA_MSSM_SLHA2_GG_TTX_H 1 + +namespace processConfig { + + constexpr int ndiagrams = 3; + +} + +#endif // MG5_CONFIG_SIGMA_MSSM_SLHA2_GG_TTX_H \ No newline at end of file diff --git a/epochX/cudacpp/susy_gg_tt.sa/src/HelAmps_MSSM_SLHA2.h b/epochX/cudacpp/susy_gg_tt.sa/src/HelAmps_MSSM_SLHA2.h index 9ed58e24f1..460544122c 100644 --- a/epochX/cudacpp/susy_gg_tt.sa/src/HelAmps_MSSM_SLHA2.h +++ b/epochX/cudacpp/susy_gg_tt.sa/src/HelAmps_MSSM_SLHA2.h @@ -8,7 +8,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/susy_gg_tt.sa/src/Parameters_MSSM_SLHA2.cc b/epochX/cudacpp/susy_gg_tt.sa/src/Parameters_MSSM_SLHA2.cc index aa00d6a9e4..aa7f4d3b2e 100644 --- a/epochX/cudacpp/susy_gg_tt.sa/src/Parameters_MSSM_SLHA2.cc +++ b/epochX/cudacpp/susy_gg_tt.sa/src/Parameters_MSSM_SLHA2.cc @@ -7,7 +7,7 @@ // Further modified by: J. Teig, A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/susy_gg_tt.sa/src/Parameters_MSSM_SLHA2.h b/epochX/cudacpp/susy_gg_tt.sa/src/Parameters_MSSM_SLHA2.h index 3e29f2ccbe..6cb2039b6b 100644 --- a/epochX/cudacpp/susy_gg_tt.sa/src/Parameters_MSSM_SLHA2.h +++ b/epochX/cudacpp/susy_gg_tt.sa/src/Parameters_MSSM_SLHA2.h @@ -7,7 +7,7 @@ // Further modified by: A. Valassi (2021-2024) for the MG5aMC CUDACPP plugin. //========================================================================== // This file has been automatically generated for CUDA/C++ standalone by -// MadGraph5_aMC@NLO v. 3.6.0, 2024-09-30 +// MadGraph5_aMC@NLO v. 3.6.2, 2025-03-19 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //==========================================================================

\ Postscript Diagrams for $proc\<\/A\> \ \n"; for($j=1;$j<$pages;$j++){ - print PAGE "\\"Page \ \n"; + print PAGE "\\"Page \ \n"; }#end of for # -# In case I didn't include all of the diagrams as jpeg, warn user +# In case I didn't include all of the diagrams as PNG, warn user # - if (-e "matrix$imatrix$max_jpg.jpg" ) { - print PAGE "

\ Postscript Diagrams for $proc\<\/A\> \ \n"; for($j=1;$j<$pages;$j++){ - print PAGE "\\"Page \ \n"; + print PAGE "\\"Page \ \n"; }#end of for # -# In case I didn't include all of the diagrams as jpeg, warn user +# In case I didn't include all of the diagrams as PNG, warn user # - if (-e "matrix$imatrix$max_jpg.jpg" ) { - print PAGE "

\ Postscript Diagrams for $proc\<\/A\> \ \n"; for($j=1;$j<$pages;$j++){ - print PAGE "\\"Page \ \n"; + print PAGE "\\"Page \ \n"; }#end of for # -# In case I didn't include all of the diagrams as jpeg, warn user +# In case I didn't include all of the diagrams as PNG, warn user # - if (-e "matrix$imatrix$max_jpg.jpg" ) { - print PAGE "

\ Postscript Diagrams for $proc\<\/A\> \ \n"; for($j=1;$j<$pages;$j++){ - print PAGE "\\"Page \ \n"; + print PAGE "\\"Page \ \n"; }#end of for # -# In case I didn't include all of the diagrams as jpeg, warn user +# In case I didn't include all of the diagrams as PNG, warn user # - if (-e "matrix$imatrix$max_jpg.jpg" ) { - print PAGE "

\ Postscript Diagrams for $proc\<\/A\> \ \n"; for($j=1;$j<$pages;$j++){ - print PAGE "\\"Page \ \n"; + print PAGE "\\"Page \ \n"; }#end of for # -# In case I didn't include all of the diagrams as jpeg, warn user +# In case I didn't include all of the diagrams as PNG, warn user # - if (-e "matrix$imatrix$max_jpg.jpg" ) { - print PAGE "

\ Postscript Diagrams for $proc\<\/A\> \ \n"; for($j=1;$j<$pages;$j++){ - print PAGE "\\"Page \ \n"; + print PAGE "\\"Page \ \n"; }#end of for # -# In case I didn't include all of the diagrams as jpeg, warn user +# In case I didn't include all of the diagrams as PNG, warn user # - if (-e "matrix$imatrix$max_jpg.jpg" ) { - print PAGE "

\ Postscript Diagrams for $proc\<\/A\> \ \n"; for($j=1;$j<$pages;$j++){ - print PAGE "\\"Page \ \n"; + print PAGE "\\"Page \ \n"; }#end of for # -# In case I didn't include all of the diagrams as jpeg, warn user +# In case I didn't include all of the diagrams as PNG, warn user # - if (-e "matrix$imatrix$max_jpg.jpg" ) { - print PAGE "

\ Postscript Diagrams for $proc\<\/A\> \ \n"; for($j=1;$j<$pages;$j++){ - print PAGE "\\"Page \ \n"; + print PAGE "\\"Page \ \n"; }#end of for # -# In case I didn't include all of the diagrams as jpeg, warn user +# In case I didn't include all of the diagrams as PNG, warn user # - if (-e "matrix$imatrix$max_jpg.jpg" ) { - print PAGE "

\ Postscript Diagrams for $proc\<\/A\> \ \n"; for($j=1;$j<$pages;$j++){ - print PAGE "\\"Page \ \n"; + print PAGE "\\"Page \ \n"; }#end of for # -# In case I didn't include all of the diagrams as jpeg, warn user +# In case I didn't include all of the diagrams as PNG, warn user # - if (-e "matrix$imatrix$max_jpg.jpg" ) { - print PAGE "

\ Postscript Diagrams for $proc\<\/A\> \ \n"; for($j=1;$j<$pages;$j++){ - print PAGE "\\"Page \ \n"; + print PAGE "\\"Page \ \n"; }#end of for # -# In case I didn't include all of the diagrams as jpeg, warn user +# In case I didn't include all of the diagrams as PNG, warn user # - if (-e "matrix$imatrix$max_jpg.jpg" ) { - print PAGE "

\ Postscript Diagrams for $proc\<\/A\> \ \n"; for($j=1;$j<$pages;$j++){ - print PAGE "\\"Page \ \n"; + print PAGE "\\"Page \ \n"; }#end of for # -# In case I didn't include all of the diagrams as jpeg, warn user +# In case I didn't include all of the diagrams as PNG, warn user # - if (-e "matrix$imatrix$max_jpg.jpg" ) { - print PAGE "

\ Postscript Diagrams for $proc\<\/A\> \ \n"; for($j=1;$j<$pages;$j++){ - print PAGE "\\"Page \ \n"; + print PAGE "\\"Page \ \n"; }#end of for # -# In case I didn't include all of the diagrams as jpeg, warn user +# In case I didn't include all of the diagrams as PNG, warn user # - if (-e "matrix$imatrix$max_jpg.jpg" ) { - print PAGE "