Testing saiph app
This commit is contained in:
parent
74222706bf
commit
a1f33444b5
@ -17,6 +17,10 @@ stdenv.mkDerivation rec {
|
||||
|
||||
dontStrip = true;
|
||||
|
||||
patchPhase = ''
|
||||
sed -i 's/mpicc/mpigcc/g' Makefile
|
||||
'';
|
||||
|
||||
buildInputs = [
|
||||
nanos6
|
||||
mpi
|
||||
|
45
bsc/apps/saiph/default.nix
Normal file
45
bsc/apps/saiph/default.nix
Normal file
@ -0,0 +1,45 @@
|
||||
{
|
||||
stdenv
|
||||
, nanos6
|
||||
, mpi
|
||||
, tampi
|
||||
, mcxx
|
||||
, vtk
|
||||
, boost
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "nbody";
|
||||
|
||||
src = builtins.fetchGit {
|
||||
url = "ssh://git@bscpm02.bsc.es/DSLs/saiph.git";
|
||||
#rev = "a8372abf9fc7cbc2db0778de80512ad4af244c29";
|
||||
ref = "VectorisationSupport";
|
||||
};
|
||||
|
||||
#dontStrip = true;
|
||||
|
||||
# preBuild = ''
|
||||
# cd saiphv2/cpp/src
|
||||
# '';
|
||||
|
||||
buildInputs = [
|
||||
nanos6
|
||||
mpi
|
||||
tampi
|
||||
mcxx
|
||||
vtk
|
||||
boost
|
||||
];
|
||||
|
||||
buildPhase = ''
|
||||
pwd
|
||||
cd saiphv2/cpp/src
|
||||
make -f Makefile.clang apps=ExHeat
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
#cp nbody_* $out/bin/
|
||||
'';
|
||||
}
|
76
bsc/vtk/default.nix
Normal file
76
bsc/vtk/default.nix
Normal file
@ -0,0 +1,76 @@
|
||||
{
|
||||
stdenv
|
||||
, fetchurl
|
||||
, cmake
|
||||
, libGLU
|
||||
, libGL
|
||||
, libX11
|
||||
, xorgproto
|
||||
, libXt
|
||||
, libtiff
|
||||
, qtLib ? null
|
||||
, enablePython ? false, python ? null
|
||||
, mpi ? null
|
||||
}:
|
||||
|
||||
with stdenv.lib;
|
||||
|
||||
let
|
||||
os = stdenv.lib.optionalString;
|
||||
majorVersion = "8.2";
|
||||
minorVersion = "0";
|
||||
version = "${majorVersion}.${minorVersion}";
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "vtk-${os (qtLib != null) "qvtk-"}${version}";
|
||||
src = fetchurl {
|
||||
url = "${meta.homepage}files/release/${majorVersion}/VTK-${version}.tar.gz";
|
||||
sha256 = "1fspgp8k0myr6p2a6wkc21ldcswb4bvmb484m12mxgk1a9vxrhrl";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
buildInputs = [ libtiff ]
|
||||
++ optionals (qtLib != null) (with qtLib; [ qtbase qtx11extras qttools ])
|
||||
++ optional (qtLib != null) (with qtLib; [ qtbase qtx11extras qttools ])
|
||||
++ optionals stdenv.isLinux [ libGLU libGL libX11 xorgproto libXt ]
|
||||
++ optional enablePython [ python ]
|
||||
++ optional (mpi != null) [ mpi ];
|
||||
|
||||
preBuild = ''
|
||||
export LD_LIBRARY_PATH="$(pwd)/lib";
|
||||
'';
|
||||
|
||||
# Shared libraries don't work, because of rpath troubles with the current
|
||||
# nixpkgs cmake approach. It wants to call a binary at build time, just
|
||||
# built and requiring one of the shared objects.
|
||||
# At least, we use -fPIC for other packages to be able to use this in shared
|
||||
# objects.
|
||||
cmakeFlags = [
|
||||
"-DCMAKE_C_FLAGS=-fPIC"
|
||||
"-DCMAKE_CXX_FLAGS=-fPIC"
|
||||
"-DVTK_USE_SYSTEM_TIFF=1"
|
||||
"-DVTK_Group_MPI=ON"
|
||||
"-DBUILD_SHARED_LIBS=ON"
|
||||
"-DOPENGL_INCLUDE_DIR=${libGL}/include"
|
||||
]
|
||||
++ optional (mpi != null) [
|
||||
"-DVTK_Group_MPI=ON" ]
|
||||
++ optional (qtLib != null) [
|
||||
"-DVTK_Group_Qt:BOOL=ON" ]
|
||||
++ optional stdenv.isDarwin [
|
||||
"-DOPENGL_INCLUDE_DIR=${OpenGL}/Library/Frameworks" ]
|
||||
++ optional enablePython [
|
||||
"-DVTK_WRAP_PYTHON:BOOL=ON" ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = {
|
||||
description = "Open source libraries for 3D computer graphics, image processing and visualization";
|
||||
homepage = "https://www.vtk.org/";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
maintainers = with stdenv.lib.maintainers; [ knedlsepp ];
|
||||
platforms = with stdenv.lib.platforms; unix;
|
||||
};
|
||||
}
|
25
default.nix
25
default.nix
@ -15,10 +15,13 @@ let
|
||||
#mpi = intel-mpi;
|
||||
|
||||
# Load the default compiler
|
||||
#stdenv = pkgs.gcc7Stdenv;
|
||||
#stdenv = pkgs.gcc9Stdenv;
|
||||
#stdenv = pkgs.gcc10Stdenv;
|
||||
stdenv = pkgs.clangStdenv;
|
||||
#stdenv = pkgs.gcc9Stdenv;
|
||||
#stdenv = pkgs.gcc7Stdenv;
|
||||
stdenv = pkgs.llvmPackages_10.stdenv;
|
||||
#stdenv = pkgs.llvmPackages_9.stdenv;
|
||||
#stdenv = pkgs.llvmPackages_8.stdenv;
|
||||
#stdenv = pkgs.llvmPackages_7.stdenv;
|
||||
|
||||
binutils = pkgs.binutils;
|
||||
coreutils = pkgs.coreutils;
|
||||
@ -66,6 +69,11 @@ let
|
||||
extrae = extrae;
|
||||
};
|
||||
|
||||
vtk = callPackage ./bsc/vtk/default.nix {
|
||||
mpi = mpi;
|
||||
inherit (pkgs.xorg) libX11 xorgproto libXt;
|
||||
};
|
||||
|
||||
dummy = callPackage ./bsc/dummy/default.nix {
|
||||
};
|
||||
|
||||
@ -91,11 +99,20 @@ let
|
||||
# Apps for Garlic
|
||||
nbody = callPackage ./bsc/apps/nbody/default.nix {
|
||||
stdenv = pkgs.gcc9Stdenv;
|
||||
mpi = mpi;
|
||||
mpi = intel-mpi;
|
||||
tampi = tampi;
|
||||
nanos6 = nanos6-git;
|
||||
};
|
||||
|
||||
saiph = callPackage ./bsc/apps/saiph/default.nix {
|
||||
stdenv = stdenv-nanos6;
|
||||
mpi = intel-mpi;
|
||||
tampi = tampi;
|
||||
nanos6 = nanos6-git;
|
||||
inherit vtk;
|
||||
boost = pkgs.boost;
|
||||
};
|
||||
|
||||
# Patched nix for deep cluster
|
||||
inherit (callPackage ./bsc/nix/default.nix {
|
||||
storeDir = "/nix/store";
|
||||
|
Loading…
Reference in New Issue
Block a user