forked from rarias/bscpkgs
Move apps into garlic/apps
This commit is contained in:
41
garlic/apps/cpic/default.nix
Normal file
41
garlic/apps/cpic/default.nix
Normal file
@@ -0,0 +1,41 @@
|
||||
{
|
||||
stdenv
|
||||
, libconfig
|
||||
, nanos6
|
||||
, mpi
|
||||
, uthash
|
||||
, fftw
|
||||
, tampi
|
||||
, hdf5
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "cpic";
|
||||
|
||||
# Use my current cpic version, so I can test changes without commits
|
||||
#src = /home/Computational/rarias/cpic;
|
||||
|
||||
src = builtins.fetchGit {
|
||||
url = "https://github.com/rodarima/cpic";
|
||||
# rev = "73bd70448587f0925b89e24c8f17e412ea3958e6";
|
||||
ref = "simd";
|
||||
};
|
||||
|
||||
enableParallelBuilding = true;
|
||||
dontStrip = true;
|
||||
|
||||
buildInputs = [
|
||||
libconfig
|
||||
nanos6
|
||||
mpi
|
||||
uthash
|
||||
fftw
|
||||
tampi
|
||||
hdf5
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp cpic $out/bin/cpic
|
||||
'';
|
||||
}
|
||||
67
garlic/apps/creams/default.nix
Normal file
67
garlic/apps/creams/default.nix
Normal file
@@ -0,0 +1,67 @@
|
||||
{
|
||||
stdenv
|
||||
, nanos6
|
||||
, mpi
|
||||
, openmpi
|
||||
, impi
|
||||
, tampi
|
||||
, mcxx
|
||||
, gnuDef
|
||||
, intelDef
|
||||
, cc
|
||||
, gitBranch
|
||||
}:
|
||||
|
||||
assert (mpi == impi || mpi == openmpi);
|
||||
|
||||
let
|
||||
mpiName = (if mpi == openmpi then
|
||||
"OpenMPI"
|
||||
else
|
||||
"IntelMPI");
|
||||
|
||||
compName = (if cc == intelDef then
|
||||
"Intel"
|
||||
else
|
||||
"GNU");
|
||||
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
name = "creams";
|
||||
|
||||
# src = /home/Computational/pmartin1/creams-simplified;
|
||||
src = builtins.fetchGit {
|
||||
url = "ssh://git@bscpm02.bsc.es/pmartin1/creams-simplified.git";
|
||||
ref = "${gitBranch}";
|
||||
};
|
||||
|
||||
programPath = "/bin/creams.exe";
|
||||
|
||||
buildInputs = [
|
||||
nanos6
|
||||
mpi
|
||||
cc
|
||||
tampi
|
||||
mcxx
|
||||
];
|
||||
|
||||
hardeningDisable = [ "all" ];
|
||||
|
||||
configurePhase = ''
|
||||
export TAMPI_HOME=${tampi}
|
||||
|
||||
. etc/bashrc
|
||||
|
||||
export FORTRAN_COMPILER=${compName}
|
||||
export MPI_LIB=${mpiName}
|
||||
|
||||
echo
|
||||
|
||||
CREAMS_UPDATE_ENVIRONMENT
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp -a build/* $out/bin
|
||||
'';
|
||||
}
|
||||
31
garlic/apps/creams/input.nix
Normal file
31
garlic/apps/creams/input.nix
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
stdenv
|
||||
, granul ? 0
|
||||
, nprocz ? 0
|
||||
, gitBranch
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "creams-input";
|
||||
|
||||
# src = /home/Computational/pmartin1/creams-simplified;
|
||||
src = builtins.fetchGit {
|
||||
url = "ssh://git@bscpm02.bsc.es/pmartin1/creams-simplified.git";
|
||||
ref = "${gitBranch}";
|
||||
};
|
||||
|
||||
phases = [ "unpackPhase" "patchPhase" "installPhase" ];
|
||||
|
||||
patchPhase = ''
|
||||
patchShebangs SodTubeBenchmark/gridScript.sh
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
pushd SodTubeBenchmark
|
||||
./gridScript.sh 0 0 ${toString nprocz} ${toString granul}
|
||||
popd
|
||||
|
||||
mkdir -p $out
|
||||
cp -a SodTubeBenchmark $out/
|
||||
'';
|
||||
}
|
||||
52
garlic/apps/fwi/default.nix
Normal file
52
garlic/apps/fwi/default.nix
Normal file
@@ -0,0 +1,52 @@
|
||||
{
|
||||
stdenv
|
||||
, nanos6
|
||||
, mpi
|
||||
, tampi
|
||||
, mcxx
|
||||
, icc
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "nbody";
|
||||
variant = "4_MPI_ompss";
|
||||
|
||||
src = builtins.fetchGit {
|
||||
url = "https://gitlab.com/srodrb/BSC-FWI.git";
|
||||
ref = "ompss-mpi-nocache";
|
||||
};
|
||||
|
||||
postUnpack = "sourceRoot=$sourceRoot/${variant}";
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
buildInputs = [
|
||||
nanos6
|
||||
mpi
|
||||
icc
|
||||
tampi
|
||||
mcxx
|
||||
];
|
||||
|
||||
# FIXME: This is an ugly hack.
|
||||
# When using _GNU_SOURCE or any other definition used in features.h, we need
|
||||
# to define them before mcc includes nanos6.h from the command line. So the
|
||||
# only chance is by setting it at the command line with -D. Using the DEFINES
|
||||
# below, reaches the command line of the preprocessing stage with gcc.
|
||||
preBuild = ''
|
||||
export DEFINES=-D_GNU_SOURCE
|
||||
'';
|
||||
|
||||
makeFlags = [
|
||||
"NZF=108"
|
||||
"NXF=108"
|
||||
"NYF=208"
|
||||
"PRECISION=float"
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp fwi.* $out/bin
|
||||
cp ModelGenerator $out/bin
|
||||
'';
|
||||
}
|
||||
32
garlic/apps/heat/default.nix
Normal file
32
garlic/apps/heat/default.nix
Normal file
@@ -0,0 +1,32 @@
|
||||
{
|
||||
stdenv
|
||||
, nanos6
|
||||
, mpi
|
||||
, tampi
|
||||
, mcxx
|
||||
, icc
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "heat";
|
||||
|
||||
src = builtins.fetchGit {
|
||||
url = "ssh://git@bscpm02.bsc.es/benchmarks/ompss-2/heat-conflict-kevin.git";
|
||||
#rev = "25fde23e5ad5f5e2e58418ed269bc2b44642aa17";
|
||||
ref = "master";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
nanos6
|
||||
mpi
|
||||
icc
|
||||
tampi
|
||||
mcxx
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp heat_* $out/bin/
|
||||
'';
|
||||
|
||||
}
|
||||
44
garlic/apps/hpccg/default.nix
Normal file
44
garlic/apps/hpccg/default.nix
Normal file
@@ -0,0 +1,44 @@
|
||||
{
|
||||
stdenv
|
||||
, nanos6
|
||||
, mpi
|
||||
, mcxx
|
||||
, tampi
|
||||
, icc
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "hpccg";
|
||||
|
||||
src = builtins.fetchGit {
|
||||
url = "ssh://git@bscpm02.bsc.es/mmaronas/HPCCG.git";
|
||||
ref = "mmaronas-development";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
nanos6
|
||||
mpi
|
||||
icc
|
||||
tampi
|
||||
mcxx
|
||||
];
|
||||
|
||||
# The hpccg app fails to compile in parallel. Makefile must be fixed before.
|
||||
enableParallelBuilding = false;
|
||||
|
||||
postPatch = ''
|
||||
sed -i 's/mpic++/mpiicpc/g' Makefile
|
||||
sed -i 's/g++/icpc/g' Makefile
|
||||
mkdir obj
|
||||
'';
|
||||
|
||||
makeFlags = [
|
||||
"USE_MPI=-DUSING_MPI"
|
||||
"TAMPI_HOME=${tampi}"
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp test_HPCCG* $out/bin
|
||||
'';
|
||||
}
|
||||
46
garlic/apps/hpcg/default.nix
Normal file
46
garlic/apps/hpcg/default.nix
Normal file
@@ -0,0 +1,46 @@
|
||||
{
|
||||
stdenv
|
||||
, nanos6
|
||||
, mpi
|
||||
, mcxx
|
||||
, tampi
|
||||
, icc
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "hpcg";
|
||||
|
||||
src = builtins.fetchGit {
|
||||
url = "ssh://git@bscpm02.bsc.es/rpenacob/hpcg.git";
|
||||
ref = "symgs_coloring_more_than_one_block_per_task_halos_blocking_discreete";
|
||||
};
|
||||
|
||||
prePatch = ''
|
||||
#export NIX_DEBUG=6
|
||||
'';
|
||||
|
||||
patches = [ ./tampi.patch ];
|
||||
|
||||
buildInputs = [
|
||||
nanos6
|
||||
mpi
|
||||
icc
|
||||
tampi
|
||||
mcxx
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
configurePhase = ''
|
||||
export TAMPI_HOME=${tampi}
|
||||
mkdir build
|
||||
cd build
|
||||
../configure MPI_ICPC_OSS
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp bin/* $out/bin/
|
||||
'';
|
||||
|
||||
}
|
||||
13
garlic/apps/hpcg/tampi.patch
Normal file
13
garlic/apps/hpcg/tampi.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
--- a/setup/Make.MPI_ICPC_OSS 2020-07-13 16:02:33.272257865 +0200
|
||||
+++ b/setup/Make.MPI_ICPC_OSS 2020-07-13 16:04:34.344413390 +0200
|
||||
@@ -91,8 +91,8 @@
|
||||
# - HPCG includes / libraries / specifics -------------------------------
|
||||
# ----------------------------------------------------------------------
|
||||
#
|
||||
-HPCG_INCLUDES = -I$(INCdir) -I$(INCdir)/$(arch) $(MPinc) -I{TAMPI_HOME}/include
|
||||
-HPCG_LIBS = ${TAMPI_HOME}/lib/libtampi.a
|
||||
+HPCG_INCLUDES = -I$(INCdir) -I$(INCdir)/$(arch) $(MPinc) -I$(TAMPI_HOME)/include
|
||||
+HPCG_LIBS = -l:libtampi.a
|
||||
#
|
||||
# - Compile time options -----------------------------------------------
|
||||
#
|
||||
31
garlic/apps/lulesh/default.nix
Normal file
31
garlic/apps/lulesh/default.nix
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
stdenv
|
||||
, mpi
|
||||
, mcxx
|
||||
, icc
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "lulesh";
|
||||
|
||||
src = builtins.fetchGit {
|
||||
url = "ssh://git@bscpm02.bsc.es/mmaronas/lulesh.git";
|
||||
ref = "master";
|
||||
};
|
||||
|
||||
dontConfigure = true;
|
||||
|
||||
buildInputs = [
|
||||
mpi
|
||||
icc
|
||||
mcxx
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
find . -name 'lulesh*' -type f -executable -exec cp \{\} $out/bin/ \;
|
||||
'';
|
||||
|
||||
}
|
||||
52
garlic/apps/nbody/default.nix
Normal file
52
garlic/apps/nbody/default.nix
Normal file
@@ -0,0 +1,52 @@
|
||||
{
|
||||
stdenv
|
||||
, cc
|
||||
, mpi ? null
|
||||
, tampi ? null
|
||||
, mcxx ? null
|
||||
, cflags ? null
|
||||
, gitBranch
|
||||
, gitURL ? "ssh://git@bscpm02.bsc.es/garlic/apps/nbody.git"
|
||||
, blocksize ? 2048
|
||||
}:
|
||||
|
||||
assert !(tampi != null && mcxx == null);
|
||||
|
||||
with stdenv.lib;
|
||||
stdenv.mkDerivation rec {
|
||||
name = "nbody";
|
||||
|
||||
#src = ~/nbody;
|
||||
|
||||
src = builtins.fetchGit {
|
||||
url = "${gitURL}";
|
||||
ref = "${gitBranch}";
|
||||
};
|
||||
programPath = "/bin/nbody";
|
||||
|
||||
buildInputs = [
|
||||
cc
|
||||
]
|
||||
++ optional (mpi != null) mpi
|
||||
++ optional (tampi != null) tampi
|
||||
++ optional (mcxx != null) mcxx;
|
||||
|
||||
preBuild = (if cflags != null then ''
|
||||
makeFlagsArray+=(CFLAGS="${cflags}")
|
||||
'' else "");
|
||||
|
||||
makeFlags = [
|
||||
"CC=${cc.cc.CC}"
|
||||
"BS=${toString blocksize}"
|
||||
]
|
||||
++ optional (tampi != null) "TAMPI_HOME=${tampi}";
|
||||
|
||||
dontPatchShebangs = true;
|
||||
|
||||
installPhase = ''
|
||||
echo ${tampi}
|
||||
mkdir -p $out/bin
|
||||
cp nbody* $out/bin/${name}
|
||||
'';
|
||||
|
||||
}
|
||||
34
garlic/apps/ppong/default.nix
Normal file
34
garlic/apps/ppong/default.nix
Normal file
@@ -0,0 +1,34 @@
|
||||
{
|
||||
stdenv
|
||||
, mpi
|
||||
, fetchurl
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "ppong";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.csl.mtu.edu/cs4331/common/PPong.c";
|
||||
sha256 = "0d1w72gq9627448cb7ykknhgp2wszwd117dlbalbrpf7d0la8yc0";
|
||||
};
|
||||
|
||||
unpackCmd = ''
|
||||
mkdir src
|
||||
cp $src src/ppong.c
|
||||
'';
|
||||
|
||||
dontConfigure = true;
|
||||
|
||||
buildPhase = ''
|
||||
echo mpicc -include stdlib.h ppong.c -o ppong
|
||||
mpicc -include stdlib.h ppong.c -o ppong
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp ppong $out/bin/ppong
|
||||
ln -s $out/bin/ppong $out/bin/run
|
||||
'';
|
||||
|
||||
buildInputs = [ mpi ];
|
||||
}
|
||||
67
garlic/apps/saiph/default.nix
Normal file
67
garlic/apps/saiph/default.nix
Normal file
@@ -0,0 +1,67 @@
|
||||
{
|
||||
stdenv
|
||||
, nanos6
|
||||
, mpi
|
||||
, tampi
|
||||
, cc
|
||||
, vtk
|
||||
, boost
|
||||
, devMode ? false
|
||||
, gitBranch ? "master"
|
||||
, numComm ? null
|
||||
, vectFlags ? null
|
||||
#, breakpointHook
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "saiph";
|
||||
|
||||
src = (if (devMode == true) then ~/repos/saiph
|
||||
else
|
||||
builtins.fetchGit {
|
||||
url = "ssh://git@bscpm02.bsc.es/DSLs/saiph.git";
|
||||
ref = "${gitBranch}";
|
||||
});
|
||||
|
||||
programPath = "/bin/ExHeat3D";
|
||||
|
||||
enableParallelBuilding = true;
|
||||
dontStrip = true;
|
||||
enableDebugging = true;
|
||||
|
||||
buildInputs = [
|
||||
nanos6
|
||||
mpi
|
||||
tampi
|
||||
cc
|
||||
vtk
|
||||
boost
|
||||
# breakpointHook
|
||||
];
|
||||
|
||||
# Required for nanos6
|
||||
hardeningDisable = [ "bindnow" ];
|
||||
|
||||
preBuild = ''
|
||||
cd saiphv2/cpp/src
|
||||
export VTK_VERSION=8.2
|
||||
export VTK_HOME=${vtk}
|
||||
''
|
||||
+ (if (devMode == true) then "make clean" else "")
|
||||
;
|
||||
|
||||
makeFlags = [
|
||||
"-f" "Makefile.${cc.cc.CC}"
|
||||
"apps"
|
||||
"APP=ExHeat3D"
|
||||
( if (numComm != null) then "NUM_COMM=${toString numComm}" else "" )
|
||||
( if (vectFlags != null) then "VECT_FLAGS=${toString vectFlags}" else "" )
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/lib
|
||||
mkdir -p $out/bin
|
||||
cp obj/libsaiphv2.so $out/lib/
|
||||
cp bin/ExHeat3D $out/bin/
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user