From 95c9a2d0e880ebb6d2be5b1bdde3d336e603696e Mon Sep 17 00:00:00 2001 From: Nathaniel Rowe Date: Wed, 7 Aug 2024 20:40:02 +0000 Subject: [PATCH 01/12] Add new genie version --- packages/genie/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/genie/package.py b/packages/genie/package.py index f07cb3d9..db8a95e1 100644 --- a/packages/genie/package.py +++ b/packages/genie/package.py @@ -25,6 +25,7 @@ def url_for_version(self, version): version.underscored ) + version("3.04.02", sha256="c5935aea86d2ba9897ab55bb581622c561575957d19e572691d3bc0833ed9512") version("3.04.00", sha256="72cf8a119cc59d03763b11afad1a82c0974a06677bf1c154b7c2a90d9f1529c1") version("3.00.06", sha256="ab56ea85d0c1d09029254365bfe75a1427effa717389753b9e0c1b6c2eaa5eaf") version("3.00.04", sha256="53f034618fef9f7f0e17d1c4ed72743e4bba590e824b795177a1a8a8486c861e") From 69bd45b70f3997a618c174316b8d6c0df66e4a8c Mon Sep 17 00:00:00 2001 From: Nathaniel Rowe Date: Thu, 8 Aug 2024 21:22:25 +0000 Subject: [PATCH 02/12] Add genie-xsec, fix genie install, sbndcode paths --- packages/genie-xsec/package.py | 148 +++++++++++++++++++++++++++++---- packages/genie/package.py | 15 +++- packages/lhapdf/package.py | 2 + packages/sbndcode/package.py | 2 + 4 files changed, 145 insertions(+), 22 deletions(-) diff --git a/packages/genie-xsec/package.py b/packages/genie-xsec/package.py index fa457642..50def4aa 100644 --- a/packages/genie-xsec/package.py +++ b/packages/genie-xsec/package.py @@ -11,12 +11,100 @@ class GenieXsec(Package): """Data files used by genie.""" - homepage = "https://www.example.com" - url = "file://" + os.path.dirname(__file__) + "/../../config/junk.xml" - version( - "2.12.10", "2cae8b754a9f824ddd27964d11732941fd88f52f0880d7f685017caba7fea6b7", expand=False + version("3.04.00", sha256="fb4dc9badd1771c92fabbf818b33544006e8b60c7fb0f33d5288a66d93bd19ea", + url="https://scisoft.fnal.gov/scisoft/packages/genie_xsec/v3_04_00/genie_xsec-3.04.00-noarch-G1810a0211a-k250-e1000.tar.bz2") + + version("2.12.10", "2cae8b754a9f824ddd27964d11732941fd88f52f0880d7f685017caba7fea6b7", + expand=False, url="file://" + os.path.dirname(__file__) + "/../../config/junk.xml") + + # tune_name values are designed to line up with the ups setup command + # when setting the environment variable, we change to match typical + # genie tune format + variant( + "tune_name", + default="AR2320i00000-k250-e1000", + multi=False, + values=( + "AR2320i00000-k250-e1000", + "G1801a00000-k250-e1000", + "G1802a00000-k250-e1000", + "G1810a0211a-k250-e1000", + "G1810a0211b-k250-e1000", + "G2111a00000-k250-e1000", + "GDNu2001a00000-k120-e200", + "N1810j0211a-k250-e1000" + ), + when="@3.0:", + description="Name of genie xsec tune set to install.", ) + urlbase_2 = ("https://scisoft.fnal.gov/scisoft/packages/genie_xsec/v3_04_00/genie_xsec-3.04.00-noarch-") + urlbase_3 = ("https://scisoft.fnal.gov/scisoft/packages/genie_xsec/v3_04_00/genie_xsec-3.04.00-noarch-") + + resource( + name="AR2320i00000-k250-e1000", + placement="AR2320i00000-k250-e1000", + when="tune_name=AR2320i00000-k250-e1000", + url=urlbase_3 + "AR2320i00000-k250-e1000.tar.bz2", + sha256="13cc9d740c170af9033623049162eeff0fb0b68156122d380aa3262e92e9f61f", + ) + + resource( + name="G1801a00000-k250-e1000", + placement="G1801a00000-k250-e1000", + when="tune_name=G1801a00000-k250-e1000", + url=urlbase_3 + "G1801a00000-k250-e1000.tar.bz2", + sha256="f222ff56360c9c221e8f793a9c09ddbe6578dbbaa9031b3b3a49cb5ec186595d", + ) + + resource( + name="G1802a00000-k250-e1000", + placement="G1802a00000-k250-e1000", + when="tune_name=G1802a00000-k250-e1000", + url=urlbase_3 + "G1802a00000-k250-e1000.tar.bz2", + sha256="d7189bd6c3933b3017c83fafddb84d57b48414632b577835e49babec8537ab6e", + ) + + resource( + name="G1810a0211a-k250-e1000", + placement="G1810a0211a-k250-e1000", + when="tune_name=G1810a0211a-k250-e1000", + url=urlbase_3 + "G1810a0211a-k250-e1000.tar.bz2", + sha256="fb4dc9badd1771c92fabbf818b33544006e8b60c7fb0f33d5288a66d93bd19ea", + ) + + resource( + name="G1810a0211b-k250-e1000", + placement="G1810a0211b-k250-e1000", + when="tune_name=G1810a0211b-k250-e1000", + url=urlbase_3 + "G1810a0211b-k250-e1000.tar.bz2", + sha256="a1031e49ac8ac426074f247d91b2c886edaf7c4fef13993fe69aad92ad698c34", + ) + + resource( + name="G2111a00000-k250-e1000", + placement="G2111a00000-k250-e1000", + when="tune_name=G2111a00000-k250-e1000", + url=urlbase_3 + "G2111a00000-k250-e1000.tar.bz2", + sha256="ae159887772a54891fc4bddb189ab108d74c4a48db68c13ed7166524e8797590", + ) + + resource( + name="GDNu2001a00000-k120-e200", + placement="GDNu2001a00000-k120-e200", + when="tune_name=GDNu2001a00000-k120-e200", + url=urlbase_3 + "GDNu2001a00000-k120-e200.tar.bz2", + sha256="69146aacc6c55bdc5c519e917e48ea005d160824bf960d17734e9c7c6d85b6cb", + ) + + resource( + name="N1810j0211a-k250-e1000", + placement="N1810j0211a-k250-e1000", + when="tune_name=N1810j0211a-k250-e1000", + url=urlbase_3 + "N1810j0211a-k250-e1000.tar.bz2", + sha256="79e7ecd8d0dc577efb525831b90eb2f650c0cdd7fe5cd17e3ea610a686248e33", + ) + variant( "xsec_name", default="DefaultPlusMECWithNC", @@ -29,58 +117,82 @@ class GenieXsec(Package): "LocalFGNievesQEAndMEC", "ValenciaQEBergerSehgalCOHRES", ), + when="@:3.0", description="Name of genie xsec set to install.", ) - urlbase = ( - "https://scisoft.fnal.gov/scisoft/packages/genie_xsec/v2_12_10/genie_xsec-2.12.10-noarch-" - ) resource( name="AltPion", placement="AltPion", when="xsec_name=AltPion", - url=urlbase + "AltPion.tar.bz2", + url=urlbase_2 + "AltPion.tar.bz2", sha256="49c4c5332c96edc4147e8cacd5b68e8dd89737e205741a21bc75a5ba18b967c4", ) resource( name="DefaultPlusMECWithNC", placement="DefaultPlusMECWithNC", when="xsec_name=DefaultPlusMECWithNC", - url=urlbase + "DefaultPlusMECWithNC.tar.bz2", + url=urlbase_2 + "DefaultPlusMECWithNC.tar.bz2", sha256="7c57caa96c319ad8007253e2a81c6ffcc4dcc6d0923dabbf7b8938d8363ac621", ) resource( name="DefaultPlusValenciaMEC", placement="DefaultPlusValenciaMEC", when="xsec_name=DefaultPlusValenciaMEC", - url=urlbase + "DefaultPlusValenciaMEC.tar.bz2", + url=urlbase_2 + "DefaultPlusValenciaMEC.tar.bz2", sha256="fe1b584e7014bba6c4cba5646e1031f344e9efbf799a2aa26b706e28c40a4481", ) resource( name="EffSFTEM", placement="EffSFTEM", when="xsec_name=EffSFTEM", - url=urlbase + "EffSFTEM.tar.bz2", + url=urlbase_2 + "EffSFTEM.tar.bz2", sha256="b6365f1a150b90b79788f51b084a1dce7432d8ba10b7faa03ade3f6d558c82f6", ) resource( name="LocalFGNievesQEAndMEC", placement="LocalFGNievesQEAndMEC", when="xsec_name=LocalFGNievesQEAndMEC", - url=urlbase + "LocalFGNievesQEAndMEC.tar.bz2", + url=urlbase_2 + "LocalFGNievesQEAndMEC.tar.bz2", sha256="5f02d7efa46ef42052834d80b6923b41e502994daaf6037dad9793799ad4b346", ) resource( name="ValenciaQEBergerSehgalCOHRES", placement="ValenciaQEBergerSehgalCOHRES", when="xsec_name=ValenciaQEBergerSehgalCOHRES", - url=urlbase + "ValenciaQEBergerSehgalCOHRES.tar.bz2", + url=urlbase_2 + "ValenciaQEBergerSehgalCOHRES.tar.bz2", sha256="3e7c117777cb0da6232df1e1fe481fdb2afbfe55639b0d7b4ddf8027954ed1fa", ) def install(self, spec, prefix): - val = spec.variants["xsec_name"].value - install_tree( - "{0}/{2}/v{1}/NULL/{2}".format(self.stage.source_path, self.version.underscored, val), - "{0}/{1}".format(prefix, val), - ) + if(self.version >= Version("3.0")): + val = spec.variants["tune_name"].value + comb_str = val.split(':')[0].split('-')[0] + tune_str = comb_str[:3]+"_"+comb_str[3:6]+"_"+comb_str[6:8]+"_"+comb_str[8:] + + install_tree( + "{0}/{2}/v{1}/NULL/{2}".format(self.stage.source_path, self.version.underscored, val), + "{0}/v{1}/NULL/{2}".format(prefix, self.version.underscored, val), + ) + elif(self.version < Version("3.0")): + val = spec.variants["xsec_name"].value + install_tree( + "{0}/{2}/v{1}/NULL/{2}".format(self.stage.source_path, self.version.underscored, val), + "{0}/{1}".format(prefix, val), + ) + + def setup_run_environment(self, run_env): + if(self.version >= Version("3.0")): + val = self.spec['genie-xsec'].variants['tune_name'].value + data_str = "{0}/v{1}/NULL/{2}/data".format(self.spec['genie-xsec'].prefix, self.version.underscored, val) + raw_str = self.spec['genie-xsec'].variants['tune_name'].value + comb_str = raw_str.split(':')[0].split('-')[0] + tune_str = comb_str[:-8]+"_"+comb_str[-8:-5]+"_"+comb_str[-5:-3]+"_"+comb_str[-3:] + + run_env.set("GENIEXSECPATH", data_str) + run_env.set("GENIEXSECFILE", data_str+"/gxspl-NUsmall.xml") + run_env.set("GXMLPATH", data_str) + run_env.set("GENIE_XSEC_TUNE", tune_str) + run_env.set("GENIE_XSEC_GENLIST", "Default") + run_env.set("GENIE_XSEC_KNOTS", "250") + run_env.set("GENIE_XSEC_EMAX", "1000.0") diff --git a/packages/genie/package.py b/packages/genie/package.py index db8a95e1..0e33efa9 100644 --- a/packages/genie/package.py +++ b/packages/genie/package.py @@ -70,7 +70,7 @@ def url_for_version(self, version): depends_on("lhapdf" , when="+lhapdf") - depends_on("root+pythia6") + depends_on("root@6.28:+pythia6") depends_on("pythia6+root") depends_on("libxml2") depends_on("log4cpp") @@ -82,10 +82,11 @@ def url_for_version(self, version): patch("patch/sles-cnl.patch", when="platform=cray") patch("patch/root_subdir.patch") - patch("patch/GENIE-Generator.patch", when="@3.04.00") - patch("patch/GENIE-Reweight.patch", when="@3.04.00", level=0) + patch("patch/GENIE-Generator.patch", when="@3.04.02") + patch("patch/GENIE-Reweight.patch", when="@3.04.02", level=0) - @when("os=almalinux9") + print(os) + # @when("os=almalinux9") def patch(self): filter_file(r'-lnsl','','src/make/Make.include') @@ -175,6 +176,8 @@ def install(self, spec, prefix): mkdirp(prefix.lib64) mkdirp(prefix.include) mkdirp(prefix.src) + mkdirp(prefix.config) # necessary for tune functionality + mkdirp(prefix.data) # necessary for PDG library lookup with working_dir(self.build_directory): make("install") @@ -189,8 +192,12 @@ def install_required_src(self): os.path.join(self.prefix, "src", "scripts"), ) src_make_dir = os.path.join(self.prefix, "src", "make", "") + config_dir = os.path.join(self.prefix, "config", "") + data_dir = os.path.join(self.prefix, "data", "") # filesystem.mkdirp(src_make_dir) filesystem.install_tree(os.path.join(self.stage.source_path, "src", "make"), src_make_dir) + filesystem.install_tree(os.path.join(self.stage.source_path, "config"), config_dir) + filesystem.install_tree(os.path.join(self.stage.source_path, "data"), data_dir) def setup_build_environment(self, spack_env): spack_env.set("ROOT_INCLUDE_PATH", os.path.join(self.stage.source_path, "src")) diff --git a/packages/lhapdf/package.py b/packages/lhapdf/package.py index 674d1094..874189b5 100644 --- a/packages/lhapdf/package.py +++ b/packages/lhapdf/package.py @@ -51,6 +51,8 @@ def patch(self): ) depends_on("pdfsets") + depends_on("python") + # depends_on("gettext") def configure_args(self): return ("--enable-low-memory", "--disable-pyext", "--disable-octave") diff --git a/packages/sbndcode/package.py b/packages/sbndcode/package.py index d87cd99b..92d8420f 100644 --- a/packages/sbndcode/package.py +++ b/packages/sbndcode/package.py @@ -91,6 +91,7 @@ class Sbndcode(CMakePackage): depends_on("marley", type=("build", "run")) depends_on("nug4", type=("build", "run")) depends_on("genie", type=("build", "run")) + depends_on("genie-xsec", type=("build", "run")) depends_on("ifdhc", type=("build", "run")) depends_on("libxml2", type=("build", "run")) # depends_on('nurandom', type=('build','run')) ??? @@ -151,6 +152,7 @@ def setup_run_environment(self, run_env): run_env.prepend_path("ROOT_INCLUDE_PATH", self.prefix.include) # Perl modules. run_env.prepend_path("PERL5LIB", os.path.join(self.prefix, "perllib")) + run_env.prepend_path("GENIE_INC", str(self.spec["genie"].prefix.include)) # Cleaup. sanitize_environments(run_env) From cfcd5c9b5cd13cc3f2196f08ae27368a880070bc Mon Sep 17 00:00:00 2001 From: nathanielerowe <70993723+nathanielerowe@users.noreply.github.com> Date: Fri, 9 Aug 2024 09:07:10 -0500 Subject: [PATCH 03/12] Create README.md --- README.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 00000000..f6123ff8 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +fnal_art primarily used for building sbndcode on polaris From b7ca1d1862df8ce55716dcdcb6d171b09eaeaea3 Mon Sep 17 00:00:00 2001 From: Nathaniel Rowe Date: Fri, 9 Aug 2024 15:32:12 +0000 Subject: [PATCH 04/12] cxxstd fix --- packages/genie/package.py | 12 ++++++++---- packages/lhapdf/package.py | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/packages/genie/package.py b/packages/genie/package.py index 0e33efa9..fe8367bb 100644 --- a/packages/genie/package.py +++ b/packages/genie/package.py @@ -25,7 +25,7 @@ def url_for_version(self, version): version.underscored ) - version("3.04.02", sha256="c5935aea86d2ba9897ab55bb581622c561575957d19e572691d3bc0833ed9512") + version("3.04.02", sha256="c5935aea86d2ba9897ab55bb581622c561575957d19e572691d3bc0833ed9512", preferred=True) version("3.04.00", sha256="72cf8a119cc59d03763b11afad1a82c0974a06677bf1c154b7c2a90d9f1529c1") version("3.00.06", sha256="ab56ea85d0c1d09029254365bfe75a1427effa717389753b9e0c1b6c2eaa5eaf") version("3.00.04", sha256="53f034618fef9f7f0e17d1c4ed72743e4bba590e824b795177a1a8a8486c861e") @@ -70,7 +70,12 @@ def url_for_version(self, version): depends_on("lhapdf" , when="+lhapdf") - depends_on("root@6.28:+pythia6") + # Issues caused by default root cxxstd being 11 + depends_on("root @6.24.08: +pythia6 cxxstd=11", when="cxxstd=11") + depends_on("root @6.24.08: +pythia6 cxxstd=14", when="cxxstd=14") + depends_on("root @6.24.08: +pythia6 cxxstd=17", when="cxxstd=17") + depends_on("root @6.24.08: +pythia6 cxxstd=17", when="cxxstd=default") + depends_on("root @6.24.08: +pythia6 cxxstd=20", when="cxxstd=20") depends_on("pythia6+root") depends_on("libxml2") depends_on("log4cpp") @@ -85,8 +90,7 @@ def url_for_version(self, version): patch("patch/GENIE-Generator.patch", when="@3.04.02") patch("patch/GENIE-Reweight.patch", when="@3.04.02", level=0) - print(os) - # @when("os=almalinux9") + # @when("os=almalinux9") patch should be applied on polaris too def patch(self): filter_file(r'-lnsl','','src/make/Make.include') diff --git a/packages/lhapdf/package.py b/packages/lhapdf/package.py index 874189b5..a2c41397 100644 --- a/packages/lhapdf/package.py +++ b/packages/lhapdf/package.py @@ -52,7 +52,7 @@ def patch(self): depends_on("pdfsets") depends_on("python") - # depends_on("gettext") + depends_on("gettext") def configure_args(self): return ("--enable-low-memory", "--disable-pyext", "--disable-octave") From 5b21e3599c84923469bc8962a4738f264aa00a31 Mon Sep 17 00:00:00 2001 From: Nathaniel Rowe Date: Fri, 9 Aug 2024 20:33:46 +0000 Subject: [PATCH 05/12] libxpm temp fix --- packages/genie/package.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/genie/package.py b/packages/genie/package.py index fe8367bb..3033cff3 100644 --- a/packages/genie/package.py +++ b/packages/genie/package.py @@ -71,11 +71,12 @@ def url_for_version(self, version): depends_on("lhapdf" , when="+lhapdf") # Issues caused by default root cxxstd being 11 - depends_on("root @6.24.08: +pythia6 cxxstd=11", when="cxxstd=11") - depends_on("root @6.24.08: +pythia6 cxxstd=14", when="cxxstd=14") - depends_on("root @6.24.08: +pythia6 cxxstd=17", when="cxxstd=17") - depends_on("root @6.24.08: +pythia6 cxxstd=17", when="cxxstd=default") - depends_on("root @6.24.08: +pythia6 cxxstd=20", when="cxxstd=20") + # Separate issue caused by libxmp from +x requirement + depends_on("root @6.24.08: +pythia6 ~x cxxstd=11", when="cxxstd=11") + depends_on("root @6.24.08: +pythia6 ~x cxxstd=14", when="cxxstd=14") + depends_on("root @6.24.08: +pythia6 ~x cxxstd=17", when="cxxstd=17") + depends_on("root @6.24.08: +pythia6 ~x cxxstd=17", when="cxxstd=default") + depends_on("root @6.24.08: +pythia6 ~x cxxstd=20", when="cxxstd=20") depends_on("pythia6+root") depends_on("libxml2") depends_on("log4cpp") From bc47ce32544804cdd8d7012f536afb6b6f4eb374 Mon Sep 17 00:00:00 2001 From: nathanielerowe <70993723+nathanielerowe@users.noreply.github.com> Date: Mon, 12 Aug 2024 11:31:35 -0500 Subject: [PATCH 06/12] Update package.py Typo in urlbase --- packages/genie-xsec/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/genie-xsec/package.py b/packages/genie-xsec/package.py index 50def4aa..159f0f8e 100644 --- a/packages/genie-xsec/package.py +++ b/packages/genie-xsec/package.py @@ -38,7 +38,7 @@ class GenieXsec(Package): description="Name of genie xsec tune set to install.", ) - urlbase_2 = ("https://scisoft.fnal.gov/scisoft/packages/genie_xsec/v3_04_00/genie_xsec-3.04.00-noarch-") + urlbase_2 = ("https://scisoft.fnal.gov/scisoft/packages/genie_xsec/v2_12_10/genie_xsec-2.12.10-noarch-") urlbase_3 = ("https://scisoft.fnal.gov/scisoft/packages/genie_xsec/v3_04_00/genie_xsec-3.04.00-noarch-") resource( From d01a910de2a5a92a846b561091247d2f36671894 Mon Sep 17 00:00:00 2001 From: Nathaniel Rowe Date: Tue, 20 Aug 2024 14:48:46 +0000 Subject: [PATCH 07/12] remove lhapdf, root vers, misc fixes --- packages/artg4tk/override.patch | 14 +++++ packages/artg4tk/package.py | 5 +- packages/castxml/package.py | 19 +++++-- packages/genie/package.py | 17 ++++-- packages/h5cpp/package.py | 62 +++++++++++---------- packages/lhapdf/package.py | 96 --------------------------------- 6 files changed, 74 insertions(+), 139 deletions(-) create mode 100644 packages/artg4tk/override.patch delete mode 100644 packages/lhapdf/package.py diff --git a/packages/artg4tk/override.patch b/packages/artg4tk/override.patch new file mode 100644 index 00000000..aed34d5e --- /dev/null +++ b/packages/artg4tk/override.patch @@ -0,0 +1,14 @@ +diff --git a/artg4tk/lists/MyG4HadronPhysicsQGSP_BERT_ArHP.hh b/artg4tk/lists/MyG4HadronPhysicsQGSP_BERT_ArHP.hh +index bf4ae5d..2333dc2 100644 +--- a/artg4tk/lists/MyG4HadronPhysicsQGSP_BERT_ArHP.hh ++++ b/artg4tk/lists/MyG4HadronPhysicsQGSP_BERT_ArHP.hh +@@ -81,7 +81,7 @@ public: + + protected: + void Neutron() override; +- void ExtraConfiguration() override; ++ void ExtraConfiguration(); + }; + + // 2002 by J.P. Wellisch + diff --git a/packages/artg4tk/package.py b/packages/artg4tk/package.py index a4ea4e73..f955a89c 100644 --- a/packages/artg4tk/package.py +++ b/packages/artg4tk/package.py @@ -13,7 +13,7 @@ class Artg4tk(CMakePackage): git = "https://github.com/art-framework-suite/art-g4tk.git" url = "https://github.com/art-framework-suite/art-g4tk/archive/refs/tags/v11_00_01.tar.gz" - # version('10.04.00', sha256='44a1e12425ff2ebe90f7482ad2b10cbde873477815f81707677eb2ad14d3cef4') + version('10.04.00', sha256='44a1e12425ff2ebe90f7482ad2b10cbde873477815f81707677eb2ad14d3cef4') version("10.04.00", tag="v10_04_00", get_full_repo=True) version("c06a0ed7a0", commit="c06a0ed7a0a543cba5c23fc588f7dd6dcb6609e2", get_full_repo=True) version("develop", branch="develop", get_full_repo=True) @@ -44,7 +44,8 @@ class Artg4tk(CMakePackage): ) patch("cetmodules2-c06a0ed7a0a543cba5c23fc588f7dd6dcb6609e2.patch", when="@c06a0ed7a0") - # patch('mwm.patch') + patch("override.patch", when="@11.00.01") + depends_on("cetmodules", type="build") depends_on("cetbuildtools", type="build") depends_on("art") diff --git a/packages/castxml/package.py b/packages/castxml/package.py index d6438f03..5489dc4c 100644 --- a/packages/castxml/package.py +++ b/packages/castxml/package.py @@ -29,6 +29,7 @@ class Castxml(CMakePackage): homepage = "https://github.com/CastXML/CastXML" url = "https://github.com/CastXML/CastXML/archive/v0.2.0.tar.gz" + version("0.6.2", sha256="9bb108de1b3348a257be5b08a9f8418f89fdcd4af2e6ee271d68b0203ac75d5e") version("0.5.1", sha256="a7b40b1530585672f9cf5d7a6b6dd29f20c06cd5edf34ef34c89a184a4d1a006") version("0.3.6", sha256="e51a26704864c89036a0a69d9f29c2a522a9fa09c1009e8b8169a26480bb2993") version("0.3.5", sha256="397044081363da0f3e50aff995f71b68aedd194d034caa50869224a4e6784c3b") @@ -40,12 +41,22 @@ class Castxml(CMakePackage): version("0.2.1", sha256="1f01149af1c58e59500e24cade8033e98a16001aa6a0f666643bbc9e303a82b0") version("0.2.0", sha256="626c395d0d3c777b5a1582cdfc4d33d142acfb12204ebe251535209126705ec1") + variant( + "cxxstd", + default="17", + values=("14", "17", "20"), + multi=False, + description="Use the specified C++ standard when building.", + ) + + # FIXME: Add dependencies if required. depends_on('llvm') def cmake_args(self): - # FIXME: Add arguments other than - # FIXME: CMAKE_INSTALL_PREFIX and CMAKE_BUILD_TYPE - # FIXME: If not needed delete this function - args = [] + args = [ + "-DCMAKE_CXX_STANDARD={0}".format(self.spec.variants["cxxstd"].value), + "-DCLANG_RESOURCE_DIR={0}".format(self.spec["llvm"].prefix+"/lib/clang/17") + ] + return args diff --git a/packages/genie/package.py b/packages/genie/package.py index 3033cff3..62530262 100644 --- a/packages/genie/package.py +++ b/packages/genie/package.py @@ -67,16 +67,23 @@ def url_for_version(self, version): ) variant("lhapdf", default=True) + variant("old_root", default=False) depends_on("lhapdf" , when="+lhapdf") # Issues caused by default root cxxstd being 11 # Separate issue caused by libxmp from +x requirement - depends_on("root @6.24.08: +pythia6 ~x cxxstd=11", when="cxxstd=11") - depends_on("root @6.24.08: +pythia6 ~x cxxstd=14", when="cxxstd=14") - depends_on("root @6.24.08: +pythia6 ~x cxxstd=17", when="cxxstd=17") - depends_on("root @6.24.08: +pythia6 ~x cxxstd=17", when="cxxstd=default") - depends_on("root @6.24.08: +pythia6 ~x cxxstd=20", when="cxxstd=20") + depends_on("root @6.30.00: ~x cxxstd=11", when="cxxstd=11 ~old_root") + depends_on("root @6.30.00: ~x cxxstd=14", when="cxxstd=14 ~old_root") + depends_on("root @6.30.00: ~x cxxstd=17", when="cxxstd=17 ~old_root") + depends_on("root @6.30.00: ~x cxxstd=17", when="cxxstd=default ~old_root") + depends_on("root @6.30.00: ~x cxxstd=20", when="cxxstd=20 ~old_root") + + depends_on("root @6.24.08:6.28.12 +pythia6 ~x cxxstd=14", when="cxxstd=14 +old_root") + depends_on("root @6.24.08:6.28.12 +pythia6 ~x cxxstd=17", when="cxxstd=17 +old_root") + depends_on("root @6.24.08:6.28.12 +pythia6 ~x cxxstd=17", when="cxxstd=default +old_root") + depends_on("root @6.24.08:6.28.12 +pythia6 ~x cxxstd=20", when="cxxstd=20 +old_root") + depends_on("pythia6+root") depends_on("libxml2") depends_on("log4cpp") diff --git a/packages/h5cpp/package.py b/packages/h5cpp/package.py index 6ff4ca84..5e299f06 100644 --- a/packages/h5cpp/package.py +++ b/packages/h5cpp/package.py @@ -1,41 +1,39 @@ -# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other +# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -import re +from spack.package import * -from spack import * +class H5cpp(CMakePackage): + """Easy to use HDF5 C++ templates for Serial and Parallel HDF5""" -class H5cpp(Package): - """Hierarchical Data Format C++ templates for Serial and Paralell HDF5""" - - homepage = "https://h5cpp.org/" - #url = "https://github.com/steven-varga/h5cpp/archive/refs/tags/v1.10.4-6.tar.gz" + homepage = "http://h5cpp.org" + url = "https://github.com/steven-varga/h5cpp/archive/v1.10.4-5.tar.gz" git = "https://github.com/steven-varga/h5cpp.git" - version("1.10.4.6", tag="v1.10.4-6") - version("1.10.4.5", tag="v1.10.4-5") - #version("1.10.4.6", sha256="4fbc8e777dc78a37ec2fe8c7b6a47114080ffe587f083e83a2046b5e794aef93") - #version("1.10.4.5", sha256="661ccc4d76e081afc73df71ef11d027837d92dd1089185f3650afcaec9d418ec") - - depends_on("cmake@3.10:", type="build") - depends_on("hdf5") # for examples(?) - depends_on("fmt") - - def url_for_version(self, version): - return "https://github.com/steven-varga/h5cpp/archive/refs/tags/v{0}.tar.gz".format( - re.sub(r"\.([0-9])$", r"-\1", str(version)) - ) - - def install(self, spec, prefix): - cmake( - '-DHDF5_LIBRARIES=%s' % self.spec['hdf5'].prefix.lib, - '-DHDF5_INCLUDE_DIRS=%s' % self.spec['hdf5'].prefix.include, - '-DCMAKE_INSTALL_PREFIX=%s' % prefix, - '-DCMAKE_INSTALL_DATADIR=examples', - '-DCMAKE_INSTALL_LIBDIR=lib', - '.' - ) - make('install') + maintainers("eschnett") + + license("BSD-3-Clause") + + version("master", branch="master") + version("1.10.4-6", sha256="4fbc8e777dc78a37ec2fe8c7b6a47114080ffe587f083e83a2046b5e794aef93") + version("1.10.4-5", sha256="661ccc4d76e081afc73df71ef11d027837d92dd1089185f3650afcaec9d418ec") + + depends_on("c", type="build") # generated + depends_on("cxx", type="build") # generated + + variant("mpi", default=True, description="Include MPI support") + + depends_on("cmake @3.10:", type="build") + depends_on("hdf5 @1.10.4:") + depends_on("hdf5 +mpi", when="+mpi") + depends_on("mpi", when="+mpi") + + def cmake_args(self): + return [ + "-DHDF5_INCLUDE_DIRS=%s" % self.spec["hdf5"].headers.directories[0], + "-DHDF5_LIBRARIES=%s" % self.spec["hdf5"].libs.directories[0], + "-DH5CPP_BUILD_TESTS=OFF", + ] diff --git a/packages/lhapdf/package.py b/packages/lhapdf/package.py deleted file mode 100644 index a2c41397..00000000 --- a/packages/lhapdf/package.py +++ /dev/null @@ -1,96 +0,0 @@ -# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other -# Spack Project Developers. See the top-level COPYRIGHT file for details. -# -# SPDX-License-Identifier: (Apache-2.0 OR MIT) - -import glob -import os - -from spack import * - - -class Lhapdf(AutotoolsPackage): - - homepage = "https://www.hepforge.org/lhapdf" - url = "https://lhapdf.hepforge.org/downloads/?f=lhapdf-5.9.1.tar.gz" - - version("6.5.3", sha256="57435cd695e297065d53e69bd29090765c934936b6a975ff8c559766f2230359") - version("6.3.0", sha256="ed4d8772b7e6be26d1a7682a13c87338d67821847aa1640d78d67d2cef8b9b5d") - version("6.2.3", sha256="d6e63addc56c57b6286dc43ffc56d901516f4779a93a0f1547e14b32cfd82dd1") - - def url_for_version(self, version): - # between 5.x and 6.x they went to upper case names in the URLs - if str(version)[0] < "6": - urlf = "https://lhapdf.hepforge.org/downloads/?f=lhapdf-%s.tar.gz" - else: - urlf = "https://lhapdf.hepforge.org/downloads/?f=LHAPDF-%s.tar.gz" - return urlf % version - - version("5.9.1", sha256="86b9b046d7f25627ce2aab6847ef1c5534972f4bae18de98225080cf5086919c") - - def patch(self): - if os.path.exists("./config/config.sub"): - os.remove("./config/config.sub") - install( - os.path.join(os.path.dirname(__file__), "../../config/config.sub"), - "./config/config.sub", - ) - if os.path.exists("./config/config.guess"): - os.remove("./config/config.guess") - install( - os.path.join(os.path.dirname(__file__), "../../config/config.guess"), - "./config/config.guess", - ) - - variant( - "cxxstd", - default="17", - values=("default", "98", "11", "14", "17", "20"), - multi=False, - description="Use the specified C++ standard when building.", - ) - - depends_on("pdfsets") - depends_on("python") - depends_on("gettext") - - def configure_args(self): - return ("--enable-low-memory", "--disable-pyext", "--disable-octave") - - @run_after("install") - def link_pdfs(self): - mkdirp(os.path.join(self.spec.prefix.share, "lhapdf/PDFsets")) - pdfs = [ - "CT10.LHgrid", - "cteq61.LHgrid", - "cteq61.LHpdf", - "GRV98lo.LHgrid", - "GRV98nlo.LHgrid", - "GRVG0.LHgrid", - "GRVG1.LHgrid", - "GRVPI0.LHgrid", - "GRVPI1.LHgrid", - ] - for pdf in pdfs: - os.symlink( - "{0}/PDFsets/{1}".format(self.spec["pdfsets"].prefix, pdf), - "{0}/lhapdf/PDFsets/{1}".format(self.spec.prefix.share, pdf), - ) - - @run_after("install") - def copy_examples(self): - with working_dir(self.stage.source_path): - install_tree("examples", self.prefix.examples) - with working_dir(self.prefix.examples): - for f in glob.glob("Makefile.*"): - os.remove(f) - for f in glob.glob("*.py"): - os.remove(f) - - def setup_build_environment(self, spack_env): - cxxstd_flag = ( - "" - if self.spec.variants["cxxstd"].value == "default" - else "cxx{0}_flag".format(self.spec.variants["cxxstd"].value) - ) - spack_env.append_flags("CXXFLAGS", getattr(self.compiler, cxxstd_flag)) From f2e8bcc2b18d86f01d7e187a25656c4518961eb3 Mon Sep 17 00:00:00 2001 From: Nathaniel Rowe Date: Tue, 20 Aug 2024 15:04:04 +0000 Subject: [PATCH 08/12] Undo some changes (for now) --- packages/artg4tk/override.patch | 14 -------- packages/artg4tk/package.py | 5 ++- packages/castxml/package.py | 16 +-------- packages/h5cpp/package.py | 62 +++++++++++++++++---------------- 4 files changed, 35 insertions(+), 62 deletions(-) delete mode 100644 packages/artg4tk/override.patch diff --git a/packages/artg4tk/override.patch b/packages/artg4tk/override.patch deleted file mode 100644 index aed34d5e..00000000 --- a/packages/artg4tk/override.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/artg4tk/lists/MyG4HadronPhysicsQGSP_BERT_ArHP.hh b/artg4tk/lists/MyG4HadronPhysicsQGSP_BERT_ArHP.hh -index bf4ae5d..2333dc2 100644 ---- a/artg4tk/lists/MyG4HadronPhysicsQGSP_BERT_ArHP.hh -+++ b/artg4tk/lists/MyG4HadronPhysicsQGSP_BERT_ArHP.hh -@@ -81,7 +81,7 @@ public: - - protected: - void Neutron() override; -- void ExtraConfiguration() override; -+ void ExtraConfiguration(); - }; - - // 2002 by J.P. Wellisch - diff --git a/packages/artg4tk/package.py b/packages/artg4tk/package.py index f955a89c..a4ea4e73 100644 --- a/packages/artg4tk/package.py +++ b/packages/artg4tk/package.py @@ -13,7 +13,7 @@ class Artg4tk(CMakePackage): git = "https://github.com/art-framework-suite/art-g4tk.git" url = "https://github.com/art-framework-suite/art-g4tk/archive/refs/tags/v11_00_01.tar.gz" - version('10.04.00', sha256='44a1e12425ff2ebe90f7482ad2b10cbde873477815f81707677eb2ad14d3cef4') + # version('10.04.00', sha256='44a1e12425ff2ebe90f7482ad2b10cbde873477815f81707677eb2ad14d3cef4') version("10.04.00", tag="v10_04_00", get_full_repo=True) version("c06a0ed7a0", commit="c06a0ed7a0a543cba5c23fc588f7dd6dcb6609e2", get_full_repo=True) version("develop", branch="develop", get_full_repo=True) @@ -44,8 +44,7 @@ class Artg4tk(CMakePackage): ) patch("cetmodules2-c06a0ed7a0a543cba5c23fc588f7dd6dcb6609e2.patch", when="@c06a0ed7a0") - patch("override.patch", when="@11.00.01") - + # patch('mwm.patch') depends_on("cetmodules", type="build") depends_on("cetbuildtools", type="build") depends_on("art") diff --git a/packages/castxml/package.py b/packages/castxml/package.py index 5489dc4c..5d5982ad 100644 --- a/packages/castxml/package.py +++ b/packages/castxml/package.py @@ -29,7 +29,6 @@ class Castxml(CMakePackage): homepage = "https://github.com/CastXML/CastXML" url = "https://github.com/CastXML/CastXML/archive/v0.2.0.tar.gz" - version("0.6.2", sha256="9bb108de1b3348a257be5b08a9f8418f89fdcd4af2e6ee271d68b0203ac75d5e") version("0.5.1", sha256="a7b40b1530585672f9cf5d7a6b6dd29f20c06cd5edf34ef34c89a184a4d1a006") version("0.3.6", sha256="e51a26704864c89036a0a69d9f29c2a522a9fa09c1009e8b8169a26480bb2993") version("0.3.5", sha256="397044081363da0f3e50aff995f71b68aedd194d034caa50869224a4e6784c3b") @@ -41,22 +40,9 @@ class Castxml(CMakePackage): version("0.2.1", sha256="1f01149af1c58e59500e24cade8033e98a16001aa6a0f666643bbc9e303a82b0") version("0.2.0", sha256="626c395d0d3c777b5a1582cdfc4d33d142acfb12204ebe251535209126705ec1") - variant( - "cxxstd", - default="17", - values=("14", "17", "20"), - multi=False, - description="Use the specified C++ standard when building.", - ) - - # FIXME: Add dependencies if required. depends_on('llvm') def cmake_args(self): - args = [ - "-DCMAKE_CXX_STANDARD={0}".format(self.spec.variants["cxxstd"].value), - "-DCLANG_RESOURCE_DIR={0}".format(self.spec["llvm"].prefix+"/lib/clang/17") - ] - + args = [] return args diff --git a/packages/h5cpp/package.py b/packages/h5cpp/package.py index 5e299f06..6ff4ca84 100644 --- a/packages/h5cpp/package.py +++ b/packages/h5cpp/package.py @@ -1,39 +1,41 @@ -# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other +# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -from spack.package import * +import re +from spack import * -class H5cpp(CMakePackage): - """Easy to use HDF5 C++ templates for Serial and Parallel HDF5""" - homepage = "http://h5cpp.org" - url = "https://github.com/steven-varga/h5cpp/archive/v1.10.4-5.tar.gz" - git = "https://github.com/steven-varga/h5cpp.git" - - maintainers("eschnett") - - license("BSD-3-Clause") - - version("master", branch="master") - version("1.10.4-6", sha256="4fbc8e777dc78a37ec2fe8c7b6a47114080ffe587f083e83a2046b5e794aef93") - version("1.10.4-5", sha256="661ccc4d76e081afc73df71ef11d027837d92dd1089185f3650afcaec9d418ec") +class H5cpp(Package): + """Hierarchical Data Format C++ templates for Serial and Paralell HDF5""" - depends_on("c", type="build") # generated - depends_on("cxx", type="build") # generated - - variant("mpi", default=True, description="Include MPI support") - - depends_on("cmake @3.10:", type="build") - depends_on("hdf5 @1.10.4:") - depends_on("hdf5 +mpi", when="+mpi") - depends_on("mpi", when="+mpi") + homepage = "https://h5cpp.org/" + #url = "https://github.com/steven-varga/h5cpp/archive/refs/tags/v1.10.4-6.tar.gz" + git = "https://github.com/steven-varga/h5cpp.git" - def cmake_args(self): - return [ - "-DHDF5_INCLUDE_DIRS=%s" % self.spec["hdf5"].headers.directories[0], - "-DHDF5_LIBRARIES=%s" % self.spec["hdf5"].libs.directories[0], - "-DH5CPP_BUILD_TESTS=OFF", - ] + version("1.10.4.6", tag="v1.10.4-6") + version("1.10.4.5", tag="v1.10.4-5") + #version("1.10.4.6", sha256="4fbc8e777dc78a37ec2fe8c7b6a47114080ffe587f083e83a2046b5e794aef93") + #version("1.10.4.5", sha256="661ccc4d76e081afc73df71ef11d027837d92dd1089185f3650afcaec9d418ec") + + depends_on("cmake@3.10:", type="build") + depends_on("hdf5") # for examples(?) + depends_on("fmt") + + def url_for_version(self, version): + return "https://github.com/steven-varga/h5cpp/archive/refs/tags/v{0}.tar.gz".format( + re.sub(r"\.([0-9])$", r"-\1", str(version)) + ) + + def install(self, spec, prefix): + cmake( + '-DHDF5_LIBRARIES=%s' % self.spec['hdf5'].prefix.lib, + '-DHDF5_INCLUDE_DIRS=%s' % self.spec['hdf5'].prefix.include, + '-DCMAKE_INSTALL_PREFIX=%s' % prefix, + '-DCMAKE_INSTALL_DATADIR=examples', + '-DCMAKE_INSTALL_LIBDIR=lib', + '.' + ) + make('install') From c02ecaa0bbdc59bb5a1f9549576bb114434878fe Mon Sep 17 00:00:00 2001 From: nathanielerowe <70993723+nathanielerowe@users.noreply.github.com> Date: Tue, 20 Aug 2024 10:08:31 -0500 Subject: [PATCH 09/12] Delete README.md --- README.md | 1 - 1 file changed, 1 deletion(-) delete mode 100644 README.md diff --git a/README.md b/README.md deleted file mode 100644 index f6123ff8..00000000 --- a/README.md +++ /dev/null @@ -1 +0,0 @@ -fnal_art primarily used for building sbndcode on polaris From 56725b5a4122ffe296def9392cf309cc5cf63883 Mon Sep 17 00:00:00 2001 From: nathanielerowe <70993723+nathanielerowe@users.noreply.github.com> Date: Tue, 20 Aug 2024 10:10:11 -0500 Subject: [PATCH 10/12] Update package.py Adding back in text block --- packages/castxml/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/castxml/package.py b/packages/castxml/package.py index 5d5982ad..d6438f03 100644 --- a/packages/castxml/package.py +++ b/packages/castxml/package.py @@ -44,5 +44,8 @@ class Castxml(CMakePackage): depends_on('llvm') def cmake_args(self): + # FIXME: Add arguments other than + # FIXME: CMAKE_INSTALL_PREFIX and CMAKE_BUILD_TYPE + # FIXME: If not needed delete this function args = [] return args From 5a86dc4a87ea73ba55a75569ac8e088311072738 Mon Sep 17 00:00:00 2001 From: Nathaniel Rowe Date: Thu, 22 Aug 2024 18:07:56 +0000 Subject: [PATCH 11/12] restrict root version --- packages/genie/package.py | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/packages/genie/package.py b/packages/genie/package.py index 62530262..f4e80a8e 100644 --- a/packages/genie/package.py +++ b/packages/genie/package.py @@ -67,22 +67,16 @@ def url_for_version(self, version): ) variant("lhapdf", default=True) - variant("old_root", default=False) + # Use mainline spack gettext for lhapdf depends_on("lhapdf" , when="+lhapdf") # Issues caused by default root cxxstd being 11 # Separate issue caused by libxmp from +x requirement - depends_on("root @6.30.00: ~x cxxstd=11", when="cxxstd=11 ~old_root") - depends_on("root @6.30.00: ~x cxxstd=14", when="cxxstd=14 ~old_root") - depends_on("root @6.30.00: ~x cxxstd=17", when="cxxstd=17 ~old_root") - depends_on("root @6.30.00: ~x cxxstd=17", when="cxxstd=default ~old_root") - depends_on("root @6.30.00: ~x cxxstd=20", when="cxxstd=20 ~old_root") - - depends_on("root @6.24.08:6.28.12 +pythia6 ~x cxxstd=14", when="cxxstd=14 +old_root") - depends_on("root @6.24.08:6.28.12 +pythia6 ~x cxxstd=17", when="cxxstd=17 +old_root") - depends_on("root @6.24.08:6.28.12 +pythia6 ~x cxxstd=17", when="cxxstd=default +old_root") - depends_on("root @6.24.08:6.28.12 +pythia6 ~x cxxstd=20", when="cxxstd=20 +old_root") + depends_on("root @6.24.08:6.28.12 +pythia6 ~x cxxstd=14", when="cxxstd=14") + depends_on("root @6.24.08:6.28.12 +pythia6 ~x cxxstd=17", when="cxxstd=17") + depends_on("root @6.24.08:6.28.12 +pythia6 ~x cxxstd=17", when="cxxstd=default") + depends_on("root @6.24.08:6.28.12 +pythia6 ~x cxxstd=20", when="cxxstd=20") depends_on("pythia6+root") depends_on("libxml2") From 1241e96832ffa364f41c60fd8ebf1b7d35ea035a Mon Sep 17 00:00:00 2001 From: nathanielerowe <70993723+nathanielerowe@users.noreply.github.com> Date: Fri, 23 Aug 2024 10:19:56 -0500 Subject: [PATCH 12/12] Update package.py Remove ~x variant. libxpm build issue resolved by updating gettext to match mainline spack. --- packages/genie/package.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/genie/package.py b/packages/genie/package.py index f4e80a8e..266556b6 100644 --- a/packages/genie/package.py +++ b/packages/genie/package.py @@ -72,11 +72,10 @@ def url_for_version(self, version): depends_on("lhapdf" , when="+lhapdf") # Issues caused by default root cxxstd being 11 - # Separate issue caused by libxmp from +x requirement - depends_on("root @6.24.08:6.28.12 +pythia6 ~x cxxstd=14", when="cxxstd=14") - depends_on("root @6.24.08:6.28.12 +pythia6 ~x cxxstd=17", when="cxxstd=17") - depends_on("root @6.24.08:6.28.12 +pythia6 ~x cxxstd=17", when="cxxstd=default") - depends_on("root @6.24.08:6.28.12 +pythia6 ~x cxxstd=20", when="cxxstd=20") + depends_on("root @6.24.08:6.28.12 +pythia6 cxxstd=14", when="cxxstd=14") + depends_on("root @6.24.08:6.28.12 +pythia6 cxxstd=17", when="cxxstd=17") + depends_on("root @6.24.08:6.28.12 +pythia6 cxxstd=17", when="cxxstd=default") + depends_on("root @6.24.08:6.28.12 +pythia6 cxxstd=20", when="cxxstd=20") depends_on("pythia6+root") depends_on("libxml2")