[ofa-general] Proposed patches to MVAPICH and MVAPICH2 rpm spec files

Dhabaleswar Panda panda at cse.ohio-state.edu
Thu Jul 17 11:09:32 PDT 2008


Hi Mike,

Thanks for posting these patches. In future, please feel free to post
patches related to MVAPICH and MVAPICH2 to mvapich-discuss list (cc'ed in
this e-mail).

Pasha (cc'ed here) will take care of the changes to MVAPICH rpm spec file.

Jonathan (cc'ed here) will take care of the changes to MVAPICH2 rpm spec
file.

Thanks,

DK

On Thu, 17 Jul 2008, Mike Heinz wrote:

> I'm not sure who the best person is to receive these changes: We've been
> encountering complications whe converting users to OFED 1.3 because the
> scripts provided for configuring the shell (mpivars.sh and mpivars.csh)
> don't update the library path. This can lead to MPI programs failing to
> link or failing to run. The fix is to modify the spec files for the RPMs
> for these packages so that they set the LD_LIBRARY_PATH as well as the
> PATH.
>
> The fix for MVAPICH-1.0.1 is this:
>
> --- mvapich.spec.orig   2008-07-16 17:06:44.000000000 -0400
> +++ mvapich.spec        2008-07-16 16:49:27.000000000 -0400
> @@ -300,17 +300,25 @@
>  if ! echo \${PATH} | grep -q %{_prefix}/bin ; then
>          export PATH=%{_prefix}/bin:\${PATH}
>  fi
> +if ! echo \${LD_LIBRARY_PATH} | grep -q %{_prefix}/lib ; then
> +        export
> LD_LIBRARY_PATH=%{_prefix}/lib:%{_prefix}/lib:/shared:\${LD_LIBRARY_PATH
> }
> +fi
>  EOF
>
>  # Script for csh
>  cat <<EOF > %{build_root}/%{_prefix}/bin/%{shell_scripts_basename}.csh
> -if (?$path) then
> -    if ( "\${path}" !~ *%{_prefix}/bin* ) then
> -        setenv path %{_prefix}/bin:\$path
> +if ("\$path" !~ *%{_prefix}/bin) then
> +       set path=(%{_prefix}/bin \$path)
> +endif
> +
> +if ("1" == "\$?LD_LIBRARY_PATH") then
> +    if ("\$LD_LIBRARY_PATH" !~ *%{_prefix}/lib) then
> +        setenv LD_LIBRARY_PATH
> %{_prefix}/lib:%{_prefix}/lib/shared:\${LD_LIBRARY_PATH}
>      endif
>  else
> -    setenv path %{_prefix}/bin:
> +    setenv LD_LIBRARY_PATH %{_prefix}/lib:%{_prefix}/lib/shared
>  endif
> +
>  EOF
>
>
> and the fix for MVAPICH2-1.0.3 is this:
>
>
> --- ../mvapich2.spec.orig       2008-07-16 17:17:10.000000000 -0400
> +++ mvapich2.spec       2008-07-17 09:03:19.000000000 -0400
> @@ -261,12 +261,16 @@
>
>  # Additionally, create the mpivars.[c]sh files.
>  cat >bin/mpivars.csh <<EOF
> -if (\$?path) then
> -    if ( "\${path}" !~ *%{_prefix}/bin* ) then
> +if ("\$path" !~ *%{_prefix}/bin) then
>         set path = ( %{_prefix}/bin \$path )
>      endif
> +
> +if ("1" == "\$?LD_LIBRARY_PATH") then
> +    if ("\$LD_LIBRARY_PATH" !~ *%{_prefix}/lib) then
> +        setenv LD_LIBRARY_PATH %{_prefix}/lib:\${LD_LIBRARY_PATH}
> +    endif
>  else
> -    set path = ( %{_prefix}/bin )
> +    setenv LD_LIBRARY_PATH %{_prefix}/lib:%{_prefix}/lib/shared
>  endif
>
>  if (\$?MANPATH) then
> @@ -282,7 +286,9 @@
>  if ! echo \${PATH} | grep -q %{_prefix}/bin ; then
>      PATH=%{_prefix}/bin:\${PATH}
>  fi
> -
> +if ! echo \${LD_LIBRARY_PATH} | grep -q %{_prefix}/lib ; then
> +        export LD_LIBRARY_PATH=%{_prefix}/lib:\${LD_LIBRARY_PATH}
> +fi
>  if ! echo \${MANPATH} | grep -q %{_prefix}/man ; then
>      MANPATH=%{_prefix}/man:\${MANPATH}
>  fi
>
>
> --
> Michael Heinz
> Principal Engineer, Qlogic Corporation
> King of Prussia, Pennsylvania
>
>




More information about the general mailing list