Accepting request 571222 from home:eeich:branches:science:HPC

- Use macro in mpivars.(c)sh to be independent of changes to the module
  setup for the compiler (boo#1078364).

OBS-URL: https://build.opensuse.org/request/show/571222
OBS-URL: https://build.opensuse.org/package/show/science:HPC/mvapich2?expand=0&rev=29
This commit is contained in:
Nicolas Morey-Chaisemartin
2018-01-31 08:08:34 +00:00
committed by Git OBS Bridge
parent 5d47c0a7fe
commit a5c81a712c
2 changed files with 12 additions and 2 deletions

View File

@@ -406,9 +406,13 @@ prepend-path MPI_DIR %{hpc_prefix}
family "MPI"
EOF
cat <<EOF > %{buildroot}/%{p_bindir}/mpivars.sh
module load %{hpc_compiler_family}/%{hpc_cf_full_version} %{hpc_mpi_family}%{?pack_suff}/%{version}
%hpc_setup_compiler
module load %{hpc_mpi_family}%{?pack_suff}/%{version}
EOF
ln -s mpivars.sh %{buildroot}/%{p_bindir}/mpivars.csh
sed -e "s/export/setenv/" -e "s/=/ /" \
%{buildroot}/%{mpi_bindir}/mpivars.sh > \
%{buildroot}/%{mpi_bindir}/mpivars.csh
mkdir -p %{buildroot}%{_sysconfdir}/rpm
%endif # with hpc