diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 7dd6a2f963..3131a08325 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -56,21 +56,19 @@ jobs: run: make BACKEND=${{ matrix.backend }} OMPFLAGS= FPTYPE=${{ matrix.precision }} -C ${{ matrix.folder }} - name: make test run: make BACKEND=${{ matrix.backend }} OMPFLAGS= FPTYPE=${{ matrix.precision }} -C ${{ matrix.folder }} -f cudacpp.mk test - GPU: + + GPU_Nvidia: runs-on: self-hosted - # runs-on: madgraph5-h100 - # container: registry.cern.ch/ngt/lxplus-like:9 env: - CUDA_HOME: /usr/local/cuda/ FC: gfortran strategy: matrix: - folder: [ epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum , epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg ] - precision: [ d , f , m ] + folder: [ epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum, epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg ] + precision: [ d, f, m ] backend: [ cppauto, cuda ] fail-fast: false - steps: - - uses: actions/checkout@v2 + steps: &gpu_steps # allows to recall the steps + - uses: actions/checkout@v4 - name: path run: echo "PATH=$PATH" - name: github PR info @@ -81,3 +79,16 @@ jobs: run: make BACKEND=${{ matrix.backend }} FPTYPE=${{ matrix.precision }} -C ${{ matrix.folder }} - name: make test run: make BACKEND=${{ matrix.backend }} FPTYPE=${{ matrix.precision }} -C ${{ matrix.folder }} -f cudacpp.mk test + + GPU_AMD: + runs-on: madgraph5-mi300x + container: registry.cern.ch/ngt/lxplus-like:9 + env: + FC: gfortran + strategy: + matrix: + folder: [ epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum, epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg ] + precision: [ d, f, m ] + backend: [ hip ] + fail-fast: false + steps: *gpu_steps diff --git a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/cudacpp.mk b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/cudacpp.mk index 32d12a5bba..ab9ac08e0f 100644 --- a/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/cudacpp.mk +++ b/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/cudacpp.mk @@ -1106,10 +1106,20 @@ else @cat /proc/cpuinfo | grep "physical id" | sort -u endif @echo "" -ifneq ($(shell which nvidia-smi 2>/dev/null),) - nvidia-smi -L + # some systems may have -smi installed, but it fails to execute + # because it cannot communicate with the hardware + @if nvidia-smi &>/dev/null ; then \ + nvidia-smi -L ;\ + else \ + echo "No Nvidia GPU detected" ;\ + fi @echo "" -endif + @if amd-smi &>/dev/null ; then \ + amd-smi static -a ;\ + amd-smi list ;\ + else \ + echo "No AMD GPU detected" ;\ + fi @echo USECCACHE=$(USECCACHE) ifeq ($(USECCACHE),1) ccache --version | head -1 diff --git a/epochX/cudacpp/ee_mumu.mad/Cards/ident_card.dat b/epochX/cudacpp/ee_mumu.mad/Cards/ident_card.dat index 0ba87b008f..b37758a42a 100644 --- a/epochX/cudacpp/ee_mumu.mad/Cards/ident_card.dat +++ b/epochX/cudacpp/ee_mumu.mad/Cards/ident_card.dat @@ -2,32 +2,32 @@ ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c written by the UFO converter ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc +mass 5 mdl_MB +mass 6 mdl_MT +mass 15 mdl_MTA +mass 23 mdl_MZ +mass 25 mdl_MH +sminputs 1 aEWM1 +sminputs 2 mdl_Gf +sminputs 3 aS +yukawa 5 mdl_ymb +yukawa 6 mdl_ymt +yukawa 15 mdl_ymtau - - +decay 6 mdl_WT decay 23 mdl_WZ + decay 24 mdl_WW + decay 25 mdl_WH -decay 6 mdl_WT -mass 15 mdl_MTA -mass 23 mdl_MZ -mass 25 mdl_MH -mass 5 mdl_MB -mass 6 mdl_MT -sminputs 1 aEWM1 -sminputs 2 mdl_Gf -sminputs 3 aS -yukawa 15 mdl_ymtau -yukawa 5 mdl_ymb -yukawa 6 mdl_ymt diff --git a/epochX/cudacpp/ee_mumu.mad/Cards/me5_configuration.txt b/epochX/cudacpp/ee_mumu.mad/Cards/me5_configuration.txt index 68b4c46295..fa8d3481a2 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 = /home/dmass/Development/madgraph4gpu/amd-ci/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo +mg5_path = /home/dmass/Development/madgraph4gpu/amd-ci/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..837a75fc1f 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.3 2025-06-12 * #* * #* WARNING: UNKNOWN DEVELOPMENT VERSION. * #* WARNING: DO NOT USE FOR PRODUCTION * @@ -35,15 +35,17 @@ set loop_color_flows False set max_npoint_for_channel 0 set default_unset_couplings 99 set max_t_for_channel 99 +set zerowidth_tchannel True set nlo_mixed_expansion True -set stdout_level DEBUG -set zerowidth_tchannel F -generate e+ e- > mu+ mu- +import model sm define p = g u c d s u~ c~ d~ s~ define j = g u c d s u~ c~ d~ s~ define l+ = e+ mu+ define l- = e- mu- define vl = ve vm vt define vl~ = ve~ vm~ vt~ -output madevent_simd ../TMPOUT/CODEGEN_mad_ee_mumu --hel_recycling=Fal\ -se --vector_size=32 +set stdout_level DEBUG +set zerowidth_tchannel F +generate e+ e- > mu+ mu- +output madevent_simd ee_mumu.mad_gen --hel_recycling=False --vector_si\ +ze=32 diff --git a/epochX/cudacpp/ee_mumu.mad/Cards/run_card.dat b/epochX/cudacpp/ee_mumu.mad/Cards/run_card.dat index 74f70b567b..4ba7540657 100644 --- a/epochX/cudacpp/ee_mumu.mad/Cards/run_card.dat +++ b/epochX/cudacpp/ee_mumu.mad/Cards/run_card.dat @@ -97,11 +97,11 @@ #********************************************************************* # Compilation flag. #********************************************************************* - -O3 -ffast-math -fbounds-check = global_flag ! build flags for all Fortran code (for a fair comparison to cudacpp; default is -O) + -O = global_flag ! fortran optimization flag use for the all code. --fast-math = aloha_flag ! fortran optimization flag for aloha function. Suggestions: '-ffast-math' -O3 = matrix_flag ! fortran optimization flag for matrix.f function. Suggestions: '-O3' - 32 = vector_size ! size of fortran arrays allocated in the multi-event API for SIMD/GPU (VECSIZE_MEMMAX) - 512 = nb_warp ! total number of warp/frontwave + 16 = vector_size ! size of fortran arrays allocated in the multi-event API for SIMD/GPU (VECSIZE_MEMMAX) + 1 = nb_warp ! total number of warp/frontwave #********************************************************************* # Customization (custom cuts/scale/bias/...) * @@ -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..1ac53bb4bd 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.3 \ No newline at end of file diff --git a/epochX/cudacpp/ee_mumu.mad/Source/.make_opts b/epochX/cudacpp/ee_mumu.mad/Source/.make_opts index de3864242b..56ba259c56 100644 --- a/epochX/cudacpp/ee_mumu.mad/Source/.make_opts +++ b/epochX/cudacpp/ee_mumu.mad/Source/.make_opts @@ -102,6 +102,7 @@ endif ifneq ($(lhapdf),) CXXFLAGS += $(shell $(lhapdf) --cppflags) alfas_functions=alfas_functions_lhapdf + alfas_to_clean=alfas_functions.o llhapdf+= $(shell $(lhapdf) --cflags --libs) -lLHAPDF # check if we need to activate c++11 (for lhapdf6.2) ifeq ($(origin CXX),default) @@ -113,10 +114,11 @@ ifneq ($(lhapdf),) endif else alfas_functions=alfas_functions + alfas_to_clean=alfas_functions_lhapdf.o llhapdf= endif # Helper function to check MG5 version define CHECK_MG5AMC_VERSION python -c 'import re; from distutils.version import StrictVersion; print StrictVersion("$(MG5AMC_VERSION)") >= StrictVersion("$(1)") if re.match("^[\d\.]+$$","$(MG5AMC_VERSION)") else True;' -endef \ No newline at end of file +endef diff --git a/epochX/cudacpp/ee_mumu.mad/Source/DHELAS/FFV4_0.f b/epochX/cudacpp/ee_mumu.mad/Source/DHELAS/FFV4_0.f index 86144cea09..53829ce13a 100644 --- a/epochX/cudacpp/ee_mumu.mad/Source/DHELAS/FFV4_0.f +++ b/epochX/cudacpp/ee_mumu.mad/Source/DHELAS/FFV4_0.f @@ -9,15 +9,15 @@ SUBROUTINE FFV4_0(F1, F2, V3, COUP,VERTEX) COMPLEX*16 COUP COMPLEX*16 F1(*) COMPLEX*16 F2(*) - COMPLEX*16 TMP1 COMPLEX*16 TMP3 + COMPLEX*16 TMP4 COMPLEX*16 V3(*) COMPLEX*16 VERTEX - TMP1 = (F1(3)*(F2(5)*(V3(3)+V3(6))+F2(6)*(V3(4)+CI*(V3(5)))) + TMP3 = (F1(3)*(F2(5)*(V3(3)+V3(6))+F2(6)*(V3(4)+CI*(V3(5)))) $ +F1(4)*(F2(5)*(V3(4)-CI*(V3(5)))+F2(6)*(V3(3)-V3(6)))) - TMP3 = (F1(5)*(F2(3)*(V3(3)-V3(6))-F2(4)*(V3(4)+CI*(V3(5)))) + TMP4 = (F1(5)*(F2(3)*(V3(3)-V3(6))-F2(4)*(V3(4)+CI*(V3(5)))) $ +F1(6)*(F2(3)*(-V3(4)+CI*(V3(5)))+F2(4)*(V3(3)+V3(6)))) - VERTEX = COUP*(-1D0)*(+CI*(TMP1)+2D0 * CI*(TMP3)) + VERTEX = COUP*(-1D0)*(+CI*(TMP3)+2D0 * CI*(TMP4)) END diff --git a/epochX/cudacpp/ee_mumu.mad/Source/DHELAS/FFV4_3.f b/epochX/cudacpp/ee_mumu.mad/Source/DHELAS/FFV4_3.f index aa18a03673..06573c09ee 100644 --- a/epochX/cudacpp/ee_mumu.mad/Source/DHELAS/FFV4_3.f +++ b/epochX/cudacpp/ee_mumu.mad/Source/DHELAS/FFV4_3.f @@ -13,7 +13,7 @@ SUBROUTINE FFV4_3(F1, F2, COUP, M3, W3,V3) REAL*8 OM3 REAL*8 P3(0:3) COMPLEX*16 TMP2 - COMPLEX*16 TMP4 + COMPLEX*16 TMP5 COMPLEX*16 V3(6) REAL*8 W3 COMPLEX*16 DENOM @@ -27,18 +27,18 @@ SUBROUTINE FFV4_3(F1, F2, COUP, M3, W3,V3) P3(3) = -DIMAG(V3(1)) TMP2 = (F1(3)*(F2(5)*(P3(0)+P3(3))+F2(6)*(P3(1)+CI*(P3(2)))) $ +F1(4)*(F2(5)*(P3(1)-CI*(P3(2)))+F2(6)*(P3(0)-P3(3)))) - TMP4 = (F1(5)*(F2(3)*(P3(0)-P3(3))-F2(4)*(P3(1)+CI*(P3(2)))) + TMP5 = (F1(5)*(F2(3)*(P3(0)-P3(3))-F2(4)*(P3(1)+CI*(P3(2)))) $ +F1(6)*(F2(3)*(-P3(1)+CI*(P3(2)))+F2(4)*(P3(0)+P3(3)))) DENOM = COUP/(P3(0)**2-P3(1)**2-P3(2)**2-P3(3)**2 - M3 * (M3 -CI $ * W3)) - V3(3)= DENOM*(-2D0 * CI)*(OM3*-1D0/2D0 * P3(0)*(TMP2+2D0*(TMP4)) + V3(3)= DENOM*(-2D0 * CI)*(OM3*-1D0/2D0 * P3(0)*(TMP2+2D0*(TMP5)) $ +(+1D0/2D0*(F1(3)*F2(5)+F1(4)*F2(6))+F1(5)*F2(3)+F1(6)*F2(4))) - V3(4)= DENOM*(-2D0 * CI)*(OM3*-1D0/2D0 * P3(1)*(TMP2+2D0*(TMP4)) + V3(4)= DENOM*(-2D0 * CI)*(OM3*-1D0/2D0 * P3(1)*(TMP2+2D0*(TMP5)) $ +(-1D0/2D0*(F1(3)*F2(6)+F1(4)*F2(5))+F1(5)*F2(4)+F1(6)*F2(3))) - V3(5)= DENOM*2D0 * CI*(OM3*1D0/2D0 * P3(2)*(TMP2+2D0*(TMP4))+( + V3(5)= DENOM*2D0 * CI*(OM3*1D0/2D0 * P3(2)*(TMP2+2D0*(TMP5))+( $ +1D0/2D0 * CI*(F1(3)*F2(6))-1D0/2D0 * CI*(F1(4)*F2(5))-CI*(F1(5) $ *F2(4))+CI*(F1(6)*F2(3)))) - V3(6)= DENOM*2D0 * CI*(OM3*1D0/2D0 * P3(3)*(TMP2+2D0*(TMP4))+( + V3(6)= DENOM*2D0 * CI*(OM3*1D0/2D0 * P3(3)*(TMP2+2D0*(TMP5))+( $ +1D0/2D0*(F1(3)*F2(5))-1D0/2D0*(F1(4)*F2(6))-F1(5)*F2(3)+F1(6) $ *F2(4))) END diff --git a/epochX/cudacpp/ee_mumu.mad/Source/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..bdf427601f 100644 --- a/epochX/cudacpp/ee_mumu.mad/Source/make_opts +++ b/epochX/cudacpp/ee_mumu.mad/Source/make_opts @@ -1,12 +1,11 @@ DEFAULT_CPP_COMPILER=g++ -DEFAULT_F2PY_COMPILER=f2py3 -DEFAULT_F_COMPILER=gfortran -GLOBAL_FLAG=-O3 -ffast-math -fbounds-check MACFLAG= +STDLIB=-lstdc++ +STDLIB_FLAG= +DEFAULT_F2PY_COMPILER=f2py +DEFAULT_F_COMPILER=gfortran MG5AMC_VERSION=SpecifiedByMG5aMCAtRunTime PYTHIA8_PATH=NotInstalled -STDLIB_FLAG= -STDLIB=-lstdc++ #end_of_make_opts_variables BIASLIBDIR=../../../lib/ @@ -103,6 +102,7 @@ endif ifneq ($(lhapdf),) CXXFLAGS += $(shell $(lhapdf) --cppflags) alfas_functions=alfas_functions_lhapdf +alfas_to_clean=alfas_functions.o llhapdf+= $(shell $(lhapdf) --cflags --libs) -lLHAPDF # check if we need to activate c++11 (for lhapdf6.2) ifeq ($(origin CXX),default) @@ -114,6 +114,7 @@ endif endif else alfas_functions=alfas_functions +alfas_to_clean=alfas_functions_lhapdf.o llhapdf= endif diff --git a/epochX/cudacpp/ee_mumu.mad/Source/makefile b/epochX/cudacpp/ee_mumu.mad/Source/makefile index 291ca907ee..87a9e61723 100644 --- a/epochX/cudacpp/ee_mumu.mad/Source/makefile +++ b/epochX/cudacpp/ee_mumu.mad/Source/makefile @@ -37,10 +37,12 @@ all: $(LIBRARIES) $(LIBDIR)libdhelas.$(libext) $(LIBDIR)libpdf.$(libext) $(LIBDI $(LIBDIR)libdsample.$(libext): $(DSAMPLE) $(call CREATELIB, $@, $^) $(LIBDIR)libgeneric.$(libext): $(GENERIC) + rm -f $@ 2>/dev/null $(call CREATELIB, $@, $^) + rm -f $(alfas_to_clean) 2>/dev/null $(LIBDIR)libdhelas.$(libext): DHELAS cd DHELAS; make; cd .. -$(LIBDIR)libpdf.$(libext): PDF make_opts +$(LIBDIR)libpdf.$(libext): PDF $(alfas_functions).o cd PDF; make; cd .. ifneq (,$(filter edff chff, $(pdlabel1) $(pdlabel2))) $(LIBDIR)libgammaUPC.$(libext): PDF/gammaUPC @@ -73,6 +75,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/vector.inc b/epochX/cudacpp/ee_mumu.mad/Source/vector.inc index ba125272b6..9d8b377aa7 100644 --- a/epochX/cudacpp/ee_mumu.mad/Source/vector.inc +++ b/epochX/cudacpp/ee_mumu.mad/Source/vector.inc @@ -30,6 +30,8 @@ C INTEGER WARP_SIZE PARAMETER (WARP_SIZE=32) INTEGER NB_WARP - PARAMETER (NB_WARP=512) + PARAMETER (NB_WARP=1) INTEGER VECSIZE_MEMMAX - PARAMETER (VECSIZE_MEMMAX=16384) + PARAMETER (VECSIZE_MEMMAX=32) + + 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..1ac53bb4bd 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.3 \ 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/P1_epem_mupmum/CPPProcess.cc b/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/CPPProcess.cc index 7bd57a8dbb..7a1bc15755 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -539,7 +539,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- 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..c8db535132 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.3, 2025-06-12 // 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..27da02d9c0 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.3, 2025-06-12 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..a453b7c2b6 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.3, 2025-06-12 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.3, 2025-06-12 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 @@ -502,6 +506,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C Generate events only if IMODE is 0. IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN C Call UNWGT to unweight and store events + ICONFIG = CHANNELS(IVEC) CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) ENDIF diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/driver.f b/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/driver.f index ec5722702a..c08048ad0e 100644 --- a/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/driver.f +++ b/epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/driver.f @@ -489,7 +489,6 @@ subroutine open_file_local(lun,filename,fopened) fopened=.false. tempname=filename fine=index(tempname,' ') -c fine2=index(path,' ')-1 ! AV remove valgrind "Conditional jump or move depends on uninitialised value(s)" if(fine.eq.0) fine=len(tempname) open(unit=lun,file=tempname,status='old',ERR=20) fopened=.true. 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..ad813c359c 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.3, 2025-06-12 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.3, 2025-06-12 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,17 +412,22 @@ 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 C ---------- IF (FIRST) THEN FIRST=.FALSE. - IF(ZERO.NE.0D0) FK_ZERO = SIGN(MAX(ABS(ZERO), ABS(ZERO - $ *SMALL_WIDTH_TREATMENT)), ZERO) - IF(MDL_WZ.NE.0D0) FK_MDL_WZ = SIGN(MAX(ABS(MDL_WZ), ABS(MDL_MZ - $ *SMALL_WIDTH_TREATMENT)), MDL_WZ) + FK_ZERO = 0D0 + IF(MDL_WZ.NE.0D0) THEN + FK_MDL_WZ = SIGN(MAX(ABS(MDL_WZ), ABS(MDL_MZ + $ *SMALL_WIDTH_TREATMENT)), MDL_WZ) + ELSE + FK_MDL_WZ = 0D0 + ENDIF + IF(INIT_MODE) THEN ZEROAMP_1(:,:) = .TRUE. @@ -455,10 +461,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 +475,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/addmothers.f b/epochX/cudacpp/ee_mumu.mad/SubProcesses/addmothers.f index 9a31ed201d..6f32477b9e 100644 --- a/epochX/cudacpp/ee_mumu.mad/SubProcesses/addmothers.f +++ b/epochX/cudacpp/ee_mumu.mad/SubProcesses/addmothers.f @@ -21,7 +21,7 @@ subroutine addmothers(ip,jpart,pb,isym,jsym,rscale,aqcd,aqed,buff, integer icol ! color selected integer isym(nexternal,99), jsym - integer i,j,k,ida(2),ns,nres,ires,icl,ito2,idenpart,nc,ic + integer i,j,k,ida(2),ns,nres,ires,icl,ito2,idenpart,ic integer mo_color,da_color(2),itmp integer ito(-nexternal+3:nexternal),iseed,maxcolor,maxorg integer icolalt(2,-nexternal+2:2*nexternal-3) @@ -113,14 +113,15 @@ subroutine addmothers(ip,jpart,pb,isym,jsym,rscale,aqcd,aqed,buff, endif lconfig = vec_igraph1(ivec) endif - + is_LC=.true. + maxcolor=0 c c Choose a color flow which is certain to work with the propagator c structure of the chosen diagram and use that as an alternative c if (icol.eq.0) then do i=1,nexternal - icolalt(1,i)=0 + icolalt(1,i)=0 icolalt(2,i)=0 enddo else diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/cluster.f b/epochX/cudacpp/ee_mumu.mad/SubProcesses/cluster.f index b8995283ed..907894ea89 100644 --- a/epochX/cudacpp/ee_mumu.mad/SubProcesses/cluster.f +++ b/epochX/cudacpp/ee_mumu.mad/SubProcesses/cluster.f @@ -556,6 +556,8 @@ logical function cluster(p, ivec) jwin = 0 cluster=.false. clustered=.false. + iwin =0 + jwin =0 do i=0,3 pcmsp(i)=0 enddo @@ -665,8 +667,11 @@ logical function cluster(p, ivec) c initialize graph storage igraphs(0)=0 nleft=nexternal -c cluster - if (iwin.eq.0.or.jwin.eq.0) stop 21 + if(iwin.eq.0.or.jwin.eq.0)then + cluster=.false. + return + endif +c cluster do n=1,nexternal-2 c combine winner imocl(n)=imap(iwin,2)+imap(jwin,2) diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/ee_mumu.mad/SubProcesses/cudacpp.mk index 20d8ded718..20b8e6b858 100644 --- a/epochX/cudacpp/ee_mumu.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/ee_mumu.mad/SubProcesses/cudacpp.mk @@ -114,7 +114,7 @@ export CXXFLAGS override CUDA_HOME = $(patsubst %/bin/nvcc,%,$(shell which nvcc 2>/dev/null)) # Set HIP_HOME from the path to hipcc, if it exists -override HIP_HOME = $(patsubst %/bin/hipcc,%,$(shell which hipcc 2>/dev/null)) +override HIP_HOME = $(shell hipconfig --rocmpath) # Configure CUDA_INC (for CURAND and NVTX) and NVTX if a CUDA installation exists (see #965) ifeq ($(CUDA_HOME),) @@ -229,6 +229,8 @@ ifeq ($(BACKEND),cuda) else ifeq ($(BACKEND),hip) + # example architecture values MI200:gfx90a, MI350X:gfx942 + MADGRAPH_HIP_ARCHITECTURE ?= gfx942 # Set GPUCC as $(HIP_HOME)/bin/hipcc (it was already checked above that this exists) GPUCC = $(HIP_HOME)/bin/hipcc XCOMPILERFLAG = @@ -243,7 +245,7 @@ else ifeq ($(BACKEND),hip) ###GPUFLAGS += -ggdb # FOR DEBUGGING ONLY # AMD HIP architecture flags - GPUARCHFLAGS = --offload-arch=gfx90a + GPUARCHFLAGS = --offload-arch=${MADGRAPH_HIP_ARCHITECTURE} GPUFLAGS += $(GPUARCHFLAGS) # Other AMD-specific flags @@ -878,7 +880,7 @@ endif $(gpu_fcheckmain): LIBFLAGS += $(GPULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH $(gpu_fcheckmain): $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBDIR)/lib$(MG5AMC_GPULIB).so $(gpu_objects_exe) ifneq ($(findstring hipcc,$(GPUCC)),) # link fortran/c++/hip using $FC when hipcc is used #802 - $(FC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) -lstdc++ -L$(shell cd -L $(shell dirname $(shell $(GPUCC) -print-prog-name=clang))/../..; pwd)/lib -lamdhip64 + $(FC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) -lstdc++ -L$(HIP_HOME)/lib -lamdhip64 else $(GPUCC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) endif @@ -979,7 +981,7 @@ else # link only runTest_$(GPUSUFFIX).o (new: in the past, this was linking both $(gpu_testmain): LIBFLAGS += $(GPULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH $(gpu_testmain): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(gpu_objects_lib) $(gpu_objects_exe) $(GTESTLIBS) ifneq ($(findstring hipcc,$(GPUCC)),) # link fortran/c++/hip using $FC when hipcc is used #802 - $(FC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lstdc++ -lpthread -L$(shell cd -L $(shell dirname $(shell $(GPUCC) -print-prog-name=clang))/../..; pwd)/lib -lamdhip64 + $(FC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lstdc++ -lpthread -L$(HIP_HOME)/lib -lamdhip64 else $(GPUCC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lcuda endif @@ -1104,10 +1106,20 @@ else @cat /proc/cpuinfo | grep "physical id" | sort -u endif @echo "" -ifneq ($(shell which nvidia-smi 2>/dev/null),) - nvidia-smi -L + # some systems may have -smi installed, but it fails to execute + # because it cannot communicate with the hardware + @if nvidia-smi &>/dev/null ; then \ + nvidia-smi -L ;\ + else \ + echo "No Nvidia GPU detected" ;\ + fi @echo "" -endif + @if amd-smi &>/dev/null ; then \ + amd-smi static -a ;\ + amd-smi list ;\ + else \ + echo "No AMD GPU detected" ;\ + fi @echo USECCACHE=$(USECCACHE) ifeq ($(USECCACHE),1) ccache --version | head -1 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/SubProcesses/proc_characteristics b/epochX/cudacpp/ee_mumu.mad/SubProcesses/proc_characteristics index c43d2203f9..05380b1db0 100644 --- a/epochX/cudacpp/ee_mumu.mad/SubProcesses/proc_characteristics +++ b/epochX/cudacpp/ee_mumu.mad/SubProcesses/proc_characteristics @@ -8,7 +8,7 @@ ninitial = 2 grouped_matrix = True has_loops = False - bias_module = dummy + bias_module = None max_n_matched_jets = 0 colored_pdgs = [1, 2, 3, 4, 5, 6, 21] complex_mass_scheme = False diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/reweight.f b/epochX/cudacpp/ee_mumu.mad/SubProcesses/reweight.f index 0a0bafa7c1..189ba41449 100644 --- a/epochX/cudacpp/ee_mumu.mad/SubProcesses/reweight.f +++ b/epochX/cudacpp/ee_mumu.mad/SubProcesses/reweight.f @@ -1186,7 +1186,7 @@ logical function setclscales(p, keepq2bck, ivec) if(nexternal.gt.3) pt2ijcl(nexternal-3)=q2fact(2) else if(.not.fixed_fac_scale1) q2fact(1)=scalefact**2*pt2ijcl(nexternal-2) - if(.not.fixed_fac_scale2) q2fact(2)=scalefact**2*q2fact(1) + if(.not.fixed_fac_scale2) q2fact(2)=scalefact**2*pt2ijcl(nexternal-2) endif elseif(jcentral(1).eq.0)then if(.not.fixed_fac_scale1) q2fact(1) = scalefact**2*pt2ijcl(jfirst(1)) diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/symmetry.f b/epochX/cudacpp/ee_mumu.mad/SubProcesses/symmetry.f index 309540a0a2..2afd9e9f75 100644 --- a/epochX/cudacpp/ee_mumu.mad/SubProcesses/symmetry.f +++ b/epochX/cudacpp/ee_mumu.mad/SubProcesses/symmetry.f @@ -232,7 +232,7 @@ subroutine write_bash(mapconfig,use_config, prwidth, jcomp,iforest, c write(*,*) 'mapping',ic,mapconfig(i),icode if (icode .eq. 0) then c Create format string based on number of digits - write(formstr,'(a,i1,a)') '(I',nconf,'$)' + write(formstr,'(a,i1,a)') '(I',nconf,',$)' write(*,formstr) mapconfig(i) c Write symmetry factors write(formstr2,'(a,i2,a)') '(2i',nsym,')' @@ -242,10 +242,10 @@ subroutine write_bash(mapconfig,use_config, prwidth, jcomp,iforest, dconfig=mapconfig(i)+icode*1d0/10**ncode if(nconf+ncode+1.lt.10) then write(formstr,'(a,i1,a,i1,a)') '(F',nconf+ncode+1, - $ '.',ncode,'$)' + $ '.',ncode,',$)' else write(formstr,'(a,i2,a,i1,a)') '(F',nconf+ncode+1, - $ '.',ncode,'$)' + $ '.',ncode,',$)' endif write(*,formstr) dconfig c Write symmetry factors @@ -260,7 +260,7 @@ subroutine write_bash(mapconfig,use_config, prwidth, jcomp,iforest, dconfig=mapconfig(i)+icode*1d0/10**ncode write(27,formstr2) dconfig,use_config(i) endif - write(*,'(a$)') ' ' + write(*,'(a,$)') ' ' 100 call bw_increment_array(iarray,imax,ibase,done) enddo else diff --git a/epochX/cudacpp/ee_mumu.mad/SubProcesses/unwgt.f b/epochX/cudacpp/ee_mumu.mad/SubProcesses/unwgt.f index f602511c94..d1247f1849 100644 --- a/epochX/cudacpp/ee_mumu.mad/SubProcesses/unwgt.f +++ b/epochX/cudacpp/ee_mumu.mad/SubProcesses/unwgt.f @@ -497,6 +497,7 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) integer ip, np, ic, nc integer ida(2),ito(-nexternal+3:nexternal),ns,nres,ires,icloop integer iseed + double precision beam_mass double precision pboost(0:3) double precision beta, get_betaz double precision ebi(0:3), ebo(0:3) @@ -506,7 +507,7 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) integer idup(nexternal,maxproc,maxsproc) integer mothup(2,nexternal) integer icolup(2,nexternal,maxflow,maxsproc) - + double precision eta integer nsym integer ievent @@ -638,21 +639,20 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) if (nincoming.eq.2) then if (xbk(1) .gt. 0d0 .and. xbk(1) .le. 1d0 .and. $ xbk(2) .gt. 0d0 .and. xbk(2) .le. 1d0) then - if(lpp(2).ne.0.and.(xbk(1).eq.1d0.or.pmass(1).eq.0d0).and.xbk(2).ne.1d0) then - ! construct the beam momenta in each frame and compute the related (z)boost - if (pmass(1).eq.0d0.and.(abs(lpp(1)).eq.3.or.abs(lpp(1)).eq.4).and.ebeam(1).gt.10d0*m1)then - local_mass = 0d0 - else - local_mass = m1 - endif + if(lpp(2).ne.0.and.(xbk(1).eq.1d0.or.pmass(1).eq.0d0)) then + if((abs(lpp(1)).gt.2.and.abs(lpp(1)).ne.9).or.xbk(1).eq.1d0)then + beam_mass = pmass(1) + else + beam_mass = m1 + endif ebi(0) = p(0,1)/xbk(1) ! this assumes that particle 1 is massless or mass equal to beam ebi(1) = 0 ebi(2) = 0 - ebi(3) = DSQRT(ebi(0)**2-local_mass**2) + ebi(3) = DSQRT(ebi(0)**2-beam_mass**2) ebo(0) = ebeam(1) ebo(1) = 0 ebo(2) = 0 - ebo(3) = DSQRT(ebo(0)**2-local_mass**2) + ebo(3) = DSQRT(ebo(0)**2-beam_mass**2) beta = get_betaz(ebi, ebo) if (xbk(1).eq.1d0) then pb(0,isym(1,jsym)) = ebo(0) @@ -668,20 +668,19 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) enddo else - if (pmass(1).eq.0d0.and.(abs(lpp(1)).eq.3.or.abs(lpp(1)).eq.4.and.ebeam(2).gt.10d0*m2))then - local_mass = 0d0 - else - local_mass = m2 - endif - ebi(0) = p(0,1)/xbk(1) ! this assumes that particle 1 is massless or mass equal to beam + if((abs(lpp(2)).gt.2.and.abs(lpp(2)).ne.9).or.xbk(2).eq.1d0)then + beam_mass = pmass(2) + else + beam_mass = m2 + endif ebi(0) = p(0,2)/xbk(2) ! this assumes that particle 2 is massless or mass equal to beam ebi(1) = 0 ebi(2) = 0 - ebi(3) = -1d0*DSQRT(ebi(0)**2-local_mass**2) + ebi(3) = -1d0*DSQRT(ebi(0)**2-beam_mass**2) ebo(0) = ebeam(2) ebo(1) = 0 ebo(2) = 0 - ebo(3) = -1d0*DSQRT(ebo(0)**2-local_mass**2) + ebo(3) = -1d0*DSQRT(ebo(0)**2-beam_mass**2) beta = get_betaz(ebi, ebo) if (xbk(2).eq.1d0) then pb(0,isym(2,jsym)) = ebo(0) @@ -701,6 +700,21 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) write(*,*) 'Warning bad x1 or x2 in write_leshouche', $ xbk(1),xbk(2) endif + do j=1,nexternal + call zboost_with_beta(p(0,j),beta,pb(0,isym(j,jsym))) + pb(4,isym(j,jsym))=pmass(j) + enddo + + ! check for numerical_accuracy + if (pb(0,1).gt.ebeam(1).or.pb(0,2).gt.ebeam(2))then + ! go back to old method --more accurate when boosting with xbk close to one-- + eta = sqrt(xbk(1)*ebeam(1)/(xbk(2)*ebeam(2))) + pboost(0)=p(0,1)*(eta + 1d0/eta) + pboost(3)=p(0,1)*(eta - 1d0/eta) + do j=1,nexternal + call boostx(p(0,j),pboost,pb(0,isym(j,jsym))) + enddo + endif else do j=1,nexternal call boostx(p(0,j),pboost,pb(0,isym(j,jsym))) @@ -709,6 +723,8 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) enddo endif + + if (IMIRROR.eq.2.and.pmass(1).ne.pmass(2)) then c Note that in this context isym(1,jsym) should never be "2" since the mass differ pb(4,isym(1,jsym))=pmass(2) 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..2efb5954a6 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] @@ -1991,6 +1991,11 @@ def default_setup(self): self.add_param("PartonLevel:FSRinResonances", True, hidden=True, always_write_to_card=False, comment="Do not allow shower to run from decay product of unstable particle") self.add_param("ProcessLevel:resonanceDecays", True, hidden=True, always_write_to_card=False, comment="Do not allow unstable particle to decay.") + # Parameters only needed for main164 type of run (not pythia8/MG5 interface) + self.add_param("Main:HepMC", True, hidden=True, always_write_to_card=False, + comment="""Specify the type of output to be used by the main164 run. """) + self.add_param("HepMC:output", 'hepmc.gz', hidden=True, always_write_to_card=False, + comment="Specify the HepMC output file to be used by the main164 run.") # Add parameters controlling the subruns execution flow. # These parameters should not be part of PY8SubRun daughter. self.add_default_subruns('parameters') @@ -2087,8 +2092,10 @@ def MadGraphSet(self, name, value, **opts): force = False if name.lower() not in self or (force or name.lower() not in self.user_set): self.__setitem__(name, value, change_userdefine=False, **opts) - self.system_set.add(name.lower()) - + self.system_set.add(name.lower()) + else: + raise Exception("The parameter %s is already set to %s. You can not change it." % (name, self[name])) + def defaultSet(self, name, value, **opts): self.__setitem__(name, value, change_userdefine=False, **opts) @@ -2144,9 +2151,19 @@ def pythia8_formatting(value, formatv=None): else: return ','.join([PY8Card.pythia8_formatting(arg) for arg in value]) + #change of name convention between MG5 old interface and main164 from Pythia8 + interface_to_164 = {'HEPMCoutput:file': 'HepMC:output', + 'SysCalc:fullCutVariation': '!SysCalc:fullCutVariation (not supported with 164)', + 'SysCalc:qCutList': '!SysCalc:qCutList (not supported with 164)', + 'SysCalc:qWeed': '!SysCalc:qWeed (not supported with 164)', + 'SysCalc:tmsList': '!SysCalc:tmsList (not supported with 164)', + 'HEPMCoutput:scaling' : '!HEPMCoutput :scaling (not supported with 164)', + 'LHEFInputs:nSubruns' : 'Main:numberOfSubruns'} + def write(self, output_file, template, read_subrun=False, - print_only_visible=False, direct_pythia_input=False, add_missing=True): + print_only_visible=False, direct_pythia_input=False, add_missing=True, + use_mg5amc_py8_interface=False): """ Write the card to output_file using a specific template. > 'print_only_visible' specifies whether or not the hidden parameters should be written out if they are in the hidden_params_to_always_write @@ -2155,7 +2172,12 @@ def write(self, output_file, template, read_subrun=False, in the self.visible_params_to_always_write list and are not user_set or system_set are commented. > If 'add_missing' is False then parameters that should be written_out but are absent - from the template will not be written out.""" + from the template will not be written out. + > use_mg5amc_py8_interface is a flag to indicate that the MG5aMC-PY8 interface is used or not + if not used some parameters need to be translated from the old convention to the new one + """ + + self.use_mg5amc_py8_interface = use_mg5amc_py8_interface # First list the visible parameters visible_param = [p for p in self if p.lower() not in self.hidden_param @@ -2297,7 +2319,16 @@ def group_params(params): else: # Just copy parameters which don't need to be specified if param.lower() not in self.params_to_never_write: - output.write(line) + + if not use_mg5amc_py8_interface and direct_pythia_input and \ + param in self.interface_to_164: + param_entry = self.interface_to_164[param.strip()] + # special case for HepMC needs two flags + if 'HepMC:output' == param_entry: + output.write(' %s=%s\n'%('Main:HepMC', 'on')) + output.write('%s=%s\n'%(param_entry,new_value)) + else: + output.write(line) else: output.write('! The following parameter was forced to be commented out by MG5aMC.\n') output.write('! %s'%line) @@ -2313,6 +2344,7 @@ def group_params(params): if ((not direct_pythia_input) or (param.lower() in self.visible_params_to_always_write) or (param.lower() in self.user_set) or + (param.lower() in self.hidden_params_to_always_write) or (param.lower() in self.system_set)): template = '%s=%s' else: @@ -2321,6 +2353,19 @@ def group_params(params): # then they shouldn't be passed to Pythia template = '!%s=%s' + if not use_mg5amc_py8_interface and direct_pythia_input and \ + param in self.interface_to_164: + param_entry = self.interface_to_164[param] + # special case for HepMC needs two flags + if 'HepMC:output' == param_entry: + output.write(' %s=%s\n'%('Main:HepMC', 'on')) + if 'Main:InternalAnalysis'.lower() in self.user_set and \ + self['Main:InternalAnalysis'].lower() == 'on': + output.write('InternalAnalysis:output = ./djrs.dat\n') + + #elif param in self.interface_to_164.values() and not direct_pythia_input: + # misc.sprint(use_mg5amc_py8_interface, direct_pythia_input,param) + # raise Exception('The parameter %s is not supported in the MG5aMC-PY8 interface. Please use the new interface.'%param_entry output.write(template%(param_entry, value_entry.replace(value,new_value))) @@ -2365,6 +2410,8 @@ def group_params(params): comment = '\n'.join('! %s'%c for c in self.comments[param.lower()].split('\n')) output.write(comment+'\n') + if not use_mg5amc_py8_interface and param in self.interface_to_164: + continue output.write('%s=%s\n'%(param,PY8Card.pythia8_formatting(self[param]))) # Don't close the file if we were reading a subrun, but simply write @@ -3318,7 +3365,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 +3372,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 @@ -4050,8 +4095,8 @@ def post_set_fixed_fac_scale(card, value, change_userdefine, raiseerror, **opt): if 'fixed_fac_scale2' in card.user_set: card.user_set.remove('fixed_fac_scale2') - # #card['pdlabel1'] = value - # #card['pdlabel2'] = value + dict.__setitem__(card, 'fixed_fac_scale1', card['fixed_fac_scale']) + dict.__setitem__(card, 'fixed_fac_scale2', card['fixed_fac_scale']) @staticmethod def post_set(card, value, change_userdefine, raiseerror, name='unknown', **opt): @@ -4201,6 +4246,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 @@ -4451,11 +4497,11 @@ def check_validity(self): time.sleep(5) if self['drjj'] != 0: if 'drjj' in self.user_set: - logger.warning('Since icckw>0, changing the value of \'drjj\' to 0') + logger.warning('Since ickkw>0, changing the value of \'drjj\' to 0') self['drjj'] = 0 if self['drjl'] != 0: if 'drjl' in self.user_set: - logger.warning('Since icckw>0, changing the value of \'drjl\' to 0') + logger.warning('Since ickkw>0, changing the value of \'drjl\' to 0') self['drjl'] = 0 if not self['auto_ptj_mjj']: if self['mmjj'] > self['xqcut']: @@ -4753,7 +4799,6 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): self['fixed_fac_scale1'] = True self['nhel'] = 1 for i in beam_id_split[1]: - exit if abs(i) == 11: self['lpp1'] = -math.copysign(3,i) self['lpp2'] = math.copysign(3,i) @@ -5577,6 +5622,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 +5838,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/cluster.py b/epochX/cudacpp/ee_mumu.mad/bin/internal/cluster.py index 95ef45b5f3..66069293d2 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/cluster.py +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/cluster.py @@ -602,6 +602,7 @@ def __init__(self, *args, **opt): self.submitted = six.moves.queue.Queue() # one entry by job submitted self.stoprequest = threading.Event() #flag to ensure everything to close self.demons = [] + self.gpus_list = [] self.nb_done =0 if 'nb_core' in opt: self.nb_core = opt['nb_core'] @@ -623,23 +624,46 @@ def __init__(self, *args, **opt): self.done_pid_queue = six.moves.queue.Queue() self.fail_msg = None + mg5_gpu_env_str = 'MG5_GPU_VISIBLE_DEVICES' + gpu_variables = [['NVIDIA_VISIBLE_DEVICES', 'CUDA_VISIBLE_DEVICES'], + ['ROCR_VISIBLE_DEVICES', 'HIP_VISIBLE_DEVICES'],] + if mg5_gpu_env_str in os.environ: + new_var = os.environ[mg5_gpu_env_str].split(',') + if len(new_var) == 2: + gpu_variables.insert(0, new_var) + else: + logger.error('Invalid format for %s=%s, it should be a comma-separated list of two elements' % (mg5_gpu_env_str, os.environ[mg5_gpu_env_str])) + for get_var,set_var in gpu_variables: + if get_var in os.environ: + self.gpus_list = os.environ.get(get_var).split(',') + self.gpu_set_var = set_var + self.gpus_count = len(self.gpus_list) + logger.info('Found %s GPUs: %s' % (self.gpus_count, self.gpus_list)) def start_demon(self): import threading - t = threading.Thread(target=self.worker) + env2 = None + if len(self.gpus_list): + env2 = os.environ.copy() + this_gpu_idx = len(self.demons) % self.gpus_count + env2[self.gpu_set_var] = self.gpus_list[this_gpu_idx] + t = threading.Thread(target=self.worker, kwargs={'env2': env2}) + else: + t = threading.Thread(target=self.worker) t.daemon = True t.start() self.demons.append(t) - def worker(self): + def worker(self, env2=None): import six.moves.queue import six.moves._thread while not self.stoprequest.isSet(): try: args = self.queue.get(timeout=10) tag, exe, arg, opt = args + opt['env'] = env2 try: # check for executable case if isinstance(exe,str): 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..69291df0d4 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): @@ -1463,11 +1463,15 @@ def create_plot(self, mode='parton', event_path=None, output=None, tag=None): self.run_name, '%s_pts.dat' % tag) for observable_name, data_path in [('djr',djr_path), ('pt',pt_path)]: - if not self.generate_Pythia8_HwU_plots( + try: + if not self.generate_Pythia8_HwU_plots( PY8_plots_root_path, merging_scale_name, observable_name,data_path): - return False - + return False + except Exception as error: + if os.path.exists(data_path): + logger.info('plot information present in %s' % data_path) + return True if mode == 'Pythia8': plot_files = glob.glob(pjoin(PY8_plots_root_path,'*.gnuplot')) if not misc.which('gnuplot'): @@ -1964,12 +1968,16 @@ def do_systematics(self, line): self.cluster.wait(os.path.dirname(output), update_status, update_first=update_status) except Exception: self.cluster.remove() + for i in range(nb_submit): + os.remove('%s/tmp_%s_%s' %(os.path.dirname(output),i,os.path.basename(output))) old_run_mode = self.options['run_mode'] self.options['run_mode'] =0 + out =False try: out = self.do_systematics(line) finally: self.options['run_mode'] = old_run_mode + return out #collect the data all_cross = [] for i in range(nb_submit): @@ -1995,18 +2003,21 @@ def do_systematics(self, line): self.run_card['event_norm'] in ['unity']: all_cross= [cross/nb_event for cross in all_cross] - sys_obj = systematics.call_systematics([input, None] + opts, - log=lambda x: logger.info(str(x)), - result=result_file, - running=False - ) + + sys_obj = systematics.call_systematics([input, None] + opts, + log=lambda x: logger.info(str(x)), + result=result_file, + running=False + ) + sys_obj.print_cross_sections(all_cross, nb_event, result_file) - + #concatenate the output file subprocess.call(['cat']+\ ['./tmp_%s_%s' % (i, os.path.basename(output)) for i in range(nb_submit)], stdout=open(output,'w'), cwd=os.path.dirname(output)) + for i in range(nb_submit): os.remove('%s/tmp_%s_%s' %(os.path.dirname(output),i,os.path.basename(output))) # os.remove('%s/log_sys_%s.txt' % (os.path.dirname(output),i)) @@ -3831,7 +3842,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 +5146,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 +6751,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 +6775,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 +6826,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..6fbdd98100 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': @@ -1858,6 +1855,8 @@ def parse_histos_from_PY8_XML_stream(self, stream, run_id=None, # If merging cut is negative, then pick only the one of the central scale # If not specified, then take them all but use the PDF and scale weight # of the central merging_scale for the variation. + if not all_weights: + raise MadGraph5Error('No weights were found in the HwU XML source.') if merging_scale is None or merging_scale < 0.0: merging_scale_chosen = all_weights[2]['MERGING'] else: @@ -2480,14 +2479,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 +2738,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 +2877,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 +2889,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 +2898,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 +2907,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 +2916,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..b1739da73d 100644 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/launch_plugin.py +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/launch_plugin.py @@ -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: O. Mattelaer (Aug 2023) for the MG5aMC CUDACPP plugin. -# Further modified by: O. Mattelaer, A. Valassi (2024) for the MG5aMC CUDACPP plugin. +# Further modified by: O. Mattelaer, A. Valassi, Z. Wettersten (2024-2025) for the MG5aMC CUDACPP plugin. import logging import os @@ -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') @@ -133,7 +133,8 @@ def default_setup(self): super().default_setup() # change default value: self['cudacpp_backend'] = 'cuda' - self['vector_size'] = 16384 # already setup in default class (just change value) + self['vector_size'] = 32 # ZW: default to 32, might want to change to 64 to utilise AMD GPUs better as well # 16384 # already setup in default class (just change value) + self['nb_warp'] = 512 # number of warps per kernel call, for now setting to 16 384 / vector_size MEINTERFACE = CPPMEInterface RunCard = CPPRunCard 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..81d17f7cb1 100755 --- a/epochX/cudacpp/ee_mumu.mad/bin/internal/lhe_parser.py +++ b/epochX/cudacpp/ee_mumu.mad/bin/internal/lhe_parser.py @@ -1035,12 +1035,12 @@ def define_init_banner(self, wgt, lha_strategy, proc_charac=None): from_init = True if not from_init: - if group in grouped_cross: - grouped_cross[group] += self.allcross[i] - grouped_error[group] += self.error[i]**2 + if int(group) in grouped_cross: + grouped_cross[int(group)] += self.allcross[i] + grouped_error[int(group)] += self.error[i]**2 else: - grouped_cross[group] = self.allcross[i] - grouped_error[group] = self.error[i]**2 + grouped_cross[int(group)] = self.allcross[i] + grouped_error[int(group)] = self.error[i]**2 else: ban = banner_mod.Banner(ff.banner) for line in ban['init'].split('\n'): @@ -1048,11 +1048,11 @@ def define_init_banner(self, wgt, lha_strategy, proc_charac=None): if len(splitline)==4: cross, error, _, group = splitline if int(group) in grouped_cross: - grouped_cross[group] += float(cross) - grouped_error[group] += float(error)**2 + grouped_cross[int(group)] += float(cross) + grouped_error[int(group)] += float(error)**2 else: - grouped_cross[group] = float(cross) - grouped_error[group] = float(error)**2 + grouped_cross[int(group)] = float(cross) + grouped_error[int(group)] = float(error)**2 nb_group = len(grouped_cross) # compute the information for the first line @@ -1086,6 +1086,8 @@ def define_init_banner(self, wgt, lha_strategy, proc_charac=None): self.seek(0) if init_information["idbmup2"] in [0,9]: event = next(self) + if len(event) == 0: + event = Event(str(event)) init_information["idbmup2"] = event[1].pdg self.seek(0) @@ -2166,10 +2168,13 @@ def check(self): abspz += abs(particle.pz) # check mass fourmass = FourMomentum(particle).mass - - if particle.mass and (abs(particle.mass) - fourmass)/ abs(particle.mass) > threshold: - raise Exception( "Do not have correct mass lhe: %s momentum: %s (error at %s" % (particle.mass, fourmass, (abs(particle.mass) - fourmass)/ abs(particle.mass))) - + if particle.mass: + expected = (particle.E - math.sqrt(particle.E**2 -particle.mass**2))/particle.E + if expected > 1e-8: + mass_threshold = particle.E**2 - (particle.E-threshold)**2 + if (abs(particle.mass) - fourmass)/ mass_threshold > 5: + raise Exception( "Do not have correct mass lhe: %s momentum: %s (error at %s" % (particle.mass, fourmass, (abs(particle.mass) - fourmass)/ abs(particle.mass))) + if E/absE > threshold: logger.critical(self) @@ -2953,8 +2958,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..4d5597c722 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) @@ -2827,10 +2827,10 @@ def print_results_in_shell(self, data): logger.info(" Nb of events after matching/merging : %d" % int(data['nb_event_pythia'])) if self.run_card['use_syst'] in self.true and \ (int(self.run_card['ickkw'])==1 or self.run_card['ktdurham']>0.0 - or self.run_card['ptlund']>0.0): + or self.run_card['ptlund']>0.0) and data['cross_pythia'] == -1: logger.info(" Notice that because Systematics computation is turned on, the merging did not veto events but modified their weights instead.\n"+\ " The resulting hepmc/stdhep file should therefore be use with those weights.") - else: + elif data['cross_pythia'] == -1: logger.info(" Nb of events after merging : %s" % data['nb_event_pythia']) logger.info(" " ) @@ -3055,6 +3055,7 @@ def do_multi_run(self, line): crossoversig = 0 inv_sq_err = 0 nb_event = 0 + madspin = False for i in range(nb_run): self.nb_refine = 0 self.exec_cmd('generate_events %s_%s -f' % (main_name, i), postcmd=False) @@ -3067,6 +3068,8 @@ def do_multi_run(self, line): inv_sq_err+=1.0/error**2 self.results[main_name][-1]['cross'] = crossoversig/inv_sq_err self.results[main_name][-1]['error'] = math.sqrt(1.0/inv_sq_err) + if 'decayed' in self.run_name: + madspin = True self.results.def_current(main_name) self.run_name = main_name self.update_status("Merging LHE files", level='parton') @@ -3074,9 +3077,12 @@ def do_multi_run(self, line): os.mkdir(pjoin(self.me_dir,'Events', self.run_name)) except Exception: pass - os.system('%(bin)s/merge.pl %(event)s/%(name)s_*/unweighted_events.lhe.gz %(event)s/%(name)s/unweighted_events.lhe.gz %(event)s/%(name)s_banner.txt' + + os.system('%(bin)s/merge.pl %(event)s/%(name)s_*%(madspin)s/unweighted_events.lhe.gz %(event)s/%(name)s/unweighted_events.lhe.gz %(event)s/%(name)s_banner.txt' % {'bin': self.dirbin, 'event': pjoin(self.me_dir,'Events'), - 'name': self.run_name}) + 'name': self.run_name, + 'madspin': '_decayed_*' if madspin else '' + }) eradir = self.options['exrootanalysis_path'] if eradir and misc.is_executable(pjoin(eradir,'ExRootLHEFConverter')): @@ -3656,9 +3662,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'))) @@ -3757,6 +3765,8 @@ def split(a, n): k, m = divmod(len(a), n) return (a[i*k+min(i, m):(i+1)*k+min(i+1, m)] for i in range(n)) + Gdirs = self.remove_empty_events(Gdirs) + partials_info = [] if len(Gdirs) >= max_G: start_unweight= time.perf_counter() @@ -3786,7 +3796,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, @@ -4223,7 +4233,7 @@ def mg5amc_py8_interface_consistency_warning(options): return None - def setup_Pythia8RunAndCard(self, PY8_Card, run_type): + def setup_Pythia8RunAndCard(self, PY8_Card, run_type, use_mg5amc_py8_interface): """ Setup the Pythia8 Run environment and card. In particular all the process and run specific parameters of the card are automatically set here. This function returns the path where HEPMC events will be output, if any.""" @@ -4338,10 +4348,10 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): PY8_Card.systemSet('Beams:setProductionScalesFromLHEF',True) # Automatically set qWeed to xqcut if not defined by the user. - if PY8_Card['SysCalc:qWeed']==-1.0: + if use_mg5amc_py8_interface and PY8_Card['SysCalc:qWeed']==-1.0: PY8_Card.MadGraphSet('SysCalc:qWeed',self.run_card['xqcut'], force=True) - if PY8_Card['SysCalc:qCutList']=='auto': + if use_mg5amc_py8_interface and PY8_Card['SysCalc:qCutList']=='auto': if self.run_card['use_syst']: if self.run_card['sys_matchscale']=='auto': qcut = PY8_Card['JetMatching:qCut'] @@ -4368,7 +4378,7 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): # Specific MLM settings # PY8 should not implement the MLM veto since the driver should do it # if merging scale variation is turned on - if self.run_card['use_syst']: + if use_mg5amc_py8_interface and self.run_card['use_syst']: # We do no force it here, but it is clear that the user should know what # he's doing if he were to force it to True. PY8_Card.MadGraphSet('JetMatching:doVeto',False) @@ -4444,7 +4454,7 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): PY8_Card.MadGraphSet('SpaceShower:pTmaxMatch',1) PY8_Card.MadGraphSet('SpaceShower:rapidityOrder',False) # PY8 should not implement the CKKW veto since the driver should do it. - if self.run_card['use_syst']: + if use_mg5amc_py8_interface and self.run_card['use_syst']: # We do no force it here, but it is clear that the user should know what # he's doing if he were to force it to True. PY8_Card.MadGraphSet('Merging:applyVeto',False) @@ -4516,6 +4526,12 @@ def do_pythia8(self, line): else: no_default = False + if '--old_interface' in args: + use_mg5amc_py8_interface = True + args.remove('--old_interface') + else: + use_mg5amc_py8_interface = False + if not self.run_name: self.check_pythia8(args) self.configure_directory(html_opening =False) @@ -4545,20 +4561,27 @@ def do_pythia8(self, line): #"Please use 'event_norm = average' in the run_card to avoid this problem.") - - if not self.options['mg5amc_py8_interface_path'] or not \ - os.path.exists(pjoin(self.options['mg5amc_py8_interface_path'], - 'MG5aMC_PY8_interface')): - raise self.InvalidCmd( -"""The MG5aMC_PY8_interface tool cannot be found, so that MadEvent cannot steer Pythia8 shower. -Please install this tool with the following MG5_aMC command: - MG5_aMC> install mg5amc_py8_interface_path""") + if use_mg5amc_py8_interface: + if not self.options['mg5amc_py8_interface_path'] or not \ + os.path.exists(pjoin(self.options['mg5amc_py8_interface_path'], + 'MG5aMC_PY8_interface')): + raise self.InvalidCmd( + """The MG5aMC_PY8_interface tool cannot be found, so that MadEvent cannot steer Pythia8 shower. + Please install this tool with the following MG5_aMC command: + MG5_aMC> install mg5amc_py8_interface_path""") + else: + pythia_main = pjoin(self.options['mg5amc_py8_interface_path'], + 'MG5aMC_PY8_interface') + warnings = MadEventCmd.mg5amc_py8_interface_consistency_warning(self.options) + if warnings: + logger.warning(warnings) else: - pythia_main = pjoin(self.options['mg5amc_py8_interface_path'], - 'MG5aMC_PY8_interface') - warnings = MadEventCmd.mg5amc_py8_interface_consistency_warning(self.options) - if warnings: - logger.warning(warnings) + pythia_main = pjoin(self.options['pythia8_path'], 'share', 'Pythia8', 'examples', 'main164') + if not os.path.exists(pythia_main): + pythia_main = pjoin(self.options['pythia8_path'], 'examples', 'main164') + if not os.path.exists(pythia_main): + logger.warning('main164 not found (or not compiled). Will try the old interface instead.') + return self.do_pythia8(line + ' --old_interface') self.results.add_detail('run_mode', 'madevent') @@ -4583,14 +4606,19 @@ def do_pythia8(self, line): run_type = 'CKKW' # Edit the card and run environment according to the run specification - HepMC_event_output = self.setup_Pythia8RunAndCard(PY8_Card, run_type) + HepMC_event_output = self.setup_Pythia8RunAndCard(PY8_Card, run_type, use_mg5amc_py8_interface=use_mg5amc_py8_interface) + + if not use_mg5amc_py8_interface and self.options['run_mode']==0 or (self.options['run_mode']==2 and self.options['nb_core']==1): + PY8_Card['Main:numberOfEvents']= self.run_card['nevents'] + # Now write the card. pythia_cmd_card = pjoin(self.me_dir, 'Events', self.run_name , '%s_pythia8.cmd' % tag) cmd_card = StringIO.StringIO() PY8_Card.write(cmd_card,pjoin(self.me_dir,'Cards','pythia8_card_default.dat'), - direct_pythia_input=True) + direct_pythia_input=True, + use_mg5amc_py8_interface=use_mg5amc_py8_interface) # Now setup the preamble to make sure that everything will use the locally # installed tools (if present) even if the user did not add it to its @@ -4632,7 +4660,7 @@ def do_pythia8(self, line): " command '/usr/bin/env %s' exists and returns a valid path."%shell) exe_cmd = "#!%s\n%s"%(shell_exe,' '.join( - [preamble+pythia_main, + [preamble+pythia_main, '' if use_mg5amc_py8_interface else '-c', os.path.basename(pythia_cmd_card)])) wrapper.write(exe_cmd) @@ -4699,6 +4727,7 @@ def do_pythia8(self, line): n_cores = max(min(min_n_core,n_cores),1) if self.options['run_mode']==0 or (self.options['run_mode']==2 and self.options['nb_core']==1): + # No need for parallelization anymore self.cluster = None logger.info('Follow Pythia8 shower by running the '+ @@ -4744,20 +4773,22 @@ def do_pythia8(self, line): ParallelPY8Card.subruns[0].systemSet('Beams:LHEF','events.lhe.gz') ParallelPY8Card.write(pjoin(parallelization_dir,'PY8Card.dat'), pjoin(self.me_dir,'Cards','pythia8_card_default.dat'), - direct_pythia_input=True) + direct_pythia_input=True, + use_mg5amc_py8_interface=use_mg5amc_py8_interface) # Write the wrapper wrapper_path = pjoin(parallelization_dir,'run_PY8.sh') wrapper = open(wrapper_path,'w') if self.options['cluster_temp_path'] is None: exe_cmd = \ -"""#!%s -./%s PY8Card.dat >& PY8_log.txt -""" +"""#!%%s +./%%s %s PY8Card.dat >& PY8_log.txt +""" % ('' if use_mg5amc_py8_interface else '-c') + else: exe_cmd = \ -"""#!%s +"""#!%%s ln -s ./events_$1.lhe.gz ./events.lhe.gz -./%s PY8Card_$1.dat >& PY8_log.txt +./%%s %s PY8Card_$1.dat >& PY8_log.txt mkdir split_$1 if [ -f ./events.hepmc ]; then @@ -4776,7 +4807,7 @@ def do_pythia8(self, line): mv ./PY8_log.txt ./split_$1/ fi tar -czf split_$1.tar.gz split_$1 -""" +""" % ('' if use_mg5amc_py8_interface else '-c') exe_cmd = exe_cmd%(shell_exe,os.path.basename(pythia_main)) wrapper.write(exe_cmd) wrapper.close() @@ -4812,19 +4843,27 @@ def do_pythia8(self, line): pjoin(parallelization_dir,split_files[-1])) logger.info('Submitting Pythia8 jobs...') + for i, split_file in enumerate(split_files): # We must write a PY8Card tailored for each split so as to correct the normalization # HEPMCoutput:scaling of each weight since the lhe showered will not longer contain the # same original number of events - split_PY8_Card = banner_mod.PY8Card(pjoin(parallelization_dir,'PY8Card.dat')) + split_PY8_Card = banner_mod.PY8Card(pjoin(parallelization_dir,'PY8Card.dat'), setter='user') + assert split_PY8_Card['JetMatching:nJetMax'] == PY8_Card['JetMatching:nJetMax'] + + + # Make sure to sure the number of split_events determined during the splitting. - split_PY8_Card.systemSet('Main:numberOfEvents',partition_for_PY8[i]) + split_PY8_Card.systemSet('Main:numberOfEvents',partition_for_PY8[i], force=True) + assert split_PY8_Card['Main:numberOfEvents'] == partition_for_PY8[i] split_PY8_Card.systemSet('HEPMCoutput:scaling',split_PY8_Card['HEPMCoutput:scaling']* - (float(partition_for_PY8[i]))) + (float(partition_for_PY8[i])), force=True) # Add_missing set to False so as to be sure not to add any additional parameter w.r.t # the ones in the original PY8 param_card copied. split_PY8_Card.write(pjoin(parallelization_dir,'PY8Card_%d.dat'%i), - pjoin(parallelization_dir,'PY8Card.dat'), add_missing=False) + pjoin(parallelization_dir,'PY8Card.dat'), add_missing=False, + direct_pythia_input=True, + use_mg5amc_py8_interface=use_mg5amc_py8_interface) in_files = [pjoin(parallelization_dir,os.path.basename(pythia_main)), pjoin(parallelization_dir,'PY8Card_%d.dat'%i), pjoin(parallelization_dir,split_file)] @@ -5073,7 +5112,7 @@ def wait_monitoring(Idle, Running, Done): # works both for fixed number of generated events and fixed accepted events self.results.add_detail('error_pythia', error_m) - if self.run_card['use_syst']: + if self.run_card['use_syst'] and use_mg5amc_py8_interface: self.results.add_detail('cross_pythia', -1) self.results.add_detail('error_pythia', 0) @@ -6132,7 +6171,102 @@ def get_Gdir(self, Pdir=None, symfact=None): mfactors[pjoin(P, "G%s" % tag)] = mfactor self.Gdirs = (Gdirs, mfactors) return self.get_Gdir(Pdir, symfact=symfact) + + ############################################################################ + def remove_empty_events(self, Gdir): + """return Gdir strip from the one providing empty events.lhe files.""" + + reasons = collections.defaultdict(list) + Gdirs = Gdir[:] + for G in Gdirs[:]: + try: + size = os.path.getsize(pjoin(G, 'events.lhe')) + except Exception as error: + size = 0 + if size <10: + Gdirs.remove(G) + try: + log = misc.BackRead(pjoin(G, 'log.txt')) + except Exception as error: + log = misc.BackRead(pjoin(G, 'run1_app.log')) + found = -1 + for line in log: + if 'Deleting file events.lhe' in line: + found = 0 + elif "Impossible BW configuration" in line: + reasons['bwconfig'].append(G) + break + elif found < -150: + reasons['not found'].append(G) + Gdirs.append(G) + break + elif found < 0: + found -= 1 + elif 'Loosen cuts or increase max_events' in line: + reasons['cuts'].append(G) + break + elif 'all returned zero' in line: + reasons['zero'].append(G) + break + elif found > 5: + reasons['unknown'].append(G) + break + else: + found += 1 + + if len(reasons): + logger.debug('Reasons for empty events.lhe:') + if len(reasons['unknown']): + logger.debug(' - unknown: %s' % len(reasons['unknown'])) + logger.log(10, ' DETAIL:' + ','.join(['/'.join(G.rsplit(os.sep)[-2:]) for G in reasons['unknown'][:10]])) + if len(reasons['not found']): + logger.debug(' - not found in log: %s' % len(reasons['not found'])) + logger.log(10, ' DETAIL:' + ','.join(['/'.join(G.rsplit(os.sep)[-2:]) for G in reasons['not found'][:10]])) + if len(reasons['zero']): + logger.debug(' - zero amplitudes: %s' % len(reasons['zero'])) + logger.log(10, ' DETAIL:' + ','.join(['/'.join(G.rsplit( os.sep)[-2:]) for G in reasons['zero'][:10]])) + if len(reasons['bwconfig']): + critical_bwconfig = set() + for G in reasons['bwconfig']: + base = G.rsplit('.',1)[0] + if any(G2.startswith(base) for G2 in Gdirs): + continue + else: + critical_bwconfig.add(os.sep.join(base.rsplit(os.sep)[-2:])) + for G in critical_bwconfig: + logger.warning('Gdirectory %s has no events.lhe file. (no BW config found %s times)' % G) + + logger.debug(' - impossible BW configuration: %s' % len(reasons['bwconfig'])) + logger.debug(' - channel with no possible BW configuration: %s' % len(critical_bwconfig)) + + if len(reasons['cuts']): + critical_nb_cuts = collections.defaultdict(int) + for G in reasons['cuts']: + if '.' in os.path.basename(G): + base = G.rsplit('.',1)[0] + if any(G2.startswith(base) for G2 in Gdirs): + continue + else: + critical_nb_cuts[os.sep.join(base.rsplit(os.sep)[-2:])] += 1 + else: + critical_nb_cuts[''] += 1 + logger.warning('Gdirectory %s has no events.lhe file. (no points passed cuts found)' % G) + for G, nb in critical_nb_cuts.items(): + if not G: + continue + else: + logger.warning('%s channel %s.XXX has no events.lhe file. (no points passed cuts). No %s with events detected' % (nb, G, G)) + logger.debug(' - no points passed cuts: %s' % len(reasons['cuts'])) + logger.log(10, ' DETAIL:' + ','.join(['/'.join(G.rsplit(os.sep)[-2:]) for G in reasons['cuts'][:10]])) + logger.debug(' - without any BW handling (critical): %s' % critical_nb_cuts['']) + logger.debug(' - with BW but all zero (critical): %s' % sum([nb for v, nb in critical_nb_cuts.items() if v!=''], 0)) + #logger.debug(' - cuts (with BW conflict where other channel contributes): %s' % (len(reasons['cuts'])- critical_nb_cuts)) + + + return Gdirs + + ############################################################################ def set_run_name(self, name, tag=None, level='parton', reload_card=False, allow_new_tag=True): @@ -6749,7 +6883,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 +6893,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 +7010,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 +7038,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 +7053,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 +7065,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 +7190,13 @@ 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) 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 +7210,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..774fe4261a 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -1096,9 +1096,9 @@ namespace mg5amcCpu const cxtype cI = cxmake( 0., 1. ); constexpr fptype one( 1. ); constexpr fptype two( 2. ); - const cxtype_sv TMP1 = ( F1[2] * ( F2[4] * ( V3[2] + V3[5] ) + F2[5] * ( V3[3] + cI * V3[4] ) ) + F1[3] * ( F2[4] * ( V3[3] - cI * V3[4] ) + F2[5] * ( V3[2] - V3[5] ) ) ); - const cxtype_sv TMP3 = ( F1[4] * ( F2[2] * ( V3[2] - V3[5] ) - F2[3] * ( V3[3] + cI * V3[4] ) ) + F1[5] * ( F2[2] * ( -V3[3] + cI * V3[4] ) + F2[3] * ( V3[2] + V3[5] ) ) ); - ( *vertex ) = Ccoeff * COUP * ( -one ) * ( +cI * TMP1 + ( two * cI ) * TMP3 ); + const cxtype_sv TMP3 = ( F1[2] * ( F2[4] * ( V3[2] + V3[5] ) + F2[5] * ( V3[3] + cI * V3[4] ) ) + F1[3] * ( F2[4] * ( V3[3] - cI * V3[4] ) + F2[5] * ( V3[2] - V3[5] ) ) ); + const cxtype_sv TMP4 = ( F1[4] * ( F2[2] * ( V3[2] - V3[5] ) - F2[3] * ( V3[3] + cI * V3[4] ) ) + F1[5] * ( F2[2] * ( -V3[3] + cI * V3[4] ) + F2[3] * ( V3[2] + V3[5] ) ) ); + ( *vertex ) = Ccoeff * COUP * ( -one ) * ( +cI * TMP3 + ( two * cI ) * TMP4 ); mgDebug( 1, __FUNCTION__ ); return; } @@ -1129,12 +1129,12 @@ namespace mg5amcCpu constexpr fptype two( 2. ); constexpr fptype half( 1. / 2. ); const cxtype_sv TMP2 = ( F1[2] * ( F2[4] * ( P3[0] + P3[3] ) + F2[5] * ( P3[1] + cI * P3[2] ) ) + F1[3] * ( F2[4] * ( P3[1] - cI * P3[2] ) + F2[5] * ( P3[0] - P3[3] ) ) ); - const cxtype_sv TMP4 = ( F1[4] * ( F2[2] * ( P3[0] - P3[3] ) - F2[3] * ( P3[1] + cI * P3[2] ) ) + F1[5] * ( F2[2] * ( -P3[1] + cI * P3[2] ) + F2[3] * ( P3[0] + P3[3] ) ) ); + const cxtype_sv TMP5 = ( F1[4] * ( F2[2] * ( P3[0] - P3[3] ) - F2[3] * ( P3[1] + cI * P3[2] ) ) + F1[5] * ( F2[2] * ( -P3[1] + cI * P3[2] ) + F2[3] * ( P3[0] + P3[3] ) ) ); const cxtype_sv denom = Ccoeff * COUP / ( ( P3[0] * P3[0] ) - ( P3[1] * P3[1] ) - ( P3[2] * P3[2] ) - ( P3[3] * P3[3] ) - M3 * ( M3 - cI * W3 ) ); - V3[2] = denom * ( -two * cI ) * ( OM3 * -half * P3[0] * ( TMP2 + two * TMP4 ) + ( +half * ( F1[2] * F2[4] + F1[3] * F2[5] ) + F1[4] * F2[2] + F1[5] * F2[3] ) ); - V3[3] = denom * ( -two * cI ) * ( OM3 * -half * P3[1] * ( TMP2 + two * TMP4 ) + ( -half * ( F1[2] * F2[5] + F1[3] * F2[4] ) + F1[4] * F2[3] + F1[5] * F2[2] ) ); - V3[4] = denom * ( two * cI ) * ( OM3 * half * P3[2] * ( TMP2 + two * TMP4 ) + ( half * cI * ( F1[2] * F2[5] ) - half * cI * ( F1[3] * F2[4] ) - cI * ( F1[4] * F2[3] ) + cI * ( F1[5] * F2[2] ) ) ); - V3[5] = denom * ( two * cI ) * ( OM3 * half * P3[3] * ( TMP2 + two * TMP4 ) + ( +half * ( F1[2] * F2[4] ) - half * ( F1[3] * F2[5] ) - F1[4] * F2[2] + F1[5] * F2[3] ) ); + V3[2] = denom * ( -two * cI ) * ( OM3 * -half * P3[0] * ( TMP2 + two * TMP5 ) + ( +half * ( F1[2] * F2[4] + F1[3] * F2[5] ) + F1[4] * F2[2] + F1[5] * F2[3] ) ); + V3[3] = denom * ( -two * cI ) * ( OM3 * -half * P3[1] * ( TMP2 + two * TMP5 ) + ( -half * ( F1[2] * F2[5] + F1[3] * F2[4] ) + F1[4] * F2[3] + F1[5] * F2[2] ) ); + V3[4] = denom * ( two * cI ) * ( OM3 * half * P3[2] * ( TMP2 + two * TMP5 ) + ( half * cI * ( F1[2] * F2[5] ) - half * cI * ( F1[3] * F2[4] ) - cI * ( F1[4] * F2[3] ) + cI * ( F1[5] * F2[2] ) ) ); + V3[5] = denom * ( two * cI ) * ( OM3 * half * P3[3] * ( TMP2 + two * TMP5 ) + ( +half * ( F1[2] * F2[4] ) - half * ( F1[3] * F2[5] ) - F1[4] * F2[2] + F1[5] * F2[3] ) ); mgDebug( 1, __FUNCTION__ ); return; } @@ -1163,9 +1163,9 @@ namespace mg5amcCpu const cxtype cI = cxmake( 0., 1. ); constexpr fptype one( 1. ); constexpr fptype two( 2. ); - const cxtype_sv TMP1 = ( F1[2] * ( F2[4] * ( V3[2] + V3[5] ) + F2[5] * ( V3[3] + cI * V3[4] ) ) + F1[3] * ( F2[4] * ( V3[3] - cI * V3[4] ) + F2[5] * ( V3[2] - V3[5] ) ) ); - const cxtype_sv TMP3 = ( F1[4] * ( F2[2] * ( V3[2] - V3[5] ) - F2[3] * ( V3[3] + cI * V3[4] ) ) + F1[5] * ( F2[2] * ( -V3[3] + cI * V3[4] ) + F2[3] * ( V3[2] + V3[5] ) ) ); - ( *vertex ) = ( -one ) * ( Ccoeff2 * COUP2 * ( +cI * TMP1 + ( two * cI ) * TMP3 ) + cI * ( TMP1 * Ccoeff1 * COUP1 ) ); + const cxtype_sv TMP3 = ( F1[2] * ( F2[4] * ( V3[2] + V3[5] ) + F2[5] * ( V3[3] + cI * V3[4] ) ) + F1[3] * ( F2[4] * ( V3[3] - cI * V3[4] ) + F2[5] * ( V3[2] - V3[5] ) ) ); + const cxtype_sv TMP4 = ( F1[4] * ( F2[2] * ( V3[2] - V3[5] ) - F2[3] * ( V3[3] + cI * V3[4] ) ) + F1[5] * ( F2[2] * ( -V3[3] + cI * V3[4] ) + F2[3] * ( V3[2] + V3[5] ) ) ); + ( *vertex ) = ( -one ) * ( Ccoeff2 * COUP2 * ( +cI * TMP3 + ( two * cI ) * TMP4 ) + cI * ( TMP3 * Ccoeff1 * COUP1 ) ); mgDebug( 1, __FUNCTION__ ); return; } @@ -1200,12 +1200,12 @@ namespace mg5amcCpu constexpr fptype two( 2. ); constexpr fptype half( 1. / 2. ); const cxtype_sv TMP2 = ( F1[2] * ( F2[4] * ( P3[0] + P3[3] ) + F2[5] * ( P3[1] + cI * P3[2] ) ) + F1[3] * ( F2[4] * ( P3[1] - cI * P3[2] ) + F2[5] * ( P3[0] - P3[3] ) ) ); - const cxtype_sv TMP4 = ( F1[4] * ( F2[2] * ( P3[0] - P3[3] ) - F2[3] * ( P3[1] + cI * P3[2] ) ) + F1[5] * ( F2[2] * ( -P3[1] + cI * P3[2] ) + F2[3] * ( P3[0] + P3[3] ) ) ); + const cxtype_sv TMP5 = ( F1[4] * ( F2[2] * ( P3[0] - P3[3] ) - F2[3] * ( P3[1] + cI * P3[2] ) ) + F1[5] * ( F2[2] * ( -P3[1] + cI * P3[2] ) + F2[3] * ( P3[0] + P3[3] ) ) ); const cxtype_sv denom = one / ( ( P3[0] * P3[0] ) - ( P3[1] * P3[1] ) - ( P3[2] * P3[2] ) - ( P3[3] * P3[3] ) - M3 * ( M3 - cI * W3 ) ); - V3[2] = denom * ( -two * cI ) * ( Ccoeff2 * COUP2 * ( OM3 * -half * P3[0] * ( TMP2 + two * TMP4 ) + ( +half * ( F1[2] * F2[4] + F1[3] * F2[5] ) + F1[4] * F2[2] + F1[5] * F2[3] ) ) + half * ( Ccoeff1 * COUP1 * ( F1[2] * F2[4] + F1[3] * F2[5] - P3[0] * OM3 * TMP2 ) ) ); - V3[3] = denom * ( -two * cI ) * ( Ccoeff2 * COUP2 * ( OM3 * -half * P3[1] * ( TMP2 + two * TMP4 ) + ( -half * ( F1[2] * F2[5] + F1[3] * F2[4] ) + F1[4] * F2[3] + F1[5] * F2[2] ) ) - half * ( Ccoeff1 * COUP1 * ( F1[2] * F2[5] + F1[3] * F2[4] + P3[1] * OM3 * TMP2 ) ) ); - V3[4] = denom * cI * ( Ccoeff2 * COUP2 * ( OM3 * P3[2] * ( TMP2 + two * TMP4 ) + ( +cI * ( F1[2] * F2[5] ) - cI * ( F1[3] * F2[4] ) + ( -two * cI ) * ( F1[4] * F2[3] ) + ( two * cI ) * ( F1[5] * F2[2] ) ) ) + Ccoeff1 * COUP1 * ( +cI * ( F1[2] * F2[5] ) - cI * ( F1[3] * F2[4] ) + P3[2] * OM3 * TMP2 ) ); - V3[5] = denom * ( two * cI ) * ( Ccoeff2 * COUP2 * ( OM3 * half * P3[3] * ( TMP2 + two * TMP4 ) + ( +half * ( F1[2] * F2[4] ) - half * ( F1[3] * F2[5] ) - F1[4] * F2[2] + F1[5] * F2[3] ) ) + half * ( Ccoeff1 * COUP1 * ( F1[2] * F2[4] + P3[3] * OM3 * TMP2 - F1[3] * F2[5] ) ) ); + V3[2] = denom * ( -two * cI ) * ( Ccoeff2 * COUP2 * ( OM3 * -half * P3[0] * ( TMP2 + two * TMP5 ) + ( +half * ( F1[2] * F2[4] + F1[3] * F2[5] ) + F1[4] * F2[2] + F1[5] * F2[3] ) ) + half * ( Ccoeff1 * COUP1 * ( F1[2] * F2[4] + F1[3] * F2[5] - P3[0] * OM3 * TMP2 ) ) ); + V3[3] = denom * ( -two * cI ) * ( Ccoeff2 * COUP2 * ( OM3 * -half * P3[1] * ( TMP2 + two * TMP5 ) + ( -half * ( F1[2] * F2[5] + F1[3] * F2[4] ) + F1[4] * F2[3] + F1[5] * F2[2] ) ) - half * ( Ccoeff1 * COUP1 * ( F1[2] * F2[5] + F1[3] * F2[4] + P3[1] * OM3 * TMP2 ) ) ); + V3[4] = denom * cI * ( Ccoeff2 * COUP2 * ( OM3 * P3[2] * ( TMP2 + two * TMP5 ) + ( +cI * ( F1[2] * F2[5] ) - cI * ( F1[3] * F2[4] ) + ( -two * cI ) * ( F1[4] * F2[3] ) + ( two * cI ) * ( F1[5] * F2[2] ) ) ) + Ccoeff1 * COUP1 * ( +cI * ( F1[2] * F2[5] ) - cI * ( F1[3] * F2[4] ) + P3[2] * OM3 * TMP2 ) ); + V3[5] = denom * ( two * cI ) * ( Ccoeff2 * COUP2 * ( OM3 * half * P3[3] * ( TMP2 + two * TMP5 ) + ( +half * ( F1[2] * F2[4] ) - half * ( F1[3] * F2[5] ) - F1[4] * F2[2] + F1[5] * F2[3] ) ) + half * ( Ccoeff1 * COUP1 * ( F1[2] * F2[4] + P3[3] * OM3 * TMP2 - F1[3] * F2[5] ) ) ); mgDebug( 1, __FUNCTION__ ); return; } diff --git a/epochX/cudacpp/ee_mumu.mad/src/Parameters_sm.cc b/epochX/cudacpp/ee_mumu.mad/src/Parameters_sm.cc index 37676c1d8d..d919d4298c 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.3, 2025-06-12 // 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..9c7b226f5c 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/ee_mumu.mad/test/cudacpp_test.mk b/epochX/cudacpp/ee_mumu.mad/test/cudacpp_test.mk index f703a1ae7c..4934c9a53f 100644 --- a/epochX/cudacpp/ee_mumu.mad/test/cudacpp_test.mk +++ b/epochX/cudacpp/ee_mumu.mad/test/cudacpp_test.mk @@ -19,7 +19,7 @@ CXXFLAGS += -Igoogletest/googletest/include/ -std=c++11 all: googletest/$(INSTALLDIR)/lib64/libgtest.a googletest/CMakeLists.txt: - git clone https://github.com/google/googletest.git -b release-1.11.0 googletest + git clone https://github.com/google/googletest.git -b v1.17.0 googletest googletest/$(BUILDDIR)/Makefile: googletest/CMakeLists.txt mkdir -p googletest/$(BUILDDIR) 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/P1_Sigma_sm_epem_mupmum/CPPProcess.cc b/epochX/cudacpp/ee_mumu.sa/SubProcesses/P1_Sigma_sm_epem_mupmum/CPPProcess.cc index 16a91dd141..5eedd5e6f7 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -537,7 +537,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- 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..c8db535132 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.3, 2025-06-12 // 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/cudacpp.mk b/epochX/cudacpp/ee_mumu.sa/SubProcesses/cudacpp.mk index 20d8ded718..20b8e6b858 100644 --- a/epochX/cudacpp/ee_mumu.sa/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/ee_mumu.sa/SubProcesses/cudacpp.mk @@ -114,7 +114,7 @@ export CXXFLAGS override CUDA_HOME = $(patsubst %/bin/nvcc,%,$(shell which nvcc 2>/dev/null)) # Set HIP_HOME from the path to hipcc, if it exists -override HIP_HOME = $(patsubst %/bin/hipcc,%,$(shell which hipcc 2>/dev/null)) +override HIP_HOME = $(shell hipconfig --rocmpath) # Configure CUDA_INC (for CURAND and NVTX) and NVTX if a CUDA installation exists (see #965) ifeq ($(CUDA_HOME),) @@ -229,6 +229,8 @@ ifeq ($(BACKEND),cuda) else ifeq ($(BACKEND),hip) + # example architecture values MI200:gfx90a, MI350X:gfx942 + MADGRAPH_HIP_ARCHITECTURE ?= gfx942 # Set GPUCC as $(HIP_HOME)/bin/hipcc (it was already checked above that this exists) GPUCC = $(HIP_HOME)/bin/hipcc XCOMPILERFLAG = @@ -243,7 +245,7 @@ else ifeq ($(BACKEND),hip) ###GPUFLAGS += -ggdb # FOR DEBUGGING ONLY # AMD HIP architecture flags - GPUARCHFLAGS = --offload-arch=gfx90a + GPUARCHFLAGS = --offload-arch=${MADGRAPH_HIP_ARCHITECTURE} GPUFLAGS += $(GPUARCHFLAGS) # Other AMD-specific flags @@ -878,7 +880,7 @@ endif $(gpu_fcheckmain): LIBFLAGS += $(GPULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH $(gpu_fcheckmain): $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBDIR)/lib$(MG5AMC_GPULIB).so $(gpu_objects_exe) ifneq ($(findstring hipcc,$(GPUCC)),) # link fortran/c++/hip using $FC when hipcc is used #802 - $(FC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) -lstdc++ -L$(shell cd -L $(shell dirname $(shell $(GPUCC) -print-prog-name=clang))/../..; pwd)/lib -lamdhip64 + $(FC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) -lstdc++ -L$(HIP_HOME)/lib -lamdhip64 else $(GPUCC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) endif @@ -979,7 +981,7 @@ else # link only runTest_$(GPUSUFFIX).o (new: in the past, this was linking both $(gpu_testmain): LIBFLAGS += $(GPULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH $(gpu_testmain): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(gpu_objects_lib) $(gpu_objects_exe) $(GTESTLIBS) ifneq ($(findstring hipcc,$(GPUCC)),) # link fortran/c++/hip using $FC when hipcc is used #802 - $(FC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lstdc++ -lpthread -L$(shell cd -L $(shell dirname $(shell $(GPUCC) -print-prog-name=clang))/../..; pwd)/lib -lamdhip64 + $(FC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lstdc++ -lpthread -L$(HIP_HOME)/lib -lamdhip64 else $(GPUCC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lcuda endif @@ -1104,10 +1106,20 @@ else @cat /proc/cpuinfo | grep "physical id" | sort -u endif @echo "" -ifneq ($(shell which nvidia-smi 2>/dev/null),) - nvidia-smi -L + # some systems may have -smi installed, but it fails to execute + # because it cannot communicate with the hardware + @if nvidia-smi &>/dev/null ; then \ + nvidia-smi -L ;\ + else \ + echo "No Nvidia GPU detected" ;\ + fi @echo "" -endif + @if amd-smi &>/dev/null ; then \ + amd-smi static -a ;\ + amd-smi list ;\ + else \ + echo "No AMD GPU detected" ;\ + fi @echo USECCACHE=$(USECCACHE) ifeq ($(USECCACHE),1) ccache --version | head -1 diff --git a/epochX/cudacpp/ee_mumu.sa/src/HelAmps_sm.h b/epochX/cudacpp/ee_mumu.sa/src/HelAmps_sm.h index 18f664e0d1..774fe4261a 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -1096,9 +1096,9 @@ namespace mg5amcCpu const cxtype cI = cxmake( 0., 1. ); constexpr fptype one( 1. ); constexpr fptype two( 2. ); - const cxtype_sv TMP1 = ( F1[2] * ( F2[4] * ( V3[2] + V3[5] ) + F2[5] * ( V3[3] + cI * V3[4] ) ) + F1[3] * ( F2[4] * ( V3[3] - cI * V3[4] ) + F2[5] * ( V3[2] - V3[5] ) ) ); - const cxtype_sv TMP3 = ( F1[4] * ( F2[2] * ( V3[2] - V3[5] ) - F2[3] * ( V3[3] + cI * V3[4] ) ) + F1[5] * ( F2[2] * ( -V3[3] + cI * V3[4] ) + F2[3] * ( V3[2] + V3[5] ) ) ); - ( *vertex ) = Ccoeff * COUP * ( -one ) * ( +cI * TMP1 + ( two * cI ) * TMP3 ); + const cxtype_sv TMP3 = ( F1[2] * ( F2[4] * ( V3[2] + V3[5] ) + F2[5] * ( V3[3] + cI * V3[4] ) ) + F1[3] * ( F2[4] * ( V3[3] - cI * V3[4] ) + F2[5] * ( V3[2] - V3[5] ) ) ); + const cxtype_sv TMP4 = ( F1[4] * ( F2[2] * ( V3[2] - V3[5] ) - F2[3] * ( V3[3] + cI * V3[4] ) ) + F1[5] * ( F2[2] * ( -V3[3] + cI * V3[4] ) + F2[3] * ( V3[2] + V3[5] ) ) ); + ( *vertex ) = Ccoeff * COUP * ( -one ) * ( +cI * TMP3 + ( two * cI ) * TMP4 ); mgDebug( 1, __FUNCTION__ ); return; } @@ -1129,12 +1129,12 @@ namespace mg5amcCpu constexpr fptype two( 2. ); constexpr fptype half( 1. / 2. ); const cxtype_sv TMP2 = ( F1[2] * ( F2[4] * ( P3[0] + P3[3] ) + F2[5] * ( P3[1] + cI * P3[2] ) ) + F1[3] * ( F2[4] * ( P3[1] - cI * P3[2] ) + F2[5] * ( P3[0] - P3[3] ) ) ); - const cxtype_sv TMP4 = ( F1[4] * ( F2[2] * ( P3[0] - P3[3] ) - F2[3] * ( P3[1] + cI * P3[2] ) ) + F1[5] * ( F2[2] * ( -P3[1] + cI * P3[2] ) + F2[3] * ( P3[0] + P3[3] ) ) ); + const cxtype_sv TMP5 = ( F1[4] * ( F2[2] * ( P3[0] - P3[3] ) - F2[3] * ( P3[1] + cI * P3[2] ) ) + F1[5] * ( F2[2] * ( -P3[1] + cI * P3[2] ) + F2[3] * ( P3[0] + P3[3] ) ) ); const cxtype_sv denom = Ccoeff * COUP / ( ( P3[0] * P3[0] ) - ( P3[1] * P3[1] ) - ( P3[2] * P3[2] ) - ( P3[3] * P3[3] ) - M3 * ( M3 - cI * W3 ) ); - V3[2] = denom * ( -two * cI ) * ( OM3 * -half * P3[0] * ( TMP2 + two * TMP4 ) + ( +half * ( F1[2] * F2[4] + F1[3] * F2[5] ) + F1[4] * F2[2] + F1[5] * F2[3] ) ); - V3[3] = denom * ( -two * cI ) * ( OM3 * -half * P3[1] * ( TMP2 + two * TMP4 ) + ( -half * ( F1[2] * F2[5] + F1[3] * F2[4] ) + F1[4] * F2[3] + F1[5] * F2[2] ) ); - V3[4] = denom * ( two * cI ) * ( OM3 * half * P3[2] * ( TMP2 + two * TMP4 ) + ( half * cI * ( F1[2] * F2[5] ) - half * cI * ( F1[3] * F2[4] ) - cI * ( F1[4] * F2[3] ) + cI * ( F1[5] * F2[2] ) ) ); - V3[5] = denom * ( two * cI ) * ( OM3 * half * P3[3] * ( TMP2 + two * TMP4 ) + ( +half * ( F1[2] * F2[4] ) - half * ( F1[3] * F2[5] ) - F1[4] * F2[2] + F1[5] * F2[3] ) ); + V3[2] = denom * ( -two * cI ) * ( OM3 * -half * P3[0] * ( TMP2 + two * TMP5 ) + ( +half * ( F1[2] * F2[4] + F1[3] * F2[5] ) + F1[4] * F2[2] + F1[5] * F2[3] ) ); + V3[3] = denom * ( -two * cI ) * ( OM3 * -half * P3[1] * ( TMP2 + two * TMP5 ) + ( -half * ( F1[2] * F2[5] + F1[3] * F2[4] ) + F1[4] * F2[3] + F1[5] * F2[2] ) ); + V3[4] = denom * ( two * cI ) * ( OM3 * half * P3[2] * ( TMP2 + two * TMP5 ) + ( half * cI * ( F1[2] * F2[5] ) - half * cI * ( F1[3] * F2[4] ) - cI * ( F1[4] * F2[3] ) + cI * ( F1[5] * F2[2] ) ) ); + V3[5] = denom * ( two * cI ) * ( OM3 * half * P3[3] * ( TMP2 + two * TMP5 ) + ( +half * ( F1[2] * F2[4] ) - half * ( F1[3] * F2[5] ) - F1[4] * F2[2] + F1[5] * F2[3] ) ); mgDebug( 1, __FUNCTION__ ); return; } @@ -1163,9 +1163,9 @@ namespace mg5amcCpu const cxtype cI = cxmake( 0., 1. ); constexpr fptype one( 1. ); constexpr fptype two( 2. ); - const cxtype_sv TMP1 = ( F1[2] * ( F2[4] * ( V3[2] + V3[5] ) + F2[5] * ( V3[3] + cI * V3[4] ) ) + F1[3] * ( F2[4] * ( V3[3] - cI * V3[4] ) + F2[5] * ( V3[2] - V3[5] ) ) ); - const cxtype_sv TMP3 = ( F1[4] * ( F2[2] * ( V3[2] - V3[5] ) - F2[3] * ( V3[3] + cI * V3[4] ) ) + F1[5] * ( F2[2] * ( -V3[3] + cI * V3[4] ) + F2[3] * ( V3[2] + V3[5] ) ) ); - ( *vertex ) = ( -one ) * ( Ccoeff2 * COUP2 * ( +cI * TMP1 + ( two * cI ) * TMP3 ) + cI * ( TMP1 * Ccoeff1 * COUP1 ) ); + const cxtype_sv TMP3 = ( F1[2] * ( F2[4] * ( V3[2] + V3[5] ) + F2[5] * ( V3[3] + cI * V3[4] ) ) + F1[3] * ( F2[4] * ( V3[3] - cI * V3[4] ) + F2[5] * ( V3[2] - V3[5] ) ) ); + const cxtype_sv TMP4 = ( F1[4] * ( F2[2] * ( V3[2] - V3[5] ) - F2[3] * ( V3[3] + cI * V3[4] ) ) + F1[5] * ( F2[2] * ( -V3[3] + cI * V3[4] ) + F2[3] * ( V3[2] + V3[5] ) ) ); + ( *vertex ) = ( -one ) * ( Ccoeff2 * COUP2 * ( +cI * TMP3 + ( two * cI ) * TMP4 ) + cI * ( TMP3 * Ccoeff1 * COUP1 ) ); mgDebug( 1, __FUNCTION__ ); return; } @@ -1200,12 +1200,12 @@ namespace mg5amcCpu constexpr fptype two( 2. ); constexpr fptype half( 1. / 2. ); const cxtype_sv TMP2 = ( F1[2] * ( F2[4] * ( P3[0] + P3[3] ) + F2[5] * ( P3[1] + cI * P3[2] ) ) + F1[3] * ( F2[4] * ( P3[1] - cI * P3[2] ) + F2[5] * ( P3[0] - P3[3] ) ) ); - const cxtype_sv TMP4 = ( F1[4] * ( F2[2] * ( P3[0] - P3[3] ) - F2[3] * ( P3[1] + cI * P3[2] ) ) + F1[5] * ( F2[2] * ( -P3[1] + cI * P3[2] ) + F2[3] * ( P3[0] + P3[3] ) ) ); + const cxtype_sv TMP5 = ( F1[4] * ( F2[2] * ( P3[0] - P3[3] ) - F2[3] * ( P3[1] + cI * P3[2] ) ) + F1[5] * ( F2[2] * ( -P3[1] + cI * P3[2] ) + F2[3] * ( P3[0] + P3[3] ) ) ); const cxtype_sv denom = one / ( ( P3[0] * P3[0] ) - ( P3[1] * P3[1] ) - ( P3[2] * P3[2] ) - ( P3[3] * P3[3] ) - M3 * ( M3 - cI * W3 ) ); - V3[2] = denom * ( -two * cI ) * ( Ccoeff2 * COUP2 * ( OM3 * -half * P3[0] * ( TMP2 + two * TMP4 ) + ( +half * ( F1[2] * F2[4] + F1[3] * F2[5] ) + F1[4] * F2[2] + F1[5] * F2[3] ) ) + half * ( Ccoeff1 * COUP1 * ( F1[2] * F2[4] + F1[3] * F2[5] - P3[0] * OM3 * TMP2 ) ) ); - V3[3] = denom * ( -two * cI ) * ( Ccoeff2 * COUP2 * ( OM3 * -half * P3[1] * ( TMP2 + two * TMP4 ) + ( -half * ( F1[2] * F2[5] + F1[3] * F2[4] ) + F1[4] * F2[3] + F1[5] * F2[2] ) ) - half * ( Ccoeff1 * COUP1 * ( F1[2] * F2[5] + F1[3] * F2[4] + P3[1] * OM3 * TMP2 ) ) ); - V3[4] = denom * cI * ( Ccoeff2 * COUP2 * ( OM3 * P3[2] * ( TMP2 + two * TMP4 ) + ( +cI * ( F1[2] * F2[5] ) - cI * ( F1[3] * F2[4] ) + ( -two * cI ) * ( F1[4] * F2[3] ) + ( two * cI ) * ( F1[5] * F2[2] ) ) ) + Ccoeff1 * COUP1 * ( +cI * ( F1[2] * F2[5] ) - cI * ( F1[3] * F2[4] ) + P3[2] * OM3 * TMP2 ) ); - V3[5] = denom * ( two * cI ) * ( Ccoeff2 * COUP2 * ( OM3 * half * P3[3] * ( TMP2 + two * TMP4 ) + ( +half * ( F1[2] * F2[4] ) - half * ( F1[3] * F2[5] ) - F1[4] * F2[2] + F1[5] * F2[3] ) ) + half * ( Ccoeff1 * COUP1 * ( F1[2] * F2[4] + P3[3] * OM3 * TMP2 - F1[3] * F2[5] ) ) ); + V3[2] = denom * ( -two * cI ) * ( Ccoeff2 * COUP2 * ( OM3 * -half * P3[0] * ( TMP2 + two * TMP5 ) + ( +half * ( F1[2] * F2[4] + F1[3] * F2[5] ) + F1[4] * F2[2] + F1[5] * F2[3] ) ) + half * ( Ccoeff1 * COUP1 * ( F1[2] * F2[4] + F1[3] * F2[5] - P3[0] * OM3 * TMP2 ) ) ); + V3[3] = denom * ( -two * cI ) * ( Ccoeff2 * COUP2 * ( OM3 * -half * P3[1] * ( TMP2 + two * TMP5 ) + ( -half * ( F1[2] * F2[5] + F1[3] * F2[4] ) + F1[4] * F2[3] + F1[5] * F2[2] ) ) - half * ( Ccoeff1 * COUP1 * ( F1[2] * F2[5] + F1[3] * F2[4] + P3[1] * OM3 * TMP2 ) ) ); + V3[4] = denom * cI * ( Ccoeff2 * COUP2 * ( OM3 * P3[2] * ( TMP2 + two * TMP5 ) + ( +cI * ( F1[2] * F2[5] ) - cI * ( F1[3] * F2[4] ) + ( -two * cI ) * ( F1[4] * F2[3] ) + ( two * cI ) * ( F1[5] * F2[2] ) ) ) + Ccoeff1 * COUP1 * ( +cI * ( F1[2] * F2[5] ) - cI * ( F1[3] * F2[4] ) + P3[2] * OM3 * TMP2 ) ); + V3[5] = denom * ( two * cI ) * ( Ccoeff2 * COUP2 * ( OM3 * half * P3[3] * ( TMP2 + two * TMP5 ) + ( +half * ( F1[2] * F2[4] ) - half * ( F1[3] * F2[5] ) - F1[4] * F2[2] + F1[5] * F2[3] ) ) + half * ( Ccoeff1 * COUP1 * ( F1[2] * F2[4] + P3[3] * OM3 * TMP2 - F1[3] * F2[5] ) ) ); mgDebug( 1, __FUNCTION__ ); return; } diff --git a/epochX/cudacpp/ee_mumu.sa/src/Parameters_sm.cc b/epochX/cudacpp/ee_mumu.sa/src/Parameters_sm.cc index 37676c1d8d..d919d4298c 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.3, 2025-06-12 // 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..9c7b226f5c 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/ee_mumu.sa/test/cudacpp_test.mk b/epochX/cudacpp/ee_mumu.sa/test/cudacpp_test.mk index f703a1ae7c..4934c9a53f 100644 --- a/epochX/cudacpp/ee_mumu.sa/test/cudacpp_test.mk +++ b/epochX/cudacpp/ee_mumu.sa/test/cudacpp_test.mk @@ -19,7 +19,7 @@ CXXFLAGS += -Igoogletest/googletest/include/ -std=c++11 all: googletest/$(INSTALLDIR)/lib64/libgtest.a googletest/CMakeLists.txt: - git clone https://github.com/google/googletest.git -b release-1.11.0 googletest + git clone https://github.com/google/googletest.git -b v1.17.0 googletest googletest/$(BUILDDIR)/Makefile: googletest/CMakeLists.txt mkdir -p googletest/$(BUILDDIR) diff --git a/epochX/cudacpp/gg_tt.mad/Cards/ident_card.dat b/epochX/cudacpp/gg_tt.mad/Cards/ident_card.dat index 0ba87b008f..b37758a42a 100644 --- a/epochX/cudacpp/gg_tt.mad/Cards/ident_card.dat +++ b/epochX/cudacpp/gg_tt.mad/Cards/ident_card.dat @@ -2,32 +2,32 @@ ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c written by the UFO converter ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc +mass 5 mdl_MB +mass 6 mdl_MT +mass 15 mdl_MTA +mass 23 mdl_MZ +mass 25 mdl_MH +sminputs 1 aEWM1 +sminputs 2 mdl_Gf +sminputs 3 aS +yukawa 5 mdl_ymb +yukawa 6 mdl_ymt +yukawa 15 mdl_ymtau - - +decay 6 mdl_WT decay 23 mdl_WZ + decay 24 mdl_WW + decay 25 mdl_WH -decay 6 mdl_WT -mass 15 mdl_MTA -mass 23 mdl_MZ -mass 25 mdl_MH -mass 5 mdl_MB -mass 6 mdl_MT -sminputs 1 aEWM1 -sminputs 2 mdl_Gf -sminputs 3 aS -yukawa 15 mdl_ymtau -yukawa 5 mdl_ymb -yukawa 6 mdl_ymt diff --git a/epochX/cudacpp/gg_tt.mad/Cards/me5_configuration.txt b/epochX/cudacpp/gg_tt.mad/Cards/me5_configuration.txt index 68b4c46295..fa8d3481a2 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 = /home/dmass/Development/madgraph4gpu/amd-ci/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo +mg5_path = /home/dmass/Development/madgraph4gpu/amd-ci/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..47bdc71fda 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.3 2025-06-12 * #* * #* WARNING: UNKNOWN DEVELOPMENT VERSION. * #* WARNING: DO NOT USE FOR PRODUCTION * @@ -35,15 +35,17 @@ set loop_color_flows False set max_npoint_for_channel 0 set default_unset_couplings 99 set max_t_for_channel 99 +set zerowidth_tchannel True set nlo_mixed_expansion True -set stdout_level DEBUG -set zerowidth_tchannel F -generate g g > t t~ +import model sm define p = g u c d s u~ c~ d~ s~ define j = g u c d s u~ c~ d~ s~ define l+ = e+ mu+ define l- = e- mu- define vl = ve vm vt define vl~ = ve~ vm~ vt~ -output madevent_simd ../TMPOUT/CODEGEN_mad_gg_tt --hel_recycling=False\ - --vector_size=32 +set stdout_level DEBUG +set zerowidth_tchannel F +generate g g > t t~ +output madevent_simd gg_tt.mad_gen --hel_recycling=False --vector_size\ +=32 diff --git a/epochX/cudacpp/gg_tt.mad/Cards/run_card.dat b/epochX/cudacpp/gg_tt.mad/Cards/run_card.dat index 6b82577032..85e1d39035 100644 --- a/epochX/cudacpp/gg_tt.mad/Cards/run_card.dat +++ b/epochX/cudacpp/gg_tt.mad/Cards/run_card.dat @@ -92,11 +92,11 @@ #********************************************************************* # Compilation flag. #********************************************************************* - -O3 -ffast-math -fbounds-check = global_flag ! build flags for all Fortran code (for a fair comparison to cudacpp; default is -O) + -O = global_flag ! fortran optimization flag use for the all code. --fast-math = aloha_flag ! fortran optimization flag for aloha function. Suggestions: '-ffast-math' -O3 = matrix_flag ! fortran optimization flag for matrix.f function. Suggestions: '-O3' - 32 = vector_size ! size of fortran arrays allocated in the multi-event API for SIMD/GPU (VECSIZE_MEMMAX) - 512 = nb_warp ! total number of warp/frontwave + 16 = vector_size ! size of fortran arrays allocated in the multi-event API for SIMD/GPU (VECSIZE_MEMMAX) + 1 = nb_warp ! total number of warp/frontwave #********************************************************************* # Customization (custom cuts/scale/bias/...) * @@ -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..1ac53bb4bd 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.3 \ No newline at end of file diff --git a/epochX/cudacpp/gg_tt.mad/Source/.make_opts b/epochX/cudacpp/gg_tt.mad/Source/.make_opts index de3864242b..56ba259c56 100644 --- a/epochX/cudacpp/gg_tt.mad/Source/.make_opts +++ b/epochX/cudacpp/gg_tt.mad/Source/.make_opts @@ -102,6 +102,7 @@ endif ifneq ($(lhapdf),) CXXFLAGS += $(shell $(lhapdf) --cppflags) alfas_functions=alfas_functions_lhapdf + alfas_to_clean=alfas_functions.o llhapdf+= $(shell $(lhapdf) --cflags --libs) -lLHAPDF # check if we need to activate c++11 (for lhapdf6.2) ifeq ($(origin CXX),default) @@ -113,10 +114,11 @@ ifneq ($(lhapdf),) endif else alfas_functions=alfas_functions + alfas_to_clean=alfas_functions_lhapdf.o llhapdf= endif # Helper function to check MG5 version define CHECK_MG5AMC_VERSION python -c 'import re; from distutils.version import StrictVersion; print StrictVersion("$(MG5AMC_VERSION)") >= StrictVersion("$(1)") if re.match("^[\d\.]+$$","$(MG5AMC_VERSION)") else True;' -endef \ No newline at end of file +endef 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..bdf427601f 100644 --- a/epochX/cudacpp/gg_tt.mad/Source/make_opts +++ b/epochX/cudacpp/gg_tt.mad/Source/make_opts @@ -1,12 +1,11 @@ DEFAULT_CPP_COMPILER=g++ -DEFAULT_F2PY_COMPILER=f2py3 -DEFAULT_F_COMPILER=gfortran -GLOBAL_FLAG=-O3 -ffast-math -fbounds-check MACFLAG= +STDLIB=-lstdc++ +STDLIB_FLAG= +DEFAULT_F2PY_COMPILER=f2py +DEFAULT_F_COMPILER=gfortran MG5AMC_VERSION=SpecifiedByMG5aMCAtRunTime PYTHIA8_PATH=NotInstalled -STDLIB_FLAG= -STDLIB=-lstdc++ #end_of_make_opts_variables BIASLIBDIR=../../../lib/ @@ -103,6 +102,7 @@ endif ifneq ($(lhapdf),) CXXFLAGS += $(shell $(lhapdf) --cppflags) alfas_functions=alfas_functions_lhapdf +alfas_to_clean=alfas_functions.o llhapdf+= $(shell $(lhapdf) --cflags --libs) -lLHAPDF # check if we need to activate c++11 (for lhapdf6.2) ifeq ($(origin CXX),default) @@ -114,6 +114,7 @@ endif endif else alfas_functions=alfas_functions +alfas_to_clean=alfas_functions_lhapdf.o llhapdf= endif diff --git a/epochX/cudacpp/gg_tt.mad/Source/makefile b/epochX/cudacpp/gg_tt.mad/Source/makefile index 291ca907ee..87a9e61723 100644 --- a/epochX/cudacpp/gg_tt.mad/Source/makefile +++ b/epochX/cudacpp/gg_tt.mad/Source/makefile @@ -37,10 +37,12 @@ all: $(LIBRARIES) $(LIBDIR)libdhelas.$(libext) $(LIBDIR)libpdf.$(libext) $(LIBDI $(LIBDIR)libdsample.$(libext): $(DSAMPLE) $(call CREATELIB, $@, $^) $(LIBDIR)libgeneric.$(libext): $(GENERIC) + rm -f $@ 2>/dev/null $(call CREATELIB, $@, $^) + rm -f $(alfas_to_clean) 2>/dev/null $(LIBDIR)libdhelas.$(libext): DHELAS cd DHELAS; make; cd .. -$(LIBDIR)libpdf.$(libext): PDF make_opts +$(LIBDIR)libpdf.$(libext): PDF $(alfas_functions).o cd PDF; make; cd .. ifneq (,$(filter edff chff, $(pdlabel1) $(pdlabel2))) $(LIBDIR)libgammaUPC.$(libext): PDF/gammaUPC @@ -73,6 +75,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/vector.inc b/epochX/cudacpp/gg_tt.mad/Source/vector.inc index ba125272b6..9d8b377aa7 100644 --- a/epochX/cudacpp/gg_tt.mad/Source/vector.inc +++ b/epochX/cudacpp/gg_tt.mad/Source/vector.inc @@ -30,6 +30,8 @@ C INTEGER WARP_SIZE PARAMETER (WARP_SIZE=32) INTEGER NB_WARP - PARAMETER (NB_WARP=512) + PARAMETER (NB_WARP=1) INTEGER VECSIZE_MEMMAX - PARAMETER (VECSIZE_MEMMAX=16384) + PARAMETER (VECSIZE_MEMMAX=32) + + 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..1ac53bb4bd 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.3 \ 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/P1_gg_ttx/CPPProcess.cc b/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/CPPProcess.cc index b32f4b931e..dd47addecb 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -555,7 +555,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- 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..646bf08261 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.3, 2025-06-12 // 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..ce175a75a8 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.3, 2025-06-12 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..bd3d520785 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.3, 2025-06-12 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.3, 2025-06-12 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 @@ -484,6 +488,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C Generate events only if IMODE is 0. IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN C Call UNWGT to unweight and store events + ICONFIG = CHANNELS(IVEC) CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) ENDIF diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/driver.f b/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/driver.f index ec5722702a..c08048ad0e 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/driver.f +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/driver.f @@ -489,7 +489,6 @@ subroutine open_file_local(lun,filename,fopened) fopened=.false. tempname=filename fine=index(tempname,' ') -c fine2=index(path,' ')-1 ! AV remove valgrind "Conditional jump or move depends on uninitialised value(s)" if(fine.eq.0) fine=len(tempname) open(unit=lun,file=tempname,status='old',ERR=20) fopened=.true. 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..97656450ad 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.3, 2025-06-12 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.3, 2025-06-12 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,21 +394,24 @@ 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 C ---------- IF (FIRST) THEN FIRST=.FALSE. - IF(ZERO.NE.0D0) FK_ZERO = SIGN(MAX(ABS(ZERO), ABS(ZERO - $ *SMALL_WIDTH_TREATMENT)), ZERO) - IF(MDL_WT.NE.0D0) FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT - $ *SMALL_WIDTH_TREATMENT)), MDL_WT) + FK_ZERO = 0D0 + IF(MDL_WT.NE.0D0) THEN + FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT + $ *SMALL_WIDTH_TREATMENT)), MDL_WT) + ELSE + FK_MDL_WT = 0D0 + ENDIF + IF(INIT_MODE) THEN ZEROAMP_1(:,:) = .TRUE. @@ -446,10 +450,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 +464,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/addmothers.f b/epochX/cudacpp/gg_tt.mad/SubProcesses/addmothers.f index 9a31ed201d..6f32477b9e 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/addmothers.f +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/addmothers.f @@ -21,7 +21,7 @@ subroutine addmothers(ip,jpart,pb,isym,jsym,rscale,aqcd,aqed,buff, integer icol ! color selected integer isym(nexternal,99), jsym - integer i,j,k,ida(2),ns,nres,ires,icl,ito2,idenpart,nc,ic + integer i,j,k,ida(2),ns,nres,ires,icl,ito2,idenpart,ic integer mo_color,da_color(2),itmp integer ito(-nexternal+3:nexternal),iseed,maxcolor,maxorg integer icolalt(2,-nexternal+2:2*nexternal-3) @@ -113,14 +113,15 @@ subroutine addmothers(ip,jpart,pb,isym,jsym,rscale,aqcd,aqed,buff, endif lconfig = vec_igraph1(ivec) endif - + is_LC=.true. + maxcolor=0 c c Choose a color flow which is certain to work with the propagator c structure of the chosen diagram and use that as an alternative c if (icol.eq.0) then do i=1,nexternal - icolalt(1,i)=0 + icolalt(1,i)=0 icolalt(2,i)=0 enddo else diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/cluster.f b/epochX/cudacpp/gg_tt.mad/SubProcesses/cluster.f index b8995283ed..907894ea89 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/cluster.f +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/cluster.f @@ -556,6 +556,8 @@ logical function cluster(p, ivec) jwin = 0 cluster=.false. clustered=.false. + iwin =0 + jwin =0 do i=0,3 pcmsp(i)=0 enddo @@ -665,8 +667,11 @@ logical function cluster(p, ivec) c initialize graph storage igraphs(0)=0 nleft=nexternal -c cluster - if (iwin.eq.0.or.jwin.eq.0) stop 21 + if(iwin.eq.0.or.jwin.eq.0)then + cluster=.false. + return + endif +c cluster do n=1,nexternal-2 c combine winner imocl(n)=imap(iwin,2)+imap(jwin,2) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk index 20d8ded718..20b8e6b858 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk @@ -114,7 +114,7 @@ export CXXFLAGS override CUDA_HOME = $(patsubst %/bin/nvcc,%,$(shell which nvcc 2>/dev/null)) # Set HIP_HOME from the path to hipcc, if it exists -override HIP_HOME = $(patsubst %/bin/hipcc,%,$(shell which hipcc 2>/dev/null)) +override HIP_HOME = $(shell hipconfig --rocmpath) # Configure CUDA_INC (for CURAND and NVTX) and NVTX if a CUDA installation exists (see #965) ifeq ($(CUDA_HOME),) @@ -229,6 +229,8 @@ ifeq ($(BACKEND),cuda) else ifeq ($(BACKEND),hip) + # example architecture values MI200:gfx90a, MI350X:gfx942 + MADGRAPH_HIP_ARCHITECTURE ?= gfx942 # Set GPUCC as $(HIP_HOME)/bin/hipcc (it was already checked above that this exists) GPUCC = $(HIP_HOME)/bin/hipcc XCOMPILERFLAG = @@ -243,7 +245,7 @@ else ifeq ($(BACKEND),hip) ###GPUFLAGS += -ggdb # FOR DEBUGGING ONLY # AMD HIP architecture flags - GPUARCHFLAGS = --offload-arch=gfx90a + GPUARCHFLAGS = --offload-arch=${MADGRAPH_HIP_ARCHITECTURE} GPUFLAGS += $(GPUARCHFLAGS) # Other AMD-specific flags @@ -878,7 +880,7 @@ endif $(gpu_fcheckmain): LIBFLAGS += $(GPULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH $(gpu_fcheckmain): $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBDIR)/lib$(MG5AMC_GPULIB).so $(gpu_objects_exe) ifneq ($(findstring hipcc,$(GPUCC)),) # link fortran/c++/hip using $FC when hipcc is used #802 - $(FC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) -lstdc++ -L$(shell cd -L $(shell dirname $(shell $(GPUCC) -print-prog-name=clang))/../..; pwd)/lib -lamdhip64 + $(FC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) -lstdc++ -L$(HIP_HOME)/lib -lamdhip64 else $(GPUCC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) endif @@ -979,7 +981,7 @@ else # link only runTest_$(GPUSUFFIX).o (new: in the past, this was linking both $(gpu_testmain): LIBFLAGS += $(GPULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH $(gpu_testmain): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(gpu_objects_lib) $(gpu_objects_exe) $(GTESTLIBS) ifneq ($(findstring hipcc,$(GPUCC)),) # link fortran/c++/hip using $FC when hipcc is used #802 - $(FC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lstdc++ -lpthread -L$(shell cd -L $(shell dirname $(shell $(GPUCC) -print-prog-name=clang))/../..; pwd)/lib -lamdhip64 + $(FC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lstdc++ -lpthread -L$(HIP_HOME)/lib -lamdhip64 else $(GPUCC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lcuda endif @@ -1104,10 +1106,20 @@ else @cat /proc/cpuinfo | grep "physical id" | sort -u endif @echo "" -ifneq ($(shell which nvidia-smi 2>/dev/null),) - nvidia-smi -L + # some systems may have -smi installed, but it fails to execute + # because it cannot communicate with the hardware + @if nvidia-smi &>/dev/null ; then \ + nvidia-smi -L ;\ + else \ + echo "No Nvidia GPU detected" ;\ + fi @echo "" -endif + @if amd-smi &>/dev/null ; then \ + amd-smi static -a ;\ + amd-smi list ;\ + else \ + echo "No AMD GPU detected" ;\ + fi @echo USECCACHE=$(USECCACHE) ifeq ($(USECCACHE),1) ccache --version | head -1 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/SubProcesses/proc_characteristics b/epochX/cudacpp/gg_tt.mad/SubProcesses/proc_characteristics index 525df87b4b..eddda113ea 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/proc_characteristics +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/proc_characteristics @@ -8,7 +8,7 @@ ninitial = 2 grouped_matrix = True has_loops = False - bias_module = dummy + bias_module = None max_n_matched_jets = 0 colored_pdgs = [1, 2, 3, 4, 5, 6, 21] complex_mass_scheme = False diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/reweight.f b/epochX/cudacpp/gg_tt.mad/SubProcesses/reweight.f index 0a0bafa7c1..189ba41449 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/reweight.f +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/reweight.f @@ -1186,7 +1186,7 @@ logical function setclscales(p, keepq2bck, ivec) if(nexternal.gt.3) pt2ijcl(nexternal-3)=q2fact(2) else if(.not.fixed_fac_scale1) q2fact(1)=scalefact**2*pt2ijcl(nexternal-2) - if(.not.fixed_fac_scale2) q2fact(2)=scalefact**2*q2fact(1) + if(.not.fixed_fac_scale2) q2fact(2)=scalefact**2*pt2ijcl(nexternal-2) endif elseif(jcentral(1).eq.0)then if(.not.fixed_fac_scale1) q2fact(1) = scalefact**2*pt2ijcl(jfirst(1)) diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/symmetry.f b/epochX/cudacpp/gg_tt.mad/SubProcesses/symmetry.f index 309540a0a2..2afd9e9f75 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/symmetry.f +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/symmetry.f @@ -232,7 +232,7 @@ subroutine write_bash(mapconfig,use_config, prwidth, jcomp,iforest, c write(*,*) 'mapping',ic,mapconfig(i),icode if (icode .eq. 0) then c Create format string based on number of digits - write(formstr,'(a,i1,a)') '(I',nconf,'$)' + write(formstr,'(a,i1,a)') '(I',nconf,',$)' write(*,formstr) mapconfig(i) c Write symmetry factors write(formstr2,'(a,i2,a)') '(2i',nsym,')' @@ -242,10 +242,10 @@ subroutine write_bash(mapconfig,use_config, prwidth, jcomp,iforest, dconfig=mapconfig(i)+icode*1d0/10**ncode if(nconf+ncode+1.lt.10) then write(formstr,'(a,i1,a,i1,a)') '(F',nconf+ncode+1, - $ '.',ncode,'$)' + $ '.',ncode,',$)' else write(formstr,'(a,i2,a,i1,a)') '(F',nconf+ncode+1, - $ '.',ncode,'$)' + $ '.',ncode,',$)' endif write(*,formstr) dconfig c Write symmetry factors @@ -260,7 +260,7 @@ subroutine write_bash(mapconfig,use_config, prwidth, jcomp,iforest, dconfig=mapconfig(i)+icode*1d0/10**ncode write(27,formstr2) dconfig,use_config(i) endif - write(*,'(a$)') ' ' + write(*,'(a,$)') ' ' 100 call bw_increment_array(iarray,imax,ibase,done) enddo else diff --git a/epochX/cudacpp/gg_tt.mad/SubProcesses/unwgt.f b/epochX/cudacpp/gg_tt.mad/SubProcesses/unwgt.f index f602511c94..d1247f1849 100644 --- a/epochX/cudacpp/gg_tt.mad/SubProcesses/unwgt.f +++ b/epochX/cudacpp/gg_tt.mad/SubProcesses/unwgt.f @@ -497,6 +497,7 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) integer ip, np, ic, nc integer ida(2),ito(-nexternal+3:nexternal),ns,nres,ires,icloop integer iseed + double precision beam_mass double precision pboost(0:3) double precision beta, get_betaz double precision ebi(0:3), ebo(0:3) @@ -506,7 +507,7 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) integer idup(nexternal,maxproc,maxsproc) integer mothup(2,nexternal) integer icolup(2,nexternal,maxflow,maxsproc) - + double precision eta integer nsym integer ievent @@ -638,21 +639,20 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) if (nincoming.eq.2) then if (xbk(1) .gt. 0d0 .and. xbk(1) .le. 1d0 .and. $ xbk(2) .gt. 0d0 .and. xbk(2) .le. 1d0) then - if(lpp(2).ne.0.and.(xbk(1).eq.1d0.or.pmass(1).eq.0d0).and.xbk(2).ne.1d0) then - ! construct the beam momenta in each frame and compute the related (z)boost - if (pmass(1).eq.0d0.and.(abs(lpp(1)).eq.3.or.abs(lpp(1)).eq.4).and.ebeam(1).gt.10d0*m1)then - local_mass = 0d0 - else - local_mass = m1 - endif + if(lpp(2).ne.0.and.(xbk(1).eq.1d0.or.pmass(1).eq.0d0)) then + if((abs(lpp(1)).gt.2.and.abs(lpp(1)).ne.9).or.xbk(1).eq.1d0)then + beam_mass = pmass(1) + else + beam_mass = m1 + endif ebi(0) = p(0,1)/xbk(1) ! this assumes that particle 1 is massless or mass equal to beam ebi(1) = 0 ebi(2) = 0 - ebi(3) = DSQRT(ebi(0)**2-local_mass**2) + ebi(3) = DSQRT(ebi(0)**2-beam_mass**2) ebo(0) = ebeam(1) ebo(1) = 0 ebo(2) = 0 - ebo(3) = DSQRT(ebo(0)**2-local_mass**2) + ebo(3) = DSQRT(ebo(0)**2-beam_mass**2) beta = get_betaz(ebi, ebo) if (xbk(1).eq.1d0) then pb(0,isym(1,jsym)) = ebo(0) @@ -668,20 +668,19 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) enddo else - if (pmass(1).eq.0d0.and.(abs(lpp(1)).eq.3.or.abs(lpp(1)).eq.4.and.ebeam(2).gt.10d0*m2))then - local_mass = 0d0 - else - local_mass = m2 - endif - ebi(0) = p(0,1)/xbk(1) ! this assumes that particle 1 is massless or mass equal to beam + if((abs(lpp(2)).gt.2.and.abs(lpp(2)).ne.9).or.xbk(2).eq.1d0)then + beam_mass = pmass(2) + else + beam_mass = m2 + endif ebi(0) = p(0,2)/xbk(2) ! this assumes that particle 2 is massless or mass equal to beam ebi(1) = 0 ebi(2) = 0 - ebi(3) = -1d0*DSQRT(ebi(0)**2-local_mass**2) + ebi(3) = -1d0*DSQRT(ebi(0)**2-beam_mass**2) ebo(0) = ebeam(2) ebo(1) = 0 ebo(2) = 0 - ebo(3) = -1d0*DSQRT(ebo(0)**2-local_mass**2) + ebo(3) = -1d0*DSQRT(ebo(0)**2-beam_mass**2) beta = get_betaz(ebi, ebo) if (xbk(2).eq.1d0) then pb(0,isym(2,jsym)) = ebo(0) @@ -701,6 +700,21 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) write(*,*) 'Warning bad x1 or x2 in write_leshouche', $ xbk(1),xbk(2) endif + do j=1,nexternal + call zboost_with_beta(p(0,j),beta,pb(0,isym(j,jsym))) + pb(4,isym(j,jsym))=pmass(j) + enddo + + ! check for numerical_accuracy + if (pb(0,1).gt.ebeam(1).or.pb(0,2).gt.ebeam(2))then + ! go back to old method --more accurate when boosting with xbk close to one-- + eta = sqrt(xbk(1)*ebeam(1)/(xbk(2)*ebeam(2))) + pboost(0)=p(0,1)*(eta + 1d0/eta) + pboost(3)=p(0,1)*(eta - 1d0/eta) + do j=1,nexternal + call boostx(p(0,j),pboost,pb(0,isym(j,jsym))) + enddo + endif else do j=1,nexternal call boostx(p(0,j),pboost,pb(0,isym(j,jsym))) @@ -709,6 +723,8 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) enddo endif + + if (IMIRROR.eq.2.and.pmass(1).ne.pmass(2)) then c Note that in this context isym(1,jsym) should never be "2" since the mass differ pb(4,isym(1,jsym))=pmass(2) 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..2efb5954a6 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] @@ -1991,6 +1991,11 @@ def default_setup(self): self.add_param("PartonLevel:FSRinResonances", True, hidden=True, always_write_to_card=False, comment="Do not allow shower to run from decay product of unstable particle") self.add_param("ProcessLevel:resonanceDecays", True, hidden=True, always_write_to_card=False, comment="Do not allow unstable particle to decay.") + # Parameters only needed for main164 type of run (not pythia8/MG5 interface) + self.add_param("Main:HepMC", True, hidden=True, always_write_to_card=False, + comment="""Specify the type of output to be used by the main164 run. """) + self.add_param("HepMC:output", 'hepmc.gz', hidden=True, always_write_to_card=False, + comment="Specify the HepMC output file to be used by the main164 run.") # Add parameters controlling the subruns execution flow. # These parameters should not be part of PY8SubRun daughter. self.add_default_subruns('parameters') @@ -2087,8 +2092,10 @@ def MadGraphSet(self, name, value, **opts): force = False if name.lower() not in self or (force or name.lower() not in self.user_set): self.__setitem__(name, value, change_userdefine=False, **opts) - self.system_set.add(name.lower()) - + self.system_set.add(name.lower()) + else: + raise Exception("The parameter %s is already set to %s. You can not change it." % (name, self[name])) + def defaultSet(self, name, value, **opts): self.__setitem__(name, value, change_userdefine=False, **opts) @@ -2144,9 +2151,19 @@ def pythia8_formatting(value, formatv=None): else: return ','.join([PY8Card.pythia8_formatting(arg) for arg in value]) + #change of name convention between MG5 old interface and main164 from Pythia8 + interface_to_164 = {'HEPMCoutput:file': 'HepMC:output', + 'SysCalc:fullCutVariation': '!SysCalc:fullCutVariation (not supported with 164)', + 'SysCalc:qCutList': '!SysCalc:qCutList (not supported with 164)', + 'SysCalc:qWeed': '!SysCalc:qWeed (not supported with 164)', + 'SysCalc:tmsList': '!SysCalc:tmsList (not supported with 164)', + 'HEPMCoutput:scaling' : '!HEPMCoutput :scaling (not supported with 164)', + 'LHEFInputs:nSubruns' : 'Main:numberOfSubruns'} + def write(self, output_file, template, read_subrun=False, - print_only_visible=False, direct_pythia_input=False, add_missing=True): + print_only_visible=False, direct_pythia_input=False, add_missing=True, + use_mg5amc_py8_interface=False): """ Write the card to output_file using a specific template. > 'print_only_visible' specifies whether or not the hidden parameters should be written out if they are in the hidden_params_to_always_write @@ -2155,7 +2172,12 @@ def write(self, output_file, template, read_subrun=False, in the self.visible_params_to_always_write list and are not user_set or system_set are commented. > If 'add_missing' is False then parameters that should be written_out but are absent - from the template will not be written out.""" + from the template will not be written out. + > use_mg5amc_py8_interface is a flag to indicate that the MG5aMC-PY8 interface is used or not + if not used some parameters need to be translated from the old convention to the new one + """ + + self.use_mg5amc_py8_interface = use_mg5amc_py8_interface # First list the visible parameters visible_param = [p for p in self if p.lower() not in self.hidden_param @@ -2297,7 +2319,16 @@ def group_params(params): else: # Just copy parameters which don't need to be specified if param.lower() not in self.params_to_never_write: - output.write(line) + + if not use_mg5amc_py8_interface and direct_pythia_input and \ + param in self.interface_to_164: + param_entry = self.interface_to_164[param.strip()] + # special case for HepMC needs two flags + if 'HepMC:output' == param_entry: + output.write(' %s=%s\n'%('Main:HepMC', 'on')) + output.write('%s=%s\n'%(param_entry,new_value)) + else: + output.write(line) else: output.write('! The following parameter was forced to be commented out by MG5aMC.\n') output.write('! %s'%line) @@ -2313,6 +2344,7 @@ def group_params(params): if ((not direct_pythia_input) or (param.lower() in self.visible_params_to_always_write) or (param.lower() in self.user_set) or + (param.lower() in self.hidden_params_to_always_write) or (param.lower() in self.system_set)): template = '%s=%s' else: @@ -2321,6 +2353,19 @@ def group_params(params): # then they shouldn't be passed to Pythia template = '!%s=%s' + if not use_mg5amc_py8_interface and direct_pythia_input and \ + param in self.interface_to_164: + param_entry = self.interface_to_164[param] + # special case for HepMC needs two flags + if 'HepMC:output' == param_entry: + output.write(' %s=%s\n'%('Main:HepMC', 'on')) + if 'Main:InternalAnalysis'.lower() in self.user_set and \ + self['Main:InternalAnalysis'].lower() == 'on': + output.write('InternalAnalysis:output = ./djrs.dat\n') + + #elif param in self.interface_to_164.values() and not direct_pythia_input: + # misc.sprint(use_mg5amc_py8_interface, direct_pythia_input,param) + # raise Exception('The parameter %s is not supported in the MG5aMC-PY8 interface. Please use the new interface.'%param_entry output.write(template%(param_entry, value_entry.replace(value,new_value))) @@ -2365,6 +2410,8 @@ def group_params(params): comment = '\n'.join('! %s'%c for c in self.comments[param.lower()].split('\n')) output.write(comment+'\n') + if not use_mg5amc_py8_interface and param in self.interface_to_164: + continue output.write('%s=%s\n'%(param,PY8Card.pythia8_formatting(self[param]))) # Don't close the file if we were reading a subrun, but simply write @@ -3318,7 +3365,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 +3372,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 @@ -4050,8 +4095,8 @@ def post_set_fixed_fac_scale(card, value, change_userdefine, raiseerror, **opt): if 'fixed_fac_scale2' in card.user_set: card.user_set.remove('fixed_fac_scale2') - # #card['pdlabel1'] = value - # #card['pdlabel2'] = value + dict.__setitem__(card, 'fixed_fac_scale1', card['fixed_fac_scale']) + dict.__setitem__(card, 'fixed_fac_scale2', card['fixed_fac_scale']) @staticmethod def post_set(card, value, change_userdefine, raiseerror, name='unknown', **opt): @@ -4201,6 +4246,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 @@ -4451,11 +4497,11 @@ def check_validity(self): time.sleep(5) if self['drjj'] != 0: if 'drjj' in self.user_set: - logger.warning('Since icckw>0, changing the value of \'drjj\' to 0') + logger.warning('Since ickkw>0, changing the value of \'drjj\' to 0') self['drjj'] = 0 if self['drjl'] != 0: if 'drjl' in self.user_set: - logger.warning('Since icckw>0, changing the value of \'drjl\' to 0') + logger.warning('Since ickkw>0, changing the value of \'drjl\' to 0') self['drjl'] = 0 if not self['auto_ptj_mjj']: if self['mmjj'] > self['xqcut']: @@ -4753,7 +4799,6 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): self['fixed_fac_scale1'] = True self['nhel'] = 1 for i in beam_id_split[1]: - exit if abs(i) == 11: self['lpp1'] = -math.copysign(3,i) self['lpp2'] = math.copysign(3,i) @@ -5577,6 +5622,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 +5838,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/cluster.py b/epochX/cudacpp/gg_tt.mad/bin/internal/cluster.py index 95ef45b5f3..66069293d2 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/cluster.py +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/cluster.py @@ -602,6 +602,7 @@ def __init__(self, *args, **opt): self.submitted = six.moves.queue.Queue() # one entry by job submitted self.stoprequest = threading.Event() #flag to ensure everything to close self.demons = [] + self.gpus_list = [] self.nb_done =0 if 'nb_core' in opt: self.nb_core = opt['nb_core'] @@ -623,23 +624,46 @@ def __init__(self, *args, **opt): self.done_pid_queue = six.moves.queue.Queue() self.fail_msg = None + mg5_gpu_env_str = 'MG5_GPU_VISIBLE_DEVICES' + gpu_variables = [['NVIDIA_VISIBLE_DEVICES', 'CUDA_VISIBLE_DEVICES'], + ['ROCR_VISIBLE_DEVICES', 'HIP_VISIBLE_DEVICES'],] + if mg5_gpu_env_str in os.environ: + new_var = os.environ[mg5_gpu_env_str].split(',') + if len(new_var) == 2: + gpu_variables.insert(0, new_var) + else: + logger.error('Invalid format for %s=%s, it should be a comma-separated list of two elements' % (mg5_gpu_env_str, os.environ[mg5_gpu_env_str])) + for get_var,set_var in gpu_variables: + if get_var in os.environ: + self.gpus_list = os.environ.get(get_var).split(',') + self.gpu_set_var = set_var + self.gpus_count = len(self.gpus_list) + logger.info('Found %s GPUs: %s' % (self.gpus_count, self.gpus_list)) def start_demon(self): import threading - t = threading.Thread(target=self.worker) + env2 = None + if len(self.gpus_list): + env2 = os.environ.copy() + this_gpu_idx = len(self.demons) % self.gpus_count + env2[self.gpu_set_var] = self.gpus_list[this_gpu_idx] + t = threading.Thread(target=self.worker, kwargs={'env2': env2}) + else: + t = threading.Thread(target=self.worker) t.daemon = True t.start() self.demons.append(t) - def worker(self): + def worker(self, env2=None): import six.moves.queue import six.moves._thread while not self.stoprequest.isSet(): try: args = self.queue.get(timeout=10) tag, exe, arg, opt = args + opt['env'] = env2 try: # check for executable case if isinstance(exe,str): 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..69291df0d4 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): @@ -1463,11 +1463,15 @@ def create_plot(self, mode='parton', event_path=None, output=None, tag=None): self.run_name, '%s_pts.dat' % tag) for observable_name, data_path in [('djr',djr_path), ('pt',pt_path)]: - if not self.generate_Pythia8_HwU_plots( + try: + if not self.generate_Pythia8_HwU_plots( PY8_plots_root_path, merging_scale_name, observable_name,data_path): - return False - + return False + except Exception as error: + if os.path.exists(data_path): + logger.info('plot information present in %s' % data_path) + return True if mode == 'Pythia8': plot_files = glob.glob(pjoin(PY8_plots_root_path,'*.gnuplot')) if not misc.which('gnuplot'): @@ -1964,12 +1968,16 @@ def do_systematics(self, line): self.cluster.wait(os.path.dirname(output), update_status, update_first=update_status) except Exception: self.cluster.remove() + for i in range(nb_submit): + os.remove('%s/tmp_%s_%s' %(os.path.dirname(output),i,os.path.basename(output))) old_run_mode = self.options['run_mode'] self.options['run_mode'] =0 + out =False try: out = self.do_systematics(line) finally: self.options['run_mode'] = old_run_mode + return out #collect the data all_cross = [] for i in range(nb_submit): @@ -1995,18 +2003,21 @@ def do_systematics(self, line): self.run_card['event_norm'] in ['unity']: all_cross= [cross/nb_event for cross in all_cross] - sys_obj = systematics.call_systematics([input, None] + opts, - log=lambda x: logger.info(str(x)), - result=result_file, - running=False - ) + + sys_obj = systematics.call_systematics([input, None] + opts, + log=lambda x: logger.info(str(x)), + result=result_file, + running=False + ) + sys_obj.print_cross_sections(all_cross, nb_event, result_file) - + #concatenate the output file subprocess.call(['cat']+\ ['./tmp_%s_%s' % (i, os.path.basename(output)) for i in range(nb_submit)], stdout=open(output,'w'), cwd=os.path.dirname(output)) + for i in range(nb_submit): os.remove('%s/tmp_%s_%s' %(os.path.dirname(output),i,os.path.basename(output))) # os.remove('%s/log_sys_%s.txt' % (os.path.dirname(output),i)) @@ -3831,7 +3842,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 +5146,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 +6751,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 +6775,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 +6826,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..6fbdd98100 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': @@ -1858,6 +1855,8 @@ def parse_histos_from_PY8_XML_stream(self, stream, run_id=None, # If merging cut is negative, then pick only the one of the central scale # If not specified, then take them all but use the PDF and scale weight # of the central merging_scale for the variation. + if not all_weights: + raise MadGraph5Error('No weights were found in the HwU XML source.') if merging_scale is None or merging_scale < 0.0: merging_scale_chosen = all_weights[2]['MERGING'] else: @@ -2480,14 +2479,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 +2738,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 +2877,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 +2889,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 +2898,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 +2907,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 +2916,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..b1739da73d 100644 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/launch_plugin.py +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/launch_plugin.py @@ -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: O. Mattelaer (Aug 2023) for the MG5aMC CUDACPP plugin. -# Further modified by: O. Mattelaer, A. Valassi (2024) for the MG5aMC CUDACPP plugin. +# Further modified by: O. Mattelaer, A. Valassi, Z. Wettersten (2024-2025) for the MG5aMC CUDACPP plugin. import logging import os @@ -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') @@ -133,7 +133,8 @@ def default_setup(self): super().default_setup() # change default value: self['cudacpp_backend'] = 'cuda' - self['vector_size'] = 16384 # already setup in default class (just change value) + self['vector_size'] = 32 # ZW: default to 32, might want to change to 64 to utilise AMD GPUs better as well # 16384 # already setup in default class (just change value) + self['nb_warp'] = 512 # number of warps per kernel call, for now setting to 16 384 / vector_size MEINTERFACE = CPPMEInterface RunCard = CPPRunCard 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..81d17f7cb1 100755 --- a/epochX/cudacpp/gg_tt.mad/bin/internal/lhe_parser.py +++ b/epochX/cudacpp/gg_tt.mad/bin/internal/lhe_parser.py @@ -1035,12 +1035,12 @@ def define_init_banner(self, wgt, lha_strategy, proc_charac=None): from_init = True if not from_init: - if group in grouped_cross: - grouped_cross[group] += self.allcross[i] - grouped_error[group] += self.error[i]**2 + if int(group) in grouped_cross: + grouped_cross[int(group)] += self.allcross[i] + grouped_error[int(group)] += self.error[i]**2 else: - grouped_cross[group] = self.allcross[i] - grouped_error[group] = self.error[i]**2 + grouped_cross[int(group)] = self.allcross[i] + grouped_error[int(group)] = self.error[i]**2 else: ban = banner_mod.Banner(ff.banner) for line in ban['init'].split('\n'): @@ -1048,11 +1048,11 @@ def define_init_banner(self, wgt, lha_strategy, proc_charac=None): if len(splitline)==4: cross, error, _, group = splitline if int(group) in grouped_cross: - grouped_cross[group] += float(cross) - grouped_error[group] += float(error)**2 + grouped_cross[int(group)] += float(cross) + grouped_error[int(group)] += float(error)**2 else: - grouped_cross[group] = float(cross) - grouped_error[group] = float(error)**2 + grouped_cross[int(group)] = float(cross) + grouped_error[int(group)] = float(error)**2 nb_group = len(grouped_cross) # compute the information for the first line @@ -1086,6 +1086,8 @@ def define_init_banner(self, wgt, lha_strategy, proc_charac=None): self.seek(0) if init_information["idbmup2"] in [0,9]: event = next(self) + if len(event) == 0: + event = Event(str(event)) init_information["idbmup2"] = event[1].pdg self.seek(0) @@ -2166,10 +2168,13 @@ def check(self): abspz += abs(particle.pz) # check mass fourmass = FourMomentum(particle).mass - - if particle.mass and (abs(particle.mass) - fourmass)/ abs(particle.mass) > threshold: - raise Exception( "Do not have correct mass lhe: %s momentum: %s (error at %s" % (particle.mass, fourmass, (abs(particle.mass) - fourmass)/ abs(particle.mass))) - + if particle.mass: + expected = (particle.E - math.sqrt(particle.E**2 -particle.mass**2))/particle.E + if expected > 1e-8: + mass_threshold = particle.E**2 - (particle.E-threshold)**2 + if (abs(particle.mass) - fourmass)/ mass_threshold > 5: + raise Exception( "Do not have correct mass lhe: %s momentum: %s (error at %s" % (particle.mass, fourmass, (abs(particle.mass) - fourmass)/ abs(particle.mass))) + if E/absE > threshold: logger.critical(self) @@ -2953,8 +2958,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..4d5597c722 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) @@ -2827,10 +2827,10 @@ def print_results_in_shell(self, data): logger.info(" Nb of events after matching/merging : %d" % int(data['nb_event_pythia'])) if self.run_card['use_syst'] in self.true and \ (int(self.run_card['ickkw'])==1 or self.run_card['ktdurham']>0.0 - or self.run_card['ptlund']>0.0): + or self.run_card['ptlund']>0.0) and data['cross_pythia'] == -1: logger.info(" Notice that because Systematics computation is turned on, the merging did not veto events but modified their weights instead.\n"+\ " The resulting hepmc/stdhep file should therefore be use with those weights.") - else: + elif data['cross_pythia'] == -1: logger.info(" Nb of events after merging : %s" % data['nb_event_pythia']) logger.info(" " ) @@ -3055,6 +3055,7 @@ def do_multi_run(self, line): crossoversig = 0 inv_sq_err = 0 nb_event = 0 + madspin = False for i in range(nb_run): self.nb_refine = 0 self.exec_cmd('generate_events %s_%s -f' % (main_name, i), postcmd=False) @@ -3067,6 +3068,8 @@ def do_multi_run(self, line): inv_sq_err+=1.0/error**2 self.results[main_name][-1]['cross'] = crossoversig/inv_sq_err self.results[main_name][-1]['error'] = math.sqrt(1.0/inv_sq_err) + if 'decayed' in self.run_name: + madspin = True self.results.def_current(main_name) self.run_name = main_name self.update_status("Merging LHE files", level='parton') @@ -3074,9 +3077,12 @@ def do_multi_run(self, line): os.mkdir(pjoin(self.me_dir,'Events', self.run_name)) except Exception: pass - os.system('%(bin)s/merge.pl %(event)s/%(name)s_*/unweighted_events.lhe.gz %(event)s/%(name)s/unweighted_events.lhe.gz %(event)s/%(name)s_banner.txt' + + os.system('%(bin)s/merge.pl %(event)s/%(name)s_*%(madspin)s/unweighted_events.lhe.gz %(event)s/%(name)s/unweighted_events.lhe.gz %(event)s/%(name)s_banner.txt' % {'bin': self.dirbin, 'event': pjoin(self.me_dir,'Events'), - 'name': self.run_name}) + 'name': self.run_name, + 'madspin': '_decayed_*' if madspin else '' + }) eradir = self.options['exrootanalysis_path'] if eradir and misc.is_executable(pjoin(eradir,'ExRootLHEFConverter')): @@ -3656,9 +3662,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'))) @@ -3757,6 +3765,8 @@ def split(a, n): k, m = divmod(len(a), n) return (a[i*k+min(i, m):(i+1)*k+min(i+1, m)] for i in range(n)) + Gdirs = self.remove_empty_events(Gdirs) + partials_info = [] if len(Gdirs) >= max_G: start_unweight= time.perf_counter() @@ -3786,7 +3796,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, @@ -4223,7 +4233,7 @@ def mg5amc_py8_interface_consistency_warning(options): return None - def setup_Pythia8RunAndCard(self, PY8_Card, run_type): + def setup_Pythia8RunAndCard(self, PY8_Card, run_type, use_mg5amc_py8_interface): """ Setup the Pythia8 Run environment and card. In particular all the process and run specific parameters of the card are automatically set here. This function returns the path where HEPMC events will be output, if any.""" @@ -4338,10 +4348,10 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): PY8_Card.systemSet('Beams:setProductionScalesFromLHEF',True) # Automatically set qWeed to xqcut if not defined by the user. - if PY8_Card['SysCalc:qWeed']==-1.0: + if use_mg5amc_py8_interface and PY8_Card['SysCalc:qWeed']==-1.0: PY8_Card.MadGraphSet('SysCalc:qWeed',self.run_card['xqcut'], force=True) - if PY8_Card['SysCalc:qCutList']=='auto': + if use_mg5amc_py8_interface and PY8_Card['SysCalc:qCutList']=='auto': if self.run_card['use_syst']: if self.run_card['sys_matchscale']=='auto': qcut = PY8_Card['JetMatching:qCut'] @@ -4368,7 +4378,7 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): # Specific MLM settings # PY8 should not implement the MLM veto since the driver should do it # if merging scale variation is turned on - if self.run_card['use_syst']: + if use_mg5amc_py8_interface and self.run_card['use_syst']: # We do no force it here, but it is clear that the user should know what # he's doing if he were to force it to True. PY8_Card.MadGraphSet('JetMatching:doVeto',False) @@ -4444,7 +4454,7 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): PY8_Card.MadGraphSet('SpaceShower:pTmaxMatch',1) PY8_Card.MadGraphSet('SpaceShower:rapidityOrder',False) # PY8 should not implement the CKKW veto since the driver should do it. - if self.run_card['use_syst']: + if use_mg5amc_py8_interface and self.run_card['use_syst']: # We do no force it here, but it is clear that the user should know what # he's doing if he were to force it to True. PY8_Card.MadGraphSet('Merging:applyVeto',False) @@ -4516,6 +4526,12 @@ def do_pythia8(self, line): else: no_default = False + if '--old_interface' in args: + use_mg5amc_py8_interface = True + args.remove('--old_interface') + else: + use_mg5amc_py8_interface = False + if not self.run_name: self.check_pythia8(args) self.configure_directory(html_opening =False) @@ -4545,20 +4561,27 @@ def do_pythia8(self, line): #"Please use 'event_norm = average' in the run_card to avoid this problem.") - - if not self.options['mg5amc_py8_interface_path'] or not \ - os.path.exists(pjoin(self.options['mg5amc_py8_interface_path'], - 'MG5aMC_PY8_interface')): - raise self.InvalidCmd( -"""The MG5aMC_PY8_interface tool cannot be found, so that MadEvent cannot steer Pythia8 shower. -Please install this tool with the following MG5_aMC command: - MG5_aMC> install mg5amc_py8_interface_path""") + if use_mg5amc_py8_interface: + if not self.options['mg5amc_py8_interface_path'] or not \ + os.path.exists(pjoin(self.options['mg5amc_py8_interface_path'], + 'MG5aMC_PY8_interface')): + raise self.InvalidCmd( + """The MG5aMC_PY8_interface tool cannot be found, so that MadEvent cannot steer Pythia8 shower. + Please install this tool with the following MG5_aMC command: + MG5_aMC> install mg5amc_py8_interface_path""") + else: + pythia_main = pjoin(self.options['mg5amc_py8_interface_path'], + 'MG5aMC_PY8_interface') + warnings = MadEventCmd.mg5amc_py8_interface_consistency_warning(self.options) + if warnings: + logger.warning(warnings) else: - pythia_main = pjoin(self.options['mg5amc_py8_interface_path'], - 'MG5aMC_PY8_interface') - warnings = MadEventCmd.mg5amc_py8_interface_consistency_warning(self.options) - if warnings: - logger.warning(warnings) + pythia_main = pjoin(self.options['pythia8_path'], 'share', 'Pythia8', 'examples', 'main164') + if not os.path.exists(pythia_main): + pythia_main = pjoin(self.options['pythia8_path'], 'examples', 'main164') + if not os.path.exists(pythia_main): + logger.warning('main164 not found (or not compiled). Will try the old interface instead.') + return self.do_pythia8(line + ' --old_interface') self.results.add_detail('run_mode', 'madevent') @@ -4583,14 +4606,19 @@ def do_pythia8(self, line): run_type = 'CKKW' # Edit the card and run environment according to the run specification - HepMC_event_output = self.setup_Pythia8RunAndCard(PY8_Card, run_type) + HepMC_event_output = self.setup_Pythia8RunAndCard(PY8_Card, run_type, use_mg5amc_py8_interface=use_mg5amc_py8_interface) + + if not use_mg5amc_py8_interface and self.options['run_mode']==0 or (self.options['run_mode']==2 and self.options['nb_core']==1): + PY8_Card['Main:numberOfEvents']= self.run_card['nevents'] + # Now write the card. pythia_cmd_card = pjoin(self.me_dir, 'Events', self.run_name , '%s_pythia8.cmd' % tag) cmd_card = StringIO.StringIO() PY8_Card.write(cmd_card,pjoin(self.me_dir,'Cards','pythia8_card_default.dat'), - direct_pythia_input=True) + direct_pythia_input=True, + use_mg5amc_py8_interface=use_mg5amc_py8_interface) # Now setup the preamble to make sure that everything will use the locally # installed tools (if present) even if the user did not add it to its @@ -4632,7 +4660,7 @@ def do_pythia8(self, line): " command '/usr/bin/env %s' exists and returns a valid path."%shell) exe_cmd = "#!%s\n%s"%(shell_exe,' '.join( - [preamble+pythia_main, + [preamble+pythia_main, '' if use_mg5amc_py8_interface else '-c', os.path.basename(pythia_cmd_card)])) wrapper.write(exe_cmd) @@ -4699,6 +4727,7 @@ def do_pythia8(self, line): n_cores = max(min(min_n_core,n_cores),1) if self.options['run_mode']==0 or (self.options['run_mode']==2 and self.options['nb_core']==1): + # No need for parallelization anymore self.cluster = None logger.info('Follow Pythia8 shower by running the '+ @@ -4744,20 +4773,22 @@ def do_pythia8(self, line): ParallelPY8Card.subruns[0].systemSet('Beams:LHEF','events.lhe.gz') ParallelPY8Card.write(pjoin(parallelization_dir,'PY8Card.dat'), pjoin(self.me_dir,'Cards','pythia8_card_default.dat'), - direct_pythia_input=True) + direct_pythia_input=True, + use_mg5amc_py8_interface=use_mg5amc_py8_interface) # Write the wrapper wrapper_path = pjoin(parallelization_dir,'run_PY8.sh') wrapper = open(wrapper_path,'w') if self.options['cluster_temp_path'] is None: exe_cmd = \ -"""#!%s -./%s PY8Card.dat >& PY8_log.txt -""" +"""#!%%s +./%%s %s PY8Card.dat >& PY8_log.txt +""" % ('' if use_mg5amc_py8_interface else '-c') + else: exe_cmd = \ -"""#!%s +"""#!%%s ln -s ./events_$1.lhe.gz ./events.lhe.gz -./%s PY8Card_$1.dat >& PY8_log.txt +./%%s %s PY8Card_$1.dat >& PY8_log.txt mkdir split_$1 if [ -f ./events.hepmc ]; then @@ -4776,7 +4807,7 @@ def do_pythia8(self, line): mv ./PY8_log.txt ./split_$1/ fi tar -czf split_$1.tar.gz split_$1 -""" +""" % ('' if use_mg5amc_py8_interface else '-c') exe_cmd = exe_cmd%(shell_exe,os.path.basename(pythia_main)) wrapper.write(exe_cmd) wrapper.close() @@ -4812,19 +4843,27 @@ def do_pythia8(self, line): pjoin(parallelization_dir,split_files[-1])) logger.info('Submitting Pythia8 jobs...') + for i, split_file in enumerate(split_files): # We must write a PY8Card tailored for each split so as to correct the normalization # HEPMCoutput:scaling of each weight since the lhe showered will not longer contain the # same original number of events - split_PY8_Card = banner_mod.PY8Card(pjoin(parallelization_dir,'PY8Card.dat')) + split_PY8_Card = banner_mod.PY8Card(pjoin(parallelization_dir,'PY8Card.dat'), setter='user') + assert split_PY8_Card['JetMatching:nJetMax'] == PY8_Card['JetMatching:nJetMax'] + + + # Make sure to sure the number of split_events determined during the splitting. - split_PY8_Card.systemSet('Main:numberOfEvents',partition_for_PY8[i]) + split_PY8_Card.systemSet('Main:numberOfEvents',partition_for_PY8[i], force=True) + assert split_PY8_Card['Main:numberOfEvents'] == partition_for_PY8[i] split_PY8_Card.systemSet('HEPMCoutput:scaling',split_PY8_Card['HEPMCoutput:scaling']* - (float(partition_for_PY8[i]))) + (float(partition_for_PY8[i])), force=True) # Add_missing set to False so as to be sure not to add any additional parameter w.r.t # the ones in the original PY8 param_card copied. split_PY8_Card.write(pjoin(parallelization_dir,'PY8Card_%d.dat'%i), - pjoin(parallelization_dir,'PY8Card.dat'), add_missing=False) + pjoin(parallelization_dir,'PY8Card.dat'), add_missing=False, + direct_pythia_input=True, + use_mg5amc_py8_interface=use_mg5amc_py8_interface) in_files = [pjoin(parallelization_dir,os.path.basename(pythia_main)), pjoin(parallelization_dir,'PY8Card_%d.dat'%i), pjoin(parallelization_dir,split_file)] @@ -5073,7 +5112,7 @@ def wait_monitoring(Idle, Running, Done): # works both for fixed number of generated events and fixed accepted events self.results.add_detail('error_pythia', error_m) - if self.run_card['use_syst']: + if self.run_card['use_syst'] and use_mg5amc_py8_interface: self.results.add_detail('cross_pythia', -1) self.results.add_detail('error_pythia', 0) @@ -6132,7 +6171,102 @@ def get_Gdir(self, Pdir=None, symfact=None): mfactors[pjoin(P, "G%s" % tag)] = mfactor self.Gdirs = (Gdirs, mfactors) return self.get_Gdir(Pdir, symfact=symfact) + + ############################################################################ + def remove_empty_events(self, Gdir): + """return Gdir strip from the one providing empty events.lhe files.""" + + reasons = collections.defaultdict(list) + Gdirs = Gdir[:] + for G in Gdirs[:]: + try: + size = os.path.getsize(pjoin(G, 'events.lhe')) + except Exception as error: + size = 0 + if size <10: + Gdirs.remove(G) + try: + log = misc.BackRead(pjoin(G, 'log.txt')) + except Exception as error: + log = misc.BackRead(pjoin(G, 'run1_app.log')) + found = -1 + for line in log: + if 'Deleting file events.lhe' in line: + found = 0 + elif "Impossible BW configuration" in line: + reasons['bwconfig'].append(G) + break + elif found < -150: + reasons['not found'].append(G) + Gdirs.append(G) + break + elif found < 0: + found -= 1 + elif 'Loosen cuts or increase max_events' in line: + reasons['cuts'].append(G) + break + elif 'all returned zero' in line: + reasons['zero'].append(G) + break + elif found > 5: + reasons['unknown'].append(G) + break + else: + found += 1 + + if len(reasons): + logger.debug('Reasons for empty events.lhe:') + if len(reasons['unknown']): + logger.debug(' - unknown: %s' % len(reasons['unknown'])) + logger.log(10, ' DETAIL:' + ','.join(['/'.join(G.rsplit(os.sep)[-2:]) for G in reasons['unknown'][:10]])) + if len(reasons['not found']): + logger.debug(' - not found in log: %s' % len(reasons['not found'])) + logger.log(10, ' DETAIL:' + ','.join(['/'.join(G.rsplit(os.sep)[-2:]) for G in reasons['not found'][:10]])) + if len(reasons['zero']): + logger.debug(' - zero amplitudes: %s' % len(reasons['zero'])) + logger.log(10, ' DETAIL:' + ','.join(['/'.join(G.rsplit( os.sep)[-2:]) for G in reasons['zero'][:10]])) + if len(reasons['bwconfig']): + critical_bwconfig = set() + for G in reasons['bwconfig']: + base = G.rsplit('.',1)[0] + if any(G2.startswith(base) for G2 in Gdirs): + continue + else: + critical_bwconfig.add(os.sep.join(base.rsplit(os.sep)[-2:])) + for G in critical_bwconfig: + logger.warning('Gdirectory %s has no events.lhe file. (no BW config found %s times)' % G) + + logger.debug(' - impossible BW configuration: %s' % len(reasons['bwconfig'])) + logger.debug(' - channel with no possible BW configuration: %s' % len(critical_bwconfig)) + + if len(reasons['cuts']): + critical_nb_cuts = collections.defaultdict(int) + for G in reasons['cuts']: + if '.' in os.path.basename(G): + base = G.rsplit('.',1)[0] + if any(G2.startswith(base) for G2 in Gdirs): + continue + else: + critical_nb_cuts[os.sep.join(base.rsplit(os.sep)[-2:])] += 1 + else: + critical_nb_cuts[''] += 1 + logger.warning('Gdirectory %s has no events.lhe file. (no points passed cuts found)' % G) + for G, nb in critical_nb_cuts.items(): + if not G: + continue + else: + logger.warning('%s channel %s.XXX has no events.lhe file. (no points passed cuts). No %s with events detected' % (nb, G, G)) + logger.debug(' - no points passed cuts: %s' % len(reasons['cuts'])) + logger.log(10, ' DETAIL:' + ','.join(['/'.join(G.rsplit(os.sep)[-2:]) for G in reasons['cuts'][:10]])) + logger.debug(' - without any BW handling (critical): %s' % critical_nb_cuts['']) + logger.debug(' - with BW but all zero (critical): %s' % sum([nb for v, nb in critical_nb_cuts.items() if v!=''], 0)) + #logger.debug(' - cuts (with BW conflict where other channel contributes): %s' % (len(reasons['cuts'])- critical_nb_cuts)) + + + return Gdirs + + ############################################################################ def set_run_name(self, name, tag=None, level='parton', reload_card=False, allow_new_tag=True): @@ -6749,7 +6883,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 +6893,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 +7010,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 +7038,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 +7053,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 +7065,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 +7190,13 @@ 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) 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 +7210,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..d86bd4985d 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.3, 2025-06-12 // 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..ab2ea8e628 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.3, 2025-06-12 // 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..b43e9fcc81 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_tt.mad/test/cudacpp_test.mk b/epochX/cudacpp/gg_tt.mad/test/cudacpp_test.mk index f703a1ae7c..4934c9a53f 100644 --- a/epochX/cudacpp/gg_tt.mad/test/cudacpp_test.mk +++ b/epochX/cudacpp/gg_tt.mad/test/cudacpp_test.mk @@ -19,7 +19,7 @@ CXXFLAGS += -Igoogletest/googletest/include/ -std=c++11 all: googletest/$(INSTALLDIR)/lib64/libgtest.a googletest/CMakeLists.txt: - git clone https://github.com/google/googletest.git -b release-1.11.0 googletest + git clone https://github.com/google/googletest.git -b v1.17.0 googletest googletest/$(BUILDDIR)/Makefile: googletest/CMakeLists.txt mkdir -p googletest/$(BUILDDIR) 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/P1_Sigma_sm_gg_ttx/CPPProcess.cc b/epochX/cudacpp/gg_tt.sa/SubProcesses/P1_Sigma_sm_gg_ttx/CPPProcess.cc index 5c7a133eed..d2cef41b00 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -552,7 +552,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- 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..646bf08261 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.3, 2025-06-12 // 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/cudacpp.mk b/epochX/cudacpp/gg_tt.sa/SubProcesses/cudacpp.mk index 20d8ded718..20b8e6b858 100644 --- a/epochX/cudacpp/gg_tt.sa/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_tt.sa/SubProcesses/cudacpp.mk @@ -114,7 +114,7 @@ export CXXFLAGS override CUDA_HOME = $(patsubst %/bin/nvcc,%,$(shell which nvcc 2>/dev/null)) # Set HIP_HOME from the path to hipcc, if it exists -override HIP_HOME = $(patsubst %/bin/hipcc,%,$(shell which hipcc 2>/dev/null)) +override HIP_HOME = $(shell hipconfig --rocmpath) # Configure CUDA_INC (for CURAND and NVTX) and NVTX if a CUDA installation exists (see #965) ifeq ($(CUDA_HOME),) @@ -229,6 +229,8 @@ ifeq ($(BACKEND),cuda) else ifeq ($(BACKEND),hip) + # example architecture values MI200:gfx90a, MI350X:gfx942 + MADGRAPH_HIP_ARCHITECTURE ?= gfx942 # Set GPUCC as $(HIP_HOME)/bin/hipcc (it was already checked above that this exists) GPUCC = $(HIP_HOME)/bin/hipcc XCOMPILERFLAG = @@ -243,7 +245,7 @@ else ifeq ($(BACKEND),hip) ###GPUFLAGS += -ggdb # FOR DEBUGGING ONLY # AMD HIP architecture flags - GPUARCHFLAGS = --offload-arch=gfx90a + GPUARCHFLAGS = --offload-arch=${MADGRAPH_HIP_ARCHITECTURE} GPUFLAGS += $(GPUARCHFLAGS) # Other AMD-specific flags @@ -878,7 +880,7 @@ endif $(gpu_fcheckmain): LIBFLAGS += $(GPULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH $(gpu_fcheckmain): $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBDIR)/lib$(MG5AMC_GPULIB).so $(gpu_objects_exe) ifneq ($(findstring hipcc,$(GPUCC)),) # link fortran/c++/hip using $FC when hipcc is used #802 - $(FC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) -lstdc++ -L$(shell cd -L $(shell dirname $(shell $(GPUCC) -print-prog-name=clang))/../..; pwd)/lib -lamdhip64 + $(FC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) -lstdc++ -L$(HIP_HOME)/lib -lamdhip64 else $(GPUCC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) endif @@ -979,7 +981,7 @@ else # link only runTest_$(GPUSUFFIX).o (new: in the past, this was linking both $(gpu_testmain): LIBFLAGS += $(GPULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH $(gpu_testmain): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(gpu_objects_lib) $(gpu_objects_exe) $(GTESTLIBS) ifneq ($(findstring hipcc,$(GPUCC)),) # link fortran/c++/hip using $FC when hipcc is used #802 - $(FC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lstdc++ -lpthread -L$(shell cd -L $(shell dirname $(shell $(GPUCC) -print-prog-name=clang))/../..; pwd)/lib -lamdhip64 + $(FC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lstdc++ -lpthread -L$(HIP_HOME)/lib -lamdhip64 else $(GPUCC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lcuda endif @@ -1104,10 +1106,20 @@ else @cat /proc/cpuinfo | grep "physical id" | sort -u endif @echo "" -ifneq ($(shell which nvidia-smi 2>/dev/null),) - nvidia-smi -L + # some systems may have -smi installed, but it fails to execute + # because it cannot communicate with the hardware + @if nvidia-smi &>/dev/null ; then \ + nvidia-smi -L ;\ + else \ + echo "No Nvidia GPU detected" ;\ + fi @echo "" -endif + @if amd-smi &>/dev/null ; then \ + amd-smi static -a ;\ + amd-smi list ;\ + else \ + echo "No AMD GPU detected" ;\ + fi @echo USECCACHE=$(USECCACHE) ifeq ($(USECCACHE),1) ccache --version | head -1 diff --git a/epochX/cudacpp/gg_tt.sa/src/HelAmps_sm.h b/epochX/cudacpp/gg_tt.sa/src/HelAmps_sm.h index febf1dcf42..d86bd4985d 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.3, 2025-06-12 // 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..ab2ea8e628 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.3, 2025-06-12 // 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..b43e9fcc81 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_tt.sa/test/cudacpp_test.mk b/epochX/cudacpp/gg_tt.sa/test/cudacpp_test.mk index f703a1ae7c..4934c9a53f 100644 --- a/epochX/cudacpp/gg_tt.sa/test/cudacpp_test.mk +++ b/epochX/cudacpp/gg_tt.sa/test/cudacpp_test.mk @@ -19,7 +19,7 @@ CXXFLAGS += -Igoogletest/googletest/include/ -std=c++11 all: googletest/$(INSTALLDIR)/lib64/libgtest.a googletest/CMakeLists.txt: - git clone https://github.com/google/googletest.git -b release-1.11.0 googletest + git clone https://github.com/google/googletest.git -b v1.17.0 googletest googletest/$(BUILDDIR)/Makefile: googletest/CMakeLists.txt mkdir -p googletest/$(BUILDDIR) diff --git a/epochX/cudacpp/gg_tt01g.mad/Cards/ident_card.dat b/epochX/cudacpp/gg_tt01g.mad/Cards/ident_card.dat index 0ba87b008f..b37758a42a 100644 --- a/epochX/cudacpp/gg_tt01g.mad/Cards/ident_card.dat +++ b/epochX/cudacpp/gg_tt01g.mad/Cards/ident_card.dat @@ -2,32 +2,32 @@ ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c written by the UFO converter ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc +mass 5 mdl_MB +mass 6 mdl_MT +mass 15 mdl_MTA +mass 23 mdl_MZ +mass 25 mdl_MH +sminputs 1 aEWM1 +sminputs 2 mdl_Gf +sminputs 3 aS +yukawa 5 mdl_ymb +yukawa 6 mdl_ymt +yukawa 15 mdl_ymtau - - +decay 6 mdl_WT decay 23 mdl_WZ + decay 24 mdl_WW + decay 25 mdl_WH -decay 6 mdl_WT -mass 15 mdl_MTA -mass 23 mdl_MZ -mass 25 mdl_MH -mass 5 mdl_MB -mass 6 mdl_MT -sminputs 1 aEWM1 -sminputs 2 mdl_Gf -sminputs 3 aS -yukawa 15 mdl_ymtau -yukawa 5 mdl_ymb -yukawa 6 mdl_ymt diff --git a/epochX/cudacpp/gg_tt01g.mad/Cards/me5_configuration.txt b/epochX/cudacpp/gg_tt01g.mad/Cards/me5_configuration.txt index 68b4c46295..fa8d3481a2 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 = /home/dmass/Development/madgraph4gpu/amd-ci/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo +mg5_path = /home/dmass/Development/madgraph4gpu/amd-ci/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..cdcb7488ed 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.3 2025-06-12 * #* * #* WARNING: UNKNOWN DEVELOPMENT VERSION. * #* WARNING: DO NOT USE FOR PRODUCTION * @@ -35,16 +35,18 @@ set loop_color_flows False set max_npoint_for_channel 0 set default_unset_couplings 99 set max_t_for_channel 99 +set zerowidth_tchannel True set nlo_mixed_expansion True -set stdout_level DEBUG -set zerowidth_tchannel F -generate g g > t t~ +import model sm define p = g u c d s u~ c~ d~ s~ define j = g u c d s u~ c~ d~ s~ define l+ = e+ mu+ define l- = e- mu- define vl = ve vm vt define vl~ = ve~ vm~ vt~ +set stdout_level DEBUG +set zerowidth_tchannel F +generate g g > t t~ add process g g > t t~ g -output madevent_simd ../TMPOUT/CODEGEN_mad_gg_tt01g --hel_recycling=Fa\ -lse --vector_size=32 +output madevent_simd gg_tt01g.mad_gen --hel_recycling=False --vector_s\ +ize=32 diff --git a/epochX/cudacpp/gg_tt01g.mad/Cards/run_card.dat b/epochX/cudacpp/gg_tt01g.mad/Cards/run_card.dat index 1711d30371..730a05e322 100644 --- a/epochX/cudacpp/gg_tt01g.mad/Cards/run_card.dat +++ b/epochX/cudacpp/gg_tt01g.mad/Cards/run_card.dat @@ -110,11 +110,11 @@ #********************************************************************* # Compilation flag. #********************************************************************* - -O3 -ffast-math -fbounds-check = global_flag ! build flags for all Fortran code (for a fair comparison to cudacpp; default is -O) + -O = global_flag ! fortran optimization flag use for the all code. --fast-math = aloha_flag ! fortran optimization flag for aloha function. Suggestions: '-ffast-math' -O3 = matrix_flag ! fortran optimization flag for matrix.f function. Suggestions: '-O3' - 32 = vector_size ! size of fortran arrays allocated in the multi-event API for SIMD/GPU (VECSIZE_MEMMAX) - 512 = nb_warp ! total number of warp/frontwave + 16 = vector_size ! size of fortran arrays allocated in the multi-event API for SIMD/GPU (VECSIZE_MEMMAX) + 1 = nb_warp ! total number of warp/frontwave #********************************************************************* # Customization (custom cuts/scale/bias/...) * @@ -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..1ac53bb4bd 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.3 \ No newline at end of file diff --git a/epochX/cudacpp/gg_tt01g.mad/Source/.make_opts b/epochX/cudacpp/gg_tt01g.mad/Source/.make_opts index de3864242b..56ba259c56 100644 --- a/epochX/cudacpp/gg_tt01g.mad/Source/.make_opts +++ b/epochX/cudacpp/gg_tt01g.mad/Source/.make_opts @@ -102,6 +102,7 @@ endif ifneq ($(lhapdf),) CXXFLAGS += $(shell $(lhapdf) --cppflags) alfas_functions=alfas_functions_lhapdf + alfas_to_clean=alfas_functions.o llhapdf+= $(shell $(lhapdf) --cflags --libs) -lLHAPDF # check if we need to activate c++11 (for lhapdf6.2) ifeq ($(origin CXX),default) @@ -113,10 +114,11 @@ ifneq ($(lhapdf),) endif else alfas_functions=alfas_functions + alfas_to_clean=alfas_functions_lhapdf.o llhapdf= endif # Helper function to check MG5 version define CHECK_MG5AMC_VERSION python -c 'import re; from distutils.version import StrictVersion; print StrictVersion("$(MG5AMC_VERSION)") >= StrictVersion("$(1)") if re.match("^[\d\.]+$$","$(MG5AMC_VERSION)") else True;' -endef \ No newline at end of file +endef 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..bdf427601f 100644 --- a/epochX/cudacpp/gg_tt01g.mad/Source/make_opts +++ b/epochX/cudacpp/gg_tt01g.mad/Source/make_opts @@ -1,12 +1,11 @@ DEFAULT_CPP_COMPILER=g++ -DEFAULT_F2PY_COMPILER=f2py3 -DEFAULT_F_COMPILER=gfortran -GLOBAL_FLAG=-O3 -ffast-math -fbounds-check MACFLAG= +STDLIB=-lstdc++ +STDLIB_FLAG= +DEFAULT_F2PY_COMPILER=f2py +DEFAULT_F_COMPILER=gfortran MG5AMC_VERSION=SpecifiedByMG5aMCAtRunTime PYTHIA8_PATH=NotInstalled -STDLIB_FLAG= -STDLIB=-lstdc++ #end_of_make_opts_variables BIASLIBDIR=../../../lib/ @@ -103,6 +102,7 @@ endif ifneq ($(lhapdf),) CXXFLAGS += $(shell $(lhapdf) --cppflags) alfas_functions=alfas_functions_lhapdf +alfas_to_clean=alfas_functions.o llhapdf+= $(shell $(lhapdf) --cflags --libs) -lLHAPDF # check if we need to activate c++11 (for lhapdf6.2) ifeq ($(origin CXX),default) @@ -114,6 +114,7 @@ endif endif else alfas_functions=alfas_functions +alfas_to_clean=alfas_functions_lhapdf.o llhapdf= endif diff --git a/epochX/cudacpp/gg_tt01g.mad/Source/makefile b/epochX/cudacpp/gg_tt01g.mad/Source/makefile index 291ca907ee..87a9e61723 100644 --- a/epochX/cudacpp/gg_tt01g.mad/Source/makefile +++ b/epochX/cudacpp/gg_tt01g.mad/Source/makefile @@ -37,10 +37,12 @@ all: $(LIBRARIES) $(LIBDIR)libdhelas.$(libext) $(LIBDIR)libpdf.$(libext) $(LIBDI $(LIBDIR)libdsample.$(libext): $(DSAMPLE) $(call CREATELIB, $@, $^) $(LIBDIR)libgeneric.$(libext): $(GENERIC) + rm -f $@ 2>/dev/null $(call CREATELIB, $@, $^) + rm -f $(alfas_to_clean) 2>/dev/null $(LIBDIR)libdhelas.$(libext): DHELAS cd DHELAS; make; cd .. -$(LIBDIR)libpdf.$(libext): PDF make_opts +$(LIBDIR)libpdf.$(libext): PDF $(alfas_functions).o cd PDF; make; cd .. ifneq (,$(filter edff chff, $(pdlabel1) $(pdlabel2))) $(LIBDIR)libgammaUPC.$(libext): PDF/gammaUPC @@ -73,6 +75,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/vector.inc b/epochX/cudacpp/gg_tt01g.mad/Source/vector.inc index ba125272b6..9d8b377aa7 100644 --- a/epochX/cudacpp/gg_tt01g.mad/Source/vector.inc +++ b/epochX/cudacpp/gg_tt01g.mad/Source/vector.inc @@ -30,6 +30,8 @@ C INTEGER WARP_SIZE PARAMETER (WARP_SIZE=32) INTEGER NB_WARP - PARAMETER (NB_WARP=512) + PARAMETER (NB_WARP=1) INTEGER VECSIZE_MEMMAX - PARAMETER (VECSIZE_MEMMAX=16384) + PARAMETER (VECSIZE_MEMMAX=32) + + 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..1ac53bb4bd 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.3 \ 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/P1_gg_ttx/CPPProcess.cc b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P1_gg_ttx/CPPProcess.cc index b32f4b931e..dd47addecb 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -555,7 +555,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- 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..646bf08261 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.3, 2025-06-12 // 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..ce175a75a8 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.3, 2025-06-12 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..bd3d520785 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.3, 2025-06-12 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.3, 2025-06-12 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 @@ -484,6 +488,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C Generate events only if IMODE is 0. IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN C Call UNWGT to unweight and store events + ICONFIG = CHANNELS(IVEC) CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) ENDIF diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P1_gg_ttx/driver.f b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P1_gg_ttx/driver.f index ec5722702a..c08048ad0e 100644 --- a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P1_gg_ttx/driver.f +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P1_gg_ttx/driver.f @@ -489,7 +489,6 @@ subroutine open_file_local(lun,filename,fopened) fopened=.false. tempname=filename fine=index(tempname,' ') -c fine2=index(path,' ')-1 ! AV remove valgrind "Conditional jump or move depends on uninitialised value(s)" if(fine.eq.0) fine=len(tempname) open(unit=lun,file=tempname,status='old',ERR=20) fopened=.true. 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..97656450ad 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.3, 2025-06-12 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.3, 2025-06-12 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,21 +394,24 @@ 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 C ---------- IF (FIRST) THEN FIRST=.FALSE. - IF(ZERO.NE.0D0) FK_ZERO = SIGN(MAX(ABS(ZERO), ABS(ZERO - $ *SMALL_WIDTH_TREATMENT)), ZERO) - IF(MDL_WT.NE.0D0) FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT - $ *SMALL_WIDTH_TREATMENT)), MDL_WT) + FK_ZERO = 0D0 + IF(MDL_WT.NE.0D0) THEN + FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT + $ *SMALL_WIDTH_TREATMENT)), MDL_WT) + ELSE + FK_MDL_WT = 0D0 + ENDIF + IF(INIT_MODE) THEN ZEROAMP_1(:,:) = .TRUE. @@ -446,10 +450,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 +464,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/CPPProcess.cc b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P2_gg_ttxg/CPPProcess.cc index c8b3dbf03c..07b37ae549 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -774,7 +774,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- 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..1b776b660f 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.3, 2025-06-12 // 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..81d6a09df0 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.3, 2025-06-12 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..8668bbcb4d 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.3, 2025-06-12 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.3, 2025-06-12 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 @@ -484,6 +488,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C Generate events only if IMODE is 0. IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN C Call UNWGT to unweight and store events + ICONFIG = CHANNELS(IVEC) CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) ENDIF diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P2_gg_ttxg/driver.f b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P2_gg_ttxg/driver.f index c2eadb2c31..10332b6238 100644 --- a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P2_gg_ttxg/driver.f +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/P2_gg_ttxg/driver.f @@ -489,7 +489,6 @@ subroutine open_file_local(lun,filename,fopened) fopened=.false. tempname=filename fine=index(tempname,' ') -c fine2=index(path,' ')-1 ! AV remove valgrind "Conditional jump or move depends on uninitialised value(s)" if(fine.eq.0) fine=len(tempname) open(unit=lun,file=tempname,status='old',ERR=20) fopened=.true. 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..76a34107bc 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.3, 2025-06-12 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.3, 2025-06-12 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,43 +410,32 @@ 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 C ---------- IF (FIRST) THEN FIRST=.FALSE. - IF(ZERO.NE.0D0) FK_ZERO = SIGN(MAX(ABS(ZERO), ABS(ZERO - $ *SMALL_WIDTH_TREATMENT)), ZERO) - IF(MDL_WT.NE.0D0) FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT - $ *SMALL_WIDTH_TREATMENT)), MDL_WT) + FK_ZERO = 0D0 + IF(MDL_WT.NE.0D0) THEN + FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT + $ *SMALL_WIDTH_TREATMENT)), MDL_WT) + ELSE + FK_MDL_WT = 0D0 + ENDIF + IF(INIT_MODE) THEN ZEROAMP_1(:,:) = .TRUE. @@ -549,10 +539,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 +553,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/addmothers.f b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/addmothers.f index 9a31ed201d..6f32477b9e 100644 --- a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/addmothers.f +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/addmothers.f @@ -21,7 +21,7 @@ subroutine addmothers(ip,jpart,pb,isym,jsym,rscale,aqcd,aqed,buff, integer icol ! color selected integer isym(nexternal,99), jsym - integer i,j,k,ida(2),ns,nres,ires,icl,ito2,idenpart,nc,ic + integer i,j,k,ida(2),ns,nres,ires,icl,ito2,idenpart,ic integer mo_color,da_color(2),itmp integer ito(-nexternal+3:nexternal),iseed,maxcolor,maxorg integer icolalt(2,-nexternal+2:2*nexternal-3) @@ -113,14 +113,15 @@ subroutine addmothers(ip,jpart,pb,isym,jsym,rscale,aqcd,aqed,buff, endif lconfig = vec_igraph1(ivec) endif - + is_LC=.true. + maxcolor=0 c c Choose a color flow which is certain to work with the propagator c structure of the chosen diagram and use that as an alternative c if (icol.eq.0) then do i=1,nexternal - icolalt(1,i)=0 + icolalt(1,i)=0 icolalt(2,i)=0 enddo else diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/cluster.f b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/cluster.f index b8995283ed..907894ea89 100644 --- a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/cluster.f +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/cluster.f @@ -556,6 +556,8 @@ logical function cluster(p, ivec) jwin = 0 cluster=.false. clustered=.false. + iwin =0 + jwin =0 do i=0,3 pcmsp(i)=0 enddo @@ -665,8 +667,11 @@ logical function cluster(p, ivec) c initialize graph storage igraphs(0)=0 nleft=nexternal -c cluster - if (iwin.eq.0.or.jwin.eq.0) stop 21 + if(iwin.eq.0.or.jwin.eq.0)then + cluster=.false. + return + endif +c cluster do n=1,nexternal-2 c combine winner imocl(n)=imap(iwin,2)+imap(jwin,2) diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/cudacpp.mk index 20d8ded718..20b8e6b858 100644 --- a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/cudacpp.mk @@ -114,7 +114,7 @@ export CXXFLAGS override CUDA_HOME = $(patsubst %/bin/nvcc,%,$(shell which nvcc 2>/dev/null)) # Set HIP_HOME from the path to hipcc, if it exists -override HIP_HOME = $(patsubst %/bin/hipcc,%,$(shell which hipcc 2>/dev/null)) +override HIP_HOME = $(shell hipconfig --rocmpath) # Configure CUDA_INC (for CURAND and NVTX) and NVTX if a CUDA installation exists (see #965) ifeq ($(CUDA_HOME),) @@ -229,6 +229,8 @@ ifeq ($(BACKEND),cuda) else ifeq ($(BACKEND),hip) + # example architecture values MI200:gfx90a, MI350X:gfx942 + MADGRAPH_HIP_ARCHITECTURE ?= gfx942 # Set GPUCC as $(HIP_HOME)/bin/hipcc (it was already checked above that this exists) GPUCC = $(HIP_HOME)/bin/hipcc XCOMPILERFLAG = @@ -243,7 +245,7 @@ else ifeq ($(BACKEND),hip) ###GPUFLAGS += -ggdb # FOR DEBUGGING ONLY # AMD HIP architecture flags - GPUARCHFLAGS = --offload-arch=gfx90a + GPUARCHFLAGS = --offload-arch=${MADGRAPH_HIP_ARCHITECTURE} GPUFLAGS += $(GPUARCHFLAGS) # Other AMD-specific flags @@ -878,7 +880,7 @@ endif $(gpu_fcheckmain): LIBFLAGS += $(GPULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH $(gpu_fcheckmain): $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBDIR)/lib$(MG5AMC_GPULIB).so $(gpu_objects_exe) ifneq ($(findstring hipcc,$(GPUCC)),) # link fortran/c++/hip using $FC when hipcc is used #802 - $(FC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) -lstdc++ -L$(shell cd -L $(shell dirname $(shell $(GPUCC) -print-prog-name=clang))/../..; pwd)/lib -lamdhip64 + $(FC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) -lstdc++ -L$(HIP_HOME)/lib -lamdhip64 else $(GPUCC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) endif @@ -979,7 +981,7 @@ else # link only runTest_$(GPUSUFFIX).o (new: in the past, this was linking both $(gpu_testmain): LIBFLAGS += $(GPULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH $(gpu_testmain): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(gpu_objects_lib) $(gpu_objects_exe) $(GTESTLIBS) ifneq ($(findstring hipcc,$(GPUCC)),) # link fortran/c++/hip using $FC when hipcc is used #802 - $(FC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lstdc++ -lpthread -L$(shell cd -L $(shell dirname $(shell $(GPUCC) -print-prog-name=clang))/../..; pwd)/lib -lamdhip64 + $(FC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lstdc++ -lpthread -L$(HIP_HOME)/lib -lamdhip64 else $(GPUCC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lcuda endif @@ -1104,10 +1106,20 @@ else @cat /proc/cpuinfo | grep "physical id" | sort -u endif @echo "" -ifneq ($(shell which nvidia-smi 2>/dev/null),) - nvidia-smi -L + # some systems may have -smi installed, but it fails to execute + # because it cannot communicate with the hardware + @if nvidia-smi &>/dev/null ; then \ + nvidia-smi -L ;\ + else \ + echo "No Nvidia GPU detected" ;\ + fi @echo "" -endif + @if amd-smi &>/dev/null ; then \ + amd-smi static -a ;\ + amd-smi list ;\ + else \ + echo "No AMD GPU detected" ;\ + fi @echo USECCACHE=$(USECCACHE) ifeq ($(USECCACHE),1) ccache --version | head -1 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/SubProcesses/proc_characteristics b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/proc_characteristics index 633ee016af..a89249ab59 100644 --- a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/proc_characteristics +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/proc_characteristics @@ -8,7 +8,7 @@ ninitial = 2 grouped_matrix = True has_loops = False - bias_module = dummy + bias_module = None max_n_matched_jets = 1 colored_pdgs = [1, 2, 3, 4, 5, 6, 21] complex_mass_scheme = False diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/reweight.f b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/reweight.f index 0a0bafa7c1..189ba41449 100644 --- a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/reweight.f +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/reweight.f @@ -1186,7 +1186,7 @@ logical function setclscales(p, keepq2bck, ivec) if(nexternal.gt.3) pt2ijcl(nexternal-3)=q2fact(2) else if(.not.fixed_fac_scale1) q2fact(1)=scalefact**2*pt2ijcl(nexternal-2) - if(.not.fixed_fac_scale2) q2fact(2)=scalefact**2*q2fact(1) + if(.not.fixed_fac_scale2) q2fact(2)=scalefact**2*pt2ijcl(nexternal-2) endif elseif(jcentral(1).eq.0)then if(.not.fixed_fac_scale1) q2fact(1) = scalefact**2*pt2ijcl(jfirst(1)) diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/symmetry.f b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/symmetry.f index 309540a0a2..2afd9e9f75 100644 --- a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/symmetry.f +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/symmetry.f @@ -232,7 +232,7 @@ subroutine write_bash(mapconfig,use_config, prwidth, jcomp,iforest, c write(*,*) 'mapping',ic,mapconfig(i),icode if (icode .eq. 0) then c Create format string based on number of digits - write(formstr,'(a,i1,a)') '(I',nconf,'$)' + write(formstr,'(a,i1,a)') '(I',nconf,',$)' write(*,formstr) mapconfig(i) c Write symmetry factors write(formstr2,'(a,i2,a)') '(2i',nsym,')' @@ -242,10 +242,10 @@ subroutine write_bash(mapconfig,use_config, prwidth, jcomp,iforest, dconfig=mapconfig(i)+icode*1d0/10**ncode if(nconf+ncode+1.lt.10) then write(formstr,'(a,i1,a,i1,a)') '(F',nconf+ncode+1, - $ '.',ncode,'$)' + $ '.',ncode,',$)' else write(formstr,'(a,i2,a,i1,a)') '(F',nconf+ncode+1, - $ '.',ncode,'$)' + $ '.',ncode,',$)' endif write(*,formstr) dconfig c Write symmetry factors @@ -260,7 +260,7 @@ subroutine write_bash(mapconfig,use_config, prwidth, jcomp,iforest, dconfig=mapconfig(i)+icode*1d0/10**ncode write(27,formstr2) dconfig,use_config(i) endif - write(*,'(a$)') ' ' + write(*,'(a,$)') ' ' 100 call bw_increment_array(iarray,imax,ibase,done) enddo else diff --git a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/unwgt.f b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/unwgt.f index f602511c94..d1247f1849 100644 --- a/epochX/cudacpp/gg_tt01g.mad/SubProcesses/unwgt.f +++ b/epochX/cudacpp/gg_tt01g.mad/SubProcesses/unwgt.f @@ -497,6 +497,7 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) integer ip, np, ic, nc integer ida(2),ito(-nexternal+3:nexternal),ns,nres,ires,icloop integer iseed + double precision beam_mass double precision pboost(0:3) double precision beta, get_betaz double precision ebi(0:3), ebo(0:3) @@ -506,7 +507,7 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) integer idup(nexternal,maxproc,maxsproc) integer mothup(2,nexternal) integer icolup(2,nexternal,maxflow,maxsproc) - + double precision eta integer nsym integer ievent @@ -638,21 +639,20 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) if (nincoming.eq.2) then if (xbk(1) .gt. 0d0 .and. xbk(1) .le. 1d0 .and. $ xbk(2) .gt. 0d0 .and. xbk(2) .le. 1d0) then - if(lpp(2).ne.0.and.(xbk(1).eq.1d0.or.pmass(1).eq.0d0).and.xbk(2).ne.1d0) then - ! construct the beam momenta in each frame and compute the related (z)boost - if (pmass(1).eq.0d0.and.(abs(lpp(1)).eq.3.or.abs(lpp(1)).eq.4).and.ebeam(1).gt.10d0*m1)then - local_mass = 0d0 - else - local_mass = m1 - endif + if(lpp(2).ne.0.and.(xbk(1).eq.1d0.or.pmass(1).eq.0d0)) then + if((abs(lpp(1)).gt.2.and.abs(lpp(1)).ne.9).or.xbk(1).eq.1d0)then + beam_mass = pmass(1) + else + beam_mass = m1 + endif ebi(0) = p(0,1)/xbk(1) ! this assumes that particle 1 is massless or mass equal to beam ebi(1) = 0 ebi(2) = 0 - ebi(3) = DSQRT(ebi(0)**2-local_mass**2) + ebi(3) = DSQRT(ebi(0)**2-beam_mass**2) ebo(0) = ebeam(1) ebo(1) = 0 ebo(2) = 0 - ebo(3) = DSQRT(ebo(0)**2-local_mass**2) + ebo(3) = DSQRT(ebo(0)**2-beam_mass**2) beta = get_betaz(ebi, ebo) if (xbk(1).eq.1d0) then pb(0,isym(1,jsym)) = ebo(0) @@ -668,20 +668,19 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) enddo else - if (pmass(1).eq.0d0.and.(abs(lpp(1)).eq.3.or.abs(lpp(1)).eq.4.and.ebeam(2).gt.10d0*m2))then - local_mass = 0d0 - else - local_mass = m2 - endif - ebi(0) = p(0,1)/xbk(1) ! this assumes that particle 1 is massless or mass equal to beam + if((abs(lpp(2)).gt.2.and.abs(lpp(2)).ne.9).or.xbk(2).eq.1d0)then + beam_mass = pmass(2) + else + beam_mass = m2 + endif ebi(0) = p(0,2)/xbk(2) ! this assumes that particle 2 is massless or mass equal to beam ebi(1) = 0 ebi(2) = 0 - ebi(3) = -1d0*DSQRT(ebi(0)**2-local_mass**2) + ebi(3) = -1d0*DSQRT(ebi(0)**2-beam_mass**2) ebo(0) = ebeam(2) ebo(1) = 0 ebo(2) = 0 - ebo(3) = -1d0*DSQRT(ebo(0)**2-local_mass**2) + ebo(3) = -1d0*DSQRT(ebo(0)**2-beam_mass**2) beta = get_betaz(ebi, ebo) if (xbk(2).eq.1d0) then pb(0,isym(2,jsym)) = ebo(0) @@ -701,6 +700,21 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) write(*,*) 'Warning bad x1 or x2 in write_leshouche', $ xbk(1),xbk(2) endif + do j=1,nexternal + call zboost_with_beta(p(0,j),beta,pb(0,isym(j,jsym))) + pb(4,isym(j,jsym))=pmass(j) + enddo + + ! check for numerical_accuracy + if (pb(0,1).gt.ebeam(1).or.pb(0,2).gt.ebeam(2))then + ! go back to old method --more accurate when boosting with xbk close to one-- + eta = sqrt(xbk(1)*ebeam(1)/(xbk(2)*ebeam(2))) + pboost(0)=p(0,1)*(eta + 1d0/eta) + pboost(3)=p(0,1)*(eta - 1d0/eta) + do j=1,nexternal + call boostx(p(0,j),pboost,pb(0,isym(j,jsym))) + enddo + endif else do j=1,nexternal call boostx(p(0,j),pboost,pb(0,isym(j,jsym))) @@ -709,6 +723,8 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) enddo endif + + if (IMIRROR.eq.2.and.pmass(1).ne.pmass(2)) then c Note that in this context isym(1,jsym) should never be "2" since the mass differ pb(4,isym(1,jsym))=pmass(2) 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..2efb5954a6 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] @@ -1991,6 +1991,11 @@ def default_setup(self): self.add_param("PartonLevel:FSRinResonances", True, hidden=True, always_write_to_card=False, comment="Do not allow shower to run from decay product of unstable particle") self.add_param("ProcessLevel:resonanceDecays", True, hidden=True, always_write_to_card=False, comment="Do not allow unstable particle to decay.") + # Parameters only needed for main164 type of run (not pythia8/MG5 interface) + self.add_param("Main:HepMC", True, hidden=True, always_write_to_card=False, + comment="""Specify the type of output to be used by the main164 run. """) + self.add_param("HepMC:output", 'hepmc.gz', hidden=True, always_write_to_card=False, + comment="Specify the HepMC output file to be used by the main164 run.") # Add parameters controlling the subruns execution flow. # These parameters should not be part of PY8SubRun daughter. self.add_default_subruns('parameters') @@ -2087,8 +2092,10 @@ def MadGraphSet(self, name, value, **opts): force = False if name.lower() not in self or (force or name.lower() not in self.user_set): self.__setitem__(name, value, change_userdefine=False, **opts) - self.system_set.add(name.lower()) - + self.system_set.add(name.lower()) + else: + raise Exception("The parameter %s is already set to %s. You can not change it." % (name, self[name])) + def defaultSet(self, name, value, **opts): self.__setitem__(name, value, change_userdefine=False, **opts) @@ -2144,9 +2151,19 @@ def pythia8_formatting(value, formatv=None): else: return ','.join([PY8Card.pythia8_formatting(arg) for arg in value]) + #change of name convention between MG5 old interface and main164 from Pythia8 + interface_to_164 = {'HEPMCoutput:file': 'HepMC:output', + 'SysCalc:fullCutVariation': '!SysCalc:fullCutVariation (not supported with 164)', + 'SysCalc:qCutList': '!SysCalc:qCutList (not supported with 164)', + 'SysCalc:qWeed': '!SysCalc:qWeed (not supported with 164)', + 'SysCalc:tmsList': '!SysCalc:tmsList (not supported with 164)', + 'HEPMCoutput:scaling' : '!HEPMCoutput :scaling (not supported with 164)', + 'LHEFInputs:nSubruns' : 'Main:numberOfSubruns'} + def write(self, output_file, template, read_subrun=False, - print_only_visible=False, direct_pythia_input=False, add_missing=True): + print_only_visible=False, direct_pythia_input=False, add_missing=True, + use_mg5amc_py8_interface=False): """ Write the card to output_file using a specific template. > 'print_only_visible' specifies whether or not the hidden parameters should be written out if they are in the hidden_params_to_always_write @@ -2155,7 +2172,12 @@ def write(self, output_file, template, read_subrun=False, in the self.visible_params_to_always_write list and are not user_set or system_set are commented. > If 'add_missing' is False then parameters that should be written_out but are absent - from the template will not be written out.""" + from the template will not be written out. + > use_mg5amc_py8_interface is a flag to indicate that the MG5aMC-PY8 interface is used or not + if not used some parameters need to be translated from the old convention to the new one + """ + + self.use_mg5amc_py8_interface = use_mg5amc_py8_interface # First list the visible parameters visible_param = [p for p in self if p.lower() not in self.hidden_param @@ -2297,7 +2319,16 @@ def group_params(params): else: # Just copy parameters which don't need to be specified if param.lower() not in self.params_to_never_write: - output.write(line) + + if not use_mg5amc_py8_interface and direct_pythia_input and \ + param in self.interface_to_164: + param_entry = self.interface_to_164[param.strip()] + # special case for HepMC needs two flags + if 'HepMC:output' == param_entry: + output.write(' %s=%s\n'%('Main:HepMC', 'on')) + output.write('%s=%s\n'%(param_entry,new_value)) + else: + output.write(line) else: output.write('! The following parameter was forced to be commented out by MG5aMC.\n') output.write('! %s'%line) @@ -2313,6 +2344,7 @@ def group_params(params): if ((not direct_pythia_input) or (param.lower() in self.visible_params_to_always_write) or (param.lower() in self.user_set) or + (param.lower() in self.hidden_params_to_always_write) or (param.lower() in self.system_set)): template = '%s=%s' else: @@ -2321,6 +2353,19 @@ def group_params(params): # then they shouldn't be passed to Pythia template = '!%s=%s' + if not use_mg5amc_py8_interface and direct_pythia_input and \ + param in self.interface_to_164: + param_entry = self.interface_to_164[param] + # special case for HepMC needs two flags + if 'HepMC:output' == param_entry: + output.write(' %s=%s\n'%('Main:HepMC', 'on')) + if 'Main:InternalAnalysis'.lower() in self.user_set and \ + self['Main:InternalAnalysis'].lower() == 'on': + output.write('InternalAnalysis:output = ./djrs.dat\n') + + #elif param in self.interface_to_164.values() and not direct_pythia_input: + # misc.sprint(use_mg5amc_py8_interface, direct_pythia_input,param) + # raise Exception('The parameter %s is not supported in the MG5aMC-PY8 interface. Please use the new interface.'%param_entry output.write(template%(param_entry, value_entry.replace(value,new_value))) @@ -2365,6 +2410,8 @@ def group_params(params): comment = '\n'.join('! %s'%c for c in self.comments[param.lower()].split('\n')) output.write(comment+'\n') + if not use_mg5amc_py8_interface and param in self.interface_to_164: + continue output.write('%s=%s\n'%(param,PY8Card.pythia8_formatting(self[param]))) # Don't close the file if we were reading a subrun, but simply write @@ -3318,7 +3365,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 +3372,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 @@ -4050,8 +4095,8 @@ def post_set_fixed_fac_scale(card, value, change_userdefine, raiseerror, **opt): if 'fixed_fac_scale2' in card.user_set: card.user_set.remove('fixed_fac_scale2') - # #card['pdlabel1'] = value - # #card['pdlabel2'] = value + dict.__setitem__(card, 'fixed_fac_scale1', card['fixed_fac_scale']) + dict.__setitem__(card, 'fixed_fac_scale2', card['fixed_fac_scale']) @staticmethod def post_set(card, value, change_userdefine, raiseerror, name='unknown', **opt): @@ -4201,6 +4246,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 @@ -4451,11 +4497,11 @@ def check_validity(self): time.sleep(5) if self['drjj'] != 0: if 'drjj' in self.user_set: - logger.warning('Since icckw>0, changing the value of \'drjj\' to 0') + logger.warning('Since ickkw>0, changing the value of \'drjj\' to 0') self['drjj'] = 0 if self['drjl'] != 0: if 'drjl' in self.user_set: - logger.warning('Since icckw>0, changing the value of \'drjl\' to 0') + logger.warning('Since ickkw>0, changing the value of \'drjl\' to 0') self['drjl'] = 0 if not self['auto_ptj_mjj']: if self['mmjj'] > self['xqcut']: @@ -4753,7 +4799,6 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): self['fixed_fac_scale1'] = True self['nhel'] = 1 for i in beam_id_split[1]: - exit if abs(i) == 11: self['lpp1'] = -math.copysign(3,i) self['lpp2'] = math.copysign(3,i) @@ -5577,6 +5622,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 +5838,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/cluster.py b/epochX/cudacpp/gg_tt01g.mad/bin/internal/cluster.py index 95ef45b5f3..66069293d2 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/cluster.py +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/cluster.py @@ -602,6 +602,7 @@ def __init__(self, *args, **opt): self.submitted = six.moves.queue.Queue() # one entry by job submitted self.stoprequest = threading.Event() #flag to ensure everything to close self.demons = [] + self.gpus_list = [] self.nb_done =0 if 'nb_core' in opt: self.nb_core = opt['nb_core'] @@ -623,23 +624,46 @@ def __init__(self, *args, **opt): self.done_pid_queue = six.moves.queue.Queue() self.fail_msg = None + mg5_gpu_env_str = 'MG5_GPU_VISIBLE_DEVICES' + gpu_variables = [['NVIDIA_VISIBLE_DEVICES', 'CUDA_VISIBLE_DEVICES'], + ['ROCR_VISIBLE_DEVICES', 'HIP_VISIBLE_DEVICES'],] + if mg5_gpu_env_str in os.environ: + new_var = os.environ[mg5_gpu_env_str].split(',') + if len(new_var) == 2: + gpu_variables.insert(0, new_var) + else: + logger.error('Invalid format for %s=%s, it should be a comma-separated list of two elements' % (mg5_gpu_env_str, os.environ[mg5_gpu_env_str])) + for get_var,set_var in gpu_variables: + if get_var in os.environ: + self.gpus_list = os.environ.get(get_var).split(',') + self.gpu_set_var = set_var + self.gpus_count = len(self.gpus_list) + logger.info('Found %s GPUs: %s' % (self.gpus_count, self.gpus_list)) def start_demon(self): import threading - t = threading.Thread(target=self.worker) + env2 = None + if len(self.gpus_list): + env2 = os.environ.copy() + this_gpu_idx = len(self.demons) % self.gpus_count + env2[self.gpu_set_var] = self.gpus_list[this_gpu_idx] + t = threading.Thread(target=self.worker, kwargs={'env2': env2}) + else: + t = threading.Thread(target=self.worker) t.daemon = True t.start() self.demons.append(t) - def worker(self): + def worker(self, env2=None): import six.moves.queue import six.moves._thread while not self.stoprequest.isSet(): try: args = self.queue.get(timeout=10) tag, exe, arg, opt = args + opt['env'] = env2 try: # check for executable case if isinstance(exe,str): 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..69291df0d4 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): @@ -1463,11 +1463,15 @@ def create_plot(self, mode='parton', event_path=None, output=None, tag=None): self.run_name, '%s_pts.dat' % tag) for observable_name, data_path in [('djr',djr_path), ('pt',pt_path)]: - if not self.generate_Pythia8_HwU_plots( + try: + if not self.generate_Pythia8_HwU_plots( PY8_plots_root_path, merging_scale_name, observable_name,data_path): - return False - + return False + except Exception as error: + if os.path.exists(data_path): + logger.info('plot information present in %s' % data_path) + return True if mode == 'Pythia8': plot_files = glob.glob(pjoin(PY8_plots_root_path,'*.gnuplot')) if not misc.which('gnuplot'): @@ -1964,12 +1968,16 @@ def do_systematics(self, line): self.cluster.wait(os.path.dirname(output), update_status, update_first=update_status) except Exception: self.cluster.remove() + for i in range(nb_submit): + os.remove('%s/tmp_%s_%s' %(os.path.dirname(output),i,os.path.basename(output))) old_run_mode = self.options['run_mode'] self.options['run_mode'] =0 + out =False try: out = self.do_systematics(line) finally: self.options['run_mode'] = old_run_mode + return out #collect the data all_cross = [] for i in range(nb_submit): @@ -1995,18 +2003,21 @@ def do_systematics(self, line): self.run_card['event_norm'] in ['unity']: all_cross= [cross/nb_event for cross in all_cross] - sys_obj = systematics.call_systematics([input, None] + opts, - log=lambda x: logger.info(str(x)), - result=result_file, - running=False - ) + + sys_obj = systematics.call_systematics([input, None] + opts, + log=lambda x: logger.info(str(x)), + result=result_file, + running=False + ) + sys_obj.print_cross_sections(all_cross, nb_event, result_file) - + #concatenate the output file subprocess.call(['cat']+\ ['./tmp_%s_%s' % (i, os.path.basename(output)) for i in range(nb_submit)], stdout=open(output,'w'), cwd=os.path.dirname(output)) + for i in range(nb_submit): os.remove('%s/tmp_%s_%s' %(os.path.dirname(output),i,os.path.basename(output))) # os.remove('%s/log_sys_%s.txt' % (os.path.dirname(output),i)) @@ -3831,7 +3842,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 +5146,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 +6751,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 +6775,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 +6826,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..6fbdd98100 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': @@ -1858,6 +1855,8 @@ def parse_histos_from_PY8_XML_stream(self, stream, run_id=None, # If merging cut is negative, then pick only the one of the central scale # If not specified, then take them all but use the PDF and scale weight # of the central merging_scale for the variation. + if not all_weights: + raise MadGraph5Error('No weights were found in the HwU XML source.') if merging_scale is None or merging_scale < 0.0: merging_scale_chosen = all_weights[2]['MERGING'] else: @@ -2480,14 +2479,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 +2738,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 +2877,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 +2889,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 +2898,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 +2907,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 +2916,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..b1739da73d 100644 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/launch_plugin.py +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/launch_plugin.py @@ -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: O. Mattelaer (Aug 2023) for the MG5aMC CUDACPP plugin. -# Further modified by: O. Mattelaer, A. Valassi (2024) for the MG5aMC CUDACPP plugin. +# Further modified by: O. Mattelaer, A. Valassi, Z. Wettersten (2024-2025) for the MG5aMC CUDACPP plugin. import logging import os @@ -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') @@ -133,7 +133,8 @@ def default_setup(self): super().default_setup() # change default value: self['cudacpp_backend'] = 'cuda' - self['vector_size'] = 16384 # already setup in default class (just change value) + self['vector_size'] = 32 # ZW: default to 32, might want to change to 64 to utilise AMD GPUs better as well # 16384 # already setup in default class (just change value) + self['nb_warp'] = 512 # number of warps per kernel call, for now setting to 16 384 / vector_size MEINTERFACE = CPPMEInterface RunCard = CPPRunCard 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..81d17f7cb1 100755 --- a/epochX/cudacpp/gg_tt01g.mad/bin/internal/lhe_parser.py +++ b/epochX/cudacpp/gg_tt01g.mad/bin/internal/lhe_parser.py @@ -1035,12 +1035,12 @@ def define_init_banner(self, wgt, lha_strategy, proc_charac=None): from_init = True if not from_init: - if group in grouped_cross: - grouped_cross[group] += self.allcross[i] - grouped_error[group] += self.error[i]**2 + if int(group) in grouped_cross: + grouped_cross[int(group)] += self.allcross[i] + grouped_error[int(group)] += self.error[i]**2 else: - grouped_cross[group] = self.allcross[i] - grouped_error[group] = self.error[i]**2 + grouped_cross[int(group)] = self.allcross[i] + grouped_error[int(group)] = self.error[i]**2 else: ban = banner_mod.Banner(ff.banner) for line in ban['init'].split('\n'): @@ -1048,11 +1048,11 @@ def define_init_banner(self, wgt, lha_strategy, proc_charac=None): if len(splitline)==4: cross, error, _, group = splitline if int(group) in grouped_cross: - grouped_cross[group] += float(cross) - grouped_error[group] += float(error)**2 + grouped_cross[int(group)] += float(cross) + grouped_error[int(group)] += float(error)**2 else: - grouped_cross[group] = float(cross) - grouped_error[group] = float(error)**2 + grouped_cross[int(group)] = float(cross) + grouped_error[int(group)] = float(error)**2 nb_group = len(grouped_cross) # compute the information for the first line @@ -1086,6 +1086,8 @@ def define_init_banner(self, wgt, lha_strategy, proc_charac=None): self.seek(0) if init_information["idbmup2"] in [0,9]: event = next(self) + if len(event) == 0: + event = Event(str(event)) init_information["idbmup2"] = event[1].pdg self.seek(0) @@ -2166,10 +2168,13 @@ def check(self): abspz += abs(particle.pz) # check mass fourmass = FourMomentum(particle).mass - - if particle.mass and (abs(particle.mass) - fourmass)/ abs(particle.mass) > threshold: - raise Exception( "Do not have correct mass lhe: %s momentum: %s (error at %s" % (particle.mass, fourmass, (abs(particle.mass) - fourmass)/ abs(particle.mass))) - + if particle.mass: + expected = (particle.E - math.sqrt(particle.E**2 -particle.mass**2))/particle.E + if expected > 1e-8: + mass_threshold = particle.E**2 - (particle.E-threshold)**2 + if (abs(particle.mass) - fourmass)/ mass_threshold > 5: + raise Exception( "Do not have correct mass lhe: %s momentum: %s (error at %s" % (particle.mass, fourmass, (abs(particle.mass) - fourmass)/ abs(particle.mass))) + if E/absE > threshold: logger.critical(self) @@ -2953,8 +2958,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..4d5597c722 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) @@ -2827,10 +2827,10 @@ def print_results_in_shell(self, data): logger.info(" Nb of events after matching/merging : %d" % int(data['nb_event_pythia'])) if self.run_card['use_syst'] in self.true and \ (int(self.run_card['ickkw'])==1 or self.run_card['ktdurham']>0.0 - or self.run_card['ptlund']>0.0): + or self.run_card['ptlund']>0.0) and data['cross_pythia'] == -1: logger.info(" Notice that because Systematics computation is turned on, the merging did not veto events but modified their weights instead.\n"+\ " The resulting hepmc/stdhep file should therefore be use with those weights.") - else: + elif data['cross_pythia'] == -1: logger.info(" Nb of events after merging : %s" % data['nb_event_pythia']) logger.info(" " ) @@ -3055,6 +3055,7 @@ def do_multi_run(self, line): crossoversig = 0 inv_sq_err = 0 nb_event = 0 + madspin = False for i in range(nb_run): self.nb_refine = 0 self.exec_cmd('generate_events %s_%s -f' % (main_name, i), postcmd=False) @@ -3067,6 +3068,8 @@ def do_multi_run(self, line): inv_sq_err+=1.0/error**2 self.results[main_name][-1]['cross'] = crossoversig/inv_sq_err self.results[main_name][-1]['error'] = math.sqrt(1.0/inv_sq_err) + if 'decayed' in self.run_name: + madspin = True self.results.def_current(main_name) self.run_name = main_name self.update_status("Merging LHE files", level='parton') @@ -3074,9 +3077,12 @@ def do_multi_run(self, line): os.mkdir(pjoin(self.me_dir,'Events', self.run_name)) except Exception: pass - os.system('%(bin)s/merge.pl %(event)s/%(name)s_*/unweighted_events.lhe.gz %(event)s/%(name)s/unweighted_events.lhe.gz %(event)s/%(name)s_banner.txt' + + os.system('%(bin)s/merge.pl %(event)s/%(name)s_*%(madspin)s/unweighted_events.lhe.gz %(event)s/%(name)s/unweighted_events.lhe.gz %(event)s/%(name)s_banner.txt' % {'bin': self.dirbin, 'event': pjoin(self.me_dir,'Events'), - 'name': self.run_name}) + 'name': self.run_name, + 'madspin': '_decayed_*' if madspin else '' + }) eradir = self.options['exrootanalysis_path'] if eradir and misc.is_executable(pjoin(eradir,'ExRootLHEFConverter')): @@ -3656,9 +3662,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'))) @@ -3757,6 +3765,8 @@ def split(a, n): k, m = divmod(len(a), n) return (a[i*k+min(i, m):(i+1)*k+min(i+1, m)] for i in range(n)) + Gdirs = self.remove_empty_events(Gdirs) + partials_info = [] if len(Gdirs) >= max_G: start_unweight= time.perf_counter() @@ -3786,7 +3796,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, @@ -4223,7 +4233,7 @@ def mg5amc_py8_interface_consistency_warning(options): return None - def setup_Pythia8RunAndCard(self, PY8_Card, run_type): + def setup_Pythia8RunAndCard(self, PY8_Card, run_type, use_mg5amc_py8_interface): """ Setup the Pythia8 Run environment and card. In particular all the process and run specific parameters of the card are automatically set here. This function returns the path where HEPMC events will be output, if any.""" @@ -4338,10 +4348,10 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): PY8_Card.systemSet('Beams:setProductionScalesFromLHEF',True) # Automatically set qWeed to xqcut if not defined by the user. - if PY8_Card['SysCalc:qWeed']==-1.0: + if use_mg5amc_py8_interface and PY8_Card['SysCalc:qWeed']==-1.0: PY8_Card.MadGraphSet('SysCalc:qWeed',self.run_card['xqcut'], force=True) - if PY8_Card['SysCalc:qCutList']=='auto': + if use_mg5amc_py8_interface and PY8_Card['SysCalc:qCutList']=='auto': if self.run_card['use_syst']: if self.run_card['sys_matchscale']=='auto': qcut = PY8_Card['JetMatching:qCut'] @@ -4368,7 +4378,7 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): # Specific MLM settings # PY8 should not implement the MLM veto since the driver should do it # if merging scale variation is turned on - if self.run_card['use_syst']: + if use_mg5amc_py8_interface and self.run_card['use_syst']: # We do no force it here, but it is clear that the user should know what # he's doing if he were to force it to True. PY8_Card.MadGraphSet('JetMatching:doVeto',False) @@ -4444,7 +4454,7 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): PY8_Card.MadGraphSet('SpaceShower:pTmaxMatch',1) PY8_Card.MadGraphSet('SpaceShower:rapidityOrder',False) # PY8 should not implement the CKKW veto since the driver should do it. - if self.run_card['use_syst']: + if use_mg5amc_py8_interface and self.run_card['use_syst']: # We do no force it here, but it is clear that the user should know what # he's doing if he were to force it to True. PY8_Card.MadGraphSet('Merging:applyVeto',False) @@ -4516,6 +4526,12 @@ def do_pythia8(self, line): else: no_default = False + if '--old_interface' in args: + use_mg5amc_py8_interface = True + args.remove('--old_interface') + else: + use_mg5amc_py8_interface = False + if not self.run_name: self.check_pythia8(args) self.configure_directory(html_opening =False) @@ -4545,20 +4561,27 @@ def do_pythia8(self, line): #"Please use 'event_norm = average' in the run_card to avoid this problem.") - - if not self.options['mg5amc_py8_interface_path'] or not \ - os.path.exists(pjoin(self.options['mg5amc_py8_interface_path'], - 'MG5aMC_PY8_interface')): - raise self.InvalidCmd( -"""The MG5aMC_PY8_interface tool cannot be found, so that MadEvent cannot steer Pythia8 shower. -Please install this tool with the following MG5_aMC command: - MG5_aMC> install mg5amc_py8_interface_path""") + if use_mg5amc_py8_interface: + if not self.options['mg5amc_py8_interface_path'] or not \ + os.path.exists(pjoin(self.options['mg5amc_py8_interface_path'], + 'MG5aMC_PY8_interface')): + raise self.InvalidCmd( + """The MG5aMC_PY8_interface tool cannot be found, so that MadEvent cannot steer Pythia8 shower. + Please install this tool with the following MG5_aMC command: + MG5_aMC> install mg5amc_py8_interface_path""") + else: + pythia_main = pjoin(self.options['mg5amc_py8_interface_path'], + 'MG5aMC_PY8_interface') + warnings = MadEventCmd.mg5amc_py8_interface_consistency_warning(self.options) + if warnings: + logger.warning(warnings) else: - pythia_main = pjoin(self.options['mg5amc_py8_interface_path'], - 'MG5aMC_PY8_interface') - warnings = MadEventCmd.mg5amc_py8_interface_consistency_warning(self.options) - if warnings: - logger.warning(warnings) + pythia_main = pjoin(self.options['pythia8_path'], 'share', 'Pythia8', 'examples', 'main164') + if not os.path.exists(pythia_main): + pythia_main = pjoin(self.options['pythia8_path'], 'examples', 'main164') + if not os.path.exists(pythia_main): + logger.warning('main164 not found (or not compiled). Will try the old interface instead.') + return self.do_pythia8(line + ' --old_interface') self.results.add_detail('run_mode', 'madevent') @@ -4583,14 +4606,19 @@ def do_pythia8(self, line): run_type = 'CKKW' # Edit the card and run environment according to the run specification - HepMC_event_output = self.setup_Pythia8RunAndCard(PY8_Card, run_type) + HepMC_event_output = self.setup_Pythia8RunAndCard(PY8_Card, run_type, use_mg5amc_py8_interface=use_mg5amc_py8_interface) + + if not use_mg5amc_py8_interface and self.options['run_mode']==0 or (self.options['run_mode']==2 and self.options['nb_core']==1): + PY8_Card['Main:numberOfEvents']= self.run_card['nevents'] + # Now write the card. pythia_cmd_card = pjoin(self.me_dir, 'Events', self.run_name , '%s_pythia8.cmd' % tag) cmd_card = StringIO.StringIO() PY8_Card.write(cmd_card,pjoin(self.me_dir,'Cards','pythia8_card_default.dat'), - direct_pythia_input=True) + direct_pythia_input=True, + use_mg5amc_py8_interface=use_mg5amc_py8_interface) # Now setup the preamble to make sure that everything will use the locally # installed tools (if present) even if the user did not add it to its @@ -4632,7 +4660,7 @@ def do_pythia8(self, line): " command '/usr/bin/env %s' exists and returns a valid path."%shell) exe_cmd = "#!%s\n%s"%(shell_exe,' '.join( - [preamble+pythia_main, + [preamble+pythia_main, '' if use_mg5amc_py8_interface else '-c', os.path.basename(pythia_cmd_card)])) wrapper.write(exe_cmd) @@ -4699,6 +4727,7 @@ def do_pythia8(self, line): n_cores = max(min(min_n_core,n_cores),1) if self.options['run_mode']==0 or (self.options['run_mode']==2 and self.options['nb_core']==1): + # No need for parallelization anymore self.cluster = None logger.info('Follow Pythia8 shower by running the '+ @@ -4744,20 +4773,22 @@ def do_pythia8(self, line): ParallelPY8Card.subruns[0].systemSet('Beams:LHEF','events.lhe.gz') ParallelPY8Card.write(pjoin(parallelization_dir,'PY8Card.dat'), pjoin(self.me_dir,'Cards','pythia8_card_default.dat'), - direct_pythia_input=True) + direct_pythia_input=True, + use_mg5amc_py8_interface=use_mg5amc_py8_interface) # Write the wrapper wrapper_path = pjoin(parallelization_dir,'run_PY8.sh') wrapper = open(wrapper_path,'w') if self.options['cluster_temp_path'] is None: exe_cmd = \ -"""#!%s -./%s PY8Card.dat >& PY8_log.txt -""" +"""#!%%s +./%%s %s PY8Card.dat >& PY8_log.txt +""" % ('' if use_mg5amc_py8_interface else '-c') + else: exe_cmd = \ -"""#!%s +"""#!%%s ln -s ./events_$1.lhe.gz ./events.lhe.gz -./%s PY8Card_$1.dat >& PY8_log.txt +./%%s %s PY8Card_$1.dat >& PY8_log.txt mkdir split_$1 if [ -f ./events.hepmc ]; then @@ -4776,7 +4807,7 @@ def do_pythia8(self, line): mv ./PY8_log.txt ./split_$1/ fi tar -czf split_$1.tar.gz split_$1 -""" +""" % ('' if use_mg5amc_py8_interface else '-c') exe_cmd = exe_cmd%(shell_exe,os.path.basename(pythia_main)) wrapper.write(exe_cmd) wrapper.close() @@ -4812,19 +4843,27 @@ def do_pythia8(self, line): pjoin(parallelization_dir,split_files[-1])) logger.info('Submitting Pythia8 jobs...') + for i, split_file in enumerate(split_files): # We must write a PY8Card tailored for each split so as to correct the normalization # HEPMCoutput:scaling of each weight since the lhe showered will not longer contain the # same original number of events - split_PY8_Card = banner_mod.PY8Card(pjoin(parallelization_dir,'PY8Card.dat')) + split_PY8_Card = banner_mod.PY8Card(pjoin(parallelization_dir,'PY8Card.dat'), setter='user') + assert split_PY8_Card['JetMatching:nJetMax'] == PY8_Card['JetMatching:nJetMax'] + + + # Make sure to sure the number of split_events determined during the splitting. - split_PY8_Card.systemSet('Main:numberOfEvents',partition_for_PY8[i]) + split_PY8_Card.systemSet('Main:numberOfEvents',partition_for_PY8[i], force=True) + assert split_PY8_Card['Main:numberOfEvents'] == partition_for_PY8[i] split_PY8_Card.systemSet('HEPMCoutput:scaling',split_PY8_Card['HEPMCoutput:scaling']* - (float(partition_for_PY8[i]))) + (float(partition_for_PY8[i])), force=True) # Add_missing set to False so as to be sure not to add any additional parameter w.r.t # the ones in the original PY8 param_card copied. split_PY8_Card.write(pjoin(parallelization_dir,'PY8Card_%d.dat'%i), - pjoin(parallelization_dir,'PY8Card.dat'), add_missing=False) + pjoin(parallelization_dir,'PY8Card.dat'), add_missing=False, + direct_pythia_input=True, + use_mg5amc_py8_interface=use_mg5amc_py8_interface) in_files = [pjoin(parallelization_dir,os.path.basename(pythia_main)), pjoin(parallelization_dir,'PY8Card_%d.dat'%i), pjoin(parallelization_dir,split_file)] @@ -5073,7 +5112,7 @@ def wait_monitoring(Idle, Running, Done): # works both for fixed number of generated events and fixed accepted events self.results.add_detail('error_pythia', error_m) - if self.run_card['use_syst']: + if self.run_card['use_syst'] and use_mg5amc_py8_interface: self.results.add_detail('cross_pythia', -1) self.results.add_detail('error_pythia', 0) @@ -6132,7 +6171,102 @@ def get_Gdir(self, Pdir=None, symfact=None): mfactors[pjoin(P, "G%s" % tag)] = mfactor self.Gdirs = (Gdirs, mfactors) return self.get_Gdir(Pdir, symfact=symfact) + + ############################################################################ + def remove_empty_events(self, Gdir): + """return Gdir strip from the one providing empty events.lhe files.""" + + reasons = collections.defaultdict(list) + Gdirs = Gdir[:] + for G in Gdirs[:]: + try: + size = os.path.getsize(pjoin(G, 'events.lhe')) + except Exception as error: + size = 0 + if size <10: + Gdirs.remove(G) + try: + log = misc.BackRead(pjoin(G, 'log.txt')) + except Exception as error: + log = misc.BackRead(pjoin(G, 'run1_app.log')) + found = -1 + for line in log: + if 'Deleting file events.lhe' in line: + found = 0 + elif "Impossible BW configuration" in line: + reasons['bwconfig'].append(G) + break + elif found < -150: + reasons['not found'].append(G) + Gdirs.append(G) + break + elif found < 0: + found -= 1 + elif 'Loosen cuts or increase max_events' in line: + reasons['cuts'].append(G) + break + elif 'all returned zero' in line: + reasons['zero'].append(G) + break + elif found > 5: + reasons['unknown'].append(G) + break + else: + found += 1 + + if len(reasons): + logger.debug('Reasons for empty events.lhe:') + if len(reasons['unknown']): + logger.debug(' - unknown: %s' % len(reasons['unknown'])) + logger.log(10, ' DETAIL:' + ','.join(['/'.join(G.rsplit(os.sep)[-2:]) for G in reasons['unknown'][:10]])) + if len(reasons['not found']): + logger.debug(' - not found in log: %s' % len(reasons['not found'])) + logger.log(10, ' DETAIL:' + ','.join(['/'.join(G.rsplit(os.sep)[-2:]) for G in reasons['not found'][:10]])) + if len(reasons['zero']): + logger.debug(' - zero amplitudes: %s' % len(reasons['zero'])) + logger.log(10, ' DETAIL:' + ','.join(['/'.join(G.rsplit( os.sep)[-2:]) for G in reasons['zero'][:10]])) + if len(reasons['bwconfig']): + critical_bwconfig = set() + for G in reasons['bwconfig']: + base = G.rsplit('.',1)[0] + if any(G2.startswith(base) for G2 in Gdirs): + continue + else: + critical_bwconfig.add(os.sep.join(base.rsplit(os.sep)[-2:])) + for G in critical_bwconfig: + logger.warning('Gdirectory %s has no events.lhe file. (no BW config found %s times)' % G) + + logger.debug(' - impossible BW configuration: %s' % len(reasons['bwconfig'])) + logger.debug(' - channel with no possible BW configuration: %s' % len(critical_bwconfig)) + + if len(reasons['cuts']): + critical_nb_cuts = collections.defaultdict(int) + for G in reasons['cuts']: + if '.' in os.path.basename(G): + base = G.rsplit('.',1)[0] + if any(G2.startswith(base) for G2 in Gdirs): + continue + else: + critical_nb_cuts[os.sep.join(base.rsplit(os.sep)[-2:])] += 1 + else: + critical_nb_cuts[''] += 1 + logger.warning('Gdirectory %s has no events.lhe file. (no points passed cuts found)' % G) + for G, nb in critical_nb_cuts.items(): + if not G: + continue + else: + logger.warning('%s channel %s.XXX has no events.lhe file. (no points passed cuts). No %s with events detected' % (nb, G, G)) + logger.debug(' - no points passed cuts: %s' % len(reasons['cuts'])) + logger.log(10, ' DETAIL:' + ','.join(['/'.join(G.rsplit(os.sep)[-2:]) for G in reasons['cuts'][:10]])) + logger.debug(' - without any BW handling (critical): %s' % critical_nb_cuts['']) + logger.debug(' - with BW but all zero (critical): %s' % sum([nb for v, nb in critical_nb_cuts.items() if v!=''], 0)) + #logger.debug(' - cuts (with BW conflict where other channel contributes): %s' % (len(reasons['cuts'])- critical_nb_cuts)) + + + return Gdirs + + ############################################################################ def set_run_name(self, name, tag=None, level='parton', reload_card=False, allow_new_tag=True): @@ -6749,7 +6883,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 +6893,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 +7010,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 +7038,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 +7053,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 +7065,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 +7190,13 @@ 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) 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 +7210,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..3eef114424 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.3, 2025-06-12 // 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..1f9fb6d469 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.3, 2025-06-12 // 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..505c8839b3 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_tt01g.mad/test/cudacpp_test.mk b/epochX/cudacpp/gg_tt01g.mad/test/cudacpp_test.mk index f703a1ae7c..4934c9a53f 100644 --- a/epochX/cudacpp/gg_tt01g.mad/test/cudacpp_test.mk +++ b/epochX/cudacpp/gg_tt01g.mad/test/cudacpp_test.mk @@ -19,7 +19,7 @@ CXXFLAGS += -Igoogletest/googletest/include/ -std=c++11 all: googletest/$(INSTALLDIR)/lib64/libgtest.a googletest/CMakeLists.txt: - git clone https://github.com/google/googletest.git -b release-1.11.0 googletest + git clone https://github.com/google/googletest.git -b v1.17.0 googletest googletest/$(BUILDDIR)/Makefile: googletest/CMakeLists.txt mkdir -p googletest/$(BUILDDIR) diff --git a/epochX/cudacpp/gg_ttg.mad/Cards/ident_card.dat b/epochX/cudacpp/gg_ttg.mad/Cards/ident_card.dat index 0ba87b008f..b37758a42a 100644 --- a/epochX/cudacpp/gg_ttg.mad/Cards/ident_card.dat +++ b/epochX/cudacpp/gg_ttg.mad/Cards/ident_card.dat @@ -2,32 +2,32 @@ ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c written by the UFO converter ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc +mass 5 mdl_MB +mass 6 mdl_MT +mass 15 mdl_MTA +mass 23 mdl_MZ +mass 25 mdl_MH +sminputs 1 aEWM1 +sminputs 2 mdl_Gf +sminputs 3 aS +yukawa 5 mdl_ymb +yukawa 6 mdl_ymt +yukawa 15 mdl_ymtau - - +decay 6 mdl_WT decay 23 mdl_WZ + decay 24 mdl_WW + decay 25 mdl_WH -decay 6 mdl_WT -mass 15 mdl_MTA -mass 23 mdl_MZ -mass 25 mdl_MH -mass 5 mdl_MB -mass 6 mdl_MT -sminputs 1 aEWM1 -sminputs 2 mdl_Gf -sminputs 3 aS -yukawa 15 mdl_ymtau -yukawa 5 mdl_ymb -yukawa 6 mdl_ymt diff --git a/epochX/cudacpp/gg_ttg.mad/Cards/me5_configuration.txt b/epochX/cudacpp/gg_ttg.mad/Cards/me5_configuration.txt index 68b4c46295..fa8d3481a2 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 = /home/dmass/Development/madgraph4gpu/amd-ci/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo +mg5_path = /home/dmass/Development/madgraph4gpu/amd-ci/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..1ceaa6eea3 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.3 2025-06-12 * #* * #* WARNING: UNKNOWN DEVELOPMENT VERSION. * #* WARNING: DO NOT USE FOR PRODUCTION * @@ -35,15 +35,17 @@ set loop_color_flows False set max_npoint_for_channel 0 set default_unset_couplings 99 set max_t_for_channel 99 +set zerowidth_tchannel True set nlo_mixed_expansion True -set stdout_level DEBUG -set zerowidth_tchannel F -generate g g > t t~ g +import model sm define p = g u c d s u~ c~ d~ s~ define j = g u c d s u~ c~ d~ s~ define l+ = e+ mu+ define l- = e- mu- define vl = ve vm vt define vl~ = ve~ vm~ vt~ -output madevent_simd ../TMPOUT/CODEGEN_mad_gg_ttg --hel_recycling=Fals\ -e --vector_size=32 +set stdout_level DEBUG +set zerowidth_tchannel F +generate g g > t t~ g +output madevent_simd gg_ttg.mad_gen --hel_recycling=False --vector_siz\ +e=32 diff --git a/epochX/cudacpp/gg_ttg.mad/Cards/run_card.dat b/epochX/cudacpp/gg_ttg.mad/Cards/run_card.dat index d087670827..cdcd77f36d 100644 --- a/epochX/cudacpp/gg_ttg.mad/Cards/run_card.dat +++ b/epochX/cudacpp/gg_ttg.mad/Cards/run_card.dat @@ -92,11 +92,11 @@ #********************************************************************* # Compilation flag. #********************************************************************* - -O3 -ffast-math -fbounds-check = global_flag ! build flags for all Fortran code (for a fair comparison to cudacpp; default is -O) + -O = global_flag ! fortran optimization flag use for the all code. --fast-math = aloha_flag ! fortran optimization flag for aloha function. Suggestions: '-ffast-math' -O3 = matrix_flag ! fortran optimization flag for matrix.f function. Suggestions: '-O3' - 32 = vector_size ! size of fortran arrays allocated in the multi-event API for SIMD/GPU (VECSIZE_MEMMAX) - 512 = nb_warp ! total number of warp/frontwave + 16 = vector_size ! size of fortran arrays allocated in the multi-event API for SIMD/GPU (VECSIZE_MEMMAX) + 1 = nb_warp ! total number of warp/frontwave #********************************************************************* # Customization (custom cuts/scale/bias/...) * @@ -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..1ac53bb4bd 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.3 \ No newline at end of file diff --git a/epochX/cudacpp/gg_ttg.mad/Source/.make_opts b/epochX/cudacpp/gg_ttg.mad/Source/.make_opts index de3864242b..56ba259c56 100644 --- a/epochX/cudacpp/gg_ttg.mad/Source/.make_opts +++ b/epochX/cudacpp/gg_ttg.mad/Source/.make_opts @@ -102,6 +102,7 @@ endif ifneq ($(lhapdf),) CXXFLAGS += $(shell $(lhapdf) --cppflags) alfas_functions=alfas_functions_lhapdf + alfas_to_clean=alfas_functions.o llhapdf+= $(shell $(lhapdf) --cflags --libs) -lLHAPDF # check if we need to activate c++11 (for lhapdf6.2) ifeq ($(origin CXX),default) @@ -113,10 +114,11 @@ ifneq ($(lhapdf),) endif else alfas_functions=alfas_functions + alfas_to_clean=alfas_functions_lhapdf.o llhapdf= endif # Helper function to check MG5 version define CHECK_MG5AMC_VERSION python -c 'import re; from distutils.version import StrictVersion; print StrictVersion("$(MG5AMC_VERSION)") >= StrictVersion("$(1)") if re.match("^[\d\.]+$$","$(MG5AMC_VERSION)") else True;' -endef \ No newline at end of file +endef 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..bdf427601f 100644 --- a/epochX/cudacpp/gg_ttg.mad/Source/make_opts +++ b/epochX/cudacpp/gg_ttg.mad/Source/make_opts @@ -1,12 +1,11 @@ DEFAULT_CPP_COMPILER=g++ -DEFAULT_F2PY_COMPILER=f2py3 -DEFAULT_F_COMPILER=gfortran -GLOBAL_FLAG=-O3 -ffast-math -fbounds-check MACFLAG= +STDLIB=-lstdc++ +STDLIB_FLAG= +DEFAULT_F2PY_COMPILER=f2py +DEFAULT_F_COMPILER=gfortran MG5AMC_VERSION=SpecifiedByMG5aMCAtRunTime PYTHIA8_PATH=NotInstalled -STDLIB_FLAG= -STDLIB=-lstdc++ #end_of_make_opts_variables BIASLIBDIR=../../../lib/ @@ -103,6 +102,7 @@ endif ifneq ($(lhapdf),) CXXFLAGS += $(shell $(lhapdf) --cppflags) alfas_functions=alfas_functions_lhapdf +alfas_to_clean=alfas_functions.o llhapdf+= $(shell $(lhapdf) --cflags --libs) -lLHAPDF # check if we need to activate c++11 (for lhapdf6.2) ifeq ($(origin CXX),default) @@ -114,6 +114,7 @@ endif endif else alfas_functions=alfas_functions +alfas_to_clean=alfas_functions_lhapdf.o llhapdf= endif diff --git a/epochX/cudacpp/gg_ttg.mad/Source/makefile b/epochX/cudacpp/gg_ttg.mad/Source/makefile index 291ca907ee..87a9e61723 100644 --- a/epochX/cudacpp/gg_ttg.mad/Source/makefile +++ b/epochX/cudacpp/gg_ttg.mad/Source/makefile @@ -37,10 +37,12 @@ all: $(LIBRARIES) $(LIBDIR)libdhelas.$(libext) $(LIBDIR)libpdf.$(libext) $(LIBDI $(LIBDIR)libdsample.$(libext): $(DSAMPLE) $(call CREATELIB, $@, $^) $(LIBDIR)libgeneric.$(libext): $(GENERIC) + rm -f $@ 2>/dev/null $(call CREATELIB, $@, $^) + rm -f $(alfas_to_clean) 2>/dev/null $(LIBDIR)libdhelas.$(libext): DHELAS cd DHELAS; make; cd .. -$(LIBDIR)libpdf.$(libext): PDF make_opts +$(LIBDIR)libpdf.$(libext): PDF $(alfas_functions).o cd PDF; make; cd .. ifneq (,$(filter edff chff, $(pdlabel1) $(pdlabel2))) $(LIBDIR)libgammaUPC.$(libext): PDF/gammaUPC @@ -73,6 +75,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/vector.inc b/epochX/cudacpp/gg_ttg.mad/Source/vector.inc index ba125272b6..9d8b377aa7 100644 --- a/epochX/cudacpp/gg_ttg.mad/Source/vector.inc +++ b/epochX/cudacpp/gg_ttg.mad/Source/vector.inc @@ -30,6 +30,8 @@ C INTEGER WARP_SIZE PARAMETER (WARP_SIZE=32) INTEGER NB_WARP - PARAMETER (NB_WARP=512) + PARAMETER (NB_WARP=1) INTEGER VECSIZE_MEMMAX - PARAMETER (VECSIZE_MEMMAX=16384) + PARAMETER (VECSIZE_MEMMAX=32) + + 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..1ac53bb4bd 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.3 \ 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/P1_gg_ttxg/CPPProcess.cc b/epochX/cudacpp/gg_ttg.mad/SubProcesses/P1_gg_ttxg/CPPProcess.cc index 5de1c626c8..ff1623c2dd 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -774,7 +774,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- 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..8692a8cc27 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.3, 2025-06-12 // 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..163076da52 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.3, 2025-06-12 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..bc9333bb5d 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.3, 2025-06-12 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.3, 2025-06-12 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 @@ -484,6 +488,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C Generate events only if IMODE is 0. IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN C Call UNWGT to unweight and store events + ICONFIG = CHANNELS(IVEC) CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) ENDIF diff --git a/epochX/cudacpp/gg_ttg.mad/SubProcesses/P1_gg_ttxg/driver.f b/epochX/cudacpp/gg_ttg.mad/SubProcesses/P1_gg_ttxg/driver.f index c2eadb2c31..10332b6238 100644 --- a/epochX/cudacpp/gg_ttg.mad/SubProcesses/P1_gg_ttxg/driver.f +++ b/epochX/cudacpp/gg_ttg.mad/SubProcesses/P1_gg_ttxg/driver.f @@ -489,7 +489,6 @@ subroutine open_file_local(lun,filename,fopened) fopened=.false. tempname=filename fine=index(tempname,' ') -c fine2=index(path,' ')-1 ! AV remove valgrind "Conditional jump or move depends on uninitialised value(s)" if(fine.eq.0) fine=len(tempname) open(unit=lun,file=tempname,status='old',ERR=20) fopened=.true. 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..850d121618 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.3, 2025-06-12 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.3, 2025-06-12 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,43 +410,32 @@ 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 C ---------- IF (FIRST) THEN FIRST=.FALSE. - IF(ZERO.NE.0D0) FK_ZERO = SIGN(MAX(ABS(ZERO), ABS(ZERO - $ *SMALL_WIDTH_TREATMENT)), ZERO) - IF(MDL_WT.NE.0D0) FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT - $ *SMALL_WIDTH_TREATMENT)), MDL_WT) + FK_ZERO = 0D0 + IF(MDL_WT.NE.0D0) THEN + FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT + $ *SMALL_WIDTH_TREATMENT)), MDL_WT) + ELSE + FK_MDL_WT = 0D0 + ENDIF + IF(INIT_MODE) THEN ZEROAMP_1(:,:) = .TRUE. @@ -549,10 +539,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 +553,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/addmothers.f b/epochX/cudacpp/gg_ttg.mad/SubProcesses/addmothers.f index 9a31ed201d..6f32477b9e 100644 --- a/epochX/cudacpp/gg_ttg.mad/SubProcesses/addmothers.f +++ b/epochX/cudacpp/gg_ttg.mad/SubProcesses/addmothers.f @@ -21,7 +21,7 @@ subroutine addmothers(ip,jpart,pb,isym,jsym,rscale,aqcd,aqed,buff, integer icol ! color selected integer isym(nexternal,99), jsym - integer i,j,k,ida(2),ns,nres,ires,icl,ito2,idenpart,nc,ic + integer i,j,k,ida(2),ns,nres,ires,icl,ito2,idenpart,ic integer mo_color,da_color(2),itmp integer ito(-nexternal+3:nexternal),iseed,maxcolor,maxorg integer icolalt(2,-nexternal+2:2*nexternal-3) @@ -113,14 +113,15 @@ subroutine addmothers(ip,jpart,pb,isym,jsym,rscale,aqcd,aqed,buff, endif lconfig = vec_igraph1(ivec) endif - + is_LC=.true. + maxcolor=0 c c Choose a color flow which is certain to work with the propagator c structure of the chosen diagram and use that as an alternative c if (icol.eq.0) then do i=1,nexternal - icolalt(1,i)=0 + icolalt(1,i)=0 icolalt(2,i)=0 enddo else diff --git a/epochX/cudacpp/gg_ttg.mad/SubProcesses/cluster.f b/epochX/cudacpp/gg_ttg.mad/SubProcesses/cluster.f index b8995283ed..907894ea89 100644 --- a/epochX/cudacpp/gg_ttg.mad/SubProcesses/cluster.f +++ b/epochX/cudacpp/gg_ttg.mad/SubProcesses/cluster.f @@ -556,6 +556,8 @@ logical function cluster(p, ivec) jwin = 0 cluster=.false. clustered=.false. + iwin =0 + jwin =0 do i=0,3 pcmsp(i)=0 enddo @@ -665,8 +667,11 @@ logical function cluster(p, ivec) c initialize graph storage igraphs(0)=0 nleft=nexternal -c cluster - if (iwin.eq.0.or.jwin.eq.0) stop 21 + if(iwin.eq.0.or.jwin.eq.0)then + cluster=.false. + return + endif +c cluster do n=1,nexternal-2 c combine winner imocl(n)=imap(iwin,2)+imap(jwin,2) diff --git a/epochX/cudacpp/gg_ttg.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_ttg.mad/SubProcesses/cudacpp.mk index 20d8ded718..20b8e6b858 100644 --- a/epochX/cudacpp/gg_ttg.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_ttg.mad/SubProcesses/cudacpp.mk @@ -114,7 +114,7 @@ export CXXFLAGS override CUDA_HOME = $(patsubst %/bin/nvcc,%,$(shell which nvcc 2>/dev/null)) # Set HIP_HOME from the path to hipcc, if it exists -override HIP_HOME = $(patsubst %/bin/hipcc,%,$(shell which hipcc 2>/dev/null)) +override HIP_HOME = $(shell hipconfig --rocmpath) # Configure CUDA_INC (for CURAND and NVTX) and NVTX if a CUDA installation exists (see #965) ifeq ($(CUDA_HOME),) @@ -229,6 +229,8 @@ ifeq ($(BACKEND),cuda) else ifeq ($(BACKEND),hip) + # example architecture values MI200:gfx90a, MI350X:gfx942 + MADGRAPH_HIP_ARCHITECTURE ?= gfx942 # Set GPUCC as $(HIP_HOME)/bin/hipcc (it was already checked above that this exists) GPUCC = $(HIP_HOME)/bin/hipcc XCOMPILERFLAG = @@ -243,7 +245,7 @@ else ifeq ($(BACKEND),hip) ###GPUFLAGS += -ggdb # FOR DEBUGGING ONLY # AMD HIP architecture flags - GPUARCHFLAGS = --offload-arch=gfx90a + GPUARCHFLAGS = --offload-arch=${MADGRAPH_HIP_ARCHITECTURE} GPUFLAGS += $(GPUARCHFLAGS) # Other AMD-specific flags @@ -878,7 +880,7 @@ endif $(gpu_fcheckmain): LIBFLAGS += $(GPULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH $(gpu_fcheckmain): $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBDIR)/lib$(MG5AMC_GPULIB).so $(gpu_objects_exe) ifneq ($(findstring hipcc,$(GPUCC)),) # link fortran/c++/hip using $FC when hipcc is used #802 - $(FC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) -lstdc++ -L$(shell cd -L $(shell dirname $(shell $(GPUCC) -print-prog-name=clang))/../..; pwd)/lib -lamdhip64 + $(FC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) -lstdc++ -L$(HIP_HOME)/lib -lamdhip64 else $(GPUCC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) endif @@ -979,7 +981,7 @@ else # link only runTest_$(GPUSUFFIX).o (new: in the past, this was linking both $(gpu_testmain): LIBFLAGS += $(GPULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH $(gpu_testmain): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(gpu_objects_lib) $(gpu_objects_exe) $(GTESTLIBS) ifneq ($(findstring hipcc,$(GPUCC)),) # link fortran/c++/hip using $FC when hipcc is used #802 - $(FC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lstdc++ -lpthread -L$(shell cd -L $(shell dirname $(shell $(GPUCC) -print-prog-name=clang))/../..; pwd)/lib -lamdhip64 + $(FC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lstdc++ -lpthread -L$(HIP_HOME)/lib -lamdhip64 else $(GPUCC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lcuda endif @@ -1104,10 +1106,20 @@ else @cat /proc/cpuinfo | grep "physical id" | sort -u endif @echo "" -ifneq ($(shell which nvidia-smi 2>/dev/null),) - nvidia-smi -L + # some systems may have -smi installed, but it fails to execute + # because it cannot communicate with the hardware + @if nvidia-smi &>/dev/null ; then \ + nvidia-smi -L ;\ + else \ + echo "No Nvidia GPU detected" ;\ + fi @echo "" -endif + @if amd-smi &>/dev/null ; then \ + amd-smi static -a ;\ + amd-smi list ;\ + else \ + echo "No AMD GPU detected" ;\ + fi @echo USECCACHE=$(USECCACHE) ifeq ($(USECCACHE),1) ccache --version | head -1 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/SubProcesses/proc_characteristics b/epochX/cudacpp/gg_ttg.mad/SubProcesses/proc_characteristics index c11ed5a292..4512afdd4f 100644 --- a/epochX/cudacpp/gg_ttg.mad/SubProcesses/proc_characteristics +++ b/epochX/cudacpp/gg_ttg.mad/SubProcesses/proc_characteristics @@ -8,7 +8,7 @@ ninitial = 2 grouped_matrix = True has_loops = False - bias_module = dummy + bias_module = None max_n_matched_jets = 1 colored_pdgs = [1, 2, 3, 4, 5, 6, 21] complex_mass_scheme = False diff --git a/epochX/cudacpp/gg_ttg.mad/SubProcesses/reweight.f b/epochX/cudacpp/gg_ttg.mad/SubProcesses/reweight.f index 0a0bafa7c1..189ba41449 100644 --- a/epochX/cudacpp/gg_ttg.mad/SubProcesses/reweight.f +++ b/epochX/cudacpp/gg_ttg.mad/SubProcesses/reweight.f @@ -1186,7 +1186,7 @@ logical function setclscales(p, keepq2bck, ivec) if(nexternal.gt.3) pt2ijcl(nexternal-3)=q2fact(2) else if(.not.fixed_fac_scale1) q2fact(1)=scalefact**2*pt2ijcl(nexternal-2) - if(.not.fixed_fac_scale2) q2fact(2)=scalefact**2*q2fact(1) + if(.not.fixed_fac_scale2) q2fact(2)=scalefact**2*pt2ijcl(nexternal-2) endif elseif(jcentral(1).eq.0)then if(.not.fixed_fac_scale1) q2fact(1) = scalefact**2*pt2ijcl(jfirst(1)) diff --git a/epochX/cudacpp/gg_ttg.mad/SubProcesses/symmetry.f b/epochX/cudacpp/gg_ttg.mad/SubProcesses/symmetry.f index 309540a0a2..2afd9e9f75 100644 --- a/epochX/cudacpp/gg_ttg.mad/SubProcesses/symmetry.f +++ b/epochX/cudacpp/gg_ttg.mad/SubProcesses/symmetry.f @@ -232,7 +232,7 @@ subroutine write_bash(mapconfig,use_config, prwidth, jcomp,iforest, c write(*,*) 'mapping',ic,mapconfig(i),icode if (icode .eq. 0) then c Create format string based on number of digits - write(formstr,'(a,i1,a)') '(I',nconf,'$)' + write(formstr,'(a,i1,a)') '(I',nconf,',$)' write(*,formstr) mapconfig(i) c Write symmetry factors write(formstr2,'(a,i2,a)') '(2i',nsym,')' @@ -242,10 +242,10 @@ subroutine write_bash(mapconfig,use_config, prwidth, jcomp,iforest, dconfig=mapconfig(i)+icode*1d0/10**ncode if(nconf+ncode+1.lt.10) then write(formstr,'(a,i1,a,i1,a)') '(F',nconf+ncode+1, - $ '.',ncode,'$)' + $ '.',ncode,',$)' else write(formstr,'(a,i2,a,i1,a)') '(F',nconf+ncode+1, - $ '.',ncode,'$)' + $ '.',ncode,',$)' endif write(*,formstr) dconfig c Write symmetry factors @@ -260,7 +260,7 @@ subroutine write_bash(mapconfig,use_config, prwidth, jcomp,iforest, dconfig=mapconfig(i)+icode*1d0/10**ncode write(27,formstr2) dconfig,use_config(i) endif - write(*,'(a$)') ' ' + write(*,'(a,$)') ' ' 100 call bw_increment_array(iarray,imax,ibase,done) enddo else diff --git a/epochX/cudacpp/gg_ttg.mad/SubProcesses/unwgt.f b/epochX/cudacpp/gg_ttg.mad/SubProcesses/unwgt.f index f602511c94..d1247f1849 100644 --- a/epochX/cudacpp/gg_ttg.mad/SubProcesses/unwgt.f +++ b/epochX/cudacpp/gg_ttg.mad/SubProcesses/unwgt.f @@ -497,6 +497,7 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) integer ip, np, ic, nc integer ida(2),ito(-nexternal+3:nexternal),ns,nres,ires,icloop integer iseed + double precision beam_mass double precision pboost(0:3) double precision beta, get_betaz double precision ebi(0:3), ebo(0:3) @@ -506,7 +507,7 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) integer idup(nexternal,maxproc,maxsproc) integer mothup(2,nexternal) integer icolup(2,nexternal,maxflow,maxsproc) - + double precision eta integer nsym integer ievent @@ -638,21 +639,20 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) if (nincoming.eq.2) then if (xbk(1) .gt. 0d0 .and. xbk(1) .le. 1d0 .and. $ xbk(2) .gt. 0d0 .and. xbk(2) .le. 1d0) then - if(lpp(2).ne.0.and.(xbk(1).eq.1d0.or.pmass(1).eq.0d0).and.xbk(2).ne.1d0) then - ! construct the beam momenta in each frame and compute the related (z)boost - if (pmass(1).eq.0d0.and.(abs(lpp(1)).eq.3.or.abs(lpp(1)).eq.4).and.ebeam(1).gt.10d0*m1)then - local_mass = 0d0 - else - local_mass = m1 - endif + if(lpp(2).ne.0.and.(xbk(1).eq.1d0.or.pmass(1).eq.0d0)) then + if((abs(lpp(1)).gt.2.and.abs(lpp(1)).ne.9).or.xbk(1).eq.1d0)then + beam_mass = pmass(1) + else + beam_mass = m1 + endif ebi(0) = p(0,1)/xbk(1) ! this assumes that particle 1 is massless or mass equal to beam ebi(1) = 0 ebi(2) = 0 - ebi(3) = DSQRT(ebi(0)**2-local_mass**2) + ebi(3) = DSQRT(ebi(0)**2-beam_mass**2) ebo(0) = ebeam(1) ebo(1) = 0 ebo(2) = 0 - ebo(3) = DSQRT(ebo(0)**2-local_mass**2) + ebo(3) = DSQRT(ebo(0)**2-beam_mass**2) beta = get_betaz(ebi, ebo) if (xbk(1).eq.1d0) then pb(0,isym(1,jsym)) = ebo(0) @@ -668,20 +668,19 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) enddo else - if (pmass(1).eq.0d0.and.(abs(lpp(1)).eq.3.or.abs(lpp(1)).eq.4.and.ebeam(2).gt.10d0*m2))then - local_mass = 0d0 - else - local_mass = m2 - endif - ebi(0) = p(0,1)/xbk(1) ! this assumes that particle 1 is massless or mass equal to beam + if((abs(lpp(2)).gt.2.and.abs(lpp(2)).ne.9).or.xbk(2).eq.1d0)then + beam_mass = pmass(2) + else + beam_mass = m2 + endif ebi(0) = p(0,2)/xbk(2) ! this assumes that particle 2 is massless or mass equal to beam ebi(1) = 0 ebi(2) = 0 - ebi(3) = -1d0*DSQRT(ebi(0)**2-local_mass**2) + ebi(3) = -1d0*DSQRT(ebi(0)**2-beam_mass**2) ebo(0) = ebeam(2) ebo(1) = 0 ebo(2) = 0 - ebo(3) = -1d0*DSQRT(ebo(0)**2-local_mass**2) + ebo(3) = -1d0*DSQRT(ebo(0)**2-beam_mass**2) beta = get_betaz(ebi, ebo) if (xbk(2).eq.1d0) then pb(0,isym(2,jsym)) = ebo(0) @@ -701,6 +700,21 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) write(*,*) 'Warning bad x1 or x2 in write_leshouche', $ xbk(1),xbk(2) endif + do j=1,nexternal + call zboost_with_beta(p(0,j),beta,pb(0,isym(j,jsym))) + pb(4,isym(j,jsym))=pmass(j) + enddo + + ! check for numerical_accuracy + if (pb(0,1).gt.ebeam(1).or.pb(0,2).gt.ebeam(2))then + ! go back to old method --more accurate when boosting with xbk close to one-- + eta = sqrt(xbk(1)*ebeam(1)/(xbk(2)*ebeam(2))) + pboost(0)=p(0,1)*(eta + 1d0/eta) + pboost(3)=p(0,1)*(eta - 1d0/eta) + do j=1,nexternal + call boostx(p(0,j),pboost,pb(0,isym(j,jsym))) + enddo + endif else do j=1,nexternal call boostx(p(0,j),pboost,pb(0,isym(j,jsym))) @@ -709,6 +723,8 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) enddo endif + + if (IMIRROR.eq.2.and.pmass(1).ne.pmass(2)) then c Note that in this context isym(1,jsym) should never be "2" since the mass differ pb(4,isym(1,jsym))=pmass(2) 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..2efb5954a6 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] @@ -1991,6 +1991,11 @@ def default_setup(self): self.add_param("PartonLevel:FSRinResonances", True, hidden=True, always_write_to_card=False, comment="Do not allow shower to run from decay product of unstable particle") self.add_param("ProcessLevel:resonanceDecays", True, hidden=True, always_write_to_card=False, comment="Do not allow unstable particle to decay.") + # Parameters only needed for main164 type of run (not pythia8/MG5 interface) + self.add_param("Main:HepMC", True, hidden=True, always_write_to_card=False, + comment="""Specify the type of output to be used by the main164 run. """) + self.add_param("HepMC:output", 'hepmc.gz', hidden=True, always_write_to_card=False, + comment="Specify the HepMC output file to be used by the main164 run.") # Add parameters controlling the subruns execution flow. # These parameters should not be part of PY8SubRun daughter. self.add_default_subruns('parameters') @@ -2087,8 +2092,10 @@ def MadGraphSet(self, name, value, **opts): force = False if name.lower() not in self or (force or name.lower() not in self.user_set): self.__setitem__(name, value, change_userdefine=False, **opts) - self.system_set.add(name.lower()) - + self.system_set.add(name.lower()) + else: + raise Exception("The parameter %s is already set to %s. You can not change it." % (name, self[name])) + def defaultSet(self, name, value, **opts): self.__setitem__(name, value, change_userdefine=False, **opts) @@ -2144,9 +2151,19 @@ def pythia8_formatting(value, formatv=None): else: return ','.join([PY8Card.pythia8_formatting(arg) for arg in value]) + #change of name convention between MG5 old interface and main164 from Pythia8 + interface_to_164 = {'HEPMCoutput:file': 'HepMC:output', + 'SysCalc:fullCutVariation': '!SysCalc:fullCutVariation (not supported with 164)', + 'SysCalc:qCutList': '!SysCalc:qCutList (not supported with 164)', + 'SysCalc:qWeed': '!SysCalc:qWeed (not supported with 164)', + 'SysCalc:tmsList': '!SysCalc:tmsList (not supported with 164)', + 'HEPMCoutput:scaling' : '!HEPMCoutput :scaling (not supported with 164)', + 'LHEFInputs:nSubruns' : 'Main:numberOfSubruns'} + def write(self, output_file, template, read_subrun=False, - print_only_visible=False, direct_pythia_input=False, add_missing=True): + print_only_visible=False, direct_pythia_input=False, add_missing=True, + use_mg5amc_py8_interface=False): """ Write the card to output_file using a specific template. > 'print_only_visible' specifies whether or not the hidden parameters should be written out if they are in the hidden_params_to_always_write @@ -2155,7 +2172,12 @@ def write(self, output_file, template, read_subrun=False, in the self.visible_params_to_always_write list and are not user_set or system_set are commented. > If 'add_missing' is False then parameters that should be written_out but are absent - from the template will not be written out.""" + from the template will not be written out. + > use_mg5amc_py8_interface is a flag to indicate that the MG5aMC-PY8 interface is used or not + if not used some parameters need to be translated from the old convention to the new one + """ + + self.use_mg5amc_py8_interface = use_mg5amc_py8_interface # First list the visible parameters visible_param = [p for p in self if p.lower() not in self.hidden_param @@ -2297,7 +2319,16 @@ def group_params(params): else: # Just copy parameters which don't need to be specified if param.lower() not in self.params_to_never_write: - output.write(line) + + if not use_mg5amc_py8_interface and direct_pythia_input and \ + param in self.interface_to_164: + param_entry = self.interface_to_164[param.strip()] + # special case for HepMC needs two flags + if 'HepMC:output' == param_entry: + output.write(' %s=%s\n'%('Main:HepMC', 'on')) + output.write('%s=%s\n'%(param_entry,new_value)) + else: + output.write(line) else: output.write('! The following parameter was forced to be commented out by MG5aMC.\n') output.write('! %s'%line) @@ -2313,6 +2344,7 @@ def group_params(params): if ((not direct_pythia_input) or (param.lower() in self.visible_params_to_always_write) or (param.lower() in self.user_set) or + (param.lower() in self.hidden_params_to_always_write) or (param.lower() in self.system_set)): template = '%s=%s' else: @@ -2321,6 +2353,19 @@ def group_params(params): # then they shouldn't be passed to Pythia template = '!%s=%s' + if not use_mg5amc_py8_interface and direct_pythia_input and \ + param in self.interface_to_164: + param_entry = self.interface_to_164[param] + # special case for HepMC needs two flags + if 'HepMC:output' == param_entry: + output.write(' %s=%s\n'%('Main:HepMC', 'on')) + if 'Main:InternalAnalysis'.lower() in self.user_set and \ + self['Main:InternalAnalysis'].lower() == 'on': + output.write('InternalAnalysis:output = ./djrs.dat\n') + + #elif param in self.interface_to_164.values() and not direct_pythia_input: + # misc.sprint(use_mg5amc_py8_interface, direct_pythia_input,param) + # raise Exception('The parameter %s is not supported in the MG5aMC-PY8 interface. Please use the new interface.'%param_entry output.write(template%(param_entry, value_entry.replace(value,new_value))) @@ -2365,6 +2410,8 @@ def group_params(params): comment = '\n'.join('! %s'%c for c in self.comments[param.lower()].split('\n')) output.write(comment+'\n') + if not use_mg5amc_py8_interface and param in self.interface_to_164: + continue output.write('%s=%s\n'%(param,PY8Card.pythia8_formatting(self[param]))) # Don't close the file if we were reading a subrun, but simply write @@ -3318,7 +3365,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 +3372,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 @@ -4050,8 +4095,8 @@ def post_set_fixed_fac_scale(card, value, change_userdefine, raiseerror, **opt): if 'fixed_fac_scale2' in card.user_set: card.user_set.remove('fixed_fac_scale2') - # #card['pdlabel1'] = value - # #card['pdlabel2'] = value + dict.__setitem__(card, 'fixed_fac_scale1', card['fixed_fac_scale']) + dict.__setitem__(card, 'fixed_fac_scale2', card['fixed_fac_scale']) @staticmethod def post_set(card, value, change_userdefine, raiseerror, name='unknown', **opt): @@ -4201,6 +4246,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 @@ -4451,11 +4497,11 @@ def check_validity(self): time.sleep(5) if self['drjj'] != 0: if 'drjj' in self.user_set: - logger.warning('Since icckw>0, changing the value of \'drjj\' to 0') + logger.warning('Since ickkw>0, changing the value of \'drjj\' to 0') self['drjj'] = 0 if self['drjl'] != 0: if 'drjl' in self.user_set: - logger.warning('Since icckw>0, changing the value of \'drjl\' to 0') + logger.warning('Since ickkw>0, changing the value of \'drjl\' to 0') self['drjl'] = 0 if not self['auto_ptj_mjj']: if self['mmjj'] > self['xqcut']: @@ -4753,7 +4799,6 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): self['fixed_fac_scale1'] = True self['nhel'] = 1 for i in beam_id_split[1]: - exit if abs(i) == 11: self['lpp1'] = -math.copysign(3,i) self['lpp2'] = math.copysign(3,i) @@ -5577,6 +5622,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 +5838,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/cluster.py b/epochX/cudacpp/gg_ttg.mad/bin/internal/cluster.py index 95ef45b5f3..66069293d2 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/cluster.py +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/cluster.py @@ -602,6 +602,7 @@ def __init__(self, *args, **opt): self.submitted = six.moves.queue.Queue() # one entry by job submitted self.stoprequest = threading.Event() #flag to ensure everything to close self.demons = [] + self.gpus_list = [] self.nb_done =0 if 'nb_core' in opt: self.nb_core = opt['nb_core'] @@ -623,23 +624,46 @@ def __init__(self, *args, **opt): self.done_pid_queue = six.moves.queue.Queue() self.fail_msg = None + mg5_gpu_env_str = 'MG5_GPU_VISIBLE_DEVICES' + gpu_variables = [['NVIDIA_VISIBLE_DEVICES', 'CUDA_VISIBLE_DEVICES'], + ['ROCR_VISIBLE_DEVICES', 'HIP_VISIBLE_DEVICES'],] + if mg5_gpu_env_str in os.environ: + new_var = os.environ[mg5_gpu_env_str].split(',') + if len(new_var) == 2: + gpu_variables.insert(0, new_var) + else: + logger.error('Invalid format for %s=%s, it should be a comma-separated list of two elements' % (mg5_gpu_env_str, os.environ[mg5_gpu_env_str])) + for get_var,set_var in gpu_variables: + if get_var in os.environ: + self.gpus_list = os.environ.get(get_var).split(',') + self.gpu_set_var = set_var + self.gpus_count = len(self.gpus_list) + logger.info('Found %s GPUs: %s' % (self.gpus_count, self.gpus_list)) def start_demon(self): import threading - t = threading.Thread(target=self.worker) + env2 = None + if len(self.gpus_list): + env2 = os.environ.copy() + this_gpu_idx = len(self.demons) % self.gpus_count + env2[self.gpu_set_var] = self.gpus_list[this_gpu_idx] + t = threading.Thread(target=self.worker, kwargs={'env2': env2}) + else: + t = threading.Thread(target=self.worker) t.daemon = True t.start() self.demons.append(t) - def worker(self): + def worker(self, env2=None): import six.moves.queue import six.moves._thread while not self.stoprequest.isSet(): try: args = self.queue.get(timeout=10) tag, exe, arg, opt = args + opt['env'] = env2 try: # check for executable case if isinstance(exe,str): 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..69291df0d4 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): @@ -1463,11 +1463,15 @@ def create_plot(self, mode='parton', event_path=None, output=None, tag=None): self.run_name, '%s_pts.dat' % tag) for observable_name, data_path in [('djr',djr_path), ('pt',pt_path)]: - if not self.generate_Pythia8_HwU_plots( + try: + if not self.generate_Pythia8_HwU_plots( PY8_plots_root_path, merging_scale_name, observable_name,data_path): - return False - + return False + except Exception as error: + if os.path.exists(data_path): + logger.info('plot information present in %s' % data_path) + return True if mode == 'Pythia8': plot_files = glob.glob(pjoin(PY8_plots_root_path,'*.gnuplot')) if not misc.which('gnuplot'): @@ -1964,12 +1968,16 @@ def do_systematics(self, line): self.cluster.wait(os.path.dirname(output), update_status, update_first=update_status) except Exception: self.cluster.remove() + for i in range(nb_submit): + os.remove('%s/tmp_%s_%s' %(os.path.dirname(output),i,os.path.basename(output))) old_run_mode = self.options['run_mode'] self.options['run_mode'] =0 + out =False try: out = self.do_systematics(line) finally: self.options['run_mode'] = old_run_mode + return out #collect the data all_cross = [] for i in range(nb_submit): @@ -1995,18 +2003,21 @@ def do_systematics(self, line): self.run_card['event_norm'] in ['unity']: all_cross= [cross/nb_event for cross in all_cross] - sys_obj = systematics.call_systematics([input, None] + opts, - log=lambda x: logger.info(str(x)), - result=result_file, - running=False - ) + + sys_obj = systematics.call_systematics([input, None] + opts, + log=lambda x: logger.info(str(x)), + result=result_file, + running=False + ) + sys_obj.print_cross_sections(all_cross, nb_event, result_file) - + #concatenate the output file subprocess.call(['cat']+\ ['./tmp_%s_%s' % (i, os.path.basename(output)) for i in range(nb_submit)], stdout=open(output,'w'), cwd=os.path.dirname(output)) + for i in range(nb_submit): os.remove('%s/tmp_%s_%s' %(os.path.dirname(output),i,os.path.basename(output))) # os.remove('%s/log_sys_%s.txt' % (os.path.dirname(output),i)) @@ -3831,7 +3842,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 +5146,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 +6751,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 +6775,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 +6826,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..6fbdd98100 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': @@ -1858,6 +1855,8 @@ def parse_histos_from_PY8_XML_stream(self, stream, run_id=None, # If merging cut is negative, then pick only the one of the central scale # If not specified, then take them all but use the PDF and scale weight # of the central merging_scale for the variation. + if not all_weights: + raise MadGraph5Error('No weights were found in the HwU XML source.') if merging_scale is None or merging_scale < 0.0: merging_scale_chosen = all_weights[2]['MERGING'] else: @@ -2480,14 +2479,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 +2738,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 +2877,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 +2889,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 +2898,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 +2907,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 +2916,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..b1739da73d 100644 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/launch_plugin.py +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/launch_plugin.py @@ -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: O. Mattelaer (Aug 2023) for the MG5aMC CUDACPP plugin. -# Further modified by: O. Mattelaer, A. Valassi (2024) for the MG5aMC CUDACPP plugin. +# Further modified by: O. Mattelaer, A. Valassi, Z. Wettersten (2024-2025) for the MG5aMC CUDACPP plugin. import logging import os @@ -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') @@ -133,7 +133,8 @@ def default_setup(self): super().default_setup() # change default value: self['cudacpp_backend'] = 'cuda' - self['vector_size'] = 16384 # already setup in default class (just change value) + self['vector_size'] = 32 # ZW: default to 32, might want to change to 64 to utilise AMD GPUs better as well # 16384 # already setup in default class (just change value) + self['nb_warp'] = 512 # number of warps per kernel call, for now setting to 16 384 / vector_size MEINTERFACE = CPPMEInterface RunCard = CPPRunCard 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..81d17f7cb1 100755 --- a/epochX/cudacpp/gg_ttg.mad/bin/internal/lhe_parser.py +++ b/epochX/cudacpp/gg_ttg.mad/bin/internal/lhe_parser.py @@ -1035,12 +1035,12 @@ def define_init_banner(self, wgt, lha_strategy, proc_charac=None): from_init = True if not from_init: - if group in grouped_cross: - grouped_cross[group] += self.allcross[i] - grouped_error[group] += self.error[i]**2 + if int(group) in grouped_cross: + grouped_cross[int(group)] += self.allcross[i] + grouped_error[int(group)] += self.error[i]**2 else: - grouped_cross[group] = self.allcross[i] - grouped_error[group] = self.error[i]**2 + grouped_cross[int(group)] = self.allcross[i] + grouped_error[int(group)] = self.error[i]**2 else: ban = banner_mod.Banner(ff.banner) for line in ban['init'].split('\n'): @@ -1048,11 +1048,11 @@ def define_init_banner(self, wgt, lha_strategy, proc_charac=None): if len(splitline)==4: cross, error, _, group = splitline if int(group) in grouped_cross: - grouped_cross[group] += float(cross) - grouped_error[group] += float(error)**2 + grouped_cross[int(group)] += float(cross) + grouped_error[int(group)] += float(error)**2 else: - grouped_cross[group] = float(cross) - grouped_error[group] = float(error)**2 + grouped_cross[int(group)] = float(cross) + grouped_error[int(group)] = float(error)**2 nb_group = len(grouped_cross) # compute the information for the first line @@ -1086,6 +1086,8 @@ def define_init_banner(self, wgt, lha_strategy, proc_charac=None): self.seek(0) if init_information["idbmup2"] in [0,9]: event = next(self) + if len(event) == 0: + event = Event(str(event)) init_information["idbmup2"] = event[1].pdg self.seek(0) @@ -2166,10 +2168,13 @@ def check(self): abspz += abs(particle.pz) # check mass fourmass = FourMomentum(particle).mass - - if particle.mass and (abs(particle.mass) - fourmass)/ abs(particle.mass) > threshold: - raise Exception( "Do not have correct mass lhe: %s momentum: %s (error at %s" % (particle.mass, fourmass, (abs(particle.mass) - fourmass)/ abs(particle.mass))) - + if particle.mass: + expected = (particle.E - math.sqrt(particle.E**2 -particle.mass**2))/particle.E + if expected > 1e-8: + mass_threshold = particle.E**2 - (particle.E-threshold)**2 + if (abs(particle.mass) - fourmass)/ mass_threshold > 5: + raise Exception( "Do not have correct mass lhe: %s momentum: %s (error at %s" % (particle.mass, fourmass, (abs(particle.mass) - fourmass)/ abs(particle.mass))) + if E/absE > threshold: logger.critical(self) @@ -2953,8 +2958,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..4d5597c722 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) @@ -2827,10 +2827,10 @@ def print_results_in_shell(self, data): logger.info(" Nb of events after matching/merging : %d" % int(data['nb_event_pythia'])) if self.run_card['use_syst'] in self.true and \ (int(self.run_card['ickkw'])==1 or self.run_card['ktdurham']>0.0 - or self.run_card['ptlund']>0.0): + or self.run_card['ptlund']>0.0) and data['cross_pythia'] == -1: logger.info(" Notice that because Systematics computation is turned on, the merging did not veto events but modified their weights instead.\n"+\ " The resulting hepmc/stdhep file should therefore be use with those weights.") - else: + elif data['cross_pythia'] == -1: logger.info(" Nb of events after merging : %s" % data['nb_event_pythia']) logger.info(" " ) @@ -3055,6 +3055,7 @@ def do_multi_run(self, line): crossoversig = 0 inv_sq_err = 0 nb_event = 0 + madspin = False for i in range(nb_run): self.nb_refine = 0 self.exec_cmd('generate_events %s_%s -f' % (main_name, i), postcmd=False) @@ -3067,6 +3068,8 @@ def do_multi_run(self, line): inv_sq_err+=1.0/error**2 self.results[main_name][-1]['cross'] = crossoversig/inv_sq_err self.results[main_name][-1]['error'] = math.sqrt(1.0/inv_sq_err) + if 'decayed' in self.run_name: + madspin = True self.results.def_current(main_name) self.run_name = main_name self.update_status("Merging LHE files", level='parton') @@ -3074,9 +3077,12 @@ def do_multi_run(self, line): os.mkdir(pjoin(self.me_dir,'Events', self.run_name)) except Exception: pass - os.system('%(bin)s/merge.pl %(event)s/%(name)s_*/unweighted_events.lhe.gz %(event)s/%(name)s/unweighted_events.lhe.gz %(event)s/%(name)s_banner.txt' + + os.system('%(bin)s/merge.pl %(event)s/%(name)s_*%(madspin)s/unweighted_events.lhe.gz %(event)s/%(name)s/unweighted_events.lhe.gz %(event)s/%(name)s_banner.txt' % {'bin': self.dirbin, 'event': pjoin(self.me_dir,'Events'), - 'name': self.run_name}) + 'name': self.run_name, + 'madspin': '_decayed_*' if madspin else '' + }) eradir = self.options['exrootanalysis_path'] if eradir and misc.is_executable(pjoin(eradir,'ExRootLHEFConverter')): @@ -3656,9 +3662,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'))) @@ -3757,6 +3765,8 @@ def split(a, n): k, m = divmod(len(a), n) return (a[i*k+min(i, m):(i+1)*k+min(i+1, m)] for i in range(n)) + Gdirs = self.remove_empty_events(Gdirs) + partials_info = [] if len(Gdirs) >= max_G: start_unweight= time.perf_counter() @@ -3786,7 +3796,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, @@ -4223,7 +4233,7 @@ def mg5amc_py8_interface_consistency_warning(options): return None - def setup_Pythia8RunAndCard(self, PY8_Card, run_type): + def setup_Pythia8RunAndCard(self, PY8_Card, run_type, use_mg5amc_py8_interface): """ Setup the Pythia8 Run environment and card. In particular all the process and run specific parameters of the card are automatically set here. This function returns the path where HEPMC events will be output, if any.""" @@ -4338,10 +4348,10 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): PY8_Card.systemSet('Beams:setProductionScalesFromLHEF',True) # Automatically set qWeed to xqcut if not defined by the user. - if PY8_Card['SysCalc:qWeed']==-1.0: + if use_mg5amc_py8_interface and PY8_Card['SysCalc:qWeed']==-1.0: PY8_Card.MadGraphSet('SysCalc:qWeed',self.run_card['xqcut'], force=True) - if PY8_Card['SysCalc:qCutList']=='auto': + if use_mg5amc_py8_interface and PY8_Card['SysCalc:qCutList']=='auto': if self.run_card['use_syst']: if self.run_card['sys_matchscale']=='auto': qcut = PY8_Card['JetMatching:qCut'] @@ -4368,7 +4378,7 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): # Specific MLM settings # PY8 should not implement the MLM veto since the driver should do it # if merging scale variation is turned on - if self.run_card['use_syst']: + if use_mg5amc_py8_interface and self.run_card['use_syst']: # We do no force it here, but it is clear that the user should know what # he's doing if he were to force it to True. PY8_Card.MadGraphSet('JetMatching:doVeto',False) @@ -4444,7 +4454,7 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): PY8_Card.MadGraphSet('SpaceShower:pTmaxMatch',1) PY8_Card.MadGraphSet('SpaceShower:rapidityOrder',False) # PY8 should not implement the CKKW veto since the driver should do it. - if self.run_card['use_syst']: + if use_mg5amc_py8_interface and self.run_card['use_syst']: # We do no force it here, but it is clear that the user should know what # he's doing if he were to force it to True. PY8_Card.MadGraphSet('Merging:applyVeto',False) @@ -4516,6 +4526,12 @@ def do_pythia8(self, line): else: no_default = False + if '--old_interface' in args: + use_mg5amc_py8_interface = True + args.remove('--old_interface') + else: + use_mg5amc_py8_interface = False + if not self.run_name: self.check_pythia8(args) self.configure_directory(html_opening =False) @@ -4545,20 +4561,27 @@ def do_pythia8(self, line): #"Please use 'event_norm = average' in the run_card to avoid this problem.") - - if not self.options['mg5amc_py8_interface_path'] or not \ - os.path.exists(pjoin(self.options['mg5amc_py8_interface_path'], - 'MG5aMC_PY8_interface')): - raise self.InvalidCmd( -"""The MG5aMC_PY8_interface tool cannot be found, so that MadEvent cannot steer Pythia8 shower. -Please install this tool with the following MG5_aMC command: - MG5_aMC> install mg5amc_py8_interface_path""") + if use_mg5amc_py8_interface: + if not self.options['mg5amc_py8_interface_path'] or not \ + os.path.exists(pjoin(self.options['mg5amc_py8_interface_path'], + 'MG5aMC_PY8_interface')): + raise self.InvalidCmd( + """The MG5aMC_PY8_interface tool cannot be found, so that MadEvent cannot steer Pythia8 shower. + Please install this tool with the following MG5_aMC command: + MG5_aMC> install mg5amc_py8_interface_path""") + else: + pythia_main = pjoin(self.options['mg5amc_py8_interface_path'], + 'MG5aMC_PY8_interface') + warnings = MadEventCmd.mg5amc_py8_interface_consistency_warning(self.options) + if warnings: + logger.warning(warnings) else: - pythia_main = pjoin(self.options['mg5amc_py8_interface_path'], - 'MG5aMC_PY8_interface') - warnings = MadEventCmd.mg5amc_py8_interface_consistency_warning(self.options) - if warnings: - logger.warning(warnings) + pythia_main = pjoin(self.options['pythia8_path'], 'share', 'Pythia8', 'examples', 'main164') + if not os.path.exists(pythia_main): + pythia_main = pjoin(self.options['pythia8_path'], 'examples', 'main164') + if not os.path.exists(pythia_main): + logger.warning('main164 not found (or not compiled). Will try the old interface instead.') + return self.do_pythia8(line + ' --old_interface') self.results.add_detail('run_mode', 'madevent') @@ -4583,14 +4606,19 @@ def do_pythia8(self, line): run_type = 'CKKW' # Edit the card and run environment according to the run specification - HepMC_event_output = self.setup_Pythia8RunAndCard(PY8_Card, run_type) + HepMC_event_output = self.setup_Pythia8RunAndCard(PY8_Card, run_type, use_mg5amc_py8_interface=use_mg5amc_py8_interface) + + if not use_mg5amc_py8_interface and self.options['run_mode']==0 or (self.options['run_mode']==2 and self.options['nb_core']==1): + PY8_Card['Main:numberOfEvents']= self.run_card['nevents'] + # Now write the card. pythia_cmd_card = pjoin(self.me_dir, 'Events', self.run_name , '%s_pythia8.cmd' % tag) cmd_card = StringIO.StringIO() PY8_Card.write(cmd_card,pjoin(self.me_dir,'Cards','pythia8_card_default.dat'), - direct_pythia_input=True) + direct_pythia_input=True, + use_mg5amc_py8_interface=use_mg5amc_py8_interface) # Now setup the preamble to make sure that everything will use the locally # installed tools (if present) even if the user did not add it to its @@ -4632,7 +4660,7 @@ def do_pythia8(self, line): " command '/usr/bin/env %s' exists and returns a valid path."%shell) exe_cmd = "#!%s\n%s"%(shell_exe,' '.join( - [preamble+pythia_main, + [preamble+pythia_main, '' if use_mg5amc_py8_interface else '-c', os.path.basename(pythia_cmd_card)])) wrapper.write(exe_cmd) @@ -4699,6 +4727,7 @@ def do_pythia8(self, line): n_cores = max(min(min_n_core,n_cores),1) if self.options['run_mode']==0 or (self.options['run_mode']==2 and self.options['nb_core']==1): + # No need for parallelization anymore self.cluster = None logger.info('Follow Pythia8 shower by running the '+ @@ -4744,20 +4773,22 @@ def do_pythia8(self, line): ParallelPY8Card.subruns[0].systemSet('Beams:LHEF','events.lhe.gz') ParallelPY8Card.write(pjoin(parallelization_dir,'PY8Card.dat'), pjoin(self.me_dir,'Cards','pythia8_card_default.dat'), - direct_pythia_input=True) + direct_pythia_input=True, + use_mg5amc_py8_interface=use_mg5amc_py8_interface) # Write the wrapper wrapper_path = pjoin(parallelization_dir,'run_PY8.sh') wrapper = open(wrapper_path,'w') if self.options['cluster_temp_path'] is None: exe_cmd = \ -"""#!%s -./%s PY8Card.dat >& PY8_log.txt -""" +"""#!%%s +./%%s %s PY8Card.dat >& PY8_log.txt +""" % ('' if use_mg5amc_py8_interface else '-c') + else: exe_cmd = \ -"""#!%s +"""#!%%s ln -s ./events_$1.lhe.gz ./events.lhe.gz -./%s PY8Card_$1.dat >& PY8_log.txt +./%%s %s PY8Card_$1.dat >& PY8_log.txt mkdir split_$1 if [ -f ./events.hepmc ]; then @@ -4776,7 +4807,7 @@ def do_pythia8(self, line): mv ./PY8_log.txt ./split_$1/ fi tar -czf split_$1.tar.gz split_$1 -""" +""" % ('' if use_mg5amc_py8_interface else '-c') exe_cmd = exe_cmd%(shell_exe,os.path.basename(pythia_main)) wrapper.write(exe_cmd) wrapper.close() @@ -4812,19 +4843,27 @@ def do_pythia8(self, line): pjoin(parallelization_dir,split_files[-1])) logger.info('Submitting Pythia8 jobs...') + for i, split_file in enumerate(split_files): # We must write a PY8Card tailored for each split so as to correct the normalization # HEPMCoutput:scaling of each weight since the lhe showered will not longer contain the # same original number of events - split_PY8_Card = banner_mod.PY8Card(pjoin(parallelization_dir,'PY8Card.dat')) + split_PY8_Card = banner_mod.PY8Card(pjoin(parallelization_dir,'PY8Card.dat'), setter='user') + assert split_PY8_Card['JetMatching:nJetMax'] == PY8_Card['JetMatching:nJetMax'] + + + # Make sure to sure the number of split_events determined during the splitting. - split_PY8_Card.systemSet('Main:numberOfEvents',partition_for_PY8[i]) + split_PY8_Card.systemSet('Main:numberOfEvents',partition_for_PY8[i], force=True) + assert split_PY8_Card['Main:numberOfEvents'] == partition_for_PY8[i] split_PY8_Card.systemSet('HEPMCoutput:scaling',split_PY8_Card['HEPMCoutput:scaling']* - (float(partition_for_PY8[i]))) + (float(partition_for_PY8[i])), force=True) # Add_missing set to False so as to be sure not to add any additional parameter w.r.t # the ones in the original PY8 param_card copied. split_PY8_Card.write(pjoin(parallelization_dir,'PY8Card_%d.dat'%i), - pjoin(parallelization_dir,'PY8Card.dat'), add_missing=False) + pjoin(parallelization_dir,'PY8Card.dat'), add_missing=False, + direct_pythia_input=True, + use_mg5amc_py8_interface=use_mg5amc_py8_interface) in_files = [pjoin(parallelization_dir,os.path.basename(pythia_main)), pjoin(parallelization_dir,'PY8Card_%d.dat'%i), pjoin(parallelization_dir,split_file)] @@ -5073,7 +5112,7 @@ def wait_monitoring(Idle, Running, Done): # works both for fixed number of generated events and fixed accepted events self.results.add_detail('error_pythia', error_m) - if self.run_card['use_syst']: + if self.run_card['use_syst'] and use_mg5amc_py8_interface: self.results.add_detail('cross_pythia', -1) self.results.add_detail('error_pythia', 0) @@ -6132,7 +6171,102 @@ def get_Gdir(self, Pdir=None, symfact=None): mfactors[pjoin(P, "G%s" % tag)] = mfactor self.Gdirs = (Gdirs, mfactors) return self.get_Gdir(Pdir, symfact=symfact) + + ############################################################################ + def remove_empty_events(self, Gdir): + """return Gdir strip from the one providing empty events.lhe files.""" + + reasons = collections.defaultdict(list) + Gdirs = Gdir[:] + for G in Gdirs[:]: + try: + size = os.path.getsize(pjoin(G, 'events.lhe')) + except Exception as error: + size = 0 + if size <10: + Gdirs.remove(G) + try: + log = misc.BackRead(pjoin(G, 'log.txt')) + except Exception as error: + log = misc.BackRead(pjoin(G, 'run1_app.log')) + found = -1 + for line in log: + if 'Deleting file events.lhe' in line: + found = 0 + elif "Impossible BW configuration" in line: + reasons['bwconfig'].append(G) + break + elif found < -150: + reasons['not found'].append(G) + Gdirs.append(G) + break + elif found < 0: + found -= 1 + elif 'Loosen cuts or increase max_events' in line: + reasons['cuts'].append(G) + break + elif 'all returned zero' in line: + reasons['zero'].append(G) + break + elif found > 5: + reasons['unknown'].append(G) + break + else: + found += 1 + + if len(reasons): + logger.debug('Reasons for empty events.lhe:') + if len(reasons['unknown']): + logger.debug(' - unknown: %s' % len(reasons['unknown'])) + logger.log(10, ' DETAIL:' + ','.join(['/'.join(G.rsplit(os.sep)[-2:]) for G in reasons['unknown'][:10]])) + if len(reasons['not found']): + logger.debug(' - not found in log: %s' % len(reasons['not found'])) + logger.log(10, ' DETAIL:' + ','.join(['/'.join(G.rsplit(os.sep)[-2:]) for G in reasons['not found'][:10]])) + if len(reasons['zero']): + logger.debug(' - zero amplitudes: %s' % len(reasons['zero'])) + logger.log(10, ' DETAIL:' + ','.join(['/'.join(G.rsplit( os.sep)[-2:]) for G in reasons['zero'][:10]])) + if len(reasons['bwconfig']): + critical_bwconfig = set() + for G in reasons['bwconfig']: + base = G.rsplit('.',1)[0] + if any(G2.startswith(base) for G2 in Gdirs): + continue + else: + critical_bwconfig.add(os.sep.join(base.rsplit(os.sep)[-2:])) + for G in critical_bwconfig: + logger.warning('Gdirectory %s has no events.lhe file. (no BW config found %s times)' % G) + + logger.debug(' - impossible BW configuration: %s' % len(reasons['bwconfig'])) + logger.debug(' - channel with no possible BW configuration: %s' % len(critical_bwconfig)) + + if len(reasons['cuts']): + critical_nb_cuts = collections.defaultdict(int) + for G in reasons['cuts']: + if '.' in os.path.basename(G): + base = G.rsplit('.',1)[0] + if any(G2.startswith(base) for G2 in Gdirs): + continue + else: + critical_nb_cuts[os.sep.join(base.rsplit(os.sep)[-2:])] += 1 + else: + critical_nb_cuts[''] += 1 + logger.warning('Gdirectory %s has no events.lhe file. (no points passed cuts found)' % G) + for G, nb in critical_nb_cuts.items(): + if not G: + continue + else: + logger.warning('%s channel %s.XXX has no events.lhe file. (no points passed cuts). No %s with events detected' % (nb, G, G)) + logger.debug(' - no points passed cuts: %s' % len(reasons['cuts'])) + logger.log(10, ' DETAIL:' + ','.join(['/'.join(G.rsplit(os.sep)[-2:]) for G in reasons['cuts'][:10]])) + logger.debug(' - without any BW handling (critical): %s' % critical_nb_cuts['']) + logger.debug(' - with BW but all zero (critical): %s' % sum([nb for v, nb in critical_nb_cuts.items() if v!=''], 0)) + #logger.debug(' - cuts (with BW conflict where other channel contributes): %s' % (len(reasons['cuts'])- critical_nb_cuts)) + + + return Gdirs + + ############################################################################ def set_run_name(self, name, tag=None, level='parton', reload_card=False, allow_new_tag=True): @@ -6749,7 +6883,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 +6893,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 +7010,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 +7038,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 +7053,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 +7065,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 +7190,13 @@ 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) 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 +7210,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..3eef114424 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.3, 2025-06-12 // 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..1f9fb6d469 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.3, 2025-06-12 // 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..505c8839b3 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_ttg.mad/test/cudacpp_test.mk b/epochX/cudacpp/gg_ttg.mad/test/cudacpp_test.mk index f703a1ae7c..4934c9a53f 100644 --- a/epochX/cudacpp/gg_ttg.mad/test/cudacpp_test.mk +++ b/epochX/cudacpp/gg_ttg.mad/test/cudacpp_test.mk @@ -19,7 +19,7 @@ CXXFLAGS += -Igoogletest/googletest/include/ -std=c++11 all: googletest/$(INSTALLDIR)/lib64/libgtest.a googletest/CMakeLists.txt: - git clone https://github.com/google/googletest.git -b release-1.11.0 googletest + git clone https://github.com/google/googletest.git -b v1.17.0 googletest googletest/$(BUILDDIR)/Makefile: googletest/CMakeLists.txt mkdir -p googletest/$(BUILDDIR) 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/P1_Sigma_sm_gg_ttxg/CPPProcess.cc b/epochX/cudacpp/gg_ttg.sa/SubProcesses/P1_Sigma_sm_gg_ttxg/CPPProcess.cc index bf77ac9970..e87ab34c88 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -768,7 +768,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- 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..8692a8cc27 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.3, 2025-06-12 // 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/cudacpp.mk b/epochX/cudacpp/gg_ttg.sa/SubProcesses/cudacpp.mk index 20d8ded718..20b8e6b858 100644 --- a/epochX/cudacpp/gg_ttg.sa/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_ttg.sa/SubProcesses/cudacpp.mk @@ -114,7 +114,7 @@ export CXXFLAGS override CUDA_HOME = $(patsubst %/bin/nvcc,%,$(shell which nvcc 2>/dev/null)) # Set HIP_HOME from the path to hipcc, if it exists -override HIP_HOME = $(patsubst %/bin/hipcc,%,$(shell which hipcc 2>/dev/null)) +override HIP_HOME = $(shell hipconfig --rocmpath) # Configure CUDA_INC (for CURAND and NVTX) and NVTX if a CUDA installation exists (see #965) ifeq ($(CUDA_HOME),) @@ -229,6 +229,8 @@ ifeq ($(BACKEND),cuda) else ifeq ($(BACKEND),hip) + # example architecture values MI200:gfx90a, MI350X:gfx942 + MADGRAPH_HIP_ARCHITECTURE ?= gfx942 # Set GPUCC as $(HIP_HOME)/bin/hipcc (it was already checked above that this exists) GPUCC = $(HIP_HOME)/bin/hipcc XCOMPILERFLAG = @@ -243,7 +245,7 @@ else ifeq ($(BACKEND),hip) ###GPUFLAGS += -ggdb # FOR DEBUGGING ONLY # AMD HIP architecture flags - GPUARCHFLAGS = --offload-arch=gfx90a + GPUARCHFLAGS = --offload-arch=${MADGRAPH_HIP_ARCHITECTURE} GPUFLAGS += $(GPUARCHFLAGS) # Other AMD-specific flags @@ -878,7 +880,7 @@ endif $(gpu_fcheckmain): LIBFLAGS += $(GPULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH $(gpu_fcheckmain): $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBDIR)/lib$(MG5AMC_GPULIB).so $(gpu_objects_exe) ifneq ($(findstring hipcc,$(GPUCC)),) # link fortran/c++/hip using $FC when hipcc is used #802 - $(FC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) -lstdc++ -L$(shell cd -L $(shell dirname $(shell $(GPUCC) -print-prog-name=clang))/../..; pwd)/lib -lamdhip64 + $(FC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) -lstdc++ -L$(HIP_HOME)/lib -lamdhip64 else $(GPUCC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) endif @@ -979,7 +981,7 @@ else # link only runTest_$(GPUSUFFIX).o (new: in the past, this was linking both $(gpu_testmain): LIBFLAGS += $(GPULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH $(gpu_testmain): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(gpu_objects_lib) $(gpu_objects_exe) $(GTESTLIBS) ifneq ($(findstring hipcc,$(GPUCC)),) # link fortran/c++/hip using $FC when hipcc is used #802 - $(FC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lstdc++ -lpthread -L$(shell cd -L $(shell dirname $(shell $(GPUCC) -print-prog-name=clang))/../..; pwd)/lib -lamdhip64 + $(FC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lstdc++ -lpthread -L$(HIP_HOME)/lib -lamdhip64 else $(GPUCC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lcuda endif @@ -1104,10 +1106,20 @@ else @cat /proc/cpuinfo | grep "physical id" | sort -u endif @echo "" -ifneq ($(shell which nvidia-smi 2>/dev/null),) - nvidia-smi -L + # some systems may have -smi installed, but it fails to execute + # because it cannot communicate with the hardware + @if nvidia-smi &>/dev/null ; then \ + nvidia-smi -L ;\ + else \ + echo "No Nvidia GPU detected" ;\ + fi @echo "" -endif + @if amd-smi &>/dev/null ; then \ + amd-smi static -a ;\ + amd-smi list ;\ + else \ + echo "No AMD GPU detected" ;\ + fi @echo USECCACHE=$(USECCACHE) ifeq ($(USECCACHE),1) ccache --version | head -1 diff --git a/epochX/cudacpp/gg_ttg.sa/src/HelAmps_sm.h b/epochX/cudacpp/gg_ttg.sa/src/HelAmps_sm.h index ff9f0d7f00..3eef114424 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.3, 2025-06-12 // 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..1f9fb6d469 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.3, 2025-06-12 // 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..505c8839b3 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_ttg.sa/test/cudacpp_test.mk b/epochX/cudacpp/gg_ttg.sa/test/cudacpp_test.mk index f703a1ae7c..4934c9a53f 100644 --- a/epochX/cudacpp/gg_ttg.sa/test/cudacpp_test.mk +++ b/epochX/cudacpp/gg_ttg.sa/test/cudacpp_test.mk @@ -19,7 +19,7 @@ CXXFLAGS += -Igoogletest/googletest/include/ -std=c++11 all: googletest/$(INSTALLDIR)/lib64/libgtest.a googletest/CMakeLists.txt: - git clone https://github.com/google/googletest.git -b release-1.11.0 googletest + git clone https://github.com/google/googletest.git -b v1.17.0 googletest googletest/$(BUILDDIR)/Makefile: googletest/CMakeLists.txt mkdir -p googletest/$(BUILDDIR) diff --git a/epochX/cudacpp/gg_ttgg.mad/Cards/ident_card.dat b/epochX/cudacpp/gg_ttgg.mad/Cards/ident_card.dat index 0ba87b008f..b37758a42a 100644 --- a/epochX/cudacpp/gg_ttgg.mad/Cards/ident_card.dat +++ b/epochX/cudacpp/gg_ttgg.mad/Cards/ident_card.dat @@ -2,32 +2,32 @@ ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c written by the UFO converter ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc +mass 5 mdl_MB +mass 6 mdl_MT +mass 15 mdl_MTA +mass 23 mdl_MZ +mass 25 mdl_MH +sminputs 1 aEWM1 +sminputs 2 mdl_Gf +sminputs 3 aS +yukawa 5 mdl_ymb +yukawa 6 mdl_ymt +yukawa 15 mdl_ymtau - - +decay 6 mdl_WT decay 23 mdl_WZ + decay 24 mdl_WW + decay 25 mdl_WH -decay 6 mdl_WT -mass 15 mdl_MTA -mass 23 mdl_MZ -mass 25 mdl_MH -mass 5 mdl_MB -mass 6 mdl_MT -sminputs 1 aEWM1 -sminputs 2 mdl_Gf -sminputs 3 aS -yukawa 15 mdl_ymtau -yukawa 5 mdl_ymb -yukawa 6 mdl_ymt diff --git a/epochX/cudacpp/gg_ttgg.mad/Cards/me5_configuration.txt b/epochX/cudacpp/gg_ttgg.mad/Cards/me5_configuration.txt index 68b4c46295..fa8d3481a2 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 = /home/dmass/Development/madgraph4gpu/amd-ci/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo +mg5_path = /home/dmass/Development/madgraph4gpu/amd-ci/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..8cf90cd59b 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.3 2025-06-12 * #* * #* WARNING: UNKNOWN DEVELOPMENT VERSION. * #* WARNING: DO NOT USE FOR PRODUCTION * @@ -35,15 +35,17 @@ set loop_color_flows False set max_npoint_for_channel 0 set default_unset_couplings 99 set max_t_for_channel 99 +set zerowidth_tchannel True set nlo_mixed_expansion True -set stdout_level DEBUG -set zerowidth_tchannel F -generate g g > t t~ g g +import model sm define p = g u c d s u~ c~ d~ s~ define j = g u c d s u~ c~ d~ s~ define l+ = e+ mu+ define l- = e- mu- define vl = ve vm vt define vl~ = ve~ vm~ vt~ -output madevent_simd ../TMPOUT/CODEGEN_mad_gg_ttgg --hel_recycling=Fal\ -se --vector_size=32 +set stdout_level DEBUG +set zerowidth_tchannel F +generate g g > t t~ g g +output madevent_simd gg_ttgg.mad_gen --hel_recycling=False --vector_si\ +ze=32 diff --git a/epochX/cudacpp/gg_ttgg.mad/Cards/run_card.dat b/epochX/cudacpp/gg_ttgg.mad/Cards/run_card.dat index ecdc7fd25c..308f5bed4f 100644 --- a/epochX/cudacpp/gg_ttgg.mad/Cards/run_card.dat +++ b/epochX/cudacpp/gg_ttgg.mad/Cards/run_card.dat @@ -92,11 +92,11 @@ #********************************************************************* # Compilation flag. #********************************************************************* - -O3 -ffast-math -fbounds-check = global_flag ! build flags for all Fortran code (for a fair comparison to cudacpp; default is -O) + -O = global_flag ! fortran optimization flag use for the all code. --fast-math = aloha_flag ! fortran optimization flag for aloha function. Suggestions: '-ffast-math' -O3 = matrix_flag ! fortran optimization flag for matrix.f function. Suggestions: '-O3' - 32 = vector_size ! size of fortran arrays allocated in the multi-event API for SIMD/GPU (VECSIZE_MEMMAX) - 512 = nb_warp ! total number of warp/frontwave + 16 = vector_size ! size of fortran arrays allocated in the multi-event API for SIMD/GPU (VECSIZE_MEMMAX) + 1 = nb_warp ! total number of warp/frontwave #********************************************************************* # Customization (custom cuts/scale/bias/...) * @@ -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..1ac53bb4bd 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.3 \ No newline at end of file diff --git a/epochX/cudacpp/gg_ttgg.mad/Source/.make_opts b/epochX/cudacpp/gg_ttgg.mad/Source/.make_opts index de3864242b..56ba259c56 100644 --- a/epochX/cudacpp/gg_ttgg.mad/Source/.make_opts +++ b/epochX/cudacpp/gg_ttgg.mad/Source/.make_opts @@ -102,6 +102,7 @@ endif ifneq ($(lhapdf),) CXXFLAGS += $(shell $(lhapdf) --cppflags) alfas_functions=alfas_functions_lhapdf + alfas_to_clean=alfas_functions.o llhapdf+= $(shell $(lhapdf) --cflags --libs) -lLHAPDF # check if we need to activate c++11 (for lhapdf6.2) ifeq ($(origin CXX),default) @@ -113,10 +114,11 @@ ifneq ($(lhapdf),) endif else alfas_functions=alfas_functions + alfas_to_clean=alfas_functions_lhapdf.o llhapdf= endif # Helper function to check MG5 version define CHECK_MG5AMC_VERSION python -c 'import re; from distutils.version import StrictVersion; print StrictVersion("$(MG5AMC_VERSION)") >= StrictVersion("$(1)") if re.match("^[\d\.]+$$","$(MG5AMC_VERSION)") else True;' -endef \ No newline at end of file +endef 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..bdf427601f 100644 --- a/epochX/cudacpp/gg_ttgg.mad/Source/make_opts +++ b/epochX/cudacpp/gg_ttgg.mad/Source/make_opts @@ -1,12 +1,11 @@ DEFAULT_CPP_COMPILER=g++ -DEFAULT_F2PY_COMPILER=f2py3 -DEFAULT_F_COMPILER=gfortran -GLOBAL_FLAG=-O3 -ffast-math -fbounds-check MACFLAG= +STDLIB=-lstdc++ +STDLIB_FLAG= +DEFAULT_F2PY_COMPILER=f2py +DEFAULT_F_COMPILER=gfortran MG5AMC_VERSION=SpecifiedByMG5aMCAtRunTime PYTHIA8_PATH=NotInstalled -STDLIB_FLAG= -STDLIB=-lstdc++ #end_of_make_opts_variables BIASLIBDIR=../../../lib/ @@ -103,6 +102,7 @@ endif ifneq ($(lhapdf),) CXXFLAGS += $(shell $(lhapdf) --cppflags) alfas_functions=alfas_functions_lhapdf +alfas_to_clean=alfas_functions.o llhapdf+= $(shell $(lhapdf) --cflags --libs) -lLHAPDF # check if we need to activate c++11 (for lhapdf6.2) ifeq ($(origin CXX),default) @@ -114,6 +114,7 @@ endif endif else alfas_functions=alfas_functions +alfas_to_clean=alfas_functions_lhapdf.o llhapdf= endif diff --git a/epochX/cudacpp/gg_ttgg.mad/Source/makefile b/epochX/cudacpp/gg_ttgg.mad/Source/makefile index 291ca907ee..87a9e61723 100644 --- a/epochX/cudacpp/gg_ttgg.mad/Source/makefile +++ b/epochX/cudacpp/gg_ttgg.mad/Source/makefile @@ -37,10 +37,12 @@ all: $(LIBRARIES) $(LIBDIR)libdhelas.$(libext) $(LIBDIR)libpdf.$(libext) $(LIBDI $(LIBDIR)libdsample.$(libext): $(DSAMPLE) $(call CREATELIB, $@, $^) $(LIBDIR)libgeneric.$(libext): $(GENERIC) + rm -f $@ 2>/dev/null $(call CREATELIB, $@, $^) + rm -f $(alfas_to_clean) 2>/dev/null $(LIBDIR)libdhelas.$(libext): DHELAS cd DHELAS; make; cd .. -$(LIBDIR)libpdf.$(libext): PDF make_opts +$(LIBDIR)libpdf.$(libext): PDF $(alfas_functions).o cd PDF; make; cd .. ifneq (,$(filter edff chff, $(pdlabel1) $(pdlabel2))) $(LIBDIR)libgammaUPC.$(libext): PDF/gammaUPC @@ -73,6 +75,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/vector.inc b/epochX/cudacpp/gg_ttgg.mad/Source/vector.inc index ba125272b6..9d8b377aa7 100644 --- a/epochX/cudacpp/gg_ttgg.mad/Source/vector.inc +++ b/epochX/cudacpp/gg_ttgg.mad/Source/vector.inc @@ -30,6 +30,8 @@ C INTEGER WARP_SIZE PARAMETER (WARP_SIZE=32) INTEGER NB_WARP - PARAMETER (NB_WARP=512) + PARAMETER (NB_WARP=1) INTEGER VECSIZE_MEMMAX - PARAMETER (VECSIZE_MEMMAX=16384) + PARAMETER (VECSIZE_MEMMAX=32) + + 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..1ac53bb4bd 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.3 \ 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/P1_gg_ttxgg/CPPProcess.cc b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg/CPPProcess.cc index c508e73f26..8f92626e95 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -2718,7 +2718,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- 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..8349a04f71 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.3, 2025-06-12 // 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..a2dfd42919 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.3, 2025-06-12 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..2d8197d859 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.3, 2025-06-12 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.3, 2025-06-12 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 @@ -484,6 +488,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C Generate events only if IMODE is 0. IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN C Call UNWGT to unweight and store events + ICONFIG = CHANNELS(IVEC) CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) ENDIF diff --git a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg/driver.f b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg/driver.f index f7f23196eb..fc9392238e 100644 --- a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg/driver.f +++ b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg/driver.f @@ -489,7 +489,6 @@ subroutine open_file_local(lun,filename,fopened) fopened=.false. tempname=filename fine=index(tempname,' ') -c fine2=index(path,' ')-1 ! AV remove valgrind "Conditional jump or move depends on uninitialised value(s)" if(fine.eq.0) fine=len(tempname) open(unit=lun,file=tempname,status='old',ERR=20) fopened=.true. 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..7b6fa85360 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.3, 2025-06-12 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.3, 2025-06-12 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,407 +442,81 @@ 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 C ---------- IF (FIRST) THEN FIRST=.FALSE. - IF(ZERO.NE.0D0) FK_ZERO = SIGN(MAX(ABS(ZERO), ABS(ZERO - $ *SMALL_WIDTH_TREATMENT)), ZERO) - IF(MDL_WT.NE.0D0) FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT - $ *SMALL_WIDTH_TREATMENT)), MDL_WT) + FK_ZERO = 0D0 + IF(MDL_WT.NE.0D0) THEN + FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT + $ *SMALL_WIDTH_TREATMENT)), MDL_WT) + ELSE + FK_MDL_WT = 0D0 + ENDIF + IF(INIT_MODE) THEN ZEROAMP_1(:,:) = .TRUE. @@ -1547,10 +1222,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 +1236,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/addmothers.f b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/addmothers.f index 9a31ed201d..6f32477b9e 100644 --- a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/addmothers.f +++ b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/addmothers.f @@ -21,7 +21,7 @@ subroutine addmothers(ip,jpart,pb,isym,jsym,rscale,aqcd,aqed,buff, integer icol ! color selected integer isym(nexternal,99), jsym - integer i,j,k,ida(2),ns,nres,ires,icl,ito2,idenpart,nc,ic + integer i,j,k,ida(2),ns,nres,ires,icl,ito2,idenpart,ic integer mo_color,da_color(2),itmp integer ito(-nexternal+3:nexternal),iseed,maxcolor,maxorg integer icolalt(2,-nexternal+2:2*nexternal-3) @@ -113,14 +113,15 @@ subroutine addmothers(ip,jpart,pb,isym,jsym,rscale,aqcd,aqed,buff, endif lconfig = vec_igraph1(ivec) endif - + is_LC=.true. + maxcolor=0 c c Choose a color flow which is certain to work with the propagator c structure of the chosen diagram and use that as an alternative c if (icol.eq.0) then do i=1,nexternal - icolalt(1,i)=0 + icolalt(1,i)=0 icolalt(2,i)=0 enddo else diff --git a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/cluster.f b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/cluster.f index b8995283ed..907894ea89 100644 --- a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/cluster.f +++ b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/cluster.f @@ -556,6 +556,8 @@ logical function cluster(p, ivec) jwin = 0 cluster=.false. clustered=.false. + iwin =0 + jwin =0 do i=0,3 pcmsp(i)=0 enddo @@ -665,8 +667,11 @@ logical function cluster(p, ivec) c initialize graph storage igraphs(0)=0 nleft=nexternal -c cluster - if (iwin.eq.0.or.jwin.eq.0) stop 21 + if(iwin.eq.0.or.jwin.eq.0)then + cluster=.false. + return + endif +c cluster do n=1,nexternal-2 c combine winner imocl(n)=imap(iwin,2)+imap(jwin,2) diff --git a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/cudacpp.mk index 20d8ded718..20b8e6b858 100644 --- a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/cudacpp.mk @@ -114,7 +114,7 @@ export CXXFLAGS override CUDA_HOME = $(patsubst %/bin/nvcc,%,$(shell which nvcc 2>/dev/null)) # Set HIP_HOME from the path to hipcc, if it exists -override HIP_HOME = $(patsubst %/bin/hipcc,%,$(shell which hipcc 2>/dev/null)) +override HIP_HOME = $(shell hipconfig --rocmpath) # Configure CUDA_INC (for CURAND and NVTX) and NVTX if a CUDA installation exists (see #965) ifeq ($(CUDA_HOME),) @@ -229,6 +229,8 @@ ifeq ($(BACKEND),cuda) else ifeq ($(BACKEND),hip) + # example architecture values MI200:gfx90a, MI350X:gfx942 + MADGRAPH_HIP_ARCHITECTURE ?= gfx942 # Set GPUCC as $(HIP_HOME)/bin/hipcc (it was already checked above that this exists) GPUCC = $(HIP_HOME)/bin/hipcc XCOMPILERFLAG = @@ -243,7 +245,7 @@ else ifeq ($(BACKEND),hip) ###GPUFLAGS += -ggdb # FOR DEBUGGING ONLY # AMD HIP architecture flags - GPUARCHFLAGS = --offload-arch=gfx90a + GPUARCHFLAGS = --offload-arch=${MADGRAPH_HIP_ARCHITECTURE} GPUFLAGS += $(GPUARCHFLAGS) # Other AMD-specific flags @@ -878,7 +880,7 @@ endif $(gpu_fcheckmain): LIBFLAGS += $(GPULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH $(gpu_fcheckmain): $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBDIR)/lib$(MG5AMC_GPULIB).so $(gpu_objects_exe) ifneq ($(findstring hipcc,$(GPUCC)),) # link fortran/c++/hip using $FC when hipcc is used #802 - $(FC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) -lstdc++ -L$(shell cd -L $(shell dirname $(shell $(GPUCC) -print-prog-name=clang))/../..; pwd)/lib -lamdhip64 + $(FC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) -lstdc++ -L$(HIP_HOME)/lib -lamdhip64 else $(GPUCC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) endif @@ -979,7 +981,7 @@ else # link only runTest_$(GPUSUFFIX).o (new: in the past, this was linking both $(gpu_testmain): LIBFLAGS += $(GPULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH $(gpu_testmain): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(gpu_objects_lib) $(gpu_objects_exe) $(GTESTLIBS) ifneq ($(findstring hipcc,$(GPUCC)),) # link fortran/c++/hip using $FC when hipcc is used #802 - $(FC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lstdc++ -lpthread -L$(shell cd -L $(shell dirname $(shell $(GPUCC) -print-prog-name=clang))/../..; pwd)/lib -lamdhip64 + $(FC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lstdc++ -lpthread -L$(HIP_HOME)/lib -lamdhip64 else $(GPUCC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lcuda endif @@ -1104,10 +1106,20 @@ else @cat /proc/cpuinfo | grep "physical id" | sort -u endif @echo "" -ifneq ($(shell which nvidia-smi 2>/dev/null),) - nvidia-smi -L + # some systems may have -smi installed, but it fails to execute + # because it cannot communicate with the hardware + @if nvidia-smi &>/dev/null ; then \ + nvidia-smi -L ;\ + else \ + echo "No Nvidia GPU detected" ;\ + fi @echo "" -endif + @if amd-smi &>/dev/null ; then \ + amd-smi static -a ;\ + amd-smi list ;\ + else \ + echo "No AMD GPU detected" ;\ + fi @echo USECCACHE=$(USECCACHE) ifeq ($(USECCACHE),1) ccache --version | head -1 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/SubProcesses/proc_characteristics b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/proc_characteristics index 13deb6127f..374dcbd48c 100644 --- a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/proc_characteristics +++ b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/proc_characteristics @@ -8,7 +8,7 @@ ninitial = 2 grouped_matrix = True has_loops = False - bias_module = dummy + bias_module = None max_n_matched_jets = 2 colored_pdgs = [1, 2, 3, 4, 5, 6, 21] complex_mass_scheme = False diff --git a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/reweight.f b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/reweight.f index 0a0bafa7c1..189ba41449 100644 --- a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/reweight.f +++ b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/reweight.f @@ -1186,7 +1186,7 @@ logical function setclscales(p, keepq2bck, ivec) if(nexternal.gt.3) pt2ijcl(nexternal-3)=q2fact(2) else if(.not.fixed_fac_scale1) q2fact(1)=scalefact**2*pt2ijcl(nexternal-2) - if(.not.fixed_fac_scale2) q2fact(2)=scalefact**2*q2fact(1) + if(.not.fixed_fac_scale2) q2fact(2)=scalefact**2*pt2ijcl(nexternal-2) endif elseif(jcentral(1).eq.0)then if(.not.fixed_fac_scale1) q2fact(1) = scalefact**2*pt2ijcl(jfirst(1)) diff --git a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/symmetry.f b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/symmetry.f index 309540a0a2..2afd9e9f75 100644 --- a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/symmetry.f +++ b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/symmetry.f @@ -232,7 +232,7 @@ subroutine write_bash(mapconfig,use_config, prwidth, jcomp,iforest, c write(*,*) 'mapping',ic,mapconfig(i),icode if (icode .eq. 0) then c Create format string based on number of digits - write(formstr,'(a,i1,a)') '(I',nconf,'$)' + write(formstr,'(a,i1,a)') '(I',nconf,',$)' write(*,formstr) mapconfig(i) c Write symmetry factors write(formstr2,'(a,i2,a)') '(2i',nsym,')' @@ -242,10 +242,10 @@ subroutine write_bash(mapconfig,use_config, prwidth, jcomp,iforest, dconfig=mapconfig(i)+icode*1d0/10**ncode if(nconf+ncode+1.lt.10) then write(formstr,'(a,i1,a,i1,a)') '(F',nconf+ncode+1, - $ '.',ncode,'$)' + $ '.',ncode,',$)' else write(formstr,'(a,i2,a,i1,a)') '(F',nconf+ncode+1, - $ '.',ncode,'$)' + $ '.',ncode,',$)' endif write(*,formstr) dconfig c Write symmetry factors @@ -260,7 +260,7 @@ subroutine write_bash(mapconfig,use_config, prwidth, jcomp,iforest, dconfig=mapconfig(i)+icode*1d0/10**ncode write(27,formstr2) dconfig,use_config(i) endif - write(*,'(a$)') ' ' + write(*,'(a,$)') ' ' 100 call bw_increment_array(iarray,imax,ibase,done) enddo else diff --git a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/unwgt.f b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/unwgt.f index f602511c94..d1247f1849 100644 --- a/epochX/cudacpp/gg_ttgg.mad/SubProcesses/unwgt.f +++ b/epochX/cudacpp/gg_ttgg.mad/SubProcesses/unwgt.f @@ -497,6 +497,7 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) integer ip, np, ic, nc integer ida(2),ito(-nexternal+3:nexternal),ns,nres,ires,icloop integer iseed + double precision beam_mass double precision pboost(0:3) double precision beta, get_betaz double precision ebi(0:3), ebo(0:3) @@ -506,7 +507,7 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) integer idup(nexternal,maxproc,maxsproc) integer mothup(2,nexternal) integer icolup(2,nexternal,maxflow,maxsproc) - + double precision eta integer nsym integer ievent @@ -638,21 +639,20 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) if (nincoming.eq.2) then if (xbk(1) .gt. 0d0 .and. xbk(1) .le. 1d0 .and. $ xbk(2) .gt. 0d0 .and. xbk(2) .le. 1d0) then - if(lpp(2).ne.0.and.(xbk(1).eq.1d0.or.pmass(1).eq.0d0).and.xbk(2).ne.1d0) then - ! construct the beam momenta in each frame and compute the related (z)boost - if (pmass(1).eq.0d0.and.(abs(lpp(1)).eq.3.or.abs(lpp(1)).eq.4).and.ebeam(1).gt.10d0*m1)then - local_mass = 0d0 - else - local_mass = m1 - endif + if(lpp(2).ne.0.and.(xbk(1).eq.1d0.or.pmass(1).eq.0d0)) then + if((abs(lpp(1)).gt.2.and.abs(lpp(1)).ne.9).or.xbk(1).eq.1d0)then + beam_mass = pmass(1) + else + beam_mass = m1 + endif ebi(0) = p(0,1)/xbk(1) ! this assumes that particle 1 is massless or mass equal to beam ebi(1) = 0 ebi(2) = 0 - ebi(3) = DSQRT(ebi(0)**2-local_mass**2) + ebi(3) = DSQRT(ebi(0)**2-beam_mass**2) ebo(0) = ebeam(1) ebo(1) = 0 ebo(2) = 0 - ebo(3) = DSQRT(ebo(0)**2-local_mass**2) + ebo(3) = DSQRT(ebo(0)**2-beam_mass**2) beta = get_betaz(ebi, ebo) if (xbk(1).eq.1d0) then pb(0,isym(1,jsym)) = ebo(0) @@ -668,20 +668,19 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) enddo else - if (pmass(1).eq.0d0.and.(abs(lpp(1)).eq.3.or.abs(lpp(1)).eq.4.and.ebeam(2).gt.10d0*m2))then - local_mass = 0d0 - else - local_mass = m2 - endif - ebi(0) = p(0,1)/xbk(1) ! this assumes that particle 1 is massless or mass equal to beam + if((abs(lpp(2)).gt.2.and.abs(lpp(2)).ne.9).or.xbk(2).eq.1d0)then + beam_mass = pmass(2) + else + beam_mass = m2 + endif ebi(0) = p(0,2)/xbk(2) ! this assumes that particle 2 is massless or mass equal to beam ebi(1) = 0 ebi(2) = 0 - ebi(3) = -1d0*DSQRT(ebi(0)**2-local_mass**2) + ebi(3) = -1d0*DSQRT(ebi(0)**2-beam_mass**2) ebo(0) = ebeam(2) ebo(1) = 0 ebo(2) = 0 - ebo(3) = -1d0*DSQRT(ebo(0)**2-local_mass**2) + ebo(3) = -1d0*DSQRT(ebo(0)**2-beam_mass**2) beta = get_betaz(ebi, ebo) if (xbk(2).eq.1d0) then pb(0,isym(2,jsym)) = ebo(0) @@ -701,6 +700,21 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) write(*,*) 'Warning bad x1 or x2 in write_leshouche', $ xbk(1),xbk(2) endif + do j=1,nexternal + call zboost_with_beta(p(0,j),beta,pb(0,isym(j,jsym))) + pb(4,isym(j,jsym))=pmass(j) + enddo + + ! check for numerical_accuracy + if (pb(0,1).gt.ebeam(1).or.pb(0,2).gt.ebeam(2))then + ! go back to old method --more accurate when boosting with xbk close to one-- + eta = sqrt(xbk(1)*ebeam(1)/(xbk(2)*ebeam(2))) + pboost(0)=p(0,1)*(eta + 1d0/eta) + pboost(3)=p(0,1)*(eta - 1d0/eta) + do j=1,nexternal + call boostx(p(0,j),pboost,pb(0,isym(j,jsym))) + enddo + endif else do j=1,nexternal call boostx(p(0,j),pboost,pb(0,isym(j,jsym))) @@ -709,6 +723,8 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) enddo endif + + if (IMIRROR.eq.2.and.pmass(1).ne.pmass(2)) then c Note that in this context isym(1,jsym) should never be "2" since the mass differ pb(4,isym(1,jsym))=pmass(2) 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..2efb5954a6 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] @@ -1991,6 +1991,11 @@ def default_setup(self): self.add_param("PartonLevel:FSRinResonances", True, hidden=True, always_write_to_card=False, comment="Do not allow shower to run from decay product of unstable particle") self.add_param("ProcessLevel:resonanceDecays", True, hidden=True, always_write_to_card=False, comment="Do not allow unstable particle to decay.") + # Parameters only needed for main164 type of run (not pythia8/MG5 interface) + self.add_param("Main:HepMC", True, hidden=True, always_write_to_card=False, + comment="""Specify the type of output to be used by the main164 run. """) + self.add_param("HepMC:output", 'hepmc.gz', hidden=True, always_write_to_card=False, + comment="Specify the HepMC output file to be used by the main164 run.") # Add parameters controlling the subruns execution flow. # These parameters should not be part of PY8SubRun daughter. self.add_default_subruns('parameters') @@ -2087,8 +2092,10 @@ def MadGraphSet(self, name, value, **opts): force = False if name.lower() not in self or (force or name.lower() not in self.user_set): self.__setitem__(name, value, change_userdefine=False, **opts) - self.system_set.add(name.lower()) - + self.system_set.add(name.lower()) + else: + raise Exception("The parameter %s is already set to %s. You can not change it." % (name, self[name])) + def defaultSet(self, name, value, **opts): self.__setitem__(name, value, change_userdefine=False, **opts) @@ -2144,9 +2151,19 @@ def pythia8_formatting(value, formatv=None): else: return ','.join([PY8Card.pythia8_formatting(arg) for arg in value]) + #change of name convention between MG5 old interface and main164 from Pythia8 + interface_to_164 = {'HEPMCoutput:file': 'HepMC:output', + 'SysCalc:fullCutVariation': '!SysCalc:fullCutVariation (not supported with 164)', + 'SysCalc:qCutList': '!SysCalc:qCutList (not supported with 164)', + 'SysCalc:qWeed': '!SysCalc:qWeed (not supported with 164)', + 'SysCalc:tmsList': '!SysCalc:tmsList (not supported with 164)', + 'HEPMCoutput:scaling' : '!HEPMCoutput :scaling (not supported with 164)', + 'LHEFInputs:nSubruns' : 'Main:numberOfSubruns'} + def write(self, output_file, template, read_subrun=False, - print_only_visible=False, direct_pythia_input=False, add_missing=True): + print_only_visible=False, direct_pythia_input=False, add_missing=True, + use_mg5amc_py8_interface=False): """ Write the card to output_file using a specific template. > 'print_only_visible' specifies whether or not the hidden parameters should be written out if they are in the hidden_params_to_always_write @@ -2155,7 +2172,12 @@ def write(self, output_file, template, read_subrun=False, in the self.visible_params_to_always_write list and are not user_set or system_set are commented. > If 'add_missing' is False then parameters that should be written_out but are absent - from the template will not be written out.""" + from the template will not be written out. + > use_mg5amc_py8_interface is a flag to indicate that the MG5aMC-PY8 interface is used or not + if not used some parameters need to be translated from the old convention to the new one + """ + + self.use_mg5amc_py8_interface = use_mg5amc_py8_interface # First list the visible parameters visible_param = [p for p in self if p.lower() not in self.hidden_param @@ -2297,7 +2319,16 @@ def group_params(params): else: # Just copy parameters which don't need to be specified if param.lower() not in self.params_to_never_write: - output.write(line) + + if not use_mg5amc_py8_interface and direct_pythia_input and \ + param in self.interface_to_164: + param_entry = self.interface_to_164[param.strip()] + # special case for HepMC needs two flags + if 'HepMC:output' == param_entry: + output.write(' %s=%s\n'%('Main:HepMC', 'on')) + output.write('%s=%s\n'%(param_entry,new_value)) + else: + output.write(line) else: output.write('! The following parameter was forced to be commented out by MG5aMC.\n') output.write('! %s'%line) @@ -2313,6 +2344,7 @@ def group_params(params): if ((not direct_pythia_input) or (param.lower() in self.visible_params_to_always_write) or (param.lower() in self.user_set) or + (param.lower() in self.hidden_params_to_always_write) or (param.lower() in self.system_set)): template = '%s=%s' else: @@ -2321,6 +2353,19 @@ def group_params(params): # then they shouldn't be passed to Pythia template = '!%s=%s' + if not use_mg5amc_py8_interface and direct_pythia_input and \ + param in self.interface_to_164: + param_entry = self.interface_to_164[param] + # special case for HepMC needs two flags + if 'HepMC:output' == param_entry: + output.write(' %s=%s\n'%('Main:HepMC', 'on')) + if 'Main:InternalAnalysis'.lower() in self.user_set and \ + self['Main:InternalAnalysis'].lower() == 'on': + output.write('InternalAnalysis:output = ./djrs.dat\n') + + #elif param in self.interface_to_164.values() and not direct_pythia_input: + # misc.sprint(use_mg5amc_py8_interface, direct_pythia_input,param) + # raise Exception('The parameter %s is not supported in the MG5aMC-PY8 interface. Please use the new interface.'%param_entry output.write(template%(param_entry, value_entry.replace(value,new_value))) @@ -2365,6 +2410,8 @@ def group_params(params): comment = '\n'.join('! %s'%c for c in self.comments[param.lower()].split('\n')) output.write(comment+'\n') + if not use_mg5amc_py8_interface and param in self.interface_to_164: + continue output.write('%s=%s\n'%(param,PY8Card.pythia8_formatting(self[param]))) # Don't close the file if we were reading a subrun, but simply write @@ -3318,7 +3365,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 +3372,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 @@ -4050,8 +4095,8 @@ def post_set_fixed_fac_scale(card, value, change_userdefine, raiseerror, **opt): if 'fixed_fac_scale2' in card.user_set: card.user_set.remove('fixed_fac_scale2') - # #card['pdlabel1'] = value - # #card['pdlabel2'] = value + dict.__setitem__(card, 'fixed_fac_scale1', card['fixed_fac_scale']) + dict.__setitem__(card, 'fixed_fac_scale2', card['fixed_fac_scale']) @staticmethod def post_set(card, value, change_userdefine, raiseerror, name='unknown', **opt): @@ -4201,6 +4246,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 @@ -4451,11 +4497,11 @@ def check_validity(self): time.sleep(5) if self['drjj'] != 0: if 'drjj' in self.user_set: - logger.warning('Since icckw>0, changing the value of \'drjj\' to 0') + logger.warning('Since ickkw>0, changing the value of \'drjj\' to 0') self['drjj'] = 0 if self['drjl'] != 0: if 'drjl' in self.user_set: - logger.warning('Since icckw>0, changing the value of \'drjl\' to 0') + logger.warning('Since ickkw>0, changing the value of \'drjl\' to 0') self['drjl'] = 0 if not self['auto_ptj_mjj']: if self['mmjj'] > self['xqcut']: @@ -4753,7 +4799,6 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): self['fixed_fac_scale1'] = True self['nhel'] = 1 for i in beam_id_split[1]: - exit if abs(i) == 11: self['lpp1'] = -math.copysign(3,i) self['lpp2'] = math.copysign(3,i) @@ -5577,6 +5622,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 +5838,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/cluster.py b/epochX/cudacpp/gg_ttgg.mad/bin/internal/cluster.py index 95ef45b5f3..66069293d2 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/cluster.py +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/cluster.py @@ -602,6 +602,7 @@ def __init__(self, *args, **opt): self.submitted = six.moves.queue.Queue() # one entry by job submitted self.stoprequest = threading.Event() #flag to ensure everything to close self.demons = [] + self.gpus_list = [] self.nb_done =0 if 'nb_core' in opt: self.nb_core = opt['nb_core'] @@ -623,23 +624,46 @@ def __init__(self, *args, **opt): self.done_pid_queue = six.moves.queue.Queue() self.fail_msg = None + mg5_gpu_env_str = 'MG5_GPU_VISIBLE_DEVICES' + gpu_variables = [['NVIDIA_VISIBLE_DEVICES', 'CUDA_VISIBLE_DEVICES'], + ['ROCR_VISIBLE_DEVICES', 'HIP_VISIBLE_DEVICES'],] + if mg5_gpu_env_str in os.environ: + new_var = os.environ[mg5_gpu_env_str].split(',') + if len(new_var) == 2: + gpu_variables.insert(0, new_var) + else: + logger.error('Invalid format for %s=%s, it should be a comma-separated list of two elements' % (mg5_gpu_env_str, os.environ[mg5_gpu_env_str])) + for get_var,set_var in gpu_variables: + if get_var in os.environ: + self.gpus_list = os.environ.get(get_var).split(',') + self.gpu_set_var = set_var + self.gpus_count = len(self.gpus_list) + logger.info('Found %s GPUs: %s' % (self.gpus_count, self.gpus_list)) def start_demon(self): import threading - t = threading.Thread(target=self.worker) + env2 = None + if len(self.gpus_list): + env2 = os.environ.copy() + this_gpu_idx = len(self.demons) % self.gpus_count + env2[self.gpu_set_var] = self.gpus_list[this_gpu_idx] + t = threading.Thread(target=self.worker, kwargs={'env2': env2}) + else: + t = threading.Thread(target=self.worker) t.daemon = True t.start() self.demons.append(t) - def worker(self): + def worker(self, env2=None): import six.moves.queue import six.moves._thread while not self.stoprequest.isSet(): try: args = self.queue.get(timeout=10) tag, exe, arg, opt = args + opt['env'] = env2 try: # check for executable case if isinstance(exe,str): 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..69291df0d4 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): @@ -1463,11 +1463,15 @@ def create_plot(self, mode='parton', event_path=None, output=None, tag=None): self.run_name, '%s_pts.dat' % tag) for observable_name, data_path in [('djr',djr_path), ('pt',pt_path)]: - if not self.generate_Pythia8_HwU_plots( + try: + if not self.generate_Pythia8_HwU_plots( PY8_plots_root_path, merging_scale_name, observable_name,data_path): - return False - + return False + except Exception as error: + if os.path.exists(data_path): + logger.info('plot information present in %s' % data_path) + return True if mode == 'Pythia8': plot_files = glob.glob(pjoin(PY8_plots_root_path,'*.gnuplot')) if not misc.which('gnuplot'): @@ -1964,12 +1968,16 @@ def do_systematics(self, line): self.cluster.wait(os.path.dirname(output), update_status, update_first=update_status) except Exception: self.cluster.remove() + for i in range(nb_submit): + os.remove('%s/tmp_%s_%s' %(os.path.dirname(output),i,os.path.basename(output))) old_run_mode = self.options['run_mode'] self.options['run_mode'] =0 + out =False try: out = self.do_systematics(line) finally: self.options['run_mode'] = old_run_mode + return out #collect the data all_cross = [] for i in range(nb_submit): @@ -1995,18 +2003,21 @@ def do_systematics(self, line): self.run_card['event_norm'] in ['unity']: all_cross= [cross/nb_event for cross in all_cross] - sys_obj = systematics.call_systematics([input, None] + opts, - log=lambda x: logger.info(str(x)), - result=result_file, - running=False - ) + + sys_obj = systematics.call_systematics([input, None] + opts, + log=lambda x: logger.info(str(x)), + result=result_file, + running=False + ) + sys_obj.print_cross_sections(all_cross, nb_event, result_file) - + #concatenate the output file subprocess.call(['cat']+\ ['./tmp_%s_%s' % (i, os.path.basename(output)) for i in range(nb_submit)], stdout=open(output,'w'), cwd=os.path.dirname(output)) + for i in range(nb_submit): os.remove('%s/tmp_%s_%s' %(os.path.dirname(output),i,os.path.basename(output))) # os.remove('%s/log_sys_%s.txt' % (os.path.dirname(output),i)) @@ -3831,7 +3842,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 +5146,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 +6751,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 +6775,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 +6826,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..6fbdd98100 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': @@ -1858,6 +1855,8 @@ def parse_histos_from_PY8_XML_stream(self, stream, run_id=None, # If merging cut is negative, then pick only the one of the central scale # If not specified, then take them all but use the PDF and scale weight # of the central merging_scale for the variation. + if not all_weights: + raise MadGraph5Error('No weights were found in the HwU XML source.') if merging_scale is None or merging_scale < 0.0: merging_scale_chosen = all_weights[2]['MERGING'] else: @@ -2480,14 +2479,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 +2738,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 +2877,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 +2889,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 +2898,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 +2907,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 +2916,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..b1739da73d 100644 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/launch_plugin.py +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/launch_plugin.py @@ -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: O. Mattelaer (Aug 2023) for the MG5aMC CUDACPP plugin. -# Further modified by: O. Mattelaer, A. Valassi (2024) for the MG5aMC CUDACPP plugin. +# Further modified by: O. Mattelaer, A. Valassi, Z. Wettersten (2024-2025) for the MG5aMC CUDACPP plugin. import logging import os @@ -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') @@ -133,7 +133,8 @@ def default_setup(self): super().default_setup() # change default value: self['cudacpp_backend'] = 'cuda' - self['vector_size'] = 16384 # already setup in default class (just change value) + self['vector_size'] = 32 # ZW: default to 32, might want to change to 64 to utilise AMD GPUs better as well # 16384 # already setup in default class (just change value) + self['nb_warp'] = 512 # number of warps per kernel call, for now setting to 16 384 / vector_size MEINTERFACE = CPPMEInterface RunCard = CPPRunCard 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..81d17f7cb1 100755 --- a/epochX/cudacpp/gg_ttgg.mad/bin/internal/lhe_parser.py +++ b/epochX/cudacpp/gg_ttgg.mad/bin/internal/lhe_parser.py @@ -1035,12 +1035,12 @@ def define_init_banner(self, wgt, lha_strategy, proc_charac=None): from_init = True if not from_init: - if group in grouped_cross: - grouped_cross[group] += self.allcross[i] - grouped_error[group] += self.error[i]**2 + if int(group) in grouped_cross: + grouped_cross[int(group)] += self.allcross[i] + grouped_error[int(group)] += self.error[i]**2 else: - grouped_cross[group] = self.allcross[i] - grouped_error[group] = self.error[i]**2 + grouped_cross[int(group)] = self.allcross[i] + grouped_error[int(group)] = self.error[i]**2 else: ban = banner_mod.Banner(ff.banner) for line in ban['init'].split('\n'): @@ -1048,11 +1048,11 @@ def define_init_banner(self, wgt, lha_strategy, proc_charac=None): if len(splitline)==4: cross, error, _, group = splitline if int(group) in grouped_cross: - grouped_cross[group] += float(cross) - grouped_error[group] += float(error)**2 + grouped_cross[int(group)] += float(cross) + grouped_error[int(group)] += float(error)**2 else: - grouped_cross[group] = float(cross) - grouped_error[group] = float(error)**2 + grouped_cross[int(group)] = float(cross) + grouped_error[int(group)] = float(error)**2 nb_group = len(grouped_cross) # compute the information for the first line @@ -1086,6 +1086,8 @@ def define_init_banner(self, wgt, lha_strategy, proc_charac=None): self.seek(0) if init_information["idbmup2"] in [0,9]: event = next(self) + if len(event) == 0: + event = Event(str(event)) init_information["idbmup2"] = event[1].pdg self.seek(0) @@ -2166,10 +2168,13 @@ def check(self): abspz += abs(particle.pz) # check mass fourmass = FourMomentum(particle).mass - - if particle.mass and (abs(particle.mass) - fourmass)/ abs(particle.mass) > threshold: - raise Exception( "Do not have correct mass lhe: %s momentum: %s (error at %s" % (particle.mass, fourmass, (abs(particle.mass) - fourmass)/ abs(particle.mass))) - + if particle.mass: + expected = (particle.E - math.sqrt(particle.E**2 -particle.mass**2))/particle.E + if expected > 1e-8: + mass_threshold = particle.E**2 - (particle.E-threshold)**2 + if (abs(particle.mass) - fourmass)/ mass_threshold > 5: + raise Exception( "Do not have correct mass lhe: %s momentum: %s (error at %s" % (particle.mass, fourmass, (abs(particle.mass) - fourmass)/ abs(particle.mass))) + if E/absE > threshold: logger.critical(self) @@ -2953,8 +2958,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..4d5597c722 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) @@ -2827,10 +2827,10 @@ def print_results_in_shell(self, data): logger.info(" Nb of events after matching/merging : %d" % int(data['nb_event_pythia'])) if self.run_card['use_syst'] in self.true and \ (int(self.run_card['ickkw'])==1 or self.run_card['ktdurham']>0.0 - or self.run_card['ptlund']>0.0): + or self.run_card['ptlund']>0.0) and data['cross_pythia'] == -1: logger.info(" Notice that because Systematics computation is turned on, the merging did not veto events but modified their weights instead.\n"+\ " The resulting hepmc/stdhep file should therefore be use with those weights.") - else: + elif data['cross_pythia'] == -1: logger.info(" Nb of events after merging : %s" % data['nb_event_pythia']) logger.info(" " ) @@ -3055,6 +3055,7 @@ def do_multi_run(self, line): crossoversig = 0 inv_sq_err = 0 nb_event = 0 + madspin = False for i in range(nb_run): self.nb_refine = 0 self.exec_cmd('generate_events %s_%s -f' % (main_name, i), postcmd=False) @@ -3067,6 +3068,8 @@ def do_multi_run(self, line): inv_sq_err+=1.0/error**2 self.results[main_name][-1]['cross'] = crossoversig/inv_sq_err self.results[main_name][-1]['error'] = math.sqrt(1.0/inv_sq_err) + if 'decayed' in self.run_name: + madspin = True self.results.def_current(main_name) self.run_name = main_name self.update_status("Merging LHE files", level='parton') @@ -3074,9 +3077,12 @@ def do_multi_run(self, line): os.mkdir(pjoin(self.me_dir,'Events', self.run_name)) except Exception: pass - os.system('%(bin)s/merge.pl %(event)s/%(name)s_*/unweighted_events.lhe.gz %(event)s/%(name)s/unweighted_events.lhe.gz %(event)s/%(name)s_banner.txt' + + os.system('%(bin)s/merge.pl %(event)s/%(name)s_*%(madspin)s/unweighted_events.lhe.gz %(event)s/%(name)s/unweighted_events.lhe.gz %(event)s/%(name)s_banner.txt' % {'bin': self.dirbin, 'event': pjoin(self.me_dir,'Events'), - 'name': self.run_name}) + 'name': self.run_name, + 'madspin': '_decayed_*' if madspin else '' + }) eradir = self.options['exrootanalysis_path'] if eradir and misc.is_executable(pjoin(eradir,'ExRootLHEFConverter')): @@ -3656,9 +3662,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'))) @@ -3757,6 +3765,8 @@ def split(a, n): k, m = divmod(len(a), n) return (a[i*k+min(i, m):(i+1)*k+min(i+1, m)] for i in range(n)) + Gdirs = self.remove_empty_events(Gdirs) + partials_info = [] if len(Gdirs) >= max_G: start_unweight= time.perf_counter() @@ -3786,7 +3796,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, @@ -4223,7 +4233,7 @@ def mg5amc_py8_interface_consistency_warning(options): return None - def setup_Pythia8RunAndCard(self, PY8_Card, run_type): + def setup_Pythia8RunAndCard(self, PY8_Card, run_type, use_mg5amc_py8_interface): """ Setup the Pythia8 Run environment and card. In particular all the process and run specific parameters of the card are automatically set here. This function returns the path where HEPMC events will be output, if any.""" @@ -4338,10 +4348,10 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): PY8_Card.systemSet('Beams:setProductionScalesFromLHEF',True) # Automatically set qWeed to xqcut if not defined by the user. - if PY8_Card['SysCalc:qWeed']==-1.0: + if use_mg5amc_py8_interface and PY8_Card['SysCalc:qWeed']==-1.0: PY8_Card.MadGraphSet('SysCalc:qWeed',self.run_card['xqcut'], force=True) - if PY8_Card['SysCalc:qCutList']=='auto': + if use_mg5amc_py8_interface and PY8_Card['SysCalc:qCutList']=='auto': if self.run_card['use_syst']: if self.run_card['sys_matchscale']=='auto': qcut = PY8_Card['JetMatching:qCut'] @@ -4368,7 +4378,7 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): # Specific MLM settings # PY8 should not implement the MLM veto since the driver should do it # if merging scale variation is turned on - if self.run_card['use_syst']: + if use_mg5amc_py8_interface and self.run_card['use_syst']: # We do no force it here, but it is clear that the user should know what # he's doing if he were to force it to True. PY8_Card.MadGraphSet('JetMatching:doVeto',False) @@ -4444,7 +4454,7 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): PY8_Card.MadGraphSet('SpaceShower:pTmaxMatch',1) PY8_Card.MadGraphSet('SpaceShower:rapidityOrder',False) # PY8 should not implement the CKKW veto since the driver should do it. - if self.run_card['use_syst']: + if use_mg5amc_py8_interface and self.run_card['use_syst']: # We do no force it here, but it is clear that the user should know what # he's doing if he were to force it to True. PY8_Card.MadGraphSet('Merging:applyVeto',False) @@ -4516,6 +4526,12 @@ def do_pythia8(self, line): else: no_default = False + if '--old_interface' in args: + use_mg5amc_py8_interface = True + args.remove('--old_interface') + else: + use_mg5amc_py8_interface = False + if not self.run_name: self.check_pythia8(args) self.configure_directory(html_opening =False) @@ -4545,20 +4561,27 @@ def do_pythia8(self, line): #"Please use 'event_norm = average' in the run_card to avoid this problem.") - - if not self.options['mg5amc_py8_interface_path'] or not \ - os.path.exists(pjoin(self.options['mg5amc_py8_interface_path'], - 'MG5aMC_PY8_interface')): - raise self.InvalidCmd( -"""The MG5aMC_PY8_interface tool cannot be found, so that MadEvent cannot steer Pythia8 shower. -Please install this tool with the following MG5_aMC command: - MG5_aMC> install mg5amc_py8_interface_path""") + if use_mg5amc_py8_interface: + if not self.options['mg5amc_py8_interface_path'] or not \ + os.path.exists(pjoin(self.options['mg5amc_py8_interface_path'], + 'MG5aMC_PY8_interface')): + raise self.InvalidCmd( + """The MG5aMC_PY8_interface tool cannot be found, so that MadEvent cannot steer Pythia8 shower. + Please install this tool with the following MG5_aMC command: + MG5_aMC> install mg5amc_py8_interface_path""") + else: + pythia_main = pjoin(self.options['mg5amc_py8_interface_path'], + 'MG5aMC_PY8_interface') + warnings = MadEventCmd.mg5amc_py8_interface_consistency_warning(self.options) + if warnings: + logger.warning(warnings) else: - pythia_main = pjoin(self.options['mg5amc_py8_interface_path'], - 'MG5aMC_PY8_interface') - warnings = MadEventCmd.mg5amc_py8_interface_consistency_warning(self.options) - if warnings: - logger.warning(warnings) + pythia_main = pjoin(self.options['pythia8_path'], 'share', 'Pythia8', 'examples', 'main164') + if not os.path.exists(pythia_main): + pythia_main = pjoin(self.options['pythia8_path'], 'examples', 'main164') + if not os.path.exists(pythia_main): + logger.warning('main164 not found (or not compiled). Will try the old interface instead.') + return self.do_pythia8(line + ' --old_interface') self.results.add_detail('run_mode', 'madevent') @@ -4583,14 +4606,19 @@ def do_pythia8(self, line): run_type = 'CKKW' # Edit the card and run environment according to the run specification - HepMC_event_output = self.setup_Pythia8RunAndCard(PY8_Card, run_type) + HepMC_event_output = self.setup_Pythia8RunAndCard(PY8_Card, run_type, use_mg5amc_py8_interface=use_mg5amc_py8_interface) + + if not use_mg5amc_py8_interface and self.options['run_mode']==0 or (self.options['run_mode']==2 and self.options['nb_core']==1): + PY8_Card['Main:numberOfEvents']= self.run_card['nevents'] + # Now write the card. pythia_cmd_card = pjoin(self.me_dir, 'Events', self.run_name , '%s_pythia8.cmd' % tag) cmd_card = StringIO.StringIO() PY8_Card.write(cmd_card,pjoin(self.me_dir,'Cards','pythia8_card_default.dat'), - direct_pythia_input=True) + direct_pythia_input=True, + use_mg5amc_py8_interface=use_mg5amc_py8_interface) # Now setup the preamble to make sure that everything will use the locally # installed tools (if present) even if the user did not add it to its @@ -4632,7 +4660,7 @@ def do_pythia8(self, line): " command '/usr/bin/env %s' exists and returns a valid path."%shell) exe_cmd = "#!%s\n%s"%(shell_exe,' '.join( - [preamble+pythia_main, + [preamble+pythia_main, '' if use_mg5amc_py8_interface else '-c', os.path.basename(pythia_cmd_card)])) wrapper.write(exe_cmd) @@ -4699,6 +4727,7 @@ def do_pythia8(self, line): n_cores = max(min(min_n_core,n_cores),1) if self.options['run_mode']==0 or (self.options['run_mode']==2 and self.options['nb_core']==1): + # No need for parallelization anymore self.cluster = None logger.info('Follow Pythia8 shower by running the '+ @@ -4744,20 +4773,22 @@ def do_pythia8(self, line): ParallelPY8Card.subruns[0].systemSet('Beams:LHEF','events.lhe.gz') ParallelPY8Card.write(pjoin(parallelization_dir,'PY8Card.dat'), pjoin(self.me_dir,'Cards','pythia8_card_default.dat'), - direct_pythia_input=True) + direct_pythia_input=True, + use_mg5amc_py8_interface=use_mg5amc_py8_interface) # Write the wrapper wrapper_path = pjoin(parallelization_dir,'run_PY8.sh') wrapper = open(wrapper_path,'w') if self.options['cluster_temp_path'] is None: exe_cmd = \ -"""#!%s -./%s PY8Card.dat >& PY8_log.txt -""" +"""#!%%s +./%%s %s PY8Card.dat >& PY8_log.txt +""" % ('' if use_mg5amc_py8_interface else '-c') + else: exe_cmd = \ -"""#!%s +"""#!%%s ln -s ./events_$1.lhe.gz ./events.lhe.gz -./%s PY8Card_$1.dat >& PY8_log.txt +./%%s %s PY8Card_$1.dat >& PY8_log.txt mkdir split_$1 if [ -f ./events.hepmc ]; then @@ -4776,7 +4807,7 @@ def do_pythia8(self, line): mv ./PY8_log.txt ./split_$1/ fi tar -czf split_$1.tar.gz split_$1 -""" +""" % ('' if use_mg5amc_py8_interface else '-c') exe_cmd = exe_cmd%(shell_exe,os.path.basename(pythia_main)) wrapper.write(exe_cmd) wrapper.close() @@ -4812,19 +4843,27 @@ def do_pythia8(self, line): pjoin(parallelization_dir,split_files[-1])) logger.info('Submitting Pythia8 jobs...') + for i, split_file in enumerate(split_files): # We must write a PY8Card tailored for each split so as to correct the normalization # HEPMCoutput:scaling of each weight since the lhe showered will not longer contain the # same original number of events - split_PY8_Card = banner_mod.PY8Card(pjoin(parallelization_dir,'PY8Card.dat')) + split_PY8_Card = banner_mod.PY8Card(pjoin(parallelization_dir,'PY8Card.dat'), setter='user') + assert split_PY8_Card['JetMatching:nJetMax'] == PY8_Card['JetMatching:nJetMax'] + + + # Make sure to sure the number of split_events determined during the splitting. - split_PY8_Card.systemSet('Main:numberOfEvents',partition_for_PY8[i]) + split_PY8_Card.systemSet('Main:numberOfEvents',partition_for_PY8[i], force=True) + assert split_PY8_Card['Main:numberOfEvents'] == partition_for_PY8[i] split_PY8_Card.systemSet('HEPMCoutput:scaling',split_PY8_Card['HEPMCoutput:scaling']* - (float(partition_for_PY8[i]))) + (float(partition_for_PY8[i])), force=True) # Add_missing set to False so as to be sure not to add any additional parameter w.r.t # the ones in the original PY8 param_card copied. split_PY8_Card.write(pjoin(parallelization_dir,'PY8Card_%d.dat'%i), - pjoin(parallelization_dir,'PY8Card.dat'), add_missing=False) + pjoin(parallelization_dir,'PY8Card.dat'), add_missing=False, + direct_pythia_input=True, + use_mg5amc_py8_interface=use_mg5amc_py8_interface) in_files = [pjoin(parallelization_dir,os.path.basename(pythia_main)), pjoin(parallelization_dir,'PY8Card_%d.dat'%i), pjoin(parallelization_dir,split_file)] @@ -5073,7 +5112,7 @@ def wait_monitoring(Idle, Running, Done): # works both for fixed number of generated events and fixed accepted events self.results.add_detail('error_pythia', error_m) - if self.run_card['use_syst']: + if self.run_card['use_syst'] and use_mg5amc_py8_interface: self.results.add_detail('cross_pythia', -1) self.results.add_detail('error_pythia', 0) @@ -6132,7 +6171,102 @@ def get_Gdir(self, Pdir=None, symfact=None): mfactors[pjoin(P, "G%s" % tag)] = mfactor self.Gdirs = (Gdirs, mfactors) return self.get_Gdir(Pdir, symfact=symfact) + + ############################################################################ + def remove_empty_events(self, Gdir): + """return Gdir strip from the one providing empty events.lhe files.""" + + reasons = collections.defaultdict(list) + Gdirs = Gdir[:] + for G in Gdirs[:]: + try: + size = os.path.getsize(pjoin(G, 'events.lhe')) + except Exception as error: + size = 0 + if size <10: + Gdirs.remove(G) + try: + log = misc.BackRead(pjoin(G, 'log.txt')) + except Exception as error: + log = misc.BackRead(pjoin(G, 'run1_app.log')) + found = -1 + for line in log: + if 'Deleting file events.lhe' in line: + found = 0 + elif "Impossible BW configuration" in line: + reasons['bwconfig'].append(G) + break + elif found < -150: + reasons['not found'].append(G) + Gdirs.append(G) + break + elif found < 0: + found -= 1 + elif 'Loosen cuts or increase max_events' in line: + reasons['cuts'].append(G) + break + elif 'all returned zero' in line: + reasons['zero'].append(G) + break + elif found > 5: + reasons['unknown'].append(G) + break + else: + found += 1 + + if len(reasons): + logger.debug('Reasons for empty events.lhe:') + if len(reasons['unknown']): + logger.debug(' - unknown: %s' % len(reasons['unknown'])) + logger.log(10, ' DETAIL:' + ','.join(['/'.join(G.rsplit(os.sep)[-2:]) for G in reasons['unknown'][:10]])) + if len(reasons['not found']): + logger.debug(' - not found in log: %s' % len(reasons['not found'])) + logger.log(10, ' DETAIL:' + ','.join(['/'.join(G.rsplit(os.sep)[-2:]) for G in reasons['not found'][:10]])) + if len(reasons['zero']): + logger.debug(' - zero amplitudes: %s' % len(reasons['zero'])) + logger.log(10, ' DETAIL:' + ','.join(['/'.join(G.rsplit( os.sep)[-2:]) for G in reasons['zero'][:10]])) + if len(reasons['bwconfig']): + critical_bwconfig = set() + for G in reasons['bwconfig']: + base = G.rsplit('.',1)[0] + if any(G2.startswith(base) for G2 in Gdirs): + continue + else: + critical_bwconfig.add(os.sep.join(base.rsplit(os.sep)[-2:])) + for G in critical_bwconfig: + logger.warning('Gdirectory %s has no events.lhe file. (no BW config found %s times)' % G) + + logger.debug(' - impossible BW configuration: %s' % len(reasons['bwconfig'])) + logger.debug(' - channel with no possible BW configuration: %s' % len(critical_bwconfig)) + + if len(reasons['cuts']): + critical_nb_cuts = collections.defaultdict(int) + for G in reasons['cuts']: + if '.' in os.path.basename(G): + base = G.rsplit('.',1)[0] + if any(G2.startswith(base) for G2 in Gdirs): + continue + else: + critical_nb_cuts[os.sep.join(base.rsplit(os.sep)[-2:])] += 1 + else: + critical_nb_cuts[''] += 1 + logger.warning('Gdirectory %s has no events.lhe file. (no points passed cuts found)' % G) + for G, nb in critical_nb_cuts.items(): + if not G: + continue + else: + logger.warning('%s channel %s.XXX has no events.lhe file. (no points passed cuts). No %s with events detected' % (nb, G, G)) + logger.debug(' - no points passed cuts: %s' % len(reasons['cuts'])) + logger.log(10, ' DETAIL:' + ','.join(['/'.join(G.rsplit(os.sep)[-2:]) for G in reasons['cuts'][:10]])) + logger.debug(' - without any BW handling (critical): %s' % critical_nb_cuts['']) + logger.debug(' - with BW but all zero (critical): %s' % sum([nb for v, nb in critical_nb_cuts.items() if v!=''], 0)) + #logger.debug(' - cuts (with BW conflict where other channel contributes): %s' % (len(reasons['cuts'])- critical_nb_cuts)) + + + return Gdirs + + ############################################################################ def set_run_name(self, name, tag=None, level='parton', reload_card=False, allow_new_tag=True): @@ -6749,7 +6883,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 +6893,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 +7010,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 +7038,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 +7053,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 +7065,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 +7190,13 @@ 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) 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 +7210,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..fe602c5b80 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.3, 2025-06-12 // 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..1f9fb6d469 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.3, 2025-06-12 // 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..505c8839b3 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_ttgg.mad/test/cudacpp_test.mk b/epochX/cudacpp/gg_ttgg.mad/test/cudacpp_test.mk index f703a1ae7c..4934c9a53f 100644 --- a/epochX/cudacpp/gg_ttgg.mad/test/cudacpp_test.mk +++ b/epochX/cudacpp/gg_ttgg.mad/test/cudacpp_test.mk @@ -19,7 +19,7 @@ CXXFLAGS += -Igoogletest/googletest/include/ -std=c++11 all: googletest/$(INSTALLDIR)/lib64/libgtest.a googletest/CMakeLists.txt: - git clone https://github.com/google/googletest.git -b release-1.11.0 googletest + git clone https://github.com/google/googletest.git -b v1.17.0 googletest googletest/$(BUILDDIR)/Makefile: googletest/CMakeLists.txt mkdir -p googletest/$(BUILDDIR) 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/P1_Sigma_sm_gg_ttxgg/CPPProcess.cc b/epochX/cudacpp/gg_ttgg.sa/SubProcesses/P1_Sigma_sm_gg_ttxgg/CPPProcess.cc index 5956559974..0b26bd79d3 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -2775,7 +2775,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- 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..8349a04f71 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.3, 2025-06-12 // 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/cudacpp.mk b/epochX/cudacpp/gg_ttgg.sa/SubProcesses/cudacpp.mk index 20d8ded718..20b8e6b858 100644 --- a/epochX/cudacpp/gg_ttgg.sa/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_ttgg.sa/SubProcesses/cudacpp.mk @@ -114,7 +114,7 @@ export CXXFLAGS override CUDA_HOME = $(patsubst %/bin/nvcc,%,$(shell which nvcc 2>/dev/null)) # Set HIP_HOME from the path to hipcc, if it exists -override HIP_HOME = $(patsubst %/bin/hipcc,%,$(shell which hipcc 2>/dev/null)) +override HIP_HOME = $(shell hipconfig --rocmpath) # Configure CUDA_INC (for CURAND and NVTX) and NVTX if a CUDA installation exists (see #965) ifeq ($(CUDA_HOME),) @@ -229,6 +229,8 @@ ifeq ($(BACKEND),cuda) else ifeq ($(BACKEND),hip) + # example architecture values MI200:gfx90a, MI350X:gfx942 + MADGRAPH_HIP_ARCHITECTURE ?= gfx942 # Set GPUCC as $(HIP_HOME)/bin/hipcc (it was already checked above that this exists) GPUCC = $(HIP_HOME)/bin/hipcc XCOMPILERFLAG = @@ -243,7 +245,7 @@ else ifeq ($(BACKEND),hip) ###GPUFLAGS += -ggdb # FOR DEBUGGING ONLY # AMD HIP architecture flags - GPUARCHFLAGS = --offload-arch=gfx90a + GPUARCHFLAGS = --offload-arch=${MADGRAPH_HIP_ARCHITECTURE} GPUFLAGS += $(GPUARCHFLAGS) # Other AMD-specific flags @@ -878,7 +880,7 @@ endif $(gpu_fcheckmain): LIBFLAGS += $(GPULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH $(gpu_fcheckmain): $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBDIR)/lib$(MG5AMC_GPULIB).so $(gpu_objects_exe) ifneq ($(findstring hipcc,$(GPUCC)),) # link fortran/c++/hip using $FC when hipcc is used #802 - $(FC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) -lstdc++ -L$(shell cd -L $(shell dirname $(shell $(GPUCC) -print-prog-name=clang))/../..; pwd)/lib -lamdhip64 + $(FC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) -lstdc++ -L$(HIP_HOME)/lib -lamdhip64 else $(GPUCC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) endif @@ -979,7 +981,7 @@ else # link only runTest_$(GPUSUFFIX).o (new: in the past, this was linking both $(gpu_testmain): LIBFLAGS += $(GPULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH $(gpu_testmain): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(gpu_objects_lib) $(gpu_objects_exe) $(GTESTLIBS) ifneq ($(findstring hipcc,$(GPUCC)),) # link fortran/c++/hip using $FC when hipcc is used #802 - $(FC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lstdc++ -lpthread -L$(shell cd -L $(shell dirname $(shell $(GPUCC) -print-prog-name=clang))/../..; pwd)/lib -lamdhip64 + $(FC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lstdc++ -lpthread -L$(HIP_HOME)/lib -lamdhip64 else $(GPUCC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lcuda endif @@ -1104,10 +1106,20 @@ else @cat /proc/cpuinfo | grep "physical id" | sort -u endif @echo "" -ifneq ($(shell which nvidia-smi 2>/dev/null),) - nvidia-smi -L + # some systems may have -smi installed, but it fails to execute + # because it cannot communicate with the hardware + @if nvidia-smi &>/dev/null ; then \ + nvidia-smi -L ;\ + else \ + echo "No Nvidia GPU detected" ;\ + fi @echo "" -endif + @if amd-smi &>/dev/null ; then \ + amd-smi static -a ;\ + amd-smi list ;\ + else \ + echo "No AMD GPU detected" ;\ + fi @echo USECCACHE=$(USECCACHE) ifeq ($(USECCACHE),1) ccache --version | head -1 diff --git a/epochX/cudacpp/gg_ttgg.sa/src/HelAmps_sm.h b/epochX/cudacpp/gg_ttgg.sa/src/HelAmps_sm.h index 53dd560ed6..fe602c5b80 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.3, 2025-06-12 // 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..1f9fb6d469 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.3, 2025-06-12 // 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..505c8839b3 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_ttgg.sa/test/cudacpp_test.mk b/epochX/cudacpp/gg_ttgg.sa/test/cudacpp_test.mk index f703a1ae7c..4934c9a53f 100644 --- a/epochX/cudacpp/gg_ttgg.sa/test/cudacpp_test.mk +++ b/epochX/cudacpp/gg_ttgg.sa/test/cudacpp_test.mk @@ -19,7 +19,7 @@ CXXFLAGS += -Igoogletest/googletest/include/ -std=c++11 all: googletest/$(INSTALLDIR)/lib64/libgtest.a googletest/CMakeLists.txt: - git clone https://github.com/google/googletest.git -b release-1.11.0 googletest + git clone https://github.com/google/googletest.git -b v1.17.0 googletest googletest/$(BUILDDIR)/Makefile: googletest/CMakeLists.txt mkdir -p googletest/$(BUILDDIR) diff --git a/epochX/cudacpp/gg_ttggg.mad/Cards/ident_card.dat b/epochX/cudacpp/gg_ttggg.mad/Cards/ident_card.dat index 0ba87b008f..b37758a42a 100644 --- a/epochX/cudacpp/gg_ttggg.mad/Cards/ident_card.dat +++ b/epochX/cudacpp/gg_ttggg.mad/Cards/ident_card.dat @@ -2,32 +2,32 @@ ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c written by the UFO converter ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc +mass 5 mdl_MB +mass 6 mdl_MT +mass 15 mdl_MTA +mass 23 mdl_MZ +mass 25 mdl_MH +sminputs 1 aEWM1 +sminputs 2 mdl_Gf +sminputs 3 aS +yukawa 5 mdl_ymb +yukawa 6 mdl_ymt +yukawa 15 mdl_ymtau - - +decay 6 mdl_WT decay 23 mdl_WZ + decay 24 mdl_WW + decay 25 mdl_WH -decay 6 mdl_WT -mass 15 mdl_MTA -mass 23 mdl_MZ -mass 25 mdl_MH -mass 5 mdl_MB -mass 6 mdl_MT -sminputs 1 aEWM1 -sminputs 2 mdl_Gf -sminputs 3 aS -yukawa 15 mdl_ymtau -yukawa 5 mdl_ymb -yukawa 6 mdl_ymt diff --git a/epochX/cudacpp/gg_ttggg.mad/Cards/me5_configuration.txt b/epochX/cudacpp/gg_ttggg.mad/Cards/me5_configuration.txt index 68b4c46295..fa8d3481a2 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 = /home/dmass/Development/madgraph4gpu/amd-ci/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo +mg5_path = /home/dmass/Development/madgraph4gpu/amd-ci/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..4911d09748 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.3 2025-06-12 * #* * #* WARNING: UNKNOWN DEVELOPMENT VERSION. * #* WARNING: DO NOT USE FOR PRODUCTION * @@ -35,15 +35,17 @@ set loop_color_flows False set max_npoint_for_channel 0 set default_unset_couplings 99 set max_t_for_channel 99 +set zerowidth_tchannel True set nlo_mixed_expansion True -set stdout_level DEBUG -set zerowidth_tchannel F -generate g g > t t~ g g g +import model sm define p = g u c d s u~ c~ d~ s~ define j = g u c d s u~ c~ d~ s~ define l+ = e+ mu+ define l- = e- mu- define vl = ve vm vt define vl~ = ve~ vm~ vt~ -output madevent_simd ../TMPOUT/CODEGEN_mad_gg_ttggg --hel_recycling=Fa\ -lse --vector_size=32 +set stdout_level DEBUG +set zerowidth_tchannel F +generate g g > t t~ g g g +output madevent_simd gg_ttggg.mad_gen --hel_recycling=False --vector_s\ +ize=32 diff --git a/epochX/cudacpp/gg_ttggg.mad/Cards/run_card.dat b/epochX/cudacpp/gg_ttggg.mad/Cards/run_card.dat index a08f93d92b..377d5bc1c7 100644 --- a/epochX/cudacpp/gg_ttggg.mad/Cards/run_card.dat +++ b/epochX/cudacpp/gg_ttggg.mad/Cards/run_card.dat @@ -92,11 +92,11 @@ #********************************************************************* # Compilation flag. #********************************************************************* - -O3 -ffast-math -fbounds-check = global_flag ! build flags for all Fortran code (for a fair comparison to cudacpp; default is -O) + -O = global_flag ! fortran optimization flag use for the all code. --fast-math = aloha_flag ! fortran optimization flag for aloha function. Suggestions: '-ffast-math' -O3 = matrix_flag ! fortran optimization flag for matrix.f function. Suggestions: '-O3' - 32 = vector_size ! size of fortran arrays allocated in the multi-event API for SIMD/GPU (VECSIZE_MEMMAX) - 512 = nb_warp ! total number of warp/frontwave + 16 = vector_size ! size of fortran arrays allocated in the multi-event API for SIMD/GPU (VECSIZE_MEMMAX) + 1 = nb_warp ! total number of warp/frontwave #********************************************************************* # Customization (custom cuts/scale/bias/...) * @@ -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..1ac53bb4bd 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.3 \ No newline at end of file diff --git a/epochX/cudacpp/gg_ttggg.mad/Source/.make_opts b/epochX/cudacpp/gg_ttggg.mad/Source/.make_opts index de3864242b..56ba259c56 100644 --- a/epochX/cudacpp/gg_ttggg.mad/Source/.make_opts +++ b/epochX/cudacpp/gg_ttggg.mad/Source/.make_opts @@ -102,6 +102,7 @@ endif ifneq ($(lhapdf),) CXXFLAGS += $(shell $(lhapdf) --cppflags) alfas_functions=alfas_functions_lhapdf + alfas_to_clean=alfas_functions.o llhapdf+= $(shell $(lhapdf) --cflags --libs) -lLHAPDF # check if we need to activate c++11 (for lhapdf6.2) ifeq ($(origin CXX),default) @@ -113,10 +114,11 @@ ifneq ($(lhapdf),) endif else alfas_functions=alfas_functions + alfas_to_clean=alfas_functions_lhapdf.o llhapdf= endif # Helper function to check MG5 version define CHECK_MG5AMC_VERSION python -c 'import re; from distutils.version import StrictVersion; print StrictVersion("$(MG5AMC_VERSION)") >= StrictVersion("$(1)") if re.match("^[\d\.]+$$","$(MG5AMC_VERSION)") else True;' -endef \ No newline at end of file +endef 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..bdf427601f 100644 --- a/epochX/cudacpp/gg_ttggg.mad/Source/make_opts +++ b/epochX/cudacpp/gg_ttggg.mad/Source/make_opts @@ -1,12 +1,11 @@ DEFAULT_CPP_COMPILER=g++ -DEFAULT_F2PY_COMPILER=f2py3 -DEFAULT_F_COMPILER=gfortran -GLOBAL_FLAG=-O3 -ffast-math -fbounds-check MACFLAG= +STDLIB=-lstdc++ +STDLIB_FLAG= +DEFAULT_F2PY_COMPILER=f2py +DEFAULT_F_COMPILER=gfortran MG5AMC_VERSION=SpecifiedByMG5aMCAtRunTime PYTHIA8_PATH=NotInstalled -STDLIB_FLAG= -STDLIB=-lstdc++ #end_of_make_opts_variables BIASLIBDIR=../../../lib/ @@ -103,6 +102,7 @@ endif ifneq ($(lhapdf),) CXXFLAGS += $(shell $(lhapdf) --cppflags) alfas_functions=alfas_functions_lhapdf +alfas_to_clean=alfas_functions.o llhapdf+= $(shell $(lhapdf) --cflags --libs) -lLHAPDF # check if we need to activate c++11 (for lhapdf6.2) ifeq ($(origin CXX),default) @@ -114,6 +114,7 @@ endif endif else alfas_functions=alfas_functions +alfas_to_clean=alfas_functions_lhapdf.o llhapdf= endif diff --git a/epochX/cudacpp/gg_ttggg.mad/Source/makefile b/epochX/cudacpp/gg_ttggg.mad/Source/makefile index 291ca907ee..87a9e61723 100644 --- a/epochX/cudacpp/gg_ttggg.mad/Source/makefile +++ b/epochX/cudacpp/gg_ttggg.mad/Source/makefile @@ -37,10 +37,12 @@ all: $(LIBRARIES) $(LIBDIR)libdhelas.$(libext) $(LIBDIR)libpdf.$(libext) $(LIBDI $(LIBDIR)libdsample.$(libext): $(DSAMPLE) $(call CREATELIB, $@, $^) $(LIBDIR)libgeneric.$(libext): $(GENERIC) + rm -f $@ 2>/dev/null $(call CREATELIB, $@, $^) + rm -f $(alfas_to_clean) 2>/dev/null $(LIBDIR)libdhelas.$(libext): DHELAS cd DHELAS; make; cd .. -$(LIBDIR)libpdf.$(libext): PDF make_opts +$(LIBDIR)libpdf.$(libext): PDF $(alfas_functions).o cd PDF; make; cd .. ifneq (,$(filter edff chff, $(pdlabel1) $(pdlabel2))) $(LIBDIR)libgammaUPC.$(libext): PDF/gammaUPC @@ -73,6 +75,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/vector.inc b/epochX/cudacpp/gg_ttggg.mad/Source/vector.inc index ba125272b6..9d8b377aa7 100644 --- a/epochX/cudacpp/gg_ttggg.mad/Source/vector.inc +++ b/epochX/cudacpp/gg_ttggg.mad/Source/vector.inc @@ -30,6 +30,8 @@ C INTEGER WARP_SIZE PARAMETER (WARP_SIZE=32) INTEGER NB_WARP - PARAMETER (NB_WARP=512) + PARAMETER (NB_WARP=1) INTEGER VECSIZE_MEMMAX - PARAMETER (VECSIZE_MEMMAX=16384) + PARAMETER (VECSIZE_MEMMAX=32) + + 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..1ac53bb4bd 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.3 \ 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/P1_gg_ttxggg/CPPProcess.cc b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/P1_gg_ttxggg/CPPProcess.cc index ba06f6ff44..bdef2da021 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -30383,7 +30383,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- 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..95817b80da 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.3, 2025-06-12 // 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..5058fe1f57 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.3, 2025-06-12 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..37f74434ee 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.3, 2025-06-12 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.3, 2025-06-12 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 @@ -484,6 +488,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C Generate events only if IMODE is 0. IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN C Call UNWGT to unweight and store events + ICONFIG = CHANNELS(IVEC) CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) ENDIF diff --git a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/P1_gg_ttxggg/driver.f b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/P1_gg_ttxggg/driver.f index 3671cdce55..def489179c 100644 --- a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/P1_gg_ttxggg/driver.f +++ b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/P1_gg_ttxggg/driver.f @@ -489,7 +489,6 @@ subroutine open_file_local(lun,filename,fopened) fopened=.false. tempname=filename fine=index(tempname,' ') -c fine2=index(path,' ')-1 ! AV remove valgrind "Conditional jump or move depends on uninitialised value(s)" if(fine.eq.0) fine=len(tempname) open(unit=lun,file=tempname,status='old',ERR=20) fopened=.true. 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..ac98d845bd 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.3, 2025-06-12 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.3, 2025-06-12 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,9375 +506,738 @@ 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 C ---------- IF (FIRST) THEN FIRST=.FALSE. - IF(ZERO.NE.0D0) FK_ZERO = SIGN(MAX(ABS(ZERO), ABS(ZERO - $ *SMALL_WIDTH_TREATMENT)), ZERO) - IF(MDL_WT.NE.0D0) FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT - $ *SMALL_WIDTH_TREATMENT)), MDL_WT) + FK_ZERO = 0D0 + IF(MDL_WT.NE.0D0) THEN + FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT + $ *SMALL_WIDTH_TREATMENT)), MDL_WT) + ELSE + FK_MDL_WT = 0D0 + ENDIF + IF(INIT_MODE) THEN ZEROAMP_1(:,:) = .TRUE. @@ -18811,10 +10175,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 +10189,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/addmothers.f b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/addmothers.f index 9a31ed201d..6f32477b9e 100644 --- a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/addmothers.f +++ b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/addmothers.f @@ -21,7 +21,7 @@ subroutine addmothers(ip,jpart,pb,isym,jsym,rscale,aqcd,aqed,buff, integer icol ! color selected integer isym(nexternal,99), jsym - integer i,j,k,ida(2),ns,nres,ires,icl,ito2,idenpart,nc,ic + integer i,j,k,ida(2),ns,nres,ires,icl,ito2,idenpart,ic integer mo_color,da_color(2),itmp integer ito(-nexternal+3:nexternal),iseed,maxcolor,maxorg integer icolalt(2,-nexternal+2:2*nexternal-3) @@ -113,14 +113,15 @@ subroutine addmothers(ip,jpart,pb,isym,jsym,rscale,aqcd,aqed,buff, endif lconfig = vec_igraph1(ivec) endif - + is_LC=.true. + maxcolor=0 c c Choose a color flow which is certain to work with the propagator c structure of the chosen diagram and use that as an alternative c if (icol.eq.0) then do i=1,nexternal - icolalt(1,i)=0 + icolalt(1,i)=0 icolalt(2,i)=0 enddo else diff --git a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/cluster.f b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/cluster.f index b8995283ed..907894ea89 100644 --- a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/cluster.f +++ b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/cluster.f @@ -556,6 +556,8 @@ logical function cluster(p, ivec) jwin = 0 cluster=.false. clustered=.false. + iwin =0 + jwin =0 do i=0,3 pcmsp(i)=0 enddo @@ -665,8 +667,11 @@ logical function cluster(p, ivec) c initialize graph storage igraphs(0)=0 nleft=nexternal -c cluster - if (iwin.eq.0.or.jwin.eq.0) stop 21 + if(iwin.eq.0.or.jwin.eq.0)then + cluster=.false. + return + endif +c cluster do n=1,nexternal-2 c combine winner imocl(n)=imap(iwin,2)+imap(jwin,2) diff --git a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/cudacpp.mk index 20d8ded718..20b8e6b858 100644 --- a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/cudacpp.mk @@ -114,7 +114,7 @@ export CXXFLAGS override CUDA_HOME = $(patsubst %/bin/nvcc,%,$(shell which nvcc 2>/dev/null)) # Set HIP_HOME from the path to hipcc, if it exists -override HIP_HOME = $(patsubst %/bin/hipcc,%,$(shell which hipcc 2>/dev/null)) +override HIP_HOME = $(shell hipconfig --rocmpath) # Configure CUDA_INC (for CURAND and NVTX) and NVTX if a CUDA installation exists (see #965) ifeq ($(CUDA_HOME),) @@ -229,6 +229,8 @@ ifeq ($(BACKEND),cuda) else ifeq ($(BACKEND),hip) + # example architecture values MI200:gfx90a, MI350X:gfx942 + MADGRAPH_HIP_ARCHITECTURE ?= gfx942 # Set GPUCC as $(HIP_HOME)/bin/hipcc (it was already checked above that this exists) GPUCC = $(HIP_HOME)/bin/hipcc XCOMPILERFLAG = @@ -243,7 +245,7 @@ else ifeq ($(BACKEND),hip) ###GPUFLAGS += -ggdb # FOR DEBUGGING ONLY # AMD HIP architecture flags - GPUARCHFLAGS = --offload-arch=gfx90a + GPUARCHFLAGS = --offload-arch=${MADGRAPH_HIP_ARCHITECTURE} GPUFLAGS += $(GPUARCHFLAGS) # Other AMD-specific flags @@ -878,7 +880,7 @@ endif $(gpu_fcheckmain): LIBFLAGS += $(GPULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH $(gpu_fcheckmain): $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBDIR)/lib$(MG5AMC_GPULIB).so $(gpu_objects_exe) ifneq ($(findstring hipcc,$(GPUCC)),) # link fortran/c++/hip using $FC when hipcc is used #802 - $(FC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) -lstdc++ -L$(shell cd -L $(shell dirname $(shell $(GPUCC) -print-prog-name=clang))/../..; pwd)/lib -lamdhip64 + $(FC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) -lstdc++ -L$(HIP_HOME)/lib -lamdhip64 else $(GPUCC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) endif @@ -979,7 +981,7 @@ else # link only runTest_$(GPUSUFFIX).o (new: in the past, this was linking both $(gpu_testmain): LIBFLAGS += $(GPULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH $(gpu_testmain): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(gpu_objects_lib) $(gpu_objects_exe) $(GTESTLIBS) ifneq ($(findstring hipcc,$(GPUCC)),) # link fortran/c++/hip using $FC when hipcc is used #802 - $(FC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lstdc++ -lpthread -L$(shell cd -L $(shell dirname $(shell $(GPUCC) -print-prog-name=clang))/../..; pwd)/lib -lamdhip64 + $(FC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lstdc++ -lpthread -L$(HIP_HOME)/lib -lamdhip64 else $(GPUCC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lcuda endif @@ -1104,10 +1106,20 @@ else @cat /proc/cpuinfo | grep "physical id" | sort -u endif @echo "" -ifneq ($(shell which nvidia-smi 2>/dev/null),) - nvidia-smi -L + # some systems may have -smi installed, but it fails to execute + # because it cannot communicate with the hardware + @if nvidia-smi &>/dev/null ; then \ + nvidia-smi -L ;\ + else \ + echo "No Nvidia GPU detected" ;\ + fi @echo "" -endif + @if amd-smi &>/dev/null ; then \ + amd-smi static -a ;\ + amd-smi list ;\ + else \ + echo "No AMD GPU detected" ;\ + fi @echo USECCACHE=$(USECCACHE) ifeq ($(USECCACHE),1) ccache --version | head -1 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/SubProcesses/proc_characteristics b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/proc_characteristics index 2a6bb58e2b..d8df98aee6 100644 --- a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/proc_characteristics +++ b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/proc_characteristics @@ -8,7 +8,7 @@ ninitial = 2 grouped_matrix = True has_loops = False - bias_module = dummy + bias_module = None max_n_matched_jets = 3 colored_pdgs = [1, 2, 3, 4, 5, 6, 21] complex_mass_scheme = False diff --git a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/reweight.f b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/reweight.f index 0a0bafa7c1..189ba41449 100644 --- a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/reweight.f +++ b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/reweight.f @@ -1186,7 +1186,7 @@ logical function setclscales(p, keepq2bck, ivec) if(nexternal.gt.3) pt2ijcl(nexternal-3)=q2fact(2) else if(.not.fixed_fac_scale1) q2fact(1)=scalefact**2*pt2ijcl(nexternal-2) - if(.not.fixed_fac_scale2) q2fact(2)=scalefact**2*q2fact(1) + if(.not.fixed_fac_scale2) q2fact(2)=scalefact**2*pt2ijcl(nexternal-2) endif elseif(jcentral(1).eq.0)then if(.not.fixed_fac_scale1) q2fact(1) = scalefact**2*pt2ijcl(jfirst(1)) diff --git a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/symmetry.f b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/symmetry.f index 309540a0a2..2afd9e9f75 100644 --- a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/symmetry.f +++ b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/symmetry.f @@ -232,7 +232,7 @@ subroutine write_bash(mapconfig,use_config, prwidth, jcomp,iforest, c write(*,*) 'mapping',ic,mapconfig(i),icode if (icode .eq. 0) then c Create format string based on number of digits - write(formstr,'(a,i1,a)') '(I',nconf,'$)' + write(formstr,'(a,i1,a)') '(I',nconf,',$)' write(*,formstr) mapconfig(i) c Write symmetry factors write(formstr2,'(a,i2,a)') '(2i',nsym,')' @@ -242,10 +242,10 @@ subroutine write_bash(mapconfig,use_config, prwidth, jcomp,iforest, dconfig=mapconfig(i)+icode*1d0/10**ncode if(nconf+ncode+1.lt.10) then write(formstr,'(a,i1,a,i1,a)') '(F',nconf+ncode+1, - $ '.',ncode,'$)' + $ '.',ncode,',$)' else write(formstr,'(a,i2,a,i1,a)') '(F',nconf+ncode+1, - $ '.',ncode,'$)' + $ '.',ncode,',$)' endif write(*,formstr) dconfig c Write symmetry factors @@ -260,7 +260,7 @@ subroutine write_bash(mapconfig,use_config, prwidth, jcomp,iforest, dconfig=mapconfig(i)+icode*1d0/10**ncode write(27,formstr2) dconfig,use_config(i) endif - write(*,'(a$)') ' ' + write(*,'(a,$)') ' ' 100 call bw_increment_array(iarray,imax,ibase,done) enddo else diff --git a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/unwgt.f b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/unwgt.f index f602511c94..d1247f1849 100644 --- a/epochX/cudacpp/gg_ttggg.mad/SubProcesses/unwgt.f +++ b/epochX/cudacpp/gg_ttggg.mad/SubProcesses/unwgt.f @@ -497,6 +497,7 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) integer ip, np, ic, nc integer ida(2),ito(-nexternal+3:nexternal),ns,nres,ires,icloop integer iseed + double precision beam_mass double precision pboost(0:3) double precision beta, get_betaz double precision ebi(0:3), ebo(0:3) @@ -506,7 +507,7 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) integer idup(nexternal,maxproc,maxsproc) integer mothup(2,nexternal) integer icolup(2,nexternal,maxflow,maxsproc) - + double precision eta integer nsym integer ievent @@ -638,21 +639,20 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) if (nincoming.eq.2) then if (xbk(1) .gt. 0d0 .and. xbk(1) .le. 1d0 .and. $ xbk(2) .gt. 0d0 .and. xbk(2) .le. 1d0) then - if(lpp(2).ne.0.and.(xbk(1).eq.1d0.or.pmass(1).eq.0d0).and.xbk(2).ne.1d0) then - ! construct the beam momenta in each frame and compute the related (z)boost - if (pmass(1).eq.0d0.and.(abs(lpp(1)).eq.3.or.abs(lpp(1)).eq.4).and.ebeam(1).gt.10d0*m1)then - local_mass = 0d0 - else - local_mass = m1 - endif + if(lpp(2).ne.0.and.(xbk(1).eq.1d0.or.pmass(1).eq.0d0)) then + if((abs(lpp(1)).gt.2.and.abs(lpp(1)).ne.9).or.xbk(1).eq.1d0)then + beam_mass = pmass(1) + else + beam_mass = m1 + endif ebi(0) = p(0,1)/xbk(1) ! this assumes that particle 1 is massless or mass equal to beam ebi(1) = 0 ebi(2) = 0 - ebi(3) = DSQRT(ebi(0)**2-local_mass**2) + ebi(3) = DSQRT(ebi(0)**2-beam_mass**2) ebo(0) = ebeam(1) ebo(1) = 0 ebo(2) = 0 - ebo(3) = DSQRT(ebo(0)**2-local_mass**2) + ebo(3) = DSQRT(ebo(0)**2-beam_mass**2) beta = get_betaz(ebi, ebo) if (xbk(1).eq.1d0) then pb(0,isym(1,jsym)) = ebo(0) @@ -668,20 +668,19 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) enddo else - if (pmass(1).eq.0d0.and.(abs(lpp(1)).eq.3.or.abs(lpp(1)).eq.4.and.ebeam(2).gt.10d0*m2))then - local_mass = 0d0 - else - local_mass = m2 - endif - ebi(0) = p(0,1)/xbk(1) ! this assumes that particle 1 is massless or mass equal to beam + if((abs(lpp(2)).gt.2.and.abs(lpp(2)).ne.9).or.xbk(2).eq.1d0)then + beam_mass = pmass(2) + else + beam_mass = m2 + endif ebi(0) = p(0,2)/xbk(2) ! this assumes that particle 2 is massless or mass equal to beam ebi(1) = 0 ebi(2) = 0 - ebi(3) = -1d0*DSQRT(ebi(0)**2-local_mass**2) + ebi(3) = -1d0*DSQRT(ebi(0)**2-beam_mass**2) ebo(0) = ebeam(2) ebo(1) = 0 ebo(2) = 0 - ebo(3) = -1d0*DSQRT(ebo(0)**2-local_mass**2) + ebo(3) = -1d0*DSQRT(ebo(0)**2-beam_mass**2) beta = get_betaz(ebi, ebo) if (xbk(2).eq.1d0) then pb(0,isym(2,jsym)) = ebo(0) @@ -701,6 +700,21 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) write(*,*) 'Warning bad x1 or x2 in write_leshouche', $ xbk(1),xbk(2) endif + do j=1,nexternal + call zboost_with_beta(p(0,j),beta,pb(0,isym(j,jsym))) + pb(4,isym(j,jsym))=pmass(j) + enddo + + ! check for numerical_accuracy + if (pb(0,1).gt.ebeam(1).or.pb(0,2).gt.ebeam(2))then + ! go back to old method --more accurate when boosting with xbk close to one-- + eta = sqrt(xbk(1)*ebeam(1)/(xbk(2)*ebeam(2))) + pboost(0)=p(0,1)*(eta + 1d0/eta) + pboost(3)=p(0,1)*(eta - 1d0/eta) + do j=1,nexternal + call boostx(p(0,j),pboost,pb(0,isym(j,jsym))) + enddo + endif else do j=1,nexternal call boostx(p(0,j),pboost,pb(0,isym(j,jsym))) @@ -709,6 +723,8 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) enddo endif + + if (IMIRROR.eq.2.and.pmass(1).ne.pmass(2)) then c Note that in this context isym(1,jsym) should never be "2" since the mass differ pb(4,isym(1,jsym))=pmass(2) 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..2efb5954a6 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] @@ -1991,6 +1991,11 @@ def default_setup(self): self.add_param("PartonLevel:FSRinResonances", True, hidden=True, always_write_to_card=False, comment="Do not allow shower to run from decay product of unstable particle") self.add_param("ProcessLevel:resonanceDecays", True, hidden=True, always_write_to_card=False, comment="Do not allow unstable particle to decay.") + # Parameters only needed for main164 type of run (not pythia8/MG5 interface) + self.add_param("Main:HepMC", True, hidden=True, always_write_to_card=False, + comment="""Specify the type of output to be used by the main164 run. """) + self.add_param("HepMC:output", 'hepmc.gz', hidden=True, always_write_to_card=False, + comment="Specify the HepMC output file to be used by the main164 run.") # Add parameters controlling the subruns execution flow. # These parameters should not be part of PY8SubRun daughter. self.add_default_subruns('parameters') @@ -2087,8 +2092,10 @@ def MadGraphSet(self, name, value, **opts): force = False if name.lower() not in self or (force or name.lower() not in self.user_set): self.__setitem__(name, value, change_userdefine=False, **opts) - self.system_set.add(name.lower()) - + self.system_set.add(name.lower()) + else: + raise Exception("The parameter %s is already set to %s. You can not change it." % (name, self[name])) + def defaultSet(self, name, value, **opts): self.__setitem__(name, value, change_userdefine=False, **opts) @@ -2144,9 +2151,19 @@ def pythia8_formatting(value, formatv=None): else: return ','.join([PY8Card.pythia8_formatting(arg) for arg in value]) + #change of name convention between MG5 old interface and main164 from Pythia8 + interface_to_164 = {'HEPMCoutput:file': 'HepMC:output', + 'SysCalc:fullCutVariation': '!SysCalc:fullCutVariation (not supported with 164)', + 'SysCalc:qCutList': '!SysCalc:qCutList (not supported with 164)', + 'SysCalc:qWeed': '!SysCalc:qWeed (not supported with 164)', + 'SysCalc:tmsList': '!SysCalc:tmsList (not supported with 164)', + 'HEPMCoutput:scaling' : '!HEPMCoutput :scaling (not supported with 164)', + 'LHEFInputs:nSubruns' : 'Main:numberOfSubruns'} + def write(self, output_file, template, read_subrun=False, - print_only_visible=False, direct_pythia_input=False, add_missing=True): + print_only_visible=False, direct_pythia_input=False, add_missing=True, + use_mg5amc_py8_interface=False): """ Write the card to output_file using a specific template. > 'print_only_visible' specifies whether or not the hidden parameters should be written out if they are in the hidden_params_to_always_write @@ -2155,7 +2172,12 @@ def write(self, output_file, template, read_subrun=False, in the self.visible_params_to_always_write list and are not user_set or system_set are commented. > If 'add_missing' is False then parameters that should be written_out but are absent - from the template will not be written out.""" + from the template will not be written out. + > use_mg5amc_py8_interface is a flag to indicate that the MG5aMC-PY8 interface is used or not + if not used some parameters need to be translated from the old convention to the new one + """ + + self.use_mg5amc_py8_interface = use_mg5amc_py8_interface # First list the visible parameters visible_param = [p for p in self if p.lower() not in self.hidden_param @@ -2297,7 +2319,16 @@ def group_params(params): else: # Just copy parameters which don't need to be specified if param.lower() not in self.params_to_never_write: - output.write(line) + + if not use_mg5amc_py8_interface and direct_pythia_input and \ + param in self.interface_to_164: + param_entry = self.interface_to_164[param.strip()] + # special case for HepMC needs two flags + if 'HepMC:output' == param_entry: + output.write(' %s=%s\n'%('Main:HepMC', 'on')) + output.write('%s=%s\n'%(param_entry,new_value)) + else: + output.write(line) else: output.write('! The following parameter was forced to be commented out by MG5aMC.\n') output.write('! %s'%line) @@ -2313,6 +2344,7 @@ def group_params(params): if ((not direct_pythia_input) or (param.lower() in self.visible_params_to_always_write) or (param.lower() in self.user_set) or + (param.lower() in self.hidden_params_to_always_write) or (param.lower() in self.system_set)): template = '%s=%s' else: @@ -2321,6 +2353,19 @@ def group_params(params): # then they shouldn't be passed to Pythia template = '!%s=%s' + if not use_mg5amc_py8_interface and direct_pythia_input and \ + param in self.interface_to_164: + param_entry = self.interface_to_164[param] + # special case for HepMC needs two flags + if 'HepMC:output' == param_entry: + output.write(' %s=%s\n'%('Main:HepMC', 'on')) + if 'Main:InternalAnalysis'.lower() in self.user_set and \ + self['Main:InternalAnalysis'].lower() == 'on': + output.write('InternalAnalysis:output = ./djrs.dat\n') + + #elif param in self.interface_to_164.values() and not direct_pythia_input: + # misc.sprint(use_mg5amc_py8_interface, direct_pythia_input,param) + # raise Exception('The parameter %s is not supported in the MG5aMC-PY8 interface. Please use the new interface.'%param_entry output.write(template%(param_entry, value_entry.replace(value,new_value))) @@ -2365,6 +2410,8 @@ def group_params(params): comment = '\n'.join('! %s'%c for c in self.comments[param.lower()].split('\n')) output.write(comment+'\n') + if not use_mg5amc_py8_interface and param in self.interface_to_164: + continue output.write('%s=%s\n'%(param,PY8Card.pythia8_formatting(self[param]))) # Don't close the file if we were reading a subrun, but simply write @@ -3318,7 +3365,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 +3372,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 @@ -4050,8 +4095,8 @@ def post_set_fixed_fac_scale(card, value, change_userdefine, raiseerror, **opt): if 'fixed_fac_scale2' in card.user_set: card.user_set.remove('fixed_fac_scale2') - # #card['pdlabel1'] = value - # #card['pdlabel2'] = value + dict.__setitem__(card, 'fixed_fac_scale1', card['fixed_fac_scale']) + dict.__setitem__(card, 'fixed_fac_scale2', card['fixed_fac_scale']) @staticmethod def post_set(card, value, change_userdefine, raiseerror, name='unknown', **opt): @@ -4201,6 +4246,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 @@ -4451,11 +4497,11 @@ def check_validity(self): time.sleep(5) if self['drjj'] != 0: if 'drjj' in self.user_set: - logger.warning('Since icckw>0, changing the value of \'drjj\' to 0') + logger.warning('Since ickkw>0, changing the value of \'drjj\' to 0') self['drjj'] = 0 if self['drjl'] != 0: if 'drjl' in self.user_set: - logger.warning('Since icckw>0, changing the value of \'drjl\' to 0') + logger.warning('Since ickkw>0, changing the value of \'drjl\' to 0') self['drjl'] = 0 if not self['auto_ptj_mjj']: if self['mmjj'] > self['xqcut']: @@ -4753,7 +4799,6 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): self['fixed_fac_scale1'] = True self['nhel'] = 1 for i in beam_id_split[1]: - exit if abs(i) == 11: self['lpp1'] = -math.copysign(3,i) self['lpp2'] = math.copysign(3,i) @@ -5577,6 +5622,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 +5838,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/cluster.py b/epochX/cudacpp/gg_ttggg.mad/bin/internal/cluster.py index 95ef45b5f3..66069293d2 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/cluster.py +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/cluster.py @@ -602,6 +602,7 @@ def __init__(self, *args, **opt): self.submitted = six.moves.queue.Queue() # one entry by job submitted self.stoprequest = threading.Event() #flag to ensure everything to close self.demons = [] + self.gpus_list = [] self.nb_done =0 if 'nb_core' in opt: self.nb_core = opt['nb_core'] @@ -623,23 +624,46 @@ def __init__(self, *args, **opt): self.done_pid_queue = six.moves.queue.Queue() self.fail_msg = None + mg5_gpu_env_str = 'MG5_GPU_VISIBLE_DEVICES' + gpu_variables = [['NVIDIA_VISIBLE_DEVICES', 'CUDA_VISIBLE_DEVICES'], + ['ROCR_VISIBLE_DEVICES', 'HIP_VISIBLE_DEVICES'],] + if mg5_gpu_env_str in os.environ: + new_var = os.environ[mg5_gpu_env_str].split(',') + if len(new_var) == 2: + gpu_variables.insert(0, new_var) + else: + logger.error('Invalid format for %s=%s, it should be a comma-separated list of two elements' % (mg5_gpu_env_str, os.environ[mg5_gpu_env_str])) + for get_var,set_var in gpu_variables: + if get_var in os.environ: + self.gpus_list = os.environ.get(get_var).split(',') + self.gpu_set_var = set_var + self.gpus_count = len(self.gpus_list) + logger.info('Found %s GPUs: %s' % (self.gpus_count, self.gpus_list)) def start_demon(self): import threading - t = threading.Thread(target=self.worker) + env2 = None + if len(self.gpus_list): + env2 = os.environ.copy() + this_gpu_idx = len(self.demons) % self.gpus_count + env2[self.gpu_set_var] = self.gpus_list[this_gpu_idx] + t = threading.Thread(target=self.worker, kwargs={'env2': env2}) + else: + t = threading.Thread(target=self.worker) t.daemon = True t.start() self.demons.append(t) - def worker(self): + def worker(self, env2=None): import six.moves.queue import six.moves._thread while not self.stoprequest.isSet(): try: args = self.queue.get(timeout=10) tag, exe, arg, opt = args + opt['env'] = env2 try: # check for executable case if isinstance(exe,str): 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..69291df0d4 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): @@ -1463,11 +1463,15 @@ def create_plot(self, mode='parton', event_path=None, output=None, tag=None): self.run_name, '%s_pts.dat' % tag) for observable_name, data_path in [('djr',djr_path), ('pt',pt_path)]: - if not self.generate_Pythia8_HwU_plots( + try: + if not self.generate_Pythia8_HwU_plots( PY8_plots_root_path, merging_scale_name, observable_name,data_path): - return False - + return False + except Exception as error: + if os.path.exists(data_path): + logger.info('plot information present in %s' % data_path) + return True if mode == 'Pythia8': plot_files = glob.glob(pjoin(PY8_plots_root_path,'*.gnuplot')) if not misc.which('gnuplot'): @@ -1964,12 +1968,16 @@ def do_systematics(self, line): self.cluster.wait(os.path.dirname(output), update_status, update_first=update_status) except Exception: self.cluster.remove() + for i in range(nb_submit): + os.remove('%s/tmp_%s_%s' %(os.path.dirname(output),i,os.path.basename(output))) old_run_mode = self.options['run_mode'] self.options['run_mode'] =0 + out =False try: out = self.do_systematics(line) finally: self.options['run_mode'] = old_run_mode + return out #collect the data all_cross = [] for i in range(nb_submit): @@ -1995,18 +2003,21 @@ def do_systematics(self, line): self.run_card['event_norm'] in ['unity']: all_cross= [cross/nb_event for cross in all_cross] - sys_obj = systematics.call_systematics([input, None] + opts, - log=lambda x: logger.info(str(x)), - result=result_file, - running=False - ) + + sys_obj = systematics.call_systematics([input, None] + opts, + log=lambda x: logger.info(str(x)), + result=result_file, + running=False + ) + sys_obj.print_cross_sections(all_cross, nb_event, result_file) - + #concatenate the output file subprocess.call(['cat']+\ ['./tmp_%s_%s' % (i, os.path.basename(output)) for i in range(nb_submit)], stdout=open(output,'w'), cwd=os.path.dirname(output)) + for i in range(nb_submit): os.remove('%s/tmp_%s_%s' %(os.path.dirname(output),i,os.path.basename(output))) # os.remove('%s/log_sys_%s.txt' % (os.path.dirname(output),i)) @@ -3831,7 +3842,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 +5146,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 +6751,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 +6775,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 +6826,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..6fbdd98100 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': @@ -1858,6 +1855,8 @@ def parse_histos_from_PY8_XML_stream(self, stream, run_id=None, # If merging cut is negative, then pick only the one of the central scale # If not specified, then take them all but use the PDF and scale weight # of the central merging_scale for the variation. + if not all_weights: + raise MadGraph5Error('No weights were found in the HwU XML source.') if merging_scale is None or merging_scale < 0.0: merging_scale_chosen = all_weights[2]['MERGING'] else: @@ -2480,14 +2479,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 +2738,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 +2877,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 +2889,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 +2898,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 +2907,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 +2916,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..b1739da73d 100644 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/launch_plugin.py +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/launch_plugin.py @@ -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: O. Mattelaer (Aug 2023) for the MG5aMC CUDACPP plugin. -# Further modified by: O. Mattelaer, A. Valassi (2024) for the MG5aMC CUDACPP plugin. +# Further modified by: O. Mattelaer, A. Valassi, Z. Wettersten (2024-2025) for the MG5aMC CUDACPP plugin. import logging import os @@ -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') @@ -133,7 +133,8 @@ def default_setup(self): super().default_setup() # change default value: self['cudacpp_backend'] = 'cuda' - self['vector_size'] = 16384 # already setup in default class (just change value) + self['vector_size'] = 32 # ZW: default to 32, might want to change to 64 to utilise AMD GPUs better as well # 16384 # already setup in default class (just change value) + self['nb_warp'] = 512 # number of warps per kernel call, for now setting to 16 384 / vector_size MEINTERFACE = CPPMEInterface RunCard = CPPRunCard 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..81d17f7cb1 100755 --- a/epochX/cudacpp/gg_ttggg.mad/bin/internal/lhe_parser.py +++ b/epochX/cudacpp/gg_ttggg.mad/bin/internal/lhe_parser.py @@ -1035,12 +1035,12 @@ def define_init_banner(self, wgt, lha_strategy, proc_charac=None): from_init = True if not from_init: - if group in grouped_cross: - grouped_cross[group] += self.allcross[i] - grouped_error[group] += self.error[i]**2 + if int(group) in grouped_cross: + grouped_cross[int(group)] += self.allcross[i] + grouped_error[int(group)] += self.error[i]**2 else: - grouped_cross[group] = self.allcross[i] - grouped_error[group] = self.error[i]**2 + grouped_cross[int(group)] = self.allcross[i] + grouped_error[int(group)] = self.error[i]**2 else: ban = banner_mod.Banner(ff.banner) for line in ban['init'].split('\n'): @@ -1048,11 +1048,11 @@ def define_init_banner(self, wgt, lha_strategy, proc_charac=None): if len(splitline)==4: cross, error, _, group = splitline if int(group) in grouped_cross: - grouped_cross[group] += float(cross) - grouped_error[group] += float(error)**2 + grouped_cross[int(group)] += float(cross) + grouped_error[int(group)] += float(error)**2 else: - grouped_cross[group] = float(cross) - grouped_error[group] = float(error)**2 + grouped_cross[int(group)] = float(cross) + grouped_error[int(group)] = float(error)**2 nb_group = len(grouped_cross) # compute the information for the first line @@ -1086,6 +1086,8 @@ def define_init_banner(self, wgt, lha_strategy, proc_charac=None): self.seek(0) if init_information["idbmup2"] in [0,9]: event = next(self) + if len(event) == 0: + event = Event(str(event)) init_information["idbmup2"] = event[1].pdg self.seek(0) @@ -2166,10 +2168,13 @@ def check(self): abspz += abs(particle.pz) # check mass fourmass = FourMomentum(particle).mass - - if particle.mass and (abs(particle.mass) - fourmass)/ abs(particle.mass) > threshold: - raise Exception( "Do not have correct mass lhe: %s momentum: %s (error at %s" % (particle.mass, fourmass, (abs(particle.mass) - fourmass)/ abs(particle.mass))) - + if particle.mass: + expected = (particle.E - math.sqrt(particle.E**2 -particle.mass**2))/particle.E + if expected > 1e-8: + mass_threshold = particle.E**2 - (particle.E-threshold)**2 + if (abs(particle.mass) - fourmass)/ mass_threshold > 5: + raise Exception( "Do not have correct mass lhe: %s momentum: %s (error at %s" % (particle.mass, fourmass, (abs(particle.mass) - fourmass)/ abs(particle.mass))) + if E/absE > threshold: logger.critical(self) @@ -2953,8 +2958,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..4d5597c722 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) @@ -2827,10 +2827,10 @@ def print_results_in_shell(self, data): logger.info(" Nb of events after matching/merging : %d" % int(data['nb_event_pythia'])) if self.run_card['use_syst'] in self.true and \ (int(self.run_card['ickkw'])==1 or self.run_card['ktdurham']>0.0 - or self.run_card['ptlund']>0.0): + or self.run_card['ptlund']>0.0) and data['cross_pythia'] == -1: logger.info(" Notice that because Systematics computation is turned on, the merging did not veto events but modified their weights instead.\n"+\ " The resulting hepmc/stdhep file should therefore be use with those weights.") - else: + elif data['cross_pythia'] == -1: logger.info(" Nb of events after merging : %s" % data['nb_event_pythia']) logger.info(" " ) @@ -3055,6 +3055,7 @@ def do_multi_run(self, line): crossoversig = 0 inv_sq_err = 0 nb_event = 0 + madspin = False for i in range(nb_run): self.nb_refine = 0 self.exec_cmd('generate_events %s_%s -f' % (main_name, i), postcmd=False) @@ -3067,6 +3068,8 @@ def do_multi_run(self, line): inv_sq_err+=1.0/error**2 self.results[main_name][-1]['cross'] = crossoversig/inv_sq_err self.results[main_name][-1]['error'] = math.sqrt(1.0/inv_sq_err) + if 'decayed' in self.run_name: + madspin = True self.results.def_current(main_name) self.run_name = main_name self.update_status("Merging LHE files", level='parton') @@ -3074,9 +3077,12 @@ def do_multi_run(self, line): os.mkdir(pjoin(self.me_dir,'Events', self.run_name)) except Exception: pass - os.system('%(bin)s/merge.pl %(event)s/%(name)s_*/unweighted_events.lhe.gz %(event)s/%(name)s/unweighted_events.lhe.gz %(event)s/%(name)s_banner.txt' + + os.system('%(bin)s/merge.pl %(event)s/%(name)s_*%(madspin)s/unweighted_events.lhe.gz %(event)s/%(name)s/unweighted_events.lhe.gz %(event)s/%(name)s_banner.txt' % {'bin': self.dirbin, 'event': pjoin(self.me_dir,'Events'), - 'name': self.run_name}) + 'name': self.run_name, + 'madspin': '_decayed_*' if madspin else '' + }) eradir = self.options['exrootanalysis_path'] if eradir and misc.is_executable(pjoin(eradir,'ExRootLHEFConverter')): @@ -3656,9 +3662,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'))) @@ -3757,6 +3765,8 @@ def split(a, n): k, m = divmod(len(a), n) return (a[i*k+min(i, m):(i+1)*k+min(i+1, m)] for i in range(n)) + Gdirs = self.remove_empty_events(Gdirs) + partials_info = [] if len(Gdirs) >= max_G: start_unweight= time.perf_counter() @@ -3786,7 +3796,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, @@ -4223,7 +4233,7 @@ def mg5amc_py8_interface_consistency_warning(options): return None - def setup_Pythia8RunAndCard(self, PY8_Card, run_type): + def setup_Pythia8RunAndCard(self, PY8_Card, run_type, use_mg5amc_py8_interface): """ Setup the Pythia8 Run environment and card. In particular all the process and run specific parameters of the card are automatically set here. This function returns the path where HEPMC events will be output, if any.""" @@ -4338,10 +4348,10 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): PY8_Card.systemSet('Beams:setProductionScalesFromLHEF',True) # Automatically set qWeed to xqcut if not defined by the user. - if PY8_Card['SysCalc:qWeed']==-1.0: + if use_mg5amc_py8_interface and PY8_Card['SysCalc:qWeed']==-1.0: PY8_Card.MadGraphSet('SysCalc:qWeed',self.run_card['xqcut'], force=True) - if PY8_Card['SysCalc:qCutList']=='auto': + if use_mg5amc_py8_interface and PY8_Card['SysCalc:qCutList']=='auto': if self.run_card['use_syst']: if self.run_card['sys_matchscale']=='auto': qcut = PY8_Card['JetMatching:qCut'] @@ -4368,7 +4378,7 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): # Specific MLM settings # PY8 should not implement the MLM veto since the driver should do it # if merging scale variation is turned on - if self.run_card['use_syst']: + if use_mg5amc_py8_interface and self.run_card['use_syst']: # We do no force it here, but it is clear that the user should know what # he's doing if he were to force it to True. PY8_Card.MadGraphSet('JetMatching:doVeto',False) @@ -4444,7 +4454,7 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): PY8_Card.MadGraphSet('SpaceShower:pTmaxMatch',1) PY8_Card.MadGraphSet('SpaceShower:rapidityOrder',False) # PY8 should not implement the CKKW veto since the driver should do it. - if self.run_card['use_syst']: + if use_mg5amc_py8_interface and self.run_card['use_syst']: # We do no force it here, but it is clear that the user should know what # he's doing if he were to force it to True. PY8_Card.MadGraphSet('Merging:applyVeto',False) @@ -4516,6 +4526,12 @@ def do_pythia8(self, line): else: no_default = False + if '--old_interface' in args: + use_mg5amc_py8_interface = True + args.remove('--old_interface') + else: + use_mg5amc_py8_interface = False + if not self.run_name: self.check_pythia8(args) self.configure_directory(html_opening =False) @@ -4545,20 +4561,27 @@ def do_pythia8(self, line): #"Please use 'event_norm = average' in the run_card to avoid this problem.") - - if not self.options['mg5amc_py8_interface_path'] or not \ - os.path.exists(pjoin(self.options['mg5amc_py8_interface_path'], - 'MG5aMC_PY8_interface')): - raise self.InvalidCmd( -"""The MG5aMC_PY8_interface tool cannot be found, so that MadEvent cannot steer Pythia8 shower. -Please install this tool with the following MG5_aMC command: - MG5_aMC> install mg5amc_py8_interface_path""") + if use_mg5amc_py8_interface: + if not self.options['mg5amc_py8_interface_path'] or not \ + os.path.exists(pjoin(self.options['mg5amc_py8_interface_path'], + 'MG5aMC_PY8_interface')): + raise self.InvalidCmd( + """The MG5aMC_PY8_interface tool cannot be found, so that MadEvent cannot steer Pythia8 shower. + Please install this tool with the following MG5_aMC command: + MG5_aMC> install mg5amc_py8_interface_path""") + else: + pythia_main = pjoin(self.options['mg5amc_py8_interface_path'], + 'MG5aMC_PY8_interface') + warnings = MadEventCmd.mg5amc_py8_interface_consistency_warning(self.options) + if warnings: + logger.warning(warnings) else: - pythia_main = pjoin(self.options['mg5amc_py8_interface_path'], - 'MG5aMC_PY8_interface') - warnings = MadEventCmd.mg5amc_py8_interface_consistency_warning(self.options) - if warnings: - logger.warning(warnings) + pythia_main = pjoin(self.options['pythia8_path'], 'share', 'Pythia8', 'examples', 'main164') + if not os.path.exists(pythia_main): + pythia_main = pjoin(self.options['pythia8_path'], 'examples', 'main164') + if not os.path.exists(pythia_main): + logger.warning('main164 not found (or not compiled). Will try the old interface instead.') + return self.do_pythia8(line + ' --old_interface') self.results.add_detail('run_mode', 'madevent') @@ -4583,14 +4606,19 @@ def do_pythia8(self, line): run_type = 'CKKW' # Edit the card and run environment according to the run specification - HepMC_event_output = self.setup_Pythia8RunAndCard(PY8_Card, run_type) + HepMC_event_output = self.setup_Pythia8RunAndCard(PY8_Card, run_type, use_mg5amc_py8_interface=use_mg5amc_py8_interface) + + if not use_mg5amc_py8_interface and self.options['run_mode']==0 or (self.options['run_mode']==2 and self.options['nb_core']==1): + PY8_Card['Main:numberOfEvents']= self.run_card['nevents'] + # Now write the card. pythia_cmd_card = pjoin(self.me_dir, 'Events', self.run_name , '%s_pythia8.cmd' % tag) cmd_card = StringIO.StringIO() PY8_Card.write(cmd_card,pjoin(self.me_dir,'Cards','pythia8_card_default.dat'), - direct_pythia_input=True) + direct_pythia_input=True, + use_mg5amc_py8_interface=use_mg5amc_py8_interface) # Now setup the preamble to make sure that everything will use the locally # installed tools (if present) even if the user did not add it to its @@ -4632,7 +4660,7 @@ def do_pythia8(self, line): " command '/usr/bin/env %s' exists and returns a valid path."%shell) exe_cmd = "#!%s\n%s"%(shell_exe,' '.join( - [preamble+pythia_main, + [preamble+pythia_main, '' if use_mg5amc_py8_interface else '-c', os.path.basename(pythia_cmd_card)])) wrapper.write(exe_cmd) @@ -4699,6 +4727,7 @@ def do_pythia8(self, line): n_cores = max(min(min_n_core,n_cores),1) if self.options['run_mode']==0 or (self.options['run_mode']==2 and self.options['nb_core']==1): + # No need for parallelization anymore self.cluster = None logger.info('Follow Pythia8 shower by running the '+ @@ -4744,20 +4773,22 @@ def do_pythia8(self, line): ParallelPY8Card.subruns[0].systemSet('Beams:LHEF','events.lhe.gz') ParallelPY8Card.write(pjoin(parallelization_dir,'PY8Card.dat'), pjoin(self.me_dir,'Cards','pythia8_card_default.dat'), - direct_pythia_input=True) + direct_pythia_input=True, + use_mg5amc_py8_interface=use_mg5amc_py8_interface) # Write the wrapper wrapper_path = pjoin(parallelization_dir,'run_PY8.sh') wrapper = open(wrapper_path,'w') if self.options['cluster_temp_path'] is None: exe_cmd = \ -"""#!%s -./%s PY8Card.dat >& PY8_log.txt -""" +"""#!%%s +./%%s %s PY8Card.dat >& PY8_log.txt +""" % ('' if use_mg5amc_py8_interface else '-c') + else: exe_cmd = \ -"""#!%s +"""#!%%s ln -s ./events_$1.lhe.gz ./events.lhe.gz -./%s PY8Card_$1.dat >& PY8_log.txt +./%%s %s PY8Card_$1.dat >& PY8_log.txt mkdir split_$1 if [ -f ./events.hepmc ]; then @@ -4776,7 +4807,7 @@ def do_pythia8(self, line): mv ./PY8_log.txt ./split_$1/ fi tar -czf split_$1.tar.gz split_$1 -""" +""" % ('' if use_mg5amc_py8_interface else '-c') exe_cmd = exe_cmd%(shell_exe,os.path.basename(pythia_main)) wrapper.write(exe_cmd) wrapper.close() @@ -4812,19 +4843,27 @@ def do_pythia8(self, line): pjoin(parallelization_dir,split_files[-1])) logger.info('Submitting Pythia8 jobs...') + for i, split_file in enumerate(split_files): # We must write a PY8Card tailored for each split so as to correct the normalization # HEPMCoutput:scaling of each weight since the lhe showered will not longer contain the # same original number of events - split_PY8_Card = banner_mod.PY8Card(pjoin(parallelization_dir,'PY8Card.dat')) + split_PY8_Card = banner_mod.PY8Card(pjoin(parallelization_dir,'PY8Card.dat'), setter='user') + assert split_PY8_Card['JetMatching:nJetMax'] == PY8_Card['JetMatching:nJetMax'] + + + # Make sure to sure the number of split_events determined during the splitting. - split_PY8_Card.systemSet('Main:numberOfEvents',partition_for_PY8[i]) + split_PY8_Card.systemSet('Main:numberOfEvents',partition_for_PY8[i], force=True) + assert split_PY8_Card['Main:numberOfEvents'] == partition_for_PY8[i] split_PY8_Card.systemSet('HEPMCoutput:scaling',split_PY8_Card['HEPMCoutput:scaling']* - (float(partition_for_PY8[i]))) + (float(partition_for_PY8[i])), force=True) # Add_missing set to False so as to be sure not to add any additional parameter w.r.t # the ones in the original PY8 param_card copied. split_PY8_Card.write(pjoin(parallelization_dir,'PY8Card_%d.dat'%i), - pjoin(parallelization_dir,'PY8Card.dat'), add_missing=False) + pjoin(parallelization_dir,'PY8Card.dat'), add_missing=False, + direct_pythia_input=True, + use_mg5amc_py8_interface=use_mg5amc_py8_interface) in_files = [pjoin(parallelization_dir,os.path.basename(pythia_main)), pjoin(parallelization_dir,'PY8Card_%d.dat'%i), pjoin(parallelization_dir,split_file)] @@ -5073,7 +5112,7 @@ def wait_monitoring(Idle, Running, Done): # works both for fixed number of generated events and fixed accepted events self.results.add_detail('error_pythia', error_m) - if self.run_card['use_syst']: + if self.run_card['use_syst'] and use_mg5amc_py8_interface: self.results.add_detail('cross_pythia', -1) self.results.add_detail('error_pythia', 0) @@ -6132,7 +6171,102 @@ def get_Gdir(self, Pdir=None, symfact=None): mfactors[pjoin(P, "G%s" % tag)] = mfactor self.Gdirs = (Gdirs, mfactors) return self.get_Gdir(Pdir, symfact=symfact) + + ############################################################################ + def remove_empty_events(self, Gdir): + """return Gdir strip from the one providing empty events.lhe files.""" + + reasons = collections.defaultdict(list) + Gdirs = Gdir[:] + for G in Gdirs[:]: + try: + size = os.path.getsize(pjoin(G, 'events.lhe')) + except Exception as error: + size = 0 + if size <10: + Gdirs.remove(G) + try: + log = misc.BackRead(pjoin(G, 'log.txt')) + except Exception as error: + log = misc.BackRead(pjoin(G, 'run1_app.log')) + found = -1 + for line in log: + if 'Deleting file events.lhe' in line: + found = 0 + elif "Impossible BW configuration" in line: + reasons['bwconfig'].append(G) + break + elif found < -150: + reasons['not found'].append(G) + Gdirs.append(G) + break + elif found < 0: + found -= 1 + elif 'Loosen cuts or increase max_events' in line: + reasons['cuts'].append(G) + break + elif 'all returned zero' in line: + reasons['zero'].append(G) + break + elif found > 5: + reasons['unknown'].append(G) + break + else: + found += 1 + + if len(reasons): + logger.debug('Reasons for empty events.lhe:') + if len(reasons['unknown']): + logger.debug(' - unknown: %s' % len(reasons['unknown'])) + logger.log(10, ' DETAIL:' + ','.join(['/'.join(G.rsplit(os.sep)[-2:]) for G in reasons['unknown'][:10]])) + if len(reasons['not found']): + logger.debug(' - not found in log: %s' % len(reasons['not found'])) + logger.log(10, ' DETAIL:' + ','.join(['/'.join(G.rsplit(os.sep)[-2:]) for G in reasons['not found'][:10]])) + if len(reasons['zero']): + logger.debug(' - zero amplitudes: %s' % len(reasons['zero'])) + logger.log(10, ' DETAIL:' + ','.join(['/'.join(G.rsplit( os.sep)[-2:]) for G in reasons['zero'][:10]])) + if len(reasons['bwconfig']): + critical_bwconfig = set() + for G in reasons['bwconfig']: + base = G.rsplit('.',1)[0] + if any(G2.startswith(base) for G2 in Gdirs): + continue + else: + critical_bwconfig.add(os.sep.join(base.rsplit(os.sep)[-2:])) + for G in critical_bwconfig: + logger.warning('Gdirectory %s has no events.lhe file. (no BW config found %s times)' % G) + + logger.debug(' - impossible BW configuration: %s' % len(reasons['bwconfig'])) + logger.debug(' - channel with no possible BW configuration: %s' % len(critical_bwconfig)) + + if len(reasons['cuts']): + critical_nb_cuts = collections.defaultdict(int) + for G in reasons['cuts']: + if '.' in os.path.basename(G): + base = G.rsplit('.',1)[0] + if any(G2.startswith(base) for G2 in Gdirs): + continue + else: + critical_nb_cuts[os.sep.join(base.rsplit(os.sep)[-2:])] += 1 + else: + critical_nb_cuts[''] += 1 + logger.warning('Gdirectory %s has no events.lhe file. (no points passed cuts found)' % G) + for G, nb in critical_nb_cuts.items(): + if not G: + continue + else: + logger.warning('%s channel %s.XXX has no events.lhe file. (no points passed cuts). No %s with events detected' % (nb, G, G)) + logger.debug(' - no points passed cuts: %s' % len(reasons['cuts'])) + logger.log(10, ' DETAIL:' + ','.join(['/'.join(G.rsplit(os.sep)[-2:]) for G in reasons['cuts'][:10]])) + logger.debug(' - without any BW handling (critical): %s' % critical_nb_cuts['']) + logger.debug(' - with BW but all zero (critical): %s' % sum([nb for v, nb in critical_nb_cuts.items() if v!=''], 0)) + #logger.debug(' - cuts (with BW conflict where other channel contributes): %s' % (len(reasons['cuts'])- critical_nb_cuts)) + + + return Gdirs + + ############################################################################ def set_run_name(self, name, tag=None, level='parton', reload_card=False, allow_new_tag=True): @@ -6749,7 +6883,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 +6893,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 +7010,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 +7038,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 +7053,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 +7065,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 +7190,13 @@ 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) 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 +7210,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..fe602c5b80 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.3, 2025-06-12 // 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..1f9fb6d469 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.3, 2025-06-12 // 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..505c8839b3 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_ttggg.mad/test/cudacpp_test.mk b/epochX/cudacpp/gg_ttggg.mad/test/cudacpp_test.mk index f703a1ae7c..4934c9a53f 100644 --- a/epochX/cudacpp/gg_ttggg.mad/test/cudacpp_test.mk +++ b/epochX/cudacpp/gg_ttggg.mad/test/cudacpp_test.mk @@ -19,7 +19,7 @@ CXXFLAGS += -Igoogletest/googletest/include/ -std=c++11 all: googletest/$(INSTALLDIR)/lib64/libgtest.a googletest/CMakeLists.txt: - git clone https://github.com/google/googletest.git -b release-1.11.0 googletest + git clone https://github.com/google/googletest.git -b v1.17.0 googletest googletest/$(BUILDDIR)/Makefile: googletest/CMakeLists.txt mkdir -p googletest/$(BUILDDIR) 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/P1_Sigma_sm_gg_ttxggg/CPPProcess.cc b/epochX/cudacpp/gg_ttggg.sa/SubProcesses/P1_Sigma_sm_gg_ttxggg/CPPProcess.cc index 07099839d3..6d19669091 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -32273,7 +32273,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- 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..95817b80da 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.3, 2025-06-12 // 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/cudacpp.mk b/epochX/cudacpp/gg_ttggg.sa/SubProcesses/cudacpp.mk index 20d8ded718..20b8e6b858 100644 --- a/epochX/cudacpp/gg_ttggg.sa/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gg_ttggg.sa/SubProcesses/cudacpp.mk @@ -114,7 +114,7 @@ export CXXFLAGS override CUDA_HOME = $(patsubst %/bin/nvcc,%,$(shell which nvcc 2>/dev/null)) # Set HIP_HOME from the path to hipcc, if it exists -override HIP_HOME = $(patsubst %/bin/hipcc,%,$(shell which hipcc 2>/dev/null)) +override HIP_HOME = $(shell hipconfig --rocmpath) # Configure CUDA_INC (for CURAND and NVTX) and NVTX if a CUDA installation exists (see #965) ifeq ($(CUDA_HOME),) @@ -229,6 +229,8 @@ ifeq ($(BACKEND),cuda) else ifeq ($(BACKEND),hip) + # example architecture values MI200:gfx90a, MI350X:gfx942 + MADGRAPH_HIP_ARCHITECTURE ?= gfx942 # Set GPUCC as $(HIP_HOME)/bin/hipcc (it was already checked above that this exists) GPUCC = $(HIP_HOME)/bin/hipcc XCOMPILERFLAG = @@ -243,7 +245,7 @@ else ifeq ($(BACKEND),hip) ###GPUFLAGS += -ggdb # FOR DEBUGGING ONLY # AMD HIP architecture flags - GPUARCHFLAGS = --offload-arch=gfx90a + GPUARCHFLAGS = --offload-arch=${MADGRAPH_HIP_ARCHITECTURE} GPUFLAGS += $(GPUARCHFLAGS) # Other AMD-specific flags @@ -878,7 +880,7 @@ endif $(gpu_fcheckmain): LIBFLAGS += $(GPULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH $(gpu_fcheckmain): $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBDIR)/lib$(MG5AMC_GPULIB).so $(gpu_objects_exe) ifneq ($(findstring hipcc,$(GPUCC)),) # link fortran/c++/hip using $FC when hipcc is used #802 - $(FC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) -lstdc++ -L$(shell cd -L $(shell dirname $(shell $(GPUCC) -print-prog-name=clang))/../..; pwd)/lib -lamdhip64 + $(FC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) -lstdc++ -L$(HIP_HOME)/lib -lamdhip64 else $(GPUCC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) endif @@ -979,7 +981,7 @@ else # link only runTest_$(GPUSUFFIX).o (new: in the past, this was linking both $(gpu_testmain): LIBFLAGS += $(GPULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH $(gpu_testmain): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(gpu_objects_lib) $(gpu_objects_exe) $(GTESTLIBS) ifneq ($(findstring hipcc,$(GPUCC)),) # link fortran/c++/hip using $FC when hipcc is used #802 - $(FC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lstdc++ -lpthread -L$(shell cd -L $(shell dirname $(shell $(GPUCC) -print-prog-name=clang))/../..; pwd)/lib -lamdhip64 + $(FC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lstdc++ -lpthread -L$(HIP_HOME)/lib -lamdhip64 else $(GPUCC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lcuda endif @@ -1104,10 +1106,20 @@ else @cat /proc/cpuinfo | grep "physical id" | sort -u endif @echo "" -ifneq ($(shell which nvidia-smi 2>/dev/null),) - nvidia-smi -L + # some systems may have -smi installed, but it fails to execute + # because it cannot communicate with the hardware + @if nvidia-smi &>/dev/null ; then \ + nvidia-smi -L ;\ + else \ + echo "No Nvidia GPU detected" ;\ + fi @echo "" -endif + @if amd-smi &>/dev/null ; then \ + amd-smi static -a ;\ + amd-smi list ;\ + else \ + echo "No AMD GPU detected" ;\ + fi @echo USECCACHE=$(USECCACHE) ifeq ($(USECCACHE),1) ccache --version | head -1 diff --git a/epochX/cudacpp/gg_ttggg.sa/src/HelAmps_sm.h b/epochX/cudacpp/gg_ttggg.sa/src/HelAmps_sm.h index 53dd560ed6..fe602c5b80 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.3, 2025-06-12 // 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..1f9fb6d469 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.3, 2025-06-12 // 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..505c8839b3 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gg_ttggg.sa/test/cudacpp_test.mk b/epochX/cudacpp/gg_ttggg.sa/test/cudacpp_test.mk index f703a1ae7c..4934c9a53f 100644 --- a/epochX/cudacpp/gg_ttggg.sa/test/cudacpp_test.mk +++ b/epochX/cudacpp/gg_ttggg.sa/test/cudacpp_test.mk @@ -19,7 +19,7 @@ CXXFLAGS += -Igoogletest/googletest/include/ -std=c++11 all: googletest/$(INSTALLDIR)/lib64/libgtest.a googletest/CMakeLists.txt: - git clone https://github.com/google/googletest.git -b release-1.11.0 googletest + git clone https://github.com/google/googletest.git -b v1.17.0 googletest googletest/$(BUILDDIR)/Makefile: googletest/CMakeLists.txt mkdir -p googletest/$(BUILDDIR) diff --git a/epochX/cudacpp/gq_ttq.mad/Cards/ident_card.dat b/epochX/cudacpp/gq_ttq.mad/Cards/ident_card.dat index 0ba87b008f..b37758a42a 100644 --- a/epochX/cudacpp/gq_ttq.mad/Cards/ident_card.dat +++ b/epochX/cudacpp/gq_ttq.mad/Cards/ident_card.dat @@ -2,32 +2,32 @@ ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c written by the UFO converter ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc +mass 5 mdl_MB +mass 6 mdl_MT +mass 15 mdl_MTA +mass 23 mdl_MZ +mass 25 mdl_MH +sminputs 1 aEWM1 +sminputs 2 mdl_Gf +sminputs 3 aS +yukawa 5 mdl_ymb +yukawa 6 mdl_ymt +yukawa 15 mdl_ymtau - - +decay 6 mdl_WT decay 23 mdl_WZ + decay 24 mdl_WW + decay 25 mdl_WH -decay 6 mdl_WT -mass 15 mdl_MTA -mass 23 mdl_MZ -mass 25 mdl_MH -mass 5 mdl_MB -mass 6 mdl_MT -sminputs 1 aEWM1 -sminputs 2 mdl_Gf -sminputs 3 aS -yukawa 15 mdl_ymtau -yukawa 5 mdl_ymb -yukawa 6 mdl_ymt diff --git a/epochX/cudacpp/gq_ttq.mad/Cards/me5_configuration.txt b/epochX/cudacpp/gq_ttq.mad/Cards/me5_configuration.txt index 68b4c46295..fa8d3481a2 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 = /home/dmass/Development/madgraph4gpu/amd-ci/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo +mg5_path = /home/dmass/Development/madgraph4gpu/amd-ci/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..f2b140ee27 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.3 2025-06-12 * #* * #* WARNING: UNKNOWN DEVELOPMENT VERSION. * #* WARNING: DO NOT USE FOR PRODUCTION * @@ -35,17 +35,18 @@ set loop_color_flows False set max_npoint_for_channel 0 set default_unset_couplings 99 set max_t_for_channel 99 +set zerowidth_tchannel True set nlo_mixed_expansion True -set stdout_level DEBUG -set zerowidth_tchannel F -define q = u c d s u~ c~ d~ s~ +import model sm define p = g u c d s u~ c~ d~ s~ define j = g u c d s u~ c~ d~ s~ define l+ = e+ mu+ define l- = e- mu- define vl = ve vm vt define vl~ = ve~ vm~ vt~ +set stdout_level DEBUG +set zerowidth_tchannel F define q = u c d s u~ c~ d~ s~ generate g q > t t~ q -output madevent_simd ../TMPOUT/CODEGEN_mad_gq_ttq --hel_recycling=Fals\ -e --vector_size=32 +output madevent_simd gq_ttq.mad_gen --hel_recycling=False --vector_siz\ +e=32 diff --git a/epochX/cudacpp/gq_ttq.mad/Cards/run_card.dat b/epochX/cudacpp/gq_ttq.mad/Cards/run_card.dat index 66a805e521..47c2051950 100644 --- a/epochX/cudacpp/gq_ttq.mad/Cards/run_card.dat +++ b/epochX/cudacpp/gq_ttq.mad/Cards/run_card.dat @@ -94,11 +94,11 @@ #********************************************************************* # Compilation flag. #********************************************************************* - -O3 -ffast-math -fbounds-check = global_flag ! build flags for all Fortran code (for a fair comparison to cudacpp; default is -O) + -O = global_flag ! fortran optimization flag use for the all code. --fast-math = aloha_flag ! fortran optimization flag for aloha function. Suggestions: '-ffast-math' -O3 = matrix_flag ! fortran optimization flag for matrix.f function. Suggestions: '-O3' - 32 = vector_size ! size of fortran arrays allocated in the multi-event API for SIMD/GPU (VECSIZE_MEMMAX) - 512 = nb_warp ! total number of warp/frontwave + 16 = vector_size ! size of fortran arrays allocated in the multi-event API for SIMD/GPU (VECSIZE_MEMMAX) + 1 = nb_warp ! total number of warp/frontwave #********************************************************************* # Customization (custom cuts/scale/bias/...) * @@ -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..1ac53bb4bd 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.3 \ No newline at end of file diff --git a/epochX/cudacpp/gq_ttq.mad/Source/.make_opts b/epochX/cudacpp/gq_ttq.mad/Source/.make_opts index de3864242b..56ba259c56 100644 --- a/epochX/cudacpp/gq_ttq.mad/Source/.make_opts +++ b/epochX/cudacpp/gq_ttq.mad/Source/.make_opts @@ -102,6 +102,7 @@ endif ifneq ($(lhapdf),) CXXFLAGS += $(shell $(lhapdf) --cppflags) alfas_functions=alfas_functions_lhapdf + alfas_to_clean=alfas_functions.o llhapdf+= $(shell $(lhapdf) --cflags --libs) -lLHAPDF # check if we need to activate c++11 (for lhapdf6.2) ifeq ($(origin CXX),default) @@ -113,10 +114,11 @@ ifneq ($(lhapdf),) endif else alfas_functions=alfas_functions + alfas_to_clean=alfas_functions_lhapdf.o llhapdf= endif # Helper function to check MG5 version define CHECK_MG5AMC_VERSION python -c 'import re; from distutils.version import StrictVersion; print StrictVersion("$(MG5AMC_VERSION)") >= StrictVersion("$(1)") if re.match("^[\d\.]+$$","$(MG5AMC_VERSION)") else True;' -endef \ No newline at end of file +endef 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..bdf427601f 100644 --- a/epochX/cudacpp/gq_ttq.mad/Source/make_opts +++ b/epochX/cudacpp/gq_ttq.mad/Source/make_opts @@ -1,12 +1,11 @@ DEFAULT_CPP_COMPILER=g++ -DEFAULT_F2PY_COMPILER=f2py3 -DEFAULT_F_COMPILER=gfortran -GLOBAL_FLAG=-O3 -ffast-math -fbounds-check MACFLAG= +STDLIB=-lstdc++ +STDLIB_FLAG= +DEFAULT_F2PY_COMPILER=f2py +DEFAULT_F_COMPILER=gfortran MG5AMC_VERSION=SpecifiedByMG5aMCAtRunTime PYTHIA8_PATH=NotInstalled -STDLIB_FLAG= -STDLIB=-lstdc++ #end_of_make_opts_variables BIASLIBDIR=../../../lib/ @@ -103,6 +102,7 @@ endif ifneq ($(lhapdf),) CXXFLAGS += $(shell $(lhapdf) --cppflags) alfas_functions=alfas_functions_lhapdf +alfas_to_clean=alfas_functions.o llhapdf+= $(shell $(lhapdf) --cflags --libs) -lLHAPDF # check if we need to activate c++11 (for lhapdf6.2) ifeq ($(origin CXX),default) @@ -114,6 +114,7 @@ endif endif else alfas_functions=alfas_functions +alfas_to_clean=alfas_functions_lhapdf.o llhapdf= endif diff --git a/epochX/cudacpp/gq_ttq.mad/Source/makefile b/epochX/cudacpp/gq_ttq.mad/Source/makefile index 291ca907ee..87a9e61723 100644 --- a/epochX/cudacpp/gq_ttq.mad/Source/makefile +++ b/epochX/cudacpp/gq_ttq.mad/Source/makefile @@ -37,10 +37,12 @@ all: $(LIBRARIES) $(LIBDIR)libdhelas.$(libext) $(LIBDIR)libpdf.$(libext) $(LIBDI $(LIBDIR)libdsample.$(libext): $(DSAMPLE) $(call CREATELIB, $@, $^) $(LIBDIR)libgeneric.$(libext): $(GENERIC) + rm -f $@ 2>/dev/null $(call CREATELIB, $@, $^) + rm -f $(alfas_to_clean) 2>/dev/null $(LIBDIR)libdhelas.$(libext): DHELAS cd DHELAS; make; cd .. -$(LIBDIR)libpdf.$(libext): PDF make_opts +$(LIBDIR)libpdf.$(libext): PDF $(alfas_functions).o cd PDF; make; cd .. ifneq (,$(filter edff chff, $(pdlabel1) $(pdlabel2))) $(LIBDIR)libgammaUPC.$(libext): PDF/gammaUPC @@ -73,6 +75,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/vector.inc b/epochX/cudacpp/gq_ttq.mad/Source/vector.inc index ba125272b6..9d8b377aa7 100644 --- a/epochX/cudacpp/gq_ttq.mad/Source/vector.inc +++ b/epochX/cudacpp/gq_ttq.mad/Source/vector.inc @@ -30,6 +30,8 @@ C INTEGER WARP_SIZE PARAMETER (WARP_SIZE=32) INTEGER NB_WARP - PARAMETER (NB_WARP=512) + PARAMETER (NB_WARP=1) INTEGER VECSIZE_MEMMAX - PARAMETER (VECSIZE_MEMMAX=16384) + PARAMETER (VECSIZE_MEMMAX=32) + + 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..1ac53bb4bd 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.3 \ 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/P1_gu_ttxu/CPPProcess.cc b/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu/CPPProcess.cc index 99573ab87a..a6265c03e5 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -610,7 +610,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- 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..621f842e2a 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.3, 2025-06-12 // 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..2d49642e74 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.3, 2025-06-12 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..a45203b57e 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.3, 2025-06-12 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.3, 2025-06-12 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 @@ -528,6 +532,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C Generate events only if IMODE is 0. IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN C Call UNWGT to unweight and store events + ICONFIG = CHANNELS(IVEC) CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) ENDIF diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu/driver.f b/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu/driver.f index c2eadb2c31..10332b6238 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu/driver.f +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gu_ttxu/driver.f @@ -489,7 +489,6 @@ subroutine open_file_local(lun,filename,fopened) fopened=.false. tempname=filename fine=index(tempname,' ') -c fine2=index(path,' ')-1 ! AV remove valgrind "Conditional jump or move depends on uninitialised value(s)" if(fine.eq.0) fine=len(tempname) open(unit=lun,file=tempname,status='old',ERR=20) fopened=.true. 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..645a4d6016 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.3, 2025-06-12 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.3, 2025-06-12 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,31 +431,28 @@ 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 C ---------- IF (FIRST) THEN FIRST=.FALSE. - IF(ZERO.NE.0D0) FK_ZERO = SIGN(MAX(ABS(ZERO), ABS(ZERO - $ *SMALL_WIDTH_TREATMENT)), ZERO) - IF(MDL_WT.NE.0D0) FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT - $ *SMALL_WIDTH_TREATMENT)), MDL_WT) + FK_ZERO = 0D0 + IF(MDL_WT.NE.0D0) THEN + FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT + $ *SMALL_WIDTH_TREATMENT)), MDL_WT) + ELSE + FK_MDL_WT = 0D0 + ENDIF + IF(INIT_MODE) THEN ZEROAMP_1(:,:) = .TRUE. @@ -507,10 +505,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 +519,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/CPPProcess.cc b/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux/CPPProcess.cc index 6dc0abd17c..c888c5eaa1 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -610,7 +610,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- 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..a9969ce30d 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.3, 2025-06-12 // 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..a246f2aab0 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.3, 2025-06-12 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..d50f96bb8d 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.3, 2025-06-12 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.3, 2025-06-12 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 @@ -528,6 +532,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C Generate events only if IMODE is 0. IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN C Call UNWGT to unweight and store events + ICONFIG = CHANNELS(IVEC) CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) ENDIF diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux/driver.f b/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux/driver.f index c2eadb2c31..10332b6238 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux/driver.f +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/P1_gux_ttxux/driver.f @@ -489,7 +489,6 @@ subroutine open_file_local(lun,filename,fopened) fopened=.false. tempname=filename fine=index(tempname,' ') -c fine2=index(path,' ')-1 ! AV remove valgrind "Conditional jump or move depends on uninitialised value(s)" if(fine.eq.0) fine=len(tempname) open(unit=lun,file=tempname,status='old',ERR=20) fopened=.true. 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..cc34d12626 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.3, 2025-06-12 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.3, 2025-06-12 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,31 +431,28 @@ 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 C ---------- IF (FIRST) THEN FIRST=.FALSE. - IF(ZERO.NE.0D0) FK_ZERO = SIGN(MAX(ABS(ZERO), ABS(ZERO - $ *SMALL_WIDTH_TREATMENT)), ZERO) - IF(MDL_WT.NE.0D0) FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT - $ *SMALL_WIDTH_TREATMENT)), MDL_WT) + FK_ZERO = 0D0 + IF(MDL_WT.NE.0D0) THEN + FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT + $ *SMALL_WIDTH_TREATMENT)), MDL_WT) + ELSE + FK_MDL_WT = 0D0 + ENDIF + IF(INIT_MODE) THEN ZEROAMP_1(:,:) = .TRUE. @@ -507,10 +505,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 +519,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/addmothers.f b/epochX/cudacpp/gq_ttq.mad/SubProcesses/addmothers.f index 9a31ed201d..6f32477b9e 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/addmothers.f +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/addmothers.f @@ -21,7 +21,7 @@ subroutine addmothers(ip,jpart,pb,isym,jsym,rscale,aqcd,aqed,buff, integer icol ! color selected integer isym(nexternal,99), jsym - integer i,j,k,ida(2),ns,nres,ires,icl,ito2,idenpart,nc,ic + integer i,j,k,ida(2),ns,nres,ires,icl,ito2,idenpart,ic integer mo_color,da_color(2),itmp integer ito(-nexternal+3:nexternal),iseed,maxcolor,maxorg integer icolalt(2,-nexternal+2:2*nexternal-3) @@ -113,14 +113,15 @@ subroutine addmothers(ip,jpart,pb,isym,jsym,rscale,aqcd,aqed,buff, endif lconfig = vec_igraph1(ivec) endif - + is_LC=.true. + maxcolor=0 c c Choose a color flow which is certain to work with the propagator c structure of the chosen diagram and use that as an alternative c if (icol.eq.0) then do i=1,nexternal - icolalt(1,i)=0 + icolalt(1,i)=0 icolalt(2,i)=0 enddo else diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/cluster.f b/epochX/cudacpp/gq_ttq.mad/SubProcesses/cluster.f index b8995283ed..907894ea89 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/cluster.f +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/cluster.f @@ -556,6 +556,8 @@ logical function cluster(p, ivec) jwin = 0 cluster=.false. clustered=.false. + iwin =0 + jwin =0 do i=0,3 pcmsp(i)=0 enddo @@ -665,8 +667,11 @@ logical function cluster(p, ivec) c initialize graph storage igraphs(0)=0 nleft=nexternal -c cluster - if (iwin.eq.0.or.jwin.eq.0) stop 21 + if(iwin.eq.0.or.jwin.eq.0)then + cluster=.false. + return + endif +c cluster do n=1,nexternal-2 c combine winner imocl(n)=imap(iwin,2)+imap(jwin,2) diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/gq_ttq.mad/SubProcesses/cudacpp.mk index 20d8ded718..20b8e6b858 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/cudacpp.mk @@ -114,7 +114,7 @@ export CXXFLAGS override CUDA_HOME = $(patsubst %/bin/nvcc,%,$(shell which nvcc 2>/dev/null)) # Set HIP_HOME from the path to hipcc, if it exists -override HIP_HOME = $(patsubst %/bin/hipcc,%,$(shell which hipcc 2>/dev/null)) +override HIP_HOME = $(shell hipconfig --rocmpath) # Configure CUDA_INC (for CURAND and NVTX) and NVTX if a CUDA installation exists (see #965) ifeq ($(CUDA_HOME),) @@ -229,6 +229,8 @@ ifeq ($(BACKEND),cuda) else ifeq ($(BACKEND),hip) + # example architecture values MI200:gfx90a, MI350X:gfx942 + MADGRAPH_HIP_ARCHITECTURE ?= gfx942 # Set GPUCC as $(HIP_HOME)/bin/hipcc (it was already checked above that this exists) GPUCC = $(HIP_HOME)/bin/hipcc XCOMPILERFLAG = @@ -243,7 +245,7 @@ else ifeq ($(BACKEND),hip) ###GPUFLAGS += -ggdb # FOR DEBUGGING ONLY # AMD HIP architecture flags - GPUARCHFLAGS = --offload-arch=gfx90a + GPUARCHFLAGS = --offload-arch=${MADGRAPH_HIP_ARCHITECTURE} GPUFLAGS += $(GPUARCHFLAGS) # Other AMD-specific flags @@ -878,7 +880,7 @@ endif $(gpu_fcheckmain): LIBFLAGS += $(GPULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH $(gpu_fcheckmain): $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBDIR)/lib$(MG5AMC_GPULIB).so $(gpu_objects_exe) ifneq ($(findstring hipcc,$(GPUCC)),) # link fortran/c++/hip using $FC when hipcc is used #802 - $(FC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) -lstdc++ -L$(shell cd -L $(shell dirname $(shell $(GPUCC) -print-prog-name=clang))/../..; pwd)/lib -lamdhip64 + $(FC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) -lstdc++ -L$(HIP_HOME)/lib -lamdhip64 else $(GPUCC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) endif @@ -979,7 +981,7 @@ else # link only runTest_$(GPUSUFFIX).o (new: in the past, this was linking both $(gpu_testmain): LIBFLAGS += $(GPULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH $(gpu_testmain): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(gpu_objects_lib) $(gpu_objects_exe) $(GTESTLIBS) ifneq ($(findstring hipcc,$(GPUCC)),) # link fortran/c++/hip using $FC when hipcc is used #802 - $(FC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lstdc++ -lpthread -L$(shell cd -L $(shell dirname $(shell $(GPUCC) -print-prog-name=clang))/../..; pwd)/lib -lamdhip64 + $(FC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lstdc++ -lpthread -L$(HIP_HOME)/lib -lamdhip64 else $(GPUCC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lcuda endif @@ -1104,10 +1106,20 @@ else @cat /proc/cpuinfo | grep "physical id" | sort -u endif @echo "" -ifneq ($(shell which nvidia-smi 2>/dev/null),) - nvidia-smi -L + # some systems may have -smi installed, but it fails to execute + # because it cannot communicate with the hardware + @if nvidia-smi &>/dev/null ; then \ + nvidia-smi -L ;\ + else \ + echo "No Nvidia GPU detected" ;\ + fi @echo "" -endif + @if amd-smi &>/dev/null ; then \ + amd-smi static -a ;\ + amd-smi list ;\ + else \ + echo "No AMD GPU detected" ;\ + fi @echo USECCACHE=$(USECCACHE) ifeq ($(USECCACHE),1) ccache --version | head -1 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/SubProcesses/proc_characteristics b/epochX/cudacpp/gq_ttq.mad/SubProcesses/proc_characteristics index 14c5bc5d13..65ef44941c 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/proc_characteristics +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/proc_characteristics @@ -8,7 +8,7 @@ ninitial = 2 grouped_matrix = True has_loops = False - bias_module = dummy + bias_module = None max_n_matched_jets = 1 colored_pdgs = [1, 2, 3, 4, 5, 6, 21] complex_mass_scheme = False diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/reweight.f b/epochX/cudacpp/gq_ttq.mad/SubProcesses/reweight.f index 0a0bafa7c1..189ba41449 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/reweight.f +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/reweight.f @@ -1186,7 +1186,7 @@ logical function setclscales(p, keepq2bck, ivec) if(nexternal.gt.3) pt2ijcl(nexternal-3)=q2fact(2) else if(.not.fixed_fac_scale1) q2fact(1)=scalefact**2*pt2ijcl(nexternal-2) - if(.not.fixed_fac_scale2) q2fact(2)=scalefact**2*q2fact(1) + if(.not.fixed_fac_scale2) q2fact(2)=scalefact**2*pt2ijcl(nexternal-2) endif elseif(jcentral(1).eq.0)then if(.not.fixed_fac_scale1) q2fact(1) = scalefact**2*pt2ijcl(jfirst(1)) diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/symmetry.f b/epochX/cudacpp/gq_ttq.mad/SubProcesses/symmetry.f index 309540a0a2..2afd9e9f75 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/symmetry.f +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/symmetry.f @@ -232,7 +232,7 @@ subroutine write_bash(mapconfig,use_config, prwidth, jcomp,iforest, c write(*,*) 'mapping',ic,mapconfig(i),icode if (icode .eq. 0) then c Create format string based on number of digits - write(formstr,'(a,i1,a)') '(I',nconf,'$)' + write(formstr,'(a,i1,a)') '(I',nconf,',$)' write(*,formstr) mapconfig(i) c Write symmetry factors write(formstr2,'(a,i2,a)') '(2i',nsym,')' @@ -242,10 +242,10 @@ subroutine write_bash(mapconfig,use_config, prwidth, jcomp,iforest, dconfig=mapconfig(i)+icode*1d0/10**ncode if(nconf+ncode+1.lt.10) then write(formstr,'(a,i1,a,i1,a)') '(F',nconf+ncode+1, - $ '.',ncode,'$)' + $ '.',ncode,',$)' else write(formstr,'(a,i2,a,i1,a)') '(F',nconf+ncode+1, - $ '.',ncode,'$)' + $ '.',ncode,',$)' endif write(*,formstr) dconfig c Write symmetry factors @@ -260,7 +260,7 @@ subroutine write_bash(mapconfig,use_config, prwidth, jcomp,iforest, dconfig=mapconfig(i)+icode*1d0/10**ncode write(27,formstr2) dconfig,use_config(i) endif - write(*,'(a$)') ' ' + write(*,'(a,$)') ' ' 100 call bw_increment_array(iarray,imax,ibase,done) enddo else diff --git a/epochX/cudacpp/gq_ttq.mad/SubProcesses/unwgt.f b/epochX/cudacpp/gq_ttq.mad/SubProcesses/unwgt.f index f602511c94..d1247f1849 100644 --- a/epochX/cudacpp/gq_ttq.mad/SubProcesses/unwgt.f +++ b/epochX/cudacpp/gq_ttq.mad/SubProcesses/unwgt.f @@ -497,6 +497,7 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) integer ip, np, ic, nc integer ida(2),ito(-nexternal+3:nexternal),ns,nres,ires,icloop integer iseed + double precision beam_mass double precision pboost(0:3) double precision beta, get_betaz double precision ebi(0:3), ebo(0:3) @@ -506,7 +507,7 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) integer idup(nexternal,maxproc,maxsproc) integer mothup(2,nexternal) integer icolup(2,nexternal,maxflow,maxsproc) - + double precision eta integer nsym integer ievent @@ -638,21 +639,20 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) if (nincoming.eq.2) then if (xbk(1) .gt. 0d0 .and. xbk(1) .le. 1d0 .and. $ xbk(2) .gt. 0d0 .and. xbk(2) .le. 1d0) then - if(lpp(2).ne.0.and.(xbk(1).eq.1d0.or.pmass(1).eq.0d0).and.xbk(2).ne.1d0) then - ! construct the beam momenta in each frame and compute the related (z)boost - if (pmass(1).eq.0d0.and.(abs(lpp(1)).eq.3.or.abs(lpp(1)).eq.4).and.ebeam(1).gt.10d0*m1)then - local_mass = 0d0 - else - local_mass = m1 - endif + if(lpp(2).ne.0.and.(xbk(1).eq.1d0.or.pmass(1).eq.0d0)) then + if((abs(lpp(1)).gt.2.and.abs(lpp(1)).ne.9).or.xbk(1).eq.1d0)then + beam_mass = pmass(1) + else + beam_mass = m1 + endif ebi(0) = p(0,1)/xbk(1) ! this assumes that particle 1 is massless or mass equal to beam ebi(1) = 0 ebi(2) = 0 - ebi(3) = DSQRT(ebi(0)**2-local_mass**2) + ebi(3) = DSQRT(ebi(0)**2-beam_mass**2) ebo(0) = ebeam(1) ebo(1) = 0 ebo(2) = 0 - ebo(3) = DSQRT(ebo(0)**2-local_mass**2) + ebo(3) = DSQRT(ebo(0)**2-beam_mass**2) beta = get_betaz(ebi, ebo) if (xbk(1).eq.1d0) then pb(0,isym(1,jsym)) = ebo(0) @@ -668,20 +668,19 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) enddo else - if (pmass(1).eq.0d0.and.(abs(lpp(1)).eq.3.or.abs(lpp(1)).eq.4.and.ebeam(2).gt.10d0*m2))then - local_mass = 0d0 - else - local_mass = m2 - endif - ebi(0) = p(0,1)/xbk(1) ! this assumes that particle 1 is massless or mass equal to beam + if((abs(lpp(2)).gt.2.and.abs(lpp(2)).ne.9).or.xbk(2).eq.1d0)then + beam_mass = pmass(2) + else + beam_mass = m2 + endif ebi(0) = p(0,2)/xbk(2) ! this assumes that particle 2 is massless or mass equal to beam ebi(1) = 0 ebi(2) = 0 - ebi(3) = -1d0*DSQRT(ebi(0)**2-local_mass**2) + ebi(3) = -1d0*DSQRT(ebi(0)**2-beam_mass**2) ebo(0) = ebeam(2) ebo(1) = 0 ebo(2) = 0 - ebo(3) = -1d0*DSQRT(ebo(0)**2-local_mass**2) + ebo(3) = -1d0*DSQRT(ebo(0)**2-beam_mass**2) beta = get_betaz(ebi, ebo) if (xbk(2).eq.1d0) then pb(0,isym(2,jsym)) = ebo(0) @@ -701,6 +700,21 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) write(*,*) 'Warning bad x1 or x2 in write_leshouche', $ xbk(1),xbk(2) endif + do j=1,nexternal + call zboost_with_beta(p(0,j),beta,pb(0,isym(j,jsym))) + pb(4,isym(j,jsym))=pmass(j) + enddo + + ! check for numerical_accuracy + if (pb(0,1).gt.ebeam(1).or.pb(0,2).gt.ebeam(2))then + ! go back to old method --more accurate when boosting with xbk close to one-- + eta = sqrt(xbk(1)*ebeam(1)/(xbk(2)*ebeam(2))) + pboost(0)=p(0,1)*(eta + 1d0/eta) + pboost(3)=p(0,1)*(eta - 1d0/eta) + do j=1,nexternal + call boostx(p(0,j),pboost,pb(0,isym(j,jsym))) + enddo + endif else do j=1,nexternal call boostx(p(0,j),pboost,pb(0,isym(j,jsym))) @@ -709,6 +723,8 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) enddo endif + + if (IMIRROR.eq.2.and.pmass(1).ne.pmass(2)) then c Note that in this context isym(1,jsym) should never be "2" since the mass differ pb(4,isym(1,jsym))=pmass(2) 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..2efb5954a6 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] @@ -1991,6 +1991,11 @@ def default_setup(self): self.add_param("PartonLevel:FSRinResonances", True, hidden=True, always_write_to_card=False, comment="Do not allow shower to run from decay product of unstable particle") self.add_param("ProcessLevel:resonanceDecays", True, hidden=True, always_write_to_card=False, comment="Do not allow unstable particle to decay.") + # Parameters only needed for main164 type of run (not pythia8/MG5 interface) + self.add_param("Main:HepMC", True, hidden=True, always_write_to_card=False, + comment="""Specify the type of output to be used by the main164 run. """) + self.add_param("HepMC:output", 'hepmc.gz', hidden=True, always_write_to_card=False, + comment="Specify the HepMC output file to be used by the main164 run.") # Add parameters controlling the subruns execution flow. # These parameters should not be part of PY8SubRun daughter. self.add_default_subruns('parameters') @@ -2087,8 +2092,10 @@ def MadGraphSet(self, name, value, **opts): force = False if name.lower() not in self or (force or name.lower() not in self.user_set): self.__setitem__(name, value, change_userdefine=False, **opts) - self.system_set.add(name.lower()) - + self.system_set.add(name.lower()) + else: + raise Exception("The parameter %s is already set to %s. You can not change it." % (name, self[name])) + def defaultSet(self, name, value, **opts): self.__setitem__(name, value, change_userdefine=False, **opts) @@ -2144,9 +2151,19 @@ def pythia8_formatting(value, formatv=None): else: return ','.join([PY8Card.pythia8_formatting(arg) for arg in value]) + #change of name convention between MG5 old interface and main164 from Pythia8 + interface_to_164 = {'HEPMCoutput:file': 'HepMC:output', + 'SysCalc:fullCutVariation': '!SysCalc:fullCutVariation (not supported with 164)', + 'SysCalc:qCutList': '!SysCalc:qCutList (not supported with 164)', + 'SysCalc:qWeed': '!SysCalc:qWeed (not supported with 164)', + 'SysCalc:tmsList': '!SysCalc:tmsList (not supported with 164)', + 'HEPMCoutput:scaling' : '!HEPMCoutput :scaling (not supported with 164)', + 'LHEFInputs:nSubruns' : 'Main:numberOfSubruns'} + def write(self, output_file, template, read_subrun=False, - print_only_visible=False, direct_pythia_input=False, add_missing=True): + print_only_visible=False, direct_pythia_input=False, add_missing=True, + use_mg5amc_py8_interface=False): """ Write the card to output_file using a specific template. > 'print_only_visible' specifies whether or not the hidden parameters should be written out if they are in the hidden_params_to_always_write @@ -2155,7 +2172,12 @@ def write(self, output_file, template, read_subrun=False, in the self.visible_params_to_always_write list and are not user_set or system_set are commented. > If 'add_missing' is False then parameters that should be written_out but are absent - from the template will not be written out.""" + from the template will not be written out. + > use_mg5amc_py8_interface is a flag to indicate that the MG5aMC-PY8 interface is used or not + if not used some parameters need to be translated from the old convention to the new one + """ + + self.use_mg5amc_py8_interface = use_mg5amc_py8_interface # First list the visible parameters visible_param = [p for p in self if p.lower() not in self.hidden_param @@ -2297,7 +2319,16 @@ def group_params(params): else: # Just copy parameters which don't need to be specified if param.lower() not in self.params_to_never_write: - output.write(line) + + if not use_mg5amc_py8_interface and direct_pythia_input and \ + param in self.interface_to_164: + param_entry = self.interface_to_164[param.strip()] + # special case for HepMC needs two flags + if 'HepMC:output' == param_entry: + output.write(' %s=%s\n'%('Main:HepMC', 'on')) + output.write('%s=%s\n'%(param_entry,new_value)) + else: + output.write(line) else: output.write('! The following parameter was forced to be commented out by MG5aMC.\n') output.write('! %s'%line) @@ -2313,6 +2344,7 @@ def group_params(params): if ((not direct_pythia_input) or (param.lower() in self.visible_params_to_always_write) or (param.lower() in self.user_set) or + (param.lower() in self.hidden_params_to_always_write) or (param.lower() in self.system_set)): template = '%s=%s' else: @@ -2321,6 +2353,19 @@ def group_params(params): # then they shouldn't be passed to Pythia template = '!%s=%s' + if not use_mg5amc_py8_interface and direct_pythia_input and \ + param in self.interface_to_164: + param_entry = self.interface_to_164[param] + # special case for HepMC needs two flags + if 'HepMC:output' == param_entry: + output.write(' %s=%s\n'%('Main:HepMC', 'on')) + if 'Main:InternalAnalysis'.lower() in self.user_set and \ + self['Main:InternalAnalysis'].lower() == 'on': + output.write('InternalAnalysis:output = ./djrs.dat\n') + + #elif param in self.interface_to_164.values() and not direct_pythia_input: + # misc.sprint(use_mg5amc_py8_interface, direct_pythia_input,param) + # raise Exception('The parameter %s is not supported in the MG5aMC-PY8 interface. Please use the new interface.'%param_entry output.write(template%(param_entry, value_entry.replace(value,new_value))) @@ -2365,6 +2410,8 @@ def group_params(params): comment = '\n'.join('! %s'%c for c in self.comments[param.lower()].split('\n')) output.write(comment+'\n') + if not use_mg5amc_py8_interface and param in self.interface_to_164: + continue output.write('%s=%s\n'%(param,PY8Card.pythia8_formatting(self[param]))) # Don't close the file if we were reading a subrun, but simply write @@ -3318,7 +3365,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 +3372,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 @@ -4050,8 +4095,8 @@ def post_set_fixed_fac_scale(card, value, change_userdefine, raiseerror, **opt): if 'fixed_fac_scale2' in card.user_set: card.user_set.remove('fixed_fac_scale2') - # #card['pdlabel1'] = value - # #card['pdlabel2'] = value + dict.__setitem__(card, 'fixed_fac_scale1', card['fixed_fac_scale']) + dict.__setitem__(card, 'fixed_fac_scale2', card['fixed_fac_scale']) @staticmethod def post_set(card, value, change_userdefine, raiseerror, name='unknown', **opt): @@ -4201,6 +4246,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 @@ -4451,11 +4497,11 @@ def check_validity(self): time.sleep(5) if self['drjj'] != 0: if 'drjj' in self.user_set: - logger.warning('Since icckw>0, changing the value of \'drjj\' to 0') + logger.warning('Since ickkw>0, changing the value of \'drjj\' to 0') self['drjj'] = 0 if self['drjl'] != 0: if 'drjl' in self.user_set: - logger.warning('Since icckw>0, changing the value of \'drjl\' to 0') + logger.warning('Since ickkw>0, changing the value of \'drjl\' to 0') self['drjl'] = 0 if not self['auto_ptj_mjj']: if self['mmjj'] > self['xqcut']: @@ -4753,7 +4799,6 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): self['fixed_fac_scale1'] = True self['nhel'] = 1 for i in beam_id_split[1]: - exit if abs(i) == 11: self['lpp1'] = -math.copysign(3,i) self['lpp2'] = math.copysign(3,i) @@ -5577,6 +5622,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 +5838,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/cluster.py b/epochX/cudacpp/gq_ttq.mad/bin/internal/cluster.py index 95ef45b5f3..66069293d2 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/cluster.py +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/cluster.py @@ -602,6 +602,7 @@ def __init__(self, *args, **opt): self.submitted = six.moves.queue.Queue() # one entry by job submitted self.stoprequest = threading.Event() #flag to ensure everything to close self.demons = [] + self.gpus_list = [] self.nb_done =0 if 'nb_core' in opt: self.nb_core = opt['nb_core'] @@ -623,23 +624,46 @@ def __init__(self, *args, **opt): self.done_pid_queue = six.moves.queue.Queue() self.fail_msg = None + mg5_gpu_env_str = 'MG5_GPU_VISIBLE_DEVICES' + gpu_variables = [['NVIDIA_VISIBLE_DEVICES', 'CUDA_VISIBLE_DEVICES'], + ['ROCR_VISIBLE_DEVICES', 'HIP_VISIBLE_DEVICES'],] + if mg5_gpu_env_str in os.environ: + new_var = os.environ[mg5_gpu_env_str].split(',') + if len(new_var) == 2: + gpu_variables.insert(0, new_var) + else: + logger.error('Invalid format for %s=%s, it should be a comma-separated list of two elements' % (mg5_gpu_env_str, os.environ[mg5_gpu_env_str])) + for get_var,set_var in gpu_variables: + if get_var in os.environ: + self.gpus_list = os.environ.get(get_var).split(',') + self.gpu_set_var = set_var + self.gpus_count = len(self.gpus_list) + logger.info('Found %s GPUs: %s' % (self.gpus_count, self.gpus_list)) def start_demon(self): import threading - t = threading.Thread(target=self.worker) + env2 = None + if len(self.gpus_list): + env2 = os.environ.copy() + this_gpu_idx = len(self.demons) % self.gpus_count + env2[self.gpu_set_var] = self.gpus_list[this_gpu_idx] + t = threading.Thread(target=self.worker, kwargs={'env2': env2}) + else: + t = threading.Thread(target=self.worker) t.daemon = True t.start() self.demons.append(t) - def worker(self): + def worker(self, env2=None): import six.moves.queue import six.moves._thread while not self.stoprequest.isSet(): try: args = self.queue.get(timeout=10) tag, exe, arg, opt = args + opt['env'] = env2 try: # check for executable case if isinstance(exe,str): 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..69291df0d4 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): @@ -1463,11 +1463,15 @@ def create_plot(self, mode='parton', event_path=None, output=None, tag=None): self.run_name, '%s_pts.dat' % tag) for observable_name, data_path in [('djr',djr_path), ('pt',pt_path)]: - if not self.generate_Pythia8_HwU_plots( + try: + if not self.generate_Pythia8_HwU_plots( PY8_plots_root_path, merging_scale_name, observable_name,data_path): - return False - + return False + except Exception as error: + if os.path.exists(data_path): + logger.info('plot information present in %s' % data_path) + return True if mode == 'Pythia8': plot_files = glob.glob(pjoin(PY8_plots_root_path,'*.gnuplot')) if not misc.which('gnuplot'): @@ -1964,12 +1968,16 @@ def do_systematics(self, line): self.cluster.wait(os.path.dirname(output), update_status, update_first=update_status) except Exception: self.cluster.remove() + for i in range(nb_submit): + os.remove('%s/tmp_%s_%s' %(os.path.dirname(output),i,os.path.basename(output))) old_run_mode = self.options['run_mode'] self.options['run_mode'] =0 + out =False try: out = self.do_systematics(line) finally: self.options['run_mode'] = old_run_mode + return out #collect the data all_cross = [] for i in range(nb_submit): @@ -1995,18 +2003,21 @@ def do_systematics(self, line): self.run_card['event_norm'] in ['unity']: all_cross= [cross/nb_event for cross in all_cross] - sys_obj = systematics.call_systematics([input, None] + opts, - log=lambda x: logger.info(str(x)), - result=result_file, - running=False - ) + + sys_obj = systematics.call_systematics([input, None] + opts, + log=lambda x: logger.info(str(x)), + result=result_file, + running=False + ) + sys_obj.print_cross_sections(all_cross, nb_event, result_file) - + #concatenate the output file subprocess.call(['cat']+\ ['./tmp_%s_%s' % (i, os.path.basename(output)) for i in range(nb_submit)], stdout=open(output,'w'), cwd=os.path.dirname(output)) + for i in range(nb_submit): os.remove('%s/tmp_%s_%s' %(os.path.dirname(output),i,os.path.basename(output))) # os.remove('%s/log_sys_%s.txt' % (os.path.dirname(output),i)) @@ -3831,7 +3842,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 +5146,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 +6751,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 +6775,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 +6826,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..6fbdd98100 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': @@ -1858,6 +1855,8 @@ def parse_histos_from_PY8_XML_stream(self, stream, run_id=None, # If merging cut is negative, then pick only the one of the central scale # If not specified, then take them all but use the PDF and scale weight # of the central merging_scale for the variation. + if not all_weights: + raise MadGraph5Error('No weights were found in the HwU XML source.') if merging_scale is None or merging_scale < 0.0: merging_scale_chosen = all_weights[2]['MERGING'] else: @@ -2480,14 +2479,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 +2738,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 +2877,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 +2889,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 +2898,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 +2907,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 +2916,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..b1739da73d 100644 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/launch_plugin.py +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/launch_plugin.py @@ -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: O. Mattelaer (Aug 2023) for the MG5aMC CUDACPP plugin. -# Further modified by: O. Mattelaer, A. Valassi (2024) for the MG5aMC CUDACPP plugin. +# Further modified by: O. Mattelaer, A. Valassi, Z. Wettersten (2024-2025) for the MG5aMC CUDACPP plugin. import logging import os @@ -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') @@ -133,7 +133,8 @@ def default_setup(self): super().default_setup() # change default value: self['cudacpp_backend'] = 'cuda' - self['vector_size'] = 16384 # already setup in default class (just change value) + self['vector_size'] = 32 # ZW: default to 32, might want to change to 64 to utilise AMD GPUs better as well # 16384 # already setup in default class (just change value) + self['nb_warp'] = 512 # number of warps per kernel call, for now setting to 16 384 / vector_size MEINTERFACE = CPPMEInterface RunCard = CPPRunCard 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..81d17f7cb1 100755 --- a/epochX/cudacpp/gq_ttq.mad/bin/internal/lhe_parser.py +++ b/epochX/cudacpp/gq_ttq.mad/bin/internal/lhe_parser.py @@ -1035,12 +1035,12 @@ def define_init_banner(self, wgt, lha_strategy, proc_charac=None): from_init = True if not from_init: - if group in grouped_cross: - grouped_cross[group] += self.allcross[i] - grouped_error[group] += self.error[i]**2 + if int(group) in grouped_cross: + grouped_cross[int(group)] += self.allcross[i] + grouped_error[int(group)] += self.error[i]**2 else: - grouped_cross[group] = self.allcross[i] - grouped_error[group] = self.error[i]**2 + grouped_cross[int(group)] = self.allcross[i] + grouped_error[int(group)] = self.error[i]**2 else: ban = banner_mod.Banner(ff.banner) for line in ban['init'].split('\n'): @@ -1048,11 +1048,11 @@ def define_init_banner(self, wgt, lha_strategy, proc_charac=None): if len(splitline)==4: cross, error, _, group = splitline if int(group) in grouped_cross: - grouped_cross[group] += float(cross) - grouped_error[group] += float(error)**2 + grouped_cross[int(group)] += float(cross) + grouped_error[int(group)] += float(error)**2 else: - grouped_cross[group] = float(cross) - grouped_error[group] = float(error)**2 + grouped_cross[int(group)] = float(cross) + grouped_error[int(group)] = float(error)**2 nb_group = len(grouped_cross) # compute the information for the first line @@ -1086,6 +1086,8 @@ def define_init_banner(self, wgt, lha_strategy, proc_charac=None): self.seek(0) if init_information["idbmup2"] in [0,9]: event = next(self) + if len(event) == 0: + event = Event(str(event)) init_information["idbmup2"] = event[1].pdg self.seek(0) @@ -2166,10 +2168,13 @@ def check(self): abspz += abs(particle.pz) # check mass fourmass = FourMomentum(particle).mass - - if particle.mass and (abs(particle.mass) - fourmass)/ abs(particle.mass) > threshold: - raise Exception( "Do not have correct mass lhe: %s momentum: %s (error at %s" % (particle.mass, fourmass, (abs(particle.mass) - fourmass)/ abs(particle.mass))) - + if particle.mass: + expected = (particle.E - math.sqrt(particle.E**2 -particle.mass**2))/particle.E + if expected > 1e-8: + mass_threshold = particle.E**2 - (particle.E-threshold)**2 + if (abs(particle.mass) - fourmass)/ mass_threshold > 5: + raise Exception( "Do not have correct mass lhe: %s momentum: %s (error at %s" % (particle.mass, fourmass, (abs(particle.mass) - fourmass)/ abs(particle.mass))) + if E/absE > threshold: logger.critical(self) @@ -2953,8 +2958,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..4d5597c722 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) @@ -2827,10 +2827,10 @@ def print_results_in_shell(self, data): logger.info(" Nb of events after matching/merging : %d" % int(data['nb_event_pythia'])) if self.run_card['use_syst'] in self.true and \ (int(self.run_card['ickkw'])==1 or self.run_card['ktdurham']>0.0 - or self.run_card['ptlund']>0.0): + or self.run_card['ptlund']>0.0) and data['cross_pythia'] == -1: logger.info(" Notice that because Systematics computation is turned on, the merging did not veto events but modified their weights instead.\n"+\ " The resulting hepmc/stdhep file should therefore be use with those weights.") - else: + elif data['cross_pythia'] == -1: logger.info(" Nb of events after merging : %s" % data['nb_event_pythia']) logger.info(" " ) @@ -3055,6 +3055,7 @@ def do_multi_run(self, line): crossoversig = 0 inv_sq_err = 0 nb_event = 0 + madspin = False for i in range(nb_run): self.nb_refine = 0 self.exec_cmd('generate_events %s_%s -f' % (main_name, i), postcmd=False) @@ -3067,6 +3068,8 @@ def do_multi_run(self, line): inv_sq_err+=1.0/error**2 self.results[main_name][-1]['cross'] = crossoversig/inv_sq_err self.results[main_name][-1]['error'] = math.sqrt(1.0/inv_sq_err) + if 'decayed' in self.run_name: + madspin = True self.results.def_current(main_name) self.run_name = main_name self.update_status("Merging LHE files", level='parton') @@ -3074,9 +3077,12 @@ def do_multi_run(self, line): os.mkdir(pjoin(self.me_dir,'Events', self.run_name)) except Exception: pass - os.system('%(bin)s/merge.pl %(event)s/%(name)s_*/unweighted_events.lhe.gz %(event)s/%(name)s/unweighted_events.lhe.gz %(event)s/%(name)s_banner.txt' + + os.system('%(bin)s/merge.pl %(event)s/%(name)s_*%(madspin)s/unweighted_events.lhe.gz %(event)s/%(name)s/unweighted_events.lhe.gz %(event)s/%(name)s_banner.txt' % {'bin': self.dirbin, 'event': pjoin(self.me_dir,'Events'), - 'name': self.run_name}) + 'name': self.run_name, + 'madspin': '_decayed_*' if madspin else '' + }) eradir = self.options['exrootanalysis_path'] if eradir and misc.is_executable(pjoin(eradir,'ExRootLHEFConverter')): @@ -3656,9 +3662,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'))) @@ -3757,6 +3765,8 @@ def split(a, n): k, m = divmod(len(a), n) return (a[i*k+min(i, m):(i+1)*k+min(i+1, m)] for i in range(n)) + Gdirs = self.remove_empty_events(Gdirs) + partials_info = [] if len(Gdirs) >= max_G: start_unweight= time.perf_counter() @@ -3786,7 +3796,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, @@ -4223,7 +4233,7 @@ def mg5amc_py8_interface_consistency_warning(options): return None - def setup_Pythia8RunAndCard(self, PY8_Card, run_type): + def setup_Pythia8RunAndCard(self, PY8_Card, run_type, use_mg5amc_py8_interface): """ Setup the Pythia8 Run environment and card. In particular all the process and run specific parameters of the card are automatically set here. This function returns the path where HEPMC events will be output, if any.""" @@ -4338,10 +4348,10 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): PY8_Card.systemSet('Beams:setProductionScalesFromLHEF',True) # Automatically set qWeed to xqcut if not defined by the user. - if PY8_Card['SysCalc:qWeed']==-1.0: + if use_mg5amc_py8_interface and PY8_Card['SysCalc:qWeed']==-1.0: PY8_Card.MadGraphSet('SysCalc:qWeed',self.run_card['xqcut'], force=True) - if PY8_Card['SysCalc:qCutList']=='auto': + if use_mg5amc_py8_interface and PY8_Card['SysCalc:qCutList']=='auto': if self.run_card['use_syst']: if self.run_card['sys_matchscale']=='auto': qcut = PY8_Card['JetMatching:qCut'] @@ -4368,7 +4378,7 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): # Specific MLM settings # PY8 should not implement the MLM veto since the driver should do it # if merging scale variation is turned on - if self.run_card['use_syst']: + if use_mg5amc_py8_interface and self.run_card['use_syst']: # We do no force it here, but it is clear that the user should know what # he's doing if he were to force it to True. PY8_Card.MadGraphSet('JetMatching:doVeto',False) @@ -4444,7 +4454,7 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): PY8_Card.MadGraphSet('SpaceShower:pTmaxMatch',1) PY8_Card.MadGraphSet('SpaceShower:rapidityOrder',False) # PY8 should not implement the CKKW veto since the driver should do it. - if self.run_card['use_syst']: + if use_mg5amc_py8_interface and self.run_card['use_syst']: # We do no force it here, but it is clear that the user should know what # he's doing if he were to force it to True. PY8_Card.MadGraphSet('Merging:applyVeto',False) @@ -4516,6 +4526,12 @@ def do_pythia8(self, line): else: no_default = False + if '--old_interface' in args: + use_mg5amc_py8_interface = True + args.remove('--old_interface') + else: + use_mg5amc_py8_interface = False + if not self.run_name: self.check_pythia8(args) self.configure_directory(html_opening =False) @@ -4545,20 +4561,27 @@ def do_pythia8(self, line): #"Please use 'event_norm = average' in the run_card to avoid this problem.") - - if not self.options['mg5amc_py8_interface_path'] or not \ - os.path.exists(pjoin(self.options['mg5amc_py8_interface_path'], - 'MG5aMC_PY8_interface')): - raise self.InvalidCmd( -"""The MG5aMC_PY8_interface tool cannot be found, so that MadEvent cannot steer Pythia8 shower. -Please install this tool with the following MG5_aMC command: - MG5_aMC> install mg5amc_py8_interface_path""") + if use_mg5amc_py8_interface: + if not self.options['mg5amc_py8_interface_path'] or not \ + os.path.exists(pjoin(self.options['mg5amc_py8_interface_path'], + 'MG5aMC_PY8_interface')): + raise self.InvalidCmd( + """The MG5aMC_PY8_interface tool cannot be found, so that MadEvent cannot steer Pythia8 shower. + Please install this tool with the following MG5_aMC command: + MG5_aMC> install mg5amc_py8_interface_path""") + else: + pythia_main = pjoin(self.options['mg5amc_py8_interface_path'], + 'MG5aMC_PY8_interface') + warnings = MadEventCmd.mg5amc_py8_interface_consistency_warning(self.options) + if warnings: + logger.warning(warnings) else: - pythia_main = pjoin(self.options['mg5amc_py8_interface_path'], - 'MG5aMC_PY8_interface') - warnings = MadEventCmd.mg5amc_py8_interface_consistency_warning(self.options) - if warnings: - logger.warning(warnings) + pythia_main = pjoin(self.options['pythia8_path'], 'share', 'Pythia8', 'examples', 'main164') + if not os.path.exists(pythia_main): + pythia_main = pjoin(self.options['pythia8_path'], 'examples', 'main164') + if not os.path.exists(pythia_main): + logger.warning('main164 not found (or not compiled). Will try the old interface instead.') + return self.do_pythia8(line + ' --old_interface') self.results.add_detail('run_mode', 'madevent') @@ -4583,14 +4606,19 @@ def do_pythia8(self, line): run_type = 'CKKW' # Edit the card and run environment according to the run specification - HepMC_event_output = self.setup_Pythia8RunAndCard(PY8_Card, run_type) + HepMC_event_output = self.setup_Pythia8RunAndCard(PY8_Card, run_type, use_mg5amc_py8_interface=use_mg5amc_py8_interface) + + if not use_mg5amc_py8_interface and self.options['run_mode']==0 or (self.options['run_mode']==2 and self.options['nb_core']==1): + PY8_Card['Main:numberOfEvents']= self.run_card['nevents'] + # Now write the card. pythia_cmd_card = pjoin(self.me_dir, 'Events', self.run_name , '%s_pythia8.cmd' % tag) cmd_card = StringIO.StringIO() PY8_Card.write(cmd_card,pjoin(self.me_dir,'Cards','pythia8_card_default.dat'), - direct_pythia_input=True) + direct_pythia_input=True, + use_mg5amc_py8_interface=use_mg5amc_py8_interface) # Now setup the preamble to make sure that everything will use the locally # installed tools (if present) even if the user did not add it to its @@ -4632,7 +4660,7 @@ def do_pythia8(self, line): " command '/usr/bin/env %s' exists and returns a valid path."%shell) exe_cmd = "#!%s\n%s"%(shell_exe,' '.join( - [preamble+pythia_main, + [preamble+pythia_main, '' if use_mg5amc_py8_interface else '-c', os.path.basename(pythia_cmd_card)])) wrapper.write(exe_cmd) @@ -4699,6 +4727,7 @@ def do_pythia8(self, line): n_cores = max(min(min_n_core,n_cores),1) if self.options['run_mode']==0 or (self.options['run_mode']==2 and self.options['nb_core']==1): + # No need for parallelization anymore self.cluster = None logger.info('Follow Pythia8 shower by running the '+ @@ -4744,20 +4773,22 @@ def do_pythia8(self, line): ParallelPY8Card.subruns[0].systemSet('Beams:LHEF','events.lhe.gz') ParallelPY8Card.write(pjoin(parallelization_dir,'PY8Card.dat'), pjoin(self.me_dir,'Cards','pythia8_card_default.dat'), - direct_pythia_input=True) + direct_pythia_input=True, + use_mg5amc_py8_interface=use_mg5amc_py8_interface) # Write the wrapper wrapper_path = pjoin(parallelization_dir,'run_PY8.sh') wrapper = open(wrapper_path,'w') if self.options['cluster_temp_path'] is None: exe_cmd = \ -"""#!%s -./%s PY8Card.dat >& PY8_log.txt -""" +"""#!%%s +./%%s %s PY8Card.dat >& PY8_log.txt +""" % ('' if use_mg5amc_py8_interface else '-c') + else: exe_cmd = \ -"""#!%s +"""#!%%s ln -s ./events_$1.lhe.gz ./events.lhe.gz -./%s PY8Card_$1.dat >& PY8_log.txt +./%%s %s PY8Card_$1.dat >& PY8_log.txt mkdir split_$1 if [ -f ./events.hepmc ]; then @@ -4776,7 +4807,7 @@ def do_pythia8(self, line): mv ./PY8_log.txt ./split_$1/ fi tar -czf split_$1.tar.gz split_$1 -""" +""" % ('' if use_mg5amc_py8_interface else '-c') exe_cmd = exe_cmd%(shell_exe,os.path.basename(pythia_main)) wrapper.write(exe_cmd) wrapper.close() @@ -4812,19 +4843,27 @@ def do_pythia8(self, line): pjoin(parallelization_dir,split_files[-1])) logger.info('Submitting Pythia8 jobs...') + for i, split_file in enumerate(split_files): # We must write a PY8Card tailored for each split so as to correct the normalization # HEPMCoutput:scaling of each weight since the lhe showered will not longer contain the # same original number of events - split_PY8_Card = banner_mod.PY8Card(pjoin(parallelization_dir,'PY8Card.dat')) + split_PY8_Card = banner_mod.PY8Card(pjoin(parallelization_dir,'PY8Card.dat'), setter='user') + assert split_PY8_Card['JetMatching:nJetMax'] == PY8_Card['JetMatching:nJetMax'] + + + # Make sure to sure the number of split_events determined during the splitting. - split_PY8_Card.systemSet('Main:numberOfEvents',partition_for_PY8[i]) + split_PY8_Card.systemSet('Main:numberOfEvents',partition_for_PY8[i], force=True) + assert split_PY8_Card['Main:numberOfEvents'] == partition_for_PY8[i] split_PY8_Card.systemSet('HEPMCoutput:scaling',split_PY8_Card['HEPMCoutput:scaling']* - (float(partition_for_PY8[i]))) + (float(partition_for_PY8[i])), force=True) # Add_missing set to False so as to be sure not to add any additional parameter w.r.t # the ones in the original PY8 param_card copied. split_PY8_Card.write(pjoin(parallelization_dir,'PY8Card_%d.dat'%i), - pjoin(parallelization_dir,'PY8Card.dat'), add_missing=False) + pjoin(parallelization_dir,'PY8Card.dat'), add_missing=False, + direct_pythia_input=True, + use_mg5amc_py8_interface=use_mg5amc_py8_interface) in_files = [pjoin(parallelization_dir,os.path.basename(pythia_main)), pjoin(parallelization_dir,'PY8Card_%d.dat'%i), pjoin(parallelization_dir,split_file)] @@ -5073,7 +5112,7 @@ def wait_monitoring(Idle, Running, Done): # works both for fixed number of generated events and fixed accepted events self.results.add_detail('error_pythia', error_m) - if self.run_card['use_syst']: + if self.run_card['use_syst'] and use_mg5amc_py8_interface: self.results.add_detail('cross_pythia', -1) self.results.add_detail('error_pythia', 0) @@ -6132,7 +6171,102 @@ def get_Gdir(self, Pdir=None, symfact=None): mfactors[pjoin(P, "G%s" % tag)] = mfactor self.Gdirs = (Gdirs, mfactors) return self.get_Gdir(Pdir, symfact=symfact) + + ############################################################################ + def remove_empty_events(self, Gdir): + """return Gdir strip from the one providing empty events.lhe files.""" + + reasons = collections.defaultdict(list) + Gdirs = Gdir[:] + for G in Gdirs[:]: + try: + size = os.path.getsize(pjoin(G, 'events.lhe')) + except Exception as error: + size = 0 + if size <10: + Gdirs.remove(G) + try: + log = misc.BackRead(pjoin(G, 'log.txt')) + except Exception as error: + log = misc.BackRead(pjoin(G, 'run1_app.log')) + found = -1 + for line in log: + if 'Deleting file events.lhe' in line: + found = 0 + elif "Impossible BW configuration" in line: + reasons['bwconfig'].append(G) + break + elif found < -150: + reasons['not found'].append(G) + Gdirs.append(G) + break + elif found < 0: + found -= 1 + elif 'Loosen cuts or increase max_events' in line: + reasons['cuts'].append(G) + break + elif 'all returned zero' in line: + reasons['zero'].append(G) + break + elif found > 5: + reasons['unknown'].append(G) + break + else: + found += 1 + + if len(reasons): + logger.debug('Reasons for empty events.lhe:') + if len(reasons['unknown']): + logger.debug(' - unknown: %s' % len(reasons['unknown'])) + logger.log(10, ' DETAIL:' + ','.join(['/'.join(G.rsplit(os.sep)[-2:]) for G in reasons['unknown'][:10]])) + if len(reasons['not found']): + logger.debug(' - not found in log: %s' % len(reasons['not found'])) + logger.log(10, ' DETAIL:' + ','.join(['/'.join(G.rsplit(os.sep)[-2:]) for G in reasons['not found'][:10]])) + if len(reasons['zero']): + logger.debug(' - zero amplitudes: %s' % len(reasons['zero'])) + logger.log(10, ' DETAIL:' + ','.join(['/'.join(G.rsplit( os.sep)[-2:]) for G in reasons['zero'][:10]])) + if len(reasons['bwconfig']): + critical_bwconfig = set() + for G in reasons['bwconfig']: + base = G.rsplit('.',1)[0] + if any(G2.startswith(base) for G2 in Gdirs): + continue + else: + critical_bwconfig.add(os.sep.join(base.rsplit(os.sep)[-2:])) + for G in critical_bwconfig: + logger.warning('Gdirectory %s has no events.lhe file. (no BW config found %s times)' % G) + + logger.debug(' - impossible BW configuration: %s' % len(reasons['bwconfig'])) + logger.debug(' - channel with no possible BW configuration: %s' % len(critical_bwconfig)) + + if len(reasons['cuts']): + critical_nb_cuts = collections.defaultdict(int) + for G in reasons['cuts']: + if '.' in os.path.basename(G): + base = G.rsplit('.',1)[0] + if any(G2.startswith(base) for G2 in Gdirs): + continue + else: + critical_nb_cuts[os.sep.join(base.rsplit(os.sep)[-2:])] += 1 + else: + critical_nb_cuts[''] += 1 + logger.warning('Gdirectory %s has no events.lhe file. (no points passed cuts found)' % G) + for G, nb in critical_nb_cuts.items(): + if not G: + continue + else: + logger.warning('%s channel %s.XXX has no events.lhe file. (no points passed cuts). No %s with events detected' % (nb, G, G)) + logger.debug(' - no points passed cuts: %s' % len(reasons['cuts'])) + logger.log(10, ' DETAIL:' + ','.join(['/'.join(G.rsplit(os.sep)[-2:]) for G in reasons['cuts'][:10]])) + logger.debug(' - without any BW handling (critical): %s' % critical_nb_cuts['']) + logger.debug(' - with BW but all zero (critical): %s' % sum([nb for v, nb in critical_nb_cuts.items() if v!=''], 0)) + #logger.debug(' - cuts (with BW conflict where other channel contributes): %s' % (len(reasons['cuts'])- critical_nb_cuts)) + + + return Gdirs + + ############################################################################ def set_run_name(self, name, tag=None, level='parton', reload_card=False, allow_new_tag=True): @@ -6749,7 +6883,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 +6893,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 +7010,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 +7038,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 +7053,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 +7065,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 +7190,13 @@ 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) 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 +7210,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..67c6a7d0b1 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.3, 2025-06-12 // 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..9f6bb457b1 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.3, 2025-06-12 // 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..d7a7c75b29 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gq_ttq.mad/test/cudacpp_test.mk b/epochX/cudacpp/gq_ttq.mad/test/cudacpp_test.mk index f703a1ae7c..4934c9a53f 100644 --- a/epochX/cudacpp/gq_ttq.mad/test/cudacpp_test.mk +++ b/epochX/cudacpp/gq_ttq.mad/test/cudacpp_test.mk @@ -19,7 +19,7 @@ CXXFLAGS += -Igoogletest/googletest/include/ -std=c++11 all: googletest/$(INSTALLDIR)/lib64/libgtest.a googletest/CMakeLists.txt: - git clone https://github.com/google/googletest.git -b release-1.11.0 googletest + git clone https://github.com/google/googletest.git -b v1.17.0 googletest googletest/$(BUILDDIR)/Makefile: googletest/CMakeLists.txt mkdir -p googletest/$(BUILDDIR) 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/P1_Sigma_sm_gu_ttxu/CPPProcess.cc b/epochX/cudacpp/gq_ttq.sa/SubProcesses/P1_Sigma_sm_gu_ttxu/CPPProcess.cc index 81ab8669a5..0d315427ae 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -605,7 +605,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- 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..621f842e2a 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.3, 2025-06-12 // 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/CPPProcess.cc b/epochX/cudacpp/gq_ttq.sa/SubProcesses/P1_Sigma_sm_gux_ttxux/CPPProcess.cc index c1c42990a2..34ab1fcd93 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -605,7 +605,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- 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..a9969ce30d 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.3, 2025-06-12 // 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/cudacpp.mk b/epochX/cudacpp/gq_ttq.sa/SubProcesses/cudacpp.mk index 20d8ded718..20b8e6b858 100644 --- a/epochX/cudacpp/gq_ttq.sa/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/gq_ttq.sa/SubProcesses/cudacpp.mk @@ -114,7 +114,7 @@ export CXXFLAGS override CUDA_HOME = $(patsubst %/bin/nvcc,%,$(shell which nvcc 2>/dev/null)) # Set HIP_HOME from the path to hipcc, if it exists -override HIP_HOME = $(patsubst %/bin/hipcc,%,$(shell which hipcc 2>/dev/null)) +override HIP_HOME = $(shell hipconfig --rocmpath) # Configure CUDA_INC (for CURAND and NVTX) and NVTX if a CUDA installation exists (see #965) ifeq ($(CUDA_HOME),) @@ -229,6 +229,8 @@ ifeq ($(BACKEND),cuda) else ifeq ($(BACKEND),hip) + # example architecture values MI200:gfx90a, MI350X:gfx942 + MADGRAPH_HIP_ARCHITECTURE ?= gfx942 # Set GPUCC as $(HIP_HOME)/bin/hipcc (it was already checked above that this exists) GPUCC = $(HIP_HOME)/bin/hipcc XCOMPILERFLAG = @@ -243,7 +245,7 @@ else ifeq ($(BACKEND),hip) ###GPUFLAGS += -ggdb # FOR DEBUGGING ONLY # AMD HIP architecture flags - GPUARCHFLAGS = --offload-arch=gfx90a + GPUARCHFLAGS = --offload-arch=${MADGRAPH_HIP_ARCHITECTURE} GPUFLAGS += $(GPUARCHFLAGS) # Other AMD-specific flags @@ -878,7 +880,7 @@ endif $(gpu_fcheckmain): LIBFLAGS += $(GPULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH $(gpu_fcheckmain): $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBDIR)/lib$(MG5AMC_GPULIB).so $(gpu_objects_exe) ifneq ($(findstring hipcc,$(GPUCC)),) # link fortran/c++/hip using $FC when hipcc is used #802 - $(FC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) -lstdc++ -L$(shell cd -L $(shell dirname $(shell $(GPUCC) -print-prog-name=clang))/../..; pwd)/lib -lamdhip64 + $(FC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) -lstdc++ -L$(HIP_HOME)/lib -lamdhip64 else $(GPUCC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) endif @@ -979,7 +981,7 @@ else # link only runTest_$(GPUSUFFIX).o (new: in the past, this was linking both $(gpu_testmain): LIBFLAGS += $(GPULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH $(gpu_testmain): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(gpu_objects_lib) $(gpu_objects_exe) $(GTESTLIBS) ifneq ($(findstring hipcc,$(GPUCC)),) # link fortran/c++/hip using $FC when hipcc is used #802 - $(FC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lstdc++ -lpthread -L$(shell cd -L $(shell dirname $(shell $(GPUCC) -print-prog-name=clang))/../..; pwd)/lib -lamdhip64 + $(FC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lstdc++ -lpthread -L$(HIP_HOME)/lib -lamdhip64 else $(GPUCC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lcuda endif @@ -1104,10 +1106,20 @@ else @cat /proc/cpuinfo | grep "physical id" | sort -u endif @echo "" -ifneq ($(shell which nvidia-smi 2>/dev/null),) - nvidia-smi -L + # some systems may have -smi installed, but it fails to execute + # because it cannot communicate with the hardware + @if nvidia-smi &>/dev/null ; then \ + nvidia-smi -L ;\ + else \ + echo "No Nvidia GPU detected" ;\ + fi @echo "" -endif + @if amd-smi &>/dev/null ; then \ + amd-smi static -a ;\ + amd-smi list ;\ + else \ + echo "No AMD GPU detected" ;\ + fi @echo USECCACHE=$(USECCACHE) ifeq ($(USECCACHE),1) ccache --version | head -1 diff --git a/epochX/cudacpp/gq_ttq.sa/src/HelAmps_sm.h b/epochX/cudacpp/gq_ttq.sa/src/HelAmps_sm.h index a304fc85c8..67c6a7d0b1 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.3, 2025-06-12 // 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..9f6bb457b1 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.3, 2025-06-12 // 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..d7a7c75b29 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/gq_ttq.sa/test/cudacpp_test.mk b/epochX/cudacpp/gq_ttq.sa/test/cudacpp_test.mk index f703a1ae7c..4934c9a53f 100644 --- a/epochX/cudacpp/gq_ttq.sa/test/cudacpp_test.mk +++ b/epochX/cudacpp/gq_ttq.sa/test/cudacpp_test.mk @@ -19,7 +19,7 @@ CXXFLAGS += -Igoogletest/googletest/include/ -std=c++11 all: googletest/$(INSTALLDIR)/lib64/libgtest.a googletest/CMakeLists.txt: - git clone https://github.com/google/googletest.git -b release-1.11.0 googletest + git clone https://github.com/google/googletest.git -b v1.17.0 googletest googletest/$(BUILDDIR)/Makefile: googletest/CMakeLists.txt mkdir -p googletest/$(BUILDDIR) diff --git a/epochX/cudacpp/heft_gg_bb.mad/Cards/ident_card.dat b/epochX/cudacpp/heft_gg_bb.mad/Cards/ident_card.dat index 32a43c02fe..b1fe0df5f7 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/Cards/ident_card.dat +++ b/epochX/cudacpp/heft_gg_bb.mad/Cards/ident_card.dat @@ -2,36 +2,36 @@ ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c written by the UFO converter ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc +mass 5 mdl_MB +mass 6 mdl_MT +mass 15 mdl_MTA +mass 23 mdl_MZ +mass 25 mdl_MH +mass 9000006 mdl_MP +sminputs 1 aEWM1 +sminputs 2 mdl_Gf +sminputs 3 aS +yukawa 5 mdl_ymb +yukawa 6 mdl_ymt +yukawa 15 mdl_ymtau - - - +decay 6 mdl_WT decay 23 mdl_WZ + decay 24 mdl_WW + decay 25 mdl_WH -decay 6 mdl_WT + decay 9000006 mdl_WH1 -mass 15 mdl_MTA -mass 23 mdl_MZ -mass 25 mdl_MH -mass 5 mdl_MB -mass 6 mdl_MT -mass 9000006 mdl_MP -sminputs 1 aEWM1 -sminputs 2 mdl_Gf -sminputs 3 aS -yukawa 15 mdl_ymtau -yukawa 5 mdl_ymb -yukawa 6 mdl_ymt diff --git a/epochX/cudacpp/heft_gg_bb.mad/Cards/me5_configuration.txt b/epochX/cudacpp/heft_gg_bb.mad/Cards/me5_configuration.txt index 68b4c46295..fa8d3481a2 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 = /home/dmass/Development/madgraph4gpu/amd-ci/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo +mg5_path = /home/dmass/Development/madgraph4gpu/amd-ci/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..d3cef073aa 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.3 2025-06-12 * #* * #* WARNING: UNKNOWN DEVELOPMENT VERSION. * #* WARNING: DO NOT USE FOR PRODUCTION * @@ -35,17 +35,19 @@ set loop_color_flows False set max_npoint_for_channel 0 set default_unset_couplings 99 set max_t_for_channel 99 +set zerowidth_tchannel True set nlo_mixed_expansion True -set stdout_level DEBUG -set zerowidth_tchannel F -set auto_convert_model T -import model heft +import model sm define p = g u c d s u~ c~ d~ s~ define j = g u c d s u~ c~ d~ s~ define l+ = e+ mu+ define l- = e- mu- define vl = ve vm vt define vl~ = ve~ vm~ vt~ +set stdout_level DEBUG +set zerowidth_tchannel F +set auto_convert_model T +import model heft generate g g > b b~ HIW<=1 -output madevent_simd ../TMPOUT/CODEGEN_mad_heft_gg_bb --hel_recycling=\ -False --vector_size=32 +output madevent_simd heft_gg_bb.mad_gen --hel_recycling=False --vector\ +_size=32 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..6917ce597f 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/Cards/run_card.dat +++ b/epochX/cudacpp/heft_gg_bb.mad/Cards/run_card.dat @@ -92,11 +92,11 @@ #********************************************************************* # Compilation flag. #********************************************************************* - -O3 -ffast-math -fbounds-check = global_flag ! build flags for all Fortran code (for a fair comparison to cudacpp; default is -O) + -O = global_flag ! fortran optimization flag use for the all code. --fast-math = aloha_flag ! fortran optimization flag for aloha function. Suggestions: '-ffast-math' -O3 = matrix_flag ! fortran optimization flag for matrix.f function. Suggestions: '-O3' - 32 = vector_size ! size of fortran arrays allocated in the multi-event API for SIMD/GPU (VECSIZE_MEMMAX) - 512 = nb_warp ! total number of warp/frontwave + 16 = vector_size ! size of fortran arrays allocated in the multi-event API for SIMD/GPU (VECSIZE_MEMMAX) + 1 = nb_warp ! total number of warp/frontwave #********************************************************************* # Customization (custom cuts/scale/bias/...) * @@ -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..1ac53bb4bd 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.3 \ No newline at end of file diff --git a/epochX/cudacpp/heft_gg_bb.mad/Source/.make_opts b/epochX/cudacpp/heft_gg_bb.mad/Source/.make_opts index de3864242b..56ba259c56 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/Source/.make_opts +++ b/epochX/cudacpp/heft_gg_bb.mad/Source/.make_opts @@ -102,6 +102,7 @@ endif ifneq ($(lhapdf),) CXXFLAGS += $(shell $(lhapdf) --cppflags) alfas_functions=alfas_functions_lhapdf + alfas_to_clean=alfas_functions.o llhapdf+= $(shell $(lhapdf) --cflags --libs) -lLHAPDF # check if we need to activate c++11 (for lhapdf6.2) ifeq ($(origin CXX),default) @@ -113,10 +114,11 @@ ifneq ($(lhapdf),) endif else alfas_functions=alfas_functions + alfas_to_clean=alfas_functions_lhapdf.o llhapdf= endif # Helper function to check MG5 version define CHECK_MG5AMC_VERSION python -c 'import re; from distutils.version import StrictVersion; print StrictVersion("$(MG5AMC_VERSION)") >= StrictVersion("$(1)") if re.match("^[\d\.]+$$","$(MG5AMC_VERSION)") else True;' -endef \ No newline at end of file +endef 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..bdf427601f 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/Source/make_opts +++ b/epochX/cudacpp/heft_gg_bb.mad/Source/make_opts @@ -1,12 +1,11 @@ DEFAULT_CPP_COMPILER=g++ -DEFAULT_F2PY_COMPILER=f2py3 -DEFAULT_F_COMPILER=gfortran -GLOBAL_FLAG=-O3 -ffast-math -fbounds-check MACFLAG= +STDLIB=-lstdc++ +STDLIB_FLAG= +DEFAULT_F2PY_COMPILER=f2py +DEFAULT_F_COMPILER=gfortran MG5AMC_VERSION=SpecifiedByMG5aMCAtRunTime PYTHIA8_PATH=NotInstalled -STDLIB_FLAG= -STDLIB=-lstdc++ #end_of_make_opts_variables BIASLIBDIR=../../../lib/ @@ -103,6 +102,7 @@ endif ifneq ($(lhapdf),) CXXFLAGS += $(shell $(lhapdf) --cppflags) alfas_functions=alfas_functions_lhapdf +alfas_to_clean=alfas_functions.o llhapdf+= $(shell $(lhapdf) --cflags --libs) -lLHAPDF # check if we need to activate c++11 (for lhapdf6.2) ifeq ($(origin CXX),default) @@ -114,6 +114,7 @@ endif endif else alfas_functions=alfas_functions +alfas_to_clean=alfas_functions_lhapdf.o llhapdf= endif diff --git a/epochX/cudacpp/heft_gg_bb.mad/Source/makefile b/epochX/cudacpp/heft_gg_bb.mad/Source/makefile index 291ca907ee..87a9e61723 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/Source/makefile +++ b/epochX/cudacpp/heft_gg_bb.mad/Source/makefile @@ -37,10 +37,12 @@ all: $(LIBRARIES) $(LIBDIR)libdhelas.$(libext) $(LIBDIR)libpdf.$(libext) $(LIBDI $(LIBDIR)libdsample.$(libext): $(DSAMPLE) $(call CREATELIB, $@, $^) $(LIBDIR)libgeneric.$(libext): $(GENERIC) + rm -f $@ 2>/dev/null $(call CREATELIB, $@, $^) + rm -f $(alfas_to_clean) 2>/dev/null $(LIBDIR)libdhelas.$(libext): DHELAS cd DHELAS; make; cd .. -$(LIBDIR)libpdf.$(libext): PDF make_opts +$(LIBDIR)libpdf.$(libext): PDF $(alfas_functions).o cd PDF; make; cd .. ifneq (,$(filter edff chff, $(pdlabel1) $(pdlabel2))) $(LIBDIR)libgammaUPC.$(libext): PDF/gammaUPC @@ -73,6 +75,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/vector.inc b/epochX/cudacpp/heft_gg_bb.mad/Source/vector.inc index ba125272b6..9d8b377aa7 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/Source/vector.inc +++ b/epochX/cudacpp/heft_gg_bb.mad/Source/vector.inc @@ -30,6 +30,8 @@ C INTEGER WARP_SIZE PARAMETER (WARP_SIZE=32) INTEGER NB_WARP - PARAMETER (NB_WARP=512) + PARAMETER (NB_WARP=1) INTEGER VECSIZE_MEMMAX - PARAMETER (VECSIZE_MEMMAX=16384) + PARAMETER (VECSIZE_MEMMAX=32) + + 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..1ac53bb4bd 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.3 \ 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/P1_gg_bbx/CPPProcess.cc b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/P1_gg_bbx/CPPProcess.cc index 5d6a4e1f06..1f7639eb25 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -569,7 +569,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- 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..da7add7e2e 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.3, 2025-06-12 // 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..252d00c684 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.3, 2025-06-12 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..3fef361dd9 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.3, 2025-06-12 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.3, 2025-06-12 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 @@ -484,6 +488,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C Generate events only if IMODE is 0. IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN C Call UNWGT to unweight and store events + ICONFIG = CHANNELS(IVEC) CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) ENDIF diff --git a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/P1_gg_bbx/driver.f b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/P1_gg_bbx/driver.f index ec5722702a..c08048ad0e 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/P1_gg_bbx/driver.f +++ b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/P1_gg_bbx/driver.f @@ -489,7 +489,6 @@ subroutine open_file_local(lun,filename,fopened) fopened=.false. tempname=filename fine=index(tempname,' ') -c fine2=index(path,' ')-1 ! AV remove valgrind "Conditional jump or move depends on uninitialised value(s)" if(fine.eq.0) fine=len(tempname) open(unit=lun,file=tempname,status='old',ERR=20) fopened=.true. 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..2a2fccda40 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.3, 2025-06-12 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.3, 2025-06-12 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,26 +394,26 @@ 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 C ---------- IF (FIRST) THEN FIRST=.FALSE. - IF(ZERO.NE.0D0) FK_ZERO = SIGN(MAX(ABS(ZERO), ABS(ZERO - $ *SMALL_WIDTH_TREATMENT)), ZERO) - IF(ZERO.NE.0D0) FK_ZERO = SIGN(MAX(ABS(ZERO), ABS(MDL_MB - $ *SMALL_WIDTH_TREATMENT)), ZERO) - IF(MDL_WH.NE.0D0) FK_MDL_WH = SIGN(MAX(ABS(MDL_WH), ABS(MDL_MH - $ *SMALL_WIDTH_TREATMENT)), MDL_WH) + FK_ZERO = 0D0 + IF(MDL_WH.NE.0D0) THEN + FK_MDL_WH = SIGN(MAX(ABS(MDL_WH), ABS(MDL_MH + $ *SMALL_WIDTH_TREATMENT)), MDL_WH) + ELSE + FK_MDL_WH = 0D0 + ENDIF + IF(INIT_MODE) THEN ZEROAMP_1(:,:) = .TRUE. @@ -455,10 +456,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 +470,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/addmothers.f b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/addmothers.f index 9a31ed201d..6f32477b9e 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/addmothers.f +++ b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/addmothers.f @@ -21,7 +21,7 @@ subroutine addmothers(ip,jpart,pb,isym,jsym,rscale,aqcd,aqed,buff, integer icol ! color selected integer isym(nexternal,99), jsym - integer i,j,k,ida(2),ns,nres,ires,icl,ito2,idenpart,nc,ic + integer i,j,k,ida(2),ns,nres,ires,icl,ito2,idenpart,ic integer mo_color,da_color(2),itmp integer ito(-nexternal+3:nexternal),iseed,maxcolor,maxorg integer icolalt(2,-nexternal+2:2*nexternal-3) @@ -113,14 +113,15 @@ subroutine addmothers(ip,jpart,pb,isym,jsym,rscale,aqcd,aqed,buff, endif lconfig = vec_igraph1(ivec) endif - + is_LC=.true. + maxcolor=0 c c Choose a color flow which is certain to work with the propagator c structure of the chosen diagram and use that as an alternative c if (icol.eq.0) then do i=1,nexternal - icolalt(1,i)=0 + icolalt(1,i)=0 icolalt(2,i)=0 enddo else diff --git a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/cluster.f b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/cluster.f index b8995283ed..907894ea89 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/cluster.f +++ b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/cluster.f @@ -556,6 +556,8 @@ logical function cluster(p, ivec) jwin = 0 cluster=.false. clustered=.false. + iwin =0 + jwin =0 do i=0,3 pcmsp(i)=0 enddo @@ -665,8 +667,11 @@ logical function cluster(p, ivec) c initialize graph storage igraphs(0)=0 nleft=nexternal -c cluster - if (iwin.eq.0.or.jwin.eq.0) stop 21 + if(iwin.eq.0.or.jwin.eq.0)then + cluster=.false. + return + endif +c cluster do n=1,nexternal-2 c combine winner imocl(n)=imap(iwin,2)+imap(jwin,2) diff --git a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/cudacpp.mk index 20d8ded718..20b8e6b858 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/cudacpp.mk @@ -114,7 +114,7 @@ export CXXFLAGS override CUDA_HOME = $(patsubst %/bin/nvcc,%,$(shell which nvcc 2>/dev/null)) # Set HIP_HOME from the path to hipcc, if it exists -override HIP_HOME = $(patsubst %/bin/hipcc,%,$(shell which hipcc 2>/dev/null)) +override HIP_HOME = $(shell hipconfig --rocmpath) # Configure CUDA_INC (for CURAND and NVTX) and NVTX if a CUDA installation exists (see #965) ifeq ($(CUDA_HOME),) @@ -229,6 +229,8 @@ ifeq ($(BACKEND),cuda) else ifeq ($(BACKEND),hip) + # example architecture values MI200:gfx90a, MI350X:gfx942 + MADGRAPH_HIP_ARCHITECTURE ?= gfx942 # Set GPUCC as $(HIP_HOME)/bin/hipcc (it was already checked above that this exists) GPUCC = $(HIP_HOME)/bin/hipcc XCOMPILERFLAG = @@ -243,7 +245,7 @@ else ifeq ($(BACKEND),hip) ###GPUFLAGS += -ggdb # FOR DEBUGGING ONLY # AMD HIP architecture flags - GPUARCHFLAGS = --offload-arch=gfx90a + GPUARCHFLAGS = --offload-arch=${MADGRAPH_HIP_ARCHITECTURE} GPUFLAGS += $(GPUARCHFLAGS) # Other AMD-specific flags @@ -878,7 +880,7 @@ endif $(gpu_fcheckmain): LIBFLAGS += $(GPULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH $(gpu_fcheckmain): $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBDIR)/lib$(MG5AMC_GPULIB).so $(gpu_objects_exe) ifneq ($(findstring hipcc,$(GPUCC)),) # link fortran/c++/hip using $FC when hipcc is used #802 - $(FC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) -lstdc++ -L$(shell cd -L $(shell dirname $(shell $(GPUCC) -print-prog-name=clang))/../..; pwd)/lib -lamdhip64 + $(FC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) -lstdc++ -L$(HIP_HOME)/lib -lamdhip64 else $(GPUCC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) endif @@ -979,7 +981,7 @@ else # link only runTest_$(GPUSUFFIX).o (new: in the past, this was linking both $(gpu_testmain): LIBFLAGS += $(GPULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH $(gpu_testmain): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(gpu_objects_lib) $(gpu_objects_exe) $(GTESTLIBS) ifneq ($(findstring hipcc,$(GPUCC)),) # link fortran/c++/hip using $FC when hipcc is used #802 - $(FC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lstdc++ -lpthread -L$(shell cd -L $(shell dirname $(shell $(GPUCC) -print-prog-name=clang))/../..; pwd)/lib -lamdhip64 + $(FC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lstdc++ -lpthread -L$(HIP_HOME)/lib -lamdhip64 else $(GPUCC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lcuda endif @@ -1104,10 +1106,20 @@ else @cat /proc/cpuinfo | grep "physical id" | sort -u endif @echo "" -ifneq ($(shell which nvidia-smi 2>/dev/null),) - nvidia-smi -L + # some systems may have -smi installed, but it fails to execute + # because it cannot communicate with the hardware + @if nvidia-smi &>/dev/null ; then \ + nvidia-smi -L ;\ + else \ + echo "No Nvidia GPU detected" ;\ + fi @echo "" -endif + @if amd-smi &>/dev/null ; then \ + amd-smi static -a ;\ + amd-smi list ;\ + else \ + echo "No AMD GPU detected" ;\ + fi @echo USECCACHE=$(USECCACHE) ifeq ($(USECCACHE),1) ccache --version | head -1 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/SubProcesses/proc_characteristics b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/proc_characteristics index be5693ddfc..6ac80a56a4 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/proc_characteristics +++ b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/proc_characteristics @@ -8,7 +8,7 @@ ninitial = 2 grouped_matrix = True has_loops = False - bias_module = dummy + bias_module = None max_n_matched_jets = 0 colored_pdgs = [1, 2, 3, 4, 5, 6, 21] complex_mass_scheme = False diff --git a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/reweight.f b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/reweight.f index 0a0bafa7c1..189ba41449 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/reweight.f +++ b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/reweight.f @@ -1186,7 +1186,7 @@ logical function setclscales(p, keepq2bck, ivec) if(nexternal.gt.3) pt2ijcl(nexternal-3)=q2fact(2) else if(.not.fixed_fac_scale1) q2fact(1)=scalefact**2*pt2ijcl(nexternal-2) - if(.not.fixed_fac_scale2) q2fact(2)=scalefact**2*q2fact(1) + if(.not.fixed_fac_scale2) q2fact(2)=scalefact**2*pt2ijcl(nexternal-2) endif elseif(jcentral(1).eq.0)then if(.not.fixed_fac_scale1) q2fact(1) = scalefact**2*pt2ijcl(jfirst(1)) diff --git a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/symmetry.f b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/symmetry.f index 309540a0a2..2afd9e9f75 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/symmetry.f +++ b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/symmetry.f @@ -232,7 +232,7 @@ subroutine write_bash(mapconfig,use_config, prwidth, jcomp,iforest, c write(*,*) 'mapping',ic,mapconfig(i),icode if (icode .eq. 0) then c Create format string based on number of digits - write(formstr,'(a,i1,a)') '(I',nconf,'$)' + write(formstr,'(a,i1,a)') '(I',nconf,',$)' write(*,formstr) mapconfig(i) c Write symmetry factors write(formstr2,'(a,i2,a)') '(2i',nsym,')' @@ -242,10 +242,10 @@ subroutine write_bash(mapconfig,use_config, prwidth, jcomp,iforest, dconfig=mapconfig(i)+icode*1d0/10**ncode if(nconf+ncode+1.lt.10) then write(formstr,'(a,i1,a,i1,a)') '(F',nconf+ncode+1, - $ '.',ncode,'$)' + $ '.',ncode,',$)' else write(formstr,'(a,i2,a,i1,a)') '(F',nconf+ncode+1, - $ '.',ncode,'$)' + $ '.',ncode,',$)' endif write(*,formstr) dconfig c Write symmetry factors @@ -260,7 +260,7 @@ subroutine write_bash(mapconfig,use_config, prwidth, jcomp,iforest, dconfig=mapconfig(i)+icode*1d0/10**ncode write(27,formstr2) dconfig,use_config(i) endif - write(*,'(a$)') ' ' + write(*,'(a,$)') ' ' 100 call bw_increment_array(iarray,imax,ibase,done) enddo else diff --git a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/unwgt.f b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/unwgt.f index f602511c94..d1247f1849 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/unwgt.f +++ b/epochX/cudacpp/heft_gg_bb.mad/SubProcesses/unwgt.f @@ -497,6 +497,7 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) integer ip, np, ic, nc integer ida(2),ito(-nexternal+3:nexternal),ns,nres,ires,icloop integer iseed + double precision beam_mass double precision pboost(0:3) double precision beta, get_betaz double precision ebi(0:3), ebo(0:3) @@ -506,7 +507,7 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) integer idup(nexternal,maxproc,maxsproc) integer mothup(2,nexternal) integer icolup(2,nexternal,maxflow,maxsproc) - + double precision eta integer nsym integer ievent @@ -638,21 +639,20 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) if (nincoming.eq.2) then if (xbk(1) .gt. 0d0 .and. xbk(1) .le. 1d0 .and. $ xbk(2) .gt. 0d0 .and. xbk(2) .le. 1d0) then - if(lpp(2).ne.0.and.(xbk(1).eq.1d0.or.pmass(1).eq.0d0).and.xbk(2).ne.1d0) then - ! construct the beam momenta in each frame and compute the related (z)boost - if (pmass(1).eq.0d0.and.(abs(lpp(1)).eq.3.or.abs(lpp(1)).eq.4).and.ebeam(1).gt.10d0*m1)then - local_mass = 0d0 - else - local_mass = m1 - endif + if(lpp(2).ne.0.and.(xbk(1).eq.1d0.or.pmass(1).eq.0d0)) then + if((abs(lpp(1)).gt.2.and.abs(lpp(1)).ne.9).or.xbk(1).eq.1d0)then + beam_mass = pmass(1) + else + beam_mass = m1 + endif ebi(0) = p(0,1)/xbk(1) ! this assumes that particle 1 is massless or mass equal to beam ebi(1) = 0 ebi(2) = 0 - ebi(3) = DSQRT(ebi(0)**2-local_mass**2) + ebi(3) = DSQRT(ebi(0)**2-beam_mass**2) ebo(0) = ebeam(1) ebo(1) = 0 ebo(2) = 0 - ebo(3) = DSQRT(ebo(0)**2-local_mass**2) + ebo(3) = DSQRT(ebo(0)**2-beam_mass**2) beta = get_betaz(ebi, ebo) if (xbk(1).eq.1d0) then pb(0,isym(1,jsym)) = ebo(0) @@ -668,20 +668,19 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) enddo else - if (pmass(1).eq.0d0.and.(abs(lpp(1)).eq.3.or.abs(lpp(1)).eq.4.and.ebeam(2).gt.10d0*m2))then - local_mass = 0d0 - else - local_mass = m2 - endif - ebi(0) = p(0,1)/xbk(1) ! this assumes that particle 1 is massless or mass equal to beam + if((abs(lpp(2)).gt.2.and.abs(lpp(2)).ne.9).or.xbk(2).eq.1d0)then + beam_mass = pmass(2) + else + beam_mass = m2 + endif ebi(0) = p(0,2)/xbk(2) ! this assumes that particle 2 is massless or mass equal to beam ebi(1) = 0 ebi(2) = 0 - ebi(3) = -1d0*DSQRT(ebi(0)**2-local_mass**2) + ebi(3) = -1d0*DSQRT(ebi(0)**2-beam_mass**2) ebo(0) = ebeam(2) ebo(1) = 0 ebo(2) = 0 - ebo(3) = -1d0*DSQRT(ebo(0)**2-local_mass**2) + ebo(3) = -1d0*DSQRT(ebo(0)**2-beam_mass**2) beta = get_betaz(ebi, ebo) if (xbk(2).eq.1d0) then pb(0,isym(2,jsym)) = ebo(0) @@ -701,6 +700,21 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) write(*,*) 'Warning bad x1 or x2 in write_leshouche', $ xbk(1),xbk(2) endif + do j=1,nexternal + call zboost_with_beta(p(0,j),beta,pb(0,isym(j,jsym))) + pb(4,isym(j,jsym))=pmass(j) + enddo + + ! check for numerical_accuracy + if (pb(0,1).gt.ebeam(1).or.pb(0,2).gt.ebeam(2))then + ! go back to old method --more accurate when boosting with xbk close to one-- + eta = sqrt(xbk(1)*ebeam(1)/(xbk(2)*ebeam(2))) + pboost(0)=p(0,1)*(eta + 1d0/eta) + pboost(3)=p(0,1)*(eta - 1d0/eta) + do j=1,nexternal + call boostx(p(0,j),pboost,pb(0,isym(j,jsym))) + enddo + endif else do j=1,nexternal call boostx(p(0,j),pboost,pb(0,isym(j,jsym))) @@ -709,6 +723,8 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) enddo endif + + if (IMIRROR.eq.2.and.pmass(1).ne.pmass(2)) then c Note that in this context isym(1,jsym) should never be "2" since the mass differ pb(4,isym(1,jsym))=pmass(2) 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..2efb5954a6 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] @@ -1991,6 +1991,11 @@ def default_setup(self): self.add_param("PartonLevel:FSRinResonances", True, hidden=True, always_write_to_card=False, comment="Do not allow shower to run from decay product of unstable particle") self.add_param("ProcessLevel:resonanceDecays", True, hidden=True, always_write_to_card=False, comment="Do not allow unstable particle to decay.") + # Parameters only needed for main164 type of run (not pythia8/MG5 interface) + self.add_param("Main:HepMC", True, hidden=True, always_write_to_card=False, + comment="""Specify the type of output to be used by the main164 run. """) + self.add_param("HepMC:output", 'hepmc.gz', hidden=True, always_write_to_card=False, + comment="Specify the HepMC output file to be used by the main164 run.") # Add parameters controlling the subruns execution flow. # These parameters should not be part of PY8SubRun daughter. self.add_default_subruns('parameters') @@ -2087,8 +2092,10 @@ def MadGraphSet(self, name, value, **opts): force = False if name.lower() not in self or (force or name.lower() not in self.user_set): self.__setitem__(name, value, change_userdefine=False, **opts) - self.system_set.add(name.lower()) - + self.system_set.add(name.lower()) + else: + raise Exception("The parameter %s is already set to %s. You can not change it." % (name, self[name])) + def defaultSet(self, name, value, **opts): self.__setitem__(name, value, change_userdefine=False, **opts) @@ -2144,9 +2151,19 @@ def pythia8_formatting(value, formatv=None): else: return ','.join([PY8Card.pythia8_formatting(arg) for arg in value]) + #change of name convention between MG5 old interface and main164 from Pythia8 + interface_to_164 = {'HEPMCoutput:file': 'HepMC:output', + 'SysCalc:fullCutVariation': '!SysCalc:fullCutVariation (not supported with 164)', + 'SysCalc:qCutList': '!SysCalc:qCutList (not supported with 164)', + 'SysCalc:qWeed': '!SysCalc:qWeed (not supported with 164)', + 'SysCalc:tmsList': '!SysCalc:tmsList (not supported with 164)', + 'HEPMCoutput:scaling' : '!HEPMCoutput :scaling (not supported with 164)', + 'LHEFInputs:nSubruns' : 'Main:numberOfSubruns'} + def write(self, output_file, template, read_subrun=False, - print_only_visible=False, direct_pythia_input=False, add_missing=True): + print_only_visible=False, direct_pythia_input=False, add_missing=True, + use_mg5amc_py8_interface=False): """ Write the card to output_file using a specific template. > 'print_only_visible' specifies whether or not the hidden parameters should be written out if they are in the hidden_params_to_always_write @@ -2155,7 +2172,12 @@ def write(self, output_file, template, read_subrun=False, in the self.visible_params_to_always_write list and are not user_set or system_set are commented. > If 'add_missing' is False then parameters that should be written_out but are absent - from the template will not be written out.""" + from the template will not be written out. + > use_mg5amc_py8_interface is a flag to indicate that the MG5aMC-PY8 interface is used or not + if not used some parameters need to be translated from the old convention to the new one + """ + + self.use_mg5amc_py8_interface = use_mg5amc_py8_interface # First list the visible parameters visible_param = [p for p in self if p.lower() not in self.hidden_param @@ -2297,7 +2319,16 @@ def group_params(params): else: # Just copy parameters which don't need to be specified if param.lower() not in self.params_to_never_write: - output.write(line) + + if not use_mg5amc_py8_interface and direct_pythia_input and \ + param in self.interface_to_164: + param_entry = self.interface_to_164[param.strip()] + # special case for HepMC needs two flags + if 'HepMC:output' == param_entry: + output.write(' %s=%s\n'%('Main:HepMC', 'on')) + output.write('%s=%s\n'%(param_entry,new_value)) + else: + output.write(line) else: output.write('! The following parameter was forced to be commented out by MG5aMC.\n') output.write('! %s'%line) @@ -2313,6 +2344,7 @@ def group_params(params): if ((not direct_pythia_input) or (param.lower() in self.visible_params_to_always_write) or (param.lower() in self.user_set) or + (param.lower() in self.hidden_params_to_always_write) or (param.lower() in self.system_set)): template = '%s=%s' else: @@ -2321,6 +2353,19 @@ def group_params(params): # then they shouldn't be passed to Pythia template = '!%s=%s' + if not use_mg5amc_py8_interface and direct_pythia_input and \ + param in self.interface_to_164: + param_entry = self.interface_to_164[param] + # special case for HepMC needs two flags + if 'HepMC:output' == param_entry: + output.write(' %s=%s\n'%('Main:HepMC', 'on')) + if 'Main:InternalAnalysis'.lower() in self.user_set and \ + self['Main:InternalAnalysis'].lower() == 'on': + output.write('InternalAnalysis:output = ./djrs.dat\n') + + #elif param in self.interface_to_164.values() and not direct_pythia_input: + # misc.sprint(use_mg5amc_py8_interface, direct_pythia_input,param) + # raise Exception('The parameter %s is not supported in the MG5aMC-PY8 interface. Please use the new interface.'%param_entry output.write(template%(param_entry, value_entry.replace(value,new_value))) @@ -2365,6 +2410,8 @@ def group_params(params): comment = '\n'.join('! %s'%c for c in self.comments[param.lower()].split('\n')) output.write(comment+'\n') + if not use_mg5amc_py8_interface and param in self.interface_to_164: + continue output.write('%s=%s\n'%(param,PY8Card.pythia8_formatting(self[param]))) # Don't close the file if we were reading a subrun, but simply write @@ -3318,7 +3365,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 +3372,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 @@ -4050,8 +4095,8 @@ def post_set_fixed_fac_scale(card, value, change_userdefine, raiseerror, **opt): if 'fixed_fac_scale2' in card.user_set: card.user_set.remove('fixed_fac_scale2') - # #card['pdlabel1'] = value - # #card['pdlabel2'] = value + dict.__setitem__(card, 'fixed_fac_scale1', card['fixed_fac_scale']) + dict.__setitem__(card, 'fixed_fac_scale2', card['fixed_fac_scale']) @staticmethod def post_set(card, value, change_userdefine, raiseerror, name='unknown', **opt): @@ -4201,6 +4246,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 @@ -4451,11 +4497,11 @@ def check_validity(self): time.sleep(5) if self['drjj'] != 0: if 'drjj' in self.user_set: - logger.warning('Since icckw>0, changing the value of \'drjj\' to 0') + logger.warning('Since ickkw>0, changing the value of \'drjj\' to 0') self['drjj'] = 0 if self['drjl'] != 0: if 'drjl' in self.user_set: - logger.warning('Since icckw>0, changing the value of \'drjl\' to 0') + logger.warning('Since ickkw>0, changing the value of \'drjl\' to 0') self['drjl'] = 0 if not self['auto_ptj_mjj']: if self['mmjj'] > self['xqcut']: @@ -4753,7 +4799,6 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): self['fixed_fac_scale1'] = True self['nhel'] = 1 for i in beam_id_split[1]: - exit if abs(i) == 11: self['lpp1'] = -math.copysign(3,i) self['lpp2'] = math.copysign(3,i) @@ -5577,6 +5622,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 +5838,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/cluster.py b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/cluster.py index 95ef45b5f3..66069293d2 100755 --- a/epochX/cudacpp/heft_gg_bb.mad/bin/internal/cluster.py +++ b/epochX/cudacpp/heft_gg_bb.mad/bin/internal/cluster.py @@ -602,6 +602,7 @@ def __init__(self, *args, **opt): self.submitted = six.moves.queue.Queue() # one entry by job submitted self.stoprequest = threading.Event() #flag to ensure everything to close self.demons = [] + self.gpus_list = [] self.nb_done =0 if 'nb_core' in opt: self.nb_core = opt['nb_core'] @@ -623,23 +624,46 @@ def __init__(self, *args, **opt): self.done_pid_queue = six.moves.queue.Queue() self.fail_msg = None + mg5_gpu_env_str = 'MG5_GPU_VISIBLE_DEVICES' + gpu_variables = [['NVIDIA_VISIBLE_DEVICES', 'CUDA_VISIBLE_DEVICES'], + ['ROCR_VISIBLE_DEVICES', 'HIP_VISIBLE_DEVICES'],] + if mg5_gpu_env_str in os.environ: + new_var = os.environ[mg5_gpu_env_str].split(',') + if len(new_var) == 2: + gpu_variables.insert(0, new_var) + else: + logger.error('Invalid format for %s=%s, it should be a comma-separated list of two elements' % (mg5_gpu_env_str, os.environ[mg5_gpu_env_str])) + for get_var,set_var in gpu_variables: + if get_var in os.environ: + self.gpus_list = os.environ.get(get_var).split(',') + self.gpu_set_var = set_var + self.gpus_count = len(self.gpus_list) + logger.info('Found %s GPUs: %s' % (self.gpus_count, self.gpus_list)) def start_demon(self): import threading - t = threading.Thread(target=self.worker) + env2 = None + if len(self.gpus_list): + env2 = os.environ.copy() + this_gpu_idx = len(self.demons) % self.gpus_count + env2[self.gpu_set_var] = self.gpus_list[this_gpu_idx] + t = threading.Thread(target=self.worker, kwargs={'env2': env2}) + else: + t = threading.Thread(target=self.worker) t.daemon = True t.start() self.demons.append(t) - def worker(self): + def worker(self, env2=None): import six.moves.queue import six.moves._thread while not self.stoprequest.isSet(): try: args = self.queue.get(timeout=10) tag, exe, arg, opt = args + opt['env'] = env2 try: # check for executable case if isinstance(exe,str): 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..69291df0d4 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): @@ -1463,11 +1463,15 @@ def create_plot(self, mode='parton', event_path=None, output=None, tag=None): self.run_name, '%s_pts.dat' % tag) for observable_name, data_path in [('djr',djr_path), ('pt',pt_path)]: - if not self.generate_Pythia8_HwU_plots( + try: + if not self.generate_Pythia8_HwU_plots( PY8_plots_root_path, merging_scale_name, observable_name,data_path): - return False - + return False + except Exception as error: + if os.path.exists(data_path): + logger.info('plot information present in %s' % data_path) + return True if mode == 'Pythia8': plot_files = glob.glob(pjoin(PY8_plots_root_path,'*.gnuplot')) if not misc.which('gnuplot'): @@ -1964,12 +1968,16 @@ def do_systematics(self, line): self.cluster.wait(os.path.dirname(output), update_status, update_first=update_status) except Exception: self.cluster.remove() + for i in range(nb_submit): + os.remove('%s/tmp_%s_%s' %(os.path.dirname(output),i,os.path.basename(output))) old_run_mode = self.options['run_mode'] self.options['run_mode'] =0 + out =False try: out = self.do_systematics(line) finally: self.options['run_mode'] = old_run_mode + return out #collect the data all_cross = [] for i in range(nb_submit): @@ -1995,18 +2003,21 @@ def do_systematics(self, line): self.run_card['event_norm'] in ['unity']: all_cross= [cross/nb_event for cross in all_cross] - sys_obj = systematics.call_systematics([input, None] + opts, - log=lambda x: logger.info(str(x)), - result=result_file, - running=False - ) + + sys_obj = systematics.call_systematics([input, None] + opts, + log=lambda x: logger.info(str(x)), + result=result_file, + running=False + ) + sys_obj.print_cross_sections(all_cross, nb_event, result_file) - + #concatenate the output file subprocess.call(['cat']+\ ['./tmp_%s_%s' % (i, os.path.basename(output)) for i in range(nb_submit)], stdout=open(output,'w'), cwd=os.path.dirname(output)) + for i in range(nb_submit): os.remove('%s/tmp_%s_%s' %(os.path.dirname(output),i,os.path.basename(output))) # os.remove('%s/log_sys_%s.txt' % (os.path.dirname(output),i)) @@ -3831,7 +3842,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 +5146,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 +6751,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 +6775,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 +6826,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..6fbdd98100 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': @@ -1858,6 +1855,8 @@ def parse_histos_from_PY8_XML_stream(self, stream, run_id=None, # If merging cut is negative, then pick only the one of the central scale # If not specified, then take them all but use the PDF and scale weight # of the central merging_scale for the variation. + if not all_weights: + raise MadGraph5Error('No weights were found in the HwU XML source.') if merging_scale is None or merging_scale < 0.0: merging_scale_chosen = all_weights[2]['MERGING'] else: @@ -2480,14 +2479,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 +2738,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 +2877,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 +2889,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 +2898,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 +2907,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 +2916,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..b1739da73d 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 @@ -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: O. Mattelaer (Aug 2023) for the MG5aMC CUDACPP plugin. -# Further modified by: O. Mattelaer, A. Valassi (2024) for the MG5aMC CUDACPP plugin. +# Further modified by: O. Mattelaer, A. Valassi, Z. Wettersten (2024-2025) for the MG5aMC CUDACPP plugin. import logging import os @@ -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') @@ -133,7 +133,8 @@ def default_setup(self): super().default_setup() # change default value: self['cudacpp_backend'] = 'cuda' - self['vector_size'] = 16384 # already setup in default class (just change value) + self['vector_size'] = 32 # ZW: default to 32, might want to change to 64 to utilise AMD GPUs better as well # 16384 # already setup in default class (just change value) + self['nb_warp'] = 512 # number of warps per kernel call, for now setting to 16 384 / vector_size MEINTERFACE = CPPMEInterface RunCard = CPPRunCard 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..81d17f7cb1 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 @@ -1035,12 +1035,12 @@ def define_init_banner(self, wgt, lha_strategy, proc_charac=None): from_init = True if not from_init: - if group in grouped_cross: - grouped_cross[group] += self.allcross[i] - grouped_error[group] += self.error[i]**2 + if int(group) in grouped_cross: + grouped_cross[int(group)] += self.allcross[i] + grouped_error[int(group)] += self.error[i]**2 else: - grouped_cross[group] = self.allcross[i] - grouped_error[group] = self.error[i]**2 + grouped_cross[int(group)] = self.allcross[i] + grouped_error[int(group)] = self.error[i]**2 else: ban = banner_mod.Banner(ff.banner) for line in ban['init'].split('\n'): @@ -1048,11 +1048,11 @@ def define_init_banner(self, wgt, lha_strategy, proc_charac=None): if len(splitline)==4: cross, error, _, group = splitline if int(group) in grouped_cross: - grouped_cross[group] += float(cross) - grouped_error[group] += float(error)**2 + grouped_cross[int(group)] += float(cross) + grouped_error[int(group)] += float(error)**2 else: - grouped_cross[group] = float(cross) - grouped_error[group] = float(error)**2 + grouped_cross[int(group)] = float(cross) + grouped_error[int(group)] = float(error)**2 nb_group = len(grouped_cross) # compute the information for the first line @@ -1086,6 +1086,8 @@ def define_init_banner(self, wgt, lha_strategy, proc_charac=None): self.seek(0) if init_information["idbmup2"] in [0,9]: event = next(self) + if len(event) == 0: + event = Event(str(event)) init_information["idbmup2"] = event[1].pdg self.seek(0) @@ -2166,10 +2168,13 @@ def check(self): abspz += abs(particle.pz) # check mass fourmass = FourMomentum(particle).mass - - if particle.mass and (abs(particle.mass) - fourmass)/ abs(particle.mass) > threshold: - raise Exception( "Do not have correct mass lhe: %s momentum: %s (error at %s" % (particle.mass, fourmass, (abs(particle.mass) - fourmass)/ abs(particle.mass))) - + if particle.mass: + expected = (particle.E - math.sqrt(particle.E**2 -particle.mass**2))/particle.E + if expected > 1e-8: + mass_threshold = particle.E**2 - (particle.E-threshold)**2 + if (abs(particle.mass) - fourmass)/ mass_threshold > 5: + raise Exception( "Do not have correct mass lhe: %s momentum: %s (error at %s" % (particle.mass, fourmass, (abs(particle.mass) - fourmass)/ abs(particle.mass))) + if E/absE > threshold: logger.critical(self) @@ -2953,8 +2958,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..4d5597c722 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) @@ -2827,10 +2827,10 @@ def print_results_in_shell(self, data): logger.info(" Nb of events after matching/merging : %d" % int(data['nb_event_pythia'])) if self.run_card['use_syst'] in self.true and \ (int(self.run_card['ickkw'])==1 or self.run_card['ktdurham']>0.0 - or self.run_card['ptlund']>0.0): + or self.run_card['ptlund']>0.0) and data['cross_pythia'] == -1: logger.info(" Notice that because Systematics computation is turned on, the merging did not veto events but modified their weights instead.\n"+\ " The resulting hepmc/stdhep file should therefore be use with those weights.") - else: + elif data['cross_pythia'] == -1: logger.info(" Nb of events after merging : %s" % data['nb_event_pythia']) logger.info(" " ) @@ -3055,6 +3055,7 @@ def do_multi_run(self, line): crossoversig = 0 inv_sq_err = 0 nb_event = 0 + madspin = False for i in range(nb_run): self.nb_refine = 0 self.exec_cmd('generate_events %s_%s -f' % (main_name, i), postcmd=False) @@ -3067,6 +3068,8 @@ def do_multi_run(self, line): inv_sq_err+=1.0/error**2 self.results[main_name][-1]['cross'] = crossoversig/inv_sq_err self.results[main_name][-1]['error'] = math.sqrt(1.0/inv_sq_err) + if 'decayed' in self.run_name: + madspin = True self.results.def_current(main_name) self.run_name = main_name self.update_status("Merging LHE files", level='parton') @@ -3074,9 +3077,12 @@ def do_multi_run(self, line): os.mkdir(pjoin(self.me_dir,'Events', self.run_name)) except Exception: pass - os.system('%(bin)s/merge.pl %(event)s/%(name)s_*/unweighted_events.lhe.gz %(event)s/%(name)s/unweighted_events.lhe.gz %(event)s/%(name)s_banner.txt' + + os.system('%(bin)s/merge.pl %(event)s/%(name)s_*%(madspin)s/unweighted_events.lhe.gz %(event)s/%(name)s/unweighted_events.lhe.gz %(event)s/%(name)s_banner.txt' % {'bin': self.dirbin, 'event': pjoin(self.me_dir,'Events'), - 'name': self.run_name}) + 'name': self.run_name, + 'madspin': '_decayed_*' if madspin else '' + }) eradir = self.options['exrootanalysis_path'] if eradir and misc.is_executable(pjoin(eradir,'ExRootLHEFConverter')): @@ -3656,9 +3662,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'))) @@ -3757,6 +3765,8 @@ def split(a, n): k, m = divmod(len(a), n) return (a[i*k+min(i, m):(i+1)*k+min(i+1, m)] for i in range(n)) + Gdirs = self.remove_empty_events(Gdirs) + partials_info = [] if len(Gdirs) >= max_G: start_unweight= time.perf_counter() @@ -3786,7 +3796,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, @@ -4223,7 +4233,7 @@ def mg5amc_py8_interface_consistency_warning(options): return None - def setup_Pythia8RunAndCard(self, PY8_Card, run_type): + def setup_Pythia8RunAndCard(self, PY8_Card, run_type, use_mg5amc_py8_interface): """ Setup the Pythia8 Run environment and card. In particular all the process and run specific parameters of the card are automatically set here. This function returns the path where HEPMC events will be output, if any.""" @@ -4338,10 +4348,10 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): PY8_Card.systemSet('Beams:setProductionScalesFromLHEF',True) # Automatically set qWeed to xqcut if not defined by the user. - if PY8_Card['SysCalc:qWeed']==-1.0: + if use_mg5amc_py8_interface and PY8_Card['SysCalc:qWeed']==-1.0: PY8_Card.MadGraphSet('SysCalc:qWeed',self.run_card['xqcut'], force=True) - if PY8_Card['SysCalc:qCutList']=='auto': + if use_mg5amc_py8_interface and PY8_Card['SysCalc:qCutList']=='auto': if self.run_card['use_syst']: if self.run_card['sys_matchscale']=='auto': qcut = PY8_Card['JetMatching:qCut'] @@ -4368,7 +4378,7 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): # Specific MLM settings # PY8 should not implement the MLM veto since the driver should do it # if merging scale variation is turned on - if self.run_card['use_syst']: + if use_mg5amc_py8_interface and self.run_card['use_syst']: # We do no force it here, but it is clear that the user should know what # he's doing if he were to force it to True. PY8_Card.MadGraphSet('JetMatching:doVeto',False) @@ -4444,7 +4454,7 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): PY8_Card.MadGraphSet('SpaceShower:pTmaxMatch',1) PY8_Card.MadGraphSet('SpaceShower:rapidityOrder',False) # PY8 should not implement the CKKW veto since the driver should do it. - if self.run_card['use_syst']: + if use_mg5amc_py8_interface and self.run_card['use_syst']: # We do no force it here, but it is clear that the user should know what # he's doing if he were to force it to True. PY8_Card.MadGraphSet('Merging:applyVeto',False) @@ -4516,6 +4526,12 @@ def do_pythia8(self, line): else: no_default = False + if '--old_interface' in args: + use_mg5amc_py8_interface = True + args.remove('--old_interface') + else: + use_mg5amc_py8_interface = False + if not self.run_name: self.check_pythia8(args) self.configure_directory(html_opening =False) @@ -4545,20 +4561,27 @@ def do_pythia8(self, line): #"Please use 'event_norm = average' in the run_card to avoid this problem.") - - if not self.options['mg5amc_py8_interface_path'] or not \ - os.path.exists(pjoin(self.options['mg5amc_py8_interface_path'], - 'MG5aMC_PY8_interface')): - raise self.InvalidCmd( -"""The MG5aMC_PY8_interface tool cannot be found, so that MadEvent cannot steer Pythia8 shower. -Please install this tool with the following MG5_aMC command: - MG5_aMC> install mg5amc_py8_interface_path""") + if use_mg5amc_py8_interface: + if not self.options['mg5amc_py8_interface_path'] or not \ + os.path.exists(pjoin(self.options['mg5amc_py8_interface_path'], + 'MG5aMC_PY8_interface')): + raise self.InvalidCmd( + """The MG5aMC_PY8_interface tool cannot be found, so that MadEvent cannot steer Pythia8 shower. + Please install this tool with the following MG5_aMC command: + MG5_aMC> install mg5amc_py8_interface_path""") + else: + pythia_main = pjoin(self.options['mg5amc_py8_interface_path'], + 'MG5aMC_PY8_interface') + warnings = MadEventCmd.mg5amc_py8_interface_consistency_warning(self.options) + if warnings: + logger.warning(warnings) else: - pythia_main = pjoin(self.options['mg5amc_py8_interface_path'], - 'MG5aMC_PY8_interface') - warnings = MadEventCmd.mg5amc_py8_interface_consistency_warning(self.options) - if warnings: - logger.warning(warnings) + pythia_main = pjoin(self.options['pythia8_path'], 'share', 'Pythia8', 'examples', 'main164') + if not os.path.exists(pythia_main): + pythia_main = pjoin(self.options['pythia8_path'], 'examples', 'main164') + if not os.path.exists(pythia_main): + logger.warning('main164 not found (or not compiled). Will try the old interface instead.') + return self.do_pythia8(line + ' --old_interface') self.results.add_detail('run_mode', 'madevent') @@ -4583,14 +4606,19 @@ def do_pythia8(self, line): run_type = 'CKKW' # Edit the card and run environment according to the run specification - HepMC_event_output = self.setup_Pythia8RunAndCard(PY8_Card, run_type) + HepMC_event_output = self.setup_Pythia8RunAndCard(PY8_Card, run_type, use_mg5amc_py8_interface=use_mg5amc_py8_interface) + + if not use_mg5amc_py8_interface and self.options['run_mode']==0 or (self.options['run_mode']==2 and self.options['nb_core']==1): + PY8_Card['Main:numberOfEvents']= self.run_card['nevents'] + # Now write the card. pythia_cmd_card = pjoin(self.me_dir, 'Events', self.run_name , '%s_pythia8.cmd' % tag) cmd_card = StringIO.StringIO() PY8_Card.write(cmd_card,pjoin(self.me_dir,'Cards','pythia8_card_default.dat'), - direct_pythia_input=True) + direct_pythia_input=True, + use_mg5amc_py8_interface=use_mg5amc_py8_interface) # Now setup the preamble to make sure that everything will use the locally # installed tools (if present) even if the user did not add it to its @@ -4632,7 +4660,7 @@ def do_pythia8(self, line): " command '/usr/bin/env %s' exists and returns a valid path."%shell) exe_cmd = "#!%s\n%s"%(shell_exe,' '.join( - [preamble+pythia_main, + [preamble+pythia_main, '' if use_mg5amc_py8_interface else '-c', os.path.basename(pythia_cmd_card)])) wrapper.write(exe_cmd) @@ -4699,6 +4727,7 @@ def do_pythia8(self, line): n_cores = max(min(min_n_core,n_cores),1) if self.options['run_mode']==0 or (self.options['run_mode']==2 and self.options['nb_core']==1): + # No need for parallelization anymore self.cluster = None logger.info('Follow Pythia8 shower by running the '+ @@ -4744,20 +4773,22 @@ def do_pythia8(self, line): ParallelPY8Card.subruns[0].systemSet('Beams:LHEF','events.lhe.gz') ParallelPY8Card.write(pjoin(parallelization_dir,'PY8Card.dat'), pjoin(self.me_dir,'Cards','pythia8_card_default.dat'), - direct_pythia_input=True) + direct_pythia_input=True, + use_mg5amc_py8_interface=use_mg5amc_py8_interface) # Write the wrapper wrapper_path = pjoin(parallelization_dir,'run_PY8.sh') wrapper = open(wrapper_path,'w') if self.options['cluster_temp_path'] is None: exe_cmd = \ -"""#!%s -./%s PY8Card.dat >& PY8_log.txt -""" +"""#!%%s +./%%s %s PY8Card.dat >& PY8_log.txt +""" % ('' if use_mg5amc_py8_interface else '-c') + else: exe_cmd = \ -"""#!%s +"""#!%%s ln -s ./events_$1.lhe.gz ./events.lhe.gz -./%s PY8Card_$1.dat >& PY8_log.txt +./%%s %s PY8Card_$1.dat >& PY8_log.txt mkdir split_$1 if [ -f ./events.hepmc ]; then @@ -4776,7 +4807,7 @@ def do_pythia8(self, line): mv ./PY8_log.txt ./split_$1/ fi tar -czf split_$1.tar.gz split_$1 -""" +""" % ('' if use_mg5amc_py8_interface else '-c') exe_cmd = exe_cmd%(shell_exe,os.path.basename(pythia_main)) wrapper.write(exe_cmd) wrapper.close() @@ -4812,19 +4843,27 @@ def do_pythia8(self, line): pjoin(parallelization_dir,split_files[-1])) logger.info('Submitting Pythia8 jobs...') + for i, split_file in enumerate(split_files): # We must write a PY8Card tailored for each split so as to correct the normalization # HEPMCoutput:scaling of each weight since the lhe showered will not longer contain the # same original number of events - split_PY8_Card = banner_mod.PY8Card(pjoin(parallelization_dir,'PY8Card.dat')) + split_PY8_Card = banner_mod.PY8Card(pjoin(parallelization_dir,'PY8Card.dat'), setter='user') + assert split_PY8_Card['JetMatching:nJetMax'] == PY8_Card['JetMatching:nJetMax'] + + + # Make sure to sure the number of split_events determined during the splitting. - split_PY8_Card.systemSet('Main:numberOfEvents',partition_for_PY8[i]) + split_PY8_Card.systemSet('Main:numberOfEvents',partition_for_PY8[i], force=True) + assert split_PY8_Card['Main:numberOfEvents'] == partition_for_PY8[i] split_PY8_Card.systemSet('HEPMCoutput:scaling',split_PY8_Card['HEPMCoutput:scaling']* - (float(partition_for_PY8[i]))) + (float(partition_for_PY8[i])), force=True) # Add_missing set to False so as to be sure not to add any additional parameter w.r.t # the ones in the original PY8 param_card copied. split_PY8_Card.write(pjoin(parallelization_dir,'PY8Card_%d.dat'%i), - pjoin(parallelization_dir,'PY8Card.dat'), add_missing=False) + pjoin(parallelization_dir,'PY8Card.dat'), add_missing=False, + direct_pythia_input=True, + use_mg5amc_py8_interface=use_mg5amc_py8_interface) in_files = [pjoin(parallelization_dir,os.path.basename(pythia_main)), pjoin(parallelization_dir,'PY8Card_%d.dat'%i), pjoin(parallelization_dir,split_file)] @@ -5073,7 +5112,7 @@ def wait_monitoring(Idle, Running, Done): # works both for fixed number of generated events and fixed accepted events self.results.add_detail('error_pythia', error_m) - if self.run_card['use_syst']: + if self.run_card['use_syst'] and use_mg5amc_py8_interface: self.results.add_detail('cross_pythia', -1) self.results.add_detail('error_pythia', 0) @@ -6132,7 +6171,102 @@ def get_Gdir(self, Pdir=None, symfact=None): mfactors[pjoin(P, "G%s" % tag)] = mfactor self.Gdirs = (Gdirs, mfactors) return self.get_Gdir(Pdir, symfact=symfact) + + ############################################################################ + def remove_empty_events(self, Gdir): + """return Gdir strip from the one providing empty events.lhe files.""" + + reasons = collections.defaultdict(list) + Gdirs = Gdir[:] + for G in Gdirs[:]: + try: + size = os.path.getsize(pjoin(G, 'events.lhe')) + except Exception as error: + size = 0 + if size <10: + Gdirs.remove(G) + try: + log = misc.BackRead(pjoin(G, 'log.txt')) + except Exception as error: + log = misc.BackRead(pjoin(G, 'run1_app.log')) + found = -1 + for line in log: + if 'Deleting file events.lhe' in line: + found = 0 + elif "Impossible BW configuration" in line: + reasons['bwconfig'].append(G) + break + elif found < -150: + reasons['not found'].append(G) + Gdirs.append(G) + break + elif found < 0: + found -= 1 + elif 'Loosen cuts or increase max_events' in line: + reasons['cuts'].append(G) + break + elif 'all returned zero' in line: + reasons['zero'].append(G) + break + elif found > 5: + reasons['unknown'].append(G) + break + else: + found += 1 + + if len(reasons): + logger.debug('Reasons for empty events.lhe:') + if len(reasons['unknown']): + logger.debug(' - unknown: %s' % len(reasons['unknown'])) + logger.log(10, ' DETAIL:' + ','.join(['/'.join(G.rsplit(os.sep)[-2:]) for G in reasons['unknown'][:10]])) + if len(reasons['not found']): + logger.debug(' - not found in log: %s' % len(reasons['not found'])) + logger.log(10, ' DETAIL:' + ','.join(['/'.join(G.rsplit(os.sep)[-2:]) for G in reasons['not found'][:10]])) + if len(reasons['zero']): + logger.debug(' - zero amplitudes: %s' % len(reasons['zero'])) + logger.log(10, ' DETAIL:' + ','.join(['/'.join(G.rsplit( os.sep)[-2:]) for G in reasons['zero'][:10]])) + if len(reasons['bwconfig']): + critical_bwconfig = set() + for G in reasons['bwconfig']: + base = G.rsplit('.',1)[0] + if any(G2.startswith(base) for G2 in Gdirs): + continue + else: + critical_bwconfig.add(os.sep.join(base.rsplit(os.sep)[-2:])) + for G in critical_bwconfig: + logger.warning('Gdirectory %s has no events.lhe file. (no BW config found %s times)' % G) + + logger.debug(' - impossible BW configuration: %s' % len(reasons['bwconfig'])) + logger.debug(' - channel with no possible BW configuration: %s' % len(critical_bwconfig)) + + if len(reasons['cuts']): + critical_nb_cuts = collections.defaultdict(int) + for G in reasons['cuts']: + if '.' in os.path.basename(G): + base = G.rsplit('.',1)[0] + if any(G2.startswith(base) for G2 in Gdirs): + continue + else: + critical_nb_cuts[os.sep.join(base.rsplit(os.sep)[-2:])] += 1 + else: + critical_nb_cuts[''] += 1 + logger.warning('Gdirectory %s has no events.lhe file. (no points passed cuts found)' % G) + for G, nb in critical_nb_cuts.items(): + if not G: + continue + else: + logger.warning('%s channel %s.XXX has no events.lhe file. (no points passed cuts). No %s with events detected' % (nb, G, G)) + logger.debug(' - no points passed cuts: %s' % len(reasons['cuts'])) + logger.log(10, ' DETAIL:' + ','.join(['/'.join(G.rsplit(os.sep)[-2:]) for G in reasons['cuts'][:10]])) + logger.debug(' - without any BW handling (critical): %s' % critical_nb_cuts['']) + logger.debug(' - with BW but all zero (critical): %s' % sum([nb for v, nb in critical_nb_cuts.items() if v!=''], 0)) + #logger.debug(' - cuts (with BW conflict where other channel contributes): %s' % (len(reasons['cuts'])- critical_nb_cuts)) + + + return Gdirs + + ############################################################################ def set_run_name(self, name, tag=None, level='parton', reload_card=False, allow_new_tag=True): @@ -6749,7 +6883,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 +6893,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 +7010,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 +7038,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 +7053,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 +7065,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 +7190,13 @@ 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) 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 +7210,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..00039a813c 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.3, 2025-06-12 // 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..cbe3929172 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.3, 2025-06-12 // 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..73ad28a01f 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.3, 2025-06-12 // 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/test/cudacpp_test.mk b/epochX/cudacpp/heft_gg_bb.mad/test/cudacpp_test.mk index f703a1ae7c..4934c9a53f 100644 --- a/epochX/cudacpp/heft_gg_bb.mad/test/cudacpp_test.mk +++ b/epochX/cudacpp/heft_gg_bb.mad/test/cudacpp_test.mk @@ -19,7 +19,7 @@ CXXFLAGS += -Igoogletest/googletest/include/ -std=c++11 all: googletest/$(INSTALLDIR)/lib64/libgtest.a googletest/CMakeLists.txt: - git clone https://github.com/google/googletest.git -b release-1.11.0 googletest + git clone https://github.com/google/googletest.git -b v1.17.0 googletest googletest/$(BUILDDIR)/Makefile: googletest/CMakeLists.txt mkdir -p googletest/$(BUILDDIR) 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/P1_Sigma_heft_gg_bbx/CPPProcess.cc b/epochX/cudacpp/heft_gg_bb.sa/SubProcesses/P1_Sigma_heft_gg_bbx/CPPProcess.cc index b9f394434a..1a8836f553 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -565,7 +565,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- 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..da7add7e2e 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.3, 2025-06-12 // 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/cudacpp.mk b/epochX/cudacpp/heft_gg_bb.sa/SubProcesses/cudacpp.mk index 20d8ded718..20b8e6b858 100644 --- a/epochX/cudacpp/heft_gg_bb.sa/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/heft_gg_bb.sa/SubProcesses/cudacpp.mk @@ -114,7 +114,7 @@ export CXXFLAGS override CUDA_HOME = $(patsubst %/bin/nvcc,%,$(shell which nvcc 2>/dev/null)) # Set HIP_HOME from the path to hipcc, if it exists -override HIP_HOME = $(patsubst %/bin/hipcc,%,$(shell which hipcc 2>/dev/null)) +override HIP_HOME = $(shell hipconfig --rocmpath) # Configure CUDA_INC (for CURAND and NVTX) and NVTX if a CUDA installation exists (see #965) ifeq ($(CUDA_HOME),) @@ -229,6 +229,8 @@ ifeq ($(BACKEND),cuda) else ifeq ($(BACKEND),hip) + # example architecture values MI200:gfx90a, MI350X:gfx942 + MADGRAPH_HIP_ARCHITECTURE ?= gfx942 # Set GPUCC as $(HIP_HOME)/bin/hipcc (it was already checked above that this exists) GPUCC = $(HIP_HOME)/bin/hipcc XCOMPILERFLAG = @@ -243,7 +245,7 @@ else ifeq ($(BACKEND),hip) ###GPUFLAGS += -ggdb # FOR DEBUGGING ONLY # AMD HIP architecture flags - GPUARCHFLAGS = --offload-arch=gfx90a + GPUARCHFLAGS = --offload-arch=${MADGRAPH_HIP_ARCHITECTURE} GPUFLAGS += $(GPUARCHFLAGS) # Other AMD-specific flags @@ -878,7 +880,7 @@ endif $(gpu_fcheckmain): LIBFLAGS += $(GPULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH $(gpu_fcheckmain): $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBDIR)/lib$(MG5AMC_GPULIB).so $(gpu_objects_exe) ifneq ($(findstring hipcc,$(GPUCC)),) # link fortran/c++/hip using $FC when hipcc is used #802 - $(FC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) -lstdc++ -L$(shell cd -L $(shell dirname $(shell $(GPUCC) -print-prog-name=clang))/../..; pwd)/lib -lamdhip64 + $(FC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) -lstdc++ -L$(HIP_HOME)/lib -lamdhip64 else $(GPUCC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) endif @@ -979,7 +981,7 @@ else # link only runTest_$(GPUSUFFIX).o (new: in the past, this was linking both $(gpu_testmain): LIBFLAGS += $(GPULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH $(gpu_testmain): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(gpu_objects_lib) $(gpu_objects_exe) $(GTESTLIBS) ifneq ($(findstring hipcc,$(GPUCC)),) # link fortran/c++/hip using $FC when hipcc is used #802 - $(FC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lstdc++ -lpthread -L$(shell cd -L $(shell dirname $(shell $(GPUCC) -print-prog-name=clang))/../..; pwd)/lib -lamdhip64 + $(FC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lstdc++ -lpthread -L$(HIP_HOME)/lib -lamdhip64 else $(GPUCC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lcuda endif @@ -1104,10 +1106,20 @@ else @cat /proc/cpuinfo | grep "physical id" | sort -u endif @echo "" -ifneq ($(shell which nvidia-smi 2>/dev/null),) - nvidia-smi -L + # some systems may have -smi installed, but it fails to execute + # because it cannot communicate with the hardware + @if nvidia-smi &>/dev/null ; then \ + nvidia-smi -L ;\ + else \ + echo "No Nvidia GPU detected" ;\ + fi @echo "" -endif + @if amd-smi &>/dev/null ; then \ + amd-smi static -a ;\ + amd-smi list ;\ + else \ + echo "No AMD GPU detected" ;\ + fi @echo USECCACHE=$(USECCACHE) ifeq ($(USECCACHE),1) ccache --version | head -1 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..00039a813c 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.3, 2025-06-12 // 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..cbe3929172 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.3, 2025-06-12 // 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..73ad28a01f 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.3, 2025-06-12 // 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/test/cudacpp_test.mk b/epochX/cudacpp/heft_gg_bb.sa/test/cudacpp_test.mk index f703a1ae7c..4934c9a53f 100644 --- a/epochX/cudacpp/heft_gg_bb.sa/test/cudacpp_test.mk +++ b/epochX/cudacpp/heft_gg_bb.sa/test/cudacpp_test.mk @@ -19,7 +19,7 @@ CXXFLAGS += -Igoogletest/googletest/include/ -std=c++11 all: googletest/$(INSTALLDIR)/lib64/libgtest.a googletest/CMakeLists.txt: - git clone https://github.com/google/googletest.git -b release-1.11.0 googletest + git clone https://github.com/google/googletest.git -b v1.17.0 googletest googletest/$(BUILDDIR)/Makefile: googletest/CMakeLists.txt mkdir -p googletest/$(BUILDDIR) diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/Cards/ident_card.dat b/epochX/cudacpp/nobm_pp_ttW.mad/Cards/ident_card.dat index a63a4907b5..3e69df93a2 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/Cards/ident_card.dat +++ b/epochX/cudacpp/nobm_pp_ttW.mad/Cards/ident_card.dat @@ -2,28 +2,28 @@ ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c written by the UFO converter ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc +mass 6 mdl_MT +mass 15 mdl_MTA +mass 23 mdl_MZ +mass 25 mdl_MH +sminputs 1 aEWM1 +sminputs 2 mdl_Gf +sminputs 3 aS +yukawa 6 mdl_ymt +yukawa 15 mdl_ymtau - - +decay 6 mdl_WT decay 23 mdl_WZ + decay 24 mdl_WW + decay 25 mdl_WH -decay 6 mdl_WT -mass 15 mdl_MTA -mass 23 mdl_MZ -mass 25 mdl_MH -mass 6 mdl_MT -sminputs 1 aEWM1 -sminputs 2 mdl_Gf -sminputs 3 aS -yukawa 15 mdl_ymtau -yukawa 6 mdl_ymt 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..fa8d3481a2 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 = /home/dmass/Development/madgraph4gpu/amd-ci/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo +mg5_path = /home/dmass/Development/madgraph4gpu/amd-ci/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..7f1f8c6dab 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.3 2025-06-12 * #* * #* WARNING: UNKNOWN DEVELOPMENT VERSION. * #* WARNING: DO NOT USE FOR PRODUCTION * @@ -35,21 +35,23 @@ set loop_color_flows False set max_npoint_for_channel 0 set default_unset_couplings 99 set max_t_for_channel 99 +set zerowidth_tchannel True set nlo_mixed_expansion True -set stdout_level DEBUG -set zerowidth_tchannel F -import model sm-no_b_mass +import model sm define p = g u c d s u~ c~ d~ s~ define j = g u c d s u~ c~ d~ s~ define l+ = e+ mu+ define l- = e- mu- define vl = ve vm vt define vl~ = ve~ vm~ vt~ +set stdout_level DEBUG +set zerowidth_tchannel F +import model sm-no_b_mass define p = 21 2 4 1 3 -2 -4 -1 -3 5 -5 # pass to 5 flavors define p = p b b~ define j = p define w = w+ w- generate p p > t t~ w @0 add process p p > t t~ w j @1 -output madevent_simd ../TMPOUT/CODEGEN_mad_nobm_pp_ttW --hel_recycling\ -=False --vector_size=32 +output madevent_simd nobm_pp_ttW.mad_gen --hel_recycling=False --vecto\ +r_size=32 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..c22a9e0249 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/Cards/run_card.dat +++ b/epochX/cudacpp/nobm_pp_ttW.mad/Cards/run_card.dat @@ -112,11 +112,11 @@ #********************************************************************* # Compilation flag. #********************************************************************* - -O3 -ffast-math -fbounds-check = global_flag ! build flags for all Fortran code (for a fair comparison to cudacpp; default is -O) + -O = global_flag ! fortran optimization flag use for the all code. --fast-math = aloha_flag ! fortran optimization flag for aloha function. Suggestions: '-ffast-math' -O3 = matrix_flag ! fortran optimization flag for matrix.f function. Suggestions: '-O3' - 32 = vector_size ! size of fortran arrays allocated in the multi-event API for SIMD/GPU (VECSIZE_MEMMAX) - 512 = nb_warp ! total number of warp/frontwave + 16 = vector_size ! size of fortran arrays allocated in the multi-event API for SIMD/GPU (VECSIZE_MEMMAX) + 1 = nb_warp ! total number of warp/frontwave #********************************************************************* # Customization (custom cuts/scale/bias/...) * @@ -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..1ac53bb4bd 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.3 \ No newline at end of file diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/Source/.make_opts b/epochX/cudacpp/nobm_pp_ttW.mad/Source/.make_opts index de3864242b..56ba259c56 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/Source/.make_opts +++ b/epochX/cudacpp/nobm_pp_ttW.mad/Source/.make_opts @@ -102,6 +102,7 @@ endif ifneq ($(lhapdf),) CXXFLAGS += $(shell $(lhapdf) --cppflags) alfas_functions=alfas_functions_lhapdf + alfas_to_clean=alfas_functions.o llhapdf+= $(shell $(lhapdf) --cflags --libs) -lLHAPDF # check if we need to activate c++11 (for lhapdf6.2) ifeq ($(origin CXX),default) @@ -113,10 +114,11 @@ ifneq ($(lhapdf),) endif else alfas_functions=alfas_functions + alfas_to_clean=alfas_functions_lhapdf.o llhapdf= endif # Helper function to check MG5 version define CHECK_MG5AMC_VERSION python -c 'import re; from distutils.version import StrictVersion; print StrictVersion("$(MG5AMC_VERSION)") >= StrictVersion("$(1)") if re.match("^[\d\.]+$$","$(MG5AMC_VERSION)") else True;' -endef \ No newline at end of file +endef 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..bdf427601f 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/Source/make_opts +++ b/epochX/cudacpp/nobm_pp_ttW.mad/Source/make_opts @@ -1,12 +1,11 @@ DEFAULT_CPP_COMPILER=g++ -DEFAULT_F2PY_COMPILER=f2py3 -DEFAULT_F_COMPILER=gfortran -GLOBAL_FLAG=-O3 -ffast-math -fbounds-check MACFLAG= +STDLIB=-lstdc++ +STDLIB_FLAG= +DEFAULT_F2PY_COMPILER=f2py +DEFAULT_F_COMPILER=gfortran MG5AMC_VERSION=SpecifiedByMG5aMCAtRunTime PYTHIA8_PATH=NotInstalled -STDLIB_FLAG= -STDLIB=-lstdc++ #end_of_make_opts_variables BIASLIBDIR=../../../lib/ @@ -103,6 +102,7 @@ endif ifneq ($(lhapdf),) CXXFLAGS += $(shell $(lhapdf) --cppflags) alfas_functions=alfas_functions_lhapdf +alfas_to_clean=alfas_functions.o llhapdf+= $(shell $(lhapdf) --cflags --libs) -lLHAPDF # check if we need to activate c++11 (for lhapdf6.2) ifeq ($(origin CXX),default) @@ -114,6 +114,7 @@ endif endif else alfas_functions=alfas_functions +alfas_to_clean=alfas_functions_lhapdf.o llhapdf= endif diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/Source/makefile b/epochX/cudacpp/nobm_pp_ttW.mad/Source/makefile index 291ca907ee..87a9e61723 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/Source/makefile +++ b/epochX/cudacpp/nobm_pp_ttW.mad/Source/makefile @@ -37,10 +37,12 @@ all: $(LIBRARIES) $(LIBDIR)libdhelas.$(libext) $(LIBDIR)libpdf.$(libext) $(LIBDI $(LIBDIR)libdsample.$(libext): $(DSAMPLE) $(call CREATELIB, $@, $^) $(LIBDIR)libgeneric.$(libext): $(GENERIC) + rm -f $@ 2>/dev/null $(call CREATELIB, $@, $^) + rm -f $(alfas_to_clean) 2>/dev/null $(LIBDIR)libdhelas.$(libext): DHELAS cd DHELAS; make; cd .. -$(LIBDIR)libpdf.$(libext): PDF make_opts +$(LIBDIR)libpdf.$(libext): PDF $(alfas_functions).o cd PDF; make; cd .. ifneq (,$(filter edff chff, $(pdlabel1) $(pdlabel2))) $(LIBDIR)libgammaUPC.$(libext): PDF/gammaUPC @@ -73,6 +75,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/vector.inc b/epochX/cudacpp/nobm_pp_ttW.mad/Source/vector.inc index ba125272b6..9d8b377aa7 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/Source/vector.inc +++ b/epochX/cudacpp/nobm_pp_ttW.mad/Source/vector.inc @@ -30,6 +30,8 @@ C INTEGER WARP_SIZE PARAMETER (WARP_SIZE=32) INTEGER NB_WARP - PARAMETER (NB_WARP=512) + PARAMETER (NB_WARP=1) INTEGER VECSIZE_MEMMAX - PARAMETER (VECSIZE_MEMMAX=16384) + PARAMETER (VECSIZE_MEMMAX=32) + + 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..1ac53bb4bd 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.3 \ 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/P0_dux_ttxwm/CPPProcess.cc b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_dux_ttxwm/CPPProcess.cc index 97050f0aa2..799acf3abd 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -579,7 +579,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- 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..d92181aed7 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.3, 2025-06-12 // 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..bcd37d9641 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.3, 2025-06-12 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..27f2a0aae3 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.3, 2025-06-12 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.3, 2025-06-12 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 @@ -501,6 +505,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C Generate events only if IMODE is 0. IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN C Call UNWGT to unweight and store events + ICONFIG = CHANNELS(IVEC) CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) ENDIF diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_dux_ttxwm/driver.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_dux_ttxwm/driver.f index 531dfa0771..8963914a5c 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_dux_ttxwm/driver.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_dux_ttxwm/driver.f @@ -489,7 +489,6 @@ subroutine open_file_local(lun,filename,fopened) fopened=.false. tempname=filename fine=index(tempname,' ') -c fine2=index(path,' ')-1 ! AV remove valgrind "Conditional jump or move depends on uninitialised value(s)" if(fine.eq.0) fine=len(tempname) open(unit=lun,file=tempname,status='old',ERR=20) fopened=.true. 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..f8745a68c0 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.3, 2025-06-12 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.3, 2025-06-12 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,23 +445,31 @@ 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 C ---------- IF (FIRST) THEN FIRST=.FALSE. - IF(ZERO.NE.0D0) FK_ZERO = SIGN(MAX(ABS(ZERO), ABS(ZERO - $ *SMALL_WIDTH_TREATMENT)), ZERO) - IF(MDL_WT.NE.0D0) FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT - $ *SMALL_WIDTH_TREATMENT)), MDL_WT) - IF(MDL_WW.NE.0D0) FK_MDL_WW = SIGN(MAX(ABS(MDL_WW), ABS(MDL_MW - $ *SMALL_WIDTH_TREATMENT)), MDL_WW) + FK_ZERO = 0D0 + IF(MDL_WT.NE.0D0) THEN + FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT + $ *SMALL_WIDTH_TREATMENT)), MDL_WT) + ELSE + FK_MDL_WT = 0D0 + ENDIF + + IF(MDL_WW.NE.0D0) THEN + FK_MDL_WW = SIGN(MAX(ABS(MDL_WW), ABS(MDL_MW + $ *SMALL_WIDTH_TREATMENT)), MDL_WW) + ELSE + FK_MDL_WW = 0D0 + ENDIF + IF(INIT_MODE) THEN ZEROAMP_1(:,:) = .TRUE. @@ -497,10 +506,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 +520,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/CPPProcess.cc b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_udx_ttxwp/CPPProcess.cc index 57246ba1e7..482b77590e 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -579,7 +579,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- 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..09910161f1 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.3, 2025-06-12 // 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..b5e5d182dd 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.3, 2025-06-12 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..6abc3b39fd 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.3, 2025-06-12 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.3, 2025-06-12 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 @@ -501,6 +505,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C Generate events only if IMODE is 0. IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN C Call UNWGT to unweight and store events + ICONFIG = CHANNELS(IVEC) CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) ENDIF diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_udx_ttxwp/driver.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_udx_ttxwp/driver.f index 531dfa0771..8963914a5c 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_udx_ttxwp/driver.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P0_udx_ttxwp/driver.f @@ -489,7 +489,6 @@ subroutine open_file_local(lun,filename,fopened) fopened=.false. tempname=filename fine=index(tempname,' ') -c fine2=index(path,' ')-1 ! AV remove valgrind "Conditional jump or move depends on uninitialised value(s)" if(fine.eq.0) fine=len(tempname) open(unit=lun,file=tempname,status='old',ERR=20) fopened=.true. 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..beb5bf4d5c 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.3, 2025-06-12 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.3, 2025-06-12 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,23 +445,31 @@ 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 C ---------- IF (FIRST) THEN FIRST=.FALSE. - IF(ZERO.NE.0D0) FK_ZERO = SIGN(MAX(ABS(ZERO), ABS(ZERO - $ *SMALL_WIDTH_TREATMENT)), ZERO) - IF(MDL_WT.NE.0D0) FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT - $ *SMALL_WIDTH_TREATMENT)), MDL_WT) - IF(MDL_WW.NE.0D0) FK_MDL_WW = SIGN(MAX(ABS(MDL_WW), ABS(MDL_MW - $ *SMALL_WIDTH_TREATMENT)), MDL_WW) + FK_ZERO = 0D0 + IF(MDL_WT.NE.0D0) THEN + FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT + $ *SMALL_WIDTH_TREATMENT)), MDL_WT) + ELSE + FK_MDL_WT = 0D0 + ENDIF + + IF(MDL_WW.NE.0D0) THEN + FK_MDL_WW = SIGN(MAX(ABS(MDL_WW), ABS(MDL_MW + $ *SMALL_WIDTH_TREATMENT)), MDL_WW) + ELSE + FK_MDL_WW = 0D0 + ENDIF + IF(INIT_MODE) THEN ZEROAMP_1(:,:) = .TRUE. @@ -497,10 +506,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 +520,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/CPPProcess.cc b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_dux_ttxwmg/CPPProcess.cc index 3261780672..5e5d73d221 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -775,7 +775,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- 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..4347f83556 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.3, 2025-06-12 // 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..8840068613 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.3, 2025-06-12 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..110863be58 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.3, 2025-06-12 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.3, 2025-06-12 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 @@ -501,6 +505,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C Generate events only if IMODE is 0. IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN C Call UNWGT to unweight and store events + ICONFIG = CHANNELS(IVEC) CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) ENDIF diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_dux_ttxwmg/driver.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_dux_ttxwmg/driver.f index d8518f17f7..21de29dc55 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_dux_ttxwmg/driver.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_dux_ttxwmg/driver.f @@ -489,7 +489,6 @@ subroutine open_file_local(lun,filename,fopened) fopened=.false. tempname=filename fine=index(tempname,' ') -c fine2=index(path,' ')-1 ! AV remove valgrind "Conditional jump or move depends on uninitialised value(s)" if(fine.eq.0) fine=len(tempname) open(unit=lun,file=tempname,status='old',ERR=20) fopened=.true. 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..1d1624ea30 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.3, 2025-06-12 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.3, 2025-06-12 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,33 +493,35 @@ 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 C ---------- IF (FIRST) THEN FIRST=.FALSE. - IF(ZERO.NE.0D0) FK_ZERO = SIGN(MAX(ABS(ZERO), ABS(ZERO - $ *SMALL_WIDTH_TREATMENT)), ZERO) - IF(MDL_WT.NE.0D0) FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT - $ *SMALL_WIDTH_TREATMENT)), MDL_WT) - IF(MDL_WW.NE.0D0) FK_MDL_WW = SIGN(MAX(ABS(MDL_WW), ABS(MDL_MW - $ *SMALL_WIDTH_TREATMENT)), MDL_WW) + FK_ZERO = 0D0 + IF(MDL_WT.NE.0D0) THEN + FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT + $ *SMALL_WIDTH_TREATMENT)), MDL_WT) + ELSE + FK_MDL_WT = 0D0 + ENDIF + + IF(MDL_WW.NE.0D0) THEN + FK_MDL_WW = SIGN(MAX(ABS(MDL_WW), ABS(MDL_MW + $ *SMALL_WIDTH_TREATMENT)), MDL_WW) + ELSE + FK_MDL_WW = 0D0 + ENDIF + IF(INIT_MODE) THEN ZEROAMP_1(:,:) = .TRUE. @@ -601,10 +604,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 +618,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/CPPProcess.cc b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gd_ttxwmu/CPPProcess.cc index c933a8f276..adae53f56e 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -775,7 +775,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- 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..9a080afd68 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.3, 2025-06-12 // 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..307fe1f6cf 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.3, 2025-06-12 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..ac0a02a97d 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.3, 2025-06-12 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.3, 2025-06-12 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 @@ -498,6 +502,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C Generate events only if IMODE is 0. IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN C Call UNWGT to unweight and store events + ICONFIG = CHANNELS(IVEC) CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) ENDIF diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gd_ttxwmu/driver.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gd_ttxwmu/driver.f index d8518f17f7..21de29dc55 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gd_ttxwmu/driver.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gd_ttxwmu/driver.f @@ -489,7 +489,6 @@ subroutine open_file_local(lun,filename,fopened) fopened=.false. tempname=filename fine=index(tempname,' ') -c fine2=index(path,' ')-1 ! AV remove valgrind "Conditional jump or move depends on uninitialised value(s)" if(fine.eq.0) fine=len(tempname) open(unit=lun,file=tempname,status='old',ERR=20) fopened=.true. 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..af49c9f60d 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.3, 2025-06-12 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.3, 2025-06-12 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,33 +493,35 @@ 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 C ---------- IF (FIRST) THEN FIRST=.FALSE. - IF(ZERO.NE.0D0) FK_ZERO = SIGN(MAX(ABS(ZERO), ABS(ZERO - $ *SMALL_WIDTH_TREATMENT)), ZERO) - IF(MDL_WT.NE.0D0) FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT - $ *SMALL_WIDTH_TREATMENT)), MDL_WT) - IF(MDL_WW.NE.0D0) FK_MDL_WW = SIGN(MAX(ABS(MDL_WW), ABS(MDL_MW - $ *SMALL_WIDTH_TREATMENT)), MDL_WW) + FK_ZERO = 0D0 + IF(MDL_WT.NE.0D0) THEN + FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT + $ *SMALL_WIDTH_TREATMENT)), MDL_WT) + ELSE + FK_MDL_WT = 0D0 + ENDIF + + IF(MDL_WW.NE.0D0) THEN + FK_MDL_WW = SIGN(MAX(ABS(MDL_WW), ABS(MDL_MW + $ *SMALL_WIDTH_TREATMENT)), MDL_WW) + ELSE + FK_MDL_WW = 0D0 + ENDIF + IF(INIT_MODE) THEN ZEROAMP_1(:,:) = .TRUE. @@ -601,10 +604,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 +618,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/CPPProcess.cc b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gdx_ttxwpux/CPPProcess.cc index 6f1f37d1eb..bd8fb5d7da 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -775,7 +775,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- 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..f00c5bec12 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.3, 2025-06-12 // 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..807ce0e6c9 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.3, 2025-06-12 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..bf57b49c26 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.3, 2025-06-12 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.3, 2025-06-12 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 @@ -498,6 +502,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C Generate events only if IMODE is 0. IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN C Call UNWGT to unweight and store events + ICONFIG = CHANNELS(IVEC) CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) ENDIF diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gdx_ttxwpux/driver.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gdx_ttxwpux/driver.f index d8518f17f7..21de29dc55 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gdx_ttxwpux/driver.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gdx_ttxwpux/driver.f @@ -489,7 +489,6 @@ subroutine open_file_local(lun,filename,fopened) fopened=.false. tempname=filename fine=index(tempname,' ') -c fine2=index(path,' ')-1 ! AV remove valgrind "Conditional jump or move depends on uninitialised value(s)" if(fine.eq.0) fine=len(tempname) open(unit=lun,file=tempname,status='old',ERR=20) fopened=.true. 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..7233e3c74f 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.3, 2025-06-12 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.3, 2025-06-12 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,33 +493,35 @@ 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 C ---------- IF (FIRST) THEN FIRST=.FALSE. - IF(ZERO.NE.0D0) FK_ZERO = SIGN(MAX(ABS(ZERO), ABS(ZERO - $ *SMALL_WIDTH_TREATMENT)), ZERO) - IF(MDL_WT.NE.0D0) FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT - $ *SMALL_WIDTH_TREATMENT)), MDL_WT) - IF(MDL_WW.NE.0D0) FK_MDL_WW = SIGN(MAX(ABS(MDL_WW), ABS(MDL_MW - $ *SMALL_WIDTH_TREATMENT)), MDL_WW) + FK_ZERO = 0D0 + IF(MDL_WT.NE.0D0) THEN + FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT + $ *SMALL_WIDTH_TREATMENT)), MDL_WT) + ELSE + FK_MDL_WT = 0D0 + ENDIF + + IF(MDL_WW.NE.0D0) THEN + FK_MDL_WW = SIGN(MAX(ABS(MDL_WW), ABS(MDL_MW + $ *SMALL_WIDTH_TREATMENT)), MDL_WW) + ELSE + FK_MDL_WW = 0D0 + ENDIF + IF(INIT_MODE) THEN ZEROAMP_1(:,:) = .TRUE. @@ -601,10 +604,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 +618,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/CPPProcess.cc b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gu_ttxwpd/CPPProcess.cc index 16d1e89a53..4d9f803c28 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -775,7 +775,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- 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..22e5402a87 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.3, 2025-06-12 // 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..180917495b 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.3, 2025-06-12 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..e068973bd6 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.3, 2025-06-12 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.3, 2025-06-12 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 @@ -498,6 +502,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C Generate events only if IMODE is 0. IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN C Call UNWGT to unweight and store events + ICONFIG = CHANNELS(IVEC) CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) ENDIF diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gu_ttxwpd/driver.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gu_ttxwpd/driver.f index d8518f17f7..21de29dc55 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gu_ttxwpd/driver.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gu_ttxwpd/driver.f @@ -489,7 +489,6 @@ subroutine open_file_local(lun,filename,fopened) fopened=.false. tempname=filename fine=index(tempname,' ') -c fine2=index(path,' ')-1 ! AV remove valgrind "Conditional jump or move depends on uninitialised value(s)" if(fine.eq.0) fine=len(tempname) open(unit=lun,file=tempname,status='old',ERR=20) fopened=.true. 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..765b11c693 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.3, 2025-06-12 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.3, 2025-06-12 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,33 +493,35 @@ 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 C ---------- IF (FIRST) THEN FIRST=.FALSE. - IF(ZERO.NE.0D0) FK_ZERO = SIGN(MAX(ABS(ZERO), ABS(ZERO - $ *SMALL_WIDTH_TREATMENT)), ZERO) - IF(MDL_WT.NE.0D0) FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT - $ *SMALL_WIDTH_TREATMENT)), MDL_WT) - IF(MDL_WW.NE.0D0) FK_MDL_WW = SIGN(MAX(ABS(MDL_WW), ABS(MDL_MW - $ *SMALL_WIDTH_TREATMENT)), MDL_WW) + FK_ZERO = 0D0 + IF(MDL_WT.NE.0D0) THEN + FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT + $ *SMALL_WIDTH_TREATMENT)), MDL_WT) + ELSE + FK_MDL_WT = 0D0 + ENDIF + + IF(MDL_WW.NE.0D0) THEN + FK_MDL_WW = SIGN(MAX(ABS(MDL_WW), ABS(MDL_MW + $ *SMALL_WIDTH_TREATMENT)), MDL_WW) + ELSE + FK_MDL_WW = 0D0 + ENDIF + IF(INIT_MODE) THEN ZEROAMP_1(:,:) = .TRUE. @@ -601,10 +604,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 +618,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/CPPProcess.cc b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gux_ttxwmdx/CPPProcess.cc index 41a6e0002f..04550c4108 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -775,7 +775,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- 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..f6a8750ae2 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.3, 2025-06-12 // 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..5be1675ba2 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.3, 2025-06-12 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..f2f893278c 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.3, 2025-06-12 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.3, 2025-06-12 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 @@ -498,6 +502,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C Generate events only if IMODE is 0. IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN C Call UNWGT to unweight and store events + ICONFIG = CHANNELS(IVEC) CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) ENDIF diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gux_ttxwmdx/driver.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gux_ttxwmdx/driver.f index d8518f17f7..21de29dc55 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gux_ttxwmdx/driver.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_gux_ttxwmdx/driver.f @@ -489,7 +489,6 @@ subroutine open_file_local(lun,filename,fopened) fopened=.false. tempname=filename fine=index(tempname,' ') -c fine2=index(path,' ')-1 ! AV remove valgrind "Conditional jump or move depends on uninitialised value(s)" if(fine.eq.0) fine=len(tempname) open(unit=lun,file=tempname,status='old',ERR=20) fopened=.true. 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..81f884204a 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.3, 2025-06-12 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.3, 2025-06-12 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,33 +493,35 @@ 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 C ---------- IF (FIRST) THEN FIRST=.FALSE. - IF(ZERO.NE.0D0) FK_ZERO = SIGN(MAX(ABS(ZERO), ABS(ZERO - $ *SMALL_WIDTH_TREATMENT)), ZERO) - IF(MDL_WT.NE.0D0) FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT - $ *SMALL_WIDTH_TREATMENT)), MDL_WT) - IF(MDL_WW.NE.0D0) FK_MDL_WW = SIGN(MAX(ABS(MDL_WW), ABS(MDL_MW - $ *SMALL_WIDTH_TREATMENT)), MDL_WW) + FK_ZERO = 0D0 + IF(MDL_WT.NE.0D0) THEN + FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT + $ *SMALL_WIDTH_TREATMENT)), MDL_WT) + ELSE + FK_MDL_WT = 0D0 + ENDIF + + IF(MDL_WW.NE.0D0) THEN + FK_MDL_WW = SIGN(MAX(ABS(MDL_WW), ABS(MDL_MW + $ *SMALL_WIDTH_TREATMENT)), MDL_WW) + ELSE + FK_MDL_WW = 0D0 + ENDIF + IF(INIT_MODE) THEN ZEROAMP_1(:,:) = .TRUE. @@ -601,10 +604,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 +618,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/CPPProcess.cc b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_udx_ttxwpg/CPPProcess.cc index f90db593a9..b84a086dfa 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -775,7 +775,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- 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..fe00684d3b 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.3, 2025-06-12 // 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..4d39b68db0 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.3, 2025-06-12 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..7cbb2180db 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.3, 2025-06-12 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.3, 2025-06-12 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 @@ -501,6 +505,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C Generate events only if IMODE is 0. IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN C Call UNWGT to unweight and store events + ICONFIG = CHANNELS(IVEC) CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) ENDIF diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_udx_ttxwpg/driver.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_udx_ttxwpg/driver.f index d8518f17f7..21de29dc55 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_udx_ttxwpg/driver.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/P1_udx_ttxwpg/driver.f @@ -489,7 +489,6 @@ subroutine open_file_local(lun,filename,fopened) fopened=.false. tempname=filename fine=index(tempname,' ') -c fine2=index(path,' ')-1 ! AV remove valgrind "Conditional jump or move depends on uninitialised value(s)" if(fine.eq.0) fine=len(tempname) open(unit=lun,file=tempname,status='old',ERR=20) fopened=.true. 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..fecf2b47e6 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.3, 2025-06-12 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.3, 2025-06-12 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,33 +493,35 @@ 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 C ---------- IF (FIRST) THEN FIRST=.FALSE. - IF(ZERO.NE.0D0) FK_ZERO = SIGN(MAX(ABS(ZERO), ABS(ZERO - $ *SMALL_WIDTH_TREATMENT)), ZERO) - IF(MDL_WT.NE.0D0) FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT - $ *SMALL_WIDTH_TREATMENT)), MDL_WT) - IF(MDL_WW.NE.0D0) FK_MDL_WW = SIGN(MAX(ABS(MDL_WW), ABS(MDL_MW - $ *SMALL_WIDTH_TREATMENT)), MDL_WW) + FK_ZERO = 0D0 + IF(MDL_WT.NE.0D0) THEN + FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT + $ *SMALL_WIDTH_TREATMENT)), MDL_WT) + ELSE + FK_MDL_WT = 0D0 + ENDIF + + IF(MDL_WW.NE.0D0) THEN + FK_MDL_WW = SIGN(MAX(ABS(MDL_WW), ABS(MDL_MW + $ *SMALL_WIDTH_TREATMENT)), MDL_WW) + ELSE + FK_MDL_WW = 0D0 + ENDIF + IF(INIT_MODE) THEN ZEROAMP_1(:,:) = .TRUE. @@ -601,10 +604,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 +618,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/addmothers.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/addmothers.f index 9a31ed201d..6f32477b9e 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/addmothers.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/addmothers.f @@ -21,7 +21,7 @@ subroutine addmothers(ip,jpart,pb,isym,jsym,rscale,aqcd,aqed,buff, integer icol ! color selected integer isym(nexternal,99), jsym - integer i,j,k,ida(2),ns,nres,ires,icl,ito2,idenpart,nc,ic + integer i,j,k,ida(2),ns,nres,ires,icl,ito2,idenpart,ic integer mo_color,da_color(2),itmp integer ito(-nexternal+3:nexternal),iseed,maxcolor,maxorg integer icolalt(2,-nexternal+2:2*nexternal-3) @@ -113,14 +113,15 @@ subroutine addmothers(ip,jpart,pb,isym,jsym,rscale,aqcd,aqed,buff, endif lconfig = vec_igraph1(ivec) endif - + is_LC=.true. + maxcolor=0 c c Choose a color flow which is certain to work with the propagator c structure of the chosen diagram and use that as an alternative c if (icol.eq.0) then do i=1,nexternal - icolalt(1,i)=0 + icolalt(1,i)=0 icolalt(2,i)=0 enddo else diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/cluster.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/cluster.f index b8995283ed..907894ea89 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/cluster.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/cluster.f @@ -556,6 +556,8 @@ logical function cluster(p, ivec) jwin = 0 cluster=.false. clustered=.false. + iwin =0 + jwin =0 do i=0,3 pcmsp(i)=0 enddo @@ -665,8 +667,11 @@ logical function cluster(p, ivec) c initialize graph storage igraphs(0)=0 nleft=nexternal -c cluster - if (iwin.eq.0.or.jwin.eq.0) stop 21 + if(iwin.eq.0.or.jwin.eq.0)then + cluster=.false. + return + endif +c cluster do n=1,nexternal-2 c combine winner imocl(n)=imap(iwin,2)+imap(jwin,2) diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/cudacpp.mk index 20d8ded718..20b8e6b858 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/cudacpp.mk @@ -114,7 +114,7 @@ export CXXFLAGS override CUDA_HOME = $(patsubst %/bin/nvcc,%,$(shell which nvcc 2>/dev/null)) # Set HIP_HOME from the path to hipcc, if it exists -override HIP_HOME = $(patsubst %/bin/hipcc,%,$(shell which hipcc 2>/dev/null)) +override HIP_HOME = $(shell hipconfig --rocmpath) # Configure CUDA_INC (for CURAND and NVTX) and NVTX if a CUDA installation exists (see #965) ifeq ($(CUDA_HOME),) @@ -229,6 +229,8 @@ ifeq ($(BACKEND),cuda) else ifeq ($(BACKEND),hip) + # example architecture values MI200:gfx90a, MI350X:gfx942 + MADGRAPH_HIP_ARCHITECTURE ?= gfx942 # Set GPUCC as $(HIP_HOME)/bin/hipcc (it was already checked above that this exists) GPUCC = $(HIP_HOME)/bin/hipcc XCOMPILERFLAG = @@ -243,7 +245,7 @@ else ifeq ($(BACKEND),hip) ###GPUFLAGS += -ggdb # FOR DEBUGGING ONLY # AMD HIP architecture flags - GPUARCHFLAGS = --offload-arch=gfx90a + GPUARCHFLAGS = --offload-arch=${MADGRAPH_HIP_ARCHITECTURE} GPUFLAGS += $(GPUARCHFLAGS) # Other AMD-specific flags @@ -878,7 +880,7 @@ endif $(gpu_fcheckmain): LIBFLAGS += $(GPULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH $(gpu_fcheckmain): $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBDIR)/lib$(MG5AMC_GPULIB).so $(gpu_objects_exe) ifneq ($(findstring hipcc,$(GPUCC)),) # link fortran/c++/hip using $FC when hipcc is used #802 - $(FC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) -lstdc++ -L$(shell cd -L $(shell dirname $(shell $(GPUCC) -print-prog-name=clang))/../..; pwd)/lib -lamdhip64 + $(FC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) -lstdc++ -L$(HIP_HOME)/lib -lamdhip64 else $(GPUCC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) endif @@ -979,7 +981,7 @@ else # link only runTest_$(GPUSUFFIX).o (new: in the past, this was linking both $(gpu_testmain): LIBFLAGS += $(GPULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH $(gpu_testmain): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(gpu_objects_lib) $(gpu_objects_exe) $(GTESTLIBS) ifneq ($(findstring hipcc,$(GPUCC)),) # link fortran/c++/hip using $FC when hipcc is used #802 - $(FC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lstdc++ -lpthread -L$(shell cd -L $(shell dirname $(shell $(GPUCC) -print-prog-name=clang))/../..; pwd)/lib -lamdhip64 + $(FC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lstdc++ -lpthread -L$(HIP_HOME)/lib -lamdhip64 else $(GPUCC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lcuda endif @@ -1104,10 +1106,20 @@ else @cat /proc/cpuinfo | grep "physical id" | sort -u endif @echo "" -ifneq ($(shell which nvidia-smi 2>/dev/null),) - nvidia-smi -L + # some systems may have -smi installed, but it fails to execute + # because it cannot communicate with the hardware + @if nvidia-smi &>/dev/null ; then \ + nvidia-smi -L ;\ + else \ + echo "No Nvidia GPU detected" ;\ + fi @echo "" -endif + @if amd-smi &>/dev/null ; then \ + amd-smi static -a ;\ + amd-smi list ;\ + else \ + echo "No AMD GPU detected" ;\ + fi @echo USECCACHE=$(USECCACHE) ifeq ($(USECCACHE),1) ccache --version | head -1 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/SubProcesses/proc_characteristics b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/proc_characteristics index ee4c9d4276..c152aee42f 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/proc_characteristics +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/proc_characteristics @@ -8,7 +8,7 @@ ninitial = 2 grouped_matrix = True has_loops = False - bias_module = dummy + bias_module = None max_n_matched_jets = 1 colored_pdgs = [1, 2, 3, 4, 5, 6, 21] complex_mass_scheme = False diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/reweight.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/reweight.f index 0a0bafa7c1..189ba41449 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/reweight.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/reweight.f @@ -1186,7 +1186,7 @@ logical function setclscales(p, keepq2bck, ivec) if(nexternal.gt.3) pt2ijcl(nexternal-3)=q2fact(2) else if(.not.fixed_fac_scale1) q2fact(1)=scalefact**2*pt2ijcl(nexternal-2) - if(.not.fixed_fac_scale2) q2fact(2)=scalefact**2*q2fact(1) + if(.not.fixed_fac_scale2) q2fact(2)=scalefact**2*pt2ijcl(nexternal-2) endif elseif(jcentral(1).eq.0)then if(.not.fixed_fac_scale1) q2fact(1) = scalefact**2*pt2ijcl(jfirst(1)) diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/symmetry.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/symmetry.f index 309540a0a2..2afd9e9f75 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/symmetry.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/symmetry.f @@ -232,7 +232,7 @@ subroutine write_bash(mapconfig,use_config, prwidth, jcomp,iforest, c write(*,*) 'mapping',ic,mapconfig(i),icode if (icode .eq. 0) then c Create format string based on number of digits - write(formstr,'(a,i1,a)') '(I',nconf,'$)' + write(formstr,'(a,i1,a)') '(I',nconf,',$)' write(*,formstr) mapconfig(i) c Write symmetry factors write(formstr2,'(a,i2,a)') '(2i',nsym,')' @@ -242,10 +242,10 @@ subroutine write_bash(mapconfig,use_config, prwidth, jcomp,iforest, dconfig=mapconfig(i)+icode*1d0/10**ncode if(nconf+ncode+1.lt.10) then write(formstr,'(a,i1,a,i1,a)') '(F',nconf+ncode+1, - $ '.',ncode,'$)' + $ '.',ncode,',$)' else write(formstr,'(a,i2,a,i1,a)') '(F',nconf+ncode+1, - $ '.',ncode,'$)' + $ '.',ncode,',$)' endif write(*,formstr) dconfig c Write symmetry factors @@ -260,7 +260,7 @@ subroutine write_bash(mapconfig,use_config, prwidth, jcomp,iforest, dconfig=mapconfig(i)+icode*1d0/10**ncode write(27,formstr2) dconfig,use_config(i) endif - write(*,'(a$)') ' ' + write(*,'(a,$)') ' ' 100 call bw_increment_array(iarray,imax,ibase,done) enddo else diff --git a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/unwgt.f b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/unwgt.f index f602511c94..d1247f1849 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/unwgt.f +++ b/epochX/cudacpp/nobm_pp_ttW.mad/SubProcesses/unwgt.f @@ -497,6 +497,7 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) integer ip, np, ic, nc integer ida(2),ito(-nexternal+3:nexternal),ns,nres,ires,icloop integer iseed + double precision beam_mass double precision pboost(0:3) double precision beta, get_betaz double precision ebi(0:3), ebo(0:3) @@ -506,7 +507,7 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) integer idup(nexternal,maxproc,maxsproc) integer mothup(2,nexternal) integer icolup(2,nexternal,maxflow,maxsproc) - + double precision eta integer nsym integer ievent @@ -638,21 +639,20 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) if (nincoming.eq.2) then if (xbk(1) .gt. 0d0 .and. xbk(1) .le. 1d0 .and. $ xbk(2) .gt. 0d0 .and. xbk(2) .le. 1d0) then - if(lpp(2).ne.0.and.(xbk(1).eq.1d0.or.pmass(1).eq.0d0).and.xbk(2).ne.1d0) then - ! construct the beam momenta in each frame and compute the related (z)boost - if (pmass(1).eq.0d0.and.(abs(lpp(1)).eq.3.or.abs(lpp(1)).eq.4).and.ebeam(1).gt.10d0*m1)then - local_mass = 0d0 - else - local_mass = m1 - endif + if(lpp(2).ne.0.and.(xbk(1).eq.1d0.or.pmass(1).eq.0d0)) then + if((abs(lpp(1)).gt.2.and.abs(lpp(1)).ne.9).or.xbk(1).eq.1d0)then + beam_mass = pmass(1) + else + beam_mass = m1 + endif ebi(0) = p(0,1)/xbk(1) ! this assumes that particle 1 is massless or mass equal to beam ebi(1) = 0 ebi(2) = 0 - ebi(3) = DSQRT(ebi(0)**2-local_mass**2) + ebi(3) = DSQRT(ebi(0)**2-beam_mass**2) ebo(0) = ebeam(1) ebo(1) = 0 ebo(2) = 0 - ebo(3) = DSQRT(ebo(0)**2-local_mass**2) + ebo(3) = DSQRT(ebo(0)**2-beam_mass**2) beta = get_betaz(ebi, ebo) if (xbk(1).eq.1d0) then pb(0,isym(1,jsym)) = ebo(0) @@ -668,20 +668,19 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) enddo else - if (pmass(1).eq.0d0.and.(abs(lpp(1)).eq.3.or.abs(lpp(1)).eq.4.and.ebeam(2).gt.10d0*m2))then - local_mass = 0d0 - else - local_mass = m2 - endif - ebi(0) = p(0,1)/xbk(1) ! this assumes that particle 1 is massless or mass equal to beam + if((abs(lpp(2)).gt.2.and.abs(lpp(2)).ne.9).or.xbk(2).eq.1d0)then + beam_mass = pmass(2) + else + beam_mass = m2 + endif ebi(0) = p(0,2)/xbk(2) ! this assumes that particle 2 is massless or mass equal to beam ebi(1) = 0 ebi(2) = 0 - ebi(3) = -1d0*DSQRT(ebi(0)**2-local_mass**2) + ebi(3) = -1d0*DSQRT(ebi(0)**2-beam_mass**2) ebo(0) = ebeam(2) ebo(1) = 0 ebo(2) = 0 - ebo(3) = -1d0*DSQRT(ebo(0)**2-local_mass**2) + ebo(3) = -1d0*DSQRT(ebo(0)**2-beam_mass**2) beta = get_betaz(ebi, ebo) if (xbk(2).eq.1d0) then pb(0,isym(2,jsym)) = ebo(0) @@ -701,6 +700,21 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) write(*,*) 'Warning bad x1 or x2 in write_leshouche', $ xbk(1),xbk(2) endif + do j=1,nexternal + call zboost_with_beta(p(0,j),beta,pb(0,isym(j,jsym))) + pb(4,isym(j,jsym))=pmass(j) + enddo + + ! check for numerical_accuracy + if (pb(0,1).gt.ebeam(1).or.pb(0,2).gt.ebeam(2))then + ! go back to old method --more accurate when boosting with xbk close to one-- + eta = sqrt(xbk(1)*ebeam(1)/(xbk(2)*ebeam(2))) + pboost(0)=p(0,1)*(eta + 1d0/eta) + pboost(3)=p(0,1)*(eta - 1d0/eta) + do j=1,nexternal + call boostx(p(0,j),pboost,pb(0,isym(j,jsym))) + enddo + endif else do j=1,nexternal call boostx(p(0,j),pboost,pb(0,isym(j,jsym))) @@ -709,6 +723,8 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) enddo endif + + if (IMIRROR.eq.2.and.pmass(1).ne.pmass(2)) then c Note that in this context isym(1,jsym) should never be "2" since the mass differ pb(4,isym(1,jsym))=pmass(2) 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..2efb5954a6 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] @@ -1991,6 +1991,11 @@ def default_setup(self): self.add_param("PartonLevel:FSRinResonances", True, hidden=True, always_write_to_card=False, comment="Do not allow shower to run from decay product of unstable particle") self.add_param("ProcessLevel:resonanceDecays", True, hidden=True, always_write_to_card=False, comment="Do not allow unstable particle to decay.") + # Parameters only needed for main164 type of run (not pythia8/MG5 interface) + self.add_param("Main:HepMC", True, hidden=True, always_write_to_card=False, + comment="""Specify the type of output to be used by the main164 run. """) + self.add_param("HepMC:output", 'hepmc.gz', hidden=True, always_write_to_card=False, + comment="Specify the HepMC output file to be used by the main164 run.") # Add parameters controlling the subruns execution flow. # These parameters should not be part of PY8SubRun daughter. self.add_default_subruns('parameters') @@ -2087,8 +2092,10 @@ def MadGraphSet(self, name, value, **opts): force = False if name.lower() not in self or (force or name.lower() not in self.user_set): self.__setitem__(name, value, change_userdefine=False, **opts) - self.system_set.add(name.lower()) - + self.system_set.add(name.lower()) + else: + raise Exception("The parameter %s is already set to %s. You can not change it." % (name, self[name])) + def defaultSet(self, name, value, **opts): self.__setitem__(name, value, change_userdefine=False, **opts) @@ -2144,9 +2151,19 @@ def pythia8_formatting(value, formatv=None): else: return ','.join([PY8Card.pythia8_formatting(arg) for arg in value]) + #change of name convention between MG5 old interface and main164 from Pythia8 + interface_to_164 = {'HEPMCoutput:file': 'HepMC:output', + 'SysCalc:fullCutVariation': '!SysCalc:fullCutVariation (not supported with 164)', + 'SysCalc:qCutList': '!SysCalc:qCutList (not supported with 164)', + 'SysCalc:qWeed': '!SysCalc:qWeed (not supported with 164)', + 'SysCalc:tmsList': '!SysCalc:tmsList (not supported with 164)', + 'HEPMCoutput:scaling' : '!HEPMCoutput :scaling (not supported with 164)', + 'LHEFInputs:nSubruns' : 'Main:numberOfSubruns'} + def write(self, output_file, template, read_subrun=False, - print_only_visible=False, direct_pythia_input=False, add_missing=True): + print_only_visible=False, direct_pythia_input=False, add_missing=True, + use_mg5amc_py8_interface=False): """ Write the card to output_file using a specific template. > 'print_only_visible' specifies whether or not the hidden parameters should be written out if they are in the hidden_params_to_always_write @@ -2155,7 +2172,12 @@ def write(self, output_file, template, read_subrun=False, in the self.visible_params_to_always_write list and are not user_set or system_set are commented. > If 'add_missing' is False then parameters that should be written_out but are absent - from the template will not be written out.""" + from the template will not be written out. + > use_mg5amc_py8_interface is a flag to indicate that the MG5aMC-PY8 interface is used or not + if not used some parameters need to be translated from the old convention to the new one + """ + + self.use_mg5amc_py8_interface = use_mg5amc_py8_interface # First list the visible parameters visible_param = [p for p in self if p.lower() not in self.hidden_param @@ -2297,7 +2319,16 @@ def group_params(params): else: # Just copy parameters which don't need to be specified if param.lower() not in self.params_to_never_write: - output.write(line) + + if not use_mg5amc_py8_interface and direct_pythia_input and \ + param in self.interface_to_164: + param_entry = self.interface_to_164[param.strip()] + # special case for HepMC needs two flags + if 'HepMC:output' == param_entry: + output.write(' %s=%s\n'%('Main:HepMC', 'on')) + output.write('%s=%s\n'%(param_entry,new_value)) + else: + output.write(line) else: output.write('! The following parameter was forced to be commented out by MG5aMC.\n') output.write('! %s'%line) @@ -2313,6 +2344,7 @@ def group_params(params): if ((not direct_pythia_input) or (param.lower() in self.visible_params_to_always_write) or (param.lower() in self.user_set) or + (param.lower() in self.hidden_params_to_always_write) or (param.lower() in self.system_set)): template = '%s=%s' else: @@ -2321,6 +2353,19 @@ def group_params(params): # then they shouldn't be passed to Pythia template = '!%s=%s' + if not use_mg5amc_py8_interface and direct_pythia_input and \ + param in self.interface_to_164: + param_entry = self.interface_to_164[param] + # special case for HepMC needs two flags + if 'HepMC:output' == param_entry: + output.write(' %s=%s\n'%('Main:HepMC', 'on')) + if 'Main:InternalAnalysis'.lower() in self.user_set and \ + self['Main:InternalAnalysis'].lower() == 'on': + output.write('InternalAnalysis:output = ./djrs.dat\n') + + #elif param in self.interface_to_164.values() and not direct_pythia_input: + # misc.sprint(use_mg5amc_py8_interface, direct_pythia_input,param) + # raise Exception('The parameter %s is not supported in the MG5aMC-PY8 interface. Please use the new interface.'%param_entry output.write(template%(param_entry, value_entry.replace(value,new_value))) @@ -2365,6 +2410,8 @@ def group_params(params): comment = '\n'.join('! %s'%c for c in self.comments[param.lower()].split('\n')) output.write(comment+'\n') + if not use_mg5amc_py8_interface and param in self.interface_to_164: + continue output.write('%s=%s\n'%(param,PY8Card.pythia8_formatting(self[param]))) # Don't close the file if we were reading a subrun, but simply write @@ -3318,7 +3365,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 +3372,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 @@ -4050,8 +4095,8 @@ def post_set_fixed_fac_scale(card, value, change_userdefine, raiseerror, **opt): if 'fixed_fac_scale2' in card.user_set: card.user_set.remove('fixed_fac_scale2') - # #card['pdlabel1'] = value - # #card['pdlabel2'] = value + dict.__setitem__(card, 'fixed_fac_scale1', card['fixed_fac_scale']) + dict.__setitem__(card, 'fixed_fac_scale2', card['fixed_fac_scale']) @staticmethod def post_set(card, value, change_userdefine, raiseerror, name='unknown', **opt): @@ -4201,6 +4246,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 @@ -4451,11 +4497,11 @@ def check_validity(self): time.sleep(5) if self['drjj'] != 0: if 'drjj' in self.user_set: - logger.warning('Since icckw>0, changing the value of \'drjj\' to 0') + logger.warning('Since ickkw>0, changing the value of \'drjj\' to 0') self['drjj'] = 0 if self['drjl'] != 0: if 'drjl' in self.user_set: - logger.warning('Since icckw>0, changing the value of \'drjl\' to 0') + logger.warning('Since ickkw>0, changing the value of \'drjl\' to 0') self['drjl'] = 0 if not self['auto_ptj_mjj']: if self['mmjj'] > self['xqcut']: @@ -4753,7 +4799,6 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): self['fixed_fac_scale1'] = True self['nhel'] = 1 for i in beam_id_split[1]: - exit if abs(i) == 11: self['lpp1'] = -math.copysign(3,i) self['lpp2'] = math.copysign(3,i) @@ -5577,6 +5622,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 +5838,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/cluster.py b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/cluster.py index 95ef45b5f3..66069293d2 100755 --- a/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/cluster.py +++ b/epochX/cudacpp/nobm_pp_ttW.mad/bin/internal/cluster.py @@ -602,6 +602,7 @@ def __init__(self, *args, **opt): self.submitted = six.moves.queue.Queue() # one entry by job submitted self.stoprequest = threading.Event() #flag to ensure everything to close self.demons = [] + self.gpus_list = [] self.nb_done =0 if 'nb_core' in opt: self.nb_core = opt['nb_core'] @@ -623,23 +624,46 @@ def __init__(self, *args, **opt): self.done_pid_queue = six.moves.queue.Queue() self.fail_msg = None + mg5_gpu_env_str = 'MG5_GPU_VISIBLE_DEVICES' + gpu_variables = [['NVIDIA_VISIBLE_DEVICES', 'CUDA_VISIBLE_DEVICES'], + ['ROCR_VISIBLE_DEVICES', 'HIP_VISIBLE_DEVICES'],] + if mg5_gpu_env_str in os.environ: + new_var = os.environ[mg5_gpu_env_str].split(',') + if len(new_var) == 2: + gpu_variables.insert(0, new_var) + else: + logger.error('Invalid format for %s=%s, it should be a comma-separated list of two elements' % (mg5_gpu_env_str, os.environ[mg5_gpu_env_str])) + for get_var,set_var in gpu_variables: + if get_var in os.environ: + self.gpus_list = os.environ.get(get_var).split(',') + self.gpu_set_var = set_var + self.gpus_count = len(self.gpus_list) + logger.info('Found %s GPUs: %s' % (self.gpus_count, self.gpus_list)) def start_demon(self): import threading - t = threading.Thread(target=self.worker) + env2 = None + if len(self.gpus_list): + env2 = os.environ.copy() + this_gpu_idx = len(self.demons) % self.gpus_count + env2[self.gpu_set_var] = self.gpus_list[this_gpu_idx] + t = threading.Thread(target=self.worker, kwargs={'env2': env2}) + else: + t = threading.Thread(target=self.worker) t.daemon = True t.start() self.demons.append(t) - def worker(self): + def worker(self, env2=None): import six.moves.queue import six.moves._thread while not self.stoprequest.isSet(): try: args = self.queue.get(timeout=10) tag, exe, arg, opt = args + opt['env'] = env2 try: # check for executable case if isinstance(exe,str): 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..69291df0d4 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): @@ -1463,11 +1463,15 @@ def create_plot(self, mode='parton', event_path=None, output=None, tag=None): self.run_name, '%s_pts.dat' % tag) for observable_name, data_path in [('djr',djr_path), ('pt',pt_path)]: - if not self.generate_Pythia8_HwU_plots( + try: + if not self.generate_Pythia8_HwU_plots( PY8_plots_root_path, merging_scale_name, observable_name,data_path): - return False - + return False + except Exception as error: + if os.path.exists(data_path): + logger.info('plot information present in %s' % data_path) + return True if mode == 'Pythia8': plot_files = glob.glob(pjoin(PY8_plots_root_path,'*.gnuplot')) if not misc.which('gnuplot'): @@ -1964,12 +1968,16 @@ def do_systematics(self, line): self.cluster.wait(os.path.dirname(output), update_status, update_first=update_status) except Exception: self.cluster.remove() + for i in range(nb_submit): + os.remove('%s/tmp_%s_%s' %(os.path.dirname(output),i,os.path.basename(output))) old_run_mode = self.options['run_mode'] self.options['run_mode'] =0 + out =False try: out = self.do_systematics(line) finally: self.options['run_mode'] = old_run_mode + return out #collect the data all_cross = [] for i in range(nb_submit): @@ -1995,18 +2003,21 @@ def do_systematics(self, line): self.run_card['event_norm'] in ['unity']: all_cross= [cross/nb_event for cross in all_cross] - sys_obj = systematics.call_systematics([input, None] + opts, - log=lambda x: logger.info(str(x)), - result=result_file, - running=False - ) + + sys_obj = systematics.call_systematics([input, None] + opts, + log=lambda x: logger.info(str(x)), + result=result_file, + running=False + ) + sys_obj.print_cross_sections(all_cross, nb_event, result_file) - + #concatenate the output file subprocess.call(['cat']+\ ['./tmp_%s_%s' % (i, os.path.basename(output)) for i in range(nb_submit)], stdout=open(output,'w'), cwd=os.path.dirname(output)) + for i in range(nb_submit): os.remove('%s/tmp_%s_%s' %(os.path.dirname(output),i,os.path.basename(output))) # os.remove('%s/log_sys_%s.txt' % (os.path.dirname(output),i)) @@ -3831,7 +3842,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 +5146,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 +6751,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 +6775,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 +6826,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..6fbdd98100 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': @@ -1858,6 +1855,8 @@ def parse_histos_from_PY8_XML_stream(self, stream, run_id=None, # If merging cut is negative, then pick only the one of the central scale # If not specified, then take them all but use the PDF and scale weight # of the central merging_scale for the variation. + if not all_weights: + raise MadGraph5Error('No weights were found in the HwU XML source.') if merging_scale is None or merging_scale < 0.0: merging_scale_chosen = all_weights[2]['MERGING'] else: @@ -2480,14 +2479,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 +2738,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 +2877,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 +2889,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 +2898,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 +2907,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 +2916,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..b1739da73d 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 @@ -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: O. Mattelaer (Aug 2023) for the MG5aMC CUDACPP plugin. -# Further modified by: O. Mattelaer, A. Valassi (2024) for the MG5aMC CUDACPP plugin. +# Further modified by: O. Mattelaer, A. Valassi, Z. Wettersten (2024-2025) for the MG5aMC CUDACPP plugin. import logging import os @@ -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') @@ -133,7 +133,8 @@ def default_setup(self): super().default_setup() # change default value: self['cudacpp_backend'] = 'cuda' - self['vector_size'] = 16384 # already setup in default class (just change value) + self['vector_size'] = 32 # ZW: default to 32, might want to change to 64 to utilise AMD GPUs better as well # 16384 # already setup in default class (just change value) + self['nb_warp'] = 512 # number of warps per kernel call, for now setting to 16 384 / vector_size MEINTERFACE = CPPMEInterface RunCard = CPPRunCard 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..81d17f7cb1 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 @@ -1035,12 +1035,12 @@ def define_init_banner(self, wgt, lha_strategy, proc_charac=None): from_init = True if not from_init: - if group in grouped_cross: - grouped_cross[group] += self.allcross[i] - grouped_error[group] += self.error[i]**2 + if int(group) in grouped_cross: + grouped_cross[int(group)] += self.allcross[i] + grouped_error[int(group)] += self.error[i]**2 else: - grouped_cross[group] = self.allcross[i] - grouped_error[group] = self.error[i]**2 + grouped_cross[int(group)] = self.allcross[i] + grouped_error[int(group)] = self.error[i]**2 else: ban = banner_mod.Banner(ff.banner) for line in ban['init'].split('\n'): @@ -1048,11 +1048,11 @@ def define_init_banner(self, wgt, lha_strategy, proc_charac=None): if len(splitline)==4: cross, error, _, group = splitline if int(group) in grouped_cross: - grouped_cross[group] += float(cross) - grouped_error[group] += float(error)**2 + grouped_cross[int(group)] += float(cross) + grouped_error[int(group)] += float(error)**2 else: - grouped_cross[group] = float(cross) - grouped_error[group] = float(error)**2 + grouped_cross[int(group)] = float(cross) + grouped_error[int(group)] = float(error)**2 nb_group = len(grouped_cross) # compute the information for the first line @@ -1086,6 +1086,8 @@ def define_init_banner(self, wgt, lha_strategy, proc_charac=None): self.seek(0) if init_information["idbmup2"] in [0,9]: event = next(self) + if len(event) == 0: + event = Event(str(event)) init_information["idbmup2"] = event[1].pdg self.seek(0) @@ -2166,10 +2168,13 @@ def check(self): abspz += abs(particle.pz) # check mass fourmass = FourMomentum(particle).mass - - if particle.mass and (abs(particle.mass) - fourmass)/ abs(particle.mass) > threshold: - raise Exception( "Do not have correct mass lhe: %s momentum: %s (error at %s" % (particle.mass, fourmass, (abs(particle.mass) - fourmass)/ abs(particle.mass))) - + if particle.mass: + expected = (particle.E - math.sqrt(particle.E**2 -particle.mass**2))/particle.E + if expected > 1e-8: + mass_threshold = particle.E**2 - (particle.E-threshold)**2 + if (abs(particle.mass) - fourmass)/ mass_threshold > 5: + raise Exception( "Do not have correct mass lhe: %s momentum: %s (error at %s" % (particle.mass, fourmass, (abs(particle.mass) - fourmass)/ abs(particle.mass))) + if E/absE > threshold: logger.critical(self) @@ -2953,8 +2958,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..4d5597c722 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) @@ -2827,10 +2827,10 @@ def print_results_in_shell(self, data): logger.info(" Nb of events after matching/merging : %d" % int(data['nb_event_pythia'])) if self.run_card['use_syst'] in self.true and \ (int(self.run_card['ickkw'])==1 or self.run_card['ktdurham']>0.0 - or self.run_card['ptlund']>0.0): + or self.run_card['ptlund']>0.0) and data['cross_pythia'] == -1: logger.info(" Notice that because Systematics computation is turned on, the merging did not veto events but modified their weights instead.\n"+\ " The resulting hepmc/stdhep file should therefore be use with those weights.") - else: + elif data['cross_pythia'] == -1: logger.info(" Nb of events after merging : %s" % data['nb_event_pythia']) logger.info(" " ) @@ -3055,6 +3055,7 @@ def do_multi_run(self, line): crossoversig = 0 inv_sq_err = 0 nb_event = 0 + madspin = False for i in range(nb_run): self.nb_refine = 0 self.exec_cmd('generate_events %s_%s -f' % (main_name, i), postcmd=False) @@ -3067,6 +3068,8 @@ def do_multi_run(self, line): inv_sq_err+=1.0/error**2 self.results[main_name][-1]['cross'] = crossoversig/inv_sq_err self.results[main_name][-1]['error'] = math.sqrt(1.0/inv_sq_err) + if 'decayed' in self.run_name: + madspin = True self.results.def_current(main_name) self.run_name = main_name self.update_status("Merging LHE files", level='parton') @@ -3074,9 +3077,12 @@ def do_multi_run(self, line): os.mkdir(pjoin(self.me_dir,'Events', self.run_name)) except Exception: pass - os.system('%(bin)s/merge.pl %(event)s/%(name)s_*/unweighted_events.lhe.gz %(event)s/%(name)s/unweighted_events.lhe.gz %(event)s/%(name)s_banner.txt' + + os.system('%(bin)s/merge.pl %(event)s/%(name)s_*%(madspin)s/unweighted_events.lhe.gz %(event)s/%(name)s/unweighted_events.lhe.gz %(event)s/%(name)s_banner.txt' % {'bin': self.dirbin, 'event': pjoin(self.me_dir,'Events'), - 'name': self.run_name}) + 'name': self.run_name, + 'madspin': '_decayed_*' if madspin else '' + }) eradir = self.options['exrootanalysis_path'] if eradir and misc.is_executable(pjoin(eradir,'ExRootLHEFConverter')): @@ -3656,9 +3662,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'))) @@ -3757,6 +3765,8 @@ def split(a, n): k, m = divmod(len(a), n) return (a[i*k+min(i, m):(i+1)*k+min(i+1, m)] for i in range(n)) + Gdirs = self.remove_empty_events(Gdirs) + partials_info = [] if len(Gdirs) >= max_G: start_unweight= time.perf_counter() @@ -3786,7 +3796,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, @@ -4223,7 +4233,7 @@ def mg5amc_py8_interface_consistency_warning(options): return None - def setup_Pythia8RunAndCard(self, PY8_Card, run_type): + def setup_Pythia8RunAndCard(self, PY8_Card, run_type, use_mg5amc_py8_interface): """ Setup the Pythia8 Run environment and card. In particular all the process and run specific parameters of the card are automatically set here. This function returns the path where HEPMC events will be output, if any.""" @@ -4338,10 +4348,10 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): PY8_Card.systemSet('Beams:setProductionScalesFromLHEF',True) # Automatically set qWeed to xqcut if not defined by the user. - if PY8_Card['SysCalc:qWeed']==-1.0: + if use_mg5amc_py8_interface and PY8_Card['SysCalc:qWeed']==-1.0: PY8_Card.MadGraphSet('SysCalc:qWeed',self.run_card['xqcut'], force=True) - if PY8_Card['SysCalc:qCutList']=='auto': + if use_mg5amc_py8_interface and PY8_Card['SysCalc:qCutList']=='auto': if self.run_card['use_syst']: if self.run_card['sys_matchscale']=='auto': qcut = PY8_Card['JetMatching:qCut'] @@ -4368,7 +4378,7 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): # Specific MLM settings # PY8 should not implement the MLM veto since the driver should do it # if merging scale variation is turned on - if self.run_card['use_syst']: + if use_mg5amc_py8_interface and self.run_card['use_syst']: # We do no force it here, but it is clear that the user should know what # he's doing if he were to force it to True. PY8_Card.MadGraphSet('JetMatching:doVeto',False) @@ -4444,7 +4454,7 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): PY8_Card.MadGraphSet('SpaceShower:pTmaxMatch',1) PY8_Card.MadGraphSet('SpaceShower:rapidityOrder',False) # PY8 should not implement the CKKW veto since the driver should do it. - if self.run_card['use_syst']: + if use_mg5amc_py8_interface and self.run_card['use_syst']: # We do no force it here, but it is clear that the user should know what # he's doing if he were to force it to True. PY8_Card.MadGraphSet('Merging:applyVeto',False) @@ -4516,6 +4526,12 @@ def do_pythia8(self, line): else: no_default = False + if '--old_interface' in args: + use_mg5amc_py8_interface = True + args.remove('--old_interface') + else: + use_mg5amc_py8_interface = False + if not self.run_name: self.check_pythia8(args) self.configure_directory(html_opening =False) @@ -4545,20 +4561,27 @@ def do_pythia8(self, line): #"Please use 'event_norm = average' in the run_card to avoid this problem.") - - if not self.options['mg5amc_py8_interface_path'] or not \ - os.path.exists(pjoin(self.options['mg5amc_py8_interface_path'], - 'MG5aMC_PY8_interface')): - raise self.InvalidCmd( -"""The MG5aMC_PY8_interface tool cannot be found, so that MadEvent cannot steer Pythia8 shower. -Please install this tool with the following MG5_aMC command: - MG5_aMC> install mg5amc_py8_interface_path""") + if use_mg5amc_py8_interface: + if not self.options['mg5amc_py8_interface_path'] or not \ + os.path.exists(pjoin(self.options['mg5amc_py8_interface_path'], + 'MG5aMC_PY8_interface')): + raise self.InvalidCmd( + """The MG5aMC_PY8_interface tool cannot be found, so that MadEvent cannot steer Pythia8 shower. + Please install this tool with the following MG5_aMC command: + MG5_aMC> install mg5amc_py8_interface_path""") + else: + pythia_main = pjoin(self.options['mg5amc_py8_interface_path'], + 'MG5aMC_PY8_interface') + warnings = MadEventCmd.mg5amc_py8_interface_consistency_warning(self.options) + if warnings: + logger.warning(warnings) else: - pythia_main = pjoin(self.options['mg5amc_py8_interface_path'], - 'MG5aMC_PY8_interface') - warnings = MadEventCmd.mg5amc_py8_interface_consistency_warning(self.options) - if warnings: - logger.warning(warnings) + pythia_main = pjoin(self.options['pythia8_path'], 'share', 'Pythia8', 'examples', 'main164') + if not os.path.exists(pythia_main): + pythia_main = pjoin(self.options['pythia8_path'], 'examples', 'main164') + if not os.path.exists(pythia_main): + logger.warning('main164 not found (or not compiled). Will try the old interface instead.') + return self.do_pythia8(line + ' --old_interface') self.results.add_detail('run_mode', 'madevent') @@ -4583,14 +4606,19 @@ def do_pythia8(self, line): run_type = 'CKKW' # Edit the card and run environment according to the run specification - HepMC_event_output = self.setup_Pythia8RunAndCard(PY8_Card, run_type) + HepMC_event_output = self.setup_Pythia8RunAndCard(PY8_Card, run_type, use_mg5amc_py8_interface=use_mg5amc_py8_interface) + + if not use_mg5amc_py8_interface and self.options['run_mode']==0 or (self.options['run_mode']==2 and self.options['nb_core']==1): + PY8_Card['Main:numberOfEvents']= self.run_card['nevents'] + # Now write the card. pythia_cmd_card = pjoin(self.me_dir, 'Events', self.run_name , '%s_pythia8.cmd' % tag) cmd_card = StringIO.StringIO() PY8_Card.write(cmd_card,pjoin(self.me_dir,'Cards','pythia8_card_default.dat'), - direct_pythia_input=True) + direct_pythia_input=True, + use_mg5amc_py8_interface=use_mg5amc_py8_interface) # Now setup the preamble to make sure that everything will use the locally # installed tools (if present) even if the user did not add it to its @@ -4632,7 +4660,7 @@ def do_pythia8(self, line): " command '/usr/bin/env %s' exists and returns a valid path."%shell) exe_cmd = "#!%s\n%s"%(shell_exe,' '.join( - [preamble+pythia_main, + [preamble+pythia_main, '' if use_mg5amc_py8_interface else '-c', os.path.basename(pythia_cmd_card)])) wrapper.write(exe_cmd) @@ -4699,6 +4727,7 @@ def do_pythia8(self, line): n_cores = max(min(min_n_core,n_cores),1) if self.options['run_mode']==0 or (self.options['run_mode']==2 and self.options['nb_core']==1): + # No need for parallelization anymore self.cluster = None logger.info('Follow Pythia8 shower by running the '+ @@ -4744,20 +4773,22 @@ def do_pythia8(self, line): ParallelPY8Card.subruns[0].systemSet('Beams:LHEF','events.lhe.gz') ParallelPY8Card.write(pjoin(parallelization_dir,'PY8Card.dat'), pjoin(self.me_dir,'Cards','pythia8_card_default.dat'), - direct_pythia_input=True) + direct_pythia_input=True, + use_mg5amc_py8_interface=use_mg5amc_py8_interface) # Write the wrapper wrapper_path = pjoin(parallelization_dir,'run_PY8.sh') wrapper = open(wrapper_path,'w') if self.options['cluster_temp_path'] is None: exe_cmd = \ -"""#!%s -./%s PY8Card.dat >& PY8_log.txt -""" +"""#!%%s +./%%s %s PY8Card.dat >& PY8_log.txt +""" % ('' if use_mg5amc_py8_interface else '-c') + else: exe_cmd = \ -"""#!%s +"""#!%%s ln -s ./events_$1.lhe.gz ./events.lhe.gz -./%s PY8Card_$1.dat >& PY8_log.txt +./%%s %s PY8Card_$1.dat >& PY8_log.txt mkdir split_$1 if [ -f ./events.hepmc ]; then @@ -4776,7 +4807,7 @@ def do_pythia8(self, line): mv ./PY8_log.txt ./split_$1/ fi tar -czf split_$1.tar.gz split_$1 -""" +""" % ('' if use_mg5amc_py8_interface else '-c') exe_cmd = exe_cmd%(shell_exe,os.path.basename(pythia_main)) wrapper.write(exe_cmd) wrapper.close() @@ -4812,19 +4843,27 @@ def do_pythia8(self, line): pjoin(parallelization_dir,split_files[-1])) logger.info('Submitting Pythia8 jobs...') + for i, split_file in enumerate(split_files): # We must write a PY8Card tailored for each split so as to correct the normalization # HEPMCoutput:scaling of each weight since the lhe showered will not longer contain the # same original number of events - split_PY8_Card = banner_mod.PY8Card(pjoin(parallelization_dir,'PY8Card.dat')) + split_PY8_Card = banner_mod.PY8Card(pjoin(parallelization_dir,'PY8Card.dat'), setter='user') + assert split_PY8_Card['JetMatching:nJetMax'] == PY8_Card['JetMatching:nJetMax'] + + + # Make sure to sure the number of split_events determined during the splitting. - split_PY8_Card.systemSet('Main:numberOfEvents',partition_for_PY8[i]) + split_PY8_Card.systemSet('Main:numberOfEvents',partition_for_PY8[i], force=True) + assert split_PY8_Card['Main:numberOfEvents'] == partition_for_PY8[i] split_PY8_Card.systemSet('HEPMCoutput:scaling',split_PY8_Card['HEPMCoutput:scaling']* - (float(partition_for_PY8[i]))) + (float(partition_for_PY8[i])), force=True) # Add_missing set to False so as to be sure not to add any additional parameter w.r.t # the ones in the original PY8 param_card copied. split_PY8_Card.write(pjoin(parallelization_dir,'PY8Card_%d.dat'%i), - pjoin(parallelization_dir,'PY8Card.dat'), add_missing=False) + pjoin(parallelization_dir,'PY8Card.dat'), add_missing=False, + direct_pythia_input=True, + use_mg5amc_py8_interface=use_mg5amc_py8_interface) in_files = [pjoin(parallelization_dir,os.path.basename(pythia_main)), pjoin(parallelization_dir,'PY8Card_%d.dat'%i), pjoin(parallelization_dir,split_file)] @@ -5073,7 +5112,7 @@ def wait_monitoring(Idle, Running, Done): # works both for fixed number of generated events and fixed accepted events self.results.add_detail('error_pythia', error_m) - if self.run_card['use_syst']: + if self.run_card['use_syst'] and use_mg5amc_py8_interface: self.results.add_detail('cross_pythia', -1) self.results.add_detail('error_pythia', 0) @@ -6132,7 +6171,102 @@ def get_Gdir(self, Pdir=None, symfact=None): mfactors[pjoin(P, "G%s" % tag)] = mfactor self.Gdirs = (Gdirs, mfactors) return self.get_Gdir(Pdir, symfact=symfact) + + ############################################################################ + def remove_empty_events(self, Gdir): + """return Gdir strip from the one providing empty events.lhe files.""" + + reasons = collections.defaultdict(list) + Gdirs = Gdir[:] + for G in Gdirs[:]: + try: + size = os.path.getsize(pjoin(G, 'events.lhe')) + except Exception as error: + size = 0 + if size <10: + Gdirs.remove(G) + try: + log = misc.BackRead(pjoin(G, 'log.txt')) + except Exception as error: + log = misc.BackRead(pjoin(G, 'run1_app.log')) + found = -1 + for line in log: + if 'Deleting file events.lhe' in line: + found = 0 + elif "Impossible BW configuration" in line: + reasons['bwconfig'].append(G) + break + elif found < -150: + reasons['not found'].append(G) + Gdirs.append(G) + break + elif found < 0: + found -= 1 + elif 'Loosen cuts or increase max_events' in line: + reasons['cuts'].append(G) + break + elif 'all returned zero' in line: + reasons['zero'].append(G) + break + elif found > 5: + reasons['unknown'].append(G) + break + else: + found += 1 + + if len(reasons): + logger.debug('Reasons for empty events.lhe:') + if len(reasons['unknown']): + logger.debug(' - unknown: %s' % len(reasons['unknown'])) + logger.log(10, ' DETAIL:' + ','.join(['/'.join(G.rsplit(os.sep)[-2:]) for G in reasons['unknown'][:10]])) + if len(reasons['not found']): + logger.debug(' - not found in log: %s' % len(reasons['not found'])) + logger.log(10, ' DETAIL:' + ','.join(['/'.join(G.rsplit(os.sep)[-2:]) for G in reasons['not found'][:10]])) + if len(reasons['zero']): + logger.debug(' - zero amplitudes: %s' % len(reasons['zero'])) + logger.log(10, ' DETAIL:' + ','.join(['/'.join(G.rsplit( os.sep)[-2:]) for G in reasons['zero'][:10]])) + if len(reasons['bwconfig']): + critical_bwconfig = set() + for G in reasons['bwconfig']: + base = G.rsplit('.',1)[0] + if any(G2.startswith(base) for G2 in Gdirs): + continue + else: + critical_bwconfig.add(os.sep.join(base.rsplit(os.sep)[-2:])) + for G in critical_bwconfig: + logger.warning('Gdirectory %s has no events.lhe file. (no BW config found %s times)' % G) + + logger.debug(' - impossible BW configuration: %s' % len(reasons['bwconfig'])) + logger.debug(' - channel with no possible BW configuration: %s' % len(critical_bwconfig)) + + if len(reasons['cuts']): + critical_nb_cuts = collections.defaultdict(int) + for G in reasons['cuts']: + if '.' in os.path.basename(G): + base = G.rsplit('.',1)[0] + if any(G2.startswith(base) for G2 in Gdirs): + continue + else: + critical_nb_cuts[os.sep.join(base.rsplit(os.sep)[-2:])] += 1 + else: + critical_nb_cuts[''] += 1 + logger.warning('Gdirectory %s has no events.lhe file. (no points passed cuts found)' % G) + for G, nb in critical_nb_cuts.items(): + if not G: + continue + else: + logger.warning('%s channel %s.XXX has no events.lhe file. (no points passed cuts). No %s with events detected' % (nb, G, G)) + logger.debug(' - no points passed cuts: %s' % len(reasons['cuts'])) + logger.log(10, ' DETAIL:' + ','.join(['/'.join(G.rsplit(os.sep)[-2:]) for G in reasons['cuts'][:10]])) + logger.debug(' - without any BW handling (critical): %s' % critical_nb_cuts['']) + logger.debug(' - with BW but all zero (critical): %s' % sum([nb for v, nb in critical_nb_cuts.items() if v!=''], 0)) + #logger.debug(' - cuts (with BW conflict where other channel contributes): %s' % (len(reasons['cuts'])- critical_nb_cuts)) + + + return Gdirs + + ############################################################################ def set_run_name(self, name, tag=None, level='parton', reload_card=False, allow_new_tag=True): @@ -6749,7 +6883,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 +6893,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 +7010,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 +7038,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 +7053,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 +7065,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 +7190,13 @@ 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) 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 +7210,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..507e92df6d 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.3, 2025-06-12 // 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..874969c2c6 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.3, 2025-06-12 // 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..7723eb5a21 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.3, 2025-06-12 // 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/test/cudacpp_test.mk b/epochX/cudacpp/nobm_pp_ttW.mad/test/cudacpp_test.mk index f703a1ae7c..4934c9a53f 100644 --- a/epochX/cudacpp/nobm_pp_ttW.mad/test/cudacpp_test.mk +++ b/epochX/cudacpp/nobm_pp_ttW.mad/test/cudacpp_test.mk @@ -19,7 +19,7 @@ CXXFLAGS += -Igoogletest/googletest/include/ -std=c++11 all: googletest/$(INSTALLDIR)/lib64/libgtest.a googletest/CMakeLists.txt: - git clone https://github.com/google/googletest.git -b release-1.11.0 googletest + git clone https://github.com/google/googletest.git -b v1.17.0 googletest googletest/$(BUILDDIR)/Makefile: googletest/CMakeLists.txt mkdir -p googletest/$(BUILDDIR) diff --git a/epochX/cudacpp/pp_tt012j.mad/Cards/ident_card.dat b/epochX/cudacpp/pp_tt012j.mad/Cards/ident_card.dat index 0ba87b008f..b37758a42a 100644 --- a/epochX/cudacpp/pp_tt012j.mad/Cards/ident_card.dat +++ b/epochX/cudacpp/pp_tt012j.mad/Cards/ident_card.dat @@ -2,32 +2,32 @@ ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c written by the UFO converter ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc +mass 5 mdl_MB +mass 6 mdl_MT +mass 15 mdl_MTA +mass 23 mdl_MZ +mass 25 mdl_MH +sminputs 1 aEWM1 +sminputs 2 mdl_Gf +sminputs 3 aS +yukawa 5 mdl_ymb +yukawa 6 mdl_ymt +yukawa 15 mdl_ymtau - - +decay 6 mdl_WT decay 23 mdl_WZ + decay 24 mdl_WW + decay 25 mdl_WH -decay 6 mdl_WT -mass 15 mdl_MTA -mass 23 mdl_MZ -mass 25 mdl_MH -mass 5 mdl_MB -mass 6 mdl_MT -sminputs 1 aEWM1 -sminputs 2 mdl_Gf -sminputs 3 aS -yukawa 15 mdl_ymtau -yukawa 5 mdl_ymb -yukawa 6 mdl_ymt diff --git a/epochX/cudacpp/pp_tt012j.mad/Cards/me5_configuration.txt b/epochX/cudacpp/pp_tt012j.mad/Cards/me5_configuration.txt index 68b4c46295..fa8d3481a2 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 = /home/dmass/Development/madgraph4gpu/amd-ci/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo +mg5_path = /home/dmass/Development/madgraph4gpu/amd-ci/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..a98a5be735 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.3 2025-06-12 * #* * #* WARNING: UNKNOWN DEVELOPMENT VERSION. * #* WARNING: DO NOT USE FOR PRODUCTION * @@ -35,19 +35,20 @@ set loop_color_flows False set max_npoint_for_channel 0 set default_unset_couplings 99 set max_t_for_channel 99 +set zerowidth_tchannel True set nlo_mixed_expansion True -set stdout_level DEBUG -set zerowidth_tchannel F -define j = p +import model sm define p = g u c d s u~ c~ d~ s~ define j = g u c d s u~ c~ d~ s~ define l+ = e+ mu+ define l- = e- mu- define vl = ve vm vt define vl~ = ve~ vm~ vt~ +set stdout_level DEBUG +set zerowidth_tchannel F define j = p generate p p > t t~ @0 add process p p > t t~ j @1 add process p p > t t~ j j @2 -output madevent_simd ../TMPOUT/CODEGEN_mad_pp_tt012j --hel_recycling=F\ -alse --vector_size=32 +output madevent_simd pp_tt012j.mad_gen --hel_recycling=False --vector_\ +size=32 diff --git a/epochX/cudacpp/pp_tt012j.mad/Cards/run_card.dat b/epochX/cudacpp/pp_tt012j.mad/Cards/run_card.dat index 5eb60f35df..0185201786 100644 --- a/epochX/cudacpp/pp_tt012j.mad/Cards/run_card.dat +++ b/epochX/cudacpp/pp_tt012j.mad/Cards/run_card.dat @@ -110,11 +110,11 @@ #********************************************************************* # Compilation flag. #********************************************************************* - -O3 -ffast-math -fbounds-check = global_flag ! build flags for all Fortran code (for a fair comparison to cudacpp; default is -O) + -O = global_flag ! fortran optimization flag use for the all code. --fast-math = aloha_flag ! fortran optimization flag for aloha function. Suggestions: '-ffast-math' -O3 = matrix_flag ! fortran optimization flag for matrix.f function. Suggestions: '-O3' - 32 = vector_size ! size of fortran arrays allocated in the multi-event API for SIMD/GPU (VECSIZE_MEMMAX) - 512 = nb_warp ! total number of warp/frontwave + 16 = vector_size ! size of fortran arrays allocated in the multi-event API for SIMD/GPU (VECSIZE_MEMMAX) + 1 = nb_warp ! total number of warp/frontwave #********************************************************************* # Customization (custom cuts/scale/bias/...) * @@ -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..1ac53bb4bd 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.3 \ No newline at end of file diff --git a/epochX/cudacpp/pp_tt012j.mad/Source/.make_opts b/epochX/cudacpp/pp_tt012j.mad/Source/.make_opts index de3864242b..56ba259c56 100644 --- a/epochX/cudacpp/pp_tt012j.mad/Source/.make_opts +++ b/epochX/cudacpp/pp_tt012j.mad/Source/.make_opts @@ -102,6 +102,7 @@ endif ifneq ($(lhapdf),) CXXFLAGS += $(shell $(lhapdf) --cppflags) alfas_functions=alfas_functions_lhapdf + alfas_to_clean=alfas_functions.o llhapdf+= $(shell $(lhapdf) --cflags --libs) -lLHAPDF # check if we need to activate c++11 (for lhapdf6.2) ifeq ($(origin CXX),default) @@ -113,10 +114,11 @@ ifneq ($(lhapdf),) endif else alfas_functions=alfas_functions + alfas_to_clean=alfas_functions_lhapdf.o llhapdf= endif # Helper function to check MG5 version define CHECK_MG5AMC_VERSION python -c 'import re; from distutils.version import StrictVersion; print StrictVersion("$(MG5AMC_VERSION)") >= StrictVersion("$(1)") if re.match("^[\d\.]+$$","$(MG5AMC_VERSION)") else True;' -endef \ No newline at end of file +endef 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..bdf427601f 100644 --- a/epochX/cudacpp/pp_tt012j.mad/Source/make_opts +++ b/epochX/cudacpp/pp_tt012j.mad/Source/make_opts @@ -1,12 +1,11 @@ DEFAULT_CPP_COMPILER=g++ -DEFAULT_F2PY_COMPILER=f2py3 -DEFAULT_F_COMPILER=gfortran -GLOBAL_FLAG=-O3 -ffast-math -fbounds-check MACFLAG= +STDLIB=-lstdc++ +STDLIB_FLAG= +DEFAULT_F2PY_COMPILER=f2py +DEFAULT_F_COMPILER=gfortran MG5AMC_VERSION=SpecifiedByMG5aMCAtRunTime PYTHIA8_PATH=NotInstalled -STDLIB_FLAG= -STDLIB=-lstdc++ #end_of_make_opts_variables BIASLIBDIR=../../../lib/ @@ -103,6 +102,7 @@ endif ifneq ($(lhapdf),) CXXFLAGS += $(shell $(lhapdf) --cppflags) alfas_functions=alfas_functions_lhapdf +alfas_to_clean=alfas_functions.o llhapdf+= $(shell $(lhapdf) --cflags --libs) -lLHAPDF # check if we need to activate c++11 (for lhapdf6.2) ifeq ($(origin CXX),default) @@ -114,6 +114,7 @@ endif endif else alfas_functions=alfas_functions +alfas_to_clean=alfas_functions_lhapdf.o llhapdf= endif diff --git a/epochX/cudacpp/pp_tt012j.mad/Source/makefile b/epochX/cudacpp/pp_tt012j.mad/Source/makefile index 291ca907ee..87a9e61723 100644 --- a/epochX/cudacpp/pp_tt012j.mad/Source/makefile +++ b/epochX/cudacpp/pp_tt012j.mad/Source/makefile @@ -37,10 +37,12 @@ all: $(LIBRARIES) $(LIBDIR)libdhelas.$(libext) $(LIBDIR)libpdf.$(libext) $(LIBDI $(LIBDIR)libdsample.$(libext): $(DSAMPLE) $(call CREATELIB, $@, $^) $(LIBDIR)libgeneric.$(libext): $(GENERIC) + rm -f $@ 2>/dev/null $(call CREATELIB, $@, $^) + rm -f $(alfas_to_clean) 2>/dev/null $(LIBDIR)libdhelas.$(libext): DHELAS cd DHELAS; make; cd .. -$(LIBDIR)libpdf.$(libext): PDF make_opts +$(LIBDIR)libpdf.$(libext): PDF $(alfas_functions).o cd PDF; make; cd .. ifneq (,$(filter edff chff, $(pdlabel1) $(pdlabel2))) $(LIBDIR)libgammaUPC.$(libext): PDF/gammaUPC @@ -73,6 +75,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/vector.inc b/epochX/cudacpp/pp_tt012j.mad/Source/vector.inc index ba125272b6..9d8b377aa7 100644 --- a/epochX/cudacpp/pp_tt012j.mad/Source/vector.inc +++ b/epochX/cudacpp/pp_tt012j.mad/Source/vector.inc @@ -30,6 +30,8 @@ C INTEGER WARP_SIZE PARAMETER (WARP_SIZE=32) INTEGER NB_WARP - PARAMETER (NB_WARP=512) + PARAMETER (NB_WARP=1) INTEGER VECSIZE_MEMMAX - PARAMETER (VECSIZE_MEMMAX=16384) + PARAMETER (VECSIZE_MEMMAX=32) + + 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..1ac53bb4bd 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.3 \ 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/P0_gg_ttx/CPPProcess.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx/CPPProcess.cc index a17c5f1eef..f9ef78d6c0 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -555,7 +555,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- 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..4f22974446 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.3, 2025-06-12 // 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..2db2eb3c0c 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.3, 2025-06-12 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..25e5bf68ee 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.3, 2025-06-12 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.3, 2025-06-12 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 @@ -484,6 +488,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C Generate events only if IMODE is 0. IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN C Call UNWGT to unweight and store events + ICONFIG = CHANNELS(IVEC) CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) ENDIF diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx/driver.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx/driver.f index ec5722702a..c08048ad0e 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx/driver.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_gg_ttx/driver.f @@ -489,7 +489,6 @@ subroutine open_file_local(lun,filename,fopened) fopened=.false. tempname=filename fine=index(tempname,' ') -c fine2=index(path,' ')-1 ! AV remove valgrind "Conditional jump or move depends on uninitialised value(s)" if(fine.eq.0) fine=len(tempname) open(unit=lun,file=tempname,status='old',ERR=20) fopened=.true. 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..7ccccfd4a5 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.3, 2025-06-12 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.3, 2025-06-12 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,21 +394,24 @@ 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 C ---------- IF (FIRST) THEN FIRST=.FALSE. - IF(ZERO.NE.0D0) FK_ZERO = SIGN(MAX(ABS(ZERO), ABS(ZERO - $ *SMALL_WIDTH_TREATMENT)), ZERO) - IF(MDL_WT.NE.0D0) FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT - $ *SMALL_WIDTH_TREATMENT)), MDL_WT) + FK_ZERO = 0D0 + IF(MDL_WT.NE.0D0) THEN + FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT + $ *SMALL_WIDTH_TREATMENT)), MDL_WT) + ELSE + FK_MDL_WT = 0D0 + ENDIF + IF(INIT_MODE) THEN ZEROAMP_1(:,:) = .TRUE. @@ -446,10 +450,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 +464,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/CPPProcess.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_uux_ttx/CPPProcess.cc index 0979455d7a..98df4278c2 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -532,7 +532,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- 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..b673d066f1 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.3, 2025-06-12 // 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..c954e28a21 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.3, 2025-06-12 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..f2f0bfb2b5 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.3, 2025-06-12 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.3, 2025-06-12 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 @@ -539,6 +543,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C Generate events only if IMODE is 0. IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN C Call UNWGT to unweight and store events + ICONFIG = CHANNELS(IVEC) CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) ENDIF diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_uux_ttx/driver.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_uux_ttx/driver.f index ec5722702a..c08048ad0e 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_uux_ttx/driver.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P0_uux_ttx/driver.f @@ -489,7 +489,6 @@ subroutine open_file_local(lun,filename,fopened) fopened=.false. tempname=filename fine=index(tempname,' ') -c fine2=index(path,' ')-1 ! AV remove valgrind "Conditional jump or move depends on uninitialised value(s)" if(fine.eq.0) fine=len(tempname) open(unit=lun,file=tempname,status='old',ERR=20) fopened=.true. 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..59b33b94c6 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.3, 2025-06-12 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.3, 2025-06-12 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,21 +400,24 @@ 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 C ---------- IF (FIRST) THEN FIRST=.FALSE. - IF(ZERO.NE.0D0) FK_ZERO = SIGN(MAX(ABS(ZERO), ABS(ZERO - $ *SMALL_WIDTH_TREATMENT)), ZERO) - IF(MDL_WT.NE.0D0) FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT - $ *SMALL_WIDTH_TREATMENT)), MDL_WT) + FK_ZERO = 0D0 + IF(MDL_WT.NE.0D0) THEN + FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT + $ *SMALL_WIDTH_TREATMENT)), MDL_WT) + ELSE + FK_MDL_WT = 0D0 + ENDIF + IF(INIT_MODE) THEN ZEROAMP_1(:,:) = .TRUE. @@ -444,10 +448,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 +462,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/CPPProcess.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/CPPProcess.cc index 5de1c626c8..ff1623c2dd 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -774,7 +774,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- 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..8692a8cc27 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.3, 2025-06-12 // 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..163076da52 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.3, 2025-06-12 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..bc9333bb5d 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.3, 2025-06-12 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.3, 2025-06-12 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 @@ -484,6 +488,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C Generate events only if IMODE is 0. IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN C Call UNWGT to unweight and store events + ICONFIG = CHANNELS(IVEC) CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) ENDIF diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/driver.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/driver.f index c2eadb2c31..10332b6238 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/driver.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gg_ttxg/driver.f @@ -489,7 +489,6 @@ subroutine open_file_local(lun,filename,fopened) fopened=.false. tempname=filename fine=index(tempname,' ') -c fine2=index(path,' ')-1 ! AV remove valgrind "Conditional jump or move depends on uninitialised value(s)" if(fine.eq.0) fine=len(tempname) open(unit=lun,file=tempname,status='old',ERR=20) fopened=.true. 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..850d121618 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.3, 2025-06-12 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.3, 2025-06-12 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,43 +410,32 @@ 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 C ---------- IF (FIRST) THEN FIRST=.FALSE. - IF(ZERO.NE.0D0) FK_ZERO = SIGN(MAX(ABS(ZERO), ABS(ZERO - $ *SMALL_WIDTH_TREATMENT)), ZERO) - IF(MDL_WT.NE.0D0) FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT - $ *SMALL_WIDTH_TREATMENT)), MDL_WT) + FK_ZERO = 0D0 + IF(MDL_WT.NE.0D0) THEN + FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT + $ *SMALL_WIDTH_TREATMENT)), MDL_WT) + ELSE + FK_MDL_WT = 0D0 + ENDIF + IF(INIT_MODE) THEN ZEROAMP_1(:,:) = .TRUE. @@ -549,10 +539,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 +553,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/CPPProcess.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gu_ttxu/CPPProcess.cc index 4f8f49270b..4fdf7ce736 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -610,7 +610,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- 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..621f842e2a 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.3, 2025-06-12 // 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..2d49642e74 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.3, 2025-06-12 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..a45203b57e 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.3, 2025-06-12 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.3, 2025-06-12 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 @@ -528,6 +532,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C Generate events only if IMODE is 0. IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN C Call UNWGT to unweight and store events + ICONFIG = CHANNELS(IVEC) CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) ENDIF diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gu_ttxu/driver.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gu_ttxu/driver.f index c2eadb2c31..10332b6238 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gu_ttxu/driver.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gu_ttxu/driver.f @@ -489,7 +489,6 @@ subroutine open_file_local(lun,filename,fopened) fopened=.false. tempname=filename fine=index(tempname,' ') -c fine2=index(path,' ')-1 ! AV remove valgrind "Conditional jump or move depends on uninitialised value(s)" if(fine.eq.0) fine=len(tempname) open(unit=lun,file=tempname,status='old',ERR=20) fopened=.true. 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..2efe3ea8fc 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.3, 2025-06-12 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.3, 2025-06-12 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,31 +416,28 @@ 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 C ---------- IF (FIRST) THEN FIRST=.FALSE. - IF(ZERO.NE.0D0) FK_ZERO = SIGN(MAX(ABS(ZERO), ABS(ZERO - $ *SMALL_WIDTH_TREATMENT)), ZERO) - IF(MDL_WT.NE.0D0) FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT - $ *SMALL_WIDTH_TREATMENT)), MDL_WT) + FK_ZERO = 0D0 + IF(MDL_WT.NE.0D0) THEN + FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT + $ *SMALL_WIDTH_TREATMENT)), MDL_WT) + ELSE + FK_MDL_WT = 0D0 + ENDIF + IF(INIT_MODE) THEN ZEROAMP_1(:,:) = .TRUE. @@ -492,10 +490,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 +504,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/CPPProcess.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gux_ttxux/CPPProcess.cc index e2d65a2667..fcbdd0c4e0 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -610,7 +610,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- 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..a9969ce30d 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.3, 2025-06-12 // 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..a246f2aab0 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.3, 2025-06-12 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..d50f96bb8d 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.3, 2025-06-12 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.3, 2025-06-12 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 @@ -528,6 +532,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C Generate events only if IMODE is 0. IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN C Call UNWGT to unweight and store events + ICONFIG = CHANNELS(IVEC) CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) ENDIF diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gux_ttxux/driver.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gux_ttxux/driver.f index c2eadb2c31..10332b6238 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gux_ttxux/driver.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_gux_ttxux/driver.f @@ -489,7 +489,6 @@ subroutine open_file_local(lun,filename,fopened) fopened=.false. tempname=filename fine=index(tempname,' ') -c fine2=index(path,' ')-1 ! AV remove valgrind "Conditional jump or move depends on uninitialised value(s)" if(fine.eq.0) fine=len(tempname) open(unit=lun,file=tempname,status='old',ERR=20) fopened=.true. 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..0a96a485e5 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.3, 2025-06-12 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.3, 2025-06-12 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,31 +416,28 @@ 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 C ---------- IF (FIRST) THEN FIRST=.FALSE. - IF(ZERO.NE.0D0) FK_ZERO = SIGN(MAX(ABS(ZERO), ABS(ZERO - $ *SMALL_WIDTH_TREATMENT)), ZERO) - IF(MDL_WT.NE.0D0) FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT - $ *SMALL_WIDTH_TREATMENT)), MDL_WT) + FK_ZERO = 0D0 + IF(MDL_WT.NE.0D0) THEN + FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT + $ *SMALL_WIDTH_TREATMENT)), MDL_WT) + ELSE + FK_MDL_WT = 0D0 + ENDIF + IF(INIT_MODE) THEN ZEROAMP_1(:,:) = .TRUE. @@ -492,10 +490,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 +504,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/CPPProcess.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_uux_ttxg/CPPProcess.cc index 4f41927bc9..12d4ed6458 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -610,7 +610,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- 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..c73cccd01b 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.3, 2025-06-12 // 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..bfdf29ed05 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.3, 2025-06-12 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..f1a7d1c5bc 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.3, 2025-06-12 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.3, 2025-06-12 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 @@ -539,6 +543,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C Generate events only if IMODE is 0. IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN C Call UNWGT to unweight and store events + ICONFIG = CHANNELS(IVEC) CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) ENDIF diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_uux_ttxg/driver.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_uux_ttxg/driver.f index c2eadb2c31..10332b6238 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_uux_ttxg/driver.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P1_uux_ttxg/driver.f @@ -489,7 +489,6 @@ subroutine open_file_local(lun,filename,fopened) fopened=.false. tempname=filename fine=index(tempname,' ') -c fine2=index(path,' ')-1 ! AV remove valgrind "Conditional jump or move depends on uninitialised value(s)" if(fine.eq.0) fine=len(tempname) open(unit=lun,file=tempname,status='old',ERR=20) fopened=.true. 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..c03378a882 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.3, 2025-06-12 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.3, 2025-06-12 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,31 +416,28 @@ 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 C ---------- IF (FIRST) THEN FIRST=.FALSE. - IF(ZERO.NE.0D0) FK_ZERO = SIGN(MAX(ABS(ZERO), ABS(ZERO - $ *SMALL_WIDTH_TREATMENT)), ZERO) - IF(MDL_WT.NE.0D0) FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT - $ *SMALL_WIDTH_TREATMENT)), MDL_WT) + FK_ZERO = 0D0 + IF(MDL_WT.NE.0D0) THEN + FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT + $ *SMALL_WIDTH_TREATMENT)), MDL_WT) + ELSE + FK_MDL_WT = 0D0 + ENDIF + IF(INIT_MODE) THEN ZEROAMP_1(:,:) = .TRUE. @@ -492,10 +490,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 +504,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_ttxgg/CPPProcess.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxgg/CPPProcess.cc index da962495fd..bfdc6b8972 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -2718,7 +2718,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- 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..7d1e6e267e 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.3, 2025-06-12 // 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..1418b77839 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.3, 2025-06-12 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..60103eb65c 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.3, 2025-06-12 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.3, 2025-06-12 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 @@ -484,6 +488,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C Generate events only if IMODE is 0. IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN C Call UNWGT to unweight and store events + ICONFIG = CHANNELS(IVEC) CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) ENDIF diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxgg/driver.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxgg/driver.f index f7f23196eb..fc9392238e 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxgg/driver.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxgg/driver.f @@ -489,7 +489,6 @@ subroutine open_file_local(lun,filename,fopened) fopened=.false. tempname=filename fine=index(tempname,' ') -c fine2=index(path,' ')-1 ! AV remove valgrind "Conditional jump or move depends on uninitialised value(s)" if(fine.eq.0) fine=len(tempname) open(unit=lun,file=tempname,status='old',ERR=20) fopened=.true. 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..48a83737ca 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.3, 2025-06-12 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.3, 2025-06-12 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,407 +442,81 @@ 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 C ---------- IF (FIRST) THEN FIRST=.FALSE. - IF(ZERO.NE.0D0) FK_ZERO = SIGN(MAX(ABS(ZERO), ABS(ZERO - $ *SMALL_WIDTH_TREATMENT)), ZERO) - IF(MDL_WT.NE.0D0) FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT - $ *SMALL_WIDTH_TREATMENT)), MDL_WT) + FK_ZERO = 0D0 + IF(MDL_WT.NE.0D0) THEN + FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT + $ *SMALL_WIDTH_TREATMENT)), MDL_WT) + ELSE + FK_MDL_WT = 0D0 + ENDIF + IF(INIT_MODE) THEN ZEROAMP_1(:,:) = .TRUE. @@ -1547,10 +1222,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 +1236,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_ttxuux/CPPProcess.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxuux/CPPProcess.cc index 70d0f7cb8e..f2230bfcaf 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -1113,7 +1113,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- 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..d10c4e9bc7 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.3, 2025-06-12 // 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..ef6c2d98a2 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.3, 2025-06-12 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..44b8eb0a9b 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.3, 2025-06-12 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.3, 2025-06-12 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 @@ -517,6 +521,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C Generate events only if IMODE is 0. IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN C Call UNWGT to unweight and store events + ICONFIG = CHANNELS(IVEC) CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) ENDIF diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxuux/driver.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxuux/driver.f index f7f23196eb..fc9392238e 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxuux/driver.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gg_ttxuux/driver.f @@ -489,7 +489,6 @@ subroutine open_file_local(lun,filename,fopened) fopened=.false. tempname=filename fine=index(tempname,' ') -c fine2=index(path,' ')-1 ! AV remove valgrind "Conditional jump or move depends on uninitialised value(s)" if(fine.eq.0) fine=len(tempname) open(unit=lun,file=tempname,status='old',ERR=20) fopened=.true. 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..ffaa3cde67 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.3, 2025-06-12 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.3, 2025-06-12 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,111 +448,44 @@ 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 C ---------- IF (FIRST) THEN FIRST=.FALSE. - IF(ZERO.NE.0D0) FK_ZERO = SIGN(MAX(ABS(ZERO), ABS(ZERO - $ *SMALL_WIDTH_TREATMENT)), ZERO) - IF(MDL_WT.NE.0D0) FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT - $ *SMALL_WIDTH_TREATMENT)), MDL_WT) + FK_ZERO = 0D0 + IF(MDL_WT.NE.0D0) THEN + FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT + $ *SMALL_WIDTH_TREATMENT)), MDL_WT) + ELSE + FK_MDL_WT = 0D0 + ENDIF + IF(INIT_MODE) THEN ZEROAMP_1(:,:) = .TRUE. @@ -760,10 +694,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 +708,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/CPPProcess.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gu_ttxgu/CPPProcess.cc index ac4bf091b7..ced0ab3ce1 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -1113,7 +1113,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- 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..c91689cbd0 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.3, 2025-06-12 // 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..eb269f804d 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.3, 2025-06-12 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..3d6ffe6ba1 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.3, 2025-06-12 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.3, 2025-06-12 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 @@ -528,6 +532,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C Generate events only if IMODE is 0. IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN C Call UNWGT to unweight and store events + ICONFIG = CHANNELS(IVEC) CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) ENDIF diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gu_ttxgu/driver.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gu_ttxgu/driver.f index f7f23196eb..fc9392238e 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gu_ttxgu/driver.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gu_ttxgu/driver.f @@ -489,7 +489,6 @@ subroutine open_file_local(lun,filename,fopened) fopened=.false. tempname=filename fine=index(tempname,' ') -c fine2=index(path,' ')-1 ! AV remove valgrind "Conditional jump or move depends on uninitialised value(s)" if(fine.eq.0) fine=len(tempname) open(unit=lun,file=tempname,status='old',ERR=20) fopened=.true. 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..616ba2e46c 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.3, 2025-06-12 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.3, 2025-06-12 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,111 +448,44 @@ 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 C ---------- IF (FIRST) THEN FIRST=.FALSE. - IF(ZERO.NE.0D0) FK_ZERO = SIGN(MAX(ABS(ZERO), ABS(ZERO - $ *SMALL_WIDTH_TREATMENT)), ZERO) - IF(MDL_WT.NE.0D0) FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT - $ *SMALL_WIDTH_TREATMENT)), MDL_WT) + FK_ZERO = 0D0 + IF(MDL_WT.NE.0D0) THEN + FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT + $ *SMALL_WIDTH_TREATMENT)), MDL_WT) + ELSE + FK_MDL_WT = 0D0 + ENDIF + IF(INIT_MODE) THEN ZEROAMP_1(:,:) = .TRUE. @@ -761,10 +695,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 +709,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/CPPProcess.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gux_ttxgux/CPPProcess.cc index acf1b836af..24d55849cf 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -1113,7 +1113,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- 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..284eac17bb 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.3, 2025-06-12 // 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..887e00cba5 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.3, 2025-06-12 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..5de24d634f 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.3, 2025-06-12 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.3, 2025-06-12 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 @@ -528,6 +532,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C Generate events only if IMODE is 0. IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN C Call UNWGT to unweight and store events + ICONFIG = CHANNELS(IVEC) CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) ENDIF diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gux_ttxgux/driver.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gux_ttxgux/driver.f index f7f23196eb..fc9392238e 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gux_ttxgux/driver.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_gux_ttxgux/driver.f @@ -489,7 +489,6 @@ subroutine open_file_local(lun,filename,fopened) fopened=.false. tempname=filename fine=index(tempname,' ') -c fine2=index(path,' ')-1 ! AV remove valgrind "Conditional jump or move depends on uninitialised value(s)" if(fine.eq.0) fine=len(tempname) open(unit=lun,file=tempname,status='old',ERR=20) fopened=.true. 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..db9ee54bf0 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.3, 2025-06-12 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.3, 2025-06-12 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,109 +448,44 @@ 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 C ---------- IF (FIRST) THEN FIRST=.FALSE. - IF(ZERO.NE.0D0) FK_ZERO = SIGN(MAX(ABS(ZERO), ABS(ZERO - $ *SMALL_WIDTH_TREATMENT)), ZERO) - IF(MDL_WT.NE.0D0) FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT - $ *SMALL_WIDTH_TREATMENT)), MDL_WT) + FK_ZERO = 0D0 + IF(MDL_WT.NE.0D0) THEN + FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT + $ *SMALL_WIDTH_TREATMENT)), MDL_WT) + ELSE + FK_MDL_WT = 0D0 + ENDIF + IF(INIT_MODE) THEN ZEROAMP_1(:,:) = .TRUE. @@ -758,10 +694,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 +708,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/CPPProcess.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uc_ttxuc/CPPProcess.cc index d34888db6a..8c29bbe8d4 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -688,7 +688,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- 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..3acfd96da7 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.3, 2025-06-12 // 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..6aea556b29 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.3, 2025-06-12 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..d676a45fad 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.3, 2025-06-12 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.3, 2025-06-12 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 @@ -555,6 +559,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C Generate events only if IMODE is 0. IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN C Call UNWGT to unweight and store events + ICONFIG = CHANNELS(IVEC) CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) ENDIF diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uc_ttxuc/driver.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uc_ttxuc/driver.f index f7f23196eb..fc9392238e 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uc_ttxuc/driver.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uc_ttxuc/driver.f @@ -489,7 +489,6 @@ subroutine open_file_local(lun,filename,fopened) fopened=.false. tempname=filename fine=index(tempname,' ') -c fine2=index(path,' ')-1 ! AV remove valgrind "Conditional jump or move depends on uninitialised value(s)" if(fine.eq.0) fine=len(tempname) open(unit=lun,file=tempname,status='old',ERR=20) fopened=.true. 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..67afdb3cae 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.3, 2025-06-12 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.3, 2025-06-12 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,39 +452,32 @@ 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 C ---------- IF (FIRST) THEN FIRST=.FALSE. - IF(ZERO.NE.0D0) FK_ZERO = SIGN(MAX(ABS(ZERO), ABS(ZERO - $ *SMALL_WIDTH_TREATMENT)), ZERO) - IF(MDL_WT.NE.0D0) FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT - $ *SMALL_WIDTH_TREATMENT)), MDL_WT) + FK_ZERO = 0D0 + IF(MDL_WT.NE.0D0) THEN + FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT + $ *SMALL_WIDTH_TREATMENT)), MDL_WT) + ELSE + FK_MDL_WT = 0D0 + ENDIF + IF(INIT_MODE) THEN ZEROAMP_1(:,:) = .TRUE. @@ -553,10 +547,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 +561,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/CPPProcess.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_ucx_ttxucx/CPPProcess.cc index 66e4b80f71..42cc0e97ad 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -694,7 +694,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- 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..41d476cf78 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.3, 2025-06-12 // 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..b693098acb 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.3, 2025-06-12 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..87348bace0 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.3, 2025-06-12 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.3, 2025-06-12 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 @@ -627,6 +631,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C Generate events only if IMODE is 0. IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN C Call UNWGT to unweight and store events + ICONFIG = CHANNELS(IVEC) CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) ENDIF diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_ucx_ttxucx/driver.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_ucx_ttxucx/driver.f index f7f23196eb..fc9392238e 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_ucx_ttxucx/driver.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_ucx_ttxucx/driver.f @@ -489,7 +489,6 @@ subroutine open_file_local(lun,filename,fopened) fopened=.false. tempname=filename fine=index(tempname,' ') -c fine2=index(path,' ')-1 ! AV remove valgrind "Conditional jump or move depends on uninitialised value(s)" if(fine.eq.0) fine=len(tempname) open(unit=lun,file=tempname,status='old',ERR=20) fopened=.true. 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..210248dac7 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.3, 2025-06-12 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.3, 2025-06-12 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,39 +464,32 @@ 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 C ---------- IF (FIRST) THEN FIRST=.FALSE. - IF(ZERO.NE.0D0) FK_ZERO = SIGN(MAX(ABS(ZERO), ABS(ZERO - $ *SMALL_WIDTH_TREATMENT)), ZERO) - IF(MDL_WT.NE.0D0) FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT - $ *SMALL_WIDTH_TREATMENT)), MDL_WT) + FK_ZERO = 0D0 + IF(MDL_WT.NE.0D0) THEN + FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT + $ *SMALL_WIDTH_TREATMENT)), MDL_WT) + ELSE + FK_MDL_WT = 0D0 + ENDIF + IF(INIT_MODE) THEN ZEROAMP_1(:,:) = .TRUE. @@ -565,10 +559,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 +573,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/CPPProcess.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uu_ttxuu/CPPProcess.cc index 8d266e82b7..0f3130261b 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -798,7 +798,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- 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..b7dc5cb88f 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.3, 2025-06-12 // 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..87bbc98a81 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.3, 2025-06-12 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..8712e90238 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.3, 2025-06-12 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.3, 2025-06-12 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 @@ -539,6 +543,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C Generate events only if IMODE is 0. IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN C Call UNWGT to unweight and store events + ICONFIG = CHANNELS(IVEC) CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) ENDIF diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uu_ttxuu/driver.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uu_ttxuu/driver.f index f7f23196eb..fc9392238e 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uu_ttxuu/driver.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uu_ttxuu/driver.f @@ -489,7 +489,6 @@ subroutine open_file_local(lun,filename,fopened) fopened=.false. tempname=filename fine=index(tempname,' ') -c fine2=index(path,' ')-1 ! AV remove valgrind "Conditional jump or move depends on uninitialised value(s)" if(fine.eq.0) fine=len(tempname) open(unit=lun,file=tempname,status='old',ERR=20) fopened=.true. 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..ca1ea52d2b 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.3, 2025-06-12 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.3, 2025-06-12 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,39 +448,32 @@ 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 C ---------- IF (FIRST) THEN FIRST=.FALSE. - IF(ZERO.NE.0D0) FK_ZERO = SIGN(MAX(ABS(ZERO), ABS(ZERO - $ *SMALL_WIDTH_TREATMENT)), ZERO) - IF(MDL_WT.NE.0D0) FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT - $ *SMALL_WIDTH_TREATMENT)), MDL_WT) + FK_ZERO = 0D0 + IF(MDL_WT.NE.0D0) THEN + FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT + $ *SMALL_WIDTH_TREATMENT)), MDL_WT) + ELSE + FK_MDL_WT = 0D0 + ENDIF + IF(INIT_MODE) THEN ZEROAMP_1(:,:) = .TRUE. @@ -585,10 +579,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 +593,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/CPPProcess.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxccx/CPPProcess.cc index 1b918bae84..7916f56f64 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -694,7 +694,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- 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..97523b6226 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.3, 2025-06-12 // 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..41ac73e027 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.3, 2025-06-12 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..92abff14ad 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.3, 2025-06-12 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.3, 2025-06-12 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 @@ -627,6 +631,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C Generate events only if IMODE is 0. IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN C Call UNWGT to unweight and store events + ICONFIG = CHANNELS(IVEC) CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) ENDIF diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxccx/driver.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxccx/driver.f index f7f23196eb..fc9392238e 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxccx/driver.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxccx/driver.f @@ -489,7 +489,6 @@ subroutine open_file_local(lun,filename,fopened) fopened=.false. tempname=filename fine=index(tempname,' ') -c fine2=index(path,' ')-1 ! AV remove valgrind "Conditional jump or move depends on uninitialised value(s)" if(fine.eq.0) fine=len(tempname) open(unit=lun,file=tempname,status='old',ERR=20) fopened=.true. 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..6dffcf0951 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.3, 2025-06-12 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.3, 2025-06-12 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,39 +464,32 @@ 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 C ---------- IF (FIRST) THEN FIRST=.FALSE. - IF(ZERO.NE.0D0) FK_ZERO = SIGN(MAX(ABS(ZERO), ABS(ZERO - $ *SMALL_WIDTH_TREATMENT)), ZERO) - IF(MDL_WT.NE.0D0) FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT - $ *SMALL_WIDTH_TREATMENT)), MDL_WT) + FK_ZERO = 0D0 + IF(MDL_WT.NE.0D0) THEN + FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT + $ *SMALL_WIDTH_TREATMENT)), MDL_WT) + ELSE + FK_MDL_WT = 0D0 + ENDIF + IF(INIT_MODE) THEN ZEROAMP_1(:,:) = .TRUE. @@ -565,10 +559,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 +573,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/CPPProcess.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg/CPPProcess.cc index 1c575b7757..14f4bd4e67 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -1113,7 +1113,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- 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..347a67fe76 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.3, 2025-06-12 // 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..9f0a834688 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.3, 2025-06-12 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..02fad5c3ba 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.3, 2025-06-12 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.3, 2025-06-12 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 @@ -539,6 +543,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C Generate events only if IMODE is 0. IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN C Call UNWGT to unweight and store events + ICONFIG = CHANNELS(IVEC) CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) ENDIF diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg/driver.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg/driver.f index f7f23196eb..fc9392238e 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg/driver.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxgg/driver.f @@ -489,7 +489,6 @@ subroutine open_file_local(lun,filename,fopened) fopened=.false. tempname=filename fine=index(tempname,' ') -c fine2=index(path,' ')-1 ! AV remove valgrind "Conditional jump or move depends on uninitialised value(s)" if(fine.eq.0) fine=len(tempname) open(unit=lun,file=tempname,status='old',ERR=20) fopened=.true. 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..563e5bc0a0 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.3, 2025-06-12 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.3, 2025-06-12 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,111 +448,44 @@ 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 C ---------- IF (FIRST) THEN FIRST=.FALSE. - IF(ZERO.NE.0D0) FK_ZERO = SIGN(MAX(ABS(ZERO), ABS(ZERO - $ *SMALL_WIDTH_TREATMENT)), ZERO) - IF(MDL_WT.NE.0D0) FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT - $ *SMALL_WIDTH_TREATMENT)), MDL_WT) + FK_ZERO = 0D0 + IF(MDL_WT.NE.0D0) THEN + FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT + $ *SMALL_WIDTH_TREATMENT)), MDL_WT) + ELSE + FK_MDL_WT = 0D0 + ENDIF + IF(INIT_MODE) THEN ZEROAMP_1(:,:) = .TRUE. @@ -761,10 +695,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 +709,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/CPPProcess.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxuux/CPPProcess.cc index e6d6423d5e..aa2d84e719 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -798,7 +798,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- 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..b605fc84d4 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.3, 2025-06-12 // 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..806033a9ec 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.3, 2025-06-12 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..e841acfd24 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.3, 2025-06-12 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.3, 2025-06-12 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 @@ -539,6 +543,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C Generate events only if IMODE is 0. IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN C Call UNWGT to unweight and store events + ICONFIG = CHANNELS(IVEC) CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) ENDIF diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxuux/driver.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxuux/driver.f index f7f23196eb..fc9392238e 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxuux/driver.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uux_ttxuux/driver.f @@ -489,7 +489,6 @@ subroutine open_file_local(lun,filename,fopened) fopened=.false. tempname=filename fine=index(tempname,' ') -c fine2=index(path,' ')-1 ! AV remove valgrind "Conditional jump or move depends on uninitialised value(s)" if(fine.eq.0) fine=len(tempname) open(unit=lun,file=tempname,status='old',ERR=20) fopened=.true. 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..e4cc5c2814 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.3, 2025-06-12 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.3, 2025-06-12 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,39 +448,32 @@ 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 C ---------- IF (FIRST) THEN FIRST=.FALSE. - IF(ZERO.NE.0D0) FK_ZERO = SIGN(MAX(ABS(ZERO), ABS(ZERO - $ *SMALL_WIDTH_TREATMENT)), ZERO) - IF(MDL_WT.NE.0D0) FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT - $ *SMALL_WIDTH_TREATMENT)), MDL_WT) + FK_ZERO = 0D0 + IF(MDL_WT.NE.0D0) THEN + FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT + $ *SMALL_WIDTH_TREATMENT)), MDL_WT) + ELSE + FK_MDL_WT = 0D0 + ENDIF + IF(INIT_MODE) THEN ZEROAMP_1(:,:) = .TRUE. @@ -585,10 +579,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 +593,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/CPPProcess.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxcx_ttxuxcx/CPPProcess.cc index bf560d981f..8bfab7aa95 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -688,7 +688,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- 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..516b111393 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.3, 2025-06-12 // 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..a781041f7d 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.3, 2025-06-12 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..d25e751436 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.3, 2025-06-12 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.3, 2025-06-12 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 @@ -555,6 +559,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C Generate events only if IMODE is 0. IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN C Call UNWGT to unweight and store events + ICONFIG = CHANNELS(IVEC) CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) ENDIF diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxcx_ttxuxcx/driver.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxcx_ttxuxcx/driver.f index f7f23196eb..fc9392238e 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxcx_ttxuxcx/driver.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxcx_ttxuxcx/driver.f @@ -489,7 +489,6 @@ subroutine open_file_local(lun,filename,fopened) fopened=.false. tempname=filename fine=index(tempname,' ') -c fine2=index(path,' ')-1 ! AV remove valgrind "Conditional jump or move depends on uninitialised value(s)" if(fine.eq.0) fine=len(tempname) open(unit=lun,file=tempname,status='old',ERR=20) fopened=.true. 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..14d46077f0 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.3, 2025-06-12 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.3, 2025-06-12 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,39 +452,32 @@ 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 C ---------- IF (FIRST) THEN FIRST=.FALSE. - IF(ZERO.NE.0D0) FK_ZERO = SIGN(MAX(ABS(ZERO), ABS(ZERO - $ *SMALL_WIDTH_TREATMENT)), ZERO) - IF(MDL_WT.NE.0D0) FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT - $ *SMALL_WIDTH_TREATMENT)), MDL_WT) + FK_ZERO = 0D0 + IF(MDL_WT.NE.0D0) THEN + FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT + $ *SMALL_WIDTH_TREATMENT)), MDL_WT) + ELSE + FK_MDL_WT = 0D0 + ENDIF + IF(INIT_MODE) THEN ZEROAMP_1(:,:) = .TRUE. @@ -553,10 +547,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 +561,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/CPPProcess.cc b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxux_ttxuxux/CPPProcess.cc index 83faf9192b..baad067e39 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -798,7 +798,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- 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..1d1fd48af8 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.3, 2025-06-12 // 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..dcc832fcc1 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.3, 2025-06-12 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..4bef7f631c 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.3, 2025-06-12 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.3, 2025-06-12 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 @@ -539,6 +543,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C Generate events only if IMODE is 0. IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN C Call UNWGT to unweight and store events + ICONFIG = CHANNELS(IVEC) CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) ENDIF diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxux_ttxuxux/driver.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxux_ttxuxux/driver.f index f7f23196eb..fc9392238e 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxux_ttxuxux/driver.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/P2_uxux_ttxuxux/driver.f @@ -489,7 +489,6 @@ subroutine open_file_local(lun,filename,fopened) fopened=.false. tempname=filename fine=index(tempname,' ') -c fine2=index(path,' ')-1 ! AV remove valgrind "Conditional jump or move depends on uninitialised value(s)" if(fine.eq.0) fine=len(tempname) open(unit=lun,file=tempname,status='old',ERR=20) fopened=.true. 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..a4ee136e47 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.3, 2025-06-12 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.3, 2025-06-12 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,39 +448,32 @@ 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 C ---------- IF (FIRST) THEN FIRST=.FALSE. - IF(ZERO.NE.0D0) FK_ZERO = SIGN(MAX(ABS(ZERO), ABS(ZERO - $ *SMALL_WIDTH_TREATMENT)), ZERO) - IF(MDL_WT.NE.0D0) FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT - $ *SMALL_WIDTH_TREATMENT)), MDL_WT) + FK_ZERO = 0D0 + IF(MDL_WT.NE.0D0) THEN + FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT + $ *SMALL_WIDTH_TREATMENT)), MDL_WT) + ELSE + FK_MDL_WT = 0D0 + ENDIF + IF(INIT_MODE) THEN ZEROAMP_1(:,:) = .TRUE. @@ -585,10 +579,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 +593,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/addmothers.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/addmothers.f index 9a31ed201d..6f32477b9e 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/addmothers.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/addmothers.f @@ -21,7 +21,7 @@ subroutine addmothers(ip,jpart,pb,isym,jsym,rscale,aqcd,aqed,buff, integer icol ! color selected integer isym(nexternal,99), jsym - integer i,j,k,ida(2),ns,nres,ires,icl,ito2,idenpart,nc,ic + integer i,j,k,ida(2),ns,nres,ires,icl,ito2,idenpart,ic integer mo_color,da_color(2),itmp integer ito(-nexternal+3:nexternal),iseed,maxcolor,maxorg integer icolalt(2,-nexternal+2:2*nexternal-3) @@ -113,14 +113,15 @@ subroutine addmothers(ip,jpart,pb,isym,jsym,rscale,aqcd,aqed,buff, endif lconfig = vec_igraph1(ivec) endif - + is_LC=.true. + maxcolor=0 c c Choose a color flow which is certain to work with the propagator c structure of the chosen diagram and use that as an alternative c if (icol.eq.0) then do i=1,nexternal - icolalt(1,i)=0 + icolalt(1,i)=0 icolalt(2,i)=0 enddo else diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/cluster.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/cluster.f index b8995283ed..907894ea89 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/cluster.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/cluster.f @@ -556,6 +556,8 @@ logical function cluster(p, ivec) jwin = 0 cluster=.false. clustered=.false. + iwin =0 + jwin =0 do i=0,3 pcmsp(i)=0 enddo @@ -665,8 +667,11 @@ logical function cluster(p, ivec) c initialize graph storage igraphs(0)=0 nleft=nexternal -c cluster - if (iwin.eq.0.or.jwin.eq.0) stop 21 + if(iwin.eq.0.or.jwin.eq.0)then + cluster=.false. + return + endif +c cluster do n=1,nexternal-2 c combine winner imocl(n)=imap(iwin,2)+imap(jwin,2) diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/cudacpp.mk index 20d8ded718..20b8e6b858 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/cudacpp.mk @@ -114,7 +114,7 @@ export CXXFLAGS override CUDA_HOME = $(patsubst %/bin/nvcc,%,$(shell which nvcc 2>/dev/null)) # Set HIP_HOME from the path to hipcc, if it exists -override HIP_HOME = $(patsubst %/bin/hipcc,%,$(shell which hipcc 2>/dev/null)) +override HIP_HOME = $(shell hipconfig --rocmpath) # Configure CUDA_INC (for CURAND and NVTX) and NVTX if a CUDA installation exists (see #965) ifeq ($(CUDA_HOME),) @@ -229,6 +229,8 @@ ifeq ($(BACKEND),cuda) else ifeq ($(BACKEND),hip) + # example architecture values MI200:gfx90a, MI350X:gfx942 + MADGRAPH_HIP_ARCHITECTURE ?= gfx942 # Set GPUCC as $(HIP_HOME)/bin/hipcc (it was already checked above that this exists) GPUCC = $(HIP_HOME)/bin/hipcc XCOMPILERFLAG = @@ -243,7 +245,7 @@ else ifeq ($(BACKEND),hip) ###GPUFLAGS += -ggdb # FOR DEBUGGING ONLY # AMD HIP architecture flags - GPUARCHFLAGS = --offload-arch=gfx90a + GPUARCHFLAGS = --offload-arch=${MADGRAPH_HIP_ARCHITECTURE} GPUFLAGS += $(GPUARCHFLAGS) # Other AMD-specific flags @@ -878,7 +880,7 @@ endif $(gpu_fcheckmain): LIBFLAGS += $(GPULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH $(gpu_fcheckmain): $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBDIR)/lib$(MG5AMC_GPULIB).so $(gpu_objects_exe) ifneq ($(findstring hipcc,$(GPUCC)),) # link fortran/c++/hip using $FC when hipcc is used #802 - $(FC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) -lstdc++ -L$(shell cd -L $(shell dirname $(shell $(GPUCC) -print-prog-name=clang))/../..; pwd)/lib -lamdhip64 + $(FC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) -lstdc++ -L$(HIP_HOME)/lib -lamdhip64 else $(GPUCC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) endif @@ -979,7 +981,7 @@ else # link only runTest_$(GPUSUFFIX).o (new: in the past, this was linking both $(gpu_testmain): LIBFLAGS += $(GPULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH $(gpu_testmain): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(gpu_objects_lib) $(gpu_objects_exe) $(GTESTLIBS) ifneq ($(findstring hipcc,$(GPUCC)),) # link fortran/c++/hip using $FC when hipcc is used #802 - $(FC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lstdc++ -lpthread -L$(shell cd -L $(shell dirname $(shell $(GPUCC) -print-prog-name=clang))/../..; pwd)/lib -lamdhip64 + $(FC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lstdc++ -lpthread -L$(HIP_HOME)/lib -lamdhip64 else $(GPUCC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lcuda endif @@ -1104,10 +1106,20 @@ else @cat /proc/cpuinfo | grep "physical id" | sort -u endif @echo "" -ifneq ($(shell which nvidia-smi 2>/dev/null),) - nvidia-smi -L + # some systems may have -smi installed, but it fails to execute + # because it cannot communicate with the hardware + @if nvidia-smi &>/dev/null ; then \ + nvidia-smi -L ;\ + else \ + echo "No Nvidia GPU detected" ;\ + fi @echo "" -endif + @if amd-smi &>/dev/null ; then \ + amd-smi static -a ;\ + amd-smi list ;\ + else \ + echo "No AMD GPU detected" ;\ + fi @echo USECCACHE=$(USECCACHE) ifeq ($(USECCACHE),1) ccache --version | head -1 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/SubProcesses/proc_characteristics b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/proc_characteristics index 2805dfbacf..1e9adeeb4b 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/proc_characteristics +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/proc_characteristics @@ -8,7 +8,7 @@ ninitial = 2 grouped_matrix = True has_loops = False - bias_module = dummy + bias_module = None max_n_matched_jets = 2 colored_pdgs = [1, 2, 3, 4, 5, 6, 21] complex_mass_scheme = False diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/reweight.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/reweight.f index 0a0bafa7c1..189ba41449 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/reweight.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/reweight.f @@ -1186,7 +1186,7 @@ logical function setclscales(p, keepq2bck, ivec) if(nexternal.gt.3) pt2ijcl(nexternal-3)=q2fact(2) else if(.not.fixed_fac_scale1) q2fact(1)=scalefact**2*pt2ijcl(nexternal-2) - if(.not.fixed_fac_scale2) q2fact(2)=scalefact**2*q2fact(1) + if(.not.fixed_fac_scale2) q2fact(2)=scalefact**2*pt2ijcl(nexternal-2) endif elseif(jcentral(1).eq.0)then if(.not.fixed_fac_scale1) q2fact(1) = scalefact**2*pt2ijcl(jfirst(1)) diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/symmetry.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/symmetry.f index 309540a0a2..2afd9e9f75 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/symmetry.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/symmetry.f @@ -232,7 +232,7 @@ subroutine write_bash(mapconfig,use_config, prwidth, jcomp,iforest, c write(*,*) 'mapping',ic,mapconfig(i),icode if (icode .eq. 0) then c Create format string based on number of digits - write(formstr,'(a,i1,a)') '(I',nconf,'$)' + write(formstr,'(a,i1,a)') '(I',nconf,',$)' write(*,formstr) mapconfig(i) c Write symmetry factors write(formstr2,'(a,i2,a)') '(2i',nsym,')' @@ -242,10 +242,10 @@ subroutine write_bash(mapconfig,use_config, prwidth, jcomp,iforest, dconfig=mapconfig(i)+icode*1d0/10**ncode if(nconf+ncode+1.lt.10) then write(formstr,'(a,i1,a,i1,a)') '(F',nconf+ncode+1, - $ '.',ncode,'$)' + $ '.',ncode,',$)' else write(formstr,'(a,i2,a,i1,a)') '(F',nconf+ncode+1, - $ '.',ncode,'$)' + $ '.',ncode,',$)' endif write(*,formstr) dconfig c Write symmetry factors @@ -260,7 +260,7 @@ subroutine write_bash(mapconfig,use_config, prwidth, jcomp,iforest, dconfig=mapconfig(i)+icode*1d0/10**ncode write(27,formstr2) dconfig,use_config(i) endif - write(*,'(a$)') ' ' + write(*,'(a,$)') ' ' 100 call bw_increment_array(iarray,imax,ibase,done) enddo else diff --git a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/unwgt.f b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/unwgt.f index f602511c94..d1247f1849 100644 --- a/epochX/cudacpp/pp_tt012j.mad/SubProcesses/unwgt.f +++ b/epochX/cudacpp/pp_tt012j.mad/SubProcesses/unwgt.f @@ -497,6 +497,7 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) integer ip, np, ic, nc integer ida(2),ito(-nexternal+3:nexternal),ns,nres,ires,icloop integer iseed + double precision beam_mass double precision pboost(0:3) double precision beta, get_betaz double precision ebi(0:3), ebo(0:3) @@ -506,7 +507,7 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) integer idup(nexternal,maxproc,maxsproc) integer mothup(2,nexternal) integer icolup(2,nexternal,maxflow,maxsproc) - + double precision eta integer nsym integer ievent @@ -638,21 +639,20 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) if (nincoming.eq.2) then if (xbk(1) .gt. 0d0 .and. xbk(1) .le. 1d0 .and. $ xbk(2) .gt. 0d0 .and. xbk(2) .le. 1d0) then - if(lpp(2).ne.0.and.(xbk(1).eq.1d0.or.pmass(1).eq.0d0).and.xbk(2).ne.1d0) then - ! construct the beam momenta in each frame and compute the related (z)boost - if (pmass(1).eq.0d0.and.(abs(lpp(1)).eq.3.or.abs(lpp(1)).eq.4).and.ebeam(1).gt.10d0*m1)then - local_mass = 0d0 - else - local_mass = m1 - endif + if(lpp(2).ne.0.and.(xbk(1).eq.1d0.or.pmass(1).eq.0d0)) then + if((abs(lpp(1)).gt.2.and.abs(lpp(1)).ne.9).or.xbk(1).eq.1d0)then + beam_mass = pmass(1) + else + beam_mass = m1 + endif ebi(0) = p(0,1)/xbk(1) ! this assumes that particle 1 is massless or mass equal to beam ebi(1) = 0 ebi(2) = 0 - ebi(3) = DSQRT(ebi(0)**2-local_mass**2) + ebi(3) = DSQRT(ebi(0)**2-beam_mass**2) ebo(0) = ebeam(1) ebo(1) = 0 ebo(2) = 0 - ebo(3) = DSQRT(ebo(0)**2-local_mass**2) + ebo(3) = DSQRT(ebo(0)**2-beam_mass**2) beta = get_betaz(ebi, ebo) if (xbk(1).eq.1d0) then pb(0,isym(1,jsym)) = ebo(0) @@ -668,20 +668,19 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) enddo else - if (pmass(1).eq.0d0.and.(abs(lpp(1)).eq.3.or.abs(lpp(1)).eq.4.and.ebeam(2).gt.10d0*m2))then - local_mass = 0d0 - else - local_mass = m2 - endif - ebi(0) = p(0,1)/xbk(1) ! this assumes that particle 1 is massless or mass equal to beam + if((abs(lpp(2)).gt.2.and.abs(lpp(2)).ne.9).or.xbk(2).eq.1d0)then + beam_mass = pmass(2) + else + beam_mass = m2 + endif ebi(0) = p(0,2)/xbk(2) ! this assumes that particle 2 is massless or mass equal to beam ebi(1) = 0 ebi(2) = 0 - ebi(3) = -1d0*DSQRT(ebi(0)**2-local_mass**2) + ebi(3) = -1d0*DSQRT(ebi(0)**2-beam_mass**2) ebo(0) = ebeam(2) ebo(1) = 0 ebo(2) = 0 - ebo(3) = -1d0*DSQRT(ebo(0)**2-local_mass**2) + ebo(3) = -1d0*DSQRT(ebo(0)**2-beam_mass**2) beta = get_betaz(ebi, ebo) if (xbk(2).eq.1d0) then pb(0,isym(2,jsym)) = ebo(0) @@ -701,6 +700,21 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) write(*,*) 'Warning bad x1 or x2 in write_leshouche', $ xbk(1),xbk(2) endif + do j=1,nexternal + call zboost_with_beta(p(0,j),beta,pb(0,isym(j,jsym))) + pb(4,isym(j,jsym))=pmass(j) + enddo + + ! check for numerical_accuracy + if (pb(0,1).gt.ebeam(1).or.pb(0,2).gt.ebeam(2))then + ! go back to old method --more accurate when boosting with xbk close to one-- + eta = sqrt(xbk(1)*ebeam(1)/(xbk(2)*ebeam(2))) + pboost(0)=p(0,1)*(eta + 1d0/eta) + pboost(3)=p(0,1)*(eta - 1d0/eta) + do j=1,nexternal + call boostx(p(0,j),pboost,pb(0,isym(j,jsym))) + enddo + endif else do j=1,nexternal call boostx(p(0,j),pboost,pb(0,isym(j,jsym))) @@ -709,6 +723,8 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) enddo endif + + if (IMIRROR.eq.2.and.pmass(1).ne.pmass(2)) then c Note that in this context isym(1,jsym) should never be "2" since the mass differ pb(4,isym(1,jsym))=pmass(2) 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..2efb5954a6 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] @@ -1991,6 +1991,11 @@ def default_setup(self): self.add_param("PartonLevel:FSRinResonances", True, hidden=True, always_write_to_card=False, comment="Do not allow shower to run from decay product of unstable particle") self.add_param("ProcessLevel:resonanceDecays", True, hidden=True, always_write_to_card=False, comment="Do not allow unstable particle to decay.") + # Parameters only needed for main164 type of run (not pythia8/MG5 interface) + self.add_param("Main:HepMC", True, hidden=True, always_write_to_card=False, + comment="""Specify the type of output to be used by the main164 run. """) + self.add_param("HepMC:output", 'hepmc.gz', hidden=True, always_write_to_card=False, + comment="Specify the HepMC output file to be used by the main164 run.") # Add parameters controlling the subruns execution flow. # These parameters should not be part of PY8SubRun daughter. self.add_default_subruns('parameters') @@ -2087,8 +2092,10 @@ def MadGraphSet(self, name, value, **opts): force = False if name.lower() not in self or (force or name.lower() not in self.user_set): self.__setitem__(name, value, change_userdefine=False, **opts) - self.system_set.add(name.lower()) - + self.system_set.add(name.lower()) + else: + raise Exception("The parameter %s is already set to %s. You can not change it." % (name, self[name])) + def defaultSet(self, name, value, **opts): self.__setitem__(name, value, change_userdefine=False, **opts) @@ -2144,9 +2151,19 @@ def pythia8_formatting(value, formatv=None): else: return ','.join([PY8Card.pythia8_formatting(arg) for arg in value]) + #change of name convention between MG5 old interface and main164 from Pythia8 + interface_to_164 = {'HEPMCoutput:file': 'HepMC:output', + 'SysCalc:fullCutVariation': '!SysCalc:fullCutVariation (not supported with 164)', + 'SysCalc:qCutList': '!SysCalc:qCutList (not supported with 164)', + 'SysCalc:qWeed': '!SysCalc:qWeed (not supported with 164)', + 'SysCalc:tmsList': '!SysCalc:tmsList (not supported with 164)', + 'HEPMCoutput:scaling' : '!HEPMCoutput :scaling (not supported with 164)', + 'LHEFInputs:nSubruns' : 'Main:numberOfSubruns'} + def write(self, output_file, template, read_subrun=False, - print_only_visible=False, direct_pythia_input=False, add_missing=True): + print_only_visible=False, direct_pythia_input=False, add_missing=True, + use_mg5amc_py8_interface=False): """ Write the card to output_file using a specific template. > 'print_only_visible' specifies whether or not the hidden parameters should be written out if they are in the hidden_params_to_always_write @@ -2155,7 +2172,12 @@ def write(self, output_file, template, read_subrun=False, in the self.visible_params_to_always_write list and are not user_set or system_set are commented. > If 'add_missing' is False then parameters that should be written_out but are absent - from the template will not be written out.""" + from the template will not be written out. + > use_mg5amc_py8_interface is a flag to indicate that the MG5aMC-PY8 interface is used or not + if not used some parameters need to be translated from the old convention to the new one + """ + + self.use_mg5amc_py8_interface = use_mg5amc_py8_interface # First list the visible parameters visible_param = [p for p in self if p.lower() not in self.hidden_param @@ -2297,7 +2319,16 @@ def group_params(params): else: # Just copy parameters which don't need to be specified if param.lower() not in self.params_to_never_write: - output.write(line) + + if not use_mg5amc_py8_interface and direct_pythia_input and \ + param in self.interface_to_164: + param_entry = self.interface_to_164[param.strip()] + # special case for HepMC needs two flags + if 'HepMC:output' == param_entry: + output.write(' %s=%s\n'%('Main:HepMC', 'on')) + output.write('%s=%s\n'%(param_entry,new_value)) + else: + output.write(line) else: output.write('! The following parameter was forced to be commented out by MG5aMC.\n') output.write('! %s'%line) @@ -2313,6 +2344,7 @@ def group_params(params): if ((not direct_pythia_input) or (param.lower() in self.visible_params_to_always_write) or (param.lower() in self.user_set) or + (param.lower() in self.hidden_params_to_always_write) or (param.lower() in self.system_set)): template = '%s=%s' else: @@ -2321,6 +2353,19 @@ def group_params(params): # then they shouldn't be passed to Pythia template = '!%s=%s' + if not use_mg5amc_py8_interface and direct_pythia_input and \ + param in self.interface_to_164: + param_entry = self.interface_to_164[param] + # special case for HepMC needs two flags + if 'HepMC:output' == param_entry: + output.write(' %s=%s\n'%('Main:HepMC', 'on')) + if 'Main:InternalAnalysis'.lower() in self.user_set and \ + self['Main:InternalAnalysis'].lower() == 'on': + output.write('InternalAnalysis:output = ./djrs.dat\n') + + #elif param in self.interface_to_164.values() and not direct_pythia_input: + # misc.sprint(use_mg5amc_py8_interface, direct_pythia_input,param) + # raise Exception('The parameter %s is not supported in the MG5aMC-PY8 interface. Please use the new interface.'%param_entry output.write(template%(param_entry, value_entry.replace(value,new_value))) @@ -2365,6 +2410,8 @@ def group_params(params): comment = '\n'.join('! %s'%c for c in self.comments[param.lower()].split('\n')) output.write(comment+'\n') + if not use_mg5amc_py8_interface and param in self.interface_to_164: + continue output.write('%s=%s\n'%(param,PY8Card.pythia8_formatting(self[param]))) # Don't close the file if we were reading a subrun, but simply write @@ -3318,7 +3365,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 +3372,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 @@ -4050,8 +4095,8 @@ def post_set_fixed_fac_scale(card, value, change_userdefine, raiseerror, **opt): if 'fixed_fac_scale2' in card.user_set: card.user_set.remove('fixed_fac_scale2') - # #card['pdlabel1'] = value - # #card['pdlabel2'] = value + dict.__setitem__(card, 'fixed_fac_scale1', card['fixed_fac_scale']) + dict.__setitem__(card, 'fixed_fac_scale2', card['fixed_fac_scale']) @staticmethod def post_set(card, value, change_userdefine, raiseerror, name='unknown', **opt): @@ -4201,6 +4246,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 @@ -4451,11 +4497,11 @@ def check_validity(self): time.sleep(5) if self['drjj'] != 0: if 'drjj' in self.user_set: - logger.warning('Since icckw>0, changing the value of \'drjj\' to 0') + logger.warning('Since ickkw>0, changing the value of \'drjj\' to 0') self['drjj'] = 0 if self['drjl'] != 0: if 'drjl' in self.user_set: - logger.warning('Since icckw>0, changing the value of \'drjl\' to 0') + logger.warning('Since ickkw>0, changing the value of \'drjl\' to 0') self['drjl'] = 0 if not self['auto_ptj_mjj']: if self['mmjj'] > self['xqcut']: @@ -4753,7 +4799,6 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): self['fixed_fac_scale1'] = True self['nhel'] = 1 for i in beam_id_split[1]: - exit if abs(i) == 11: self['lpp1'] = -math.copysign(3,i) self['lpp2'] = math.copysign(3,i) @@ -5577,6 +5622,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 +5838,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/cluster.py b/epochX/cudacpp/pp_tt012j.mad/bin/internal/cluster.py index 95ef45b5f3..66069293d2 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/cluster.py +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/cluster.py @@ -602,6 +602,7 @@ def __init__(self, *args, **opt): self.submitted = six.moves.queue.Queue() # one entry by job submitted self.stoprequest = threading.Event() #flag to ensure everything to close self.demons = [] + self.gpus_list = [] self.nb_done =0 if 'nb_core' in opt: self.nb_core = opt['nb_core'] @@ -623,23 +624,46 @@ def __init__(self, *args, **opt): self.done_pid_queue = six.moves.queue.Queue() self.fail_msg = None + mg5_gpu_env_str = 'MG5_GPU_VISIBLE_DEVICES' + gpu_variables = [['NVIDIA_VISIBLE_DEVICES', 'CUDA_VISIBLE_DEVICES'], + ['ROCR_VISIBLE_DEVICES', 'HIP_VISIBLE_DEVICES'],] + if mg5_gpu_env_str in os.environ: + new_var = os.environ[mg5_gpu_env_str].split(',') + if len(new_var) == 2: + gpu_variables.insert(0, new_var) + else: + logger.error('Invalid format for %s=%s, it should be a comma-separated list of two elements' % (mg5_gpu_env_str, os.environ[mg5_gpu_env_str])) + for get_var,set_var in gpu_variables: + if get_var in os.environ: + self.gpus_list = os.environ.get(get_var).split(',') + self.gpu_set_var = set_var + self.gpus_count = len(self.gpus_list) + logger.info('Found %s GPUs: %s' % (self.gpus_count, self.gpus_list)) def start_demon(self): import threading - t = threading.Thread(target=self.worker) + env2 = None + if len(self.gpus_list): + env2 = os.environ.copy() + this_gpu_idx = len(self.demons) % self.gpus_count + env2[self.gpu_set_var] = self.gpus_list[this_gpu_idx] + t = threading.Thread(target=self.worker, kwargs={'env2': env2}) + else: + t = threading.Thread(target=self.worker) t.daemon = True t.start() self.demons.append(t) - def worker(self): + def worker(self, env2=None): import six.moves.queue import six.moves._thread while not self.stoprequest.isSet(): try: args = self.queue.get(timeout=10) tag, exe, arg, opt = args + opt['env'] = env2 try: # check for executable case if isinstance(exe,str): 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..69291df0d4 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): @@ -1463,11 +1463,15 @@ def create_plot(self, mode='parton', event_path=None, output=None, tag=None): self.run_name, '%s_pts.dat' % tag) for observable_name, data_path in [('djr',djr_path), ('pt',pt_path)]: - if not self.generate_Pythia8_HwU_plots( + try: + if not self.generate_Pythia8_HwU_plots( PY8_plots_root_path, merging_scale_name, observable_name,data_path): - return False - + return False + except Exception as error: + if os.path.exists(data_path): + logger.info('plot information present in %s' % data_path) + return True if mode == 'Pythia8': plot_files = glob.glob(pjoin(PY8_plots_root_path,'*.gnuplot')) if not misc.which('gnuplot'): @@ -1964,12 +1968,16 @@ def do_systematics(self, line): self.cluster.wait(os.path.dirname(output), update_status, update_first=update_status) except Exception: self.cluster.remove() + for i in range(nb_submit): + os.remove('%s/tmp_%s_%s' %(os.path.dirname(output),i,os.path.basename(output))) old_run_mode = self.options['run_mode'] self.options['run_mode'] =0 + out =False try: out = self.do_systematics(line) finally: self.options['run_mode'] = old_run_mode + return out #collect the data all_cross = [] for i in range(nb_submit): @@ -1995,18 +2003,21 @@ def do_systematics(self, line): self.run_card['event_norm'] in ['unity']: all_cross= [cross/nb_event for cross in all_cross] - sys_obj = systematics.call_systematics([input, None] + opts, - log=lambda x: logger.info(str(x)), - result=result_file, - running=False - ) + + sys_obj = systematics.call_systematics([input, None] + opts, + log=lambda x: logger.info(str(x)), + result=result_file, + running=False + ) + sys_obj.print_cross_sections(all_cross, nb_event, result_file) - + #concatenate the output file subprocess.call(['cat']+\ ['./tmp_%s_%s' % (i, os.path.basename(output)) for i in range(nb_submit)], stdout=open(output,'w'), cwd=os.path.dirname(output)) + for i in range(nb_submit): os.remove('%s/tmp_%s_%s' %(os.path.dirname(output),i,os.path.basename(output))) # os.remove('%s/log_sys_%s.txt' % (os.path.dirname(output),i)) @@ -3831,7 +3842,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 +5146,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 +6751,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 +6775,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 +6826,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..6fbdd98100 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': @@ -1858,6 +1855,8 @@ def parse_histos_from_PY8_XML_stream(self, stream, run_id=None, # If merging cut is negative, then pick only the one of the central scale # If not specified, then take them all but use the PDF and scale weight # of the central merging_scale for the variation. + if not all_weights: + raise MadGraph5Error('No weights were found in the HwU XML source.') if merging_scale is None or merging_scale < 0.0: merging_scale_chosen = all_weights[2]['MERGING'] else: @@ -2480,14 +2479,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 +2738,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 +2877,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 +2889,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 +2898,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 +2907,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 +2916,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..b1739da73d 100644 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/launch_plugin.py +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/launch_plugin.py @@ -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: O. Mattelaer (Aug 2023) for the MG5aMC CUDACPP plugin. -# Further modified by: O. Mattelaer, A. Valassi (2024) for the MG5aMC CUDACPP plugin. +# Further modified by: O. Mattelaer, A. Valassi, Z. Wettersten (2024-2025) for the MG5aMC CUDACPP plugin. import logging import os @@ -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') @@ -133,7 +133,8 @@ def default_setup(self): super().default_setup() # change default value: self['cudacpp_backend'] = 'cuda' - self['vector_size'] = 16384 # already setup in default class (just change value) + self['vector_size'] = 32 # ZW: default to 32, might want to change to 64 to utilise AMD GPUs better as well # 16384 # already setup in default class (just change value) + self['nb_warp'] = 512 # number of warps per kernel call, for now setting to 16 384 / vector_size MEINTERFACE = CPPMEInterface RunCard = CPPRunCard 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..81d17f7cb1 100755 --- a/epochX/cudacpp/pp_tt012j.mad/bin/internal/lhe_parser.py +++ b/epochX/cudacpp/pp_tt012j.mad/bin/internal/lhe_parser.py @@ -1035,12 +1035,12 @@ def define_init_banner(self, wgt, lha_strategy, proc_charac=None): from_init = True if not from_init: - if group in grouped_cross: - grouped_cross[group] += self.allcross[i] - grouped_error[group] += self.error[i]**2 + if int(group) in grouped_cross: + grouped_cross[int(group)] += self.allcross[i] + grouped_error[int(group)] += self.error[i]**2 else: - grouped_cross[group] = self.allcross[i] - grouped_error[group] = self.error[i]**2 + grouped_cross[int(group)] = self.allcross[i] + grouped_error[int(group)] = self.error[i]**2 else: ban = banner_mod.Banner(ff.banner) for line in ban['init'].split('\n'): @@ -1048,11 +1048,11 @@ def define_init_banner(self, wgt, lha_strategy, proc_charac=None): if len(splitline)==4: cross, error, _, group = splitline if int(group) in grouped_cross: - grouped_cross[group] += float(cross) - grouped_error[group] += float(error)**2 + grouped_cross[int(group)] += float(cross) + grouped_error[int(group)] += float(error)**2 else: - grouped_cross[group] = float(cross) - grouped_error[group] = float(error)**2 + grouped_cross[int(group)] = float(cross) + grouped_error[int(group)] = float(error)**2 nb_group = len(grouped_cross) # compute the information for the first line @@ -1086,6 +1086,8 @@ def define_init_banner(self, wgt, lha_strategy, proc_charac=None): self.seek(0) if init_information["idbmup2"] in [0,9]: event = next(self) + if len(event) == 0: + event = Event(str(event)) init_information["idbmup2"] = event[1].pdg self.seek(0) @@ -2166,10 +2168,13 @@ def check(self): abspz += abs(particle.pz) # check mass fourmass = FourMomentum(particle).mass - - if particle.mass and (abs(particle.mass) - fourmass)/ abs(particle.mass) > threshold: - raise Exception( "Do not have correct mass lhe: %s momentum: %s (error at %s" % (particle.mass, fourmass, (abs(particle.mass) - fourmass)/ abs(particle.mass))) - + if particle.mass: + expected = (particle.E - math.sqrt(particle.E**2 -particle.mass**2))/particle.E + if expected > 1e-8: + mass_threshold = particle.E**2 - (particle.E-threshold)**2 + if (abs(particle.mass) - fourmass)/ mass_threshold > 5: + raise Exception( "Do not have correct mass lhe: %s momentum: %s (error at %s" % (particle.mass, fourmass, (abs(particle.mass) - fourmass)/ abs(particle.mass))) + if E/absE > threshold: logger.critical(self) @@ -2953,8 +2958,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..4d5597c722 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) @@ -2827,10 +2827,10 @@ def print_results_in_shell(self, data): logger.info(" Nb of events after matching/merging : %d" % int(data['nb_event_pythia'])) if self.run_card['use_syst'] in self.true and \ (int(self.run_card['ickkw'])==1 or self.run_card['ktdurham']>0.0 - or self.run_card['ptlund']>0.0): + or self.run_card['ptlund']>0.0) and data['cross_pythia'] == -1: logger.info(" Notice that because Systematics computation is turned on, the merging did not veto events but modified their weights instead.\n"+\ " The resulting hepmc/stdhep file should therefore be use with those weights.") - else: + elif data['cross_pythia'] == -1: logger.info(" Nb of events after merging : %s" % data['nb_event_pythia']) logger.info(" " ) @@ -3055,6 +3055,7 @@ def do_multi_run(self, line): crossoversig = 0 inv_sq_err = 0 nb_event = 0 + madspin = False for i in range(nb_run): self.nb_refine = 0 self.exec_cmd('generate_events %s_%s -f' % (main_name, i), postcmd=False) @@ -3067,6 +3068,8 @@ def do_multi_run(self, line): inv_sq_err+=1.0/error**2 self.results[main_name][-1]['cross'] = crossoversig/inv_sq_err self.results[main_name][-1]['error'] = math.sqrt(1.0/inv_sq_err) + if 'decayed' in self.run_name: + madspin = True self.results.def_current(main_name) self.run_name = main_name self.update_status("Merging LHE files", level='parton') @@ -3074,9 +3077,12 @@ def do_multi_run(self, line): os.mkdir(pjoin(self.me_dir,'Events', self.run_name)) except Exception: pass - os.system('%(bin)s/merge.pl %(event)s/%(name)s_*/unweighted_events.lhe.gz %(event)s/%(name)s/unweighted_events.lhe.gz %(event)s/%(name)s_banner.txt' + + os.system('%(bin)s/merge.pl %(event)s/%(name)s_*%(madspin)s/unweighted_events.lhe.gz %(event)s/%(name)s/unweighted_events.lhe.gz %(event)s/%(name)s_banner.txt' % {'bin': self.dirbin, 'event': pjoin(self.me_dir,'Events'), - 'name': self.run_name}) + 'name': self.run_name, + 'madspin': '_decayed_*' if madspin else '' + }) eradir = self.options['exrootanalysis_path'] if eradir and misc.is_executable(pjoin(eradir,'ExRootLHEFConverter')): @@ -3656,9 +3662,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'))) @@ -3757,6 +3765,8 @@ def split(a, n): k, m = divmod(len(a), n) return (a[i*k+min(i, m):(i+1)*k+min(i+1, m)] for i in range(n)) + Gdirs = self.remove_empty_events(Gdirs) + partials_info = [] if len(Gdirs) >= max_G: start_unweight= time.perf_counter() @@ -3786,7 +3796,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, @@ -4223,7 +4233,7 @@ def mg5amc_py8_interface_consistency_warning(options): return None - def setup_Pythia8RunAndCard(self, PY8_Card, run_type): + def setup_Pythia8RunAndCard(self, PY8_Card, run_type, use_mg5amc_py8_interface): """ Setup the Pythia8 Run environment and card. In particular all the process and run specific parameters of the card are automatically set here. This function returns the path where HEPMC events will be output, if any.""" @@ -4338,10 +4348,10 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): PY8_Card.systemSet('Beams:setProductionScalesFromLHEF',True) # Automatically set qWeed to xqcut if not defined by the user. - if PY8_Card['SysCalc:qWeed']==-1.0: + if use_mg5amc_py8_interface and PY8_Card['SysCalc:qWeed']==-1.0: PY8_Card.MadGraphSet('SysCalc:qWeed',self.run_card['xqcut'], force=True) - if PY8_Card['SysCalc:qCutList']=='auto': + if use_mg5amc_py8_interface and PY8_Card['SysCalc:qCutList']=='auto': if self.run_card['use_syst']: if self.run_card['sys_matchscale']=='auto': qcut = PY8_Card['JetMatching:qCut'] @@ -4368,7 +4378,7 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): # Specific MLM settings # PY8 should not implement the MLM veto since the driver should do it # if merging scale variation is turned on - if self.run_card['use_syst']: + if use_mg5amc_py8_interface and self.run_card['use_syst']: # We do no force it here, but it is clear that the user should know what # he's doing if he were to force it to True. PY8_Card.MadGraphSet('JetMatching:doVeto',False) @@ -4444,7 +4454,7 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): PY8_Card.MadGraphSet('SpaceShower:pTmaxMatch',1) PY8_Card.MadGraphSet('SpaceShower:rapidityOrder',False) # PY8 should not implement the CKKW veto since the driver should do it. - if self.run_card['use_syst']: + if use_mg5amc_py8_interface and self.run_card['use_syst']: # We do no force it here, but it is clear that the user should know what # he's doing if he were to force it to True. PY8_Card.MadGraphSet('Merging:applyVeto',False) @@ -4516,6 +4526,12 @@ def do_pythia8(self, line): else: no_default = False + if '--old_interface' in args: + use_mg5amc_py8_interface = True + args.remove('--old_interface') + else: + use_mg5amc_py8_interface = False + if not self.run_name: self.check_pythia8(args) self.configure_directory(html_opening =False) @@ -4545,20 +4561,27 @@ def do_pythia8(self, line): #"Please use 'event_norm = average' in the run_card to avoid this problem.") - - if not self.options['mg5amc_py8_interface_path'] or not \ - os.path.exists(pjoin(self.options['mg5amc_py8_interface_path'], - 'MG5aMC_PY8_interface')): - raise self.InvalidCmd( -"""The MG5aMC_PY8_interface tool cannot be found, so that MadEvent cannot steer Pythia8 shower. -Please install this tool with the following MG5_aMC command: - MG5_aMC> install mg5amc_py8_interface_path""") + if use_mg5amc_py8_interface: + if not self.options['mg5amc_py8_interface_path'] or not \ + os.path.exists(pjoin(self.options['mg5amc_py8_interface_path'], + 'MG5aMC_PY8_interface')): + raise self.InvalidCmd( + """The MG5aMC_PY8_interface tool cannot be found, so that MadEvent cannot steer Pythia8 shower. + Please install this tool with the following MG5_aMC command: + MG5_aMC> install mg5amc_py8_interface_path""") + else: + pythia_main = pjoin(self.options['mg5amc_py8_interface_path'], + 'MG5aMC_PY8_interface') + warnings = MadEventCmd.mg5amc_py8_interface_consistency_warning(self.options) + if warnings: + logger.warning(warnings) else: - pythia_main = pjoin(self.options['mg5amc_py8_interface_path'], - 'MG5aMC_PY8_interface') - warnings = MadEventCmd.mg5amc_py8_interface_consistency_warning(self.options) - if warnings: - logger.warning(warnings) + pythia_main = pjoin(self.options['pythia8_path'], 'share', 'Pythia8', 'examples', 'main164') + if not os.path.exists(pythia_main): + pythia_main = pjoin(self.options['pythia8_path'], 'examples', 'main164') + if not os.path.exists(pythia_main): + logger.warning('main164 not found (or not compiled). Will try the old interface instead.') + return self.do_pythia8(line + ' --old_interface') self.results.add_detail('run_mode', 'madevent') @@ -4583,14 +4606,19 @@ def do_pythia8(self, line): run_type = 'CKKW' # Edit the card and run environment according to the run specification - HepMC_event_output = self.setup_Pythia8RunAndCard(PY8_Card, run_type) + HepMC_event_output = self.setup_Pythia8RunAndCard(PY8_Card, run_type, use_mg5amc_py8_interface=use_mg5amc_py8_interface) + + if not use_mg5amc_py8_interface and self.options['run_mode']==0 or (self.options['run_mode']==2 and self.options['nb_core']==1): + PY8_Card['Main:numberOfEvents']= self.run_card['nevents'] + # Now write the card. pythia_cmd_card = pjoin(self.me_dir, 'Events', self.run_name , '%s_pythia8.cmd' % tag) cmd_card = StringIO.StringIO() PY8_Card.write(cmd_card,pjoin(self.me_dir,'Cards','pythia8_card_default.dat'), - direct_pythia_input=True) + direct_pythia_input=True, + use_mg5amc_py8_interface=use_mg5amc_py8_interface) # Now setup the preamble to make sure that everything will use the locally # installed tools (if present) even if the user did not add it to its @@ -4632,7 +4660,7 @@ def do_pythia8(self, line): " command '/usr/bin/env %s' exists and returns a valid path."%shell) exe_cmd = "#!%s\n%s"%(shell_exe,' '.join( - [preamble+pythia_main, + [preamble+pythia_main, '' if use_mg5amc_py8_interface else '-c', os.path.basename(pythia_cmd_card)])) wrapper.write(exe_cmd) @@ -4699,6 +4727,7 @@ def do_pythia8(self, line): n_cores = max(min(min_n_core,n_cores),1) if self.options['run_mode']==0 or (self.options['run_mode']==2 and self.options['nb_core']==1): + # No need for parallelization anymore self.cluster = None logger.info('Follow Pythia8 shower by running the '+ @@ -4744,20 +4773,22 @@ def do_pythia8(self, line): ParallelPY8Card.subruns[0].systemSet('Beams:LHEF','events.lhe.gz') ParallelPY8Card.write(pjoin(parallelization_dir,'PY8Card.dat'), pjoin(self.me_dir,'Cards','pythia8_card_default.dat'), - direct_pythia_input=True) + direct_pythia_input=True, + use_mg5amc_py8_interface=use_mg5amc_py8_interface) # Write the wrapper wrapper_path = pjoin(parallelization_dir,'run_PY8.sh') wrapper = open(wrapper_path,'w') if self.options['cluster_temp_path'] is None: exe_cmd = \ -"""#!%s -./%s PY8Card.dat >& PY8_log.txt -""" +"""#!%%s +./%%s %s PY8Card.dat >& PY8_log.txt +""" % ('' if use_mg5amc_py8_interface else '-c') + else: exe_cmd = \ -"""#!%s +"""#!%%s ln -s ./events_$1.lhe.gz ./events.lhe.gz -./%s PY8Card_$1.dat >& PY8_log.txt +./%%s %s PY8Card_$1.dat >& PY8_log.txt mkdir split_$1 if [ -f ./events.hepmc ]; then @@ -4776,7 +4807,7 @@ def do_pythia8(self, line): mv ./PY8_log.txt ./split_$1/ fi tar -czf split_$1.tar.gz split_$1 -""" +""" % ('' if use_mg5amc_py8_interface else '-c') exe_cmd = exe_cmd%(shell_exe,os.path.basename(pythia_main)) wrapper.write(exe_cmd) wrapper.close() @@ -4812,19 +4843,27 @@ def do_pythia8(self, line): pjoin(parallelization_dir,split_files[-1])) logger.info('Submitting Pythia8 jobs...') + for i, split_file in enumerate(split_files): # We must write a PY8Card tailored for each split so as to correct the normalization # HEPMCoutput:scaling of each weight since the lhe showered will not longer contain the # same original number of events - split_PY8_Card = banner_mod.PY8Card(pjoin(parallelization_dir,'PY8Card.dat')) + split_PY8_Card = banner_mod.PY8Card(pjoin(parallelization_dir,'PY8Card.dat'), setter='user') + assert split_PY8_Card['JetMatching:nJetMax'] == PY8_Card['JetMatching:nJetMax'] + + + # Make sure to sure the number of split_events determined during the splitting. - split_PY8_Card.systemSet('Main:numberOfEvents',partition_for_PY8[i]) + split_PY8_Card.systemSet('Main:numberOfEvents',partition_for_PY8[i], force=True) + assert split_PY8_Card['Main:numberOfEvents'] == partition_for_PY8[i] split_PY8_Card.systemSet('HEPMCoutput:scaling',split_PY8_Card['HEPMCoutput:scaling']* - (float(partition_for_PY8[i]))) + (float(partition_for_PY8[i])), force=True) # Add_missing set to False so as to be sure not to add any additional parameter w.r.t # the ones in the original PY8 param_card copied. split_PY8_Card.write(pjoin(parallelization_dir,'PY8Card_%d.dat'%i), - pjoin(parallelization_dir,'PY8Card.dat'), add_missing=False) + pjoin(parallelization_dir,'PY8Card.dat'), add_missing=False, + direct_pythia_input=True, + use_mg5amc_py8_interface=use_mg5amc_py8_interface) in_files = [pjoin(parallelization_dir,os.path.basename(pythia_main)), pjoin(parallelization_dir,'PY8Card_%d.dat'%i), pjoin(parallelization_dir,split_file)] @@ -5073,7 +5112,7 @@ def wait_monitoring(Idle, Running, Done): # works both for fixed number of generated events and fixed accepted events self.results.add_detail('error_pythia', error_m) - if self.run_card['use_syst']: + if self.run_card['use_syst'] and use_mg5amc_py8_interface: self.results.add_detail('cross_pythia', -1) self.results.add_detail('error_pythia', 0) @@ -6132,7 +6171,102 @@ def get_Gdir(self, Pdir=None, symfact=None): mfactors[pjoin(P, "G%s" % tag)] = mfactor self.Gdirs = (Gdirs, mfactors) return self.get_Gdir(Pdir, symfact=symfact) + + ############################################################################ + def remove_empty_events(self, Gdir): + """return Gdir strip from the one providing empty events.lhe files.""" + + reasons = collections.defaultdict(list) + Gdirs = Gdir[:] + for G in Gdirs[:]: + try: + size = os.path.getsize(pjoin(G, 'events.lhe')) + except Exception as error: + size = 0 + if size <10: + Gdirs.remove(G) + try: + log = misc.BackRead(pjoin(G, 'log.txt')) + except Exception as error: + log = misc.BackRead(pjoin(G, 'run1_app.log')) + found = -1 + for line in log: + if 'Deleting file events.lhe' in line: + found = 0 + elif "Impossible BW configuration" in line: + reasons['bwconfig'].append(G) + break + elif found < -150: + reasons['not found'].append(G) + Gdirs.append(G) + break + elif found < 0: + found -= 1 + elif 'Loosen cuts or increase max_events' in line: + reasons['cuts'].append(G) + break + elif 'all returned zero' in line: + reasons['zero'].append(G) + break + elif found > 5: + reasons['unknown'].append(G) + break + else: + found += 1 + + if len(reasons): + logger.debug('Reasons for empty events.lhe:') + if len(reasons['unknown']): + logger.debug(' - unknown: %s' % len(reasons['unknown'])) + logger.log(10, ' DETAIL:' + ','.join(['/'.join(G.rsplit(os.sep)[-2:]) for G in reasons['unknown'][:10]])) + if len(reasons['not found']): + logger.debug(' - not found in log: %s' % len(reasons['not found'])) + logger.log(10, ' DETAIL:' + ','.join(['/'.join(G.rsplit(os.sep)[-2:]) for G in reasons['not found'][:10]])) + if len(reasons['zero']): + logger.debug(' - zero amplitudes: %s' % len(reasons['zero'])) + logger.log(10, ' DETAIL:' + ','.join(['/'.join(G.rsplit( os.sep)[-2:]) for G in reasons['zero'][:10]])) + if len(reasons['bwconfig']): + critical_bwconfig = set() + for G in reasons['bwconfig']: + base = G.rsplit('.',1)[0] + if any(G2.startswith(base) for G2 in Gdirs): + continue + else: + critical_bwconfig.add(os.sep.join(base.rsplit(os.sep)[-2:])) + for G in critical_bwconfig: + logger.warning('Gdirectory %s has no events.lhe file. (no BW config found %s times)' % G) + + logger.debug(' - impossible BW configuration: %s' % len(reasons['bwconfig'])) + logger.debug(' - channel with no possible BW configuration: %s' % len(critical_bwconfig)) + + if len(reasons['cuts']): + critical_nb_cuts = collections.defaultdict(int) + for G in reasons['cuts']: + if '.' in os.path.basename(G): + base = G.rsplit('.',1)[0] + if any(G2.startswith(base) for G2 in Gdirs): + continue + else: + critical_nb_cuts[os.sep.join(base.rsplit(os.sep)[-2:])] += 1 + else: + critical_nb_cuts[''] += 1 + logger.warning('Gdirectory %s has no events.lhe file. (no points passed cuts found)' % G) + for G, nb in critical_nb_cuts.items(): + if not G: + continue + else: + logger.warning('%s channel %s.XXX has no events.lhe file. (no points passed cuts). No %s with events detected' % (nb, G, G)) + logger.debug(' - no points passed cuts: %s' % len(reasons['cuts'])) + logger.log(10, ' DETAIL:' + ','.join(['/'.join(G.rsplit(os.sep)[-2:]) for G in reasons['cuts'][:10]])) + logger.debug(' - without any BW handling (critical): %s' % critical_nb_cuts['']) + logger.debug(' - with BW but all zero (critical): %s' % sum([nb for v, nb in critical_nb_cuts.items() if v!=''], 0)) + #logger.debug(' - cuts (with BW conflict where other channel contributes): %s' % (len(reasons['cuts'])- critical_nb_cuts)) + + + return Gdirs + + ############################################################################ def set_run_name(self, name, tag=None, level='parton', reload_card=False, allow_new_tag=True): @@ -6749,7 +6883,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 +6893,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 +7010,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 +7038,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 +7053,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 +7065,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 +7190,13 @@ 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) 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 +7210,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..fe602c5b80 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.3, 2025-06-12 // 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..1f9fb6d469 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.3, 2025-06-12 // 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..505c8839b3 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== diff --git a/epochX/cudacpp/pp_tt012j.mad/test/cudacpp_test.mk b/epochX/cudacpp/pp_tt012j.mad/test/cudacpp_test.mk index f703a1ae7c..4934c9a53f 100644 --- a/epochX/cudacpp/pp_tt012j.mad/test/cudacpp_test.mk +++ b/epochX/cudacpp/pp_tt012j.mad/test/cudacpp_test.mk @@ -19,7 +19,7 @@ CXXFLAGS += -Igoogletest/googletest/include/ -std=c++11 all: googletest/$(INSTALLDIR)/lib64/libgtest.a googletest/CMakeLists.txt: - git clone https://github.com/google/googletest.git -b release-1.11.0 googletest + git clone https://github.com/google/googletest.git -b v1.17.0 googletest googletest/$(BUILDDIR)/Makefile: googletest/CMakeLists.txt mkdir -p googletest/$(BUILDDIR) diff --git a/epochX/cudacpp/runCodegen.sh b/epochX/cudacpp/runCodegen.sh index 83ef0f3410..d2ca13ed74 100755 --- a/epochX/cudacpp/runCodegen.sh +++ b/epochX/cudacpp/runCodegen.sh @@ -96,7 +96,7 @@ for process in ${PROCESSES}; do process_tmp=${process%/*}_gen processFile_tmp=$(mktemp /tmp/mg5_XXXXXXX) echo "Generating ${process} into ${process_tmp} ..." - sed -E "s/(output [[:graph:]]+) [[:graph:]]+ (.*)/\1 ${process_tmp} \2/" < ${ProcessFile} | tee ${processFile_tmp} + sed -E "s/(output [[:graph:]]+) [[:graph:]]+\s*?(.*)/\1 ${process_tmp} \2/" < ${ProcessFile} | tee ${processFile_tmp} echo "" ${mg5} < ${processFile_tmp} || { echo -e "\n\nError generating ${process}"; exit 1; } 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..5d9b07615b 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/Cards/ident_card.dat +++ b/epochX/cudacpp/smeft_gg_tttt.mad/Cards/ident_card.dat @@ -2,424 +2,424 @@ ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c written by the UFO converter ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc +mass 1 mdl_MD +mass 2 mdl_MU +mass 3 mdl_MS +mass 4 mdl_MC +mass 5 mdl_MB +mass 6 mdl_MT +mass 11 mdl_Me +mass 13 mdl_MMU +mass 15 mdl_MTA +mass 23 mdl_MZ +mass 25 mdl_MH +smeft 1 mdl_cG +smeft 2 mdl_cW +smeft 3 mdl_cH +smeft 4 mdl_cHbox +smeft 5 mdl_cHDD +smeft 6 mdl_cHG +smeft 7 mdl_cHW +smeft 8 mdl_cHB +smeft 9 mdl_cHWB +smeft 10 mdl_cuHRe +smeft 11 mdl_ctHRe +smeft 12 mdl_cdHRe +smeft 13 mdl_cbHRe +smeft 14 mdl_cuGRe +smeft 15 mdl_ctGRe +smeft 16 mdl_cuWRe +smeft 17 mdl_ctWRe +smeft 18 mdl_cuBRe +smeft 19 mdl_ctBRe +smeft 20 mdl_cdGRe +smeft 21 mdl_cbGRe +smeft 22 mdl_cdWRe +smeft 23 mdl_cbWRe +smeft 24 mdl_cdBRe +smeft 25 mdl_cbBRe +smeft 26 mdl_cHj1 +smeft 27 mdl_cHQ1 +smeft 28 mdl_cHj3 +smeft 29 mdl_cHQ3 +smeft 30 mdl_cHu +smeft 31 mdl_cHt +smeft 32 mdl_cHd +smeft 33 mdl_cHbq +smeft 34 mdl_cHudRe +smeft 35 mdl_cHtbRe +smeft 36 mdl_cjj11 +smeft 37 mdl_cjj18 +smeft 38 mdl_cjj31 +smeft 39 mdl_cjj38 +smeft 40 mdl_cQj11 +smeft 41 mdl_cQj18 +smeft 42 mdl_cQj31 +smeft 43 mdl_cQj38 +smeft 44 mdl_cQQ1 +smeft 45 mdl_cQQ8 +smeft 46 mdl_cuu1 +smeft 47 mdl_cuu8 +smeft 48 mdl_ctt +smeft 49 mdl_ctu1 +smeft 50 mdl_ctu8 +smeft 51 mdl_cdd1 +smeft 52 mdl_cdd8 +smeft 53 mdl_cbb +smeft 54 mdl_cbd1 +smeft 55 mdl_cbd8 +smeft 56 mdl_cud1 +smeft 57 mdl_ctb1 +smeft 58 mdl_ctd1 +smeft 59 mdl_cbu1 +smeft 60 mdl_cud8 +smeft 61 mdl_ctb8 +smeft 62 mdl_ctd8 +smeft 63 mdl_cbu8 +smeft 64 mdl_cutbd1Re +smeft 65 mdl_cutbd8Re +smeft 66 mdl_cju1 +smeft 67 mdl_cQu1 +smeft 68 mdl_cju8 +smeft 69 mdl_cQu8 +smeft 70 mdl_ctj1 +smeft 71 mdl_ctj8 +smeft 72 mdl_cQt1 +smeft 73 mdl_cQt8 +smeft 74 mdl_cjd1 +smeft 75 mdl_cjd8 +smeft 76 mdl_cQd1 +smeft 77 mdl_cQd8 +smeft 78 mdl_cbj1 +smeft 79 mdl_cbj8 +smeft 80 mdl_cQb1 +smeft 81 mdl_cQb8 +smeft 82 mdl_cjQtu1Re +smeft 83 mdl_cjQtu8Re +smeft 84 mdl_cjQbd1Re +smeft 85 mdl_cjQbd8Re +smeft 86 mdl_cjujd1Re +smeft 87 mdl_cjujd8Re +smeft 88 mdl_cjujd11Re +smeft 89 mdl_cjujd81Re +smeft 90 mdl_cQtjd1Re +smeft 91 mdl_cQtjd8Re +smeft 92 mdl_cjuQb1Re +smeft 93 mdl_cjuQb8Re +smeft 94 mdl_cQujb1Re +smeft 95 mdl_cQujb8Re +smeft 96 mdl_cjtQd1Re +smeft 97 mdl_cjtQd8Re +smeft 98 mdl_cQtQb1Re +smeft 99 mdl_cQtQb8Re +smeft 100 mdl_ceHRe +smeft 101 mdl_ceWRe +smeft 102 mdl_ceBRe +smeft 103 mdl_cHl1 +smeft 104 mdl_cHl3 +smeft 105 mdl_cHe +smeft 106 mdl_cll +smeft 107 mdl_cll1 +smeft 108 mdl_clj1 +smeft 109 mdl_clj3 +smeft 110 mdl_cQl1 +smeft 111 mdl_cQl3 +smeft 112 mdl_cee +smeft 113 mdl_ceu +smeft 114 mdl_cte +smeft 115 mdl_ced +smeft 116 mdl_cbe +smeft 117 mdl_cje +smeft 118 mdl_cQe +smeft 119 mdl_clu +smeft 120 mdl_ctl +smeft 121 mdl_cld +smeft 122 mdl_cbl +smeft 123 mdl_cle +smeft 124 mdl_cledjRe +smeft 125 mdl_clebQRe +smeft 126 mdl_cleju1Re +smeft 127 mdl_cleQt1Re +smeft 128 mdl_cleju3Re +smeft 129 mdl_cleQt3Re +smeftcpv 1 mdl_cGtil +smeftcpv 2 mdl_cWtil +smeftcpv 3 mdl_cHGtil +smeftcpv 4 mdl_cHWtil +smeftcpv 5 mdl_cHBtil +smeftcpv 6 mdl_cHWBtil +smeftcpv 7 mdl_cuGIm +smeftcpv 8 mdl_ctGIm +smeftcpv 9 mdl_cuWIm +smeftcpv 10 mdl_ctWIm +smeftcpv 11 mdl_cuBIm +smeftcpv 12 mdl_ctBIm +smeftcpv 13 mdl_cdGIm +smeftcpv 14 mdl_cbGIm +smeftcpv 15 mdl_cdWIm +smeftcpv 16 mdl_cbWIm +smeftcpv 17 mdl_cdBIm +smeftcpv 18 mdl_cbBIm +smeftcpv 19 mdl_cuHIm +smeftcpv 20 mdl_ctHIm +smeftcpv 21 mdl_cdHIm +smeftcpv 22 mdl_cbHIm +smeftcpv 23 mdl_cHudIm +smeftcpv 24 mdl_cHtbIm +smeftcpv 25 mdl_cutbd1Im +smeftcpv 26 mdl_cutbd8Im +smeftcpv 27 mdl_cjQtu1Im +smeftcpv 28 mdl_cjQtu8Im +smeftcpv 29 mdl_cjQbd1Im +smeftcpv 30 mdl_cjQbd8Im +smeftcpv 31 mdl_cjujd1Im +smeftcpv 32 mdl_cjujd8Im +smeftcpv 33 mdl_cjujd11Im +smeftcpv 34 mdl_cjujd81Im +smeftcpv 35 mdl_cQtjd1Im +smeftcpv 36 mdl_cQtjd8Im +smeftcpv 37 mdl_cjuQb1Im +smeftcpv 38 mdl_cjuQb8Im +smeftcpv 39 mdl_cQujb1Im +smeftcpv 40 mdl_cQujb8Im +smeftcpv 41 mdl_cjtQd1Im +smeftcpv 42 mdl_cjtQd8Im +smeftcpv 43 mdl_cQtQb1Im +smeftcpv 44 mdl_cQtQb8Im +smeftcpv 45 mdl_ceHIm +smeftcpv 46 mdl_ceWIm +smeftcpv 47 mdl_ceBIm +smeftcpv 48 mdl_cledjIm +smeftcpv 49 mdl_clebQIm +smeftcpv 50 mdl_cleju1Im +smeftcpv 51 mdl_cleju3Im +smeftcpv 52 mdl_cleQt1Im +smeftcpv 53 mdl_cleQt3Im +smeftcutoff 1 mdl_LambdaSMEFT +sminputs 1 mdl_MW +sminputs 2 mdl_Gf +sminputs 3 aS +switches 1 mdl_linearPropCorrections +yukawa 1 mdl_ymdo +yukawa 2 mdl_ymup +yukawa 3 mdl_yms +yukawa 4 mdl_ymc +yukawa 5 mdl_ymb +yukawa 6 mdl_ymt +yukawa 11 mdl_yme +yukawa 13 mdl_ymm +yukawa 15 mdl_ymtau - - +decay 6 mdl_WT decay 23 mdl_WZ + decay 24 mdl_WW + decay 25 mdl_WH -decay 6 mdl_WT -mass 11 mdl_Me -mass 13 mdl_MMU -mass 15 mdl_MTA -mass 1 mdl_MD -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 100 mdl_ceHRe -smeft 101 mdl_ceWRe -smeft 102 mdl_ceBRe -smeft 103 mdl_cHl1 -smeft 104 mdl_cHl3 -smeft 105 mdl_cHe -smeft 106 mdl_cll -smeft 107 mdl_cll1 -smeft 108 mdl_clj1 -smeft 109 mdl_clj3 -smeft 10 mdl_cuHRe -smeft 110 mdl_cQl1 -smeft 111 mdl_cQl3 -smeft 112 mdl_cee -smeft 113 mdl_ceu -smeft 114 mdl_cte -smeft 115 mdl_ced -smeft 116 mdl_cbe -smeft 117 mdl_cje -smeft 118 mdl_cQe -smeft 119 mdl_clu -smeft 11 mdl_ctHRe -smeft 120 mdl_ctl -smeft 121 mdl_cld -smeft 122 mdl_cbl -smeft 123 mdl_cle -smeft 124 mdl_cledjRe -smeft 125 mdl_clebQRe -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 -smeft 16 mdl_cuWRe -smeft 17 mdl_ctWRe -smeft 18 mdl_cuBRe -smeft 19 mdl_ctBRe -smeft 1 mdl_cG -smeft 20 mdl_cdGRe -smeft 21 mdl_cbGRe -smeft 22 mdl_cdWRe -smeft 23 mdl_cbWRe -smeft 24 mdl_cdBRe -smeft 25 mdl_cbBRe -smeft 26 mdl_cHj1 -smeft 27 mdl_cHQ1 -smeft 28 mdl_cHj3 -smeft 29 mdl_cHQ3 -smeft 2 mdl_cW -smeft 30 mdl_cHu -smeft 31 mdl_cHt -smeft 32 mdl_cHd -smeft 33 mdl_cHbq -smeft 34 mdl_cHudRe -smeft 35 mdl_cHtbRe -smeft 36 mdl_cjj11 -smeft 37 mdl_cjj18 -smeft 38 mdl_cjj31 -smeft 39 mdl_cjj38 -smeft 3 mdl_cH -smeft 40 mdl_cQj11 -smeft 41 mdl_cQj18 -smeft 42 mdl_cQj31 -smeft 43 mdl_cQj38 -smeft 44 mdl_cQQ1 -smeft 45 mdl_cQQ8 -smeft 46 mdl_cuu1 -smeft 47 mdl_cuu8 -smeft 48 mdl_ctt -smeft 49 mdl_ctu1 -smeft 4 mdl_cHbox -smeft 50 mdl_ctu8 -smeft 51 mdl_cdd1 -smeft 52 mdl_cdd8 -smeft 53 mdl_cbb -smeft 54 mdl_cbd1 -smeft 55 mdl_cbd8 -smeft 56 mdl_cud1 -smeft 57 mdl_ctb1 -smeft 58 mdl_ctd1 -smeft 59 mdl_cbu1 -smeft 5 mdl_cHDD -smeft 60 mdl_cud8 -smeft 61 mdl_ctb8 -smeft 62 mdl_ctd8 -smeft 63 mdl_cbu8 -smeft 64 mdl_cutbd1Re -smeft 65 mdl_cutbd8Re -smeft 66 mdl_cju1 -smeft 67 mdl_cQu1 -smeft 68 mdl_cju8 -smeft 69 mdl_cQu8 -smeft 6 mdl_cHG -smeft 70 mdl_ctj1 -smeft 71 mdl_ctj8 -smeft 72 mdl_cQt1 -smeft 73 mdl_cQt8 -smeft 74 mdl_cjd1 -smeft 75 mdl_cjd8 -smeft 76 mdl_cQd1 -smeft 77 mdl_cQd8 -smeft 78 mdl_cbj1 -smeft 79 mdl_cbj8 -smeft 7 mdl_cHW -smeft 80 mdl_cQb1 -smeft 81 mdl_cQb8 -smeft 82 mdl_cjQtu1Re -smeft 83 mdl_cjQtu8Re -smeft 84 mdl_cjQbd1Re -smeft 85 mdl_cjQbd8Re -smeft 86 mdl_cjujd1Re -smeft 87 mdl_cjujd8Re -smeft 88 mdl_cjujd11Re -smeft 89 mdl_cjujd81Re -smeft 8 mdl_cHB -smeft 90 mdl_cQtjd1Re -smeft 91 mdl_cQtjd8Re -smeft 92 mdl_cjuQb1Re -smeft 93 mdl_cjuQb8Re -smeft 94 mdl_cQujb1Re -smeft 95 mdl_cQujb8Re -smeft 96 mdl_cjtQd1Re -smeft 97 mdl_cjtQd8Re -smeft 98 mdl_cQtQb1Re -smeft 99 mdl_cQtQb8Re -smeft 9 mdl_cHWB -smeftcpv 10 mdl_ctWIm -smeftcpv 11 mdl_cuBIm -smeftcpv 12 mdl_ctBIm -smeftcpv 13 mdl_cdGIm -smeftcpv 14 mdl_cbGIm -smeftcpv 15 mdl_cdWIm -smeftcpv 16 mdl_cbWIm -smeftcpv 17 mdl_cdBIm -smeftcpv 18 mdl_cbBIm -smeftcpv 19 mdl_cuHIm -smeftcpv 1 mdl_cGtil -smeftcpv 20 mdl_ctHIm -smeftcpv 21 mdl_cdHIm -smeftcpv 22 mdl_cbHIm -smeftcpv 23 mdl_cHudIm -smeftcpv 24 mdl_cHtbIm -smeftcpv 25 mdl_cutbd1Im -smeftcpv 26 mdl_cutbd8Im -smeftcpv 27 mdl_cjQtu1Im -smeftcpv 28 mdl_cjQtu8Im -smeftcpv 29 mdl_cjQbd1Im -smeftcpv 2 mdl_cWtil -smeftcpv 30 mdl_cjQbd8Im -smeftcpv 31 mdl_cjujd1Im -smeftcpv 32 mdl_cjujd8Im -smeftcpv 33 mdl_cjujd11Im -smeftcpv 34 mdl_cjujd81Im -smeftcpv 35 mdl_cQtjd1Im -smeftcpv 36 mdl_cQtjd8Im -smeftcpv 37 mdl_cjuQb1Im -smeftcpv 38 mdl_cjuQb8Im -smeftcpv 39 mdl_cQujb1Im -smeftcpv 3 mdl_cHGtil -smeftcpv 40 mdl_cQujb8Im -smeftcpv 41 mdl_cjtQd1Im -smeftcpv 42 mdl_cjtQd8Im -smeftcpv 43 mdl_cQtQb1Im -smeftcpv 44 mdl_cQtQb8Im -smeftcpv 45 mdl_ceHIm -smeftcpv 46 mdl_ceWIm -smeftcpv 47 mdl_ceBIm -smeftcpv 48 mdl_cledjIm -smeftcpv 49 mdl_clebQIm -smeftcpv 4 mdl_cHWtil -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 -smeftcpv 9 mdl_cuWIm -smeftcutoff 1 mdl_LambdaSMEFT -sminputs 1 mdl_MW -sminputs 2 mdl_Gf -sminputs 3 aS -switches 1 mdl_linearPropCorrections -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 -yukawa 5 mdl_ymb -yukawa 6 mdl_ymt 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..fa8d3481a2 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 = /home/dmass/Development/madgraph4gpu/amd-ci/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo +mg5_path = /home/dmass/Development/madgraph4gpu/amd-ci/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..154c7da222 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.3 2025-06-12 * #* * #* WARNING: UNKNOWN DEVELOPMENT VERSION. * #* WARNING: DO NOT USE FOR PRODUCTION * @@ -35,17 +35,19 @@ set loop_color_flows False set max_npoint_for_channel 0 set default_unset_couplings 99 set max_t_for_channel 99 +set zerowidth_tchannel True set nlo_mixed_expansion True -set stdout_level DEBUG -set zerowidth_tchannel F -set auto_convert_model T -import model SMEFTsim_topU3l_MwScheme_UFO -massless_4t +import model sm define p = g u c d s u~ c~ d~ s~ define j = g u c d s u~ c~ d~ s~ define l+ = e+ mu+ define l- = e- mu- define vl = ve vm vt define vl~ = ve~ vm~ vt~ +set stdout_level DEBUG +set zerowidth_tchannel F +set auto_convert_model T +import model SMEFTsim_topU3l_MwScheme_UFO -massless_4t generate g g > t t~ t t~ -output madevent_simd ../TMPOUT/CODEGEN_mad_smeft_gg_tttt --hel_recycli\ -ng=False --vector_size=32 +output madevent_simd smeft_gg_tttt.mad_gen --hel_recycling=False --vec\ +tor_size=32 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..85e1d39035 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/Cards/run_card.dat +++ b/epochX/cudacpp/smeft_gg_tttt.mad/Cards/run_card.dat @@ -92,11 +92,11 @@ #********************************************************************* # Compilation flag. #********************************************************************* - -O3 -ffast-math -fbounds-check = global_flag ! build flags for all Fortran code (for a fair comparison to cudacpp; default is -O) + -O = global_flag ! fortran optimization flag use for the all code. --fast-math = aloha_flag ! fortran optimization flag for aloha function. Suggestions: '-ffast-math' -O3 = matrix_flag ! fortran optimization flag for matrix.f function. Suggestions: '-O3' - 32 = vector_size ! size of fortran arrays allocated in the multi-event API for SIMD/GPU (VECSIZE_MEMMAX) - 512 = nb_warp ! total number of warp/frontwave + 16 = vector_size ! size of fortran arrays allocated in the multi-event API for SIMD/GPU (VECSIZE_MEMMAX) + 1 = nb_warp ! total number of warp/frontwave #********************************************************************* # Customization (custom cuts/scale/bias/...) * @@ -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..1ac53bb4bd 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.3 \ No newline at end of file diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/Source/.make_opts b/epochX/cudacpp/smeft_gg_tttt.mad/Source/.make_opts index de3864242b..56ba259c56 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/Source/.make_opts +++ b/epochX/cudacpp/smeft_gg_tttt.mad/Source/.make_opts @@ -102,6 +102,7 @@ endif ifneq ($(lhapdf),) CXXFLAGS += $(shell $(lhapdf) --cppflags) alfas_functions=alfas_functions_lhapdf + alfas_to_clean=alfas_functions.o llhapdf+= $(shell $(lhapdf) --cflags --libs) -lLHAPDF # check if we need to activate c++11 (for lhapdf6.2) ifeq ($(origin CXX),default) @@ -113,10 +114,11 @@ ifneq ($(lhapdf),) endif else alfas_functions=alfas_functions + alfas_to_clean=alfas_functions_lhapdf.o llhapdf= endif # Helper function to check MG5 version define CHECK_MG5AMC_VERSION python -c 'import re; from distutils.version import StrictVersion; print StrictVersion("$(MG5AMC_VERSION)") >= StrictVersion("$(1)") if re.match("^[\d\.]+$$","$(MG5AMC_VERSION)") else True;' -endef \ No newline at end of file +endef 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..bdf427601f 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/Source/make_opts +++ b/epochX/cudacpp/smeft_gg_tttt.mad/Source/make_opts @@ -1,12 +1,11 @@ DEFAULT_CPP_COMPILER=g++ -DEFAULT_F2PY_COMPILER=f2py3 -DEFAULT_F_COMPILER=gfortran -GLOBAL_FLAG=-O3 -ffast-math -fbounds-check MACFLAG= +STDLIB=-lstdc++ +STDLIB_FLAG= +DEFAULT_F2PY_COMPILER=f2py +DEFAULT_F_COMPILER=gfortran MG5AMC_VERSION=SpecifiedByMG5aMCAtRunTime PYTHIA8_PATH=NotInstalled -STDLIB_FLAG= -STDLIB=-lstdc++ #end_of_make_opts_variables BIASLIBDIR=../../../lib/ @@ -103,6 +102,7 @@ endif ifneq ($(lhapdf),) CXXFLAGS += $(shell $(lhapdf) --cppflags) alfas_functions=alfas_functions_lhapdf +alfas_to_clean=alfas_functions.o llhapdf+= $(shell $(lhapdf) --cflags --libs) -lLHAPDF # check if we need to activate c++11 (for lhapdf6.2) ifeq ($(origin CXX),default) @@ -114,6 +114,7 @@ endif endif else alfas_functions=alfas_functions +alfas_to_clean=alfas_functions_lhapdf.o llhapdf= endif diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/Source/makefile b/epochX/cudacpp/smeft_gg_tttt.mad/Source/makefile index 291ca907ee..87a9e61723 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/Source/makefile +++ b/epochX/cudacpp/smeft_gg_tttt.mad/Source/makefile @@ -37,10 +37,12 @@ all: $(LIBRARIES) $(LIBDIR)libdhelas.$(libext) $(LIBDIR)libpdf.$(libext) $(LIBDI $(LIBDIR)libdsample.$(libext): $(DSAMPLE) $(call CREATELIB, $@, $^) $(LIBDIR)libgeneric.$(libext): $(GENERIC) + rm -f $@ 2>/dev/null $(call CREATELIB, $@, $^) + rm -f $(alfas_to_clean) 2>/dev/null $(LIBDIR)libdhelas.$(libext): DHELAS cd DHELAS; make; cd .. -$(LIBDIR)libpdf.$(libext): PDF make_opts +$(LIBDIR)libpdf.$(libext): PDF $(alfas_functions).o cd PDF; make; cd .. ifneq (,$(filter edff chff, $(pdlabel1) $(pdlabel2))) $(LIBDIR)libgammaUPC.$(libext): PDF/gammaUPC @@ -73,6 +75,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/vector.inc b/epochX/cudacpp/smeft_gg_tttt.mad/Source/vector.inc index ba125272b6..9d8b377aa7 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/Source/vector.inc +++ b/epochX/cudacpp/smeft_gg_tttt.mad/Source/vector.inc @@ -30,6 +30,8 @@ C INTEGER WARP_SIZE PARAMETER (WARP_SIZE=32) INTEGER NB_WARP - PARAMETER (NB_WARP=512) + PARAMETER (NB_WARP=1) INTEGER VECSIZE_MEMMAX - PARAMETER (VECSIZE_MEMMAX=16384) + PARAMETER (VECSIZE_MEMMAX=32) + + 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..1ac53bb4bd 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.3 \ 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/P1_gg_ttxttx/CPPProcess.cc b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/P1_gg_ttxttx/CPPProcess.cc index 96d77e5403..a0f064a4d0 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -1639,7 +1639,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- 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..dcd3e81434 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.3, 2025-06-12 // 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..95e59c2089 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.3, 2025-06-12 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..b046c442e3 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.3, 2025-06-12 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.3, 2025-06-12 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 @@ -484,6 +488,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C Generate events only if IMODE is 0. IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN C Call UNWGT to unweight and store events + ICONFIG = CHANNELS(IVEC) CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) ENDIF diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/P1_gg_ttxttx/driver.f b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/P1_gg_ttxttx/driver.f index f7f23196eb..fc9392238e 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/P1_gg_ttxttx/driver.f +++ b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/P1_gg_ttxttx/driver.f @@ -489,7 +489,6 @@ subroutine open_file_local(lun,filename,fopened) fopened=.false. tempname=filename fine=index(tempname,' ') -c fine2=index(path,' ')-1 ! AV remove valgrind "Conditional jump or move depends on uninitialised value(s)" if(fine.eq.0) fine=len(tempname) open(unit=lun,file=tempname,status='old',ERR=20) fopened=.true. 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..a833594d67 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.3, 2025-06-12 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.3, 2025-06-12 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,111 +442,44 @@ 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 C ---------- IF (FIRST) THEN FIRST=.FALSE. - IF(ZERO.NE.0D0) FK_ZERO = SIGN(MAX(ABS(ZERO), ABS(ZERO - $ *SMALL_WIDTH_TREATMENT)), ZERO) - IF(MDL_WT.NE.0D0) FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT - $ *SMALL_WIDTH_TREATMENT)), MDL_WT) + FK_ZERO = 0D0 + IF(MDL_WT.NE.0D0) THEN + FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT + $ *SMALL_WIDTH_TREATMENT)), MDL_WT) + ELSE + FK_MDL_WT = 0D0 + ENDIF + IF(INIT_MODE) THEN ZEROAMP_1(:,:) = .TRUE. @@ -910,10 +844,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 +858,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/addmothers.f b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/addmothers.f index 9a31ed201d..6f32477b9e 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/addmothers.f +++ b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/addmothers.f @@ -21,7 +21,7 @@ subroutine addmothers(ip,jpart,pb,isym,jsym,rscale,aqcd,aqed,buff, integer icol ! color selected integer isym(nexternal,99), jsym - integer i,j,k,ida(2),ns,nres,ires,icl,ito2,idenpart,nc,ic + integer i,j,k,ida(2),ns,nres,ires,icl,ito2,idenpart,ic integer mo_color,da_color(2),itmp integer ito(-nexternal+3:nexternal),iseed,maxcolor,maxorg integer icolalt(2,-nexternal+2:2*nexternal-3) @@ -113,14 +113,15 @@ subroutine addmothers(ip,jpart,pb,isym,jsym,rscale,aqcd,aqed,buff, endif lconfig = vec_igraph1(ivec) endif - + is_LC=.true. + maxcolor=0 c c Choose a color flow which is certain to work with the propagator c structure of the chosen diagram and use that as an alternative c if (icol.eq.0) then do i=1,nexternal - icolalt(1,i)=0 + icolalt(1,i)=0 icolalt(2,i)=0 enddo else diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/cluster.f b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/cluster.f index b8995283ed..907894ea89 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/cluster.f +++ b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/cluster.f @@ -556,6 +556,8 @@ logical function cluster(p, ivec) jwin = 0 cluster=.false. clustered=.false. + iwin =0 + jwin =0 do i=0,3 pcmsp(i)=0 enddo @@ -665,8 +667,11 @@ logical function cluster(p, ivec) c initialize graph storage igraphs(0)=0 nleft=nexternal -c cluster - if (iwin.eq.0.or.jwin.eq.0) stop 21 + if(iwin.eq.0.or.jwin.eq.0)then + cluster=.false. + return + endif +c cluster do n=1,nexternal-2 c combine winner imocl(n)=imap(iwin,2)+imap(jwin,2) diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/cudacpp.mk index 20d8ded718..20b8e6b858 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/cudacpp.mk @@ -114,7 +114,7 @@ export CXXFLAGS override CUDA_HOME = $(patsubst %/bin/nvcc,%,$(shell which nvcc 2>/dev/null)) # Set HIP_HOME from the path to hipcc, if it exists -override HIP_HOME = $(patsubst %/bin/hipcc,%,$(shell which hipcc 2>/dev/null)) +override HIP_HOME = $(shell hipconfig --rocmpath) # Configure CUDA_INC (for CURAND and NVTX) and NVTX if a CUDA installation exists (see #965) ifeq ($(CUDA_HOME),) @@ -229,6 +229,8 @@ ifeq ($(BACKEND),cuda) else ifeq ($(BACKEND),hip) + # example architecture values MI200:gfx90a, MI350X:gfx942 + MADGRAPH_HIP_ARCHITECTURE ?= gfx942 # Set GPUCC as $(HIP_HOME)/bin/hipcc (it was already checked above that this exists) GPUCC = $(HIP_HOME)/bin/hipcc XCOMPILERFLAG = @@ -243,7 +245,7 @@ else ifeq ($(BACKEND),hip) ###GPUFLAGS += -ggdb # FOR DEBUGGING ONLY # AMD HIP architecture flags - GPUARCHFLAGS = --offload-arch=gfx90a + GPUARCHFLAGS = --offload-arch=${MADGRAPH_HIP_ARCHITECTURE} GPUFLAGS += $(GPUARCHFLAGS) # Other AMD-specific flags @@ -878,7 +880,7 @@ endif $(gpu_fcheckmain): LIBFLAGS += $(GPULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH $(gpu_fcheckmain): $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBDIR)/lib$(MG5AMC_GPULIB).so $(gpu_objects_exe) ifneq ($(findstring hipcc,$(GPUCC)),) # link fortran/c++/hip using $FC when hipcc is used #802 - $(FC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) -lstdc++ -L$(shell cd -L $(shell dirname $(shell $(GPUCC) -print-prog-name=clang))/../..; pwd)/lib -lamdhip64 + $(FC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) -lstdc++ -L$(HIP_HOME)/lib -lamdhip64 else $(GPUCC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) endif @@ -979,7 +981,7 @@ else # link only runTest_$(GPUSUFFIX).o (new: in the past, this was linking both $(gpu_testmain): LIBFLAGS += $(GPULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH $(gpu_testmain): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(gpu_objects_lib) $(gpu_objects_exe) $(GTESTLIBS) ifneq ($(findstring hipcc,$(GPUCC)),) # link fortran/c++/hip using $FC when hipcc is used #802 - $(FC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lstdc++ -lpthread -L$(shell cd -L $(shell dirname $(shell $(GPUCC) -print-prog-name=clang))/../..; pwd)/lib -lamdhip64 + $(FC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lstdc++ -lpthread -L$(HIP_HOME)/lib -lamdhip64 else $(GPUCC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lcuda endif @@ -1104,10 +1106,20 @@ else @cat /proc/cpuinfo | grep "physical id" | sort -u endif @echo "" -ifneq ($(shell which nvidia-smi 2>/dev/null),) - nvidia-smi -L + # some systems may have -smi installed, but it fails to execute + # because it cannot communicate with the hardware + @if nvidia-smi &>/dev/null ; then \ + nvidia-smi -L ;\ + else \ + echo "No Nvidia GPU detected" ;\ + fi @echo "" -endif + @if amd-smi &>/dev/null ; then \ + amd-smi static -a ;\ + amd-smi list ;\ + else \ + echo "No AMD GPU detected" ;\ + fi @echo USECCACHE=$(USECCACHE) ifeq ($(USECCACHE),1) ccache --version | head -1 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/SubProcesses/proc_characteristics b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/proc_characteristics index 7d14ce32dc..17d8d54b1d 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/proc_characteristics +++ b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/proc_characteristics @@ -8,7 +8,7 @@ ninitial = 2 grouped_matrix = True has_loops = False - bias_module = dummy + bias_module = None max_n_matched_jets = 0 colored_pdgs = [1, 2, 3, 4, 5, 6, 21, 9000007] complex_mass_scheme = False diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/reweight.f b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/reweight.f index 0a0bafa7c1..189ba41449 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/reweight.f +++ b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/reweight.f @@ -1186,7 +1186,7 @@ logical function setclscales(p, keepq2bck, ivec) if(nexternal.gt.3) pt2ijcl(nexternal-3)=q2fact(2) else if(.not.fixed_fac_scale1) q2fact(1)=scalefact**2*pt2ijcl(nexternal-2) - if(.not.fixed_fac_scale2) q2fact(2)=scalefact**2*q2fact(1) + if(.not.fixed_fac_scale2) q2fact(2)=scalefact**2*pt2ijcl(nexternal-2) endif elseif(jcentral(1).eq.0)then if(.not.fixed_fac_scale1) q2fact(1) = scalefact**2*pt2ijcl(jfirst(1)) diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/symmetry.f b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/symmetry.f index 309540a0a2..2afd9e9f75 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/symmetry.f +++ b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/symmetry.f @@ -232,7 +232,7 @@ subroutine write_bash(mapconfig,use_config, prwidth, jcomp,iforest, c write(*,*) 'mapping',ic,mapconfig(i),icode if (icode .eq. 0) then c Create format string based on number of digits - write(formstr,'(a,i1,a)') '(I',nconf,'$)' + write(formstr,'(a,i1,a)') '(I',nconf,',$)' write(*,formstr) mapconfig(i) c Write symmetry factors write(formstr2,'(a,i2,a)') '(2i',nsym,')' @@ -242,10 +242,10 @@ subroutine write_bash(mapconfig,use_config, prwidth, jcomp,iforest, dconfig=mapconfig(i)+icode*1d0/10**ncode if(nconf+ncode+1.lt.10) then write(formstr,'(a,i1,a,i1,a)') '(F',nconf+ncode+1, - $ '.',ncode,'$)' + $ '.',ncode,',$)' else write(formstr,'(a,i2,a,i1,a)') '(F',nconf+ncode+1, - $ '.',ncode,'$)' + $ '.',ncode,',$)' endif write(*,formstr) dconfig c Write symmetry factors @@ -260,7 +260,7 @@ subroutine write_bash(mapconfig,use_config, prwidth, jcomp,iforest, dconfig=mapconfig(i)+icode*1d0/10**ncode write(27,formstr2) dconfig,use_config(i) endif - write(*,'(a$)') ' ' + write(*,'(a,$)') ' ' 100 call bw_increment_array(iarray,imax,ibase,done) enddo else diff --git a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/unwgt.f b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/unwgt.f index f602511c94..d1247f1849 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/unwgt.f +++ b/epochX/cudacpp/smeft_gg_tttt.mad/SubProcesses/unwgt.f @@ -497,6 +497,7 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) integer ip, np, ic, nc integer ida(2),ito(-nexternal+3:nexternal),ns,nres,ires,icloop integer iseed + double precision beam_mass double precision pboost(0:3) double precision beta, get_betaz double precision ebi(0:3), ebo(0:3) @@ -506,7 +507,7 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) integer idup(nexternal,maxproc,maxsproc) integer mothup(2,nexternal) integer icolup(2,nexternal,maxflow,maxsproc) - + double precision eta integer nsym integer ievent @@ -638,21 +639,20 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) if (nincoming.eq.2) then if (xbk(1) .gt. 0d0 .and. xbk(1) .le. 1d0 .and. $ xbk(2) .gt. 0d0 .and. xbk(2) .le. 1d0) then - if(lpp(2).ne.0.and.(xbk(1).eq.1d0.or.pmass(1).eq.0d0).and.xbk(2).ne.1d0) then - ! construct the beam momenta in each frame and compute the related (z)boost - if (pmass(1).eq.0d0.and.(abs(lpp(1)).eq.3.or.abs(lpp(1)).eq.4).and.ebeam(1).gt.10d0*m1)then - local_mass = 0d0 - else - local_mass = m1 - endif + if(lpp(2).ne.0.and.(xbk(1).eq.1d0.or.pmass(1).eq.0d0)) then + if((abs(lpp(1)).gt.2.and.abs(lpp(1)).ne.9).or.xbk(1).eq.1d0)then + beam_mass = pmass(1) + else + beam_mass = m1 + endif ebi(0) = p(0,1)/xbk(1) ! this assumes that particle 1 is massless or mass equal to beam ebi(1) = 0 ebi(2) = 0 - ebi(3) = DSQRT(ebi(0)**2-local_mass**2) + ebi(3) = DSQRT(ebi(0)**2-beam_mass**2) ebo(0) = ebeam(1) ebo(1) = 0 ebo(2) = 0 - ebo(3) = DSQRT(ebo(0)**2-local_mass**2) + ebo(3) = DSQRT(ebo(0)**2-beam_mass**2) beta = get_betaz(ebi, ebo) if (xbk(1).eq.1d0) then pb(0,isym(1,jsym)) = ebo(0) @@ -668,20 +668,19 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) enddo else - if (pmass(1).eq.0d0.and.(abs(lpp(1)).eq.3.or.abs(lpp(1)).eq.4.and.ebeam(2).gt.10d0*m2))then - local_mass = 0d0 - else - local_mass = m2 - endif - ebi(0) = p(0,1)/xbk(1) ! this assumes that particle 1 is massless or mass equal to beam + if((abs(lpp(2)).gt.2.and.abs(lpp(2)).ne.9).or.xbk(2).eq.1d0)then + beam_mass = pmass(2) + else + beam_mass = m2 + endif ebi(0) = p(0,2)/xbk(2) ! this assumes that particle 2 is massless or mass equal to beam ebi(1) = 0 ebi(2) = 0 - ebi(3) = -1d0*DSQRT(ebi(0)**2-local_mass**2) + ebi(3) = -1d0*DSQRT(ebi(0)**2-beam_mass**2) ebo(0) = ebeam(2) ebo(1) = 0 ebo(2) = 0 - ebo(3) = -1d0*DSQRT(ebo(0)**2-local_mass**2) + ebo(3) = -1d0*DSQRT(ebo(0)**2-beam_mass**2) beta = get_betaz(ebi, ebo) if (xbk(2).eq.1d0) then pb(0,isym(2,jsym)) = ebo(0) @@ -701,6 +700,21 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) write(*,*) 'Warning bad x1 or x2 in write_leshouche', $ xbk(1),xbk(2) endif + do j=1,nexternal + call zboost_with_beta(p(0,j),beta,pb(0,isym(j,jsym))) + pb(4,isym(j,jsym))=pmass(j) + enddo + + ! check for numerical_accuracy + if (pb(0,1).gt.ebeam(1).or.pb(0,2).gt.ebeam(2))then + ! go back to old method --more accurate when boosting with xbk close to one-- + eta = sqrt(xbk(1)*ebeam(1)/(xbk(2)*ebeam(2))) + pboost(0)=p(0,1)*(eta + 1d0/eta) + pboost(3)=p(0,1)*(eta - 1d0/eta) + do j=1,nexternal + call boostx(p(0,j),pboost,pb(0,isym(j,jsym))) + enddo + endif else do j=1,nexternal call boostx(p(0,j),pboost,pb(0,isym(j,jsym))) @@ -709,6 +723,8 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) enddo endif + + if (IMIRROR.eq.2.and.pmass(1).ne.pmass(2)) then c Note that in this context isym(1,jsym) should never be "2" since the mass differ pb(4,isym(1,jsym))=pmass(2) 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..2efb5954a6 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] @@ -1991,6 +1991,11 @@ def default_setup(self): self.add_param("PartonLevel:FSRinResonances", True, hidden=True, always_write_to_card=False, comment="Do not allow shower to run from decay product of unstable particle") self.add_param("ProcessLevel:resonanceDecays", True, hidden=True, always_write_to_card=False, comment="Do not allow unstable particle to decay.") + # Parameters only needed for main164 type of run (not pythia8/MG5 interface) + self.add_param("Main:HepMC", True, hidden=True, always_write_to_card=False, + comment="""Specify the type of output to be used by the main164 run. """) + self.add_param("HepMC:output", 'hepmc.gz', hidden=True, always_write_to_card=False, + comment="Specify the HepMC output file to be used by the main164 run.") # Add parameters controlling the subruns execution flow. # These parameters should not be part of PY8SubRun daughter. self.add_default_subruns('parameters') @@ -2087,8 +2092,10 @@ def MadGraphSet(self, name, value, **opts): force = False if name.lower() not in self or (force or name.lower() not in self.user_set): self.__setitem__(name, value, change_userdefine=False, **opts) - self.system_set.add(name.lower()) - + self.system_set.add(name.lower()) + else: + raise Exception("The parameter %s is already set to %s. You can not change it." % (name, self[name])) + def defaultSet(self, name, value, **opts): self.__setitem__(name, value, change_userdefine=False, **opts) @@ -2144,9 +2151,19 @@ def pythia8_formatting(value, formatv=None): else: return ','.join([PY8Card.pythia8_formatting(arg) for arg in value]) + #change of name convention between MG5 old interface and main164 from Pythia8 + interface_to_164 = {'HEPMCoutput:file': 'HepMC:output', + 'SysCalc:fullCutVariation': '!SysCalc:fullCutVariation (not supported with 164)', + 'SysCalc:qCutList': '!SysCalc:qCutList (not supported with 164)', + 'SysCalc:qWeed': '!SysCalc:qWeed (not supported with 164)', + 'SysCalc:tmsList': '!SysCalc:tmsList (not supported with 164)', + 'HEPMCoutput:scaling' : '!HEPMCoutput :scaling (not supported with 164)', + 'LHEFInputs:nSubruns' : 'Main:numberOfSubruns'} + def write(self, output_file, template, read_subrun=False, - print_only_visible=False, direct_pythia_input=False, add_missing=True): + print_only_visible=False, direct_pythia_input=False, add_missing=True, + use_mg5amc_py8_interface=False): """ Write the card to output_file using a specific template. > 'print_only_visible' specifies whether or not the hidden parameters should be written out if they are in the hidden_params_to_always_write @@ -2155,7 +2172,12 @@ def write(self, output_file, template, read_subrun=False, in the self.visible_params_to_always_write list and are not user_set or system_set are commented. > If 'add_missing' is False then parameters that should be written_out but are absent - from the template will not be written out.""" + from the template will not be written out. + > use_mg5amc_py8_interface is a flag to indicate that the MG5aMC-PY8 interface is used or not + if not used some parameters need to be translated from the old convention to the new one + """ + + self.use_mg5amc_py8_interface = use_mg5amc_py8_interface # First list the visible parameters visible_param = [p for p in self if p.lower() not in self.hidden_param @@ -2297,7 +2319,16 @@ def group_params(params): else: # Just copy parameters which don't need to be specified if param.lower() not in self.params_to_never_write: - output.write(line) + + if not use_mg5amc_py8_interface and direct_pythia_input and \ + param in self.interface_to_164: + param_entry = self.interface_to_164[param.strip()] + # special case for HepMC needs two flags + if 'HepMC:output' == param_entry: + output.write(' %s=%s\n'%('Main:HepMC', 'on')) + output.write('%s=%s\n'%(param_entry,new_value)) + else: + output.write(line) else: output.write('! The following parameter was forced to be commented out by MG5aMC.\n') output.write('! %s'%line) @@ -2313,6 +2344,7 @@ def group_params(params): if ((not direct_pythia_input) or (param.lower() in self.visible_params_to_always_write) or (param.lower() in self.user_set) or + (param.lower() in self.hidden_params_to_always_write) or (param.lower() in self.system_set)): template = '%s=%s' else: @@ -2321,6 +2353,19 @@ def group_params(params): # then they shouldn't be passed to Pythia template = '!%s=%s' + if not use_mg5amc_py8_interface and direct_pythia_input and \ + param in self.interface_to_164: + param_entry = self.interface_to_164[param] + # special case for HepMC needs two flags + if 'HepMC:output' == param_entry: + output.write(' %s=%s\n'%('Main:HepMC', 'on')) + if 'Main:InternalAnalysis'.lower() in self.user_set and \ + self['Main:InternalAnalysis'].lower() == 'on': + output.write('InternalAnalysis:output = ./djrs.dat\n') + + #elif param in self.interface_to_164.values() and not direct_pythia_input: + # misc.sprint(use_mg5amc_py8_interface, direct_pythia_input,param) + # raise Exception('The parameter %s is not supported in the MG5aMC-PY8 interface. Please use the new interface.'%param_entry output.write(template%(param_entry, value_entry.replace(value,new_value))) @@ -2365,6 +2410,8 @@ def group_params(params): comment = '\n'.join('! %s'%c for c in self.comments[param.lower()].split('\n')) output.write(comment+'\n') + if not use_mg5amc_py8_interface and param in self.interface_to_164: + continue output.write('%s=%s\n'%(param,PY8Card.pythia8_formatting(self[param]))) # Don't close the file if we were reading a subrun, but simply write @@ -3318,7 +3365,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 +3372,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 @@ -4050,8 +4095,8 @@ def post_set_fixed_fac_scale(card, value, change_userdefine, raiseerror, **opt): if 'fixed_fac_scale2' in card.user_set: card.user_set.remove('fixed_fac_scale2') - # #card['pdlabel1'] = value - # #card['pdlabel2'] = value + dict.__setitem__(card, 'fixed_fac_scale1', card['fixed_fac_scale']) + dict.__setitem__(card, 'fixed_fac_scale2', card['fixed_fac_scale']) @staticmethod def post_set(card, value, change_userdefine, raiseerror, name='unknown', **opt): @@ -4201,6 +4246,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 @@ -4451,11 +4497,11 @@ def check_validity(self): time.sleep(5) if self['drjj'] != 0: if 'drjj' in self.user_set: - logger.warning('Since icckw>0, changing the value of \'drjj\' to 0') + logger.warning('Since ickkw>0, changing the value of \'drjj\' to 0') self['drjj'] = 0 if self['drjl'] != 0: if 'drjl' in self.user_set: - logger.warning('Since icckw>0, changing the value of \'drjl\' to 0') + logger.warning('Since ickkw>0, changing the value of \'drjl\' to 0') self['drjl'] = 0 if not self['auto_ptj_mjj']: if self['mmjj'] > self['xqcut']: @@ -4753,7 +4799,6 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): self['fixed_fac_scale1'] = True self['nhel'] = 1 for i in beam_id_split[1]: - exit if abs(i) == 11: self['lpp1'] = -math.copysign(3,i) self['lpp2'] = math.copysign(3,i) @@ -5577,6 +5622,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 +5838,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/cluster.py b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/cluster.py index 95ef45b5f3..66069293d2 100755 --- a/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/cluster.py +++ b/epochX/cudacpp/smeft_gg_tttt.mad/bin/internal/cluster.py @@ -602,6 +602,7 @@ def __init__(self, *args, **opt): self.submitted = six.moves.queue.Queue() # one entry by job submitted self.stoprequest = threading.Event() #flag to ensure everything to close self.demons = [] + self.gpus_list = [] self.nb_done =0 if 'nb_core' in opt: self.nb_core = opt['nb_core'] @@ -623,23 +624,46 @@ def __init__(self, *args, **opt): self.done_pid_queue = six.moves.queue.Queue() self.fail_msg = None + mg5_gpu_env_str = 'MG5_GPU_VISIBLE_DEVICES' + gpu_variables = [['NVIDIA_VISIBLE_DEVICES', 'CUDA_VISIBLE_DEVICES'], + ['ROCR_VISIBLE_DEVICES', 'HIP_VISIBLE_DEVICES'],] + if mg5_gpu_env_str in os.environ: + new_var = os.environ[mg5_gpu_env_str].split(',') + if len(new_var) == 2: + gpu_variables.insert(0, new_var) + else: + logger.error('Invalid format for %s=%s, it should be a comma-separated list of two elements' % (mg5_gpu_env_str, os.environ[mg5_gpu_env_str])) + for get_var,set_var in gpu_variables: + if get_var in os.environ: + self.gpus_list = os.environ.get(get_var).split(',') + self.gpu_set_var = set_var + self.gpus_count = len(self.gpus_list) + logger.info('Found %s GPUs: %s' % (self.gpus_count, self.gpus_list)) def start_demon(self): import threading - t = threading.Thread(target=self.worker) + env2 = None + if len(self.gpus_list): + env2 = os.environ.copy() + this_gpu_idx = len(self.demons) % self.gpus_count + env2[self.gpu_set_var] = self.gpus_list[this_gpu_idx] + t = threading.Thread(target=self.worker, kwargs={'env2': env2}) + else: + t = threading.Thread(target=self.worker) t.daemon = True t.start() self.demons.append(t) - def worker(self): + def worker(self, env2=None): import six.moves.queue import six.moves._thread while not self.stoprequest.isSet(): try: args = self.queue.get(timeout=10) tag, exe, arg, opt = args + opt['env'] = env2 try: # check for executable case if isinstance(exe,str): 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..69291df0d4 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): @@ -1463,11 +1463,15 @@ def create_plot(self, mode='parton', event_path=None, output=None, tag=None): self.run_name, '%s_pts.dat' % tag) for observable_name, data_path in [('djr',djr_path), ('pt',pt_path)]: - if not self.generate_Pythia8_HwU_plots( + try: + if not self.generate_Pythia8_HwU_plots( PY8_plots_root_path, merging_scale_name, observable_name,data_path): - return False - + return False + except Exception as error: + if os.path.exists(data_path): + logger.info('plot information present in %s' % data_path) + return True if mode == 'Pythia8': plot_files = glob.glob(pjoin(PY8_plots_root_path,'*.gnuplot')) if not misc.which('gnuplot'): @@ -1964,12 +1968,16 @@ def do_systematics(self, line): self.cluster.wait(os.path.dirname(output), update_status, update_first=update_status) except Exception: self.cluster.remove() + for i in range(nb_submit): + os.remove('%s/tmp_%s_%s' %(os.path.dirname(output),i,os.path.basename(output))) old_run_mode = self.options['run_mode'] self.options['run_mode'] =0 + out =False try: out = self.do_systematics(line) finally: self.options['run_mode'] = old_run_mode + return out #collect the data all_cross = [] for i in range(nb_submit): @@ -1995,18 +2003,21 @@ def do_systematics(self, line): self.run_card['event_norm'] in ['unity']: all_cross= [cross/nb_event for cross in all_cross] - sys_obj = systematics.call_systematics([input, None] + opts, - log=lambda x: logger.info(str(x)), - result=result_file, - running=False - ) + + sys_obj = systematics.call_systematics([input, None] + opts, + log=lambda x: logger.info(str(x)), + result=result_file, + running=False + ) + sys_obj.print_cross_sections(all_cross, nb_event, result_file) - + #concatenate the output file subprocess.call(['cat']+\ ['./tmp_%s_%s' % (i, os.path.basename(output)) for i in range(nb_submit)], stdout=open(output,'w'), cwd=os.path.dirname(output)) + for i in range(nb_submit): os.remove('%s/tmp_%s_%s' %(os.path.dirname(output),i,os.path.basename(output))) # os.remove('%s/log_sys_%s.txt' % (os.path.dirname(output),i)) @@ -3831,7 +3842,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 +5146,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 +6751,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 +6775,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 +6826,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..6fbdd98100 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': @@ -1858,6 +1855,8 @@ def parse_histos_from_PY8_XML_stream(self, stream, run_id=None, # If merging cut is negative, then pick only the one of the central scale # If not specified, then take them all but use the PDF and scale weight # of the central merging_scale for the variation. + if not all_weights: + raise MadGraph5Error('No weights were found in the HwU XML source.') if merging_scale is None or merging_scale < 0.0: merging_scale_chosen = all_weights[2]['MERGING'] else: @@ -2480,14 +2479,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 +2738,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 +2877,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 +2889,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 +2898,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 +2907,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 +2916,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..b1739da73d 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 @@ -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: O. Mattelaer (Aug 2023) for the MG5aMC CUDACPP plugin. -# Further modified by: O. Mattelaer, A. Valassi (2024) for the MG5aMC CUDACPP plugin. +# Further modified by: O. Mattelaer, A. Valassi, Z. Wettersten (2024-2025) for the MG5aMC CUDACPP plugin. import logging import os @@ -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') @@ -133,7 +133,8 @@ def default_setup(self): super().default_setup() # change default value: self['cudacpp_backend'] = 'cuda' - self['vector_size'] = 16384 # already setup in default class (just change value) + self['vector_size'] = 32 # ZW: default to 32, might want to change to 64 to utilise AMD GPUs better as well # 16384 # already setup in default class (just change value) + self['nb_warp'] = 512 # number of warps per kernel call, for now setting to 16 384 / vector_size MEINTERFACE = CPPMEInterface RunCard = CPPRunCard 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..81d17f7cb1 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 @@ -1035,12 +1035,12 @@ def define_init_banner(self, wgt, lha_strategy, proc_charac=None): from_init = True if not from_init: - if group in grouped_cross: - grouped_cross[group] += self.allcross[i] - grouped_error[group] += self.error[i]**2 + if int(group) in grouped_cross: + grouped_cross[int(group)] += self.allcross[i] + grouped_error[int(group)] += self.error[i]**2 else: - grouped_cross[group] = self.allcross[i] - grouped_error[group] = self.error[i]**2 + grouped_cross[int(group)] = self.allcross[i] + grouped_error[int(group)] = self.error[i]**2 else: ban = banner_mod.Banner(ff.banner) for line in ban['init'].split('\n'): @@ -1048,11 +1048,11 @@ def define_init_banner(self, wgt, lha_strategy, proc_charac=None): if len(splitline)==4: cross, error, _, group = splitline if int(group) in grouped_cross: - grouped_cross[group] += float(cross) - grouped_error[group] += float(error)**2 + grouped_cross[int(group)] += float(cross) + grouped_error[int(group)] += float(error)**2 else: - grouped_cross[group] = float(cross) - grouped_error[group] = float(error)**2 + grouped_cross[int(group)] = float(cross) + grouped_error[int(group)] = float(error)**2 nb_group = len(grouped_cross) # compute the information for the first line @@ -1086,6 +1086,8 @@ def define_init_banner(self, wgt, lha_strategy, proc_charac=None): self.seek(0) if init_information["idbmup2"] in [0,9]: event = next(self) + if len(event) == 0: + event = Event(str(event)) init_information["idbmup2"] = event[1].pdg self.seek(0) @@ -2166,10 +2168,13 @@ def check(self): abspz += abs(particle.pz) # check mass fourmass = FourMomentum(particle).mass - - if particle.mass and (abs(particle.mass) - fourmass)/ abs(particle.mass) > threshold: - raise Exception( "Do not have correct mass lhe: %s momentum: %s (error at %s" % (particle.mass, fourmass, (abs(particle.mass) - fourmass)/ abs(particle.mass))) - + if particle.mass: + expected = (particle.E - math.sqrt(particle.E**2 -particle.mass**2))/particle.E + if expected > 1e-8: + mass_threshold = particle.E**2 - (particle.E-threshold)**2 + if (abs(particle.mass) - fourmass)/ mass_threshold > 5: + raise Exception( "Do not have correct mass lhe: %s momentum: %s (error at %s" % (particle.mass, fourmass, (abs(particle.mass) - fourmass)/ abs(particle.mass))) + if E/absE > threshold: logger.critical(self) @@ -2953,8 +2958,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..4d5597c722 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) @@ -2827,10 +2827,10 @@ def print_results_in_shell(self, data): logger.info(" Nb of events after matching/merging : %d" % int(data['nb_event_pythia'])) if self.run_card['use_syst'] in self.true and \ (int(self.run_card['ickkw'])==1 or self.run_card['ktdurham']>0.0 - or self.run_card['ptlund']>0.0): + or self.run_card['ptlund']>0.0) and data['cross_pythia'] == -1: logger.info(" Notice that because Systematics computation is turned on, the merging did not veto events but modified their weights instead.\n"+\ " The resulting hepmc/stdhep file should therefore be use with those weights.") - else: + elif data['cross_pythia'] == -1: logger.info(" Nb of events after merging : %s" % data['nb_event_pythia']) logger.info(" " ) @@ -3055,6 +3055,7 @@ def do_multi_run(self, line): crossoversig = 0 inv_sq_err = 0 nb_event = 0 + madspin = False for i in range(nb_run): self.nb_refine = 0 self.exec_cmd('generate_events %s_%s -f' % (main_name, i), postcmd=False) @@ -3067,6 +3068,8 @@ def do_multi_run(self, line): inv_sq_err+=1.0/error**2 self.results[main_name][-1]['cross'] = crossoversig/inv_sq_err self.results[main_name][-1]['error'] = math.sqrt(1.0/inv_sq_err) + if 'decayed' in self.run_name: + madspin = True self.results.def_current(main_name) self.run_name = main_name self.update_status("Merging LHE files", level='parton') @@ -3074,9 +3077,12 @@ def do_multi_run(self, line): os.mkdir(pjoin(self.me_dir,'Events', self.run_name)) except Exception: pass - os.system('%(bin)s/merge.pl %(event)s/%(name)s_*/unweighted_events.lhe.gz %(event)s/%(name)s/unweighted_events.lhe.gz %(event)s/%(name)s_banner.txt' + + os.system('%(bin)s/merge.pl %(event)s/%(name)s_*%(madspin)s/unweighted_events.lhe.gz %(event)s/%(name)s/unweighted_events.lhe.gz %(event)s/%(name)s_banner.txt' % {'bin': self.dirbin, 'event': pjoin(self.me_dir,'Events'), - 'name': self.run_name}) + 'name': self.run_name, + 'madspin': '_decayed_*' if madspin else '' + }) eradir = self.options['exrootanalysis_path'] if eradir and misc.is_executable(pjoin(eradir,'ExRootLHEFConverter')): @@ -3656,9 +3662,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'))) @@ -3757,6 +3765,8 @@ def split(a, n): k, m = divmod(len(a), n) return (a[i*k+min(i, m):(i+1)*k+min(i+1, m)] for i in range(n)) + Gdirs = self.remove_empty_events(Gdirs) + partials_info = [] if len(Gdirs) >= max_G: start_unweight= time.perf_counter() @@ -3786,7 +3796,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, @@ -4223,7 +4233,7 @@ def mg5amc_py8_interface_consistency_warning(options): return None - def setup_Pythia8RunAndCard(self, PY8_Card, run_type): + def setup_Pythia8RunAndCard(self, PY8_Card, run_type, use_mg5amc_py8_interface): """ Setup the Pythia8 Run environment and card. In particular all the process and run specific parameters of the card are automatically set here. This function returns the path where HEPMC events will be output, if any.""" @@ -4338,10 +4348,10 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): PY8_Card.systemSet('Beams:setProductionScalesFromLHEF',True) # Automatically set qWeed to xqcut if not defined by the user. - if PY8_Card['SysCalc:qWeed']==-1.0: + if use_mg5amc_py8_interface and PY8_Card['SysCalc:qWeed']==-1.0: PY8_Card.MadGraphSet('SysCalc:qWeed',self.run_card['xqcut'], force=True) - if PY8_Card['SysCalc:qCutList']=='auto': + if use_mg5amc_py8_interface and PY8_Card['SysCalc:qCutList']=='auto': if self.run_card['use_syst']: if self.run_card['sys_matchscale']=='auto': qcut = PY8_Card['JetMatching:qCut'] @@ -4368,7 +4378,7 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): # Specific MLM settings # PY8 should not implement the MLM veto since the driver should do it # if merging scale variation is turned on - if self.run_card['use_syst']: + if use_mg5amc_py8_interface and self.run_card['use_syst']: # We do no force it here, but it is clear that the user should know what # he's doing if he were to force it to True. PY8_Card.MadGraphSet('JetMatching:doVeto',False) @@ -4444,7 +4454,7 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): PY8_Card.MadGraphSet('SpaceShower:pTmaxMatch',1) PY8_Card.MadGraphSet('SpaceShower:rapidityOrder',False) # PY8 should not implement the CKKW veto since the driver should do it. - if self.run_card['use_syst']: + if use_mg5amc_py8_interface and self.run_card['use_syst']: # We do no force it here, but it is clear that the user should know what # he's doing if he were to force it to True. PY8_Card.MadGraphSet('Merging:applyVeto',False) @@ -4516,6 +4526,12 @@ def do_pythia8(self, line): else: no_default = False + if '--old_interface' in args: + use_mg5amc_py8_interface = True + args.remove('--old_interface') + else: + use_mg5amc_py8_interface = False + if not self.run_name: self.check_pythia8(args) self.configure_directory(html_opening =False) @@ -4545,20 +4561,27 @@ def do_pythia8(self, line): #"Please use 'event_norm = average' in the run_card to avoid this problem.") - - if not self.options['mg5amc_py8_interface_path'] or not \ - os.path.exists(pjoin(self.options['mg5amc_py8_interface_path'], - 'MG5aMC_PY8_interface')): - raise self.InvalidCmd( -"""The MG5aMC_PY8_interface tool cannot be found, so that MadEvent cannot steer Pythia8 shower. -Please install this tool with the following MG5_aMC command: - MG5_aMC> install mg5amc_py8_interface_path""") + if use_mg5amc_py8_interface: + if not self.options['mg5amc_py8_interface_path'] or not \ + os.path.exists(pjoin(self.options['mg5amc_py8_interface_path'], + 'MG5aMC_PY8_interface')): + raise self.InvalidCmd( + """The MG5aMC_PY8_interface tool cannot be found, so that MadEvent cannot steer Pythia8 shower. + Please install this tool with the following MG5_aMC command: + MG5_aMC> install mg5amc_py8_interface_path""") + else: + pythia_main = pjoin(self.options['mg5amc_py8_interface_path'], + 'MG5aMC_PY8_interface') + warnings = MadEventCmd.mg5amc_py8_interface_consistency_warning(self.options) + if warnings: + logger.warning(warnings) else: - pythia_main = pjoin(self.options['mg5amc_py8_interface_path'], - 'MG5aMC_PY8_interface') - warnings = MadEventCmd.mg5amc_py8_interface_consistency_warning(self.options) - if warnings: - logger.warning(warnings) + pythia_main = pjoin(self.options['pythia8_path'], 'share', 'Pythia8', 'examples', 'main164') + if not os.path.exists(pythia_main): + pythia_main = pjoin(self.options['pythia8_path'], 'examples', 'main164') + if not os.path.exists(pythia_main): + logger.warning('main164 not found (or not compiled). Will try the old interface instead.') + return self.do_pythia8(line + ' --old_interface') self.results.add_detail('run_mode', 'madevent') @@ -4583,14 +4606,19 @@ def do_pythia8(self, line): run_type = 'CKKW' # Edit the card and run environment according to the run specification - HepMC_event_output = self.setup_Pythia8RunAndCard(PY8_Card, run_type) + HepMC_event_output = self.setup_Pythia8RunAndCard(PY8_Card, run_type, use_mg5amc_py8_interface=use_mg5amc_py8_interface) + + if not use_mg5amc_py8_interface and self.options['run_mode']==0 or (self.options['run_mode']==2 and self.options['nb_core']==1): + PY8_Card['Main:numberOfEvents']= self.run_card['nevents'] + # Now write the card. pythia_cmd_card = pjoin(self.me_dir, 'Events', self.run_name , '%s_pythia8.cmd' % tag) cmd_card = StringIO.StringIO() PY8_Card.write(cmd_card,pjoin(self.me_dir,'Cards','pythia8_card_default.dat'), - direct_pythia_input=True) + direct_pythia_input=True, + use_mg5amc_py8_interface=use_mg5amc_py8_interface) # Now setup the preamble to make sure that everything will use the locally # installed tools (if present) even if the user did not add it to its @@ -4632,7 +4660,7 @@ def do_pythia8(self, line): " command '/usr/bin/env %s' exists and returns a valid path."%shell) exe_cmd = "#!%s\n%s"%(shell_exe,' '.join( - [preamble+pythia_main, + [preamble+pythia_main, '' if use_mg5amc_py8_interface else '-c', os.path.basename(pythia_cmd_card)])) wrapper.write(exe_cmd) @@ -4699,6 +4727,7 @@ def do_pythia8(self, line): n_cores = max(min(min_n_core,n_cores),1) if self.options['run_mode']==0 or (self.options['run_mode']==2 and self.options['nb_core']==1): + # No need for parallelization anymore self.cluster = None logger.info('Follow Pythia8 shower by running the '+ @@ -4744,20 +4773,22 @@ def do_pythia8(self, line): ParallelPY8Card.subruns[0].systemSet('Beams:LHEF','events.lhe.gz') ParallelPY8Card.write(pjoin(parallelization_dir,'PY8Card.dat'), pjoin(self.me_dir,'Cards','pythia8_card_default.dat'), - direct_pythia_input=True) + direct_pythia_input=True, + use_mg5amc_py8_interface=use_mg5amc_py8_interface) # Write the wrapper wrapper_path = pjoin(parallelization_dir,'run_PY8.sh') wrapper = open(wrapper_path,'w') if self.options['cluster_temp_path'] is None: exe_cmd = \ -"""#!%s -./%s PY8Card.dat >& PY8_log.txt -""" +"""#!%%s +./%%s %s PY8Card.dat >& PY8_log.txt +""" % ('' if use_mg5amc_py8_interface else '-c') + else: exe_cmd = \ -"""#!%s +"""#!%%s ln -s ./events_$1.lhe.gz ./events.lhe.gz -./%s PY8Card_$1.dat >& PY8_log.txt +./%%s %s PY8Card_$1.dat >& PY8_log.txt mkdir split_$1 if [ -f ./events.hepmc ]; then @@ -4776,7 +4807,7 @@ def do_pythia8(self, line): mv ./PY8_log.txt ./split_$1/ fi tar -czf split_$1.tar.gz split_$1 -""" +""" % ('' if use_mg5amc_py8_interface else '-c') exe_cmd = exe_cmd%(shell_exe,os.path.basename(pythia_main)) wrapper.write(exe_cmd) wrapper.close() @@ -4812,19 +4843,27 @@ def do_pythia8(self, line): pjoin(parallelization_dir,split_files[-1])) logger.info('Submitting Pythia8 jobs...') + for i, split_file in enumerate(split_files): # We must write a PY8Card tailored for each split so as to correct the normalization # HEPMCoutput:scaling of each weight since the lhe showered will not longer contain the # same original number of events - split_PY8_Card = banner_mod.PY8Card(pjoin(parallelization_dir,'PY8Card.dat')) + split_PY8_Card = banner_mod.PY8Card(pjoin(parallelization_dir,'PY8Card.dat'), setter='user') + assert split_PY8_Card['JetMatching:nJetMax'] == PY8_Card['JetMatching:nJetMax'] + + + # Make sure to sure the number of split_events determined during the splitting. - split_PY8_Card.systemSet('Main:numberOfEvents',partition_for_PY8[i]) + split_PY8_Card.systemSet('Main:numberOfEvents',partition_for_PY8[i], force=True) + assert split_PY8_Card['Main:numberOfEvents'] == partition_for_PY8[i] split_PY8_Card.systemSet('HEPMCoutput:scaling',split_PY8_Card['HEPMCoutput:scaling']* - (float(partition_for_PY8[i]))) + (float(partition_for_PY8[i])), force=True) # Add_missing set to False so as to be sure not to add any additional parameter w.r.t # the ones in the original PY8 param_card copied. split_PY8_Card.write(pjoin(parallelization_dir,'PY8Card_%d.dat'%i), - pjoin(parallelization_dir,'PY8Card.dat'), add_missing=False) + pjoin(parallelization_dir,'PY8Card.dat'), add_missing=False, + direct_pythia_input=True, + use_mg5amc_py8_interface=use_mg5amc_py8_interface) in_files = [pjoin(parallelization_dir,os.path.basename(pythia_main)), pjoin(parallelization_dir,'PY8Card_%d.dat'%i), pjoin(parallelization_dir,split_file)] @@ -5073,7 +5112,7 @@ def wait_monitoring(Idle, Running, Done): # works both for fixed number of generated events and fixed accepted events self.results.add_detail('error_pythia', error_m) - if self.run_card['use_syst']: + if self.run_card['use_syst'] and use_mg5amc_py8_interface: self.results.add_detail('cross_pythia', -1) self.results.add_detail('error_pythia', 0) @@ -6132,7 +6171,102 @@ def get_Gdir(self, Pdir=None, symfact=None): mfactors[pjoin(P, "G%s" % tag)] = mfactor self.Gdirs = (Gdirs, mfactors) return self.get_Gdir(Pdir, symfact=symfact) + + ############################################################################ + def remove_empty_events(self, Gdir): + """return Gdir strip from the one providing empty events.lhe files.""" + + reasons = collections.defaultdict(list) + Gdirs = Gdir[:] + for G in Gdirs[:]: + try: + size = os.path.getsize(pjoin(G, 'events.lhe')) + except Exception as error: + size = 0 + if size <10: + Gdirs.remove(G) + try: + log = misc.BackRead(pjoin(G, 'log.txt')) + except Exception as error: + log = misc.BackRead(pjoin(G, 'run1_app.log')) + found = -1 + for line in log: + if 'Deleting file events.lhe' in line: + found = 0 + elif "Impossible BW configuration" in line: + reasons['bwconfig'].append(G) + break + elif found < -150: + reasons['not found'].append(G) + Gdirs.append(G) + break + elif found < 0: + found -= 1 + elif 'Loosen cuts or increase max_events' in line: + reasons['cuts'].append(G) + break + elif 'all returned zero' in line: + reasons['zero'].append(G) + break + elif found > 5: + reasons['unknown'].append(G) + break + else: + found += 1 + + if len(reasons): + logger.debug('Reasons for empty events.lhe:') + if len(reasons['unknown']): + logger.debug(' - unknown: %s' % len(reasons['unknown'])) + logger.log(10, ' DETAIL:' + ','.join(['/'.join(G.rsplit(os.sep)[-2:]) for G in reasons['unknown'][:10]])) + if len(reasons['not found']): + logger.debug(' - not found in log: %s' % len(reasons['not found'])) + logger.log(10, ' DETAIL:' + ','.join(['/'.join(G.rsplit(os.sep)[-2:]) for G in reasons['not found'][:10]])) + if len(reasons['zero']): + logger.debug(' - zero amplitudes: %s' % len(reasons['zero'])) + logger.log(10, ' DETAIL:' + ','.join(['/'.join(G.rsplit( os.sep)[-2:]) for G in reasons['zero'][:10]])) + if len(reasons['bwconfig']): + critical_bwconfig = set() + for G in reasons['bwconfig']: + base = G.rsplit('.',1)[0] + if any(G2.startswith(base) for G2 in Gdirs): + continue + else: + critical_bwconfig.add(os.sep.join(base.rsplit(os.sep)[-2:])) + for G in critical_bwconfig: + logger.warning('Gdirectory %s has no events.lhe file. (no BW config found %s times)' % G) + + logger.debug(' - impossible BW configuration: %s' % len(reasons['bwconfig'])) + logger.debug(' - channel with no possible BW configuration: %s' % len(critical_bwconfig)) + + if len(reasons['cuts']): + critical_nb_cuts = collections.defaultdict(int) + for G in reasons['cuts']: + if '.' in os.path.basename(G): + base = G.rsplit('.',1)[0] + if any(G2.startswith(base) for G2 in Gdirs): + continue + else: + critical_nb_cuts[os.sep.join(base.rsplit(os.sep)[-2:])] += 1 + else: + critical_nb_cuts[''] += 1 + logger.warning('Gdirectory %s has no events.lhe file. (no points passed cuts found)' % G) + for G, nb in critical_nb_cuts.items(): + if not G: + continue + else: + logger.warning('%s channel %s.XXX has no events.lhe file. (no points passed cuts). No %s with events detected' % (nb, G, G)) + logger.debug(' - no points passed cuts: %s' % len(reasons['cuts'])) + logger.log(10, ' DETAIL:' + ','.join(['/'.join(G.rsplit(os.sep)[-2:]) for G in reasons['cuts'][:10]])) + logger.debug(' - without any BW handling (critical): %s' % critical_nb_cuts['']) + logger.debug(' - with BW but all zero (critical): %s' % sum([nb for v, nb in critical_nb_cuts.items() if v!=''], 0)) + #logger.debug(' - cuts (with BW conflict where other channel contributes): %s' % (len(reasons['cuts'])- critical_nb_cuts)) + + + return Gdirs + + ############################################################################ def set_run_name(self, name, tag=None, level='parton', reload_card=False, allow_new_tag=True): @@ -6749,7 +6883,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 +6893,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 +7010,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 +7038,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 +7053,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 +7065,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 +7190,13 @@ 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) 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 +7210,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..df9ee166ce 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.3, 2025-06-12 // 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..7ecc857052 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.3, 2025-06-12 // 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..ee46c67c8e 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.3, 2025-06-12 // 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/test/cudacpp_test.mk b/epochX/cudacpp/smeft_gg_tttt.mad/test/cudacpp_test.mk index f703a1ae7c..4934c9a53f 100644 --- a/epochX/cudacpp/smeft_gg_tttt.mad/test/cudacpp_test.mk +++ b/epochX/cudacpp/smeft_gg_tttt.mad/test/cudacpp_test.mk @@ -19,7 +19,7 @@ CXXFLAGS += -Igoogletest/googletest/include/ -std=c++11 all: googletest/$(INSTALLDIR)/lib64/libgtest.a googletest/CMakeLists.txt: - git clone https://github.com/google/googletest.git -b release-1.11.0 googletest + git clone https://github.com/google/googletest.git -b v1.17.0 googletest googletest/$(BUILDDIR)/Makefile: googletest/CMakeLists.txt mkdir -p googletest/$(BUILDDIR) 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/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..244af42ecc 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -1587,7 +1587,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- 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..dcd3e81434 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.3, 2025-06-12 // 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/cudacpp.mk b/epochX/cudacpp/smeft_gg_tttt.sa/SubProcesses/cudacpp.mk index 20d8ded718..20b8e6b858 100644 --- a/epochX/cudacpp/smeft_gg_tttt.sa/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/smeft_gg_tttt.sa/SubProcesses/cudacpp.mk @@ -114,7 +114,7 @@ export CXXFLAGS override CUDA_HOME = $(patsubst %/bin/nvcc,%,$(shell which nvcc 2>/dev/null)) # Set HIP_HOME from the path to hipcc, if it exists -override HIP_HOME = $(patsubst %/bin/hipcc,%,$(shell which hipcc 2>/dev/null)) +override HIP_HOME = $(shell hipconfig --rocmpath) # Configure CUDA_INC (for CURAND and NVTX) and NVTX if a CUDA installation exists (see #965) ifeq ($(CUDA_HOME),) @@ -229,6 +229,8 @@ ifeq ($(BACKEND),cuda) else ifeq ($(BACKEND),hip) + # example architecture values MI200:gfx90a, MI350X:gfx942 + MADGRAPH_HIP_ARCHITECTURE ?= gfx942 # Set GPUCC as $(HIP_HOME)/bin/hipcc (it was already checked above that this exists) GPUCC = $(HIP_HOME)/bin/hipcc XCOMPILERFLAG = @@ -243,7 +245,7 @@ else ifeq ($(BACKEND),hip) ###GPUFLAGS += -ggdb # FOR DEBUGGING ONLY # AMD HIP architecture flags - GPUARCHFLAGS = --offload-arch=gfx90a + GPUARCHFLAGS = --offload-arch=${MADGRAPH_HIP_ARCHITECTURE} GPUFLAGS += $(GPUARCHFLAGS) # Other AMD-specific flags @@ -878,7 +880,7 @@ endif $(gpu_fcheckmain): LIBFLAGS += $(GPULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH $(gpu_fcheckmain): $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBDIR)/lib$(MG5AMC_GPULIB).so $(gpu_objects_exe) ifneq ($(findstring hipcc,$(GPUCC)),) # link fortran/c++/hip using $FC when hipcc is used #802 - $(FC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) -lstdc++ -L$(shell cd -L $(shell dirname $(shell $(GPUCC) -print-prog-name=clang))/../..; pwd)/lib -lamdhip64 + $(FC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) -lstdc++ -L$(HIP_HOME)/lib -lamdhip64 else $(GPUCC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) endif @@ -979,7 +981,7 @@ else # link only runTest_$(GPUSUFFIX).o (new: in the past, this was linking both $(gpu_testmain): LIBFLAGS += $(GPULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH $(gpu_testmain): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(gpu_objects_lib) $(gpu_objects_exe) $(GTESTLIBS) ifneq ($(findstring hipcc,$(GPUCC)),) # link fortran/c++/hip using $FC when hipcc is used #802 - $(FC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lstdc++ -lpthread -L$(shell cd -L $(shell dirname $(shell $(GPUCC) -print-prog-name=clang))/../..; pwd)/lib -lamdhip64 + $(FC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lstdc++ -lpthread -L$(HIP_HOME)/lib -lamdhip64 else $(GPUCC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lcuda endif @@ -1104,10 +1106,20 @@ else @cat /proc/cpuinfo | grep "physical id" | sort -u endif @echo "" -ifneq ($(shell which nvidia-smi 2>/dev/null),) - nvidia-smi -L + # some systems may have -smi installed, but it fails to execute + # because it cannot communicate with the hardware + @if nvidia-smi &>/dev/null ; then \ + nvidia-smi -L ;\ + else \ + echo "No Nvidia GPU detected" ;\ + fi @echo "" -endif + @if amd-smi &>/dev/null ; then \ + amd-smi static -a ;\ + amd-smi list ;\ + else \ + echo "No AMD GPU detected" ;\ + fi @echo USECCACHE=$(USECCACHE) ifeq ($(USECCACHE),1) ccache --version | head -1 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..df9ee166ce 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.3, 2025-06-12 // 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..7ecc857052 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.3, 2025-06-12 // 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..ee46c67c8e 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.3, 2025-06-12 // 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/test/cudacpp_test.mk b/epochX/cudacpp/smeft_gg_tttt.sa/test/cudacpp_test.mk index f703a1ae7c..4934c9a53f 100644 --- a/epochX/cudacpp/smeft_gg_tttt.sa/test/cudacpp_test.mk +++ b/epochX/cudacpp/smeft_gg_tttt.sa/test/cudacpp_test.mk @@ -19,7 +19,7 @@ CXXFLAGS += -Igoogletest/googletest/include/ -std=c++11 all: googletest/$(INSTALLDIR)/lib64/libgtest.a googletest/CMakeLists.txt: - git clone https://github.com/google/googletest.git -b release-1.11.0 googletest + git clone https://github.com/google/googletest.git -b v1.17.0 googletest googletest/$(BUILDDIR)/Makefile: googletest/CMakeLists.txt mkdir -p googletest/$(BUILDDIR) 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..26e0f0a062 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/Cards/ident_card.dat +++ b/epochX/cudacpp/susy_gg_t1t1.mad/Cards/ident_card.dat @@ -2,298 +2,298 @@ ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c written by the UFO converter ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc +dsqmix 1 1 mdl_RRd1x1 +dsqmix 2 2 mdl_RRd2x2 +dsqmix 3 3 mdl_RRd3x3 +dsqmix 3 6 mdl_RRd3x6 +dsqmix 4 4 mdl_RRd4x4 +dsqmix 5 5 mdl_RRd5x5 +dsqmix 6 3 mdl_RRd6x3 +dsqmix 6 6 mdl_RRd6x6 +fralpha 1 mdl_alp +hmix 1 mdl_RMUH +hmix 2 mdl_tb +hmix 4 mdl_MA2 +mass 5 mdl_MB +mass 6 mdl_MT +mass 15 mdl_Mta +mass 23 mdl_MZ +mass 24 mdl_MW +mass 25 mdl_MH01 +mass 35 mdl_MH02 +mass 36 mdl_MA0 +mass 37 mdl_MH +mass 1000001 mdl_Msd1 +mass 1000002 mdl_Msu1 +mass 1000005 mdl_Msd3 +mass 1000006 mdl_Msu3 +mass 1000011 mdl_Msl1 +mass 1000012 mdl_Msn1 +mass 1000015 mdl_Msl3 +mass 1000016 mdl_Msn3 +mass 1000021 mdl_Mgo +mass 1000022 mdl_Mneu1 +mass 1000023 mdl_Mneu2 +mass 1000024 mdl_Mch1 +mass 1000025 mdl_Mneu3 +mass 1000035 mdl_Mneu4 +mass 1000037 mdl_Mch2 +mass 2000001 mdl_Msd4 +mass 2000002 mdl_Msu4 +mass 2000005 mdl_Msd6 +mass 2000006 mdl_Msu6 +mass 2000011 mdl_Msl4 +mass 2000015 mdl_Msl6 +msd2 1 1 mdl_RmD21x1 +msd2 3 3 mdl_RmD23x3 +mse2 1 1 mdl_RmE21x1 +mse2 3 3 mdl_RmE23x3 +msl2 1 1 mdl_RmL21x1 +msl2 3 3 mdl_RmL23x3 +msoft 1 mdl_RMx1 +msoft 2 mdl_RMx2 +msoft 3 mdl_RMx3 +msoft 21 mdl_mHd2 +msoft 22 mdl_mHu2 +msq2 1 1 mdl_RmQ21x1 +msq2 3 3 mdl_RmQ23x3 +msu2 1 1 mdl_RmU21x1 +msu2 3 3 mdl_RmU23x3 +nmix 1 1 mdl_RNN1x1 +nmix 1 2 mdl_RNN1x2 +nmix 1 3 mdl_RNN1x3 +nmix 1 4 mdl_RNN1x4 +nmix 2 1 mdl_RNN2x1 +nmix 2 2 mdl_RNN2x2 +nmix 2 3 mdl_RNN2x3 +nmix 2 4 mdl_RNN2x4 +nmix 3 1 mdl_RNN3x1 +nmix 3 2 mdl_RNN3x2 +nmix 3 3 mdl_RNN3x3 +nmix 3 4 mdl_RNN3x4 +nmix 4 1 mdl_RNN4x1 +nmix 4 2 mdl_RNN4x2 +nmix 4 3 mdl_RNN4x3 +nmix 4 4 mdl_RNN4x4 +selmix 1 1 mdl_RRl1x1 +selmix 2 2 mdl_RRl2x2 +selmix 3 3 mdl_RRl3x3 +selmix 3 6 mdl_RRl3x6 +selmix 4 4 mdl_RRl4x4 +selmix 5 5 mdl_RRl5x5 +selmix 6 3 mdl_RRl6x3 +selmix 6 6 mdl_RRl6x6 +sminputs 1 aEWM1 +sminputs 3 aS +snumix 1 1 mdl_RRn1x1 +snumix 2 2 mdl_RRn2x2 +snumix 3 3 mdl_RRn3x3 +td 3 3 mdl_Rtd3x3 +te 3 3 mdl_Rte3x3 +tu 3 3 mdl_Rtu3x3 +umix 1 1 mdl_RUU1x1 +umix 1 2 mdl_RUU1x2 +umix 2 1 mdl_RUU2x1 +umix 2 2 mdl_RUU2x2 +upmns 1 1 mdl_RMNS1x1 +upmns 2 2 mdl_RMNS2x2 +upmns 3 3 mdl_RMNS3x3 +usqmix 1 1 mdl_RRu1x1 +usqmix 2 2 mdl_RRu2x2 +usqmix 3 3 mdl_RRu3x3 +usqmix 3 6 mdl_RRu3x6 +usqmix 4 4 mdl_RRu4x4 +usqmix 5 5 mdl_RRu5x5 +usqmix 6 3 mdl_RRu6x3 +usqmix 6 6 mdl_RRu6x6 +vckm 1 1 mdl_RCKM1x1 +vckm 2 2 mdl_RCKM2x2 +vckm 3 3 mdl_RCKM3x3 +vmix 1 1 mdl_RVV1x1 +vmix 1 2 mdl_RVV1x2 +vmix 2 1 mdl_RVV2x1 +vmix 2 2 mdl_RVV2x2 +yd 3 3 mdl_Ryd3x3 +ye 3 3 mdl_Rye3x3 +yu 3 3 mdl_Ryu3x3 +decay 6 mdl_WT +decay 23 mdl_WZ +decay 24 mdl_WW +decay 25 mdl_WH01 +decay 35 mdl_WH02 +decay 36 mdl_WA0 - - - - - - - - - - - - - - - - - - - - - - - - - - +decay 37 mdl_WH decay 1000001 mdl_Wsd1 + decay 1000002 mdl_Wsu1 + decay 1000003 mdl_Wsd2 + decay 1000004 mdl_Wsu2 + decay 1000005 mdl_Wsd3 + decay 1000006 mdl_Wsu3 + decay 1000011 mdl_Wsl1 + decay 1000012 mdl_Wsn1 + decay 1000013 mdl_Wsl2 + decay 1000014 mdl_Wsn2 + decay 1000015 mdl_Wsl3 + decay 1000016 mdl_Wsn3 + decay 1000021 mdl_Wgo + decay 1000023 mdl_Wneu2 + decay 1000024 mdl_Wch1 + decay 1000025 mdl_Wneu3 + decay 1000035 mdl_Wneu4 + decay 1000037 mdl_Wch2 + decay 2000001 mdl_Wsd4 + decay 2000002 mdl_Wsu4 + decay 2000003 mdl_Wsd5 + decay 2000004 mdl_Wsu5 + decay 2000005 mdl_Wsd6 + decay 2000006 mdl_Wsu6 + decay 2000011 mdl_Wsl4 + decay 2000013 mdl_Wsl5 + decay 2000015 mdl_Wsl6 -decay 23 mdl_WZ -decay 24 mdl_WW -decay 25 mdl_WH01 -decay 35 mdl_WH02 -decay 36 mdl_WA0 -decay 37 mdl_WH -decay 6 mdl_WT -dsqmix 1 1 mdl_RRd1x1 -dsqmix 2 2 mdl_RRd2x2 -dsqmix 3 3 mdl_RRd3x3 -dsqmix 3 6 mdl_RRd3x6 -dsqmix 4 4 mdl_RRd4x4 -dsqmix 5 5 mdl_RRd5x5 -dsqmix 6 3 mdl_RRd6x3 -dsqmix 6 6 mdl_RRd6x6 -fralpha 1 mdl_alp -hmix 1 mdl_RMUH -hmix 2 mdl_tb -hmix 4 mdl_MA2 -mass 1000001 mdl_Msd1 -mass 1000002 mdl_Msu1 -mass 1000005 mdl_Msd3 -mass 1000006 mdl_Msu3 -mass 1000011 mdl_Msl1 -mass 1000012 mdl_Msn1 -mass 1000015 mdl_Msl3 -mass 1000016 mdl_Msn3 -mass 1000021 mdl_Mgo -mass 1000022 mdl_Mneu1 -mass 1000023 mdl_Mneu2 -mass 1000024 mdl_Mch1 -mass 1000025 mdl_Mneu3 -mass 1000035 mdl_Mneu4 -mass 1000037 mdl_Mch2 -mass 15 mdl_Mta -mass 2000001 mdl_Msd4 -mass 2000002 mdl_Msu4 -mass 2000005 mdl_Msd6 -mass 2000006 mdl_Msu6 -mass 2000011 mdl_Msl4 -mass 2000015 mdl_Msl6 -mass 23 mdl_MZ -mass 24 mdl_MW -mass 25 mdl_MH01 -mass 35 mdl_MH02 -mass 36 mdl_MA0 -mass 37 mdl_MH -mass 5 mdl_MB -mass 6 mdl_MT -msd2 1 1 mdl_RmD21x1 -msd2 3 3 mdl_RmD23x3 -mse2 1 1 mdl_RmE21x1 -mse2 3 3 mdl_RmE23x3 -msl2 1 1 mdl_RmL21x1 -msl2 3 3 mdl_RmL23x3 -msoft 1 mdl_RMx1 -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 -msu2 1 1 mdl_RmU21x1 -msu2 3 3 mdl_RmU23x3 -nmix 1 1 mdl_RNN1x1 -nmix 1 2 mdl_RNN1x2 -nmix 1 3 mdl_RNN1x3 -nmix 1 4 mdl_RNN1x4 -nmix 2 1 mdl_RNN2x1 -nmix 2 2 mdl_RNN2x2 -nmix 2 3 mdl_RNN2x3 -nmix 2 4 mdl_RNN2x4 -nmix 3 1 mdl_RNN3x1 -nmix 3 2 mdl_RNN3x2 -nmix 3 3 mdl_RNN3x3 -nmix 3 4 mdl_RNN3x4 -nmix 4 1 mdl_RNN4x1 -nmix 4 2 mdl_RNN4x2 -nmix 4 3 mdl_RNN4x3 -nmix 4 4 mdl_RNN4x4 -selmix 1 1 mdl_RRl1x1 -selmix 2 2 mdl_RRl2x2 -selmix 3 3 mdl_RRl3x3 -selmix 3 6 mdl_RRl3x6 -selmix 4 4 mdl_RRl4x4 -selmix 5 5 mdl_RRl5x5 -selmix 6 3 mdl_RRl6x3 -selmix 6 6 mdl_RRl6x6 -sminputs 1 aEWM1 -sminputs 3 aS -snumix 1 1 mdl_RRn1x1 -snumix 2 2 mdl_RRn2x2 -snumix 3 3 mdl_RRn3x3 -td 3 3 mdl_Rtd3x3 -te 3 3 mdl_Rte3x3 -tu 3 3 mdl_Rtu3x3 -umix 1 1 mdl_RUU1x1 -umix 1 2 mdl_RUU1x2 -umix 2 1 mdl_RUU2x1 -umix 2 2 mdl_RUU2x2 -upmns 1 1 mdl_RMNS1x1 -upmns 2 2 mdl_RMNS2x2 -upmns 3 3 mdl_RMNS3x3 -usqmix 1 1 mdl_RRu1x1 -usqmix 2 2 mdl_RRu2x2 -usqmix 3 3 mdl_RRu3x3 -usqmix 3 6 mdl_RRu3x6 -usqmix 4 4 mdl_RRu4x4 -usqmix 5 5 mdl_RRu5x5 -usqmix 6 3 mdl_RRu6x3 -usqmix 6 6 mdl_RRu6x6 -vckm 1 1 mdl_RCKM1x1 -vckm 2 2 mdl_RCKM2x2 -vckm 3 3 mdl_RCKM3x3 -vmix 1 1 mdl_RVV1x1 -vmix 1 2 mdl_RVV1x2 -vmix 2 1 mdl_RVV2x1 -vmix 2 2 mdl_RVV2x2 -yd 3 3 mdl_Ryd3x3 -ye 3 3 mdl_Rye3x3 -yu 3 3 mdl_Ryu3x3 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..fa8d3481a2 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 = /home/dmass/Development/madgraph4gpu/amd-ci/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo +mg5_path = /home/dmass/Development/madgraph4gpu/amd-ci/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..d39c897141 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.3 2025-06-12 * #* * #* WARNING: UNKNOWN DEVELOPMENT VERSION. * #* WARNING: DO NOT USE FOR PRODUCTION * @@ -35,16 +35,18 @@ set loop_color_flows False set max_npoint_for_channel 0 set default_unset_couplings 99 set max_t_for_channel 99 +set zerowidth_tchannel True set nlo_mixed_expansion True -set stdout_level DEBUG -set zerowidth_tchannel F -import model MSSM_SLHA2 +import model sm define p = g u c d s u~ c~ d~ s~ define j = g u c d s u~ c~ d~ s~ define l+ = e+ mu+ define l- = e- mu- define vl = ve vm vt define vl~ = ve~ vm~ vt~ +set stdout_level DEBUG +set zerowidth_tchannel F +import model MSSM_SLHA2 generate g g > t1 t1~ -output madevent_simd ../TMPOUT/CODEGEN_mad_susy_gg_t1t1 --hel_recyclin\ -g=False --vector_size=32 +output madevent_simd susy_gg_t1t1.mad_gen --hel_recycling=False --vect\ +or_size=32 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..85e1d39035 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/Cards/run_card.dat +++ b/epochX/cudacpp/susy_gg_t1t1.mad/Cards/run_card.dat @@ -92,11 +92,11 @@ #********************************************************************* # Compilation flag. #********************************************************************* - -O3 -ffast-math -fbounds-check = global_flag ! build flags for all Fortran code (for a fair comparison to cudacpp; default is -O) + -O = global_flag ! fortran optimization flag use for the all code. --fast-math = aloha_flag ! fortran optimization flag for aloha function. Suggestions: '-ffast-math' -O3 = matrix_flag ! fortran optimization flag for matrix.f function. Suggestions: '-O3' - 32 = vector_size ! size of fortran arrays allocated in the multi-event API for SIMD/GPU (VECSIZE_MEMMAX) - 512 = nb_warp ! total number of warp/frontwave + 16 = vector_size ! size of fortran arrays allocated in the multi-event API for SIMD/GPU (VECSIZE_MEMMAX) + 1 = nb_warp ! total number of warp/frontwave #********************************************************************* # Customization (custom cuts/scale/bias/...) * @@ -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..1ac53bb4bd 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.3 \ No newline at end of file diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/Source/.make_opts b/epochX/cudacpp/susy_gg_t1t1.mad/Source/.make_opts index de3864242b..56ba259c56 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/Source/.make_opts +++ b/epochX/cudacpp/susy_gg_t1t1.mad/Source/.make_opts @@ -102,6 +102,7 @@ endif ifneq ($(lhapdf),) CXXFLAGS += $(shell $(lhapdf) --cppflags) alfas_functions=alfas_functions_lhapdf + alfas_to_clean=alfas_functions.o llhapdf+= $(shell $(lhapdf) --cflags --libs) -lLHAPDF # check if we need to activate c++11 (for lhapdf6.2) ifeq ($(origin CXX),default) @@ -113,10 +114,11 @@ ifneq ($(lhapdf),) endif else alfas_functions=alfas_functions + alfas_to_clean=alfas_functions_lhapdf.o llhapdf= endif # Helper function to check MG5 version define CHECK_MG5AMC_VERSION python -c 'import re; from distutils.version import StrictVersion; print StrictVersion("$(MG5AMC_VERSION)") >= StrictVersion("$(1)") if re.match("^[\d\.]+$$","$(MG5AMC_VERSION)") else True;' -endef \ No newline at end of file +endef 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..bdf427601f 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/Source/make_opts +++ b/epochX/cudacpp/susy_gg_t1t1.mad/Source/make_opts @@ -1,12 +1,11 @@ DEFAULT_CPP_COMPILER=g++ -DEFAULT_F2PY_COMPILER=f2py3 -DEFAULT_F_COMPILER=gfortran -GLOBAL_FLAG=-O3 -ffast-math -fbounds-check MACFLAG= +STDLIB=-lstdc++ +STDLIB_FLAG= +DEFAULT_F2PY_COMPILER=f2py +DEFAULT_F_COMPILER=gfortran MG5AMC_VERSION=SpecifiedByMG5aMCAtRunTime PYTHIA8_PATH=NotInstalled -STDLIB_FLAG= -STDLIB=-lstdc++ #end_of_make_opts_variables BIASLIBDIR=../../../lib/ @@ -103,6 +102,7 @@ endif ifneq ($(lhapdf),) CXXFLAGS += $(shell $(lhapdf) --cppflags) alfas_functions=alfas_functions_lhapdf +alfas_to_clean=alfas_functions.o llhapdf+= $(shell $(lhapdf) --cflags --libs) -lLHAPDF # check if we need to activate c++11 (for lhapdf6.2) ifeq ($(origin CXX),default) @@ -114,6 +114,7 @@ endif endif else alfas_functions=alfas_functions +alfas_to_clean=alfas_functions_lhapdf.o llhapdf= endif diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/Source/makefile b/epochX/cudacpp/susy_gg_t1t1.mad/Source/makefile index 291ca907ee..87a9e61723 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/Source/makefile +++ b/epochX/cudacpp/susy_gg_t1t1.mad/Source/makefile @@ -37,10 +37,12 @@ all: $(LIBRARIES) $(LIBDIR)libdhelas.$(libext) $(LIBDIR)libpdf.$(libext) $(LIBDI $(LIBDIR)libdsample.$(libext): $(DSAMPLE) $(call CREATELIB, $@, $^) $(LIBDIR)libgeneric.$(libext): $(GENERIC) + rm -f $@ 2>/dev/null $(call CREATELIB, $@, $^) + rm -f $(alfas_to_clean) 2>/dev/null $(LIBDIR)libdhelas.$(libext): DHELAS cd DHELAS; make; cd .. -$(LIBDIR)libpdf.$(libext): PDF make_opts +$(LIBDIR)libpdf.$(libext): PDF $(alfas_functions).o cd PDF; make; cd .. ifneq (,$(filter edff chff, $(pdlabel1) $(pdlabel2))) $(LIBDIR)libgammaUPC.$(libext): PDF/gammaUPC @@ -73,6 +75,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/vector.inc b/epochX/cudacpp/susy_gg_t1t1.mad/Source/vector.inc index ba125272b6..9d8b377aa7 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/Source/vector.inc +++ b/epochX/cudacpp/susy_gg_t1t1.mad/Source/vector.inc @@ -30,6 +30,8 @@ C INTEGER WARP_SIZE PARAMETER (WARP_SIZE=32) INTEGER NB_WARP - PARAMETER (NB_WARP=512) + PARAMETER (NB_WARP=1) INTEGER VECSIZE_MEMMAX - PARAMETER (VECSIZE_MEMMAX=16384) + PARAMETER (VECSIZE_MEMMAX=32) + + 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..1ac53bb4bd 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.3 \ 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/P1_gg_t1t1x/CPPProcess.cc b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/P1_gg_t1t1x/CPPProcess.cc index 1b3601c86b..c3b7755720 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -578,7 +578,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- 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..922a59d95f 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.3, 2025-06-12 // 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..b5d6d679c1 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.3, 2025-06-12 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..cde448f79e 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.3, 2025-06-12 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.3, 2025-06-12 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 @@ -484,6 +488,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C Generate events only if IMODE is 0. IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN C Call UNWGT to unweight and store events + ICONFIG = CHANNELS(IVEC) CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) ENDIF diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/P1_gg_t1t1x/driver.f b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/P1_gg_t1t1x/driver.f index 3fc552a31d..25dc37ef1e 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/P1_gg_t1t1x/driver.f +++ b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/P1_gg_t1t1x/driver.f @@ -489,7 +489,6 @@ subroutine open_file_local(lun,filename,fopened) fopened=.false. tempname=filename fine=index(tempname,' ') -c fine2=index(path,' ')-1 ! AV remove valgrind "Conditional jump or move depends on uninitialised value(s)" if(fine.eq.0) fine=len(tempname) open(unit=lun,file=tempname,status='old',ERR=20) fopened=.true. 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..60a896f60b 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.3, 2025-06-12 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.3, 2025-06-12 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,23 +384,31 @@ 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 C ---------- IF (FIRST) THEN FIRST=.FALSE. - IF(ZERO.NE.0D0) FK_ZERO = SIGN(MAX(ABS(ZERO), ABS(ZERO - $ *SMALL_WIDTH_TREATMENT)), ZERO) - IF(MDL_WSU3.NE.0D0) FK_MDL_WSU3 = SIGN(MAX(ABS(MDL_WSU3), - $ ABS(MDL_MSU3*SMALL_WIDTH_TREATMENT)), MDL_WSU3) - IF(MDL_WSU6.NE.0D0) FK_MDL_WSU6 = SIGN(MAX(ABS(MDL_WSU6), - $ ABS(MDL_MSU6*SMALL_WIDTH_TREATMENT)), MDL_WSU6) + FK_ZERO = 0D0 + IF(MDL_WSU3.NE.0D0) THEN + FK_MDL_WSU3 = SIGN(MAX(ABS(MDL_WSU3), ABS(MDL_MSU3 + $ *SMALL_WIDTH_TREATMENT)), MDL_WSU3) + ELSE + FK_MDL_WSU3 = 0D0 + ENDIF + + IF(MDL_WSU6.NE.0D0) THEN + FK_MDL_WSU6 = SIGN(MAX(ABS(MDL_WSU6), ABS(MDL_MSU6 + $ *SMALL_WIDTH_TREATMENT)), MDL_WSU6) + ELSE + FK_MDL_WSU6 = 0D0 + ENDIF + IF(INIT_MODE) THEN ZEROAMP_1(:,:) = .TRUE. @@ -451,10 +460,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 +474,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/addmothers.f b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/addmothers.f index 9a31ed201d..6f32477b9e 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/addmothers.f +++ b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/addmothers.f @@ -21,7 +21,7 @@ subroutine addmothers(ip,jpart,pb,isym,jsym,rscale,aqcd,aqed,buff, integer icol ! color selected integer isym(nexternal,99), jsym - integer i,j,k,ida(2),ns,nres,ires,icl,ito2,idenpart,nc,ic + integer i,j,k,ida(2),ns,nres,ires,icl,ito2,idenpart,ic integer mo_color,da_color(2),itmp integer ito(-nexternal+3:nexternal),iseed,maxcolor,maxorg integer icolalt(2,-nexternal+2:2*nexternal-3) @@ -113,14 +113,15 @@ subroutine addmothers(ip,jpart,pb,isym,jsym,rscale,aqcd,aqed,buff, endif lconfig = vec_igraph1(ivec) endif - + is_LC=.true. + maxcolor=0 c c Choose a color flow which is certain to work with the propagator c structure of the chosen diagram and use that as an alternative c if (icol.eq.0) then do i=1,nexternal - icolalt(1,i)=0 + icolalt(1,i)=0 icolalt(2,i)=0 enddo else diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/cluster.f b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/cluster.f index b8995283ed..907894ea89 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/cluster.f +++ b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/cluster.f @@ -556,6 +556,8 @@ logical function cluster(p, ivec) jwin = 0 cluster=.false. clustered=.false. + iwin =0 + jwin =0 do i=0,3 pcmsp(i)=0 enddo @@ -665,8 +667,11 @@ logical function cluster(p, ivec) c initialize graph storage igraphs(0)=0 nleft=nexternal -c cluster - if (iwin.eq.0.or.jwin.eq.0) stop 21 + if(iwin.eq.0.or.jwin.eq.0)then + cluster=.false. + return + endif +c cluster do n=1,nexternal-2 c combine winner imocl(n)=imap(iwin,2)+imap(jwin,2) diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/cudacpp.mk index 20d8ded718..20b8e6b858 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/cudacpp.mk @@ -114,7 +114,7 @@ export CXXFLAGS override CUDA_HOME = $(patsubst %/bin/nvcc,%,$(shell which nvcc 2>/dev/null)) # Set HIP_HOME from the path to hipcc, if it exists -override HIP_HOME = $(patsubst %/bin/hipcc,%,$(shell which hipcc 2>/dev/null)) +override HIP_HOME = $(shell hipconfig --rocmpath) # Configure CUDA_INC (for CURAND and NVTX) and NVTX if a CUDA installation exists (see #965) ifeq ($(CUDA_HOME),) @@ -229,6 +229,8 @@ ifeq ($(BACKEND),cuda) else ifeq ($(BACKEND),hip) + # example architecture values MI200:gfx90a, MI350X:gfx942 + MADGRAPH_HIP_ARCHITECTURE ?= gfx942 # Set GPUCC as $(HIP_HOME)/bin/hipcc (it was already checked above that this exists) GPUCC = $(HIP_HOME)/bin/hipcc XCOMPILERFLAG = @@ -243,7 +245,7 @@ else ifeq ($(BACKEND),hip) ###GPUFLAGS += -ggdb # FOR DEBUGGING ONLY # AMD HIP architecture flags - GPUARCHFLAGS = --offload-arch=gfx90a + GPUARCHFLAGS = --offload-arch=${MADGRAPH_HIP_ARCHITECTURE} GPUFLAGS += $(GPUARCHFLAGS) # Other AMD-specific flags @@ -878,7 +880,7 @@ endif $(gpu_fcheckmain): LIBFLAGS += $(GPULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH $(gpu_fcheckmain): $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBDIR)/lib$(MG5AMC_GPULIB).so $(gpu_objects_exe) ifneq ($(findstring hipcc,$(GPUCC)),) # link fortran/c++/hip using $FC when hipcc is used #802 - $(FC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) -lstdc++ -L$(shell cd -L $(shell dirname $(shell $(GPUCC) -print-prog-name=clang))/../..; pwd)/lib -lamdhip64 + $(FC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) -lstdc++ -L$(HIP_HOME)/lib -lamdhip64 else $(GPUCC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) endif @@ -979,7 +981,7 @@ else # link only runTest_$(GPUSUFFIX).o (new: in the past, this was linking both $(gpu_testmain): LIBFLAGS += $(GPULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH $(gpu_testmain): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(gpu_objects_lib) $(gpu_objects_exe) $(GTESTLIBS) ifneq ($(findstring hipcc,$(GPUCC)),) # link fortran/c++/hip using $FC when hipcc is used #802 - $(FC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lstdc++ -lpthread -L$(shell cd -L $(shell dirname $(shell $(GPUCC) -print-prog-name=clang))/../..; pwd)/lib -lamdhip64 + $(FC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lstdc++ -lpthread -L$(HIP_HOME)/lib -lamdhip64 else $(GPUCC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lcuda endif @@ -1104,10 +1106,20 @@ else @cat /proc/cpuinfo | grep "physical id" | sort -u endif @echo "" -ifneq ($(shell which nvidia-smi 2>/dev/null),) - nvidia-smi -L + # some systems may have -smi installed, but it fails to execute + # because it cannot communicate with the hardware + @if nvidia-smi &>/dev/null ; then \ + nvidia-smi -L ;\ + else \ + echo "No Nvidia GPU detected" ;\ + fi @echo "" -endif + @if amd-smi &>/dev/null ; then \ + amd-smi static -a ;\ + amd-smi list ;\ + else \ + echo "No AMD GPU detected" ;\ + fi @echo USECCACHE=$(USECCACHE) ifeq ($(USECCACHE),1) ccache --version | head -1 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/SubProcesses/proc_characteristics b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/proc_characteristics index 9c57d84817..79062088d3 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/proc_characteristics +++ b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/proc_characteristics @@ -8,7 +8,7 @@ ninitial = 2 grouped_matrix = True has_loops = False - bias_module = dummy + bias_module = None max_n_matched_jets = 0 colored_pdgs = [1, 2, 3, 4, 5, 6, 21, 1000001, 1000002, 1000003, 1000004, 1000005, 1000006, 1000021, 2000001, 2000002, 2000003, 2000004, 2000005, 2000006] complex_mass_scheme = False diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/reweight.f b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/reweight.f index 0a0bafa7c1..189ba41449 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/reweight.f +++ b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/reweight.f @@ -1186,7 +1186,7 @@ logical function setclscales(p, keepq2bck, ivec) if(nexternal.gt.3) pt2ijcl(nexternal-3)=q2fact(2) else if(.not.fixed_fac_scale1) q2fact(1)=scalefact**2*pt2ijcl(nexternal-2) - if(.not.fixed_fac_scale2) q2fact(2)=scalefact**2*q2fact(1) + if(.not.fixed_fac_scale2) q2fact(2)=scalefact**2*pt2ijcl(nexternal-2) endif elseif(jcentral(1).eq.0)then if(.not.fixed_fac_scale1) q2fact(1) = scalefact**2*pt2ijcl(jfirst(1)) diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/symmetry.f b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/symmetry.f index 309540a0a2..2afd9e9f75 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/symmetry.f +++ b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/symmetry.f @@ -232,7 +232,7 @@ subroutine write_bash(mapconfig,use_config, prwidth, jcomp,iforest, c write(*,*) 'mapping',ic,mapconfig(i),icode if (icode .eq. 0) then c Create format string based on number of digits - write(formstr,'(a,i1,a)') '(I',nconf,'$)' + write(formstr,'(a,i1,a)') '(I',nconf,',$)' write(*,formstr) mapconfig(i) c Write symmetry factors write(formstr2,'(a,i2,a)') '(2i',nsym,')' @@ -242,10 +242,10 @@ subroutine write_bash(mapconfig,use_config, prwidth, jcomp,iforest, dconfig=mapconfig(i)+icode*1d0/10**ncode if(nconf+ncode+1.lt.10) then write(formstr,'(a,i1,a,i1,a)') '(F',nconf+ncode+1, - $ '.',ncode,'$)' + $ '.',ncode,',$)' else write(formstr,'(a,i2,a,i1,a)') '(F',nconf+ncode+1, - $ '.',ncode,'$)' + $ '.',ncode,',$)' endif write(*,formstr) dconfig c Write symmetry factors @@ -260,7 +260,7 @@ subroutine write_bash(mapconfig,use_config, prwidth, jcomp,iforest, dconfig=mapconfig(i)+icode*1d0/10**ncode write(27,formstr2) dconfig,use_config(i) endif - write(*,'(a$)') ' ' + write(*,'(a,$)') ' ' 100 call bw_increment_array(iarray,imax,ibase,done) enddo else diff --git a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/unwgt.f b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/unwgt.f index f602511c94..d1247f1849 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/unwgt.f +++ b/epochX/cudacpp/susy_gg_t1t1.mad/SubProcesses/unwgt.f @@ -497,6 +497,7 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) integer ip, np, ic, nc integer ida(2),ito(-nexternal+3:nexternal),ns,nres,ires,icloop integer iseed + double precision beam_mass double precision pboost(0:3) double precision beta, get_betaz double precision ebi(0:3), ebo(0:3) @@ -506,7 +507,7 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) integer idup(nexternal,maxproc,maxsproc) integer mothup(2,nexternal) integer icolup(2,nexternal,maxflow,maxsproc) - + double precision eta integer nsym integer ievent @@ -638,21 +639,20 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) if (nincoming.eq.2) then if (xbk(1) .gt. 0d0 .and. xbk(1) .le. 1d0 .and. $ xbk(2) .gt. 0d0 .and. xbk(2) .le. 1d0) then - if(lpp(2).ne.0.and.(xbk(1).eq.1d0.or.pmass(1).eq.0d0).and.xbk(2).ne.1d0) then - ! construct the beam momenta in each frame and compute the related (z)boost - if (pmass(1).eq.0d0.and.(abs(lpp(1)).eq.3.or.abs(lpp(1)).eq.4).and.ebeam(1).gt.10d0*m1)then - local_mass = 0d0 - else - local_mass = m1 - endif + if(lpp(2).ne.0.and.(xbk(1).eq.1d0.or.pmass(1).eq.0d0)) then + if((abs(lpp(1)).gt.2.and.abs(lpp(1)).ne.9).or.xbk(1).eq.1d0)then + beam_mass = pmass(1) + else + beam_mass = m1 + endif ebi(0) = p(0,1)/xbk(1) ! this assumes that particle 1 is massless or mass equal to beam ebi(1) = 0 ebi(2) = 0 - ebi(3) = DSQRT(ebi(0)**2-local_mass**2) + ebi(3) = DSQRT(ebi(0)**2-beam_mass**2) ebo(0) = ebeam(1) ebo(1) = 0 ebo(2) = 0 - ebo(3) = DSQRT(ebo(0)**2-local_mass**2) + ebo(3) = DSQRT(ebo(0)**2-beam_mass**2) beta = get_betaz(ebi, ebo) if (xbk(1).eq.1d0) then pb(0,isym(1,jsym)) = ebo(0) @@ -668,20 +668,19 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) enddo else - if (pmass(1).eq.0d0.and.(abs(lpp(1)).eq.3.or.abs(lpp(1)).eq.4.and.ebeam(2).gt.10d0*m2))then - local_mass = 0d0 - else - local_mass = m2 - endif - ebi(0) = p(0,1)/xbk(1) ! this assumes that particle 1 is massless or mass equal to beam + if((abs(lpp(2)).gt.2.and.abs(lpp(2)).ne.9).or.xbk(2).eq.1d0)then + beam_mass = pmass(2) + else + beam_mass = m2 + endif ebi(0) = p(0,2)/xbk(2) ! this assumes that particle 2 is massless or mass equal to beam ebi(1) = 0 ebi(2) = 0 - ebi(3) = -1d0*DSQRT(ebi(0)**2-local_mass**2) + ebi(3) = -1d0*DSQRT(ebi(0)**2-beam_mass**2) ebo(0) = ebeam(2) ebo(1) = 0 ebo(2) = 0 - ebo(3) = -1d0*DSQRT(ebo(0)**2-local_mass**2) + ebo(3) = -1d0*DSQRT(ebo(0)**2-beam_mass**2) beta = get_betaz(ebi, ebo) if (xbk(2).eq.1d0) then pb(0,isym(2,jsym)) = ebo(0) @@ -701,6 +700,21 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) write(*,*) 'Warning bad x1 or x2 in write_leshouche', $ xbk(1),xbk(2) endif + do j=1,nexternal + call zboost_with_beta(p(0,j),beta,pb(0,isym(j,jsym))) + pb(4,isym(j,jsym))=pmass(j) + enddo + + ! check for numerical_accuracy + if (pb(0,1).gt.ebeam(1).or.pb(0,2).gt.ebeam(2))then + ! go back to old method --more accurate when boosting with xbk close to one-- + eta = sqrt(xbk(1)*ebeam(1)/(xbk(2)*ebeam(2))) + pboost(0)=p(0,1)*(eta + 1d0/eta) + pboost(3)=p(0,1)*(eta - 1d0/eta) + do j=1,nexternal + call boostx(p(0,j),pboost,pb(0,isym(j,jsym))) + enddo + endif else do j=1,nexternal call boostx(p(0,j),pboost,pb(0,isym(j,jsym))) @@ -709,6 +723,8 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) enddo endif + + if (IMIRROR.eq.2.and.pmass(1).ne.pmass(2)) then c Note that in this context isym(1,jsym) should never be "2" since the mass differ pb(4,isym(1,jsym))=pmass(2) 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..2efb5954a6 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] @@ -1991,6 +1991,11 @@ def default_setup(self): self.add_param("PartonLevel:FSRinResonances", True, hidden=True, always_write_to_card=False, comment="Do not allow shower to run from decay product of unstable particle") self.add_param("ProcessLevel:resonanceDecays", True, hidden=True, always_write_to_card=False, comment="Do not allow unstable particle to decay.") + # Parameters only needed for main164 type of run (not pythia8/MG5 interface) + self.add_param("Main:HepMC", True, hidden=True, always_write_to_card=False, + comment="""Specify the type of output to be used by the main164 run. """) + self.add_param("HepMC:output", 'hepmc.gz', hidden=True, always_write_to_card=False, + comment="Specify the HepMC output file to be used by the main164 run.") # Add parameters controlling the subruns execution flow. # These parameters should not be part of PY8SubRun daughter. self.add_default_subruns('parameters') @@ -2087,8 +2092,10 @@ def MadGraphSet(self, name, value, **opts): force = False if name.lower() not in self or (force or name.lower() not in self.user_set): self.__setitem__(name, value, change_userdefine=False, **opts) - self.system_set.add(name.lower()) - + self.system_set.add(name.lower()) + else: + raise Exception("The parameter %s is already set to %s. You can not change it." % (name, self[name])) + def defaultSet(self, name, value, **opts): self.__setitem__(name, value, change_userdefine=False, **opts) @@ -2144,9 +2151,19 @@ def pythia8_formatting(value, formatv=None): else: return ','.join([PY8Card.pythia8_formatting(arg) for arg in value]) + #change of name convention between MG5 old interface and main164 from Pythia8 + interface_to_164 = {'HEPMCoutput:file': 'HepMC:output', + 'SysCalc:fullCutVariation': '!SysCalc:fullCutVariation (not supported with 164)', + 'SysCalc:qCutList': '!SysCalc:qCutList (not supported with 164)', + 'SysCalc:qWeed': '!SysCalc:qWeed (not supported with 164)', + 'SysCalc:tmsList': '!SysCalc:tmsList (not supported with 164)', + 'HEPMCoutput:scaling' : '!HEPMCoutput :scaling (not supported with 164)', + 'LHEFInputs:nSubruns' : 'Main:numberOfSubruns'} + def write(self, output_file, template, read_subrun=False, - print_only_visible=False, direct_pythia_input=False, add_missing=True): + print_only_visible=False, direct_pythia_input=False, add_missing=True, + use_mg5amc_py8_interface=False): """ Write the card to output_file using a specific template. > 'print_only_visible' specifies whether or not the hidden parameters should be written out if they are in the hidden_params_to_always_write @@ -2155,7 +2172,12 @@ def write(self, output_file, template, read_subrun=False, in the self.visible_params_to_always_write list and are not user_set or system_set are commented. > If 'add_missing' is False then parameters that should be written_out but are absent - from the template will not be written out.""" + from the template will not be written out. + > use_mg5amc_py8_interface is a flag to indicate that the MG5aMC-PY8 interface is used or not + if not used some parameters need to be translated from the old convention to the new one + """ + + self.use_mg5amc_py8_interface = use_mg5amc_py8_interface # First list the visible parameters visible_param = [p for p in self if p.lower() not in self.hidden_param @@ -2297,7 +2319,16 @@ def group_params(params): else: # Just copy parameters which don't need to be specified if param.lower() not in self.params_to_never_write: - output.write(line) + + if not use_mg5amc_py8_interface and direct_pythia_input and \ + param in self.interface_to_164: + param_entry = self.interface_to_164[param.strip()] + # special case for HepMC needs two flags + if 'HepMC:output' == param_entry: + output.write(' %s=%s\n'%('Main:HepMC', 'on')) + output.write('%s=%s\n'%(param_entry,new_value)) + else: + output.write(line) else: output.write('! The following parameter was forced to be commented out by MG5aMC.\n') output.write('! %s'%line) @@ -2313,6 +2344,7 @@ def group_params(params): if ((not direct_pythia_input) or (param.lower() in self.visible_params_to_always_write) or (param.lower() in self.user_set) or + (param.lower() in self.hidden_params_to_always_write) or (param.lower() in self.system_set)): template = '%s=%s' else: @@ -2321,6 +2353,19 @@ def group_params(params): # then they shouldn't be passed to Pythia template = '!%s=%s' + if not use_mg5amc_py8_interface and direct_pythia_input and \ + param in self.interface_to_164: + param_entry = self.interface_to_164[param] + # special case for HepMC needs two flags + if 'HepMC:output' == param_entry: + output.write(' %s=%s\n'%('Main:HepMC', 'on')) + if 'Main:InternalAnalysis'.lower() in self.user_set and \ + self['Main:InternalAnalysis'].lower() == 'on': + output.write('InternalAnalysis:output = ./djrs.dat\n') + + #elif param in self.interface_to_164.values() and not direct_pythia_input: + # misc.sprint(use_mg5amc_py8_interface, direct_pythia_input,param) + # raise Exception('The parameter %s is not supported in the MG5aMC-PY8 interface. Please use the new interface.'%param_entry output.write(template%(param_entry, value_entry.replace(value,new_value))) @@ -2365,6 +2410,8 @@ def group_params(params): comment = '\n'.join('! %s'%c for c in self.comments[param.lower()].split('\n')) output.write(comment+'\n') + if not use_mg5amc_py8_interface and param in self.interface_to_164: + continue output.write('%s=%s\n'%(param,PY8Card.pythia8_formatting(self[param]))) # Don't close the file if we were reading a subrun, but simply write @@ -3318,7 +3365,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 +3372,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 @@ -4050,8 +4095,8 @@ def post_set_fixed_fac_scale(card, value, change_userdefine, raiseerror, **opt): if 'fixed_fac_scale2' in card.user_set: card.user_set.remove('fixed_fac_scale2') - # #card['pdlabel1'] = value - # #card['pdlabel2'] = value + dict.__setitem__(card, 'fixed_fac_scale1', card['fixed_fac_scale']) + dict.__setitem__(card, 'fixed_fac_scale2', card['fixed_fac_scale']) @staticmethod def post_set(card, value, change_userdefine, raiseerror, name='unknown', **opt): @@ -4201,6 +4246,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 @@ -4451,11 +4497,11 @@ def check_validity(self): time.sleep(5) if self['drjj'] != 0: if 'drjj' in self.user_set: - logger.warning('Since icckw>0, changing the value of \'drjj\' to 0') + logger.warning('Since ickkw>0, changing the value of \'drjj\' to 0') self['drjj'] = 0 if self['drjl'] != 0: if 'drjl' in self.user_set: - logger.warning('Since icckw>0, changing the value of \'drjl\' to 0') + logger.warning('Since ickkw>0, changing the value of \'drjl\' to 0') self['drjl'] = 0 if not self['auto_ptj_mjj']: if self['mmjj'] > self['xqcut']: @@ -4753,7 +4799,6 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): self['fixed_fac_scale1'] = True self['nhel'] = 1 for i in beam_id_split[1]: - exit if abs(i) == 11: self['lpp1'] = -math.copysign(3,i) self['lpp2'] = math.copysign(3,i) @@ -5577,6 +5622,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 +5838,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/cluster.py b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/cluster.py index 95ef45b5f3..66069293d2 100755 --- a/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/cluster.py +++ b/epochX/cudacpp/susy_gg_t1t1.mad/bin/internal/cluster.py @@ -602,6 +602,7 @@ def __init__(self, *args, **opt): self.submitted = six.moves.queue.Queue() # one entry by job submitted self.stoprequest = threading.Event() #flag to ensure everything to close self.demons = [] + self.gpus_list = [] self.nb_done =0 if 'nb_core' in opt: self.nb_core = opt['nb_core'] @@ -623,23 +624,46 @@ def __init__(self, *args, **opt): self.done_pid_queue = six.moves.queue.Queue() self.fail_msg = None + mg5_gpu_env_str = 'MG5_GPU_VISIBLE_DEVICES' + gpu_variables = [['NVIDIA_VISIBLE_DEVICES', 'CUDA_VISIBLE_DEVICES'], + ['ROCR_VISIBLE_DEVICES', 'HIP_VISIBLE_DEVICES'],] + if mg5_gpu_env_str in os.environ: + new_var = os.environ[mg5_gpu_env_str].split(',') + if len(new_var) == 2: + gpu_variables.insert(0, new_var) + else: + logger.error('Invalid format for %s=%s, it should be a comma-separated list of two elements' % (mg5_gpu_env_str, os.environ[mg5_gpu_env_str])) + for get_var,set_var in gpu_variables: + if get_var in os.environ: + self.gpus_list = os.environ.get(get_var).split(',') + self.gpu_set_var = set_var + self.gpus_count = len(self.gpus_list) + logger.info('Found %s GPUs: %s' % (self.gpus_count, self.gpus_list)) def start_demon(self): import threading - t = threading.Thread(target=self.worker) + env2 = None + if len(self.gpus_list): + env2 = os.environ.copy() + this_gpu_idx = len(self.demons) % self.gpus_count + env2[self.gpu_set_var] = self.gpus_list[this_gpu_idx] + t = threading.Thread(target=self.worker, kwargs={'env2': env2}) + else: + t = threading.Thread(target=self.worker) t.daemon = True t.start() self.demons.append(t) - def worker(self): + def worker(self, env2=None): import six.moves.queue import six.moves._thread while not self.stoprequest.isSet(): try: args = self.queue.get(timeout=10) tag, exe, arg, opt = args + opt['env'] = env2 try: # check for executable case if isinstance(exe,str): 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..69291df0d4 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): @@ -1463,11 +1463,15 @@ def create_plot(self, mode='parton', event_path=None, output=None, tag=None): self.run_name, '%s_pts.dat' % tag) for observable_name, data_path in [('djr',djr_path), ('pt',pt_path)]: - if not self.generate_Pythia8_HwU_plots( + try: + if not self.generate_Pythia8_HwU_plots( PY8_plots_root_path, merging_scale_name, observable_name,data_path): - return False - + return False + except Exception as error: + if os.path.exists(data_path): + logger.info('plot information present in %s' % data_path) + return True if mode == 'Pythia8': plot_files = glob.glob(pjoin(PY8_plots_root_path,'*.gnuplot')) if not misc.which('gnuplot'): @@ -1964,12 +1968,16 @@ def do_systematics(self, line): self.cluster.wait(os.path.dirname(output), update_status, update_first=update_status) except Exception: self.cluster.remove() + for i in range(nb_submit): + os.remove('%s/tmp_%s_%s' %(os.path.dirname(output),i,os.path.basename(output))) old_run_mode = self.options['run_mode'] self.options['run_mode'] =0 + out =False try: out = self.do_systematics(line) finally: self.options['run_mode'] = old_run_mode + return out #collect the data all_cross = [] for i in range(nb_submit): @@ -1995,18 +2003,21 @@ def do_systematics(self, line): self.run_card['event_norm'] in ['unity']: all_cross= [cross/nb_event for cross in all_cross] - sys_obj = systematics.call_systematics([input, None] + opts, - log=lambda x: logger.info(str(x)), - result=result_file, - running=False - ) + + sys_obj = systematics.call_systematics([input, None] + opts, + log=lambda x: logger.info(str(x)), + result=result_file, + running=False + ) + sys_obj.print_cross_sections(all_cross, nb_event, result_file) - + #concatenate the output file subprocess.call(['cat']+\ ['./tmp_%s_%s' % (i, os.path.basename(output)) for i in range(nb_submit)], stdout=open(output,'w'), cwd=os.path.dirname(output)) + for i in range(nb_submit): os.remove('%s/tmp_%s_%s' %(os.path.dirname(output),i,os.path.basename(output))) # os.remove('%s/log_sys_%s.txt' % (os.path.dirname(output),i)) @@ -3831,7 +3842,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 +5146,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 +6751,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 +6775,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 +6826,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..6fbdd98100 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': @@ -1858,6 +1855,8 @@ def parse_histos_from_PY8_XML_stream(self, stream, run_id=None, # If merging cut is negative, then pick only the one of the central scale # If not specified, then take them all but use the PDF and scale weight # of the central merging_scale for the variation. + if not all_weights: + raise MadGraph5Error('No weights were found in the HwU XML source.') if merging_scale is None or merging_scale < 0.0: merging_scale_chosen = all_weights[2]['MERGING'] else: @@ -2480,14 +2479,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 +2738,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 +2877,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 +2889,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 +2898,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 +2907,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 +2916,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..b1739da73d 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 @@ -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: O. Mattelaer (Aug 2023) for the MG5aMC CUDACPP plugin. -# Further modified by: O. Mattelaer, A. Valassi (2024) for the MG5aMC CUDACPP plugin. +# Further modified by: O. Mattelaer, A. Valassi, Z. Wettersten (2024-2025) for the MG5aMC CUDACPP plugin. import logging import os @@ -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') @@ -133,7 +133,8 @@ def default_setup(self): super().default_setup() # change default value: self['cudacpp_backend'] = 'cuda' - self['vector_size'] = 16384 # already setup in default class (just change value) + self['vector_size'] = 32 # ZW: default to 32, might want to change to 64 to utilise AMD GPUs better as well # 16384 # already setup in default class (just change value) + self['nb_warp'] = 512 # number of warps per kernel call, for now setting to 16 384 / vector_size MEINTERFACE = CPPMEInterface RunCard = CPPRunCard 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..81d17f7cb1 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 @@ -1035,12 +1035,12 @@ def define_init_banner(self, wgt, lha_strategy, proc_charac=None): from_init = True if not from_init: - if group in grouped_cross: - grouped_cross[group] += self.allcross[i] - grouped_error[group] += self.error[i]**2 + if int(group) in grouped_cross: + grouped_cross[int(group)] += self.allcross[i] + grouped_error[int(group)] += self.error[i]**2 else: - grouped_cross[group] = self.allcross[i] - grouped_error[group] = self.error[i]**2 + grouped_cross[int(group)] = self.allcross[i] + grouped_error[int(group)] = self.error[i]**2 else: ban = banner_mod.Banner(ff.banner) for line in ban['init'].split('\n'): @@ -1048,11 +1048,11 @@ def define_init_banner(self, wgt, lha_strategy, proc_charac=None): if len(splitline)==4: cross, error, _, group = splitline if int(group) in grouped_cross: - grouped_cross[group] += float(cross) - grouped_error[group] += float(error)**2 + grouped_cross[int(group)] += float(cross) + grouped_error[int(group)] += float(error)**2 else: - grouped_cross[group] = float(cross) - grouped_error[group] = float(error)**2 + grouped_cross[int(group)] = float(cross) + grouped_error[int(group)] = float(error)**2 nb_group = len(grouped_cross) # compute the information for the first line @@ -1086,6 +1086,8 @@ def define_init_banner(self, wgt, lha_strategy, proc_charac=None): self.seek(0) if init_information["idbmup2"] in [0,9]: event = next(self) + if len(event) == 0: + event = Event(str(event)) init_information["idbmup2"] = event[1].pdg self.seek(0) @@ -2166,10 +2168,13 @@ def check(self): abspz += abs(particle.pz) # check mass fourmass = FourMomentum(particle).mass - - if particle.mass and (abs(particle.mass) - fourmass)/ abs(particle.mass) > threshold: - raise Exception( "Do not have correct mass lhe: %s momentum: %s (error at %s" % (particle.mass, fourmass, (abs(particle.mass) - fourmass)/ abs(particle.mass))) - + if particle.mass: + expected = (particle.E - math.sqrt(particle.E**2 -particle.mass**2))/particle.E + if expected > 1e-8: + mass_threshold = particle.E**2 - (particle.E-threshold)**2 + if (abs(particle.mass) - fourmass)/ mass_threshold > 5: + raise Exception( "Do not have correct mass lhe: %s momentum: %s (error at %s" % (particle.mass, fourmass, (abs(particle.mass) - fourmass)/ abs(particle.mass))) + if E/absE > threshold: logger.critical(self) @@ -2953,8 +2958,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..4d5597c722 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) @@ -2827,10 +2827,10 @@ def print_results_in_shell(self, data): logger.info(" Nb of events after matching/merging : %d" % int(data['nb_event_pythia'])) if self.run_card['use_syst'] in self.true and \ (int(self.run_card['ickkw'])==1 or self.run_card['ktdurham']>0.0 - or self.run_card['ptlund']>0.0): + or self.run_card['ptlund']>0.0) and data['cross_pythia'] == -1: logger.info(" Notice that because Systematics computation is turned on, the merging did not veto events but modified their weights instead.\n"+\ " The resulting hepmc/stdhep file should therefore be use with those weights.") - else: + elif data['cross_pythia'] == -1: logger.info(" Nb of events after merging : %s" % data['nb_event_pythia']) logger.info(" " ) @@ -3055,6 +3055,7 @@ def do_multi_run(self, line): crossoversig = 0 inv_sq_err = 0 nb_event = 0 + madspin = False for i in range(nb_run): self.nb_refine = 0 self.exec_cmd('generate_events %s_%s -f' % (main_name, i), postcmd=False) @@ -3067,6 +3068,8 @@ def do_multi_run(self, line): inv_sq_err+=1.0/error**2 self.results[main_name][-1]['cross'] = crossoversig/inv_sq_err self.results[main_name][-1]['error'] = math.sqrt(1.0/inv_sq_err) + if 'decayed' in self.run_name: + madspin = True self.results.def_current(main_name) self.run_name = main_name self.update_status("Merging LHE files", level='parton') @@ -3074,9 +3077,12 @@ def do_multi_run(self, line): os.mkdir(pjoin(self.me_dir,'Events', self.run_name)) except Exception: pass - os.system('%(bin)s/merge.pl %(event)s/%(name)s_*/unweighted_events.lhe.gz %(event)s/%(name)s/unweighted_events.lhe.gz %(event)s/%(name)s_banner.txt' + + os.system('%(bin)s/merge.pl %(event)s/%(name)s_*%(madspin)s/unweighted_events.lhe.gz %(event)s/%(name)s/unweighted_events.lhe.gz %(event)s/%(name)s_banner.txt' % {'bin': self.dirbin, 'event': pjoin(self.me_dir,'Events'), - 'name': self.run_name}) + 'name': self.run_name, + 'madspin': '_decayed_*' if madspin else '' + }) eradir = self.options['exrootanalysis_path'] if eradir and misc.is_executable(pjoin(eradir,'ExRootLHEFConverter')): @@ -3656,9 +3662,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'))) @@ -3757,6 +3765,8 @@ def split(a, n): k, m = divmod(len(a), n) return (a[i*k+min(i, m):(i+1)*k+min(i+1, m)] for i in range(n)) + Gdirs = self.remove_empty_events(Gdirs) + partials_info = [] if len(Gdirs) >= max_G: start_unweight= time.perf_counter() @@ -3786,7 +3796,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, @@ -4223,7 +4233,7 @@ def mg5amc_py8_interface_consistency_warning(options): return None - def setup_Pythia8RunAndCard(self, PY8_Card, run_type): + def setup_Pythia8RunAndCard(self, PY8_Card, run_type, use_mg5amc_py8_interface): """ Setup the Pythia8 Run environment and card. In particular all the process and run specific parameters of the card are automatically set here. This function returns the path where HEPMC events will be output, if any.""" @@ -4338,10 +4348,10 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): PY8_Card.systemSet('Beams:setProductionScalesFromLHEF',True) # Automatically set qWeed to xqcut if not defined by the user. - if PY8_Card['SysCalc:qWeed']==-1.0: + if use_mg5amc_py8_interface and PY8_Card['SysCalc:qWeed']==-1.0: PY8_Card.MadGraphSet('SysCalc:qWeed',self.run_card['xqcut'], force=True) - if PY8_Card['SysCalc:qCutList']=='auto': + if use_mg5amc_py8_interface and PY8_Card['SysCalc:qCutList']=='auto': if self.run_card['use_syst']: if self.run_card['sys_matchscale']=='auto': qcut = PY8_Card['JetMatching:qCut'] @@ -4368,7 +4378,7 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): # Specific MLM settings # PY8 should not implement the MLM veto since the driver should do it # if merging scale variation is turned on - if self.run_card['use_syst']: + if use_mg5amc_py8_interface and self.run_card['use_syst']: # We do no force it here, but it is clear that the user should know what # he's doing if he were to force it to True. PY8_Card.MadGraphSet('JetMatching:doVeto',False) @@ -4444,7 +4454,7 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): PY8_Card.MadGraphSet('SpaceShower:pTmaxMatch',1) PY8_Card.MadGraphSet('SpaceShower:rapidityOrder',False) # PY8 should not implement the CKKW veto since the driver should do it. - if self.run_card['use_syst']: + if use_mg5amc_py8_interface and self.run_card['use_syst']: # We do no force it here, but it is clear that the user should know what # he's doing if he were to force it to True. PY8_Card.MadGraphSet('Merging:applyVeto',False) @@ -4516,6 +4526,12 @@ def do_pythia8(self, line): else: no_default = False + if '--old_interface' in args: + use_mg5amc_py8_interface = True + args.remove('--old_interface') + else: + use_mg5amc_py8_interface = False + if not self.run_name: self.check_pythia8(args) self.configure_directory(html_opening =False) @@ -4545,20 +4561,27 @@ def do_pythia8(self, line): #"Please use 'event_norm = average' in the run_card to avoid this problem.") - - if not self.options['mg5amc_py8_interface_path'] or not \ - os.path.exists(pjoin(self.options['mg5amc_py8_interface_path'], - 'MG5aMC_PY8_interface')): - raise self.InvalidCmd( -"""The MG5aMC_PY8_interface tool cannot be found, so that MadEvent cannot steer Pythia8 shower. -Please install this tool with the following MG5_aMC command: - MG5_aMC> install mg5amc_py8_interface_path""") + if use_mg5amc_py8_interface: + if not self.options['mg5amc_py8_interface_path'] or not \ + os.path.exists(pjoin(self.options['mg5amc_py8_interface_path'], + 'MG5aMC_PY8_interface')): + raise self.InvalidCmd( + """The MG5aMC_PY8_interface tool cannot be found, so that MadEvent cannot steer Pythia8 shower. + Please install this tool with the following MG5_aMC command: + MG5_aMC> install mg5amc_py8_interface_path""") + else: + pythia_main = pjoin(self.options['mg5amc_py8_interface_path'], + 'MG5aMC_PY8_interface') + warnings = MadEventCmd.mg5amc_py8_interface_consistency_warning(self.options) + if warnings: + logger.warning(warnings) else: - pythia_main = pjoin(self.options['mg5amc_py8_interface_path'], - 'MG5aMC_PY8_interface') - warnings = MadEventCmd.mg5amc_py8_interface_consistency_warning(self.options) - if warnings: - logger.warning(warnings) + pythia_main = pjoin(self.options['pythia8_path'], 'share', 'Pythia8', 'examples', 'main164') + if not os.path.exists(pythia_main): + pythia_main = pjoin(self.options['pythia8_path'], 'examples', 'main164') + if not os.path.exists(pythia_main): + logger.warning('main164 not found (or not compiled). Will try the old interface instead.') + return self.do_pythia8(line + ' --old_interface') self.results.add_detail('run_mode', 'madevent') @@ -4583,14 +4606,19 @@ def do_pythia8(self, line): run_type = 'CKKW' # Edit the card and run environment according to the run specification - HepMC_event_output = self.setup_Pythia8RunAndCard(PY8_Card, run_type) + HepMC_event_output = self.setup_Pythia8RunAndCard(PY8_Card, run_type, use_mg5amc_py8_interface=use_mg5amc_py8_interface) + + if not use_mg5amc_py8_interface and self.options['run_mode']==0 or (self.options['run_mode']==2 and self.options['nb_core']==1): + PY8_Card['Main:numberOfEvents']= self.run_card['nevents'] + # Now write the card. pythia_cmd_card = pjoin(self.me_dir, 'Events', self.run_name , '%s_pythia8.cmd' % tag) cmd_card = StringIO.StringIO() PY8_Card.write(cmd_card,pjoin(self.me_dir,'Cards','pythia8_card_default.dat'), - direct_pythia_input=True) + direct_pythia_input=True, + use_mg5amc_py8_interface=use_mg5amc_py8_interface) # Now setup the preamble to make sure that everything will use the locally # installed tools (if present) even if the user did not add it to its @@ -4632,7 +4660,7 @@ def do_pythia8(self, line): " command '/usr/bin/env %s' exists and returns a valid path."%shell) exe_cmd = "#!%s\n%s"%(shell_exe,' '.join( - [preamble+pythia_main, + [preamble+pythia_main, '' if use_mg5amc_py8_interface else '-c', os.path.basename(pythia_cmd_card)])) wrapper.write(exe_cmd) @@ -4699,6 +4727,7 @@ def do_pythia8(self, line): n_cores = max(min(min_n_core,n_cores),1) if self.options['run_mode']==0 or (self.options['run_mode']==2 and self.options['nb_core']==1): + # No need for parallelization anymore self.cluster = None logger.info('Follow Pythia8 shower by running the '+ @@ -4744,20 +4773,22 @@ def do_pythia8(self, line): ParallelPY8Card.subruns[0].systemSet('Beams:LHEF','events.lhe.gz') ParallelPY8Card.write(pjoin(parallelization_dir,'PY8Card.dat'), pjoin(self.me_dir,'Cards','pythia8_card_default.dat'), - direct_pythia_input=True) + direct_pythia_input=True, + use_mg5amc_py8_interface=use_mg5amc_py8_interface) # Write the wrapper wrapper_path = pjoin(parallelization_dir,'run_PY8.sh') wrapper = open(wrapper_path,'w') if self.options['cluster_temp_path'] is None: exe_cmd = \ -"""#!%s -./%s PY8Card.dat >& PY8_log.txt -""" +"""#!%%s +./%%s %s PY8Card.dat >& PY8_log.txt +""" % ('' if use_mg5amc_py8_interface else '-c') + else: exe_cmd = \ -"""#!%s +"""#!%%s ln -s ./events_$1.lhe.gz ./events.lhe.gz -./%s PY8Card_$1.dat >& PY8_log.txt +./%%s %s PY8Card_$1.dat >& PY8_log.txt mkdir split_$1 if [ -f ./events.hepmc ]; then @@ -4776,7 +4807,7 @@ def do_pythia8(self, line): mv ./PY8_log.txt ./split_$1/ fi tar -czf split_$1.tar.gz split_$1 -""" +""" % ('' if use_mg5amc_py8_interface else '-c') exe_cmd = exe_cmd%(shell_exe,os.path.basename(pythia_main)) wrapper.write(exe_cmd) wrapper.close() @@ -4812,19 +4843,27 @@ def do_pythia8(self, line): pjoin(parallelization_dir,split_files[-1])) logger.info('Submitting Pythia8 jobs...') + for i, split_file in enumerate(split_files): # We must write a PY8Card tailored for each split so as to correct the normalization # HEPMCoutput:scaling of each weight since the lhe showered will not longer contain the # same original number of events - split_PY8_Card = banner_mod.PY8Card(pjoin(parallelization_dir,'PY8Card.dat')) + split_PY8_Card = banner_mod.PY8Card(pjoin(parallelization_dir,'PY8Card.dat'), setter='user') + assert split_PY8_Card['JetMatching:nJetMax'] == PY8_Card['JetMatching:nJetMax'] + + + # Make sure to sure the number of split_events determined during the splitting. - split_PY8_Card.systemSet('Main:numberOfEvents',partition_for_PY8[i]) + split_PY8_Card.systemSet('Main:numberOfEvents',partition_for_PY8[i], force=True) + assert split_PY8_Card['Main:numberOfEvents'] == partition_for_PY8[i] split_PY8_Card.systemSet('HEPMCoutput:scaling',split_PY8_Card['HEPMCoutput:scaling']* - (float(partition_for_PY8[i]))) + (float(partition_for_PY8[i])), force=True) # Add_missing set to False so as to be sure not to add any additional parameter w.r.t # the ones in the original PY8 param_card copied. split_PY8_Card.write(pjoin(parallelization_dir,'PY8Card_%d.dat'%i), - pjoin(parallelization_dir,'PY8Card.dat'), add_missing=False) + pjoin(parallelization_dir,'PY8Card.dat'), add_missing=False, + direct_pythia_input=True, + use_mg5amc_py8_interface=use_mg5amc_py8_interface) in_files = [pjoin(parallelization_dir,os.path.basename(pythia_main)), pjoin(parallelization_dir,'PY8Card_%d.dat'%i), pjoin(parallelization_dir,split_file)] @@ -5073,7 +5112,7 @@ def wait_monitoring(Idle, Running, Done): # works both for fixed number of generated events and fixed accepted events self.results.add_detail('error_pythia', error_m) - if self.run_card['use_syst']: + if self.run_card['use_syst'] and use_mg5amc_py8_interface: self.results.add_detail('cross_pythia', -1) self.results.add_detail('error_pythia', 0) @@ -6132,7 +6171,102 @@ def get_Gdir(self, Pdir=None, symfact=None): mfactors[pjoin(P, "G%s" % tag)] = mfactor self.Gdirs = (Gdirs, mfactors) return self.get_Gdir(Pdir, symfact=symfact) + + ############################################################################ + def remove_empty_events(self, Gdir): + """return Gdir strip from the one providing empty events.lhe files.""" + + reasons = collections.defaultdict(list) + Gdirs = Gdir[:] + for G in Gdirs[:]: + try: + size = os.path.getsize(pjoin(G, 'events.lhe')) + except Exception as error: + size = 0 + if size <10: + Gdirs.remove(G) + try: + log = misc.BackRead(pjoin(G, 'log.txt')) + except Exception as error: + log = misc.BackRead(pjoin(G, 'run1_app.log')) + found = -1 + for line in log: + if 'Deleting file events.lhe' in line: + found = 0 + elif "Impossible BW configuration" in line: + reasons['bwconfig'].append(G) + break + elif found < -150: + reasons['not found'].append(G) + Gdirs.append(G) + break + elif found < 0: + found -= 1 + elif 'Loosen cuts or increase max_events' in line: + reasons['cuts'].append(G) + break + elif 'all returned zero' in line: + reasons['zero'].append(G) + break + elif found > 5: + reasons['unknown'].append(G) + break + else: + found += 1 + + if len(reasons): + logger.debug('Reasons for empty events.lhe:') + if len(reasons['unknown']): + logger.debug(' - unknown: %s' % len(reasons['unknown'])) + logger.log(10, ' DETAIL:' + ','.join(['/'.join(G.rsplit(os.sep)[-2:]) for G in reasons['unknown'][:10]])) + if len(reasons['not found']): + logger.debug(' - not found in log: %s' % len(reasons['not found'])) + logger.log(10, ' DETAIL:' + ','.join(['/'.join(G.rsplit(os.sep)[-2:]) for G in reasons['not found'][:10]])) + if len(reasons['zero']): + logger.debug(' - zero amplitudes: %s' % len(reasons['zero'])) + logger.log(10, ' DETAIL:' + ','.join(['/'.join(G.rsplit( os.sep)[-2:]) for G in reasons['zero'][:10]])) + if len(reasons['bwconfig']): + critical_bwconfig = set() + for G in reasons['bwconfig']: + base = G.rsplit('.',1)[0] + if any(G2.startswith(base) for G2 in Gdirs): + continue + else: + critical_bwconfig.add(os.sep.join(base.rsplit(os.sep)[-2:])) + for G in critical_bwconfig: + logger.warning('Gdirectory %s has no events.lhe file. (no BW config found %s times)' % G) + + logger.debug(' - impossible BW configuration: %s' % len(reasons['bwconfig'])) + logger.debug(' - channel with no possible BW configuration: %s' % len(critical_bwconfig)) + + if len(reasons['cuts']): + critical_nb_cuts = collections.defaultdict(int) + for G in reasons['cuts']: + if '.' in os.path.basename(G): + base = G.rsplit('.',1)[0] + if any(G2.startswith(base) for G2 in Gdirs): + continue + else: + critical_nb_cuts[os.sep.join(base.rsplit(os.sep)[-2:])] += 1 + else: + critical_nb_cuts[''] += 1 + logger.warning('Gdirectory %s has no events.lhe file. (no points passed cuts found)' % G) + for G, nb in critical_nb_cuts.items(): + if not G: + continue + else: + logger.warning('%s channel %s.XXX has no events.lhe file. (no points passed cuts). No %s with events detected' % (nb, G, G)) + logger.debug(' - no points passed cuts: %s' % len(reasons['cuts'])) + logger.log(10, ' DETAIL:' + ','.join(['/'.join(G.rsplit(os.sep)[-2:]) for G in reasons['cuts'][:10]])) + logger.debug(' - without any BW handling (critical): %s' % critical_nb_cuts['']) + logger.debug(' - with BW but all zero (critical): %s' % sum([nb for v, nb in critical_nb_cuts.items() if v!=''], 0)) + #logger.debug(' - cuts (with BW conflict where other channel contributes): %s' % (len(reasons['cuts'])- critical_nb_cuts)) + + + return Gdirs + + ############################################################################ def set_run_name(self, name, tag=None, level='parton', reload_card=False, allow_new_tag=True): @@ -6749,7 +6883,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 +6893,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 +7010,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 +7038,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 +7053,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 +7065,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 +7190,13 @@ 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) 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 +7210,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..1ef9cc3e34 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.3, 2025-06-12 // 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..daa433c77d 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.3, 2025-06-12 // 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..29c5f58c1b 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.3, 2025-06-12 // 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/test/cudacpp_test.mk b/epochX/cudacpp/susy_gg_t1t1.mad/test/cudacpp_test.mk index f703a1ae7c..4934c9a53f 100644 --- a/epochX/cudacpp/susy_gg_t1t1.mad/test/cudacpp_test.mk +++ b/epochX/cudacpp/susy_gg_t1t1.mad/test/cudacpp_test.mk @@ -19,7 +19,7 @@ CXXFLAGS += -Igoogletest/googletest/include/ -std=c++11 all: googletest/$(INSTALLDIR)/lib64/libgtest.a googletest/CMakeLists.txt: - git clone https://github.com/google/googletest.git -b release-1.11.0 googletest + git clone https://github.com/google/googletest.git -b v1.17.0 googletest googletest/$(BUILDDIR)/Makefile: googletest/CMakeLists.txt mkdir -p googletest/$(BUILDDIR) 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/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..df7dcfdc71 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -579,7 +579,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- 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..922a59d95f 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.3, 2025-06-12 // 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/cudacpp.mk b/epochX/cudacpp/susy_gg_t1t1.sa/SubProcesses/cudacpp.mk index 20d8ded718..20b8e6b858 100644 --- a/epochX/cudacpp/susy_gg_t1t1.sa/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/susy_gg_t1t1.sa/SubProcesses/cudacpp.mk @@ -114,7 +114,7 @@ export CXXFLAGS override CUDA_HOME = $(patsubst %/bin/nvcc,%,$(shell which nvcc 2>/dev/null)) # Set HIP_HOME from the path to hipcc, if it exists -override HIP_HOME = $(patsubst %/bin/hipcc,%,$(shell which hipcc 2>/dev/null)) +override HIP_HOME = $(shell hipconfig --rocmpath) # Configure CUDA_INC (for CURAND and NVTX) and NVTX if a CUDA installation exists (see #965) ifeq ($(CUDA_HOME),) @@ -229,6 +229,8 @@ ifeq ($(BACKEND),cuda) else ifeq ($(BACKEND),hip) + # example architecture values MI200:gfx90a, MI350X:gfx942 + MADGRAPH_HIP_ARCHITECTURE ?= gfx942 # Set GPUCC as $(HIP_HOME)/bin/hipcc (it was already checked above that this exists) GPUCC = $(HIP_HOME)/bin/hipcc XCOMPILERFLAG = @@ -243,7 +245,7 @@ else ifeq ($(BACKEND),hip) ###GPUFLAGS += -ggdb # FOR DEBUGGING ONLY # AMD HIP architecture flags - GPUARCHFLAGS = --offload-arch=gfx90a + GPUARCHFLAGS = --offload-arch=${MADGRAPH_HIP_ARCHITECTURE} GPUFLAGS += $(GPUARCHFLAGS) # Other AMD-specific flags @@ -878,7 +880,7 @@ endif $(gpu_fcheckmain): LIBFLAGS += $(GPULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH $(gpu_fcheckmain): $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBDIR)/lib$(MG5AMC_GPULIB).so $(gpu_objects_exe) ifneq ($(findstring hipcc,$(GPUCC)),) # link fortran/c++/hip using $FC when hipcc is used #802 - $(FC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) -lstdc++ -L$(shell cd -L $(shell dirname $(shell $(GPUCC) -print-prog-name=clang))/../..; pwd)/lib -lamdhip64 + $(FC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) -lstdc++ -L$(HIP_HOME)/lib -lamdhip64 else $(GPUCC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) endif @@ -979,7 +981,7 @@ else # link only runTest_$(GPUSUFFIX).o (new: in the past, this was linking both $(gpu_testmain): LIBFLAGS += $(GPULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH $(gpu_testmain): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(gpu_objects_lib) $(gpu_objects_exe) $(GTESTLIBS) ifneq ($(findstring hipcc,$(GPUCC)),) # link fortran/c++/hip using $FC when hipcc is used #802 - $(FC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lstdc++ -lpthread -L$(shell cd -L $(shell dirname $(shell $(GPUCC) -print-prog-name=clang))/../..; pwd)/lib -lamdhip64 + $(FC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lstdc++ -lpthread -L$(HIP_HOME)/lib -lamdhip64 else $(GPUCC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lcuda endif @@ -1104,10 +1106,20 @@ else @cat /proc/cpuinfo | grep "physical id" | sort -u endif @echo "" -ifneq ($(shell which nvidia-smi 2>/dev/null),) - nvidia-smi -L + # some systems may have -smi installed, but it fails to execute + # because it cannot communicate with the hardware + @if nvidia-smi &>/dev/null ; then \ + nvidia-smi -L ;\ + else \ + echo "No Nvidia GPU detected" ;\ + fi @echo "" -endif + @if amd-smi &>/dev/null ; then \ + amd-smi static -a ;\ + amd-smi list ;\ + else \ + echo "No AMD GPU detected" ;\ + fi @echo USECCACHE=$(USECCACHE) ifeq ($(USECCACHE),1) ccache --version | head -1 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..1ef9cc3e34 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.3, 2025-06-12 // 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..daa433c77d 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.3, 2025-06-12 // 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..29c5f58c1b 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.3, 2025-06-12 // 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/test/cudacpp_test.mk b/epochX/cudacpp/susy_gg_t1t1.sa/test/cudacpp_test.mk index f703a1ae7c..4934c9a53f 100644 --- a/epochX/cudacpp/susy_gg_t1t1.sa/test/cudacpp_test.mk +++ b/epochX/cudacpp/susy_gg_t1t1.sa/test/cudacpp_test.mk @@ -19,7 +19,7 @@ CXXFLAGS += -Igoogletest/googletest/include/ -std=c++11 all: googletest/$(INSTALLDIR)/lib64/libgtest.a googletest/CMakeLists.txt: - git clone https://github.com/google/googletest.git -b release-1.11.0 googletest + git clone https://github.com/google/googletest.git -b v1.17.0 googletest googletest/$(BUILDDIR)/Makefile: googletest/CMakeLists.txt mkdir -p googletest/$(BUILDDIR) 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..26e0f0a062 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/Cards/ident_card.dat +++ b/epochX/cudacpp/susy_gg_tt.mad/Cards/ident_card.dat @@ -2,298 +2,298 @@ ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c written by the UFO converter ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc +dsqmix 1 1 mdl_RRd1x1 +dsqmix 2 2 mdl_RRd2x2 +dsqmix 3 3 mdl_RRd3x3 +dsqmix 3 6 mdl_RRd3x6 +dsqmix 4 4 mdl_RRd4x4 +dsqmix 5 5 mdl_RRd5x5 +dsqmix 6 3 mdl_RRd6x3 +dsqmix 6 6 mdl_RRd6x6 +fralpha 1 mdl_alp +hmix 1 mdl_RMUH +hmix 2 mdl_tb +hmix 4 mdl_MA2 +mass 5 mdl_MB +mass 6 mdl_MT +mass 15 mdl_Mta +mass 23 mdl_MZ +mass 24 mdl_MW +mass 25 mdl_MH01 +mass 35 mdl_MH02 +mass 36 mdl_MA0 +mass 37 mdl_MH +mass 1000001 mdl_Msd1 +mass 1000002 mdl_Msu1 +mass 1000005 mdl_Msd3 +mass 1000006 mdl_Msu3 +mass 1000011 mdl_Msl1 +mass 1000012 mdl_Msn1 +mass 1000015 mdl_Msl3 +mass 1000016 mdl_Msn3 +mass 1000021 mdl_Mgo +mass 1000022 mdl_Mneu1 +mass 1000023 mdl_Mneu2 +mass 1000024 mdl_Mch1 +mass 1000025 mdl_Mneu3 +mass 1000035 mdl_Mneu4 +mass 1000037 mdl_Mch2 +mass 2000001 mdl_Msd4 +mass 2000002 mdl_Msu4 +mass 2000005 mdl_Msd6 +mass 2000006 mdl_Msu6 +mass 2000011 mdl_Msl4 +mass 2000015 mdl_Msl6 +msd2 1 1 mdl_RmD21x1 +msd2 3 3 mdl_RmD23x3 +mse2 1 1 mdl_RmE21x1 +mse2 3 3 mdl_RmE23x3 +msl2 1 1 mdl_RmL21x1 +msl2 3 3 mdl_RmL23x3 +msoft 1 mdl_RMx1 +msoft 2 mdl_RMx2 +msoft 3 mdl_RMx3 +msoft 21 mdl_mHd2 +msoft 22 mdl_mHu2 +msq2 1 1 mdl_RmQ21x1 +msq2 3 3 mdl_RmQ23x3 +msu2 1 1 mdl_RmU21x1 +msu2 3 3 mdl_RmU23x3 +nmix 1 1 mdl_RNN1x1 +nmix 1 2 mdl_RNN1x2 +nmix 1 3 mdl_RNN1x3 +nmix 1 4 mdl_RNN1x4 +nmix 2 1 mdl_RNN2x1 +nmix 2 2 mdl_RNN2x2 +nmix 2 3 mdl_RNN2x3 +nmix 2 4 mdl_RNN2x4 +nmix 3 1 mdl_RNN3x1 +nmix 3 2 mdl_RNN3x2 +nmix 3 3 mdl_RNN3x3 +nmix 3 4 mdl_RNN3x4 +nmix 4 1 mdl_RNN4x1 +nmix 4 2 mdl_RNN4x2 +nmix 4 3 mdl_RNN4x3 +nmix 4 4 mdl_RNN4x4 +selmix 1 1 mdl_RRl1x1 +selmix 2 2 mdl_RRl2x2 +selmix 3 3 mdl_RRl3x3 +selmix 3 6 mdl_RRl3x6 +selmix 4 4 mdl_RRl4x4 +selmix 5 5 mdl_RRl5x5 +selmix 6 3 mdl_RRl6x3 +selmix 6 6 mdl_RRl6x6 +sminputs 1 aEWM1 +sminputs 3 aS +snumix 1 1 mdl_RRn1x1 +snumix 2 2 mdl_RRn2x2 +snumix 3 3 mdl_RRn3x3 +td 3 3 mdl_Rtd3x3 +te 3 3 mdl_Rte3x3 +tu 3 3 mdl_Rtu3x3 +umix 1 1 mdl_RUU1x1 +umix 1 2 mdl_RUU1x2 +umix 2 1 mdl_RUU2x1 +umix 2 2 mdl_RUU2x2 +upmns 1 1 mdl_RMNS1x1 +upmns 2 2 mdl_RMNS2x2 +upmns 3 3 mdl_RMNS3x3 +usqmix 1 1 mdl_RRu1x1 +usqmix 2 2 mdl_RRu2x2 +usqmix 3 3 mdl_RRu3x3 +usqmix 3 6 mdl_RRu3x6 +usqmix 4 4 mdl_RRu4x4 +usqmix 5 5 mdl_RRu5x5 +usqmix 6 3 mdl_RRu6x3 +usqmix 6 6 mdl_RRu6x6 +vckm 1 1 mdl_RCKM1x1 +vckm 2 2 mdl_RCKM2x2 +vckm 3 3 mdl_RCKM3x3 +vmix 1 1 mdl_RVV1x1 +vmix 1 2 mdl_RVV1x2 +vmix 2 1 mdl_RVV2x1 +vmix 2 2 mdl_RVV2x2 +yd 3 3 mdl_Ryd3x3 +ye 3 3 mdl_Rye3x3 +yu 3 3 mdl_Ryu3x3 +decay 6 mdl_WT +decay 23 mdl_WZ +decay 24 mdl_WW +decay 25 mdl_WH01 +decay 35 mdl_WH02 +decay 36 mdl_WA0 - - - - - - - - - - - - - - - - - - - - - - - - - - +decay 37 mdl_WH decay 1000001 mdl_Wsd1 + decay 1000002 mdl_Wsu1 + decay 1000003 mdl_Wsd2 + decay 1000004 mdl_Wsu2 + decay 1000005 mdl_Wsd3 + decay 1000006 mdl_Wsu3 + decay 1000011 mdl_Wsl1 + decay 1000012 mdl_Wsn1 + decay 1000013 mdl_Wsl2 + decay 1000014 mdl_Wsn2 + decay 1000015 mdl_Wsl3 + decay 1000016 mdl_Wsn3 + decay 1000021 mdl_Wgo + decay 1000023 mdl_Wneu2 + decay 1000024 mdl_Wch1 + decay 1000025 mdl_Wneu3 + decay 1000035 mdl_Wneu4 + decay 1000037 mdl_Wch2 + decay 2000001 mdl_Wsd4 + decay 2000002 mdl_Wsu4 + decay 2000003 mdl_Wsd5 + decay 2000004 mdl_Wsu5 + decay 2000005 mdl_Wsd6 + decay 2000006 mdl_Wsu6 + decay 2000011 mdl_Wsl4 + decay 2000013 mdl_Wsl5 + decay 2000015 mdl_Wsl6 -decay 23 mdl_WZ -decay 24 mdl_WW -decay 25 mdl_WH01 -decay 35 mdl_WH02 -decay 36 mdl_WA0 -decay 37 mdl_WH -decay 6 mdl_WT -dsqmix 1 1 mdl_RRd1x1 -dsqmix 2 2 mdl_RRd2x2 -dsqmix 3 3 mdl_RRd3x3 -dsqmix 3 6 mdl_RRd3x6 -dsqmix 4 4 mdl_RRd4x4 -dsqmix 5 5 mdl_RRd5x5 -dsqmix 6 3 mdl_RRd6x3 -dsqmix 6 6 mdl_RRd6x6 -fralpha 1 mdl_alp -hmix 1 mdl_RMUH -hmix 2 mdl_tb -hmix 4 mdl_MA2 -mass 1000001 mdl_Msd1 -mass 1000002 mdl_Msu1 -mass 1000005 mdl_Msd3 -mass 1000006 mdl_Msu3 -mass 1000011 mdl_Msl1 -mass 1000012 mdl_Msn1 -mass 1000015 mdl_Msl3 -mass 1000016 mdl_Msn3 -mass 1000021 mdl_Mgo -mass 1000022 mdl_Mneu1 -mass 1000023 mdl_Mneu2 -mass 1000024 mdl_Mch1 -mass 1000025 mdl_Mneu3 -mass 1000035 mdl_Mneu4 -mass 1000037 mdl_Mch2 -mass 15 mdl_Mta -mass 2000001 mdl_Msd4 -mass 2000002 mdl_Msu4 -mass 2000005 mdl_Msd6 -mass 2000006 mdl_Msu6 -mass 2000011 mdl_Msl4 -mass 2000015 mdl_Msl6 -mass 23 mdl_MZ -mass 24 mdl_MW -mass 25 mdl_MH01 -mass 35 mdl_MH02 -mass 36 mdl_MA0 -mass 37 mdl_MH -mass 5 mdl_MB -mass 6 mdl_MT -msd2 1 1 mdl_RmD21x1 -msd2 3 3 mdl_RmD23x3 -mse2 1 1 mdl_RmE21x1 -mse2 3 3 mdl_RmE23x3 -msl2 1 1 mdl_RmL21x1 -msl2 3 3 mdl_RmL23x3 -msoft 1 mdl_RMx1 -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 -msu2 1 1 mdl_RmU21x1 -msu2 3 3 mdl_RmU23x3 -nmix 1 1 mdl_RNN1x1 -nmix 1 2 mdl_RNN1x2 -nmix 1 3 mdl_RNN1x3 -nmix 1 4 mdl_RNN1x4 -nmix 2 1 mdl_RNN2x1 -nmix 2 2 mdl_RNN2x2 -nmix 2 3 mdl_RNN2x3 -nmix 2 4 mdl_RNN2x4 -nmix 3 1 mdl_RNN3x1 -nmix 3 2 mdl_RNN3x2 -nmix 3 3 mdl_RNN3x3 -nmix 3 4 mdl_RNN3x4 -nmix 4 1 mdl_RNN4x1 -nmix 4 2 mdl_RNN4x2 -nmix 4 3 mdl_RNN4x3 -nmix 4 4 mdl_RNN4x4 -selmix 1 1 mdl_RRl1x1 -selmix 2 2 mdl_RRl2x2 -selmix 3 3 mdl_RRl3x3 -selmix 3 6 mdl_RRl3x6 -selmix 4 4 mdl_RRl4x4 -selmix 5 5 mdl_RRl5x5 -selmix 6 3 mdl_RRl6x3 -selmix 6 6 mdl_RRl6x6 -sminputs 1 aEWM1 -sminputs 3 aS -snumix 1 1 mdl_RRn1x1 -snumix 2 2 mdl_RRn2x2 -snumix 3 3 mdl_RRn3x3 -td 3 3 mdl_Rtd3x3 -te 3 3 mdl_Rte3x3 -tu 3 3 mdl_Rtu3x3 -umix 1 1 mdl_RUU1x1 -umix 1 2 mdl_RUU1x2 -umix 2 1 mdl_RUU2x1 -umix 2 2 mdl_RUU2x2 -upmns 1 1 mdl_RMNS1x1 -upmns 2 2 mdl_RMNS2x2 -upmns 3 3 mdl_RMNS3x3 -usqmix 1 1 mdl_RRu1x1 -usqmix 2 2 mdl_RRu2x2 -usqmix 3 3 mdl_RRu3x3 -usqmix 3 6 mdl_RRu3x6 -usqmix 4 4 mdl_RRu4x4 -usqmix 5 5 mdl_RRu5x5 -usqmix 6 3 mdl_RRu6x3 -usqmix 6 6 mdl_RRu6x6 -vckm 1 1 mdl_RCKM1x1 -vckm 2 2 mdl_RCKM2x2 -vckm 3 3 mdl_RCKM3x3 -vmix 1 1 mdl_RVV1x1 -vmix 1 2 mdl_RVV1x2 -vmix 2 1 mdl_RVV2x1 -vmix 2 2 mdl_RVV2x2 -yd 3 3 mdl_Ryd3x3 -ye 3 3 mdl_Rye3x3 -yu 3 3 mdl_Ryu3x3 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..fa8d3481a2 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 = /home/dmass/Development/madgraph4gpu/amd-ci/MG5aMC/mg5amcnlo # MG5 MAIN DIRECTORY -#mg5_path = /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/mg5amcnlo +mg5_path = /home/dmass/Development/madgraph4gpu/amd-ci/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..5623b60480 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.3 2025-06-12 * #* * #* WARNING: UNKNOWN DEVELOPMENT VERSION. * #* WARNING: DO NOT USE FOR PRODUCTION * @@ -35,16 +35,18 @@ set loop_color_flows False set max_npoint_for_channel 0 set default_unset_couplings 99 set max_t_for_channel 99 +set zerowidth_tchannel True set nlo_mixed_expansion True -set stdout_level DEBUG -set zerowidth_tchannel F -import model MSSM_SLHA2 +import model sm define p = g u c d s u~ c~ d~ s~ define j = g u c d s u~ c~ d~ s~ define l+ = e+ mu+ define l- = e- mu- define vl = ve vm vt define vl~ = ve~ vm~ vt~ +set stdout_level DEBUG +set zerowidth_tchannel F +import model MSSM_SLHA2 generate g g > t t~ -output madevent_simd ../TMPOUT/CODEGEN_mad_susy_gg_tt --hel_recycling=\ -False --vector_size=32 +output madevent_simd susy_gg_tt.mad_gen --hel_recycling=False --vector\ +_size=32 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..85e1d39035 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/Cards/run_card.dat +++ b/epochX/cudacpp/susy_gg_tt.mad/Cards/run_card.dat @@ -92,11 +92,11 @@ #********************************************************************* # Compilation flag. #********************************************************************* - -O3 -ffast-math -fbounds-check = global_flag ! build flags for all Fortran code (for a fair comparison to cudacpp; default is -O) + -O = global_flag ! fortran optimization flag use for the all code. --fast-math = aloha_flag ! fortran optimization flag for aloha function. Suggestions: '-ffast-math' -O3 = matrix_flag ! fortran optimization flag for matrix.f function. Suggestions: '-O3' - 32 = vector_size ! size of fortran arrays allocated in the multi-event API for SIMD/GPU (VECSIZE_MEMMAX) - 512 = nb_warp ! total number of warp/frontwave + 16 = vector_size ! size of fortran arrays allocated in the multi-event API for SIMD/GPU (VECSIZE_MEMMAX) + 1 = nb_warp ! total number of warp/frontwave #********************************************************************* # Customization (custom cuts/scale/bias/...) * @@ -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..1ac53bb4bd 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.3 \ No newline at end of file diff --git a/epochX/cudacpp/susy_gg_tt.mad/Source/.make_opts b/epochX/cudacpp/susy_gg_tt.mad/Source/.make_opts index de3864242b..56ba259c56 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/Source/.make_opts +++ b/epochX/cudacpp/susy_gg_tt.mad/Source/.make_opts @@ -102,6 +102,7 @@ endif ifneq ($(lhapdf),) CXXFLAGS += $(shell $(lhapdf) --cppflags) alfas_functions=alfas_functions_lhapdf + alfas_to_clean=alfas_functions.o llhapdf+= $(shell $(lhapdf) --cflags --libs) -lLHAPDF # check if we need to activate c++11 (for lhapdf6.2) ifeq ($(origin CXX),default) @@ -113,10 +114,11 @@ ifneq ($(lhapdf),) endif else alfas_functions=alfas_functions + alfas_to_clean=alfas_functions_lhapdf.o llhapdf= endif # Helper function to check MG5 version define CHECK_MG5AMC_VERSION python -c 'import re; from distutils.version import StrictVersion; print StrictVersion("$(MG5AMC_VERSION)") >= StrictVersion("$(1)") if re.match("^[\d\.]+$$","$(MG5AMC_VERSION)") else True;' -endef \ No newline at end of file +endef 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..bdf427601f 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/Source/make_opts +++ b/epochX/cudacpp/susy_gg_tt.mad/Source/make_opts @@ -1,12 +1,11 @@ DEFAULT_CPP_COMPILER=g++ -DEFAULT_F2PY_COMPILER=f2py3 -DEFAULT_F_COMPILER=gfortran -GLOBAL_FLAG=-O3 -ffast-math -fbounds-check MACFLAG= +STDLIB=-lstdc++ +STDLIB_FLAG= +DEFAULT_F2PY_COMPILER=f2py +DEFAULT_F_COMPILER=gfortran MG5AMC_VERSION=SpecifiedByMG5aMCAtRunTime PYTHIA8_PATH=NotInstalled -STDLIB_FLAG= -STDLIB=-lstdc++ #end_of_make_opts_variables BIASLIBDIR=../../../lib/ @@ -103,6 +102,7 @@ endif ifneq ($(lhapdf),) CXXFLAGS += $(shell $(lhapdf) --cppflags) alfas_functions=alfas_functions_lhapdf +alfas_to_clean=alfas_functions.o llhapdf+= $(shell $(lhapdf) --cflags --libs) -lLHAPDF # check if we need to activate c++11 (for lhapdf6.2) ifeq ($(origin CXX),default) @@ -114,6 +114,7 @@ endif endif else alfas_functions=alfas_functions +alfas_to_clean=alfas_functions_lhapdf.o llhapdf= endif diff --git a/epochX/cudacpp/susy_gg_tt.mad/Source/makefile b/epochX/cudacpp/susy_gg_tt.mad/Source/makefile index 291ca907ee..87a9e61723 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/Source/makefile +++ b/epochX/cudacpp/susy_gg_tt.mad/Source/makefile @@ -37,10 +37,12 @@ all: $(LIBRARIES) $(LIBDIR)libdhelas.$(libext) $(LIBDIR)libpdf.$(libext) $(LIBDI $(LIBDIR)libdsample.$(libext): $(DSAMPLE) $(call CREATELIB, $@, $^) $(LIBDIR)libgeneric.$(libext): $(GENERIC) + rm -f $@ 2>/dev/null $(call CREATELIB, $@, $^) + rm -f $(alfas_to_clean) 2>/dev/null $(LIBDIR)libdhelas.$(libext): DHELAS cd DHELAS; make; cd .. -$(LIBDIR)libpdf.$(libext): PDF make_opts +$(LIBDIR)libpdf.$(libext): PDF $(alfas_functions).o cd PDF; make; cd .. ifneq (,$(filter edff chff, $(pdlabel1) $(pdlabel2))) $(LIBDIR)libgammaUPC.$(libext): PDF/gammaUPC @@ -73,6 +75,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/vector.inc b/epochX/cudacpp/susy_gg_tt.mad/Source/vector.inc index ba125272b6..9d8b377aa7 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/Source/vector.inc +++ b/epochX/cudacpp/susy_gg_tt.mad/Source/vector.inc @@ -30,6 +30,8 @@ C INTEGER WARP_SIZE PARAMETER (WARP_SIZE=32) INTEGER NB_WARP - PARAMETER (NB_WARP=512) + PARAMETER (NB_WARP=1) INTEGER VECSIZE_MEMMAX - PARAMETER (VECSIZE_MEMMAX=16384) + PARAMETER (VECSIZE_MEMMAX=32) + + 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..1ac53bb4bd 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.3 \ 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/P1_gg_ttx/CPPProcess.cc b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/P1_gg_ttx/CPPProcess.cc index 5c62f1bfad..1b34cb490b 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -555,7 +555,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- 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..e1daad3cf2 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.3, 2025-06-12 // 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..ce175a75a8 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.3, 2025-06-12 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..bd3d520785 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.3, 2025-06-12 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.3, 2025-06-12 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 @@ -484,6 +488,7 @@ DOUBLE PRECISION FUNCTION DSIG1_VEC(ALL_PP, ALL_XBK, ALL_Q2FACT, C Generate events only if IMODE is 0. IF(IMODE.EQ.0.AND.DABS(ALL_OUT(IVEC)).GT.0D0)THEN C Call UNWGT to unweight and store events + ICONFIG = CHANNELS(IVEC) CALL UNWGT(ALL_PP(0,1,IVEC), ALL_OUT(IVEC)*ALL_WGT(IVEC),1, $ SELECTED_HEL(IVEC), SELECTED_COL(IVEC), IVEC) ENDIF diff --git a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/P1_gg_ttx/driver.f b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/P1_gg_ttx/driver.f index ec5722702a..c08048ad0e 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/P1_gg_ttx/driver.f +++ b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/P1_gg_ttx/driver.f @@ -489,7 +489,6 @@ subroutine open_file_local(lun,filename,fopened) fopened=.false. tempname=filename fine=index(tempname,' ') -c fine2=index(path,' ')-1 ! AV remove valgrind "Conditional jump or move depends on uninitialised value(s)" if(fine.eq.0) fine=len(tempname) open(unit=lun,file=tempname,status='old',ERR=20) fopened=.true. 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..d79945f299 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.3, 2025-06-12 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.3, 2025-06-12 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,21 +394,24 @@ 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 C ---------- IF (FIRST) THEN FIRST=.FALSE. - IF(ZERO.NE.0D0) FK_ZERO = SIGN(MAX(ABS(ZERO), ABS(ZERO - $ *SMALL_WIDTH_TREATMENT)), ZERO) - IF(MDL_WT.NE.0D0) FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT - $ *SMALL_WIDTH_TREATMENT)), MDL_WT) + FK_ZERO = 0D0 + IF(MDL_WT.NE.0D0) THEN + FK_MDL_WT = SIGN(MAX(ABS(MDL_WT), ABS(MDL_MT + $ *SMALL_WIDTH_TREATMENT)), MDL_WT) + ELSE + FK_MDL_WT = 0D0 + ENDIF + IF(INIT_MODE) THEN ZEROAMP_1(:,:) = .TRUE. @@ -446,10 +450,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 +464,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/addmothers.f b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/addmothers.f index 9a31ed201d..6f32477b9e 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/addmothers.f +++ b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/addmothers.f @@ -21,7 +21,7 @@ subroutine addmothers(ip,jpart,pb,isym,jsym,rscale,aqcd,aqed,buff, integer icol ! color selected integer isym(nexternal,99), jsym - integer i,j,k,ida(2),ns,nres,ires,icl,ito2,idenpart,nc,ic + integer i,j,k,ida(2),ns,nres,ires,icl,ito2,idenpart,ic integer mo_color,da_color(2),itmp integer ito(-nexternal+3:nexternal),iseed,maxcolor,maxorg integer icolalt(2,-nexternal+2:2*nexternal-3) @@ -113,14 +113,15 @@ subroutine addmothers(ip,jpart,pb,isym,jsym,rscale,aqcd,aqed,buff, endif lconfig = vec_igraph1(ivec) endif - + is_LC=.true. + maxcolor=0 c c Choose a color flow which is certain to work with the propagator c structure of the chosen diagram and use that as an alternative c if (icol.eq.0) then do i=1,nexternal - icolalt(1,i)=0 + icolalt(1,i)=0 icolalt(2,i)=0 enddo else diff --git a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/cluster.f b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/cluster.f index b8995283ed..907894ea89 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/cluster.f +++ b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/cluster.f @@ -556,6 +556,8 @@ logical function cluster(p, ivec) jwin = 0 cluster=.false. clustered=.false. + iwin =0 + jwin =0 do i=0,3 pcmsp(i)=0 enddo @@ -665,8 +667,11 @@ logical function cluster(p, ivec) c initialize graph storage igraphs(0)=0 nleft=nexternal -c cluster - if (iwin.eq.0.or.jwin.eq.0) stop 21 + if(iwin.eq.0.or.jwin.eq.0)then + cluster=.false. + return + endif +c cluster do n=1,nexternal-2 c combine winner imocl(n)=imap(iwin,2)+imap(jwin,2) diff --git a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/cudacpp.mk b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/cudacpp.mk index 20d8ded718..20b8e6b858 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/cudacpp.mk @@ -114,7 +114,7 @@ export CXXFLAGS override CUDA_HOME = $(patsubst %/bin/nvcc,%,$(shell which nvcc 2>/dev/null)) # Set HIP_HOME from the path to hipcc, if it exists -override HIP_HOME = $(patsubst %/bin/hipcc,%,$(shell which hipcc 2>/dev/null)) +override HIP_HOME = $(shell hipconfig --rocmpath) # Configure CUDA_INC (for CURAND and NVTX) and NVTX if a CUDA installation exists (see #965) ifeq ($(CUDA_HOME),) @@ -229,6 +229,8 @@ ifeq ($(BACKEND),cuda) else ifeq ($(BACKEND),hip) + # example architecture values MI200:gfx90a, MI350X:gfx942 + MADGRAPH_HIP_ARCHITECTURE ?= gfx942 # Set GPUCC as $(HIP_HOME)/bin/hipcc (it was already checked above that this exists) GPUCC = $(HIP_HOME)/bin/hipcc XCOMPILERFLAG = @@ -243,7 +245,7 @@ else ifeq ($(BACKEND),hip) ###GPUFLAGS += -ggdb # FOR DEBUGGING ONLY # AMD HIP architecture flags - GPUARCHFLAGS = --offload-arch=gfx90a + GPUARCHFLAGS = --offload-arch=${MADGRAPH_HIP_ARCHITECTURE} GPUFLAGS += $(GPUARCHFLAGS) # Other AMD-specific flags @@ -878,7 +880,7 @@ endif $(gpu_fcheckmain): LIBFLAGS += $(GPULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH $(gpu_fcheckmain): $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBDIR)/lib$(MG5AMC_GPULIB).so $(gpu_objects_exe) ifneq ($(findstring hipcc,$(GPUCC)),) # link fortran/c++/hip using $FC when hipcc is used #802 - $(FC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) -lstdc++ -L$(shell cd -L $(shell dirname $(shell $(GPUCC) -print-prog-name=clang))/../..; pwd)/lib -lamdhip64 + $(FC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) -lstdc++ -L$(HIP_HOME)/lib -lamdhip64 else $(GPUCC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) endif @@ -979,7 +981,7 @@ else # link only runTest_$(GPUSUFFIX).o (new: in the past, this was linking both $(gpu_testmain): LIBFLAGS += $(GPULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH $(gpu_testmain): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(gpu_objects_lib) $(gpu_objects_exe) $(GTESTLIBS) ifneq ($(findstring hipcc,$(GPUCC)),) # link fortran/c++/hip using $FC when hipcc is used #802 - $(FC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lstdc++ -lpthread -L$(shell cd -L $(shell dirname $(shell $(GPUCC) -print-prog-name=clang))/../..; pwd)/lib -lamdhip64 + $(FC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lstdc++ -lpthread -L$(HIP_HOME)/lib -lamdhip64 else $(GPUCC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lcuda endif @@ -1104,10 +1106,20 @@ else @cat /proc/cpuinfo | grep "physical id" | sort -u endif @echo "" -ifneq ($(shell which nvidia-smi 2>/dev/null),) - nvidia-smi -L + # some systems may have -smi installed, but it fails to execute + # because it cannot communicate with the hardware + @if nvidia-smi &>/dev/null ; then \ + nvidia-smi -L ;\ + else \ + echo "No Nvidia GPU detected" ;\ + fi @echo "" -endif + @if amd-smi &>/dev/null ; then \ + amd-smi static -a ;\ + amd-smi list ;\ + else \ + echo "No AMD GPU detected" ;\ + fi @echo USECCACHE=$(USECCACHE) ifeq ($(USECCACHE),1) ccache --version | head -1 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/SubProcesses/proc_characteristics b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/proc_characteristics index 0a47a3fabf..c3f9d7fe36 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/proc_characteristics +++ b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/proc_characteristics @@ -8,7 +8,7 @@ ninitial = 2 grouped_matrix = True has_loops = False - bias_module = dummy + bias_module = None max_n_matched_jets = 0 colored_pdgs = [1, 2, 3, 4, 5, 6, 21, 1000001, 1000002, 1000003, 1000004, 1000005, 1000006, 1000021, 2000001, 2000002, 2000003, 2000004, 2000005, 2000006] complex_mass_scheme = False diff --git a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/reweight.f b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/reweight.f index 0a0bafa7c1..189ba41449 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/reweight.f +++ b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/reweight.f @@ -1186,7 +1186,7 @@ logical function setclscales(p, keepq2bck, ivec) if(nexternal.gt.3) pt2ijcl(nexternal-3)=q2fact(2) else if(.not.fixed_fac_scale1) q2fact(1)=scalefact**2*pt2ijcl(nexternal-2) - if(.not.fixed_fac_scale2) q2fact(2)=scalefact**2*q2fact(1) + if(.not.fixed_fac_scale2) q2fact(2)=scalefact**2*pt2ijcl(nexternal-2) endif elseif(jcentral(1).eq.0)then if(.not.fixed_fac_scale1) q2fact(1) = scalefact**2*pt2ijcl(jfirst(1)) diff --git a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/symmetry.f b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/symmetry.f index 309540a0a2..2afd9e9f75 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/symmetry.f +++ b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/symmetry.f @@ -232,7 +232,7 @@ subroutine write_bash(mapconfig,use_config, prwidth, jcomp,iforest, c write(*,*) 'mapping',ic,mapconfig(i),icode if (icode .eq. 0) then c Create format string based on number of digits - write(formstr,'(a,i1,a)') '(I',nconf,'$)' + write(formstr,'(a,i1,a)') '(I',nconf,',$)' write(*,formstr) mapconfig(i) c Write symmetry factors write(formstr2,'(a,i2,a)') '(2i',nsym,')' @@ -242,10 +242,10 @@ subroutine write_bash(mapconfig,use_config, prwidth, jcomp,iforest, dconfig=mapconfig(i)+icode*1d0/10**ncode if(nconf+ncode+1.lt.10) then write(formstr,'(a,i1,a,i1,a)') '(F',nconf+ncode+1, - $ '.',ncode,'$)' + $ '.',ncode,',$)' else write(formstr,'(a,i2,a,i1,a)') '(F',nconf+ncode+1, - $ '.',ncode,'$)' + $ '.',ncode,',$)' endif write(*,formstr) dconfig c Write symmetry factors @@ -260,7 +260,7 @@ subroutine write_bash(mapconfig,use_config, prwidth, jcomp,iforest, dconfig=mapconfig(i)+icode*1d0/10**ncode write(27,formstr2) dconfig,use_config(i) endif - write(*,'(a$)') ' ' + write(*,'(a,$)') ' ' 100 call bw_increment_array(iarray,imax,ibase,done) enddo else diff --git a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/unwgt.f b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/unwgt.f index f602511c94..d1247f1849 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/unwgt.f +++ b/epochX/cudacpp/susy_gg_tt.mad/SubProcesses/unwgt.f @@ -497,6 +497,7 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) integer ip, np, ic, nc integer ida(2),ito(-nexternal+3:nexternal),ns,nres,ires,icloop integer iseed + double precision beam_mass double precision pboost(0:3) double precision beta, get_betaz double precision ebi(0:3), ebo(0:3) @@ -506,7 +507,7 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) integer idup(nexternal,maxproc,maxsproc) integer mothup(2,nexternal) integer icolup(2,nexternal,maxflow,maxsproc) - + double precision eta integer nsym integer ievent @@ -638,21 +639,20 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) if (nincoming.eq.2) then if (xbk(1) .gt. 0d0 .and. xbk(1) .le. 1d0 .and. $ xbk(2) .gt. 0d0 .and. xbk(2) .le. 1d0) then - if(lpp(2).ne.0.and.(xbk(1).eq.1d0.or.pmass(1).eq.0d0).and.xbk(2).ne.1d0) then - ! construct the beam momenta in each frame and compute the related (z)boost - if (pmass(1).eq.0d0.and.(abs(lpp(1)).eq.3.or.abs(lpp(1)).eq.4).and.ebeam(1).gt.10d0*m1)then - local_mass = 0d0 - else - local_mass = m1 - endif + if(lpp(2).ne.0.and.(xbk(1).eq.1d0.or.pmass(1).eq.0d0)) then + if((abs(lpp(1)).gt.2.and.abs(lpp(1)).ne.9).or.xbk(1).eq.1d0)then + beam_mass = pmass(1) + else + beam_mass = m1 + endif ebi(0) = p(0,1)/xbk(1) ! this assumes that particle 1 is massless or mass equal to beam ebi(1) = 0 ebi(2) = 0 - ebi(3) = DSQRT(ebi(0)**2-local_mass**2) + ebi(3) = DSQRT(ebi(0)**2-beam_mass**2) ebo(0) = ebeam(1) ebo(1) = 0 ebo(2) = 0 - ebo(3) = DSQRT(ebo(0)**2-local_mass**2) + ebo(3) = DSQRT(ebo(0)**2-beam_mass**2) beta = get_betaz(ebi, ebo) if (xbk(1).eq.1d0) then pb(0,isym(1,jsym)) = ebo(0) @@ -668,20 +668,19 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) enddo else - if (pmass(1).eq.0d0.and.(abs(lpp(1)).eq.3.or.abs(lpp(1)).eq.4.and.ebeam(2).gt.10d0*m2))then - local_mass = 0d0 - else - local_mass = m2 - endif - ebi(0) = p(0,1)/xbk(1) ! this assumes that particle 1 is massless or mass equal to beam + if((abs(lpp(2)).gt.2.and.abs(lpp(2)).ne.9).or.xbk(2).eq.1d0)then + beam_mass = pmass(2) + else + beam_mass = m2 + endif ebi(0) = p(0,2)/xbk(2) ! this assumes that particle 2 is massless or mass equal to beam ebi(1) = 0 ebi(2) = 0 - ebi(3) = -1d0*DSQRT(ebi(0)**2-local_mass**2) + ebi(3) = -1d0*DSQRT(ebi(0)**2-beam_mass**2) ebo(0) = ebeam(2) ebo(1) = 0 ebo(2) = 0 - ebo(3) = -1d0*DSQRT(ebo(0)**2-local_mass**2) + ebo(3) = -1d0*DSQRT(ebo(0)**2-beam_mass**2) beta = get_betaz(ebi, ebo) if (xbk(2).eq.1d0) then pb(0,isym(2,jsym)) = ebo(0) @@ -701,6 +700,21 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) write(*,*) 'Warning bad x1 or x2 in write_leshouche', $ xbk(1),xbk(2) endif + do j=1,nexternal + call zboost_with_beta(p(0,j),beta,pb(0,isym(j,jsym))) + pb(4,isym(j,jsym))=pmass(j) + enddo + + ! check for numerical_accuracy + if (pb(0,1).gt.ebeam(1).or.pb(0,2).gt.ebeam(2))then + ! go back to old method --more accurate when boosting with xbk close to one-- + eta = sqrt(xbk(1)*ebeam(1)/(xbk(2)*ebeam(2))) + pboost(0)=p(0,1)*(eta + 1d0/eta) + pboost(3)=p(0,1)*(eta - 1d0/eta) + do j=1,nexternal + call boostx(p(0,j),pboost,pb(0,isym(j,jsym))) + enddo + endif else do j=1,nexternal call boostx(p(0,j),pboost,pb(0,isym(j,jsym))) @@ -709,6 +723,8 @@ SUBROUTINE write_leshouche(p,wgt,numproc,do_write_events, ihel, icol, ivec) enddo endif + + if (IMIRROR.eq.2.and.pmass(1).ne.pmass(2)) then c Note that in this context isym(1,jsym) should never be "2" since the mass differ pb(4,isym(1,jsym))=pmass(2) 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..2efb5954a6 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] @@ -1991,6 +1991,11 @@ def default_setup(self): self.add_param("PartonLevel:FSRinResonances", True, hidden=True, always_write_to_card=False, comment="Do not allow shower to run from decay product of unstable particle") self.add_param("ProcessLevel:resonanceDecays", True, hidden=True, always_write_to_card=False, comment="Do not allow unstable particle to decay.") + # Parameters only needed for main164 type of run (not pythia8/MG5 interface) + self.add_param("Main:HepMC", True, hidden=True, always_write_to_card=False, + comment="""Specify the type of output to be used by the main164 run. """) + self.add_param("HepMC:output", 'hepmc.gz', hidden=True, always_write_to_card=False, + comment="Specify the HepMC output file to be used by the main164 run.") # Add parameters controlling the subruns execution flow. # These parameters should not be part of PY8SubRun daughter. self.add_default_subruns('parameters') @@ -2087,8 +2092,10 @@ def MadGraphSet(self, name, value, **opts): force = False if name.lower() not in self or (force or name.lower() not in self.user_set): self.__setitem__(name, value, change_userdefine=False, **opts) - self.system_set.add(name.lower()) - + self.system_set.add(name.lower()) + else: + raise Exception("The parameter %s is already set to %s. You can not change it." % (name, self[name])) + def defaultSet(self, name, value, **opts): self.__setitem__(name, value, change_userdefine=False, **opts) @@ -2144,9 +2151,19 @@ def pythia8_formatting(value, formatv=None): else: return ','.join([PY8Card.pythia8_formatting(arg) for arg in value]) + #change of name convention between MG5 old interface and main164 from Pythia8 + interface_to_164 = {'HEPMCoutput:file': 'HepMC:output', + 'SysCalc:fullCutVariation': '!SysCalc:fullCutVariation (not supported with 164)', + 'SysCalc:qCutList': '!SysCalc:qCutList (not supported with 164)', + 'SysCalc:qWeed': '!SysCalc:qWeed (not supported with 164)', + 'SysCalc:tmsList': '!SysCalc:tmsList (not supported with 164)', + 'HEPMCoutput:scaling' : '!HEPMCoutput :scaling (not supported with 164)', + 'LHEFInputs:nSubruns' : 'Main:numberOfSubruns'} + def write(self, output_file, template, read_subrun=False, - print_only_visible=False, direct_pythia_input=False, add_missing=True): + print_only_visible=False, direct_pythia_input=False, add_missing=True, + use_mg5amc_py8_interface=False): """ Write the card to output_file using a specific template. > 'print_only_visible' specifies whether or not the hidden parameters should be written out if they are in the hidden_params_to_always_write @@ -2155,7 +2172,12 @@ def write(self, output_file, template, read_subrun=False, in the self.visible_params_to_always_write list and are not user_set or system_set are commented. > If 'add_missing' is False then parameters that should be written_out but are absent - from the template will not be written out.""" + from the template will not be written out. + > use_mg5amc_py8_interface is a flag to indicate that the MG5aMC-PY8 interface is used or not + if not used some parameters need to be translated from the old convention to the new one + """ + + self.use_mg5amc_py8_interface = use_mg5amc_py8_interface # First list the visible parameters visible_param = [p for p in self if p.lower() not in self.hidden_param @@ -2297,7 +2319,16 @@ def group_params(params): else: # Just copy parameters which don't need to be specified if param.lower() not in self.params_to_never_write: - output.write(line) + + if not use_mg5amc_py8_interface and direct_pythia_input and \ + param in self.interface_to_164: + param_entry = self.interface_to_164[param.strip()] + # special case for HepMC needs two flags + if 'HepMC:output' == param_entry: + output.write(' %s=%s\n'%('Main:HepMC', 'on')) + output.write('%s=%s\n'%(param_entry,new_value)) + else: + output.write(line) else: output.write('! The following parameter was forced to be commented out by MG5aMC.\n') output.write('! %s'%line) @@ -2313,6 +2344,7 @@ def group_params(params): if ((not direct_pythia_input) or (param.lower() in self.visible_params_to_always_write) or (param.lower() in self.user_set) or + (param.lower() in self.hidden_params_to_always_write) or (param.lower() in self.system_set)): template = '%s=%s' else: @@ -2321,6 +2353,19 @@ def group_params(params): # then they shouldn't be passed to Pythia template = '!%s=%s' + if not use_mg5amc_py8_interface and direct_pythia_input and \ + param in self.interface_to_164: + param_entry = self.interface_to_164[param] + # special case for HepMC needs two flags + if 'HepMC:output' == param_entry: + output.write(' %s=%s\n'%('Main:HepMC', 'on')) + if 'Main:InternalAnalysis'.lower() in self.user_set and \ + self['Main:InternalAnalysis'].lower() == 'on': + output.write('InternalAnalysis:output = ./djrs.dat\n') + + #elif param in self.interface_to_164.values() and not direct_pythia_input: + # misc.sprint(use_mg5amc_py8_interface, direct_pythia_input,param) + # raise Exception('The parameter %s is not supported in the MG5aMC-PY8 interface. Please use the new interface.'%param_entry output.write(template%(param_entry, value_entry.replace(value,new_value))) @@ -2365,6 +2410,8 @@ def group_params(params): comment = '\n'.join('! %s'%c for c in self.comments[param.lower()].split('\n')) output.write(comment+'\n') + if not use_mg5amc_py8_interface and param in self.interface_to_164: + continue output.write('%s=%s\n'%(param,PY8Card.pythia8_formatting(self[param]))) # Don't close the file if we were reading a subrun, but simply write @@ -3318,7 +3365,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 +3372,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 @@ -4050,8 +4095,8 @@ def post_set_fixed_fac_scale(card, value, change_userdefine, raiseerror, **opt): if 'fixed_fac_scale2' in card.user_set: card.user_set.remove('fixed_fac_scale2') - # #card['pdlabel1'] = value - # #card['pdlabel2'] = value + dict.__setitem__(card, 'fixed_fac_scale1', card['fixed_fac_scale']) + dict.__setitem__(card, 'fixed_fac_scale2', card['fixed_fac_scale']) @staticmethod def post_set(card, value, change_userdefine, raiseerror, name='unknown', **opt): @@ -4201,6 +4246,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 @@ -4451,11 +4497,11 @@ def check_validity(self): time.sleep(5) if self['drjj'] != 0: if 'drjj' in self.user_set: - logger.warning('Since icckw>0, changing the value of \'drjj\' to 0') + logger.warning('Since ickkw>0, changing the value of \'drjj\' to 0') self['drjj'] = 0 if self['drjl'] != 0: if 'drjl' in self.user_set: - logger.warning('Since icckw>0, changing the value of \'drjl\' to 0') + logger.warning('Since ickkw>0, changing the value of \'drjl\' to 0') self['drjl'] = 0 if not self['auto_ptj_mjj']: if self['mmjj'] > self['xqcut']: @@ -4753,7 +4799,6 @@ def create_default_for_process(self, proc_characteristic, history, proc_def): self['fixed_fac_scale1'] = True self['nhel'] = 1 for i in beam_id_split[1]: - exit if abs(i) == 11: self['lpp1'] = -math.copysign(3,i) self['lpp2'] = math.copysign(3,i) @@ -5577,6 +5622,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 +5838,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/cluster.py b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/cluster.py index 95ef45b5f3..66069293d2 100755 --- a/epochX/cudacpp/susy_gg_tt.mad/bin/internal/cluster.py +++ b/epochX/cudacpp/susy_gg_tt.mad/bin/internal/cluster.py @@ -602,6 +602,7 @@ def __init__(self, *args, **opt): self.submitted = six.moves.queue.Queue() # one entry by job submitted self.stoprequest = threading.Event() #flag to ensure everything to close self.demons = [] + self.gpus_list = [] self.nb_done =0 if 'nb_core' in opt: self.nb_core = opt['nb_core'] @@ -623,23 +624,46 @@ def __init__(self, *args, **opt): self.done_pid_queue = six.moves.queue.Queue() self.fail_msg = None + mg5_gpu_env_str = 'MG5_GPU_VISIBLE_DEVICES' + gpu_variables = [['NVIDIA_VISIBLE_DEVICES', 'CUDA_VISIBLE_DEVICES'], + ['ROCR_VISIBLE_DEVICES', 'HIP_VISIBLE_DEVICES'],] + if mg5_gpu_env_str in os.environ: + new_var = os.environ[mg5_gpu_env_str].split(',') + if len(new_var) == 2: + gpu_variables.insert(0, new_var) + else: + logger.error('Invalid format for %s=%s, it should be a comma-separated list of two elements' % (mg5_gpu_env_str, os.environ[mg5_gpu_env_str])) + for get_var,set_var in gpu_variables: + if get_var in os.environ: + self.gpus_list = os.environ.get(get_var).split(',') + self.gpu_set_var = set_var + self.gpus_count = len(self.gpus_list) + logger.info('Found %s GPUs: %s' % (self.gpus_count, self.gpus_list)) def start_demon(self): import threading - t = threading.Thread(target=self.worker) + env2 = None + if len(self.gpus_list): + env2 = os.environ.copy() + this_gpu_idx = len(self.demons) % self.gpus_count + env2[self.gpu_set_var] = self.gpus_list[this_gpu_idx] + t = threading.Thread(target=self.worker, kwargs={'env2': env2}) + else: + t = threading.Thread(target=self.worker) t.daemon = True t.start() self.demons.append(t) - def worker(self): + def worker(self, env2=None): import six.moves.queue import six.moves._thread while not self.stoprequest.isSet(): try: args = self.queue.get(timeout=10) tag, exe, arg, opt = args + opt['env'] = env2 try: # check for executable case if isinstance(exe,str): 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..69291df0d4 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): @@ -1463,11 +1463,15 @@ def create_plot(self, mode='parton', event_path=None, output=None, tag=None): self.run_name, '%s_pts.dat' % tag) for observable_name, data_path in [('djr',djr_path), ('pt',pt_path)]: - if not self.generate_Pythia8_HwU_plots( + try: + if not self.generate_Pythia8_HwU_plots( PY8_plots_root_path, merging_scale_name, observable_name,data_path): - return False - + return False + except Exception as error: + if os.path.exists(data_path): + logger.info('plot information present in %s' % data_path) + return True if mode == 'Pythia8': plot_files = glob.glob(pjoin(PY8_plots_root_path,'*.gnuplot')) if not misc.which('gnuplot'): @@ -1964,12 +1968,16 @@ def do_systematics(self, line): self.cluster.wait(os.path.dirname(output), update_status, update_first=update_status) except Exception: self.cluster.remove() + for i in range(nb_submit): + os.remove('%s/tmp_%s_%s' %(os.path.dirname(output),i,os.path.basename(output))) old_run_mode = self.options['run_mode'] self.options['run_mode'] =0 + out =False try: out = self.do_systematics(line) finally: self.options['run_mode'] = old_run_mode + return out #collect the data all_cross = [] for i in range(nb_submit): @@ -1995,18 +2003,21 @@ def do_systematics(self, line): self.run_card['event_norm'] in ['unity']: all_cross= [cross/nb_event for cross in all_cross] - sys_obj = systematics.call_systematics([input, None] + opts, - log=lambda x: logger.info(str(x)), - result=result_file, - running=False - ) + + sys_obj = systematics.call_systematics([input, None] + opts, + log=lambda x: logger.info(str(x)), + result=result_file, + running=False + ) + sys_obj.print_cross_sections(all_cross, nb_event, result_file) - + #concatenate the output file subprocess.call(['cat']+\ ['./tmp_%s_%s' % (i, os.path.basename(output)) for i in range(nb_submit)], stdout=open(output,'w'), cwd=os.path.dirname(output)) + for i in range(nb_submit): os.remove('%s/tmp_%s_%s' %(os.path.dirname(output),i,os.path.basename(output))) # os.remove('%s/log_sys_%s.txt' % (os.path.dirname(output),i)) @@ -3831,7 +3842,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 +5146,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 +6751,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 +6775,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 +6826,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..6fbdd98100 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': @@ -1858,6 +1855,8 @@ def parse_histos_from_PY8_XML_stream(self, stream, run_id=None, # If merging cut is negative, then pick only the one of the central scale # If not specified, then take them all but use the PDF and scale weight # of the central merging_scale for the variation. + if not all_weights: + raise MadGraph5Error('No weights were found in the HwU XML source.') if merging_scale is None or merging_scale < 0.0: merging_scale_chosen = all_weights[2]['MERGING'] else: @@ -2480,14 +2479,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 +2738,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 +2877,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 +2889,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 +2898,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 +2907,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 +2916,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..b1739da73d 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 @@ -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: O. Mattelaer (Aug 2023) for the MG5aMC CUDACPP plugin. -# Further modified by: O. Mattelaer, A. Valassi (2024) for the MG5aMC CUDACPP plugin. +# Further modified by: O. Mattelaer, A. Valassi, Z. Wettersten (2024-2025) for the MG5aMC CUDACPP plugin. import logging import os @@ -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') @@ -133,7 +133,8 @@ def default_setup(self): super().default_setup() # change default value: self['cudacpp_backend'] = 'cuda' - self['vector_size'] = 16384 # already setup in default class (just change value) + self['vector_size'] = 32 # ZW: default to 32, might want to change to 64 to utilise AMD GPUs better as well # 16384 # already setup in default class (just change value) + self['nb_warp'] = 512 # number of warps per kernel call, for now setting to 16 384 / vector_size MEINTERFACE = CPPMEInterface RunCard = CPPRunCard 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..81d17f7cb1 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 @@ -1035,12 +1035,12 @@ def define_init_banner(self, wgt, lha_strategy, proc_charac=None): from_init = True if not from_init: - if group in grouped_cross: - grouped_cross[group] += self.allcross[i] - grouped_error[group] += self.error[i]**2 + if int(group) in grouped_cross: + grouped_cross[int(group)] += self.allcross[i] + grouped_error[int(group)] += self.error[i]**2 else: - grouped_cross[group] = self.allcross[i] - grouped_error[group] = self.error[i]**2 + grouped_cross[int(group)] = self.allcross[i] + grouped_error[int(group)] = self.error[i]**2 else: ban = banner_mod.Banner(ff.banner) for line in ban['init'].split('\n'): @@ -1048,11 +1048,11 @@ def define_init_banner(self, wgt, lha_strategy, proc_charac=None): if len(splitline)==4: cross, error, _, group = splitline if int(group) in grouped_cross: - grouped_cross[group] += float(cross) - grouped_error[group] += float(error)**2 + grouped_cross[int(group)] += float(cross) + grouped_error[int(group)] += float(error)**2 else: - grouped_cross[group] = float(cross) - grouped_error[group] = float(error)**2 + grouped_cross[int(group)] = float(cross) + grouped_error[int(group)] = float(error)**2 nb_group = len(grouped_cross) # compute the information for the first line @@ -1086,6 +1086,8 @@ def define_init_banner(self, wgt, lha_strategy, proc_charac=None): self.seek(0) if init_information["idbmup2"] in [0,9]: event = next(self) + if len(event) == 0: + event = Event(str(event)) init_information["idbmup2"] = event[1].pdg self.seek(0) @@ -2166,10 +2168,13 @@ def check(self): abspz += abs(particle.pz) # check mass fourmass = FourMomentum(particle).mass - - if particle.mass and (abs(particle.mass) - fourmass)/ abs(particle.mass) > threshold: - raise Exception( "Do not have correct mass lhe: %s momentum: %s (error at %s" % (particle.mass, fourmass, (abs(particle.mass) - fourmass)/ abs(particle.mass))) - + if particle.mass: + expected = (particle.E - math.sqrt(particle.E**2 -particle.mass**2))/particle.E + if expected > 1e-8: + mass_threshold = particle.E**2 - (particle.E-threshold)**2 + if (abs(particle.mass) - fourmass)/ mass_threshold > 5: + raise Exception( "Do not have correct mass lhe: %s momentum: %s (error at %s" % (particle.mass, fourmass, (abs(particle.mass) - fourmass)/ abs(particle.mass))) + if E/absE > threshold: logger.critical(self) @@ -2953,8 +2958,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..4d5597c722 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) @@ -2827,10 +2827,10 @@ def print_results_in_shell(self, data): logger.info(" Nb of events after matching/merging : %d" % int(data['nb_event_pythia'])) if self.run_card['use_syst'] in self.true and \ (int(self.run_card['ickkw'])==1 or self.run_card['ktdurham']>0.0 - or self.run_card['ptlund']>0.0): + or self.run_card['ptlund']>0.0) and data['cross_pythia'] == -1: logger.info(" Notice that because Systematics computation is turned on, the merging did not veto events but modified their weights instead.\n"+\ " The resulting hepmc/stdhep file should therefore be use with those weights.") - else: + elif data['cross_pythia'] == -1: logger.info(" Nb of events after merging : %s" % data['nb_event_pythia']) logger.info(" " ) @@ -3055,6 +3055,7 @@ def do_multi_run(self, line): crossoversig = 0 inv_sq_err = 0 nb_event = 0 + madspin = False for i in range(nb_run): self.nb_refine = 0 self.exec_cmd('generate_events %s_%s -f' % (main_name, i), postcmd=False) @@ -3067,6 +3068,8 @@ def do_multi_run(self, line): inv_sq_err+=1.0/error**2 self.results[main_name][-1]['cross'] = crossoversig/inv_sq_err self.results[main_name][-1]['error'] = math.sqrt(1.0/inv_sq_err) + if 'decayed' in self.run_name: + madspin = True self.results.def_current(main_name) self.run_name = main_name self.update_status("Merging LHE files", level='parton') @@ -3074,9 +3077,12 @@ def do_multi_run(self, line): os.mkdir(pjoin(self.me_dir,'Events', self.run_name)) except Exception: pass - os.system('%(bin)s/merge.pl %(event)s/%(name)s_*/unweighted_events.lhe.gz %(event)s/%(name)s/unweighted_events.lhe.gz %(event)s/%(name)s_banner.txt' + + os.system('%(bin)s/merge.pl %(event)s/%(name)s_*%(madspin)s/unweighted_events.lhe.gz %(event)s/%(name)s/unweighted_events.lhe.gz %(event)s/%(name)s_banner.txt' % {'bin': self.dirbin, 'event': pjoin(self.me_dir,'Events'), - 'name': self.run_name}) + 'name': self.run_name, + 'madspin': '_decayed_*' if madspin else '' + }) eradir = self.options['exrootanalysis_path'] if eradir and misc.is_executable(pjoin(eradir,'ExRootLHEFConverter')): @@ -3656,9 +3662,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'))) @@ -3757,6 +3765,8 @@ def split(a, n): k, m = divmod(len(a), n) return (a[i*k+min(i, m):(i+1)*k+min(i+1, m)] for i in range(n)) + Gdirs = self.remove_empty_events(Gdirs) + partials_info = [] if len(Gdirs) >= max_G: start_unweight= time.perf_counter() @@ -3786,7 +3796,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, @@ -4223,7 +4233,7 @@ def mg5amc_py8_interface_consistency_warning(options): return None - def setup_Pythia8RunAndCard(self, PY8_Card, run_type): + def setup_Pythia8RunAndCard(self, PY8_Card, run_type, use_mg5amc_py8_interface): """ Setup the Pythia8 Run environment and card. In particular all the process and run specific parameters of the card are automatically set here. This function returns the path where HEPMC events will be output, if any.""" @@ -4338,10 +4348,10 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): PY8_Card.systemSet('Beams:setProductionScalesFromLHEF',True) # Automatically set qWeed to xqcut if not defined by the user. - if PY8_Card['SysCalc:qWeed']==-1.0: + if use_mg5amc_py8_interface and PY8_Card['SysCalc:qWeed']==-1.0: PY8_Card.MadGraphSet('SysCalc:qWeed',self.run_card['xqcut'], force=True) - if PY8_Card['SysCalc:qCutList']=='auto': + if use_mg5amc_py8_interface and PY8_Card['SysCalc:qCutList']=='auto': if self.run_card['use_syst']: if self.run_card['sys_matchscale']=='auto': qcut = PY8_Card['JetMatching:qCut'] @@ -4368,7 +4378,7 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): # Specific MLM settings # PY8 should not implement the MLM veto since the driver should do it # if merging scale variation is turned on - if self.run_card['use_syst']: + if use_mg5amc_py8_interface and self.run_card['use_syst']: # We do no force it here, but it is clear that the user should know what # he's doing if he were to force it to True. PY8_Card.MadGraphSet('JetMatching:doVeto',False) @@ -4444,7 +4454,7 @@ def setup_Pythia8RunAndCard(self, PY8_Card, run_type): PY8_Card.MadGraphSet('SpaceShower:pTmaxMatch',1) PY8_Card.MadGraphSet('SpaceShower:rapidityOrder',False) # PY8 should not implement the CKKW veto since the driver should do it. - if self.run_card['use_syst']: + if use_mg5amc_py8_interface and self.run_card['use_syst']: # We do no force it here, but it is clear that the user should know what # he's doing if he were to force it to True. PY8_Card.MadGraphSet('Merging:applyVeto',False) @@ -4516,6 +4526,12 @@ def do_pythia8(self, line): else: no_default = False + if '--old_interface' in args: + use_mg5amc_py8_interface = True + args.remove('--old_interface') + else: + use_mg5amc_py8_interface = False + if not self.run_name: self.check_pythia8(args) self.configure_directory(html_opening =False) @@ -4545,20 +4561,27 @@ def do_pythia8(self, line): #"Please use 'event_norm = average' in the run_card to avoid this problem.") - - if not self.options['mg5amc_py8_interface_path'] or not \ - os.path.exists(pjoin(self.options['mg5amc_py8_interface_path'], - 'MG5aMC_PY8_interface')): - raise self.InvalidCmd( -"""The MG5aMC_PY8_interface tool cannot be found, so that MadEvent cannot steer Pythia8 shower. -Please install this tool with the following MG5_aMC command: - MG5_aMC> install mg5amc_py8_interface_path""") + if use_mg5amc_py8_interface: + if not self.options['mg5amc_py8_interface_path'] or not \ + os.path.exists(pjoin(self.options['mg5amc_py8_interface_path'], + 'MG5aMC_PY8_interface')): + raise self.InvalidCmd( + """The MG5aMC_PY8_interface tool cannot be found, so that MadEvent cannot steer Pythia8 shower. + Please install this tool with the following MG5_aMC command: + MG5_aMC> install mg5amc_py8_interface_path""") + else: + pythia_main = pjoin(self.options['mg5amc_py8_interface_path'], + 'MG5aMC_PY8_interface') + warnings = MadEventCmd.mg5amc_py8_interface_consistency_warning(self.options) + if warnings: + logger.warning(warnings) else: - pythia_main = pjoin(self.options['mg5amc_py8_interface_path'], - 'MG5aMC_PY8_interface') - warnings = MadEventCmd.mg5amc_py8_interface_consistency_warning(self.options) - if warnings: - logger.warning(warnings) + pythia_main = pjoin(self.options['pythia8_path'], 'share', 'Pythia8', 'examples', 'main164') + if not os.path.exists(pythia_main): + pythia_main = pjoin(self.options['pythia8_path'], 'examples', 'main164') + if not os.path.exists(pythia_main): + logger.warning('main164 not found (or not compiled). Will try the old interface instead.') + return self.do_pythia8(line + ' --old_interface') self.results.add_detail('run_mode', 'madevent') @@ -4583,14 +4606,19 @@ def do_pythia8(self, line): run_type = 'CKKW' # Edit the card and run environment according to the run specification - HepMC_event_output = self.setup_Pythia8RunAndCard(PY8_Card, run_type) + HepMC_event_output = self.setup_Pythia8RunAndCard(PY8_Card, run_type, use_mg5amc_py8_interface=use_mg5amc_py8_interface) + + if not use_mg5amc_py8_interface and self.options['run_mode']==0 or (self.options['run_mode']==2 and self.options['nb_core']==1): + PY8_Card['Main:numberOfEvents']= self.run_card['nevents'] + # Now write the card. pythia_cmd_card = pjoin(self.me_dir, 'Events', self.run_name , '%s_pythia8.cmd' % tag) cmd_card = StringIO.StringIO() PY8_Card.write(cmd_card,pjoin(self.me_dir,'Cards','pythia8_card_default.dat'), - direct_pythia_input=True) + direct_pythia_input=True, + use_mg5amc_py8_interface=use_mg5amc_py8_interface) # Now setup the preamble to make sure that everything will use the locally # installed tools (if present) even if the user did not add it to its @@ -4632,7 +4660,7 @@ def do_pythia8(self, line): " command '/usr/bin/env %s' exists and returns a valid path."%shell) exe_cmd = "#!%s\n%s"%(shell_exe,' '.join( - [preamble+pythia_main, + [preamble+pythia_main, '' if use_mg5amc_py8_interface else '-c', os.path.basename(pythia_cmd_card)])) wrapper.write(exe_cmd) @@ -4699,6 +4727,7 @@ def do_pythia8(self, line): n_cores = max(min(min_n_core,n_cores),1) if self.options['run_mode']==0 or (self.options['run_mode']==2 and self.options['nb_core']==1): + # No need for parallelization anymore self.cluster = None logger.info('Follow Pythia8 shower by running the '+ @@ -4744,20 +4773,22 @@ def do_pythia8(self, line): ParallelPY8Card.subruns[0].systemSet('Beams:LHEF','events.lhe.gz') ParallelPY8Card.write(pjoin(parallelization_dir,'PY8Card.dat'), pjoin(self.me_dir,'Cards','pythia8_card_default.dat'), - direct_pythia_input=True) + direct_pythia_input=True, + use_mg5amc_py8_interface=use_mg5amc_py8_interface) # Write the wrapper wrapper_path = pjoin(parallelization_dir,'run_PY8.sh') wrapper = open(wrapper_path,'w') if self.options['cluster_temp_path'] is None: exe_cmd = \ -"""#!%s -./%s PY8Card.dat >& PY8_log.txt -""" +"""#!%%s +./%%s %s PY8Card.dat >& PY8_log.txt +""" % ('' if use_mg5amc_py8_interface else '-c') + else: exe_cmd = \ -"""#!%s +"""#!%%s ln -s ./events_$1.lhe.gz ./events.lhe.gz -./%s PY8Card_$1.dat >& PY8_log.txt +./%%s %s PY8Card_$1.dat >& PY8_log.txt mkdir split_$1 if [ -f ./events.hepmc ]; then @@ -4776,7 +4807,7 @@ def do_pythia8(self, line): mv ./PY8_log.txt ./split_$1/ fi tar -czf split_$1.tar.gz split_$1 -""" +""" % ('' if use_mg5amc_py8_interface else '-c') exe_cmd = exe_cmd%(shell_exe,os.path.basename(pythia_main)) wrapper.write(exe_cmd) wrapper.close() @@ -4812,19 +4843,27 @@ def do_pythia8(self, line): pjoin(parallelization_dir,split_files[-1])) logger.info('Submitting Pythia8 jobs...') + for i, split_file in enumerate(split_files): # We must write a PY8Card tailored for each split so as to correct the normalization # HEPMCoutput:scaling of each weight since the lhe showered will not longer contain the # same original number of events - split_PY8_Card = banner_mod.PY8Card(pjoin(parallelization_dir,'PY8Card.dat')) + split_PY8_Card = banner_mod.PY8Card(pjoin(parallelization_dir,'PY8Card.dat'), setter='user') + assert split_PY8_Card['JetMatching:nJetMax'] == PY8_Card['JetMatching:nJetMax'] + + + # Make sure to sure the number of split_events determined during the splitting. - split_PY8_Card.systemSet('Main:numberOfEvents',partition_for_PY8[i]) + split_PY8_Card.systemSet('Main:numberOfEvents',partition_for_PY8[i], force=True) + assert split_PY8_Card['Main:numberOfEvents'] == partition_for_PY8[i] split_PY8_Card.systemSet('HEPMCoutput:scaling',split_PY8_Card['HEPMCoutput:scaling']* - (float(partition_for_PY8[i]))) + (float(partition_for_PY8[i])), force=True) # Add_missing set to False so as to be sure not to add any additional parameter w.r.t # the ones in the original PY8 param_card copied. split_PY8_Card.write(pjoin(parallelization_dir,'PY8Card_%d.dat'%i), - pjoin(parallelization_dir,'PY8Card.dat'), add_missing=False) + pjoin(parallelization_dir,'PY8Card.dat'), add_missing=False, + direct_pythia_input=True, + use_mg5amc_py8_interface=use_mg5amc_py8_interface) in_files = [pjoin(parallelization_dir,os.path.basename(pythia_main)), pjoin(parallelization_dir,'PY8Card_%d.dat'%i), pjoin(parallelization_dir,split_file)] @@ -5073,7 +5112,7 @@ def wait_monitoring(Idle, Running, Done): # works both for fixed number of generated events and fixed accepted events self.results.add_detail('error_pythia', error_m) - if self.run_card['use_syst']: + if self.run_card['use_syst'] and use_mg5amc_py8_interface: self.results.add_detail('cross_pythia', -1) self.results.add_detail('error_pythia', 0) @@ -6132,7 +6171,102 @@ def get_Gdir(self, Pdir=None, symfact=None): mfactors[pjoin(P, "G%s" % tag)] = mfactor self.Gdirs = (Gdirs, mfactors) return self.get_Gdir(Pdir, symfact=symfact) + + ############################################################################ + def remove_empty_events(self, Gdir): + """return Gdir strip from the one providing empty events.lhe files.""" + + reasons = collections.defaultdict(list) + Gdirs = Gdir[:] + for G in Gdirs[:]: + try: + size = os.path.getsize(pjoin(G, 'events.lhe')) + except Exception as error: + size = 0 + if size <10: + Gdirs.remove(G) + try: + log = misc.BackRead(pjoin(G, 'log.txt')) + except Exception as error: + log = misc.BackRead(pjoin(G, 'run1_app.log')) + found = -1 + for line in log: + if 'Deleting file events.lhe' in line: + found = 0 + elif "Impossible BW configuration" in line: + reasons['bwconfig'].append(G) + break + elif found < -150: + reasons['not found'].append(G) + Gdirs.append(G) + break + elif found < 0: + found -= 1 + elif 'Loosen cuts or increase max_events' in line: + reasons['cuts'].append(G) + break + elif 'all returned zero' in line: + reasons['zero'].append(G) + break + elif found > 5: + reasons['unknown'].append(G) + break + else: + found += 1 + + if len(reasons): + logger.debug('Reasons for empty events.lhe:') + if len(reasons['unknown']): + logger.debug(' - unknown: %s' % len(reasons['unknown'])) + logger.log(10, ' DETAIL:' + ','.join(['/'.join(G.rsplit(os.sep)[-2:]) for G in reasons['unknown'][:10]])) + if len(reasons['not found']): + logger.debug(' - not found in log: %s' % len(reasons['not found'])) + logger.log(10, ' DETAIL:' + ','.join(['/'.join(G.rsplit(os.sep)[-2:]) for G in reasons['not found'][:10]])) + if len(reasons['zero']): + logger.debug(' - zero amplitudes: %s' % len(reasons['zero'])) + logger.log(10, ' DETAIL:' + ','.join(['/'.join(G.rsplit( os.sep)[-2:]) for G in reasons['zero'][:10]])) + if len(reasons['bwconfig']): + critical_bwconfig = set() + for G in reasons['bwconfig']: + base = G.rsplit('.',1)[0] + if any(G2.startswith(base) for G2 in Gdirs): + continue + else: + critical_bwconfig.add(os.sep.join(base.rsplit(os.sep)[-2:])) + for G in critical_bwconfig: + logger.warning('Gdirectory %s has no events.lhe file. (no BW config found %s times)' % G) + + logger.debug(' - impossible BW configuration: %s' % len(reasons['bwconfig'])) + logger.debug(' - channel with no possible BW configuration: %s' % len(critical_bwconfig)) + + if len(reasons['cuts']): + critical_nb_cuts = collections.defaultdict(int) + for G in reasons['cuts']: + if '.' in os.path.basename(G): + base = G.rsplit('.',1)[0] + if any(G2.startswith(base) for G2 in Gdirs): + continue + else: + critical_nb_cuts[os.sep.join(base.rsplit(os.sep)[-2:])] += 1 + else: + critical_nb_cuts[''] += 1 + logger.warning('Gdirectory %s has no events.lhe file. (no points passed cuts found)' % G) + for G, nb in critical_nb_cuts.items(): + if not G: + continue + else: + logger.warning('%s channel %s.XXX has no events.lhe file. (no points passed cuts). No %s with events detected' % (nb, G, G)) + logger.debug(' - no points passed cuts: %s' % len(reasons['cuts'])) + logger.log(10, ' DETAIL:' + ','.join(['/'.join(G.rsplit(os.sep)[-2:]) for G in reasons['cuts'][:10]])) + logger.debug(' - without any BW handling (critical): %s' % critical_nb_cuts['']) + logger.debug(' - with BW but all zero (critical): %s' % sum([nb for v, nb in critical_nb_cuts.items() if v!=''], 0)) + #logger.debug(' - cuts (with BW conflict where other channel contributes): %s' % (len(reasons['cuts'])- critical_nb_cuts)) + + + return Gdirs + + ############################################################################ def set_run_name(self, name, tag=None, level='parton', reload_card=False, allow_new_tag=True): @@ -6749,7 +6883,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 +6893,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 +7010,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 +7038,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 +7053,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 +7065,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 +7190,13 @@ 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) 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 +7210,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..30582625dd 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.3, 2025-06-12 // 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..657e7fb4ca 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.3, 2025-06-12 // 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..2433937760 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.3, 2025-06-12 // 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/test/cudacpp_test.mk b/epochX/cudacpp/susy_gg_tt.mad/test/cudacpp_test.mk index f703a1ae7c..4934c9a53f 100644 --- a/epochX/cudacpp/susy_gg_tt.mad/test/cudacpp_test.mk +++ b/epochX/cudacpp/susy_gg_tt.mad/test/cudacpp_test.mk @@ -19,7 +19,7 @@ CXXFLAGS += -Igoogletest/googletest/include/ -std=c++11 all: googletest/$(INSTALLDIR)/lib64/libgtest.a googletest/CMakeLists.txt: - git clone https://github.com/google/googletest.git -b release-1.11.0 googletest + git clone https://github.com/google/googletest.git -b v1.17.0 googletest googletest/$(BUILDDIR)/Makefile: googletest/CMakeLists.txt mkdir -p googletest/$(BUILDDIR) 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/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..217451bc59 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.3, 2025-06-12 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //========================================================================== @@ -552,7 +552,9 @@ namespace mg5amcCpu #else memcpy( cHel, tHel, ncomb * npar * sizeof( short ) ); #endif +#ifdef MGONGPUCPP_DEBUG fpeEnable(); // enable SIGFPE traps for Floating Point Exceptions +#endif } //-------------------------------------------------------------------------- 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..e1daad3cf2 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.3, 2025-06-12 // 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/cudacpp.mk b/epochX/cudacpp/susy_gg_tt.sa/SubProcesses/cudacpp.mk index 20d8ded718..20b8e6b858 100644 --- a/epochX/cudacpp/susy_gg_tt.sa/SubProcesses/cudacpp.mk +++ b/epochX/cudacpp/susy_gg_tt.sa/SubProcesses/cudacpp.mk @@ -114,7 +114,7 @@ export CXXFLAGS override CUDA_HOME = $(patsubst %/bin/nvcc,%,$(shell which nvcc 2>/dev/null)) # Set HIP_HOME from the path to hipcc, if it exists -override HIP_HOME = $(patsubst %/bin/hipcc,%,$(shell which hipcc 2>/dev/null)) +override HIP_HOME = $(shell hipconfig --rocmpath) # Configure CUDA_INC (for CURAND and NVTX) and NVTX if a CUDA installation exists (see #965) ifeq ($(CUDA_HOME),) @@ -229,6 +229,8 @@ ifeq ($(BACKEND),cuda) else ifeq ($(BACKEND),hip) + # example architecture values MI200:gfx90a, MI350X:gfx942 + MADGRAPH_HIP_ARCHITECTURE ?= gfx942 # Set GPUCC as $(HIP_HOME)/bin/hipcc (it was already checked above that this exists) GPUCC = $(HIP_HOME)/bin/hipcc XCOMPILERFLAG = @@ -243,7 +245,7 @@ else ifeq ($(BACKEND),hip) ###GPUFLAGS += -ggdb # FOR DEBUGGING ONLY # AMD HIP architecture flags - GPUARCHFLAGS = --offload-arch=gfx90a + GPUARCHFLAGS = --offload-arch=${MADGRAPH_HIP_ARCHITECTURE} GPUFLAGS += $(GPUARCHFLAGS) # Other AMD-specific flags @@ -878,7 +880,7 @@ endif $(gpu_fcheckmain): LIBFLAGS += $(GPULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH $(gpu_fcheckmain): $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBDIR)/lib$(MG5AMC_GPULIB).so $(gpu_objects_exe) ifneq ($(findstring hipcc,$(GPUCC)),) # link fortran/c++/hip using $FC when hipcc is used #802 - $(FC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) -lstdc++ -L$(shell cd -L $(shell dirname $(shell $(GPUCC) -print-prog-name=clang))/../..; pwd)/lib -lamdhip64 + $(FC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) -lstdc++ -L$(HIP_HOME)/lib -lamdhip64 else $(GPUCC) -o $@ $(BUILDDIR)/fcheck_sa_fortran.o $(BUILDDIR)/fsampler_$(GPUSUFFIX).o $(LIBFLAGS) -lgfortran -L$(LIBDIR) -l$(MG5AMC_GPULIB) $(gpu_objects_exe) endif @@ -979,7 +981,7 @@ else # link only runTest_$(GPUSUFFIX).o (new: in the past, this was linking both $(gpu_testmain): LIBFLAGS += $(GPULIBFLAGSRPATH) # avoid the need for LD_LIBRARY_PATH $(gpu_testmain): $(LIBDIR)/lib$(MG5AMC_COMMONLIB).so $(gpu_objects_lib) $(gpu_objects_exe) $(GTESTLIBS) ifneq ($(findstring hipcc,$(GPUCC)),) # link fortran/c++/hip using $FC when hipcc is used #802 - $(FC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lstdc++ -lpthread -L$(shell cd -L $(shell dirname $(shell $(GPUCC) -print-prog-name=clang))/../..; pwd)/lib -lamdhip64 + $(FC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lstdc++ -lpthread -L$(HIP_HOME)/lib -lamdhip64 else $(GPUCC) -o $@ $(gpu_objects_lib) $(gpu_objects_exe) -ldl $(LIBFLAGS) -lcuda endif @@ -1104,10 +1106,20 @@ else @cat /proc/cpuinfo | grep "physical id" | sort -u endif @echo "" -ifneq ($(shell which nvidia-smi 2>/dev/null),) - nvidia-smi -L + # some systems may have -smi installed, but it fails to execute + # because it cannot communicate with the hardware + @if nvidia-smi &>/dev/null ; then \ + nvidia-smi -L ;\ + else \ + echo "No Nvidia GPU detected" ;\ + fi @echo "" -endif + @if amd-smi &>/dev/null ; then \ + amd-smi static -a ;\ + amd-smi list ;\ + else \ + echo "No AMD GPU detected" ;\ + fi @echo USECCACHE=$(USECCACHE) ifeq ($(USECCACHE),1) ccache --version | head -1 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..30582625dd 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.3, 2025-06-12 // 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..657e7fb4ca 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.3, 2025-06-12 // 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..2433937760 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.3, 2025-06-12 // 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/test/cudacpp_test.mk b/epochX/cudacpp/susy_gg_tt.sa/test/cudacpp_test.mk index f703a1ae7c..4934c9a53f 100644 --- a/epochX/cudacpp/susy_gg_tt.sa/test/cudacpp_test.mk +++ b/epochX/cudacpp/susy_gg_tt.sa/test/cudacpp_test.mk @@ -19,7 +19,7 @@ CXXFLAGS += -Igoogletest/googletest/include/ -std=c++11 all: googletest/$(INSTALLDIR)/lib64/libgtest.a googletest/CMakeLists.txt: - git clone https://github.com/google/googletest.git -b release-1.11.0 googletest + git clone https://github.com/google/googletest.git -b v1.17.0 googletest googletest/$(BUILDDIR)/Makefile: googletest/CMakeLists.txt mkdir -p googletest/$(BUILDDIR)

\ 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 "