2020-11-20 15:39:34 +01:00
|
|
|
{
|
|
|
|
stdenv
|
|
|
|
, cc
|
|
|
|
, mpi
|
|
|
|
}:
|
|
|
|
|
|
|
|
with stdenv.lib;
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "shuffle";
|
|
|
|
|
|
|
|
src = builtins.fetchGit {
|
2020-12-07 13:47:17 +01:00
|
|
|
url = "ssh://git@bscpm03.bsc.es/dalvare1/bigsort.git";
|
2020-11-20 15:39:34 +01:00
|
|
|
ref = "garlic/mpi+send+omp+task";
|
|
|
|
};
|
|
|
|
|
|
|
|
postUnpack = "sourceRoot=$sourceRoot/ShuffleSeq";
|
|
|
|
|
|
|
|
# FIXME: Remove the ../commons/Makefile as is not useful here, we only need
|
|
|
|
# the CPP_SRC and OBJ variables.
|
|
|
|
postPatch = ''
|
|
|
|
sed -i '1cCPP_SRC = $(wildcard *.cpp)' Makefile
|
|
|
|
sed -i '2cOBJ = $(CPP_SRC:.cpp=.o)' Makefile
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
cc
|
|
|
|
mpi
|
|
|
|
];
|
|
|
|
|
|
|
|
makeFlags = [
|
2020-12-03 18:06:51 +01:00
|
|
|
"I_MPI_CXX=${cc.CXX}"
|
2020-11-20 15:39:34 +01:00
|
|
|
"CPP_BIN=mpicxx"
|
|
|
|
];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp shuffle $out/bin/shuffle
|
|
|
|
'';
|
|
|
|
|
|
|
|
programPath = "/bin/shuffle";
|
|
|
|
}
|