Description of problem: Calling an external mpi executable from julia behaves differently in the julia builds from the Fedora repository and those downloaded from julialang.org. The official builds have the NO_AFFINITY option set for BLAS and calling an external mpi executable by > cmd = Cmd(`mpiexec -np 4 name_of_executable`) > run(cmd) runs the executable on 4 cores. Doing the same in the Fedora build, creates 4 processes running on one core. Version-Release number of selected component (if applicable): versioninfo() for Fedora build: Julia Version 0.6.0 Commit 903644385b* (2017-06-19 13:05 UTC) Platform Info: OS: Linux (x86_64-redhat-linux) CPU: Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz WORD_SIZE: 64 BLAS: libopenblas (DYNAMIC_ARCH Haswell) LAPACK: libopenblasp.so.0 LIBM: libopenlibm LLVM: libLLVM-3.9.1 (ORCJIT, broadwell) versioninfo() for official build: Julia Version 0.6.2 Commit d386e40c17 (2017-12-13 18:08 UTC) Platform Info: OS: Linux (x86_64-pc-linux-gnu) CPU: Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz WORD_SIZE: 64 BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Prescott) LAPACK: libopenblas64_ LIBM: libopenlibm LLVM: libLLVM-3.9.1 (ORCJIT, broadwell) How reproducible: Always Steps to Reproduce: 1. Run julia 2. execute > cmd = Cmd(`mpiexec -np 4 name_of_executable`) > run(cmd) Actual results: 4 processes are created, all running on the same core Expected results: 4 processes are created, all running on their own core Additional info:
Thanks for the report. Shouldn't this be fixed in OpenBLAS rather than in Julia? What's the role of Julia in this? Also, AFAICT Julia disables threading affinity on startup via OPENBLAS_MAIN_FREE https://github.com/JuliaLang/julia/pull/9639.
FWIW, NO_AFFINITY=1 has been the default in a few OpenBLAS releases, but has been reverted without a clear reason. Julia developers argue that distribution packages for OpenBLAS should set NO_AFFINITY=1. That would protect us from future upstream changes. See https://github.com/JuliaLang/julia/pull/9639
Fixed upstream in OpenBLAS: https://github.com/xianyi/OpenBLAS/pull/1495. May still be worth passing the flag explicitly to fix the problem immediately instead of waiting for the next release.
openblas-0.2.20-6.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-c53bb31492
openblas-0.2.20-6.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-a981a0cbd7
openblas-0.2.20-10.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-56401d52db
openblas-0.2.20-10.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-493ca8ae30
openblas-0.2.20-10.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-56401d52db
Thanks!
openblas-0.2.20-6.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-a981a0cbd7
openblas-0.2.20-10.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-493ca8ae30
openblas-0.2.20-6.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-c53bb31492
openblas-0.2.20-10.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.
openblas-0.2.20-10.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.
openblas-0.2.20-6.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.
openblas-0.2.20-6.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.