[OMPI users] how to identify openmpi in configure script

2007-06-05 Thread Lie-Quan Lee
I am a project written in C/C++ but used 3rd-party libraries written in Fortran. In the linking stage, I use mpic++ andl need to put -lmpi_f90 -lmpi_f77 into the link flags. I am wondering if anyone has already had a way to identify openmpi in configure script using autoconf macro. By identifying

Re: [OMPI users] how to identify openmpi in configure script

2007-06-05 Thread Lie-Quan Lee
Nuno On Tuesday 05 June 2007 13:59, Lie-Quan Lee wrote: > I am wondering if anyone has already had a way to identify openmpi in > configure script using autoconf macro. By identifying openmpi in the > configure, I will be able to handle those libraries. Thanks. --

Re: [OMPI users] how to identify openmpi in configure script

2007-06-05 Thread Lie-Quan Lee
AC_COMPILE_IFELSE( [ AC_LANG_PROGRAM( [ #include "mpi.h" ], [ #if defined( OPEN_MPI ) return 0; #else #error #endif ] ) ], [ mpi_is_openmpi=yes ], [ mpi_is_openmpi=no ] ) A.Chan On Tue, 5 Jun 2007, Lie-Quan Lee wrote: > I am a project written in C/C++ but u

Re: [OMPI users] how to identify openmpi in configure script

2007-06-05 Thread Lie-Quan Lee
Using the OPEN_MPI #define is probably the safest bet to identify the MPI as Open MPI, which then opens the door to using mpi -- showme to find the proper linker flags. I would *NOT* recommend hard- coding specific flags just because you know that you're linking against Open MPI (because we can/h

Re: [OMPI users] how to identify openmpi in configure script

2007-06-05 Thread Lie-Quan Lee
On Jun 5, 2007, at 6:46 PM, Jeff Squyres wrote: On Jun 5, 2007, at 4:51 PM, Lie-Quan Lee wrote: Using the OPEN_MPI #define is probably the safest bet to identify the MPI as Open MPI, which then opens the door to using mpi -- showme to find the proper linker flags. I would *NOT* recommend

Re: [OMPI users] how to identify openmpi in configure script

2007-06-06 Thread Lie-Quan Lee
library name (-lxlf90_r) is different, though. best regards, Rich Lee On Jun 6, 2007, at 4:16 AM, Jeff Squyres wrote: On Jun 5, 2007, at 11:17 PM, Lie-Quan Lee wrote: it is a quite of headache for each compiler/platform to deal with mixed language issues. I have to compile my