-
Notifications
You must be signed in to change notification settings - Fork 33
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
Refactor tests to be independent of epoch and abstraction library used. #109
Conversation
To run their own test, each epoch/abstraction implements a test driver interface, and instantiates a test suite defined in test/src. Refactor testing code, make it independent of CUDA and Epoch1. To run their own test, each epoch/abstraction implements a test driver interface, and instantiates a test suite defined in test/src. In more detail: - Move reference file for process 1 in eemumu to test/. - Split framework-specific parts and generic test code in epoch1. - Create base test class as general interface for madgraph runs. - Move googletest and common testing code into test/. - Instantiate epoch1 cuda test for eemumu.
To port tests from ep1 to ep2, the threshold for comparing matrix elements has to be raised to 1.E-6. This is presumably because of reordered floating-point computations.
ae11fa9
to
33d908c
Compare
3127b61
to
2136265
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As can be seen in two comments I would suggest to take some of the varibles out of the source code and make them available in some config file (c++ macros should be fine). But it's really a minor thing, we can create an issue and merge as such to keep going.
unsigned int nparticle = 4; | ||
static constexpr unsigned int np4 = 4; | ||
static constexpr unsigned int niter = 2; | ||
static constexpr unsigned int gpublocks = 2; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For those variables it could be nice to get them out of the source and into some "config file", maybe also make a distinction between CPU and GPU execution? It's fine for me to create an issue for that and merge as such though.
{ | ||
// Set to dump events: | ||
constexpr bool dumpEvents = false; | ||
constexpr fptype toleranceMomenta = std::is_same<fptype, double>::value ? 5.E-12 : 1.E-5; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, could the precision be taken out of the source and made available in a config file? (issue for now is fine)
…t on Olivier's latest fix_826 commit d23e773 1) Note about Olivier's latest fix_826 commit d23e773 Olivier's 75c05c5 includes his initial 6 commits in fix_826: git log upstream/master --oneline -n1 0992927 (upstream/master, origin/color2, origin/actions) Merge pull request madgraph5#857 from valassi/tmad git log --oneline 0992927..75c05c5 75c05c5 Merge branch 'master_june24' into fix_826 92a8284 better comment in coloramps 2bcea76 trying to fix git issue 63494ef change to Andrea convention of naming (but removing step variable) 5b6d065 increase readibility and move from map to array 41ddc38 fix a issue for omp compilation bed2e12 try to fix the segfault on issue 826 Olivier's d23e773 is then a merge of the latest upstream/master in 75c05c5, fixing the MG5AMC conflict by setting it to 74fd166c1 git show d23e773 Merge: 75c05c5 0992927 update this branch with andrea fix in master diff --cc MG5aMC/mg5amcnlo - Subproject commit 10378b3c0971e1a241fd9dc365e592c92d1f13ba -Subproject commit f274cab55d5d983c5612ca7ab3417ee796aa1a8c ++Subproject commit 74fd166c1e22bde2dfe01b2e001ac3b177628165 2) Note that, in MG5AMC, 74fd166c1 (obsolete branch gpucpp_826) is the same as 09c96dd17 (branch gpucpp): git diff 74fd166c1 09c96dd17 [NO DIFF] git log --oneline e428e38c6..09c96dd17 09c96dd17 (origin/gpucpp) allow for second exporter to have access to all variable used in the fortran exporter 9abf6a3ad Merge pull request madgraph5#113 from valassi/valassi_volatile f274cab55 (ghav/valassi_volatile, valassi_volatile) Workaround for SIGFPE crashes in function rotxxx (madgraph5#855): add 'volatile' to prevent optimizations 0b8678984 Merge pull request madgraph5#112 from valassi/valassi_uninitialised111 18696c1cf Merge pull request madgraph5#110 from valassi/valassi_leak109 4f8fbb7f3 (ghav/valassi_uninitialised111) Workaround for issue madgraph5#111 reported by valgrind (initialise goodjet array in function setclscales in reweight.f) f6d90fa58 (ghav/valassi_leak109, valassi_leak109) Fix memory leak madgraph5#109 in madevent_driver.f (close file dname.mg) f9f957918 (valgrind) Fix validity time check for UFO pickle (madgraph5#97) 619f5db45 avoid that some parameter switch type when loading model git log --oneline e428e38c6..74fd166c 74fd166c1 (HEAD, origin/gpucpp_826, gpucpp_826) Merge remote-tracking branch 'origin/gpucpp' (PR madgraph5#113 for madgraph5#855 crash in rotxxx) into gpucpp_826 9abf6a3ad Merge pull request madgraph5#113 from valassi/valassi_volatile f274cab55 (ghav/valassi_volatile, valassi_volatile) Workaround for SIGFPE crashes in function rotxxx (madgraph5#855): add 'volatile' to prevent optimizations e4d9df4ab Merge remote-tracking branch 'origin/gpucpp' (PRs madgraph5#110 and madgraph5#112 for issues madgraph5#109 and madgraph5#111) into gpucpp_826 0b8678984 Merge pull request madgraph5#112 from valassi/valassi_uninitialised111 18696c1cf Merge pull request madgraph5#110 from valassi/valassi_leak109 4f8fbb7f3 (ghav/valassi_uninitialised111) Workaround for issue madgraph5#111 reported by valgrind (initialise goodjet array in function setclscales in reweight.f) f6d90fa58 (ghav/valassi_leak109, valassi_leak109) Fix memory leak madgraph5#109 in madevent_driver.f (close file dname.mg) 10378b3c0 allow for second exporter to have access to all variable used in the fortran exporter f9f957918 (valgrind) Fix validity time check for UFO pickle (madgraph5#97) 619f5db45 avoid that some parameter switch type when loading model 3) Note that color includes the following submodule updates, passing through 09c96dd17 to ba54a4153 git show --oneline upstream/master..color ../../MG5aMC/ 4b29496 [color] update MG5AMC to ba54a4153 in th egpuccp branch, with a minor fix in a comment for my icolamp patch Submodule MG5aMC/mg5amcnlo 99e064157..ba54a4153: > minor fix in a printout in my previous patch in export_cpp.py 1c2a02d [color] update MG5AMC to 99e064157, fixing bug madgraph5#856 (and related ones) about the icolamp array in coloramps.h Submodule MG5aMC/mg5amcnlo 09c96dd17..99e064157: > In export_cpp.py fix bug madgraph5#114 in get_icolamp_lines, resulting in different icolamp arrays for F77 and CPP (see madgraph5#873) 0a60262 [color] update MG5AMC to 09c96dd17: this is the latest gpucpp branch, now including Olivier's extra commit previously in gpucpp_826 Submodule MG5aMC/mg5amcnlo 10378b3c0...09c96dd17: > allow for second exporter to have access to all variable used in the fortran exporter > Merge pull request madgraph5#113 from valassi/valassi_volatile > Merge pull request madgraph5#112 from valassi/valassi_uninitialised111 > Merge pull request madgraph5#110 from valassi/valassi_leak109 < allow for second exporter to have access to all variable used in the fortran exporter 16ff942 try to fix the segfault on issue 826 Submodule MG5aMC/mg5amcnlo f9f957918..10378b3c0: > allow for second exporter to have access to all variable used in the fortran exporter 4b12e79 [color] temporarely downgrade back MG5AMC to the common base of gpucpp and gpucpp_826, to allow cherry-picking Olivier's fix_826 changes > Submodule MG5aMC/mg5amcnlo f274cab55..f9f957918 (rewind): < Workaround for SIGFPE crashes in function rotxxx (madgraph5#855): add 'volatile' to prevent optimizations < Merge pull request madgraph5#112 from valassi/valassi_uninitialised111 < Merge pull request madgraph5#110 from valassi/valassi_leak109 => Therefore I can simply merge origin/color into color2 and fix the MG5AMC conflict by setting it to ba54a4153 (valassi_icolamp114, before more recent changes)
Refactor testing code, make it independent of CUDA and Epoch1.
To run their own test, each epoch/abstraction implements a test driver
interface, and instantiates a test suite defined in test/src.
In more detail:
@roiser Check the Makefile the process subdirectory. As you said, they compile their own version or
MadgraphTest.o
, although this file doesn't belong into the process subdirectory.