diff --git a/garlic/apps/bigsort/default.nix b/garlic/apps/bigsort/default.nix new file mode 100644 index 0000000..05c0342 --- /dev/null +++ b/garlic/apps/bigsort/default.nix @@ -0,0 +1,51 @@ +{ + stdenv +, cc +, nanos6 ? null +, mcxx ? null +, mpi +, gitBranch +}: + +with stdenv.lib; +stdenv.mkDerivation rec { + name = "bigsort"; + + src = builtins.fetchGit { + url = "ssh://git@bscpm02.bsc.es/dalvare1/bigsort.git"; + ref = "${gitBranch}"; + }; + + #sourceRoot = "./BigSort"; + + preBuild = '' + cd BigSort + export I_MPI_CXX=${cc.cc.CXX} + ''; + + buildInputs = [ + cc + mpi + ] + ++ optional (mcxx != null) mcxx + ++ optional (nanos6 != null) nanos6; + + makeFlags = [ + "CC=${cc.cc.CC}" + "CXX=${cc.cc.CXX}" + "CPP_BIN=mpicxx" + "CLUSTER=MareNostrum4" + "OPENMP=yes" + "Debug=no" + "OPENMP_FLAGS=-qopenmp" + ]; + + enableParallelBuilding = true; + + installPhase = '' + mkdir -p $out/bin + cp bigsort $out/bin/BigSort + ''; + + programPath = "/bin/BigSort"; +} diff --git a/overlay.nix b/overlay.nix index 276bf81..da2b12c 100644 --- a/overlay.nix +++ b/overlay.nix @@ -246,6 +246,12 @@ let gitBranch = "garlic/oss"; }; + bigsort = callPackage ./garlic/apps/bigsort/default.nix { + cc = self.bsc.icc; + mpi = self.bsc.mpi; + gitBranch = "garlic/mpi+send+omp+task"; + }; + heat = callPackage ./garlic/apps/heat/default.nix { }; # heat = callPackage ./garlic/apps/heat/default.nix { # # FIXME: The heat program must be able to compile with gcc9 and newer