key4hep / key4hep-spack

A Spack recipe repository of Key4hep software.
10 stars 23 forks source link

Build whizard with `+latex` #565

Closed Zehvogel closed 4 months ago

Zehvogel commented 7 months ago

WHIZARD has a functionality to directly produce plots used e.g. in the examples that depends on it being built with latex enabled.

Can we add this?

jmcarcell commented 7 months ago

Ugh it's 7.5 GB and I don't see an easy way of trimming this down :skull_and_crossbones:

It's going to be there in next round of nightlies (can you give it a try in the next days?), but whether we add this forever and for the releases should be discussed since it becomes the biggest package in the stack.

andresailer commented 7 months ago

Pick up latex from /cvmfs/sft.cern.ch/lcg/external/texlive/?

jmcarcell commented 7 months ago

I'm not sure it is trivial:

andresailer commented 7 months ago
* What happens with the dependencies? We would also pick them up from `sft.cern.ch` I imagine since those are the ones it was built with. But then can that conflict with the ones provided by the stack (some of them are needed by something else). Do we need to install all the dependencies then? Probably not.
* Does it work for Alma 9 and Ubuntu? I see some .so files in the spack installation.
  I guess the answer here is to try it and see

It probably works for alma 9, which is good enough if we don't have this on ubuntu

Zehvogel commented 7 months ago

Thx, I can try it next week :)

I agree with André that we should try to just pick up the lcg texlive. It works fine under alma9 I use it all the time. :)

Zehvogel commented 7 months ago

Is it supposed to be there now? As far as I can see we still build whizard~latex and the behaviour has not changed.

jmcarcell commented 5 months ago

whizard has been built in the new nightlies (2024-05-14) with +latex and +openloops as requested

Zehvogel commented 5 months ago

Thx! The latex part almost works :) Somehow whizard does not pick up ps2pdf even though it is in the stack... So in the end it only produces the output in .ps format and I need to do the conversion myself. :(

jmcarcell commented 5 months ago

Tell me how to reproduce and then I can have a look

Zehvogel commented 5 months ago

put this into repro.sin

?vis_diags = true
process munuqq = e1, E1 => (e2,N2, u, D) 
compile

and run whizard repro.sin

should produce a munuqq_i1_diags.pdf but it doesn't and default_lib.makefile has PS2PDF = no

Zehvogel commented 4 months ago

also the OpenMP support is not enabled:

[lreichen@pcphsft121 simple_whizard]$ whizard --show-config
WHIZARD 3.1.4
Build configuration:
  precision        15        (significant decimals of real/complex numbers)
Optional features available in this build:
  OpenMP           no        (OpenMP parallel execution)
  GoSam            no        (external NLO matrix element provider)
  OpenLoops        yes       (external NLO matrix element provider)
  Recola           no        (external NLO matrix element provider)
  LHAPDF           no        (PDF library)
  HOPPET           no        (PDF evolution package)
  fastjet          no        (jet-clustering package)
  Pythia6          yes       (direct access for shower/hadronization)
  Pythia8          yes       (direct access for shower/hadronization)
  StdHEP           yes       (event I/O format)
  HepMC            yes       (event I/O format)
  LCIO             yes       (event I/O format)
  MetaPost         yes       (graphical event analysis via LaTeX/MetaPost)

the cmake flag in the spack file is long deprecated I think, the correct one would be --enable-fc-openmp :angel:

jmcarcell commented 4 months ago

Both issues should be fixed now thanks to https://github.com/spack/spack/pull/44414 I see the PDF file being created and ps2pdf being run and OpenMP enabled. Apparently the number of cores that was used in the build machine is cached somewhere ( :shrug: ) so I don't know if that will have an effect.