Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: fix standalone output for vector.inc production and usage #65

Open
wants to merge 2 commits into
base: gpucpp
Choose a base branch
from

Conversation

roiser
Copy link

@roiser roiser commented Aug 22, 2023

This fix applies to the "gpucpp" branch of the repo. When running e.g.

generate e+ e- > mu+ mu-
output standalone test --vector_size=32

there this will produce the error

The compilation fails with the following output message:
	    cd MODEL; make
	    make[1]: Entering directory '/afs/cern.ch/work/r/roiser/sw/madgraph4gpu/MG5aMC/mg5amcnlo/guttu2.sa/Source/MODEL'
	    /opt/rh/gcc-toolset-11/root/usr/bin/gfortran -w -fPIC  -ffixed-line-length-132  -c -o couplings.o couplings.f
	    couplings.f:16: Error: Can't open included file '../vector.inc'
	    make[1]: *** [<builtin>: couplings.o] Error 1
	    make[1]: Leaving directory '/afs/cern.ch/work/r/roiser/sw/madgraph4gpu/MG5aMC/mg5amcnlo/guttu2.sa/Source/MODEL'
	    make: *** [makefile:59: ../lib/libmodel.a] Error 2

the reason being that the vector.inc file containing the vector size for the parallel execution is not being produced. This PR changes the relevant madgraph/iolibs/export_v4.py in three places

  • it calls self.write_vector_size also for the SA output
  • it moves the write_vector_size from the ProcessExporterFortranME class to its base ProcessExporterFortran so that it can be used also in ProcessExporterFortranSA
  • it adds one missing include of vector.inc in couplings.f which maybe was overlooked

@roiser roiser changed the title fix standalone output for vector.inc production and usage WIP: fix standalone output for vector.inc production and usage Aug 22, 2023
@oliviermattelaer
Copy link
Contributor

Thanks a lot Stefan,

Sorry to be nitpicking on this.
But I do not think that you need to move the function "write_vector_size"
Can you revert it to his original place (this is just to avoid spurious conflict).

If you did try and this was not working then no problem.
Consider this has an approval of merging and after this check (and revert if possible) you can merge yourself (if you can, otherwise will do it).

Thanks,

Olivier

…nters where the includes are missing, the change is hardcoding this in the template files which is probably not good
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants