openmpi: fix patches for %nvhpc (#32308)
This commit is contained in:
		| @@ -1,75 +0,0 @@ | |||||||
| --- a/configure	2020-08-20 14:10:40.050641106 -0700 |  | ||||||
| +++ b/configure	2020-08-20 14:15:03.473674334 -0700 |  | ||||||
| @@ -38272,7 +38272,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 gfortran f95 fort xlf95 ifort ifc efc pgfortran pgf95 lf95 f90 xlf90 pgf90 epcf90 nagfor |  | ||||||
| +  for ac_prog in gfortran f95 fort xlf95 ifort ifc efc pgfortran nvfortran pgf95 lf95 f90 xlf90 pgf90 epcf90 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 |  | ||||||
| @@ -38316,7 +38316,7 @@ |  | ||||||
|  fi |  | ||||||
|  if test -z "$FC"; then |  | ||||||
|    ac_ct_FC=$FC |  | ||||||
| -  for ac_prog in gfortran f95 fort xlf95 ifort ifc efc pgfortran pgf95 lf95 f90 xlf90 pgf90 epcf90 nagfor |  | ||||||
| +  for ac_prog in gfortran f95 fort xlf95 ifort ifc efc pgfortran nvfortran pgf95 lf95 f90 xlf90 pgf90 epcf90 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 |  | ||||||
| @@ -384411,7 +384411,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,' |  | ||||||
| @@ -385050,11 +385050,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' ;; |  | ||||||
| @@ -391724,7 +391724,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,' |  | ||||||
| @@ -391766,7 +391766,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' |  | ||||||
| @@ -392348,11 +392348,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' ;; |  | ||||||
| @@ -1,77 +0,0 @@ | |||||||
| From b71206582131f88f6602a40e4c67e3d92b119229 Mon Sep 17 00:00:00 2001 |  | ||||||
| From: Tin Huynh <ahuynh@nvidia.com> |  | ||||||
| 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/config/libtool.m4 |  | ||||||
| +++ b/config/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 |  | ||||||
|  |  | ||||||
| @@ -390,9 +390,6 @@ class Openmpi(AutotoolsPackage, CudaPackage): | |||||||
|     patch("nag_pthread/2.0.0_2.1.1.patch", when="@2.0.0:2.1.1%nag") |     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%nag") |     patch("nag_pthread/1.10.4_1.10.999.patch", when="@1.10.4:1.10%nag") | ||||||
| 
 | 
 | ||||||
|     patch("nvhpc-libtool.patch", when="@main %nvhpc") |  | ||||||
|     patch("nvhpc-configure.patch", when="%nvhpc") |  | ||||||
| 
 |  | ||||||
|     # Fix MPI_Sizeof() in the "mpi" Fortran module for compilers that do not |     # Fix MPI_Sizeof() in the "mpi" Fortran module for compilers that do not | ||||||
|     # support "IGNORE TKR" functionality (e.g. NAG). |     # support "IGNORE TKR" functionality (e.g. NAG). | ||||||
|     # The issue has been resolved upstream in two steps: |     # The issue has been resolved upstream in two steps: | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Harmen Stoppels
					Harmen Stoppels