Compare commits

...

2 Commits

Author SHA1 Message Date
chn
24f19b5068 devices.srv1: install broadwell vasp on node0 2024-09-24 11:49:16 +08:00
chn
a9722a6205 packages.vasp.intel: use openmpi 2024-09-24 11:44:17 +08:00
9 changed files with 35 additions and 55 deletions

View File

@ -31,6 +31,8 @@ inputs:
wireguardIp = "192.168.83.9";
};
};
packages.packages._prebuildPackages =
inputs.topInputs.self.nixosConfigurations.srv1-node1.pkgs.localPackages.vasp.intel;
};
services.nfs.server =
{

View File

@ -17,12 +17,8 @@ inputs:
nix.remote.slave.enable = true;
};
services.beesd.instances.root = { device = "/"; hashTableSizeMB = 256; threads = 4; };
packages.packages._packages = [(inputs.pkgs.runCommand "master-system" {}
''
mkdir -p $out/share
ln -s ${inputs.topInputs.self.nixosConfigurations.srv1-node0.config.system.build.toplevel} \
$out/share/master-system
'')];
packages.packages._prebuildPackages =
inputs.topInputs.self.nixosConfigurations.srv1-node0.config.system.build.toplevel;
};
specialisation =
{

View File

@ -14,12 +14,8 @@ inputs:
nix.remote.slave.enable = true;
};
services.beesd.instances.root = { device = "/"; hashTableSizeMB = 256; threads = 4; };
packages.packages._packages = [(inputs.pkgs.runCommand "master-system" {}
''
mkdir -p $out/share
ln -s ${inputs.topInputs.self.nixosConfigurations.srv1-node0.config.system.build.toplevel} \
$out/share/master-system
'')];
packages.packages._prebuildPackages =
inputs.topInputs.self.nixosConfigurations.srv1-node0.config.system.build.toplevel;
};
specialisation =
{

View File

@ -14,12 +14,8 @@ inputs:
nix.remote.slave.enable = true;
};
services.beesd.instances.root = { device = "/"; hashTableSizeMB = 256; threads = 4; };
packages.packages._packages = [(inputs.pkgs.runCommand "master-system" {}
''
mkdir -p $out/share
ln -s ${inputs.topInputs.self.nixosConfigurations.srv1-node0.config.system.build.toplevel} \
$out/share/master-system
'')];
packages.packages._prebuildPackages =
inputs.topInputs.self.nixosConfigurations.srv1-node0.config.system.build.toplevel;
};
specialisation =
{

View File

@ -970,11 +970,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1724925520,
"narHash": "sha256-MfvD4Ed4wCTG1V+h3rUN9j9csEi+2tgpRwhGAV4MFqw=",
"lastModified": 1727148179,
"narHash": "sha256-XITWIyKQ6owAcFn1Tq53By5kOYqLt/fhAw4y+rPTZfU=",
"owner": "CHN-beta",
"repo": "nixpkgs",
"rev": "8c66b7335f2f4ab354e41d828b74d851c64c4b85",
"rev": "4cc8c8166956210ccf8c731bb2aec3d95648180e",
"type": "github"
},
"original": {

View File

@ -8,19 +8,12 @@ inputs:
# TODO: add more options to correctly configure VASP
config = let inherit (inputs.config.nixos.packages) vasp; in inputs.lib.mkIf (vasp != null)
{
nixos.packages.packages._packages =
(with inputs.pkgs.localPackages.vasp;
[
(intel.override
{
integratedWithSlurm = inputs.config.nixos.services.slurm.enable;
slurm = inputs.config.services.slurm.package;
})
vtstscripts
])
++ (with inputs.pkgs.localPackages; [ py4vasp vaspkit ])
nixos.packages.packages._packages = with inputs.pkgs;
(
[ localPackages.vasp.intel localPackages.vasp.vtstscripts localPackages.py4vasp localPackages.vaspkit ]
++ (inputs.lib.optional
(let inherit (inputs.config.nixos.system.nixpkgs) cuda; in cuda.enable && cuda.capabilities != null)
inputs.pkgs.localPackages.vasp.nvidia);
localPackages.vasp.nvidia)
);
};
}

View File

@ -55,18 +55,21 @@ inputs: rec
{
inherit vtst src;
inherit (inputs.pkgs.intelPackages_2023) stdenv;
mpi = inputs.pkgs.intelPackages_2023.intel-mpi;
hdf5 = hdf5-oneapi;
mpi = inputs.pkgs.openmpi.override
{
inherit (inputs.pkgs.intelPackages_2023) stdenv;
enableSubstitute = false;
};
hdf5 = inputs.pkgs.hdf5.override
{
inherit (inputs.pkgs.intelPackages_2023) stdenv;
cppSupport = false;
fortranSupport = true;
enableShared = false;
enableStatic = true;
};
};
hdf5-nvhpc = inputs.pkgs.callPackage ./vasp/hdf5-nvhpc { inherit lmod nvhpc; inherit (inputs.pkgs.hdf5) src; };
hdf5-oneapi = inputs.pkgs.hdf5.override
{
inherit (inputs.pkgs.intelPackages_2023) stdenv;
cppSupport = false;
fortranSupport = true;
enableShared = false;
enableStatic = true;
};
vtst = (inputs.pkgs.callPackage ./vasp/vtst.nix {});
vtstscripts = inputs.pkgs.callPackage ./vasp/vtstscripts.nix {};
};

View File

@ -1,7 +1,6 @@
{
stdenv, src, writeShellScriptBin, lib,
rsync, which, wannier90, hdf5, vtst, mpi, mkl, libfabric,
integratedWithSlurm ? false, slurm
rsync, which, wannier90, hdf5, vtst, mpi, mkl
}:
let vasp = stdenv.mkDerivation
{
@ -35,17 +34,12 @@ let vasp = stdenv.mkDerivation
# vasp directly include headers under ${mkl}/include/fftw
MKLROOT = mkl;
# tell openmpi use ifx
OMPI_F90 = "ifx";
};
in writeShellScriptBin "vasp-intel"
''
# not sure why mpi could not find libfabric.so
export LD_LIBRARY_PATH=${libfabric}/lib''${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
# intel mpi need this to talk with slurm
${lib.optionalString integratedWithSlurm "export I_MPI_PMI_LIBRARY=${slurm}/lib/libpmi2.so"}
# add vasp and intel mpi in PATH
export PATH=${vasp}/bin:${mpi}/bin''${PATH:+:$PATH}
exec "$@"
''

View File

@ -12,8 +12,8 @@ CPP_OPTIONS = -DHOST=\"LinuxIFC\" \
CPP = fpp -f_com=no -free -w0 $*$(FUFFIX) $*$(SUFFIX) $(CPP_OPTIONS)
FC = mpiifx -qopenmp
FCL = mpiifx
FC = mpif90 -qopenmp
FCL = mpif90
FREE = -free -names lowercase