Re: [opensuse-packaging] How to set mpi as dependency?
This is how hdf5 did export CC="%{_libdir}/mpi/gcc/$mpi/bin/mpicc" export FC="%{_libdir}/mpi/gcc/$mpi/bin/mpif90" export F77="%{_libdir}/mpi/gcc/$mpi/bin/mpif77" export LD_LIBRARY_PATH="%{_libdir}/mpi/gcc/$mpi/%_lib" Make some assumptions and do an environment export seems the only way until now. 2014-03-21 9:47 GMT-05:00 Pengfei Hao <intijk@gmail.com>:
This is how hdf5 did
export CC="%{_libdir}/mpi/gcc/$mpi/bin/mpicc" export FC="%{_libdir}/mpi/gcc/$mpi/bin/mpif90" export F77="%{_libdir}/mpi/gcc/$mpi/bin/mpif77" export LD_LIBRARY_PATH="%{_libdir}/mpi/gcc/$mpi/%_lib"
Make some assumptions and do an environment export seems the only way until now.
2014-03-20 9:58 GMT-05:00 Alin Marin Elena <alinm.elena@gmail.com>:
have a loot at the usage of mpi-selector... intalling openmpi or mpich will not automatically set you the correct mpi.. as you expected... by the way mpirun shall not be of any concern in the compile/link process.
regards, Alin
On Thu 20 Mar 2014 15:51:29 Ruediger Meier wrote:
On Thursday 20 March 2014, Pengfei Hao wrote:
Maybe I didn't make it clear. What I want is to have mpicc and mpirun command to compile MPI written code, it is kind like a compiler(But only script point to gcc). Even added the BuildRequires of openmpi and openmpi-devel , the mpicc and mpirun command is not ready.
Thats why I've mentioned to look into the hdf5 package. Of course they do something with the %_mpi define from my first email:
for mpi in %_mpi; do mkdir $mpi ln -s ../configure $mpi cd $mpi export CC="%{_libdir}/mpi/gcc/$mpi/bin/mpicc" export FC="%{_libdir}/mpi/gcc/$mpi/bin/mpif90" export F77="%{_libdir}/mpi/gcc/$mpi/bin/mpif77" export LD_LIBRARY_PATH="%{_libdir}/mpi/gcc/$mpi/%_lib" %configure \ --docdir=%{_docdir}/%{name} \ --prefix=%{_libdir}/mpi/gcc/$mpi \ --exec-prefix=%{_libdir}/mpi/gcc/$mpi \ --bindir=%{_libdir}/mpi/gcc/$mpi/bin \ --libdir=%{_libdir}/mpi/gcc/$mpi/%_lib \ --datadir=%{_libdir}/mpi/gcc/$mpi/share \ --includedir=%{_libdir}/mpi/gcc/$mpi/include \ --disable-dependency-tracking \ %if 0%{?suse_version} > 1140 --enable-fortran \ %endif --enable-hl \ --enable-shared \ --enable-parallel \ --with-pthread
make %{?_smp_mflags} cd .. done
But better look at the original hdf5.spec.
cu, Rudi
-- Without Questions there are no Answers! ______________________________________________________________________ Dr. Alin Marin ELENA http://alin.elenaworld.net/ ______________________________________________________________________
-- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
-- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
* Pengfei Hao (intijk@gmail.com) [20140321 15:50]:
export CC="%{_libdir}/mpi/gcc/$mpi/bin/mpicc" export FC="%{_libdir}/mpi/gcc/$mpi/bin/mpif90" export F77="%{_libdir}/mpi/gcc/$mpi/bin/mpif77" export LD_LIBRARY_PATH="%{_libdir}/mpi/gcc/$mpi/%_lib"
Make some assumptions and do an environment export seems the only way until now.
WRONG! Look at how mpi-selector does its work. Set the MPI implementation you'd like to use and then I'd try sourcing /etc/profile.d/mpi-selector.sh like it would be done for a login shell. That should set all variables as needed, maybe will need to export them. hth Philipp -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
participants (2)
-
Pengfei Hao
-
Philipp Thomas