summary refs log tree commit diff
path: root/pkgs/development/libraries/openmpi
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2016-04-10 11:17:52 +0200
committerVladimír Čunát <vcunat@gmail.com>2016-04-10 11:17:52 +0200
commit30f14243c33f1b386273d08a4776aa679c42143d (patch)
treebd123d5c2ab4fef012ae7de6a225c092f8d611b8 /pkgs/development/libraries/openmpi
parent50fccad5828fb459760fd7578951bb961a18c0fc (diff)
parent2463e0917318581da94e7ba92703b63128c40424 (diff)
downloadnixpkgs-30f14243c33f1b386273d08a4776aa679c42143d.tar
nixpkgs-30f14243c33f1b386273d08a4776aa679c42143d.tar.gz
nixpkgs-30f14243c33f1b386273d08a4776aa679c42143d.tar.bz2
nixpkgs-30f14243c33f1b386273d08a4776aa679c42143d.tar.lz
nixpkgs-30f14243c33f1b386273d08a4776aa679c42143d.tar.xz
nixpkgs-30f14243c33f1b386273d08a4776aa679c42143d.tar.zst
nixpkgs-30f14243c33f1b386273d08a4776aa679c42143d.zip
Merge branch 'master' into closure-size
Comparison to master evaluations on Hydra:
  - 1255515 for nixos
  - 1255502 for nixpkgs
Diffstat (limited to 'pkgs/development/libraries/openmpi')
-rw-r--r--pkgs/development/libraries/openmpi/default.nix7
-rw-r--r--pkgs/development/libraries/openmpi/nbc_copy.patch30
2 files changed, 36 insertions, 1 deletions
diff --git a/pkgs/development/libraries/openmpi/default.nix b/pkgs/development/libraries/openmpi/default.nix
index 18dc2251013..c1333ff6171 100644
--- a/pkgs/development/libraries/openmpi/default.nix
+++ b/pkgs/development/libraries/openmpi/default.nix
@@ -20,6 +20,12 @@ in stdenv.mkDerivation rec {
     sha256 = "14p4px9a3qzjc22lnl6braxrcrmd9rgmy7fh4qpanawn2pgfq6br";
   };
 
+  # Bug in openmpi implementation for zero sized messages
+  # Patch required to make mpi4py pass. Will NOT
+  # be required when openmpi >= 2.0.0
+  # https://www.open-mpi.org/community/lists/users/2015/11/28030.php
+  patches = [ ./nbc_copy.patch ];
+
   buildInputs = [ gfortran libibverbs ];
 
   nativeBuildInputs = [ perl ];
@@ -42,4 +48,3 @@ in stdenv.mkDerivation rec {
     maintainers = [ stdenv.lib.maintainers.mornfall ];
   };
 }
-
diff --git a/pkgs/development/libraries/openmpi/nbc_copy.patch b/pkgs/development/libraries/openmpi/nbc_copy.patch
new file mode 100644
index 00000000000..d496c7cc2d7
--- /dev/null
+++ b/pkgs/development/libraries/openmpi/nbc_copy.patch
@@ -0,0 +1,30 @@
+commit 4ee20ba31dd64b8f899447cdad78ec2379acfce7
+Author: Gilles Gouaillardet <gilles@rist.or.jp>
+Date:   Tue Nov 10 08:59:03 2015 +0900
+
+    fix NBC_Copy for legitimate zero size messages
+    
+    (back ported from commit open-mpi/ompi@0bd765eddd33e3d4ac18ec644c60a5c160cb48dc)
+    (back ported from commit open-mpi/ompi@9a70765f27fdf17e70e1a115754fef7e5f16132a)
+
+diff --git a/ompi/mca/coll/libnbc/nbc_internal.h b/ompi/mca/coll/libnbc/nbc_internal.h
+index bf2f1cb..81be8cc 100644
+--- a/ompi/mca/coll/libnbc/nbc_internal.h
++++ b/ompi/mca/coll/libnbc/nbc_internal.h
+@@ -501,7 +501,14 @@ static inline int NBC_Copy(void *src, int srccount, MPI_Datatype srctype, void *
+   } else {
+     /* we have to pack and unpack */
+     res = MPI_Pack_size(srccount, srctype, comm, &size);
+-    if (MPI_SUCCESS != res || 0 == size) { printf("MPI Error in MPI_Pack_size() (%i:%i)\n", res, size); return (MPI_SUCCESS == res) ? MPI_ERR_SIZE : res;}
++    if (MPI_SUCCESS != res) {
++      printf ("MPI Error in MPI_Pack_size() (%i:%i)", res, size);
++      return res;
++    }
++
++    if (0 == size) {
++        return OMPI_SUCCESS;
++    }
+     packbuf = malloc(size);
+     if (NULL == packbuf) { printf("Error in malloc()\n"); return res; }
+     pos=0;
+