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 , gnuDef
, intelDef , intelDef
, cc , cc
, gitBranch , gitBranch ? "garlic/mpi+send+seq"
, gitCommit ? null
, garlicTools
}: }:
assert (mpi == impi || mpi == openmpi); assert (mpi == impi || mpi == openmpi);
let let
mpiName = (if mpi == openmpi then # FIXME: We should find a better way to specify the MPI implementation
"OpenMPI" # and the compiler.
else mpiName = if mpi == openmpi then "OpenMPI" else "IntelMPI";
"IntelMPI"); compName = if cc == intelDef then "Intel" else "GNU";
compName = (if cc == intelDef then gitSource = garlicTools.fetchGarlicApp {
"Intel" appName = "creams";
else inherit gitCommit gitBranch;
"GNU"); gitTable = import ./git-table.nix;
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}";
}; };
in
stdenv.mkDerivation rec {
name = "creams";
programPath = "/bin/creams.exe"; inherit (gitSource) src gitBranch gitCommit;
buildInputs = [ programPath = "/bin/creams.exe";
nanos6
mpi
cc
tampi
mcxx
];
hardeningDisable = [ "all" ]; buildInputs = [ nanos6 mpi cc tampi mcxx ];
configurePhase = '' hardeningDisable = [ "all" ];
export TAMPI_HOME=${tampi}
. etc/bashrc configurePhase = ''
export TAMPI_HOME=${tampi}
export FORTRAN_COMPILER=${compName} . etc/bashrc
export MPI_LIB=${mpiName}
echo export FORTRAN_COMPILER=${compName}
export MPI_LIB=${mpiName}
CREAMS_UPDATE_ENVIRONMENT CREAMS_UPDATE_ENVIRONMENT
''; '';
installPhase = '' installPhase = ''
mkdir -p $out/bin mkdir -p $out/bin
cp -a build/* $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 stdenv
, granul ? 0 , granul ? 0
, nprocz ? 0 , nprocz ? 0
, gitBranch , gitBranch ? "garlic/mpi+send+seq"
, gitCommit ? null
, garlicTools
}: }:
stdenv.mkDerivation rec { let
name = "creams-input"; gitSource = garlicTools.fetchGarlicApp {
appName = "creams";
# src = /home/Computational/pmartin1/creams-simplified; inherit gitCommit gitBranch;
src = builtins.fetchGit { gitTable = import ./git-table.nix;
url = "ssh://git@bscpm03.bsc.es/pmartin1/creams-simplified.git";
ref = "${gitBranch}";
}; };
in
stdenv.mkDerivation rec {
name = "creams-input";
phases = [ "unpackPhase" "patchPhase" "installPhase" ]; inherit (gitSource) src gitBranch gitCommit;
patchPhase = '' phases = [ "unpackPhase" "patchPhase" "installPhase" ];
patchShebangs SodTubeBenchmark/gridScript.sh
'';
installPhase = '' patchPhase = ''
pushd SodTubeBenchmark patchShebangs SodTubeBenchmark/gridScript.sh
./gridScript.sh 0 0 ${toString nprocz} ${toString granul} '';
popd
mkdir -p $out installPhase = ''
cp -a SodTubeBenchmark $out/ 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 { creams = callPackage ./creams/default.nix {
gnuDef = self.gfortran10 ; # Default GNU compiler version gnuDef = self.gfortran10 ; # Default GNU compiler version
intelDef = bsc.icc ; # Default Intel compiler version intelDef = bsc.icc ; # Default Intel compiler version
gitBranch = "garlic/mpi+send+seq";
}; };
creamsInput = callPackage ./creams/input.nix { creamsInput = callPackage ./creams/input.nix { };
gitBranch = "garlic/mpi+send+seq";
};
hpcg = callPackage ./hpcg/default.nix { hpcg = callPackage ./hpcg/default.nix {
gitBranch = "garlic/tampi+isend+oss+task"; gitBranch = "garlic/tampi+isend+oss+task";