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
Run doctests with OMP_NUM_THREADS=2 #23892
Comments
comment:1
Again??? :( |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Author: Jeroen Demeyer |
This comment has been minimized.
This comment has been minimized.
Commit: |
New commits:
|
comment:8
Hi Jeroen, I want to review this, but before doing so I run into trouble, because on my machine all doctests pass in sage 8.1.beta5 with pynormaliz. Could you give pointers to which doctests failed for you and maybe help reproduce the failure so I can better understand wether this solution works. Also is there any particular reason for the integer 2? Why not 3 or 4? I agree it should not be 1 because certain bugs might go undetected in that way. |
comment:9
In particular, many tests in Since the problem depends on the number of threads, which is the number of cores by default, it could very well be that this problem only occurs on systems with many cores. The system where I saw the failure has 24 cores. Maybe you could get the failure with |
comment:10
Replying to @koffie:
Yes, it is the smallest integer strictly larger than 1. 1 thread is too few, because it doesn't really test threading. With 2 threads, you do test threading. On the other hand, the system load will at most be a factor 200% too large, which is not too bad. |
comment:11
Without the patch I indeed get 4 files with failing doctests if I do:
and it does not fail anymore with the patch. So it seems to be the right thing to do in order to fix it. One thing that I don't like about the current patch is that it overwrites |
comment:12
Replying to @koffie:
I consider that a feature. The point is that doctests should be reproducible and not depend too much on the external environment. If somebody has set an environment variable
Alternatively, you can set |
comment:13
Ok, I am now running all the doctest after Does your remark mean that it would also be better to fix #23612 (edit: sorry I meant #23613) by unsetting |
comment:15
Sorry, I meant #23613. |
comment:16
Ok looks good to me. |
comment:17
Reviewer name |
Reviewer: Maarten Derickx |
Changed branch from u/jdemeyer/run_doctests_with_omp_num_threads_2 to |
Changed commit from |
comment:20
I wonder if this and/or #23748 will fix the doc build problems I was having on Windows for the past several weeks (which caused me to have to take down the Window patchbot >_<). Fingers crossed... |
comment:21
Oh wait, this was just for the doctests, I misread. Maybe not then... |
The
normaliz
package uses OMP for threading, which can create many threads. In doctests, this is bad for two reasons:Doctests should not use an unexpectedly large number of system resources.
When there are too many threads, the virtual memory limit from Run doctests with limited memory #23748 will be hit.
There is a solution: set the environment variable
OMP_NUM_THREADS=2
while doctesting.CC: @koffie
Component: packages: optional
Author: Jeroen Demeyer
Branch:
9f9f7b7
Reviewer: Maarten Derickx
Issue created by migration from https://trac.sagemath.org/ticket/23892
The text was updated successfully, but these errors were encountered: