From 68ac34e1209c8ba631aea119a2a547f267a88576 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 29 Nov 2019 13:51:50 +0100 Subject: gnu: openmpi: Increase priority of the PSM component. * gnu/packages/patches/openmpi-psm2-priority.patch: Rename to... * gnu/packages/patches/openmpi-mtl-priorities.patch: ... this. Add hunk to change the priority of PSM. * gnu/packages/mpi.scm (openmpi)[source]: Adjust accordingly. * gnu/local.mk (dist_patch_DATA): Likewise. --- gnu/local.mk | 2 +- gnu/packages/mpi.scm | 2 +- gnu/packages/patches/openmpi-mtl-priorities.patch | 35 +++++++++++++++++++++++ gnu/packages/patches/openmpi-psm2-priority.patch | 21 -------------- 4 files changed, 37 insertions(+), 23 deletions(-) create mode 100644 gnu/packages/patches/openmpi-mtl-priorities.patch delete mode 100644 gnu/packages/patches/openmpi-psm2-priority.patch (limited to 'gnu') diff --git a/gnu/local.mk b/gnu/local.mk index 88b0f98aa0..8ad246f8a3 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1203,7 +1203,7 @@ dist_patch_DATA = \ %D%/packages/patches/opencv-rgbd-aarch64-test-fix.patch \ %D%/packages/patches/openfoam-4.1-cleanup.patch \ %D%/packages/patches/openjdk-10-idlj-reproducibility.patch \ - %D%/packages/patches/openmpi-psm2-priority.patch \ + %D%/packages/patches/openmpi-mtl-priorities.patch \ %D%/packages/patches/openocd-nrf52.patch \ %D%/packages/patches/opensmtpd-fix-crash.patch \ %D%/packages/patches/openssl-runpath.patch \ diff --git a/gnu/packages/mpi.scm b/gnu/packages/mpi.scm index 9f6597c6b3..45941df0b0 100644 --- a/gnu/packages/mpi.scm +++ b/gnu/packages/mpi.scm @@ -179,7 +179,7 @@ bind processes, and much more.") "/downloads/openmpi-" version ".tar.bz2")) (sha256 (base32 "0ms0zvyxyy3pnx9qwib6zaljyp2b3ixny64xvq3czv3jpr8zf2wh")) - (patches (search-patches "openmpi-psm2-priority.patch")))) + (patches (search-patches "openmpi-mtl-priorities.patch")))) (build-system gnu-build-system) (inputs `(("hwloc" ,hwloc-2 "lib") diff --git a/gnu/packages/patches/openmpi-mtl-priorities.patch b/gnu/packages/patches/openmpi-mtl-priorities.patch new file mode 100644 index 0000000000..fd76594ddd --- /dev/null +++ b/gnu/packages/patches/openmpi-mtl-priorities.patch @@ -0,0 +1,35 @@ +PSM2 is the only valid implementation for OmniPath (OPA). UCX also +supports OmniPath, but it does so via Verbs, thus getting much lower +performance (typically 3 GiB/s instead of 10 GiB/s). + +To work around that, give the mtl_psm2 component a higher priority +than the pml_ucx component. + +See . + +--- openmpi-4.0.2/ompi/mca/mtl/psm2/mtl_psm2_component.c 2019-11-15 17:06:15.142076840 +0100 ++++ openmpi-4.0.2/ompi/mca/mtl/psm2/mtl_psm2_component.c 2019-11-15 17:06:22.242009379 +0100 +@@ -126,7 +126,7 @@ ompi_mtl_psm2_component_register(void) + setenv("PSM2_DEVICES", "self,shm", 0); + } + +- param_priority = 40; ++ param_priority = 55; + (void) mca_base_component_var_register (&mca_mtl_psm2_component.super.mtl_version, + "priority", "Priority of the PSM2 MTL component", + MCA_BASE_VAR_TYPE_INT, NULL, 0, 0, + +Likewise for PSM: we want InfiniPath to be taken care of by PSM, not by UCX, +since UCX achieves worse performance. + +--- openmpi-4.0.2/ompi/mca/mtl/psm/mtl_psm_component.c ++++ openmpi-4.0.2/ompi/mca/mtl/psm/mtl_psm_component.c +@@ -92,7 +92,7 @@ ompi_mtl_psm_component_register(void) + + + /* set priority high enough to beat ob1's default */ +- param_priority = 30; ++ param_priority = 54; + (void) mca_base_component_var_register (&mca_mtl_psm_component.super.mtl_version, + "priority", "Priority of the PSM MTL component", + MCA_BASE_VAR_TYPE_INT, NULL, 0, 0, diff --git a/gnu/packages/patches/openmpi-psm2-priority.patch b/gnu/packages/patches/openmpi-psm2-priority.patch deleted file mode 100644 index d9dd558010..0000000000 --- a/gnu/packages/patches/openmpi-psm2-priority.patch +++ /dev/null @@ -1,21 +0,0 @@ -PSM2 is the only valid implementation for OmniPath (OPA). UCX also -supports OmniPath, but it does so via Verbs, thus getting much lower -performance (typically 3 GiB/s instead of 10 GiB/s). - -To work around that, give the mtl_psm2 component a higher priority -than the pml_ucx component. - -See . - ---- openmpi-4.0.2/ompi/mca/mtl/psm2/mtl_psm2_component.c 2019-11-15 17:06:15.142076840 +0100 -+++ openmpi-4.0.2/ompi/mca/mtl/psm2/mtl_psm2_component.c 2019-11-15 17:06:22.242009379 +0100 -@@ -126,7 +126,7 @@ ompi_mtl_psm2_component_register(void) - setenv("PSM2_DEVICES", "self,shm", 0); - } - -- param_priority = 40; -+ param_priority = 55; - (void) mca_base_component_var_register (&mca_mtl_psm2_component.super.mtl_version, - "priority", "Priority of the PSM2 MTL component", - MCA_BASE_VAR_TYPE_INT, NULL, 0, 0, - -- cgit 1.4.1