Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
argo
argopkgs
Commits
7e056d90
Commit
7e056d90
authored
Nov 12, 2018
by
Valentin Reis
Browse files
[Refactor] adding declarative channel.
parent
aa0c0d5a
Changes
1
Hide whitespace changes
Inline
Side-by-side
pkgs/default.nix
View file @
7e056d90
{
hostPkgs
?
import
<
nixpkgs
>
{},
pkgs
?
import
../pin.nix
{
inherit
hostPkgs
;
jsonpath
=
../nixpkgs-18.03.json
;
},
system
?
builtins
.
currentSystem
,
pkgs
?
import
../pin.nix
{
inherit
hostPkgs
;
jsonpath
=
../nixpkgs-18.03.json
;
depset
=
{
inherit
system
;};
},
kapack
?
import
../pin.nix
{
hostPkgs
=
pkgs
;
jsonpath
=
../kapack.json
;
depset
=
{
hostPkgs
=
pkgs
;};},
supportedSystems
?
[
"x86_64-linux"
"i686-linux"
]
}:
let
releaseTools
=
import
"
${
pkgs
}
/top-level/release-lib.nix"
{
inherit
supportedSystems
;
};
gitpin
=
f
:
pkgs
.
fetchgit
{
inherit
(
pkgs
.
lib
.
importJSON
f
)
url
sha256
rev
fetchSubmodules
;};
compiler_path
=
"/opt/intel/compilers_and_libraries_2017.1.132/linux"
;
callPackage
=
pkgs
.
lib
.
callPackageWith
pkgs
;
...
...
@@ -24,63 +30,73 @@ let
cpAlternatePin
=
folderPath
:
depset
:
jsonName
:
callPackagePinWith
{
inherit
folderPath
depset
jsonName
;};
cpBothAlternatePin
=
folderPath
:
depset
:
jsonName
:
callPackagePinWith
{
inherit
folderPath
depset
jsonName
;
nixName
=
jsonName
;};
pythonPackages
=
pkgs
.
python27Packages
;
in
rec
{
#NRM components
tools
=
rec
{
inherit
(
kapack
)
zymake
;
};
argopkgs
=
rec
{
#NRM components
tools
=
rec
{
inherit
(
kapack
)
zymake
;
};
nodelevel
=
rec
{
libnrm
=
cpDefaultPin
./libnrm
{};
libnrm-pmpi
=
libnrm
.
overrideAttrs
(
oldAttrs
:
rec
{
configureFlags
=
"--enable-pmpi"
;
buildInputs
=
oldAttrs
.
buildInputs
++
[
pkgs
.
mpich2
];
});
containers
=
cpDefaultPin
./containers
{
inherit
pythonPackages
;
};
containers-bandit
=
cpAlternatePin
./containers
{
inherit
pythonPackages
;
}
"bandit"
;
nrm
=
cpDefaultPin
./nrm
{
inherit
pythonPackages
;
nrm-containers
=
containers
;
};
nrm-bandit
=
cpAlternatePin
./nrm
{
inherit
pythonPackages
;
nrm-containers
=
containers-bandit
;
}
"bandit"
;
};
nodelevel
=
rec
{
libnrm
=
cpDefaultPin
./libnrm
{};
libnrm-pmpi
=
libnrm
.
overrideAttrs
(
oldAttrs
:
rec
{
configureFlags
=
"--enable-pmpi"
;
buildInputs
=
oldAttrs
.
buildInputs
++
[
pkgs
.
mpich2
];
});
containers
=
cpDefaultPin
./containers
{
inherit
pythonPackages
;
};
containers-bandit
=
cpAlternatePin
./containers
{
inherit
pythonPackages
;
}
"bandit"
;
nrm
=
cpDefaultPin
./nrm
{
inherit
pythonPackages
;
nrm-containers
=
containers
;
};
nrm-bandit
=
cpAlternatePin
./nrm
{
inherit
pythonPackages
;
nrm-containers
=
containers-bandit
;
}
"bandit"
;
};
#Instrumented applications
applications
=
let
paths
=
{
amg
=
applications/amg
;
qmcpack
=
applications/qmcpack
;
openmc
=
applications/openmc
;
stream
=
applications/stream
;
lammps
=
applications/lammps
;
#Instrumented applications
applications
=
let
paths
=
{
amg
=
applications/amg
;
qmcpack
=
applications/qmcpack
;
openmc
=
applications/openmc
;
stream
=
applications/stream
;
lammps
=
applications/lammps
;
};
rawApplication
=
name
:
path
:
cpDefaultPin
path
{};
instrumentedApplication
=
name
:
path
:
(
cpAlternatePin
path
{}
"nrm"
)
.
overrideAttrs
(
oldAttrs
:
{
buildInputs
=
oldAttrs
.
buildInputs
++
[
nodelevel
.
libnrm
];
cmakeFlags
=
if
(
name
==
"qmcpack"
)
then
(
oldAttrs
.
cmakeFlags
++
[
''-DQMC_INCLUDE=
${
nodelevel
.
libnrm
}
/include/''
''-DQMC_EXTRA_LIBS=
${
nodelevel
.
libnrm
}
/lib/libnrm.so''
])
else
[];
});
in
rec
{
raw
=
pkgs
.
lib
.
mapAttrs
rawApplication
paths
;
nrm
=
(
pkgs
.
lib
.
mapAttrs
instrumentedApplication
paths
)
//
{
dgemm_randomwalk
=
cpBothAlternatePin
applications/simple
{
inherit
intel
;
inherit
(
nodelevel
)
libnrm
;}
"dgemm_randomwalk"
;
graph500
=
cpBothAlternatePin
applications/simple
{
inherit
(
nodelevel
)
libnrm
;}
"graph500"
;
};
};
rawApplication
=
name
:
path
:
cpDefaultPin
path
{};
instrumentedApplication
=
name
:
path
:
(
cpAlternatePin
path
{}
"nrm"
)
.
overrideAttrs
(
oldAttrs
:
{
buildInputs
=
oldAttrs
.
buildInputs
++
[
nodelevel
.
libnrm
];
cmakeFlags
=
if
(
name
==
"qmcpack"
)
then
(
oldAttrs
.
cmakeFlags
++
[
''-DQMC_INCLUDE=
${
nodelevel
.
libnrm
}
/include/''
''-DQMC_EXTRA_LIBS=
${
nodelevel
.
libnrm
}
/lib/libnrm.so''
])
else
[];
#Intel compilers
intel
=
with
pkgs
;
rec
{
icc
=
callPackage
intel/icc
{
inherit
compiler_path
;
};
mkl
=
callPackage
intel/mkl
{
inherit
compiler_path
;
};
WrappedICC
=
(
import
intel/cc-wrapper
{
inherit
stdenv
binutils
coreutils
;
libc
=
glibc
;
nativeTools
=
false
;
nativeLibc
=
false
;
cc
=
icc
;
});
in
rec
{
raw
=
pkgs
.
lib
.
mapAttrs
rawApplication
paths
;
nrm
=
(
pkgs
.
lib
.
mapAttrs
instrumentedApplication
paths
)
//
{
dgemm_randomwalk
=
cpBothAlternatePin
applications/simple
{
inherit
intel
;
inherit
(
nodelevel
)
libnrm
;}
"dgemm_randomwalk"
;
graph500
=
cpBothAlternatePin
applications/simple
{
inherit
(
nodelevel
)
libnrm
;}
"graph500"
;
};
};
#Intel compilers
intel
=
with
pkgs
;
rec
{
icc
=
callPackage
intel/icc
{
inherit
compiler_path
;
};
mkl
=
callPackage
intel/mkl
{
inherit
compiler_path
;
};
WrappedICC
=
(
import
intel/cc-wrapper
{
inherit
stdenv
binutils
coreutils
;
libc
=
glibc
;
nativeTools
=
false
;
nativeLibc
=
false
;
cc
=
icc
;
});
argopkgs
=
pkgs
.
releaseTools
.
channel
{
name
=
"argopkgs"
;
src
=
./.
;
constituents
=
[
];
};
};
}
in
argopkgs
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment