Skip to content

HEP generator update: evtgen, tauola, photos, pythia8, lhapdf, whizard#16880

Merged
adamjstewart merged 10 commits intospack:developfrom
vvolkl:develop
Jun 22, 2020
Merged

HEP generator update: evtgen, tauola, photos, pythia8, lhapdf, whizard#16880
adamjstewart merged 10 commits intospack:developfrom
vvolkl:develop

Conversation

@vvolkl
Copy link
Copy Markdown
Contributor

@vvolkl vvolkl commented May 30, 2020

Adding another HEP generator recipe. It works, but there are some remaining questions, for which any suggestions are welcome:

  • I could not get the download from the actual hepforge.org site https://evtgen.hepforge.org/downloads?f=EvtGen-01.07.00.tar.gz to work (checksum and install). I'm happy to maintain the github mirror I set up instead though.
  • There are some optional dependencies on generators that are not in spack yet. Should I comment out those variants for now?
  • I needed the g2c.patch with gcc 9.3.0. but some cursory research suggests that older versions of gfortran may need those flags.

@adamjstewart
Copy link
Copy Markdown
Member

  1. If you were trying to use spack create https://evtgen.hepforge.org/downloads?f=EvtGen-01.07.00.tar.gz (or spack checksum, or wget, etc.) you may need to add quotation marks around the URL for Bash to not try to interpolate it. Wget worked for me when I tried this.
  2. Spack has unit tests that ensure that all dependencies are actually existing packages. This is needed for the new concretizer. So either comment them out or add packages.

@adamjstewart
Copy link
Copy Markdown
Member

Flake8:

var/spack/repos/builtin/packages/evtgen/package.py:10: [E501] line too long (131 > 79 characters)
var/spack/repos/builtin/packages/evtgen/package.py:44: [W291] trailing whitespace
var/spack/repos/builtin/packages/evtgen/package.py:48: [W391] blank line at end of file

@vvolkl
Copy link
Copy Markdown
Contributor Author

vvolkl commented May 31, 2020

@adamjstewart Thanks for the comments!

  1. Yes, the download itself works for me too, but I still have the issues: after setting
url = "https://evtgen.hepforge.org/downloads?f=EvtGen-01.07.00.tar.gz"

in the recipe, I get:

~$ spack checksum evtgen
==> Error: Couldn't detect version in: https://evtgen.hepforge.org/downloads?f=EvtGen-01.07.00.tar.gz

In addition, spack install --no-checksum evtgen fails, I think because the source tarball has the directory structure:
/EvtGen/R01-07-00/
and I'm not sure how to customize spack stage to account for the extra subir.
2. ok, added recipes for the dependencies (and updated pythia)!

plus a new one:
4. Many generators can be built with extensions for both HepMC2 and HepMC3 -- HepMC3 is actually more like a separate package than just a new version, and it can coexist with HepMC2 installs (you can do both find_package(HepMC) and find_package(HepMC3) at the same project). So I think I should actually also split the recipe for hepmc into hepmc and hepmc3?

@vvolkl vvolkl changed the title Add EVTGEN package HEP generator update: evtgen, tauola, photos, pythia8 May 31, 2020
@adamjstewart
Copy link
Copy Markdown
Member

  1. Let me take a look, I know how to fix the "couldn't detect version" problem.
  2. I would be fine with splitting them.

@vvolkl
Copy link
Copy Markdown
Contributor Author

vvolkl commented Jun 1, 2020

@adamjstewart thanks for fixing the url parsing so quickly. I did the hepmc split in #16892

vvolkl added 5 commits June 15, 2020 13:36
fix formatting

add evtgen dependencies and update pythia8

fix formatting
Co-authored-by: iarspider
@vvolkl vvolkl changed the title HEP generator update: evtgen, tauola, photos, pythia8 HEP generator update: evtgen, tauola, photos, pythia8, lhapdf, whizard Jun 15, 2020
@vvolkl
Copy link
Copy Markdown
Contributor Author

vvolkl commented Jun 15, 2020

@adamjstewart added two more packages that have dependencies here.

One more question: there is a possible circular dependency with pythia+evtgen and evtgen+pythia. (Usually what is installed is evtgen+pythia^pythia~evtgen). Should I mark it as a conflict?

fix formatting
Copy link
Copy Markdown
Member

@adamjstewart adamjstewart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, a conflict with a msg='...' would be good to explain what the problem is in case anyone encounters a problem. Circular dependencies currently cause the concretizer to crash without any useful error message, so conflicts are really helpful for this use case.

@vvolkl
Copy link
Copy Markdown
Contributor Author

vvolkl commented Jun 17, 2020

@adamjstewart sounds good. I added the messages, but unfortunately it only seems to work for the case when the defaults for the variants +evtgen or +pythia8 are on. If the default is ~pythia8, then apparently spack will recurse, and fail with the error

~/repo/spack (develop *)$ spack spec -I evtgen+pythia8^pythia8+evtgen
Input spec
--------------------------------
 -   evtgen+pythia8
 -       ^pythia8+evtgen

Concretized
--------------------------------
==> Error: +pythia8 does not satisfy ~pythia8

before reaching the conflict statement, apparently. I guess this has to do with the variant forwarding that should be adressed by the new concretizer? Can you think of a better way of handling this? Otherwise I would tend to just merge the recipes as they are, even if the error message is not very informative in this case.

@adamjstewart
Copy link
Copy Markdown
Member

I’m not sure what to do about that problem, I was hoping the conflict would be hit before the recursion but I forgot that conflicts are actually evaluated after. Maybe a conflict isn’t useful then.

@vvolkl
Copy link
Copy Markdown
Contributor Author

vvolkl commented Jun 17, 2020

Yes, my preference is to merge it like this and leave the conflict messages, even if just as documentation in the code of the recipe.

@vvolkl
Copy link
Copy Markdown
Contributor Author

vvolkl commented Jun 22, 2020

Hi @adamjstewart, I still changed one of the defaults to be more sensible, but I think now this is ready to be merged.

@adamjstewart adamjstewart merged commit 735416d into spack:develop Jun 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants