Skip to content

Commit

Permalink
VASP v6.5.0 for gh200 (#182)
Browse files Browse the repository at this point in the history
* vasp v6.5.0 for gh200
  • Loading branch information
AdhocMan authored Jan 24, 2025
1 parent 27f7723 commit 35f73ac
Show file tree
Hide file tree
Showing 14 changed files with 669 additions and 0 deletions.
7 changes: 7 additions & 0 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -325,3 +325,10 @@ uenvs:
todi: [gh200]
daint: [gh200]
develop: False
"v6.5.0":
recipes:
gh200: v6.5.0/gh200
deploy:
todi: [gh200]
daint: [gh200]
develop: False
9 changes: 9 additions & 0 deletions recipes/vasp/v6.5.0/gh200/compilers.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
bootstrap:
spec: [email protected]
gcc:
specs:
- [email protected]
llvm:
requires: [email protected]
specs:
- [email protected]
9 changes: 9 additions & 0 deletions recipes/vasp/v6.5.0/gh200/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: vasp
store: /user-environment
description: VASP
spack:
# VASP on Grace has numerical issues with the "-tp neoverse-v2" flag used by spack.
# This modified spack v0.21.0 uses "-tp host" instead.
repo: https://github.com/AdhocMan/spack.git
commit: e2727a73233d46e40d0657020a067947afcca640
modules: true
33 changes: 33 additions & 0 deletions recipes/vasp/v6.5.0/gh200/environments.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
vasp:
compiler:
- toolchain: gcc
spec: [email protected]
- toolchain: llvm
spec: [email protected]
unify: when_possible
mpi:
spec: [email protected]%nvhpc
gpu: cuda
specs:
- [email protected]%nvhpc cuda_arch=90 +cuda +openmp +inplace +collective +scalapack +avoidalloc +tbdyn +fock_dblbuf +ncclp2p ~profiling ~shmem ~shmem_bcast ~shmem_rproj ~sysv ~fftlib +hdf5 +wannier90 ~cusolvermp ~libxc
- [email protected]%nvhpc
- wannier90%nvhpc
- fftw%nvhpc +openmp
- nvpl-blas%nvhpc threads=openmp
- nvpl-lapack%nvhpc threads=openmp
- netlib-scalapack%nvhpc ~shared
- hdf5%nvhpc +fortran
- cmake
- ninja
views:
vasp:
link: roots
uenv:
add_compilers: true
develop:
link: roots
exclude: ['vasp']
uenv:
add_compilers: true
packages:
- perl
32 changes: 32 additions & 0 deletions recipes/vasp/v6.5.0/gh200/extra/reframe.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
run:
features:
- vasp
- cuda
- mpi
cc: mpicc
cxx: mpic++
ftn: mpifort
views:
- vasp
develop:
features:
- vasp-dev
- cuda
- mpi
cc: mpicc
cxx: mpic++
ftn: mpifort
views:
- develop
modules:
features:
- cuda
- mpi
- vasp-dev
cc: mpicc
cxx: mpic++
ftn: mpifort
views:
- modules
activation:
- module load cmake cray-mpich cuda fftw gcc hdf5 netlib-scalapack ninja nvhpc nvpl-blas nvpl-lapack wannier90
24 changes: 24 additions & 0 deletions recipes/vasp/v6.5.0/gh200/modules.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
modules:
# Paths to check when creating modules for all module sets
prefix_inspections:
bin:
- PATH
lib:
- LD_LIBRARY_PATH
lib64:
- LD_LIBRARY_PATH

default:
arch_folder: false
# Where to install modules
roots:
tcl: /user-environment/modules
tcl:
all:
autoload: none
hash_length: 0
exclude_implicits: true
include: ['[email protected]%[email protected]', 'nvhpc', '%nvhpc', 'cmake', 'ninja']
exclude: ['%gcc']
projections:
all: '{name}/{version}'
9 changes: 9 additions & 0 deletions recipes/vasp/v6.5.0/gh200/pre-install
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

vasp_version=6.5.0

vasp_file=vasp-${vasp_version}.tar.bz2

set -u

curl --retry 5 -u ${CSCS_REGISTRY_USERNAME}:${CSCS_REGISTRY_PASSWORD} -X GET https://jfrog.svc.cscs.ch/artifactory/uenv-sources/vasp/${vasp_file} -o {{ env.build }}/environments/${vasp_file}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
From 205a08a30ee0d057d173f9eaa6fc6414f6960c22 Mon Sep 17 00:00:00 2001
From: Xavier Andrade <[email protected]>
Date: Wed, 27 May 2020 15:42:32 -0700
Subject: [PATCH] Bugfix: avoid implicit pointer cast to make libxc compile
with a C++ compiler.

---
src/functionals.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/functionals.c b/src/functionals.c
index 3f668292..293f7f9b 100644
--- a/src/functionals.c
+++ b/src/functionals.c
@@ -324,7 +324,7 @@ xc_func_set_ext_params_name(xc_func_type *p, const char *name, double par)

assert(p != NULL && p->info->ext_params.n > 0);

- ext_params = libxc_malloc(p->info->ext_params.n*sizeof(double));
+ ext_params = (double *) libxc_malloc(p->info->ext_params.n*sizeof(double));
for(ii=0; ii<p->info->ext_params.n; ii++){
if(strcmp(p->info->ext_params.names[ii], name) == 0)
ext_params[ii] = par;
--
2.25.1

Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
From 11b90a0a477925f19dfeb7e1f672058f25d83387 Mon Sep 17 00:00:00 2001
From: Harmen Stoppels <[email protected]>
Date: Fri, 31 Jul 2020 13:54:39 +0200
Subject: [PATCH] Mark xc_erfcx a GPU_FUNCTION

---
src/faddeeva.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/src/faddeeva.c b/src/faddeeva.c
index ceec4736..03484713 100644
--- a/src/faddeeva.c
+++ b/src/faddeeva.c
@@ -29,6 +29,8 @@

#include "config.h"

+#include "util.h"
+
#include <math.h>

/* erfcx(x) = exp(x^2) erfc(x) function, for real x, written by
@@ -477,6 +479,7 @@ return 0.97771701335885035464e0 + (0.22000938572830479551e-1 + (0.27951610702682
return 1.0;
}

+GPU_FUNCTION
double xc_erfcx(double x)
{
if (x >= 0) {
--
2.25.1

Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
--- a/configure 2020-09-24 11:13:16.306629033 -0700
+++ b/configure 2020-09-24 11:14:16.412221646 -0700
@@ -8908,7 +8908,7 @@
lt_prog_compiler_pic='-fPIC'
lt_prog_compiler_static='-static'
;;
- pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
+ pgcc* | pgf77* | pgf90* | pgf95* | pgfortran* | nvc | nvfortran*)
# Portland Group compilers (*not* the Pentium gcc compiler,
# which looks to be a dead project)
lt_prog_compiler_wl='-Wl,'
@@ -9547,11 +9547,11 @@
tmp_addflag=' $pic_flag'
tmp_sharedflag='-shared'
case $cc_basename,$host_cpu in
- pgcc*) # Portland Group C compiler
+ pgcc* | nvc) # Portland Group C compiler
whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
tmp_addflag=' $pic_flag'
;;
- pgf77* | pgf90* | pgf95* | pgfortran*)
+ pgf77* | pgf90* | pgf95* | pgfortran* | nvfortran*)
# Portland Group f77 and f90 compilers
whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
tmp_addflag=' $pic_flag -Mnomain' ;;
@@ -13810,7 +13810,7 @@
ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_fc_compiler_gnu
if test -n "$ac_tool_prefix"; then
- for ac_prog in xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn nagfor
+ for ac_prog in xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 nvfortran lf95 ftn nagfor
do
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
@@ -13854,7 +13854,7 @@
fi
if test -z "$FC"; then
ac_ct_FC=$FC
- for ac_prog in xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn nagfor
+ for ac_prog in xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 nvfortran lf95 ftn nagfor
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
@@ -14545,7 +14545,7 @@
lt_prog_compiler_pic_FC='-fPIC'
lt_prog_compiler_static_FC='-static'
;;
- pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
+ pgcc* | pgf77* | pgf90* | pgf95* | pgfortran* | nvc | nvfortran*)
# Portland Group compilers (*not* the Pentium gcc compiler,
# which looks to be a dead project)
lt_prog_compiler_wl_FC='-Wl,'
@@ -14587,7 +14587,7 @@
lt_prog_compiler_pic_FC='-fPIC'
lt_prog_compiler_static_FC='-static'
;;
- *Portland\ Group*)
+ *Portland\ Group* | *NVIDIA\ Compilers* | *PGI\ Compilers*)
lt_prog_compiler_wl_FC='-Wl,'
lt_prog_compiler_pic_FC='-fpic'
lt_prog_compiler_static_FC='-Bstatic'
@@ -15169,11 +15169,11 @@
tmp_addflag=' $pic_flag'
tmp_sharedflag='-shared'
case $cc_basename,$host_cpu in
- pgcc*) # Portland Group C compiler
+ pgcc* | nvc) # Portland Group C compiler
whole_archive_flag_spec_FC='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
tmp_addflag=' $pic_flag'
;;
- pgf77* | pgf90* | pgf95* | pgfortran*)
+ pgf77* | pgf90* | pgf95* | pgfortran* | nvfortran*)
# Portland Group f77 and f90 compilers
whole_archive_flag_spec_FC='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
tmp_addflag=' $pic_flag -Mnomain' ;;
77 changes: 77 additions & 0 deletions recipes/vasp/v6.5.0/gh200/repo/packages/libxc/nvhpc-libtool.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
From b71206582131f88f6602a40e4c67e3d92b119229 Mon Sep 17 00:00:00 2001
From: Tin Huynh <[email protected]>
Date: Mon, 27 Jul 2020 15:15:47 -0700
Subject: [PATCH] Recognize new Nvidia compilers.

With the upcoming release of HPC-SDK, updating Libtool to recognize Nvidia
compilers (nvc, nvc++, nvfortran).
---
m4/libtool.m4 | 21 ++++++++++-----------
1 file changed, 10 insertions(+), 11 deletions(-)

diff --git a/m4/libtool.m4 b/m4/libtool.m4
index f2d1f39..4eac689 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -4402,8 +4402,8 @@ m4_if([$1], [CXX], [
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
;;
- pgCC* | pgcpp*)
- # Portland Group C++ compiler
+ pgCC* | pgcpp* | pgc\+\+* | nvc\+\+*)
+ # NVIDIA HPC C++ compiler
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
@@ -4739,9 +4739,8 @@ m4_if([$1], [CXX], [
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
;;
- pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
- # Portland Group compilers (*not* the Pentium gcc compiler,
- # which looks to be a dead project)
+ pgcc* | pgf77* | pgf90* | pgf95* | pgfortran* | nvc | nvfortran*)
+ # NVIDIA HPC Compilers
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
@@ -4781,7 +4780,7 @@ m4_if([$1], [CXX], [
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
;;
- *Portland\ Group*)
+ *Portland\ Group* | *NVIDIA\ Compilers* | *PGI\ Compilers*)
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
@@ -5209,12 +5208,12 @@ _LT_EOF
tmp_addflag=' $pic_flag'
tmp_sharedflag='-shared'
case $cc_basename,$host_cpu in
- pgcc*) # Portland Group C compiler
+ pgcc* | nvc) # NVIDIA HPC C++ Compiler
_LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
tmp_addflag=' $pic_flag'
;;
- pgf77* | pgf90* | pgf95* | pgfortran*)
- # Portland Group f77 and f90 compilers
+ pgf77* | pgf90* | pgf95* | pgfortran* | nvfortran*)
+ # NVIDIA HPC Fortran Compilers
_LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
tmp_addflag=' $pic_flag -Mnomain' ;;
ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
@@ -7004,8 +7003,8 @@ if test yes != "$_lt_caught_CXX_error"; then
_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
_LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
;;
- pgCC* | pgcpp*)
- # Portland Group C++ compiler
+ pgCC* | pgcpp* | pgc\+\+* | nvc\+\+*)
+ # NVIDIA HPC C++ compiler
case `$CC -V` in
*pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
_LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
--
2.7.4

Loading

0 comments on commit 35f73ac

Please sign in to comment.