madgraph5 / madgraph4gpu

GPU development for the Madgraph5_aMC@NLO event generator software package
30 stars 33 forks source link

WIP: refactor makefiles (additions to Stephan's and Joorgen's PRs) #797

Closed valassi closed 3 months ago

valassi commented 9 months ago

This is a WIP PR about refactoring makefiles.

It contains a few additions to Stephan's PR #753 (itself including Joorgen's PR #775 IIUC).

I find it easier to have it as a separate PR so that I can trigger the CI.

Specifically, the first issue I wanted to fix is that https://github.com/madgraph5/madgraph4gpu/pull/753/commits/96f9ba777db50a18ba2c4049b4398e8abd591213 fails the CI in PR #753.

Later todo:

valassi commented 9 months ago

The make_opts patch seems to have worked.

But I am nw trying to install clang-format 16 (for runTest.cc)... if it works, I need to cache that

valassi commented 9 months ago

Ok now clang-format-16 is fixed

Next issues

valassi commented 9 months ago

Next issue, make -j fails

ccache gfortran -I. -fPIC -w -ffixed-line-length-132 -O3 -ffast-math -fbounds-check -c readgrid.f -o readgrid.o
dsample.f:1090:10:

 1090 |       use DiscreteSampler
      |          1
Fatal Error: Cannot open module file ‘discretesampler.mod’ for reading at (1): No such file or directory
valassi commented 8 months ago

I have temporarely forced push again the code I had 2 days ago https://github.com/madgraph5/madgraph4gpu/commit/fbcf4a4d8014f74f74c8fdc680195c97af9f4717

But now I will incorporate Stephan's latest changes (force pushed) to PR #753

Note: at this stage, the new CI fails because 'make avxall' does not exist

valassi commented 8 months ago

@hageboeck I have now moved to your latest https://github.com/madgraph5/madgraph4gpu/pull/797/commits/629d5aaacb0f1a3d853513879abd84ba53f5fa00 and am adding my previous patches on top one by one.

I will go on until this CI is fixed, at least.

As previously observed, at this stage codegen succeeds on itscrd80 and itscrd90 but not in the CI. I will again add my sorting magic to make everything reproducible and allow all codegen to succeed.

Stephan then I will ask you to cherry pick or merge these changes (and stop force pushing please at that point)

valassi commented 8 months ago

The CI codegen was indeed failing, I have now again addded the commits necessary to fix that.

Now codegen succeeds in the CI (for mad) but the build fails because 'make avxall' does not exist. I will also change that.

First however I will also make other minor changes to disable ccache for fortran.

valassi commented 3 months ago

I am closing this one after merging #798 and #841. May reopen if needed depending on #753.