Update packages for NVIDIA HPC SDK 21.1 (#21975)
Co-authored-by: Scott McMillan <smcmillan@nvidia.com>
This commit is contained in:
parent
c188575cfe
commit
51ac05483d
38
var/spack/repos/builtin/packages/bison/nvhpc-3.7.patch
Normal file
38
var/spack/repos/builtin/packages/bison/nvhpc-3.7.patch
Normal file
@ -0,0 +1,38 @@
|
||||
--- a/lib/xalloc-oversized.h
|
||||
+++ b/lib/xalloc-oversized.h
|
||||
@@ -41,10 +41,10 @@
|
||||
positive and N must be nonnegative. This is a macro, not a
|
||||
function, so that it works correctly even when SIZE_MAX < N. */
|
||||
|
||||
-#if 7 <= __GNUC__ && !defined __clang__
|
||||
+#if 7 <= __GNUC__ && !defined __clang__ && !defined __NVCOMPILER
|
||||
# define xalloc_oversized(n, s) \
|
||||
__builtin_mul_overflow_p (n, s, (__xalloc_count_type) 1)
|
||||
-#elif 5 <= __GNUC__ && !defined __ICC && !__STRICT_ANSI__
|
||||
+#elif 5 <= __GNUC__ && !defined __ICC && !__STRICT_ANSI__ && !defined __NVCOMPILER
|
||||
# define xalloc_oversized(n, s) \
|
||||
(__builtin_constant_p (n) && __builtin_constant_p (s) \
|
||||
? __xalloc_oversized (n, s) \
|
||||
--- a/lib/intprops.h
|
||||
+++ b/lib/intprops.h
|
||||
@@ -226,9 +226,9 @@
|
||||
|
||||
/* True if __builtin_add_overflow (A, B, P) and __builtin_sub_overflow
|
||||
(A, B, P) work when P is non-null. */
|
||||
-#if 5 <= __GNUC__ && !defined __ICC
|
||||
+#if 5 <= __GNUC__ && !defined __ICC && !defined __NVCOMPILER
|
||||
# define _GL_HAS_BUILTIN_ADD_OVERFLOW 1
|
||||
-#elif defined __has_builtin
|
||||
+#elif defined __has_builtin && !defined __NVCOMPILER
|
||||
# define _GL_HAS_BUILTIN_ADD_OVERFLOW __has_builtin (__builtin_add_overflow)
|
||||
#else
|
||||
# define _GL_HAS_BUILTIN_ADD_OVERFLOW 0
|
||||
@@ -249,7 +249,7 @@
|
||||
presumably run afoul of Clang bug 16404. */
|
||||
# define _GL_HAS_BUILTIN_OVERFLOW_P 0
|
||||
#else
|
||||
-# define _GL_HAS_BUILTIN_OVERFLOW_P (7 <= __GNUC__)
|
||||
+# define _GL_HAS_BUILTIN_OVERFLOW_P (7 <= __GNUC__ && !defined __NVCOMPILER)
|
||||
#endif
|
||||
|
||||
/* The _GL*_OVERFLOW macros have the same restrictions as the
|
@ -51,7 +51,10 @@ class Bison(AutotoolsPackage, GNUMirrorPackage):
|
||||
depends_on('help2man', type='build')
|
||||
|
||||
patch('pgi.patch', when='@3.0.4')
|
||||
patch('nvhpc.patch', when='%nvhpc')
|
||||
# The NVIDIA compilers do not currently support some GNU builtins.
|
||||
# Detect this case and use the fallback path.
|
||||
patch('nvhpc-3.6.patch', when='@3.6.0:3.6.99 %nvhpc')
|
||||
patch('nvhpc-3.7.patch', when='@3.7.0:3.7.99 %nvhpc')
|
||||
|
||||
conflicts('%intel@:14', when='@3.4.2:',
|
||||
msg="Intel 14 has immature C11 support")
|
||||
|
@ -52,7 +52,7 @@ def patch(self):
|
||||
)
|
||||
|
||||
# The Makefiles use GCC flags that are incompatible with PGI
|
||||
if self.spec.satisfies('%pgi') or self.spec.satisfies('%nvhpc'):
|
||||
if self.spec.satisfies('%pgi') or self.spec.satisfies('%nvhpc@:20.11'):
|
||||
filter_file('-Wall -Winline', '-Minform=inform', 'Makefile')
|
||||
filter_file('-Wall -Winline', '-Minform=inform',
|
||||
'Makefile-libbz2_so')
|
||||
|
@ -61,7 +61,7 @@ def build_targets(self):
|
||||
targets = []
|
||||
cc = self.spec['mpi'].mpicc
|
||||
cflags = '-O3'
|
||||
if not self.spec.satisfies('%nvhpc'):
|
||||
if not self.spec.satisfies('%nvhpc@:20.11'):
|
||||
cflags = '-O3 -std=c99'
|
||||
oshmem_cc = 'cc'
|
||||
oshmem_c_flags = '-O3 -g'
|
||||
|
@ -237,7 +237,10 @@ def cmake_args(self):
|
||||
options.append('-DGMX_SIMD=AVX_128_FMA')
|
||||
elif 'vsx' in target:
|
||||
# IBM Power 7 and beyond
|
||||
options.append('-DGMX_SIMD=IBM_VSX')
|
||||
if self.spec.satisfies('%nvhpc'):
|
||||
options.append('-DGMX_SIMD=None')
|
||||
else:
|
||||
options.append('-DGMX_SIMD=IBM_VSX')
|
||||
elif target.family == 'aarch64':
|
||||
# ARMv8
|
||||
if self.spec.satisfies('%nvhpc'):
|
||||
|
@ -34,7 +34,7 @@ class Libpciaccess(AutotoolsPackage, XorgPackage):
|
||||
def configure_args(self):
|
||||
config_args = []
|
||||
|
||||
if (self.spec.satisfies('%nvhpc') and
|
||||
if (self.spec.satisfies('%nvhpc@:20.11') and
|
||||
(self.spec.target.family == 'aarch64' or
|
||||
self.spec.target.family == 'ppc64le')):
|
||||
config_args.append('--disable-strict-compilation')
|
||||
|
@ -26,6 +26,6 @@ class Libtiff(AutotoolsPackage):
|
||||
|
||||
def patch(self):
|
||||
# Remove flags not recognized by the NVIDIA compiler
|
||||
if self.spec.satisfies('%nvhpc'):
|
||||
if self.spec.satisfies('%nvhpc@:20.11'):
|
||||
filter_file('vl_cv_prog_cc_warnings="-Wall -W"',
|
||||
'vl_cv_prog_cc_warnings="-Wall"', 'configure')
|
||||
|
@ -55,7 +55,7 @@ def _make_executable(self, name):
|
||||
|
||||
def patch(self):
|
||||
# Remove flags not recognized by the NVIDIA compiler
|
||||
if self.spec.satisfies('%nvhpc'):
|
||||
if self.spec.satisfies('%nvhpc@:20.11'):
|
||||
filter_file('-fno-builtin', '-Mnobuiltin', 'configure')
|
||||
filter_file('-fno-builtin', '-Mnobuiltin', 'libltdl/configure')
|
||||
|
||||
|
@ -33,7 +33,7 @@ def configure_args(self):
|
||||
config_args = []
|
||||
|
||||
# -Werror flags are not properly interpreted by the NVIDIA compiler
|
||||
if self.spec.satisfies('%nvhpc'):
|
||||
if self.spec.satisfies('%nvhpc@:20.11'):
|
||||
config_args.append('--disable-selective-werror')
|
||||
|
||||
return config_args
|
||||
|
@ -53,7 +53,7 @@ def configure_args(self):
|
||||
config_args = []
|
||||
|
||||
# -Werror flags are not properly interpreted by the NVIDIA compiler
|
||||
if self.spec.satisfies('%nvhpc'):
|
||||
if self.spec.satisfies('%nvhpc@:20.11'):
|
||||
config_args.append('--disable-selective-werror')
|
||||
|
||||
return config_args
|
||||
|
@ -51,7 +51,7 @@ def install(self, spec, prefix):
|
||||
|
||||
def patch(self):
|
||||
# Remove flags not recognized by the NVIDIA compiler
|
||||
if self.spec.satisfies('%nvhpc'):
|
||||
if self.spec.satisfies('%nvhpc@:20.11'):
|
||||
filter_file('-fvisibility=hidden', '', 'Makefile')
|
||||
filter_file('-fvisibility=hidden', '', 'lib/Makefile')
|
||||
filter_file('-pedantic', '', 'Makefile')
|
||||
|
@ -49,7 +49,7 @@ def configure_args(self):
|
||||
return args
|
||||
|
||||
def patch(self):
|
||||
if self.spec.satisfies('%nvhpc'):
|
||||
if self.spec.satisfies('%nvhpc@:20.11'):
|
||||
# workaround anonymous version tag linker error for the NVIDIA
|
||||
# compilers
|
||||
filter_file('${wl}-version-script '
|
||||
|
@ -29,7 +29,7 @@ class Nasm(AutotoolsPackage):
|
||||
|
||||
def patch(self):
|
||||
# Remove flags not recognized by the NVIDIA compiler
|
||||
if self.spec.satisfies('%nvhpc'):
|
||||
if self.spec.satisfies('%nvhpc@:20.11'):
|
||||
filter_file(r'CFLAGS="\$pa_add_cflags__old_cflags -Werror=.*"',
|
||||
'CFLAGS="$pa_add_cflags__old_cflags"', 'configure')
|
||||
filter_file(r'CFLAGS="\$pa_add_flags__old_flags -Werror=.*"',
|
||||
|
@ -173,7 +173,7 @@ class Openmpi(AutotoolsPackage):
|
||||
patch('nag_pthread/2.0.0_2.1.1.patch', when='@2.0.0:2.1.1%nag')
|
||||
patch('nag_pthread/1.10.4_1.10.999.patch', when='@1.10.4:1.10.999%nag')
|
||||
|
||||
patch('nvhpc-libtool.patch', when='%nvhpc@develop')
|
||||
patch('nvhpc-libtool.patch', when='@develop %nvhpc')
|
||||
patch('nvhpc-configure.patch', when='%nvhpc')
|
||||
|
||||
# Fix MPI_Sizeof() in the "mpi" Fortran module for compilers that do not
|
||||
@ -756,7 +756,7 @@ def configure_args(self):
|
||||
else:
|
||||
config_args.append('--without-cuda')
|
||||
|
||||
if spec.satisfies('%nvhpc'):
|
||||
if spec.satisfies('%nvhpc@:20.11'):
|
||||
# Workaround compiler issues
|
||||
config_args.append('CFLAGS=-O1')
|
||||
|
||||
|
@ -114,7 +114,7 @@ def install(self, spec, prefix):
|
||||
if spec.satisfies('@1.0'):
|
||||
options.append('no-krb5')
|
||||
# clang does not support the .arch directive in assembly files.
|
||||
if 'clang' in self.compiler.cc and \
|
||||
if ('clang' in self.compiler.cc or 'nvc' in self.compiler.cc) and \
|
||||
'aarch64' in spack.architecture.sys_type():
|
||||
options.append('no-asm')
|
||||
|
||||
|
42
var/spack/repos/builtin/packages/perl/nvhpc-5.32.patch
Normal file
42
var/spack/repos/builtin/packages/perl/nvhpc-5.32.patch
Normal file
@ -0,0 +1,42 @@
|
||||
--- a/Configure 2021-01-19 09:35:25.337234880 -0800
|
||||
+++ b/Configure 2021-01-19 09:36:43.001275967 -0800
|
||||
@@ -4979,7 +4979,7 @@
|
||||
# and usrinc directly from the compiler.
|
||||
# Note that ccname for clang is also gcc.
|
||||
case "$ccname" in
|
||||
- gcc)
|
||||
+ XXX)
|
||||
$echo 'extern int foo;' > try.c
|
||||
set X `$cppstdin -v try.c 2>&1 | $awk '/^#include </,/^End of search /'|$cppfilter $grep '/include'`
|
||||
shift
|
||||
--- a/Makefile.SH 2021-01-28 15:18:51.559057410 -0800
|
||||
+++ b/Makefile.SH 2021-01-28 15:20:01.552036603 -0800
|
||||
@@ -1143,7 +1143,7 @@
|
||||
# But also this ensures that all extensions are built before we try to scan
|
||||
# them, which picks up Devel::PPPort's documentation.
|
||||
pod/perltoc.pod: $(perltoc_pod_prereqs) $(PERL_EXE) $(ext) pod/buildtoc
|
||||
- $(RUN_PERL) -f pod/buildtoc -q
|
||||
+ $(MINIPERL) -f pod/buildtoc -q
|
||||
|
||||
pod/perlapi.pod: pod/perlintern.pod
|
||||
|
||||
@@ -1200,8 +1200,8 @@
|
||||
$spitshell >>$Makefile <<EOT
|
||||
|
||||
install_$name install-$name: \$(INSTALL_DEPENDENCE) installperl all installman
|
||||
- \$(RUN_PERL) installperl --destdir=\$(DESTDIR) $flags \$(INSTALLFLAGS) \$(STRIPFLAGS)
|
||||
- \$(RUN_PERL) installman --destdir=\$(DESTDIR) $flags
|
||||
+ \$(MINIPERL) installperl --destdir=\$(DESTDIR) $flags \$(INSTALLFLAGS) \$(STRIPFLAGS)
|
||||
+ \$(MINIPERL) installman --destdir=\$(DESTDIR) $flags
|
||||
EOT
|
||||
fi
|
||||
|
||||
@@ -1219,7 +1219,7 @@
|
||||
LOCAL_PERL='$(RUN_PERL)'
|
||||
$spitshell >>$Makefile <<'!NO!SUBS!'
|
||||
install.perl: $(INSTALL_DEPENDENCE) installperl
|
||||
- $(RUN_PERL) installperl --destdir=$(DESTDIR) $(INSTALLFLAGS) $(STRIPFLAGS)
|
||||
+ $(MINIPERL) installperl --destdir=$(DESTDIR) $(INSTALLFLAGS) $(STRIPFLAGS)
|
||||
-@test ! -s extras.lst || PATH="`pwd`:\${PATH}" PERL5LIB="`pwd`/lib" \$(RUN_PERL) -Ilib -MCPAN -e '@ARGV&&install(@ARGV)' `cat extras.lst`
|
||||
|
||||
!NO!SUBS!
|
@ -78,8 +78,11 @@ class Perl(Package): # Perl doesn't use Autotools, it should subclass Package
|
||||
patch('macos-11-version-check.patch', when='@5.24.1:5.32.0 platform=darwin')
|
||||
|
||||
# Enable builds with the NVIDIA compiler
|
||||
# The Configure script assumes some gcc specific behavior, and use
|
||||
# the mini Perl environment to bootstrap installation.
|
||||
patch('nvhpc-5.30.patch', when='@5.30.0:5.30.99 %nvhpc')
|
||||
conflicts('@5.32.0:', when='%nvhpc',
|
||||
patch('nvhpc-5.32.patch', when='@5.32.0:5.32.99 %nvhpc')
|
||||
conflicts('@5.32.0:', when='%nvhpc@:20.11',
|
||||
msg='The NVIDIA compilers are incompatible with version 5.32 and later')
|
||||
|
||||
# Installing cpanm alongside the core makes it safe and simple for
|
||||
|
@ -18,6 +18,6 @@ class Popt(AutotoolsPackage):
|
||||
|
||||
def patch(self):
|
||||
# Remove flags not recognized by the NVIDIA compilers
|
||||
if self.spec.satisfies('%nvhpc'):
|
||||
if self.spec.satisfies('%nvhpc@:20.11'):
|
||||
filter_file('CFLAGS="$CFLAGS -Wall -W"',
|
||||
'CFLAGS="$CFLAGS -Wall"', 'configure', string=True)
|
||||
|
@ -41,7 +41,7 @@ def build_targets(self):
|
||||
targets = []
|
||||
cflags = ''
|
||||
|
||||
if not self.spec.satisfies('%nvhpc'):
|
||||
if not self.spec.satisfies('%nvhpc@:20.11'):
|
||||
cflags = '-std=gnu99'
|
||||
|
||||
if '+mpi' in self.spec:
|
||||
|
@ -32,7 +32,8 @@ def build_targets(self):
|
||||
targets = []
|
||||
|
||||
if '%nvhpc' in self.spec:
|
||||
targets.append('CFLAGS=-O1')
|
||||
if self.spec.satisfies('%nvhpc@:20.11'):
|
||||
targets.append('CFLAGS=-O1')
|
||||
|
||||
if 'avx512' in self.spec.target:
|
||||
# Workaround AVX512 compiler issue
|
||||
|
Loading…
Reference in New Issue
Block a user