Use ParallelTestRunner.jl - #2481
Conversation
|
We (@fingolfin and I, that is) looked into this for Oscar during the coding sprint this February in Berlin. I no longer remember the exact details, or the "why" behind the behaviour, but the summary was (if I remember correctly), that this calls This is unfortunately not documented anywhere. @fingolfin and I had discussed this in his office, it had gone into my pen-and-paper todo list, and then scratched off from my todo list when we decided in Berlin that it is probably not worth it, for Oscar, at least. |
|
Yes, it seems like it is calling |
|
I don't quite understand the remaining error but for the runners with 4 cores we get at least a speedup by a factor of two. |
I tried digging at it, but didn't get anywhere. I think it might be a bug in ParallelTestRunner.jl : looks like it doesn't properly evaluate / expand the "Expression" part of the test?
It might be worth to also compare against a similar strategy which Oscar currently uses ? |
|
@aaruni96 hehe I had forgotten all about that 🤦 Anyway, for AA a |
Perhaps there might be a way to improve |
The setup for Oscar's parallel tests is fairly simple, as in, it doesn't do too many clever things : Based on an environment variable, or a test argument, a number of worker processes are created, and Oscar is initialized once on all of them, along with some limited amount of common code (similar to So, if you have 2 workers: In contrast to ParallelTestRunner.jl, we don't try to run each test file in total isolation from other test files, so we don't have to run One downside to our approach is, each worker holds on to a large chunk of memory until all the tests are finished. E.g., if you run using 8 workers, and you have 49 long tests, the first 48 tests are roughly evenly distributed in terms of time / cpu / memory usage. But for the last test, in theory, you should have 7 workers doing nothing but still holding onto RAM, while they wait for the last worker to finish, and then all the workers exit together, and relinquish RAM. But upon surface level investigation, it didn't seem like much of a problem in practice, so I didn't dig too deeply into this. |
Today at JuliaCon we attended a talk about a package allowing for running tests in parallel.
This is a first attempt to getting this into Oscar perhaps replacing our custom parallel tests. @fingolfin and I discussed this briefly and came to the conclusion that AbstractAlgebra.jl might be just the ideal testing ground for this endeavour. So, let's see what CI has to say.