Repository navigation
Reword/expand comments in Makefile.rule - #1988
Conversation
Lots of small changes in the wording of the comments, plus an expansion of the NUM_THREADS and NO_AFFINITY sections.
|
I think the part about not wanting to install the static library is technically correct, as the gmake build proceeds via libopenblas.a in any case. |
Revert generate to install, explain the nature of the affinity conflict
brada4
left a comment
There was a problem hiding this comment.
Your num_threads description states all redistributed packages configured with 32/64/128 threads are wrong.
Why generic fortran option os atributed to ifort?
Affinity is off by default and only affines threads to cores, nothing with memory. One certain application is numpy.
Well, the old description was even worse, suggesting less threads than the number of cores. But I can add a note for package maintainers.
GCC does not recognize "-i8" at all, the option that turns on 64-bit integers is "-fdefault-integer-8".
OK, I will fix this, I was following the old description, and that stated "CPU/memory affinity". I assumed the old description was not wrong. |
|
I suspect the original wording as "Basically should be less than actual number of cores" was meant in the sense of "you will want to define this only if you want less than what the autodetection would find anyway". I'm perfectly OK with labeling the "-i8" option in the comment as ifort dialect for clarity. Lastly calling it "CPU/memory" affinity probably makes sense where memory access is not quite uniform e.g. between cores on separate dies. (Again the wording is Goto's, and I think he would have known) |
|
Probably worth saying that NUM_THREADS is maximum and can be reduced at runtime if needed (with some examples) |
"For this reason, affinity handling is disabled by default." I cannot see how I could have made it clearer that it is disabled by default |
add note about NUM_THREADS for package maintainers, add examples of programs that cause affinity troubles
|
I think if there are no further objections, this is ready to go. |
|
The thing is num_threads sizes memory buffers, and larger than CPUs value is desirable if using threading outside OpenBLAS. Accurate reference to OPENBLAS_NUM_THREADS would help there. |
AFAIK the current codebase always creates enough memory buffers for at least 50 threads.
I refrained from mentioning that environment variable on purpose. There are many ways to set the actual number of used threads at runtime, and that is already documented elsewhere. I feel like mentioning only one of the possible ways could be misleading. |
|
NUM_THREADS - Better to make a shortcut, current documentation could wish better structuring. |
|
Actually I think the new wording is quite adequate as it is now (minor nit: you retained a "the the" from the previous version in line 75). We may eventually want to move the lengthier descriptions to some new document named "OPTIONS" or the like, or rework the original |
Lots of small changes in the wording of the comments, plus an expansion of the NUM_THREADS and NO_AFFINITY sections.