-
Notifications
You must be signed in to change notification settings - Fork 140
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
Draft: Add color.h test #524
base: master
Are you sure you want to change the base?
Conversation
I added some print statements to
so it fails to find the variable it is trying to redefine in
for So, why is |
Thanks for the investigation. I will look into the ParFORM issue. (You know, in programming, the person you were a month ago is a stranger. Then, the person you were more than 10 years ago is...) By the way, maybe this (the code that gives Valgrind error) should be broken up into small unit tests. |
It seems the problem with valgrind and With Edit: it is some kind of race condition though it seems: if I add a MesPrint in The easiest solution is to just disable valgrind for this test... |
Don't run this test with tform and less than 4 threads, it goes extremely slowly. See discussion in vermaseren#524 .
Once #525 is merged we can rebase this on top and the parform tests will run successfully also. |
Here is a simpler way to reproduce the load-balancing issue under valgrind. I cut the expression out of the color test. This script does basically nothing at all, but on my system
|
Don't run this test with tform and less than 4 threads, it goes extremely slowly. See discussion in vermaseren#524 .
Do you eventually want to put The former does not comply with the rule in README (modulo Perhaps the rule could be reconsidered and rewritten. Maybe the |
|
If we want to run the CI tests for For running Valgrind/coverage jobs for |
What do you mean, by forcer not being compatible with valgrind? |
Forcer always hits memory leaks of FORM, if my memory is correct. |
OK, I will try to test that. Ideally both the color and forcer tests can pass valgrind too. |
Here is the issue that is problematic for Forcer with Valgrind: #252 |
Currently the forcer test (and color, if it moves to the same status) are not part of the coveralls statistic. Perhaps they should also go into that run. At least on my machine, the forcer test running with |
Do you think it makes sense to keep things like forcer, color etc all in separate directories, or would it be better to create a single directory "extra" (for eg) with such tests in? Then the CI can run everything in the extra dir (but not for the valgrind run). |
I think collecting extra test cases into the |
@tueda how does this seem? Now "extra" runs both the forcer and color test, and I added them to the coverage run. Further tests which require external libraries or otherwise somehow don't fit in the default tests could also go into "extra". |
Oh, now I see what you meant, but just to clarify: (1) You don't want to collect form/.github/workflows/test.yml Line 181 in 3262c64
That said, this principle may be open to discussion. By the way, in future, duplicated code in workflows may be rewritten with reusable workflows. |
In principle If they take a long time, can't we just split the runs up with the "groups" mechanism that the valgrind tests already use? In principle it would be nice to add valgrind tests for Is there a particular reason why the coverage check should only be for the tests which run under valgrind? This isn't actually quite the case at the moment anyway, since a few tests are skipped for the valgrind run but run anyway with lcov. |
OK, placing all the extra tests in
It depends on how we define the scope of test coverage. Measuring coverage for Valgrind-validated tests ensures that our tests include verification of the absence of memory errors, at least those detectable by Valgrind (though currently there are |
Right, this does make sense; it is good to know the % of code which is both covered and valgrind-error-free. In this case is there a way to fake the valgrind flag, so that the tests which are Then all test runs could "just run everything", and rely on the |
I think I can add a command option for this. |
More generally, is it possible to have a "build" job which caches the executables, which are then used by all of the checks? Currently all 35 valgrind jobs compile form, as I understand it. Maybe this will improve performance a bit, though I expect some of the harder valgrind tests will still be the bottleneck. |
See discussion in vermaseren#524.
This might be worth a try. But there could be some time overhead for uploading/downloading executables, and hardware or OS versions may not be guaranteed to fully match in different jobs(?) (I've had a bad experience with Google Colab VM, though it is a different vendor.) |
OK, then in that case maybe it is fine as it is. At least, the tests only build the binaries that they use so the build is fairly fast. |
This test seems trickier than expected. Currently:
mpirun -np {1,2} parform
: OKmpirun -np {3,4} parform
: hang?mpirun -np {5,6} parform
: crashvalgrind vorm
: OKvalgrind tvorm -w2
: mostlyhangstakes 100-200s, sometimes finishes in 2svalgrind tvorm -w4
: OK, finishes in 2sThe CI sees valgrind errors in
vorm
,tvorm
that I can't reproduce locally. Edit: I can reproduce them on ubuntu 20.04 (as the runners are using) but not in 22.04.