-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
OpenBLAS uses too many make processes while building #828
Comments
Which version of OpenBLAS are you building ? Checking the commit history of getarch.c one finds that |
This is apparently OpenBLAS 0.2.15. (I thought before that it was the tip of the development branch.) I'll check 0.2.17. |
0.2.17 still doesn't quite do the right thing. It is possible to manually choose the number of processes, but what I'm looking for is honouring the user's This patch does the trick for me: diff --git a/Makefile.system b/Makefile.system
index b89f60e..2dbdad0 100644
--- a/Makefile.system
+++ b/Makefile.system
@@ -139,6 +139,10 @@ NO_PARALLEL_MAKE=0
endif
GETARCH_FLAGS += -DNO_PARALLEL_MAKE=$(NO_PARALLEL_MAKE)
+ifdef MAKE_NO_J
+GETARCH_FLAGS += -DMAKE_NO_J=$(MAKE_NO_J)
+endif
+
ifdef MAKE_NB_JOBS
GETARCH_FLAGS += -DMAKE_NB_JOBS=$(MAKE_NB_JOBS)
endif
diff --git a/getarch.c b/getarch.c
index f9c49e6..dffad70 100644
--- a/getarch.c
+++ b/getarch.c
@@ -1012,6 +1012,7 @@ int main(int argc, char *argv[]){
#endif
#endif
+#ifndef MAKE_NO_J
#ifdef MAKE_NB_JOBS
printf("MAKE += -j %d\n", MAKE_NB_JOBS);
#elif NO_PARALLEL_MAKE==1
@@ -1021,6 +1022,7 @@ int main(int argc, char *argv[]){
printf("MAKE += -j %d\n", get_num_cores());
#endif
#endif
+#endif
break;
This introduces a new make option |
Would be more practical to ask julia to add something to OPENBLAS_BUILD_OPTS to obey own make job count... |
I want to call I'd like to be able to do that, but if OpenBLAS unconditionally adds a I'm not choosing any particular build options for OpenBLAS. I expect this to build a generic version that supports a large number of Intel CPU architectures. |
Close OpenMathLib#828 (hopefully)
Close OpenMathLib#828 (hopefully)
@jeromerobert submitted the patch about |
…cit `make -j N`; but use `make -j 1` on `ubuntu-trusty` <!-- ^^^^^ Please provide a concise, informative and self-explanatory title. Don't put issue numbers in there, do this in the PR body below. For example, instead of "Fixes sagemath#1234" use "Introduce new method to calculate 1+1" --> <!-- Describe your changes here in detail --> OpenMathLib/OpenBLAS#828 <!-- Why is this change required? What problem does it solve? --> Fixes part of sagemath#34899 (comment) Tests at https://github.com/mkoeppe/sage/actions/runs/6779033300: openblas finishes successfully in https://github.com/mkoeppe/sage/action s/runs/6779033300/job/18425453802#step:11:3863 <!-- If this PR resolves an open issue, please link to it here. For example "Fixes sagemath#12345". --> <!-- If your change requires a documentation PR, please link it appropriately. --> ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> <!-- If your change requires a documentation PR, please link it appropriately --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> <!-- Feel free to remove irrelevant items. --> - [x] The title is concise, informative, and self-explanatory. - [ ] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on - sagemath#12345: short description why this is a dependency - sagemath#34567: ... --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> URL: sagemath#36671 Reported by: Matthias Köppe Reviewer(s): John H. Palmieri, Matthias Köppe
…cit `make -j N`; but use `make -j 1` on `ubuntu-trusty` <!-- ^^^^^ Please provide a concise, informative and self-explanatory title. Don't put issue numbers in there, do this in the PR body below. For example, instead of "Fixes sagemath#1234" use "Introduce new method to calculate 1+1" --> <!-- Describe your changes here in detail --> OpenMathLib/OpenBLAS#828 <!-- Why is this change required? What problem does it solve? --> Fixes part of sagemath#34899 (comment) Tests at https://github.com/mkoeppe/sage/actions/runs/6779033300: openblas finishes successfully in https://github.com/mkoeppe/sage/action s/runs/6779033300/job/18425453802#step:11:3863 <!-- If this PR resolves an open issue, please link to it here. For example "Fixes sagemath#12345". --> <!-- If your change requires a documentation PR, please link it appropriately. --> ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> <!-- If your change requires a documentation PR, please link it appropriately --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> <!-- Feel free to remove irrelevant items. --> - [x] The title is concise, informative, and self-explanatory. - [ ] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on - sagemath#12345: short description why this is a dependency - sagemath#34567: ... --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> URL: sagemath#36671 Reported by: Matthias Köppe Reviewer(s): John H. Palmieri, Matthias Köppe
While installing Julia 0.4.5 on Stampede at TACC, I received this message from the system administrators:
It seems the problem occurred while Julia was building OpenBLAS. It also seems that OpenBLAS builds with 16 processes (the number of cores on the login node), although I told Julia to use at most 4 processes (see the first
make
line quoted above).Using many processes is fine when building on a laptop or private workstation, but on shared resources, one needs to be less possessive.
It seems that these lines in OpenBLAS's
getarch.c
are responsible for this:Is there a chance that OpenBLAS could not add a
-j
option ifMFLAGS
already contains one?The text was updated successfully, but these errors were encountered: