creams: use gitTable for all branches

This commit is contained in:
Rodrigo Arias 2021-04-19 13:17:24 +02:00
parent 53c098d921
commit 20e99f122f
4 changed files with 69 additions and 65 deletions

View File

@ -9,59 +9,49 @@
, gnuDef
, intelDef
, cc
, gitBranch
, gitBranch ? "garlic/mpi+send+seq"
, gitCommit ? null
, garlicTools
}:
assert (mpi == impi || mpi == openmpi);
let
mpiName = (if mpi == openmpi then
"OpenMPI"
else
"IntelMPI");
# FIXME: We should find a better way to specify the MPI implementation
# and the compiler.
mpiName = if mpi == openmpi then "OpenMPI" else "IntelMPI";
compName = if cc == intelDef then "Intel" else "GNU";
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@bscpm03.bsc.es/pmartin1/creams-simplified.git";
ref = "${gitBranch}";
gitSource = garlicTools.fetchGarlicApp {
appName = "creams";
inherit gitCommit gitBranch;
gitTable = import ./git-table.nix;
};
in
stdenv.mkDerivation rec {
name = "creams";
programPath = "/bin/creams.exe";
inherit (gitSource) src gitBranch gitCommit;
buildInputs = [
nanos6
mpi
cc
tampi
mcxx
];
programPath = "/bin/creams.exe";
hardeningDisable = [ "all" ];
buildInputs = [ nanos6 mpi cc tampi mcxx ];
configurePhase = ''
export TAMPI_HOME=${tampi}
hardeningDisable = [ "all" ];
. etc/bashrc
configurePhase = ''
export TAMPI_HOME=${tampi}
export FORTRAN_COMPILER=${compName}
export MPI_LIB=${mpiName}
. etc/bashrc
echo
export FORTRAN_COMPILER=${compName}
export MPI_LIB=${mpiName}
CREAMS_UPDATE_ENVIRONMENT
'';
CREAMS_UPDATE_ENVIRONMENT
'';
installPhase = ''
mkdir -p $out/bin
cp -a build/* $out/bin
'';
}
installPhase = ''
mkdir -p $out/bin
cp -a build/* $out/bin
'';
}

View File

@ -0,0 +1,12 @@
{
# Auto-generated with garlic-git-table on 2021-03-31 for repo:
# ssh://git@bscpm03.bsc.es/pmartin1/creams-simplified.git
"garlic/mpi+isend+omp+task" = "e6aa540820ee12d3d45d0eef8e7eeb2f0f1daea2";
"garlic/mpi+isend+oss+task" = "016f33b8bec996a4546e8f08b1b6b1709f00499b";
"garlic/mpi+send+omp+fork" = "e56e059264ad1bfe5e0c96a8b9303d21dd7fa20a";
"garlic/mpi+send+omp+task" = "919580213de34bc5b6ba60c768c5dde5e501a1f6";
"garlic/mpi+send+oss+task" = "adab8b66f27317d51445648302e7b133edf4837d";
"garlic/mpi+send+seq" = "956125f9334493d31ceee3fa7024efa65bee9ca5";
"garlic/tampi+isend+oss+task" = "14a121627679a251909d4b8103d260e27eac1d29";
}

View File

@ -2,30 +2,35 @@
stdenv
, granul ? 0
, nprocz ? 0
, gitBranch
, gitBranch ? "garlic/mpi+send+seq"
, gitCommit ? null
, garlicTools
}:
stdenv.mkDerivation rec {
name = "creams-input";
# src = /home/Computational/pmartin1/creams-simplified;
src = builtins.fetchGit {
url = "ssh://git@bscpm03.bsc.es/pmartin1/creams-simplified.git";
ref = "${gitBranch}";
let
gitSource = garlicTools.fetchGarlicApp {
appName = "creams";
inherit gitCommit gitBranch;
gitTable = import ./git-table.nix;
};
in
stdenv.mkDerivation rec {
name = "creams-input";
phases = [ "unpackPhase" "patchPhase" "installPhase" ];
inherit (gitSource) src gitBranch gitCommit;
patchPhase = ''
patchShebangs SodTubeBenchmark/gridScript.sh
'';
installPhase = ''
pushd SodTubeBenchmark
./gridScript.sh 0 0 ${toString nprocz} ${toString granul}
popd
phases = [ "unpackPhase" "patchPhase" "installPhase" ];
mkdir -p $out
cp -a SodTubeBenchmark $out/
'';
}
patchPhase = ''
patchShebangs SodTubeBenchmark/gridScript.sh
'';
installPhase = ''
pushd SodTubeBenchmark
./gridScript.sh 0 0 ${toString nprocz} ${toString granul}
popd
mkdir -p $out
cp -a SodTubeBenchmark $out/
'';
}

View File

@ -20,12 +20,9 @@
creams = callPackage ./creams/default.nix {
gnuDef = self.gfortran10 ; # Default GNU compiler version
intelDef = bsc.icc ; # Default Intel compiler version
gitBranch = "garlic/mpi+send+seq";
};
creamsInput = callPackage ./creams/input.nix {
gitBranch = "garlic/mpi+send+seq";
};
creamsInput = callPackage ./creams/input.nix { };
hpcg = callPackage ./hpcg/default.nix {
gitBranch = "garlic/tampi+isend+oss+task";