nbody: add gitTable
This commit is contained in:
parent
1402111e40
commit
a359cc9d32
@ -7,9 +7,7 @@
|
|||||||
}:
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
nbody = callPackage ./nbody/default.nix {
|
nbody = callPackage ./nbody/default.nix { };
|
||||||
gitBranch = "garlic/seq";
|
|
||||||
};
|
|
||||||
|
|
||||||
saiph = callPackage ./saiph/default.nix {
|
saiph = callPackage ./saiph/default.nix {
|
||||||
cc = bsc.clangOmpss2;
|
cc = bsc.clangOmpss2;
|
||||||
|
@ -5,48 +5,53 @@
|
|||||||
, tampi ? null
|
, tampi ? null
|
||||||
, mcxx ? null
|
, mcxx ? null
|
||||||
, cflags ? null
|
, cflags ? null
|
||||||
, gitBranch
|
, gitBranch ? "garlic/seq"
|
||||||
, gitURL ? "ssh://git@bscpm03.bsc.es/garlic/apps/nbody.git"
|
, gitCommit ? null
|
||||||
, blocksize ? 2048
|
, blocksize ? 2048
|
||||||
|
, garlicTools
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert !(tampi != null && mcxx == null);
|
assert !(tampi != null && mcxx == null);
|
||||||
|
|
||||||
with stdenv.lib;
|
with stdenv.lib;
|
||||||
stdenv.mkDerivation rec {
|
|
||||||
name = "nbody";
|
|
||||||
|
|
||||||
#src = ~/nbody;
|
let
|
||||||
|
gitSource = garlicTools.fetchGarlicApp {
|
||||||
src = builtins.fetchGit {
|
appName = "nbody";
|
||||||
url = "${gitURL}";
|
inherit gitCommit gitBranch;
|
||||||
ref = "${gitBranch}";
|
gitTable = import ./git-table.nix;
|
||||||
};
|
};
|
||||||
programPath = "/bin/nbody";
|
in
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
name = "nbody";
|
||||||
|
|
||||||
buildInputs = [
|
inherit (gitSource) src gitBranch gitCommit;
|
||||||
cc
|
|
||||||
]
|
|
||||||
++ optional (mpi != null) mpi
|
|
||||||
++ optional (tampi != null) tampi
|
|
||||||
++ optional (mcxx != null) mcxx;
|
|
||||||
|
|
||||||
preBuild = (if cflags != null then ''
|
programPath = "/bin/nbody";
|
||||||
makeFlagsArray+=(CFLAGS="${cflags}")
|
|
||||||
'' else "");
|
|
||||||
|
|
||||||
makeFlags = [
|
buildInputs = [
|
||||||
"CC=${cc.CC}"
|
cc
|
||||||
"BS=${toString blocksize}"
|
]
|
||||||
]
|
++ optional (mpi != null) mpi
|
||||||
++ optional (tampi != null) "TAMPI_HOME=${tampi}";
|
++ optional (tampi != null) tampi
|
||||||
|
++ optional (mcxx != null) mcxx;
|
||||||
|
|
||||||
dontPatchShebangs = true;
|
preBuild = (if cflags != null then ''
|
||||||
|
makeFlagsArray+=(CFLAGS="${cflags}")
|
||||||
|
'' else "");
|
||||||
|
|
||||||
installPhase = ''
|
makeFlags = [
|
||||||
echo ${tampi}
|
"CC=${cc.CC}"
|
||||||
mkdir -p $out/bin
|
"BS=${toString blocksize}"
|
||||||
cp nbody* $out/bin/${name}
|
]
|
||||||
'';
|
++ optional (tampi != null) "TAMPI_HOME=${tampi}";
|
||||||
|
|
||||||
}
|
dontPatchShebangs = true;
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
echo ${tampi}
|
||||||
|
mkdir -p $out/bin
|
||||||
|
cp nbody* $out/bin/${name}
|
||||||
|
'';
|
||||||
|
|
||||||
|
}
|
||||||
|
13
garlic/apps/nbody/git-table.nix
Normal file
13
garlic/apps/nbody/git-table.nix
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
# Auto-generated with garlic-git-table on 2021-04-20 for repo:
|
||||||
|
# ssh://git@bscpm03.bsc.es/garlic/apps/nbody.git
|
||||||
|
|
||||||
|
"garlic/mpi+send+oss+task" = "20aa856baa3268d99262588807911ad0b3318d09";
|
||||||
|
"garlic/mpi+send+seq" = "3be64af0f949db5fd60fcd0334cf2cd8c9fa25c3";
|
||||||
|
"garlic/omp+fork" = "9c869272df7c775f467a2220211a414e33321c00";
|
||||||
|
"garlic/oss+task" = "13ab26fbad8662a1052cc94410386080bbf6a2ba";
|
||||||
|
"garlic/seq" = "9dfea29189d14477bd75e6f741f0518e7e4e5e72";
|
||||||
|
"garlic/seq+BLOCK" = "99408705628b374df4308dcf1cdbe2d21d1451c2";
|
||||||
|
"garlic/tampi+isend+oss+task" = "653d26e4a0913d36ea18d4e72e65a04838bb138a";
|
||||||
|
"garlic/tampi+send+oss+task" = "b1440ebc5f79165e5dfaa6a4ce7916eda410ec9a";
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user