diff --git a/.cherry-pick b/.cherry-pick new file mode 100644 index 00000000..9942a564 --- /dev/null +++ b/.cherry-pick @@ -0,0 +1,55 @@ +git remote add jmcarcell https://github.com/jmcarcell/spack || true +git fetch jmcarcell -q + +# add a recent version of madgraph, remove when https://github.com/spack/spack/pull/41128 is merged +curl -s https://patch-diff.githubusercontent.com/raw/spack/spack/pull/41128.diff | patch -p1 + +# add vdt for CPATH, needed for podio+rntuple +git cherry-pick f97fabc3ff12527e5220ea6917719a73f8bd4315 -X theirs --no-commit + +# Add a patch to fix whizard (re pythia8), remove! +curl -s https://patch-diff.githubusercontent.com/raw/spack/spack/pull/43045.diff | patch -p1 + +# podio: add rpath, remove when https://github.com/spack/spack/pull/42844 is merged +git cherry-pick 4d3b81d73b9dcbbe176d6baf3c00a4032307f6a8 -X theirs --no-commit + +# gaudi: add missing std::list, remove when building 38.2 +git cherry-pick 6b02e009664c6effb581023982dcb7863da5fb88 -X theirs --no-commit + +# gaudi: Add v38.1, remove! +git cherry-pick 64df3df040c71ce2f31f718df1afb373bcf68368 -X theirs --no-commit + +# pythia8: Add fix for 8.311, remove when https://github.com/spack/spack/pull/43803 is merged +curl -s https://patch-diff.githubusercontent.com/raw/spack/spack/pull/43803.diff | patch -p1 + +# fastjet: Add a cxxstd variant, remove! +curl -s https://patch-diff.githubusercontent.com/raw/spack/spack/pull/44072.diff | patch -p1 + +# pythia8: Add a cxxstd, remove when https://github.com/spack/spack/pull/44077 is merged +curl -s https://patch-diff.githubusercontent.com/raw/spack/spack/pull/44077.diff | patch -p1 + +# fix issues when reconcretizing a GitVersion? remove when https://github.com/spack/spack/pull/43859 is merged +curl -s https://patch-diff.githubusercontent.com/raw/spack/spack/pull/43859.diff | patch -p1 + +# py-onnxruntime: Install the session headers, needed by FCCAnalyses +git cherry-pick e272ffa5a4768d23f1579403f9872360630e7278 -X theirs --no-commit + + +if [[ "$(grep -E '^ID=' /etc/os-release)" = 'ID="centos"' && "$(grep -E 'VERSION_ID' /etc/os-release)" = 'VERSION_ID="7"' ]]; then + + # patch for intel-tbb for CentOS 7, see https://github.com/oneapi-src/oneTBB/issues/859 + # because we use binutils from the system which is old + git cherry-pick d8a0b0426a1c97c33c4b8f133d38e7dc03816a8c -X theirs --no-commit + + # Make py-onnxruntime depend on git for CentOS 7 because the + # system git is too old and fails at fetching, remove when https://github.com/spack/spack/pull/43076 is merged + git cherry-pick b330252d082dc2865fa169af831b7b7c2affa8a5 -X theirs --no-commit + +fi + +if [[ "$(grep -E '^ID=' /etc/os-release)" = 'ID=ubuntu' && "$(grep -E 'VERSION_ID' /etc/os-release)" = 'VERSION_ID="22.04"' ]]; then + + # patch to rename libz so texlive can be built + git cherry-pick f8c6f240ba9b99218eb72bfadce9f99952fec1de -X theirs --no-commit + +fi \ No newline at end of file diff --git a/.latest-commit b/.latest-commit index 9924e8d0..649b85fa 100644 --- a/.latest-commit +++ b/.latest-commit @@ -1 +1 @@ -12963c894f59bf03f2f8ab94536019d9f82d3527 \ No newline at end of file +f5946c4621035dd466953c8d2664ff5f82f38138 \ No newline at end of file diff --git a/README.md b/README.md index 87d071fd..7aff62ab 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,9 @@ repository](https://gitlab.cern.ch/key4hep/k4-deploy). Additionally, the file `.latest-commit` contains the latest commit of Spack used for the recent builds, which is updated from time to time to keep up with the -develop branch of Spack. +develop branch of Spack. In addition, the file `.cherry-pick` contains some +fixes needed to build the stack. These can also be found in the file +`.cherry-pick` that is shipped with every stack on cvmfs. ## Central Installations diff --git a/environments/key4hep-common/compilers.yaml b/environments/key4hep-common/compilers.yaml index bc42f789..830ae883 100644 --- a/environments/key4hep-common/compilers.yaml +++ b/environments/key4hep-common/compilers.yaml @@ -26,7 +26,7 @@ compilers: environment: {} extra_rpaths: [] - compiler: - spec: gcc@11.3.1 + spec: gcc@11.4.1 paths: cc: /usr/bin/gcc cxx: /usr/bin/g++ diff --git a/environments/key4hep-common/packages.yaml b/environments/key4hep-common/packages.yaml index 951f915e..bee2f24e 100644 --- a/environments/key4hep-common/packages.yaml +++ b/environments/key4hep-common/packages.yaml @@ -1,4 +1,10 @@ packages: + all: + target: [x86_64] + variants: build_type=Release cxxstd=20 + buildable: true + compiler: [] + acts: require: +dd4hep cxxstd=20 +json boost: @@ -24,6 +30,8 @@ packages: variants: ~flang~lldb~lld~lua~mlir~internal_unwind~polly~libomptarget~libomptarget_debug~gold~split_dwarf~llvm_dylib~link_llvm_dylib~omp_tsan~omp_as_runtime~code_signing~python~version_suffix~shlib_symbol_version~z3~zstd compiler-rt="none" libcxx="none" targets="x86" marlin: require: +lccd + madgraph5amc: + require: '@3: +pythia8' podio: require: +rntuple+rpath+sio py-numpy: @@ -37,7 +45,7 @@ packages: texlive: require: scheme=basic xrootd: - require: +krb5 + require: +krb5 cxxstd=20 # Use the system OpenGL as recommended by spack # See https://github.com/key4hep/key4hep-spack/issues/318 and @@ -76,13 +84,12 @@ packages: - spec: openssh@99 prefix: /usr - root: - require: +davix+fftw+gsl+math+minuit+mlp+opengl~postgres~pythia6+pythia8+python+r+root7+roofit+rpath~shadow+sqlite+ssl+tbb+threads+tmva+unuran+vc+vdt+x+xml+xrootd cxxstd=20 + require: '@6.30: +davix+fftw+gsl+math+minuit+mlp+opengl~postgres~pythia6+pythia8+python+r+root7+roofit+rpath~shadow+sqlite+ssl+tbb+threads+tmva+unuran+vc+vdt+x+xml+xrootd cxxstd=20' py-tensorflow: require: ~cuda~nccl whizard: - require: ~fastjet~latex+lcio~lhapdf+openloops~openmp+pythia8 hepmc=3 + require: ~fastjet~latex+lcio~lhapdf+openloops+openmp+pythia8 hepmc=3 k4simdelphes: require: ~delphes_hepmc evtgen: @@ -93,113 +100,29 @@ packages: require: ~openmp gperftools: require: ~libunwind - all: - target: [x86_64] - variants: build_type=Release cxxstd=20 - buildable: true - compiler: [] - - # C++20 - aidatt: - variants: build_type=Release cxxstd=20 - ced: - variants: build_type=Release cxxstd=20 - cedviewer: - variants: build_type=Release cxxstd=20 - cepcsw: - variants: build_type=Release cxxstd=20 - clicperformance: - variants: build_type=Release - conformaltracking: - variants: build_type=Release - ddfastshowerml: - variants: build_type=Release - ddkaltest: - variants: build_type=Release - ddmarlinpandora: - variants: build_type=Release cxxstd=20 - delphes: - variants: build_type=Release cxxstd=20 - dual-readout: - variants: build_type=Release cxxstd=20 + # C++20 that don't appear above edm4hep: - variants: build_type=Release cxxstd=20 - fcalclusterer: - variants: build_type=Release cxxstd=20 - fccanalyses: - variants: build_type=Release cxxstd=20 - fccdetectors: - variants: build_type=Release cxxstd=20 - fccsw: - variants: build_type=Release cxxstd=20 - forwardtracking: - variants: build_type=Release cxxstd=20 + variants: cxxstd=20 + fastjet: + variants: cxxstd=20 gear: - variants: build_type=Release cxxstd=20 + variants: cxxstd=20 ilcutil: - variants: build_type=Release cxxstd=20 - ildperformance: - variants: build_type=Release cxxstd=20 - k4clue: - variants: build_type=Release cxxstd=20 - k4edm4hep2lcioconv: - variants: build_type=Release cxxstd=20 - k4fwcore: - variants: build_type=Release cxxstd=20 - k4gen: - variants: build_type=Release cxxstd=20 - k4geo: - variants: build_type=Release cxxstd=20 - k4marlinwrapper: - variants: build_type=Release cxxstd=20 - k4projecttemplate: - variants: build_type=Release cxxstd=20 - k4reccalorimeter: - variants: build_type=Release cxxstd=20 - k4reco: - variants: build_type=Release cxxstd=20 - k4rectracker: - variants: build_type=Release cxxstd=20 - k4simgeant4: - variants: build_type=Release cxxstd=20 - kaltest: - variants: build_type=Release cxxstd=20 - kitrack: - variants: build_type=Release cxxstd=20 - kitrackmarlin: - variants: build_type=Release cxxstd=20 - lcfiplus: - variants: build_type=Release cxxstd=20 + variants: cxxstd=20 lcio: - variants: build_type=Release cxxstd=20 - lctuple: - variants: build_type=Release cxxstd=20 - marlindd4hep: - variants: build_type=Release cxxstd=20 - marlinfastjet: - variants: build_type=Release cxxstd=20 - marlinkinfit: - variants: build_type=Release cxxstd=20 - marlinkinfitprocessors: - variants: build_type=Release cxxstd=20 - marlinreco: - variants: build_type=Release cxxstd=20 - marlintrk: - variants: build_type=Release - marlintrkprocessors: - variants: build_type=Release cxxstd=20 - marlinutil: - variants: build_type=Release cxxstd=20 - opendatadetector: - variants: build_type=Release cxxstd=20 - overlay: - variants: build_type=Release cxxstd=20 - pandoraanalysis: - variants: build_type=Release cxxstd=20 - physsim: - variants: build_type=Release - raida: - variants: build_type=Release + variants: cxxstd=20 + pythia8: + variants: cxxstd=20 sio: - variants: build_type=Release cxxstd=20 + variants: cxxstd=20 + + # onnx and py-onnx should have the same versions + # And all should be consistent based on this table: + # https://onnxruntime.ai/docs/reference/compatibility.html#onnx-opset-support + onnx: + require: '@1.15.0' + py-onnx: + require: '@1.15.0' + py-onnxruntime: + require: '@1.17.1' \ No newline at end of file diff --git a/environments/key4hep-nightly/packages.yaml b/environments/key4hep-nightly/packages.yaml index 8c9202df..185428da 100644 --- a/environments/key4hep-nightly/packages.yaml +++ b/environments/key4hep-nightly/packages.yaml @@ -2,13 +2,13 @@ packages: acts: variants: build_type=RelWithDebInfo aidatt: - variants: build_type=RelWithDebInfo cxxstd=20 + variants: build_type=RelWithDebInfo ced: - variants: build_type=RelWithDebInfo cxxstd=20 + variants: build_type=RelWithDebInfo cedviewer: - variants: build_type=RelWithDebInfo cxxstd=20 + variants: build_type=RelWithDebInfo cepcsw: - variants: build_type=RelWithDebInfo cxxstd=20 + variants: build_type=RelWithDebInfo clicperformance: variants: build_type=RelWithDebInfo conformaltracking: @@ -20,25 +20,25 @@ packages: ddkaltest: variants: build_type=RelWithDebInfo ddmarlinpandora: - variants: build_type=RelWithDebInfo cxxstd=20 + variants: build_type=RelWithDebInfo delphes: - variants: build_type=RelWithDebInfo cxxstd=20 + variants: build_type=RelWithDebInfo dual-readout: - variants: build_type=RelWithDebInfo cxxstd=20 + variants: build_type=RelWithDebInfo edm4hep: variants: build_type=RelWithDebInfo cxxstd=20 fcalclusterer: - variants: build_type=RelWithDebInfo cxxstd=20 + variants: build_type=RelWithDebInfo fccanalyses: - variants: build_type=RelWithDebInfo cxxstd=20 + variants: build_type=RelWithDebInfo fccdetectors: - variants: build_type=RelWithDebInfo cxxstd=20 + variants: build_type=RelWithDebInfo fccsw: - variants: build_type=RelWithDebInfo cxxstd=20 + variants: build_type=RelWithDebInfo forwardtracking: - variants: build_type=RelWithDebInfo cxxstd=20 + variants: build_type=RelWithDebInfo gaudi: - variants: build_type=RelWithDebInfo cxxstd=20 + variants: build_type=RelWithDebInfo geant4: variants: build_type=RelWithDebInfo gear: @@ -46,69 +46,69 @@ packages: ilcutil: variants: build_type=RelWithDebInfo cxxstd=20 ildperformance: - variants: build_type=RelWithDebInfo cxxstd=20 + variants: build_type=RelWithDebInfo k4clue: - variants: build_type=RelWithDebInfo cxxstd=20 + variants: build_type=RelWithDebInfo k4edm4hep2lcioconv: - variants: build_type=RelWithDebInfo cxxstd=20 + variants: build_type=RelWithDebInfo k4fwcore: - variants: build_type=RelWithDebInfo cxxstd=20 + variants: build_type=RelWithDebInfo k4gen: - variants: build_type=RelWithDebInfo cxxstd=20 + variants: build_type=RelWithDebInfo k4geo: - variants: build_type=RelWithDebInfo cxxstd=20 + variants: build_type=RelWithDebInfo k4marlinwrapper: - variants: build_type=RelWithDebInfo cxxstd=20 + variants: build_type=RelWithDebInfo k4projecttemplate: - variants: build_type=RelWithDebInfo cxxstd=20 + variants: build_type=RelWithDebInfo k4reccalorimeter: - variants: build_type=RelWithDebInfo cxxstd=20 + variants: build_type=RelWithDebInfo k4reco: variants: build_type=RelWithDebInfo k4rectracker: - variants: build_type=RelWithDebInfo cxxstd=20 + variants: build_type=RelWithDebInfo k4simdelphes: - variants: build_type=RelWithDebInfo cxxstd=20 + variants: build_type=RelWithDebInfo k4simgeant4: - variants: build_type=RelWithDebInfo cxxstd=20 + variants: build_type=RelWithDebInfo kaltest: - variants: build_type=RelWithDebInfo cxxstd=20 + variants: build_type=RelWithDebInfo kitrack: - variants: build_type=RelWithDebInfo cxxstd=20 + variants: build_type=RelWithDebInfo kitrackmarlin: - variants: build_type=RelWithDebInfo cxxstd=20 + variants: build_type=RelWithDebInfo lccd: - variants: build_type=RelWithDebInfo cxxstd=20 + variants: build_type=RelWithDebInfo lcfiplus: - variants: build_type=RelWithDebInfo cxxstd=20 + variants: build_type=RelWithDebInfo lcio: variants: build_type=RelWithDebInfo cxxstd=20 lctuple: - variants: build_type=RelWithDebInfo cxxstd=20 + variants: build_type=RelWithDebInfo marlin: - variants: build_type=RelWithDebInfo cxxstd=20 + variants: build_type=RelWithDebInfo marlindd4hep: - variants: build_type=RelWithDebInfo cxxstd=20 + variants: build_type=RelWithDebInfo marlinfastjet: - variants: build_type=RelWithDebInfo cxxstd=20 + variants: build_type=RelWithDebInfo marlinkinfit: - variants: build_type=RelWithDebInfo cxxstd=20 + variants: build_type=RelWithDebInfo marlinkinfitprocessors: - variants: build_type=RelWithDebInfo cxxstd=20 + variants: build_type=RelWithDebInfo marlinreco: - variants: build_type=RelWithDebInfo cxxstd=20 + variants: build_type=RelWithDebInfo marlintrk: variants: build_type=RelWithDebInfo marlintrkprocessors: - variants: build_type=RelWithDebInfo cxxstd=20 + variants: build_type=RelWithDebInfo marlinutil: - variants: build_type=RelWithDebInfo cxxstd=20 + variants: build_type=RelWithDebInfo opendatadetector: - variants: build_type=RelWithDebInfo cxxstd=20 + variants: build_type=RelWithDebInfo overlay: - variants: build_type=RelWithDebInfo cxxstd=20 + variants: build_type=RelWithDebInfo pandoraanalysis: - variants: build_type=RelWithDebInfo cxxstd=20 + variants: build_type=RelWithDebInfo physsim: variants: build_type=RelWithDebInfo podio: @@ -117,3 +117,7 @@ packages: variants: build_type=RelWithDebInfo sio: variants: build_type=RelWithDebInfo cxxstd=20 + + whizard: + require: ~fastjet+latex+lcio~lhapdf+openloops+openmp+pythia8 hepmc=3 + diff --git a/environments/key4hep-nightly/spack.yaml b/environments/key4hep-nightly/spack.yaml index 20452762..d6f6210f 100644 --- a/environments/key4hep-nightly/spack.yaml +++ b/environments/key4hep-nightly/spack.yaml @@ -2,9 +2,10 @@ spack: view: false include: - ../key4hep-common/config-nightlies.yaml - - ../key4hep-common/packages.yaml - # Put packages after the common packages so that it doesn't get overwritten + # Put packages before the common packages so that it doesn't get overwritten + # See https://github.com/spack/spack/blob/master/lib/spack/docs/environments.rst?plain=1#L528 - ./packages.yaml + - ../key4hep-common/packages.yaml - ../key4hep-common/compilers.yaml repos: - ../.. diff --git a/packages/babayaga/cross-section.patch b/packages/babayaga/cross-section.patch new file mode 100644 index 00000000..19cbc11e --- /dev/null +++ b/packages/babayaga/cross-section.patch @@ -0,0 +1,160 @@ +--- babayaga-fcc/main.f 2021-04-29 13:03:58.000000000 +0200 ++++ main.f 2024-05-06 18:47:18.296583800 +0200 +@@ -93,6 +93,8 @@ + character*20 hstnm + common/hostandpid/hstnm,idproc + ++ common/crosssections/xsec,var ++ + idproc = getpid() + call hostnm(hstnm) + +@@ -484,6 +486,22 @@ + endif + endif + ++ if (isnan(sdif)) then ++ print*,'NAN found (pos 2) setting sdif to 0!!!!' ++ print*,'pid,hostnm,ord,k,ng,emtx,sv,sdif,phsp,w' ++ print*,idproc,hstnm,ord,k,ng,emtx,sv,sdif,phsp,w ++ sdif = 0.d0 ++ w = 0.d0 ++ phsp = 0.d0 ++ ie = 1 ++ print*,'end ----!!!' ++ if (iverbose.gt.0) then ++ call printstatus(5,k,p1,p2,qph,xsec,var,varbefore, ++ . sdif,sdifmax,fmax) ++ endif ++ endif ++ ++ + !! unweightening for unweighted events... + if (k.gt.nsearch) then + istopsearch = 1 +@@ -517,24 +535,12 @@ + endif + endif + endif +- +- if (isnan(sdif)) then +- print*,'NAN found (pos 2) setting sdif to 0!!!!' +- print*,'pid,hostnm,ord,k,ng,emtx,sv,sdif,phsp,w' +- print*,idproc,hstnm,ord,k,ng,emtx,sv,sdif,phsp,w +- sdif = 0.d0 +- w = 0.d0 +- phsp = 0.d0 +- ie = 1 +- print*,'end ----!!!' +- if (iverbose.gt.0) then +- call printstatus(5,k,p1,p2,qph,xsec,var,varbefore, +- . sdif,sdifmax,fmax) +- endif +- endif + + sum = sum + sdif + sum2 = sum2 + sdif**2 ++ varbefore = var ++ xsec = sum/k ++ var = sqrt(abs((sum2/k-xsec**2)/k)) + + if (ng.eq.0) then + sumborn = sumborn + sdif/sv +@@ -547,9 +553,6 @@ + sump(ng) = sump(ng) + sdif + sum2p(ng) = sum2p(ng) + sdif**2 + +- varbefore = var +- xsec = sum/k +- var = sqrt(abs((sum2/k-xsec**2)/k)) + c tollerate = 1.2d0 + tollerate = 1.8d0 + if (var.gt.tollerate*varbefore +@@ -628,8 +631,8 @@ + endif + !! + xsec = sum/k +- var = sqrt((abs(sum2/k-xsec**2))/k) +- ++ var = sqrt((abs(sum2/k-xsec**2))/k) ++ + xsecborn = sumborn/k + varborn = sqrt((abs(sum2born/k-xsecborn**2))/k) + +--- babayaga-fcc/storage.F 2021-04-29 13:03:58.000000000 +0200 ++++ storage.F 2024-05-06 18:47:21.846583712 +0200 +@@ -9,7 +9,10 @@ + implicit double precision (a-h,o-z) + character*(*) storfile + integer i,istmod ++ character*100 storagefile ++ common/storagef/storagefile + include 'LesHouches.h' ++ storagefile = storfile + istorunit = 61 + if (i.eq.0) return + +@@ -52,8 +55,12 @@ + + write(ist,111)idbmup(1),idbmup(2),ebmup(1),ebmup(2), + . pdfgup(1),pdfgup(2),pdfsup(1),pdfsup(2),idwtup,nprup +- write(ist,222)xsecup(1),xerrup(1),xmaxup(1),lprup(1) +- ++ ++ ++*-- modified 27/4/2024 ++c write(ist,222)xsecup(1),xerrup(1),xmaxup(1),lprup(1) ++ write(ist,'(a)')'TOBECHANGED' ++*-- + write(ist,'(a)')'' + + 111 format(2(2x,I3),2(2x,G16.9),6(2x,I3)) +@@ -72,6 +79,13 @@ + common/storedevents/nstored + data nstored /0/ + ++ common/crosssections/xsec,var ++ common/realinput/anpoints,sdifmax ++ ++ xsecup(1) = xsec ++ xerrup(1) = var ++ xmaxup(1) = sdifmax ++ + nstored = nstored + 1 + + ccc counting extra photons +@@ -160,9 +174,6 @@ + + return + end +-******************************************* +- +- + ********************************************************* + subroutine eventstorage_unweighted(p3,p4,qph) + implicit double precision (a-h,o-z) +@@ -244,13 +255,21 @@ + end + ******************************************* + subroutine finalizestorageLHA(i) +- integer istorunit,i +- common/storageunit/istorunit ++ integer i,k ++ character*200 stringa ++ character*100 storagefile ++ common/storagef/storagefile ++ include 'LesHouches.h' + if (i.eq.0) return + write(istorunit,'(a)')'' + close(istorunit) ++*-- modified 27/4/2024 ++ write(stringa,222)xsecup(1),xerrup(1),xmaxup(1),lprup(1) ++ call EXECUTE_COMMAND_LINE("sed -i '0,/TOBECHANGED/ s/TOBECHANGED/" ++ .//trim(stringa)//"/' "//trim(storagefile)) ++ 222 format(3(2x,G16.9),1(2x,I3)) ++*__ + end +- + ******************************************* + subroutine finalizestorage(i) + integer istorunit,i diff --git a/packages/babayaga/package.py b/packages/babayaga/package.py index 79e20f52..b9e3116a 100644 --- a/packages/babayaga/package.py +++ b/packages/babayaga/package.py @@ -34,6 +34,10 @@ class Babayaga(MakefilePackage): # See https://stackoverflow.com/questions/44308577/ieee-underflow-flag-ieee-denormal-in-fortran-77 patch("main_stop.patch") + # Write the cross sections to the LHE files, patch provided by the authors + # in a mail + patch("cross-section.patch") + def build(self, spec, prefix): with working_dir("."): make("-f", "Makefile", "babayaga-fcc") diff --git a/packages/fccanalyses/package.py b/packages/fccanalyses/package.py index 9b39e897..fd72938a 100644 --- a/packages/fccanalyses/package.py +++ b/packages/fccanalyses/package.py @@ -29,45 +29,21 @@ class Fccanalyses(CMakePackage, Key4hepPackage): "0.6.0", sha256="a740c1818cc9e02ce44306b9a4f828b3ce85d2afaed1fc06d8f8a41f89f9abe2", ) - version( - "0.5.1", - sha256="2d5493340e21e8a24cbbfec9a465616fca736c5058bd27acf79eb07f8948ea2b", - ) - version( - "0.5.0", - sha256="6c4b68d15fbae3793473dc4475f216b65c1962ed5de7979e75b024cb6d05d541", - ) - version( - "0.4.1", - sha256="60db645152326775e9ce0f8c5017bd68d83d0024ac71e3266dac2f83d96ffce3", - ) - version( - "0.4.0", - sha256="0089d8dd71e45f31afb531f4bdd3140f78eb5484cc126746fff51d750b317a1f", - ) - version( - "0.3.7", - sha256="523e7c6d8db73028356b468afb01bd1f077ff4268817afe56df92fc47d492fd2", - ) - version( - "0.3.6", - sha256="ec673e22b44c6c7b4e947ba16e3c0f12c08ee4443433fcdfd2c09a6795ddb0b7", - ) - version( - "0.3.5", - sha256="efc08ea107d2fe10c24486d549e8ad8f6457c9c9003d2d12d1c44ebcdbd9664c", + + patch( + "https://github.com/HEP-FCC/FCCAnalyses/commit/f645584b81aacd0b0f8141b28bcbfa139aecad5c.patch?full_index=1", + when="@0.8.0", + sha256="0a324f913e515c0a12d3d799e4c924ad57eaad51cbeae2633417bb819d97d227", ) patch( - "https://patch-diff.githubusercontent.com/raw/HEP-FCC/FCCAnalyses/pull/176.patch", - when="@0.4.0", - sha256="bff4be96d0c177caccc3642bc1b3538004a8d3e5a19b472563ac867281a65bd6", + "https://patch-diff.githubusercontent.com/raw/HEP-FCC/FCCAnalyses/pull/373.patch?full_index=1", + sha256="e77e5962d35d764cae5757f066eecc30fa9c60cb05ff087e684636e7c8e4724d", ) patch( - "https://github.com/HEP-FCC/FCCAnalyses/commit/f645584b81aacd0b0f8141b28bcbfa139aecad5c.patch?full_index=1", - when="@0.8.0", - sha256="0a324f913e515c0a12d3d799e4c924ad57eaad51cbeae2633417bb819d97d227", + "https://patch-diff.githubusercontent.com/raw/HEP-FCC/FCCAnalyses/pull/374.patch?full_index=1", + sha256="aba8cb69ba3494fe48bc4a3d26189932c4974c0013278081893cfef09606fae2", ) variant("onnx", default=True, description="Build ONNX-dependent analyzers.") @@ -86,13 +62,13 @@ class Fccanalyses(CMakePackage, Key4hepPackage): depends_on("acts", when="+acts") depends_on("acts@:29", when="@:0.8.0 +acts") depends_on("acts@19.6.0:28", when="@0.7.0 +acts") - depends_on("acts@6.00.0:19.5.0", when="@0.3.5:0.6.0 +acts") + depends_on("acts@6.00.0:19.5.0", when="@:0.6.0 +acts") depends_on("eigen") depends_on("dd4hep", when="+dd4hep") depends_on("py-pyyaml", type=("build", "run")) depends_on("py-onnxruntime", when="+onnx") depends_on("delphes@3.5.1pre07:", when="@0.7.0:") - depends_on("catch2@3:", type=("test"), when="@0.4:") + depends_on("catch2@3:", type=("test")) def cmake_args(self): args = [ diff --git a/packages/k4clue/package.py b/packages/k4clue/package.py index 0f69c7e3..8be3b26b 100644 --- a/packages/k4clue/package.py +++ b/packages/k4clue/package.py @@ -57,6 +57,9 @@ class K4clue(CMakePackage, Ilcsoftpackage): def cmake_args(self): args = [] args.append(self.define("cupla_DIR", self.spec["cupla"].prefix)) + args.append( + f"-DCMAKE_CXX_STANDARD={self.spec['root'].variants['cxxstd'].value}" + ) return args def setup_run_environment(self, env): diff --git a/packages/k4geo/package.py b/packages/k4geo/package.py index 008bfa63..6224fc6d 100644 --- a/packages/k4geo/package.py +++ b/packages/k4geo/package.py @@ -35,23 +35,6 @@ class K4geo(CMakePackage): "0.18", sha256="50cd058e80baba21748156f3603a45a2388c6f3a8823d9aaa3f419eb58038fc9", ) - version( - "0.17", - sha256="4b515895df7a65b0c1f4061a8947b1bbb4c727b924ad73a1f03722de31327c3f", - ) - version( - "0.16.8", - sha256="6ce3ec018aa2b86a50f7c2dd868c0bd9d46b413bdde70139fcbe2f8167bb835a", - ) - version("0.16.7", tag="v00-16-07") - version( - "0.16.6", - sha256="76593d4f339c5e89acdb878de1f48eb46d9a9faf9c7e1bcac8346c235c2508c6", - ) - version( - "0.16.5", - sha256="e6d88dcca5440632241c30cab7bc0d314afef42a7a7ff15b68fc59cf997cda08", - ) variant("compact", default=True, description="Install compact files") @@ -62,17 +45,6 @@ class K4geo(CMakePackage): depends_on("python", type="build") depends_on("ninja", type="build") - patch( - "https://patch-diff.githubusercontent.com/raw/key4hep/k4geo/pull/255.diff", - sha256="fc39117d3b579ab383077fd7274d321f1e954cefa9e481b45310cd36b35aa3dd", - when="@0.16.8", - ) - patch( - "https://github.com/key4hep/k4geo/commit/cb87609446255c3a94da867ad7801a62ff3b6b05.patch", - sha256="3e02ca5c89558342d8fd2489463c285af5a5500baeba2faf8d41f8ec3ae2f487", - when="@0.16.7", - ) - def cmake_args(self): args = [] args.append( diff --git a/packages/k4marlinwrapper/package.py b/packages/k4marlinwrapper/package.py index de7f786d..0de9d99f 100644 --- a/packages/k4marlinwrapper/package.py +++ b/packages/k4marlinwrapper/package.py @@ -40,6 +40,9 @@ class K4marlinwrapper(CMakePackage, Ilcsoftpackage): def cmake_args(self): args = [self.define("FORCE_COLORED_OUTPUT", False)] + args.append( + f"-DCMAKE_CXX_STANDARD={self.spec['root'].variants['cxxstd'].value}" + ) return args def setup_run_environment(self, env): diff --git a/packages/k4reccalorimeter/package.py b/packages/k4reccalorimeter/package.py index 2d70d0e8..2b47a040 100644 --- a/packages/k4reccalorimeter/package.py +++ b/packages/k4reccalorimeter/package.py @@ -31,6 +31,11 @@ class K4reccalorimeter(CMakePackage, Key4hepPackage): depends_on("k4simgeant4") depends_on("py-onnxruntime") + patch( + "https://patch-diff.githubusercontent.com/raw/HEP-FCC/k4RecCalorimeter/pull/81.patch?full_index=1", + sha256="a46d2fa00230d92e23788bf41870748c64c0a4ef2973bec3b26d1cf6dfc9c2db", + ) + def cmake_args(self): args = [] args.append( diff --git a/packages/larcontent/package.py b/packages/larcontent/package.py index da28e2d7..5a69b540 100644 --- a/packages/larcontent/package.py +++ b/packages/larcontent/package.py @@ -16,6 +16,10 @@ class Larcontent(CMakePackage): maintainers = ["vvolkl"] version("master", branch="master") + version( + "4.8.1", + sha256="b15ffe74cf95f61901ec389ca9c763dc767464fc35c2a6ed800126c2d4d13017", + ) version( "4.4.0", sha256="2a495a3e6c322035c4fa99e66152fc9eb48a516533fd1870a18c889310dbe223", @@ -28,23 +32,8 @@ class Larcontent(CMakePackage): "4.0.0", sha256="01a28828a92daa4a95fd7399ec9df3c7be9ac2b33f40c5a031707894a44951cd", ) - version( - "3.27.0", - sha256="0aecf7e39fa96654bd19257e481997f0c9ee5871b97f587fa1b37046f909c4e0", - ) - version( - "3.24.1", - sha256="2cd11a05e87b32af06c27f1fea8d54d67141881b1ae4be72b2068a4f546fde5a", - ) - version( - "3.24.0", - sha256="02cb1533787f341823763de81478a6cb9be8971fc69be4cb1999f711fbb32f73", - ) - patch("path1.patch") - patch("path2.patch") - patch("path3.patch") - patch("path4.patch") + patch("path.patch") depends_on("pandorapfa") depends_on("pandorasdk") diff --git a/packages/larcontent/path.patch b/packages/larcontent/path.patch new file mode 100644 index 00000000..678a8d7c --- /dev/null +++ b/packages/larcontent/path.patch @@ -0,0 +1,40 @@ +diff --git a/cmake/LArContentConfig.cmake.in b/cmake/LArContentConfig.cmake.in +index 8d102df7..7d4abc38 100644 +--- a/cmake/LArContentConfig.cmake.in ++++ b/cmake/LArContentConfig.cmake.in +@@ -42,7 +42,7 @@ FIND_PATH( LArContent_INCLUDE_DIRS + + + # ---------- libraries -------------------------------------------------------- +-INCLUDE( "@PANDORA_CMAKE_MODULES_PATH@/MacroCheckPackageLibs.cmake" ) ++INCLUDE( "MacroCheckPackageLibs" ) + + # only standard libraries should be passed as arguments to CHECK_PACKAGE_LIBS + # additional components are set by cmake in variable PKG_FIND_COMPONENTS + +diff --git a/cmake/LArContentConfigVersion.cmake.in b/cmake/LArContentConfigVersion.cmake.in +index 605bc880..464638b6 100644 +--- a/cmake/LArContentConfigVersion.cmake.in ++++ b/cmake/LArContentConfigVersion.cmake.in +@@ -10,6 +10,6 @@ SET( ${PACKAGE_FIND_NAME}_VERSION_MINOR @LArContent_VERSION_MINOR@ ) + SET( ${PACKAGE_FIND_NAME}_VERSION_PATCH @LArContent_VERSION_PATCH@ ) + + +-INCLUDE( "@PANDORA_CMAKE_MODULES_PATH@/MacroCheckPackageVersion.cmake" ) ++INCLUDE( "MacroCheckPackageVersion" ) + CHECK_PACKAGE_VERSION( ${PACKAGE_FIND_NAME} @LArContent_VERSION@ ) + +diff --git a/cmake/LArPandoraContentConfig.cmake.in b/cmake/LArPandoraContentConfig.cmake.in +index bd078884..498db896 100644 +--- a/cmake/LArPandoraContentConfig.cmake.in ++++ b/cmake/LArPandoraContentConfig.cmake.in +@@ -42,7 +42,7 @@ FIND_PATH( LArPandoraContent_INCLUDE_DIRS + + + # ---------- libraries -------------------------------------------------------- +-INCLUDE( "@PANDORA_CMAKE_MODULES_PATH@/MacroCheckPackageLibs.cmake" ) ++INCLUDE( "MacroCheckPackageLibs" ) + + # only standard libraries should be passed as arguments to CHECK_PACKAGE_LIBS + # additional components are set by cmake in variable PKG_FIND_COMPONENTS + diff --git a/packages/larcontent/path1.patch b/packages/larcontent/path1.patch deleted file mode 100644 index 2cd0c062..00000000 --- a/packages/larcontent/path1.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/cmake/LArContentConfig.cmake.in b/cmake/LArContentConfig.cmake.in -index 8d102df7..7d4abc38 100644 ---- a/cmake/LArContentConfig.cmake.in -+++ b/cmake/LArContentConfig.cmake.in -@@ -42,7 +42,7 @@ FIND_PATH( LArContent_INCLUDE_DIRS - - - # ---------- libraries -------------------------------------------------------- --INCLUDE( "@PANDORA_CMAKE_MODULES_PATH@/MacroCheckPackageLibs.cmake" ) -+INCLUDE( "MacroCheckPackageLibs" ) - - # only standard libraries should be passed as arguments to CHECK_PACKAGE_LIBS - # additional components are set by cmake in variable PKG_FIND_COMPONENTS - diff --git a/packages/larcontent/path2.patch b/packages/larcontent/path2.patch deleted file mode 100644 index 60a75017..00000000 --- a/packages/larcontent/path2.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/cmake/LArContentConfigVersion.cmake.in b/cmake/LArContentConfigVersion.cmake.in -index 605bc880..464638b6 100644 ---- a/cmake/LArContentConfigVersion.cmake.in -+++ b/cmake/LArContentConfigVersion.cmake.in -@@ -10,6 +10,6 @@ SET( ${PACKAGE_FIND_NAME}_VERSION_MINOR @LArContent_VERSION_MINOR@ ) - SET( ${PACKAGE_FIND_NAME}_VERSION_PATCH @LArContent_VERSION_PATCH@ ) - - --INCLUDE( "@PANDORA_CMAKE_MODULES_PATH@/MacroCheckPackageVersion.cmake" ) -+INCLUDE( "MacroCheckPackageVersion" ) - CHECK_PACKAGE_VERSION( ${PACKAGE_FIND_NAME} @LArContent_VERSION@ ) - - diff --git a/packages/larcontent/path3.patch b/packages/larcontent/path3.patch deleted file mode 100644 index f3f8f15e..00000000 --- a/packages/larcontent/path3.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/cmake/LArPandoraContentConfig.cmake.in b/cmake/LArPandoraContentConfig.cmake.in -index bd078884..498db896 100644 ---- a/cmake/LArPandoraContentConfig.cmake.in -+++ b/cmake/LArPandoraContentConfig.cmake.in -@@ -42,7 +42,7 @@ FIND_PATH( LArPandoraContent_INCLUDE_DIRS - - - # ---------- libraries -------------------------------------------------------- --INCLUDE( "@PANDORA_CMAKE_MODULES_PATH@/MacroCheckPackageLibs.cmake" ) -+INCLUDE( "MacroCheckPackageLibs" ) - - # only standard libraries should be passed as arguments to CHECK_PACKAGE_LIBS - # additional components are set by cmake in variable PKG_FIND_COMPONENTS - diff --git a/packages/larcontent/path4.patch b/packages/larcontent/path4.patch deleted file mode 100644 index 73012010..00000000 --- a/packages/larcontent/path4.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/cmake/LArPandoraContentConfigVersion.cmake.in b/cmake/LArPandoraContentConfigVersion.cmake.in -index b444ffd7..ac0ae061 100644 ---- a/cmake/LArPandoraContentConfigVersion.cmake.in -+++ b/cmake/LArPandoraContentConfigVersion.cmake.in -@@ -10,6 +10,6 @@ SET( ${PACKAGE_FIND_NAME}_VERSION_MINOR @LArPandoraContent_VERSION_MINOR@ ) - SET( ${PACKAGE_FIND_NAME}_VERSION_PATCH @LArPandoraContent_VERSION_PATCH@ ) - - --INCLUDE( "@PANDORA_CMAKE_MODULES_PATH@/MacroCheckPackageVersion.cmake" ) -+INCLUDE( "MacroCheckPackageVersion" ) - CHECK_PACKAGE_VERSION( ${PACKAGE_FIND_NAME} @LArPandoraContent_VERSION@ ) - - diff --git a/packages/marlinutil/package.py b/packages/marlinutil/package.py index ebd059f5..91457b61 100644 --- a/packages/marlinutil/package.py +++ b/packages/marlinutil/package.py @@ -59,10 +59,9 @@ class Marlinutil(CMakePackage, Ilcsoftpackage): def cmake_args(self): spec = self.spec - cxxstd = spec["root"].variants["cxxstd"].value # Make sure that we pick the right GSL return [ - self.define("CMAKE_CXX_STANDARD", cxxstd), + self.define("CMAKE_CXX_STANDARD", spec["root"].variants["cxxstd"].value), self.define("GSL_DIR", self.spec["gsl"].prefix), self.define("BUILD_TESTING", self.run_tests), ] diff --git a/packages/pandorapfa/package.py b/packages/pandorapfa/package.py index 656c757c..5c029bbe 100644 --- a/packages/pandorapfa/package.py +++ b/packages/pandorapfa/package.py @@ -18,6 +18,10 @@ class Pandorapfa(Package): maintainers = ["vvolkl"] version("master", branch="master") + version( + "4.8.1", + sha256="3b9e224196f09f3ce59062e73e1d05d4e8821d8163025263eee4448f7529f780", + ) version( "4.4.1", sha256="98c628b5063695fa73649136ded0aaa8e40cb34d06000096117606d926599f3b", @@ -42,30 +46,6 @@ class Pandorapfa(Package): "4.0.0", sha256="80fdb60ac53ebada9d6ed2c6d0cefe79174586ce82e2e3bee7eefb4dbacbfba3", ) - version( - "3.25.3", - sha256="b390d85ef8081e3fe090862b084298344fc2a6f3c67e29cb4f2cdced7fa25628", - ) - version( - "3.25.2", - sha256="43eb43fd25bcba95ca391aa349058a3946551771e4373862a7b1a328cbfe3f4d", - ) - version( - "3.25.1", - sha256="dc1b4e910d27bc892be72a66696034bf63f9e5f4aa07d8c1799677b1a8261645", - ) - version( - "3.24.0", - sha256="a5a9d091e032a3bbdb383eb3bc5609fd3e57367907f3d07e3270f21ef6758074", - ) - version( - "3.21.01", - sha256="36dd20235d924b975c167a450943d5f70c9e76d95eea0f55c68b0eead6c99e47", - ) - version( - "3.21.00", - sha256="c36070916691bd4137a6a21aced2efd730cfe31a17819cf94511351b6edfec8d", - ) patch("path.patch") diff --git a/scripts/cvmfs/setup-nightlies.sh b/scripts/cvmfs/setup-nightlies.sh index b989cb6c..4feeb376 100644 --- a/scripts/cvmfs/setup-nightlies.sh +++ b/scripts/cvmfs/setup-nightlies.sh @@ -62,15 +62,16 @@ fi if [[ "$(grep -E '^ID=' /etc/os-release)" = 'ID="centos"' && "$(grep -E 'VERSION_ID' /etc/os-release)" = 'VERSION_ID="7"' ]] || [[ "$(grep -E '^ID=' /etc/os-release)" = 'ID="rhel"' && "$(grep -E 'VERSION_ID' /etc/os-release)" = VERSION_ID=\"7* ]]; then os="centos7" - k4path=$(echo /cvmfs/sw-nightlies.hsf.org/key4hep/releases/$rel/*centos7*) + k4path=$(ls -rd /cvmfs/sw-nightlies.hsf.org/key4hep/releases/$rel/*centos7* | head -n1) + echo "WARNING: CentOS 7 nightlies are not being built anymore and will be deleted soon, consider using AlmaLinux 9" elif [[ "$(grep -E '^ID=' /etc/os-release)" = 'ID="almalinux"' && "$(grep -E 'VERSION_ID' /etc/os-release)" = VERSION_ID=\"9* ]] || [[ "$(grep -E '^ID=' /etc/os-release)" = 'ID="rhel"' && "$(grep -E 'VERSION_ID' /etc/os-release)" = VERSION_ID=\"9* ]] || [[ "$(grep -E '^ID=' /etc/os-release)" = 'ID="rocky"' && "$(grep -E 'VERSION_ID' /etc/os-release)" = VERSION_ID=\"9* ]]; then os="almalinux9" - k4path=$(echo /cvmfs/sw-nightlies.hsf.org/key4hep/releases/$rel/*almalinux9*) + k4path=$(ls -rd /cvmfs/sw-nightlies.hsf.org/key4hep/releases/$rel/*almalinux9* | head -n1) elif [[ "$(grep -E '^ID=' /etc/os-release)" = 'ID=ubuntu' && "$(grep -E 'VERSION_ID' /etc/os-release)" = 'VERSION_ID="22.04"' ]]; then os="ubuntu22.04" - k4path=$(echo /cvmfs/sw-nightlies.hsf.org/key4hep/releases/$rel/*ubuntu22*) + k4path=$(ls -rd /cvmfs/sw-nightlies.hsf.org/key4hep/releases/$rel/*ubuntu22* | head -n1) else echo "Unsupported OS or OS couldn't be correctly detected, aborting..." echo "Supported OSes are: CentOS/RHEL 7, AlmaLinux/RockyLinux/RHEL 9, Ubuntu 22.04" diff --git a/scripts/cvmfs/setup-releases.sh b/scripts/cvmfs/setup-releases.sh index a1ea4aec..7b438f29 100644 --- a/scripts/cvmfs/setup-releases.sh +++ b/scripts/cvmfs/setup-releases.sh @@ -63,15 +63,15 @@ fi if [[ "$(grep -E '^ID=' /etc/os-release)" = 'ID="centos"' && "$(grep -E 'VERSION_ID' /etc/os-release)" = 'VERSION_ID="7"' ]] || [[ "$(grep -E '^ID=' /etc/os-release)" = 'ID="rhel"' && "$(grep -E 'VERSION_ID' /etc/os-release)" = VERSION_ID=\"7* ]]; then os="centos7" - k4path=$(echo /cvmfs/sw.hsf.org/key4hep/releases/$rel/*centos7*) + k4path=$(ls -rd /cvmfs/sw.hsf.org/key4hep/releases/$rel/*centos7* | head -n1) elif [[ "$(grep -E '^ID=' /etc/os-release)" = 'ID="almalinux"' && "$(grep -E 'VERSION_ID' /etc/os-release)" = VERSION_ID=\"9* ]] || [[ "$(grep -E '^ID=' /etc/os-release)" = 'ID="rhel"' && "$(grep -E 'VERSION_ID' /etc/os-release)" = VERSION_ID=\"9* ]] || [[ "$(grep -E '^ID=' /etc/os-release)" = 'ID="rocky"' && "$(grep -E 'VERSION_ID' /etc/os-release)" = VERSION_ID=\"9* ]]; then os="almalinux9" - k4path=$(echo /cvmfs/sw.hsf.org/key4hep/releases/$rel/*almalinux9*) + k4path=$(ls -rd /cvmfs/sw.hsf.org/key4hep/releases/$rel/*almalinux9* | head -n1) elif [[ "$(grep -E '^ID=' /etc/os-release)" = 'ID=ubuntu' && "$(grep -E 'VERSION_ID' /etc/os-release)" = 'VERSION_ID="22.04"' ]]; then os="ubuntu22.04" - k4path=$(echo /cvmfs/sw.hsf.org/key4hep/releases/$rel/*ubuntu22*) + k4path=$(ls -rd /cvmfs/sw.hsf.org/key4hep/releases/$rel/*ubuntu22* | head -n1) else echo "Unsupported OS or OS couldn't be correctly detected, aborting..." echo "Supported OSes are: CentOS/RHEL 7, AlmaLinux/RockyLinux/RHEL 9, Ubuntu 22.04" diff --git a/scripts/delete-unused.sh b/scripts/delete-unused.sh index 111439c7..ce76d29f 100755 --- a/scripts/delete-unused.sh +++ b/scripts/delete-unused.sh @@ -3,4 +3,5 @@ spack -e . python -c 'from spack.cmd import uninstall; uninstall.do_uninstall([x for x in spack.store.STORE.db.query_local() if not any(x.satisfies(y) for y in spack.environment.active_environment().all_specs_generator())], False)' # Same command but only print what would be deleted -# spack -e . python -c 'print([x for x in spack.store.STORE.db.query_local() if not any(x.satisfies(y) for y in spack.environment.active_environment().all_specs_generator())])' +# spack -e . python -c 'print([x.name for x in spack.store.STORE.db.query_local() if not any(x.satisfies(y) for y in spack.environment.active_environment().all_specs_generator())])' + diff --git a/scripts/fetch_nightly_versions.py b/scripts/fetch_nightly_versions.py index b074d688..2c37b5e5 100755 --- a/scripts/fetch_nightly_versions.py +++ b/scripts/fetch_nightly_versions.py @@ -53,6 +53,12 @@ def get_latest_commit( parser = argparse.ArgumentParser( description="Add latest commits to a spack environment" ) + + # There are commented blocks to write to the packages.yaml directly and + # having a single spec instead of having multiple However, spack keeps + # having issues when concretizing on top of an existing installation (that may not be complete) + # so I'm reverting back to the previous approach of having multiple specs + parser.add_argument( "--path", help="path to a yaml file with spack packages", @@ -61,6 +67,10 @@ def get_latest_commit( "--extra-path", help="path to a yaml file with spack packages", ) + # parser.add_argument( + # "--spack", + # help="path to the spack.yaml in the nightly environment", + # ) parser.add_argument( "date", help="date until which to search for commits, for example: 2021-01-01", @@ -83,6 +93,13 @@ def get_latest_commit( print("Please run this script from the key4hep-spack repository.") raise + # try: + # with open(args.spack, "r") as config: + # text = yaml.safe_load(config) + # except FileNotFoundError: + # print("Please run this script from the key4hep-spack repository.") + # raise + for package, location in [ ("aidatt", "aidasoft/aidatt"), ("ced", "ilcsoft/ced"), @@ -150,6 +167,7 @@ def get_latest_commit( line = f"@{commit}" if package not in ["cepcsw"]: line += "=develop" + original = " " if package in text["packages"] and "require" in text["packages"][package]: original = text["packages"][package]["require"] @@ -163,13 +181,19 @@ def get_latest_commit( text_extra["packages"][package]["require"] = line + original continue - if not text["packages"][package]: + if package not in text["packages"] or not text["packages"][package]: print(f"Adding {package}@{commit} to the key4hep-stack package.py") else: print(f"Updating {package}@{commit} in the key4hep-stack package.py") + if package not in text["packages"]: + text["packages"][package] = {} text["packages"][package]["require"] = line + # text["spack"]["specs"].append(f"{package}{line}") + with open(args.path, "w") as recipe: yaml.dump(text, recipe) with open(args.extra_path, "w") as recipe: yaml.dump(text_extra, recipe) + # with open(args.spack, "w") as config: + # yaml.dump(text, config) diff --git a/scripts/run_usability_tests.sh b/scripts/run_usability_tests.sh index eddac71f..f9cc11d3 100755 --- a/scripts/run_usability_tests.sh +++ b/scripts/run_usability_tests.sh @@ -162,6 +162,27 @@ EOF run_test "Sherpa test" "Sherpa -f sherpa.txt || ./makelibs" +cat > madgraph.txt < mu- mu+ +output Output +launch +shower=Pythia8 +set iseed 4714 +set EBEAM 175.0 +set MZ 91.1876 +set WZ 2.4952 +set nevents 100 +set pdlabel isronlyll +set lpp1 3 +set lpp2 -3 +set pt_min_pdg 13: 20 +set pt_max_pdg 13: 175 +EOF + +run_test "MadGraph test" "mg5_aMC madgraph.txt" + + # Report results echo "Tests completed:"