Re: [OMPI users] Configure fail: OpenMPI/1.5.3 with Support for LSF using Sun Studio compilers

2011-04-08 Thread Terry Dontje
Paul and I have been talking about the below issue and I thought it 
would be useful to update the list just in case someone else runs into 
this problem and ends up searching the email list before we actually fix 
the issue.


The problem is OMPI's configure tests to see if -lm is needed to get 
math library functions (eg ceil, sqrt...).  In the case that one is 
using the Solaris Studio compilers (from Oracle) and one passes in the 
-fast option via CFLAGS the -lm test in configure will turn out false 
because -fast set the -xlibmopt flag which provides inline versions of 
some of the math library function.  Because of that OMPI decides it 
doesn't need to set -lm for linking.


The above is problematic when configuring with -with-lsf because the lsf 
library libbat.so has a symbol of ceil that needs to be resolved (so it 
needs -lm in the case of Studio compilers).  Without the -lm the 
configure check for lsf fails.


There are several work arounds:

1.  Put LIBS="-lm" on the configure line.  The compiler still will 
inline the math function compiled in OMPI but linking of the ompi libs 
with lsf libs will work because of the -lm.


2.  In the CFLAGS add -xnolibmopt in addition to -fast.  This will turn 
off the inlining and cause OMPI's configure script to insert -lm.


3.  Don't use -fast.

--td
On 04/07/2011 08:36 AM, Paul Kapinos wrote:

Hi Terry,


so, the attached ceil.c example file *can* be compiled by "CC" (the 
Studio C++ compiler), but *cannot* be compiled using "cc" (the 
Studio C compiler).

$ CC ceil.c
$ cc ceil.c

Did you try to link in the math library -lm?  When I did this your 
test program worked for me and that actually is the first test that 
the configure does.


5. Looking into configure.log and searching on `ceil' results: there 
was a check for the availability of `ceil' for the C compiler (see 
config.log.ceil). This check says `ceil' is *available* for the "cc" 
Compiler, which is *wrong*, cf. (4).

See above, it actually is right when you link in the math lib.


Thankt for the tipp! Yes, if using -lm so the Studio C compiler "cc" 
works also fine for ceil.c:


$ cc ceil.c -lm



So, is there an error in the configure stage? Or either the checks 
in config.log.ceil does not rely on the avilability of the `ceil' 
funcion in the C compiler?
It looks to me like the lbat configure test is not linking in the 
math lib. 


Yes, the is no -lm in configure:84213 line.

Note the cheks for ceil again, config.log.ceil. As far as I unterstood 
these logs, the checks for ceil and for the need of -lm deliver wrong 
results:



configure:55000: checking if we need -lm for ceil

configure:55104: result: no

configure:55115: checking for ceil

configure:55115: result: yes


So, configure assumes "ceil" is available for  the "cc" compiler 
without the need for -lm flag - and this is *wrong*, "cc" need -lm.


It seem for me to be an configure issue.

Greetings

Paul



___
users mailing list
us...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/users



--
Oracle
Terry D. Dontje | Principal Software Engineer
Developer Tools Engineering | +1.781.442.2631
Oracle *- Performance Technologies*
95 Network Drive, Burlington, MA 01803
Email terry.don...@oracle.com 





Re: [OMPI users] Configure fail: OpenMPI/1.5.3 with Support for LSF using Sun Studio compilers

2011-04-07 Thread Terry Dontje

On 04/07/2011 08:36 AM, Paul Kapinos wrote:

Hi Terry,


so, the attached ceil.c example file *can* be compiled by "CC" (the 
Studio C++ compiler), but *cannot* be compiled using "cc" (the 
Studio C compiler).

$ CC ceil.c
$ cc ceil.c

Did you try to link in the math library -lm?  When I did this your 
test program worked for me and that actually is the first test that 
the configure does.


5. Looking into configure.log and searching on `ceil' results: there 
was a check for the availability of `ceil' for the C compiler (see 
config.log.ceil). This check says `ceil' is *available* for the "cc" 
Compiler, which is *wrong*, cf. (4).

See above, it actually is right when you link in the math lib.


Thankt for the tipp! Yes, if using -lm so the Studio C compiler "cc" 
works also fine for ceil.c:


$ cc ceil.c -lm



So, is there an error in the configure stage? Or either the checks 
in config.log.ceil does not rely on the avilability of the `ceil' 
funcion in the C compiler?
It looks to me like the lbat configure test is not linking in the 
math lib. 


Yes, the is no -lm in configure:84213 line.

Note the cheks for ceil again, config.log.ceil. As far as I unterstood 
these logs, the checks for ceil and for the need of -lm deliver wrong 
results:



configure:55000: checking if we need -lm for ceil

configure:55104: result: no

configure:55115: checking for ceil

configure:55115: result: yes


So, configure assumes "ceil" is available for  the "cc" compiler 
without the need for -lm flag - and this is *wrong*, "cc" need -lm.


Interesting.  I've looked at some of my x86, Studio, linux builds of 
OMPI 1.5 branch and I see the correct configure results for ceil that 
correctly identify the need for -lm.  Your's definitely does not come up 
with the right answer.  Are you using the "official" ompi 1.5.3 tarball?

It seem for me to be an configure issue.


Certainly does.

--
Oracle
Terry D. Dontje | Principal Software Engineer
Developer Tools Engineering | +1.781.442.2631
Oracle *- Performance Technologies*
95 Network Drive, Burlington, MA 01803
Email terry.don...@oracle.com 





Re: [OMPI users] Configure fail: OpenMPI/1.5.3 with Support for LSF using Sun Studio compilers

2011-04-07 Thread Paul Kapinos

Hi Terry,


so, the attached ceil.c example file *can* be compiled by "CC" (the 
Studio C++ compiler), but *cannot* be compiled using "cc" (the Studio 
C compiler).

$ CC ceil.c
$ cc ceil.c

Did you try to link in the math library -lm?  When I did this your test 
program worked for me and that actually is the first test that the 
configure does.


5. Looking into configure.log and searching on `ceil' results: there 
was a check for the availability of `ceil' for the C compiler (see 
config.log.ceil). This check says `ceil' is *available* for the "cc" 
Compiler, which is *wrong*, cf. (4).

See above, it actually is right when you link in the math lib.


Thankt for the tipp! Yes, if using -lm so the Studio C compiler "cc" 
works also fine for ceil.c:


$ cc ceil.c -lm



So, is there an error in the configure stage? Or either the checks in 
config.log.ceil does not rely on the avilability of the `ceil' funcion 
in the C compiler?
It looks to me like the lbat configure test is not linking in the math 
lib. 


Yes, the is no -lm in configure:84213 line.

Note the cheks for ceil again, config.log.ceil. As far as I unterstood 
these logs, the checks for ceil and for the need of -lm deliver wrong 
results:



configure:55000: checking if we need -lm for ceil

configure:55104: result: no

configure:55115: checking for ceil

configure:55115: result: yes


So, configure assumes "ceil" is available for  the "cc" compiler without 
the need for -lm flag - and this is *wrong*, "cc" need -lm.


It seem for me to be an configure issue.

Greetings

Paul


--
Dipl.-Inform. Paul Kapinos   -   High Performance Computing,
RWTH Aachen University, Center for Computing and Communication
Seffenter Weg 23,  D 52074  Aachen (Germany)
Tel: +49 241/80-24915


smime.p7s
Description: S/MIME Cryptographic Signature


Re: [OMPI users] Configure fail: OpenMPI/1.5.3 with Support for LSF using Sun Studio compilers

2011-04-07 Thread Terry Dontje

On 04/07/2011 06:16 AM, Paul Kapinos wrote:

Dear OpenMPI developers,

We tried to build OpenMPI 1.5.3 including Support for Platform LSF 
using the Sun Studio (=Oracle Solaris Studio now) /12.2 and the 
configure stage failed.


1. Used flags:

./configure --with-lsf --with-openib --with-devel-headers 
--enable-contrib-no-build=vt --enable-mpi-threads CFLAGS="-fast 
-xtarget=nehalem -m64"   CXXFLAGS="-fast -xtarget=nehalem -m64" 
FFLAGS="-fast -xtarget=nehalem" -m64   FCFLAGS="-fast -xtarget=nehalem 
-m64"   F77=f95 LDFLAGS="-fast -xtarget=nehalem -m64" 
--prefix=//openmpi-1.5.3mt/linux64/studio


(note the Support for LSF enabled by --with-lsf). The compiler envvars 
are set as following:

$ echo $CC $FC $CXX
cc f95 CC

The compiler info: (cc -V, CC -V)
cc: Sun C 5.11 Linux_i386 2010/08/13
CC: Sun C++ 5.11 Linux_i386 2010/08/13


2. The configure error was:
##
checking for lsb_launch in -lbat... no
configure: WARNING: LSF support requested (via --with-lsf) but not found.
configure: error: Aborting.
##


3. In the config.log (see the config.log.error) there is more info 
about the problem. crucial info is:

##
/opt/lsf/8.0/linux2.6-glibc2.3-x86_64/lib/libbat.so: undefined 
reference to `ceil'

##

4. Googling vor `ceil' results e.g. in 
http://www.cplusplus.com/reference/clibrary/cmath/ceil/


so, the attached ceil.c example file *can* be compiled by "CC" (the 
Studio C++ compiler), but *cannot* be compiled using "cc" (the Studio 
C compiler).

$ CC ceil.c
$ cc ceil.c

Did you try to link in the math library -lm?  When I did this your test 
program worked for me and that actually is the first test that the 
configure does.


5. Looking into configure.log and searching on `ceil' results: there 
was a check for the availability of `ceil' for the C compiler (see 
config.log.ceil). This check says `ceil' is *available* for the "cc" 
Compiler, which is *wrong*, cf. (4).

See above, it actually is right when you link in the math lib.


So, is there an error in the configure stage? Or either the checks in 
config.log.ceil does not rely on the avilability of the `ceil' funcion 
in the C compiler?

It looks to me like the lbat configure test is not linking in the math lib.

Best wishes,
Paul Kapinos






P.S. Note in in the past we build many older versions of OpenMPI with 
no support for LSF and no such problems







___
users mailing list
us...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/users



--
Oracle
Terry D. Dontje | Principal Software Engineer
Developer Tools Engineering | +1.781.442.2631
Oracle *- Performance Technologies*
95 Network Drive, Burlington, MA 01803
Email terry.don...@oracle.com 





[OMPI users] Configure fail: OpenMPI/1.5.3 with Support for LSF using Sun Studio compilers

2011-04-07 Thread Paul Kapinos

Dear OpenMPI developers,

We tried to build OpenMPI 1.5.3 including Support for Platform LSF using 
the Sun Studio (=Oracle Solaris Studio now) /12.2 and the configure 
stage failed.


1. Used flags:

./configure --with-lsf --with-openib --with-devel-headers 
--enable-contrib-no-build=vt --enable-mpi-threads CFLAGS="-fast 
-xtarget=nehalem -m64"   CXXFLAGS="-fast -xtarget=nehalem -m64" 
FFLAGS="-fast -xtarget=nehalem" -m64   FCFLAGS="-fast -xtarget=nehalem 
-m64"   F77=f95 LDFLAGS="-fast -xtarget=nehalem -m64" 
--prefix=//openmpi-1.5.3mt/linux64/studio


(note the Support for LSF enabled by --with-lsf). The compiler envvars 
are set as following:

$ echo $CC $FC $CXX
cc f95 CC

The compiler info: (cc -V, CC -V)
cc: Sun C 5.11 Linux_i386 2010/08/13
CC: Sun C++ 5.11 Linux_i386 2010/08/13


2. The configure error was:
##
checking for lsb_launch in -lbat... no
configure: WARNING: LSF support requested (via --with-lsf) but not found.
configure: error: Aborting.
##


3. In the config.log (see the config.log.error) there is more info about 
the problem. crucial info is:

##
/opt/lsf/8.0/linux2.6-glibc2.3-x86_64/lib/libbat.so: undefined reference 
to `ceil'

##

4. Googling vor `ceil' results e.g. in 
http://www.cplusplus.com/reference/clibrary/cmath/ceil/


so, the attached ceil.c example file *can* be compiled by "CC" (the 
Studio C++ compiler), but *cannot* be compiled using "cc" (the Studio C 
compiler).

$ CC ceil.c
$ cc ceil.c


5. Looking into configure.log and searching on `ceil' results: there was 
a check for the availability of `ceil' for the C compiler (see 
config.log.ceil). This check says `ceil' is *available* for the "cc" 
Compiler, which is *wrong*, cf. (4).


So, is there an error in the configure stage? Or either the checks in 
config.log.ceil does not rely on the avilability of the `ceil' funcion 
in the C compiler?


Best wishes,
Paul Kapinos






P.S. Note in in the past we build many older versions of OpenMPI with no 
support for LSF and no such problems






--
Dipl.-Inform. Paul Kapinos   -   High Performance Computing,
RWTH Aachen University, Center for Computing and Communication
Seffenter Weg 23,  D 52074  Aachen (Germany)
Tel: +49 241/80-24915
configure:84213: cc -o conftest -DNDEBUG  -fast -xtarget=nehalem -m64   -mt 
-I/home/pk224850/OpenMPI/openmpi-1.5.3_linux64_studio/opal/mca/paffinity/hwloc/hwloc/include
   -I/opt/lsf/8.0/include  -fast -xtarget=nehalem -m64
-L/opt/lsf/8.0/linux2.6-glibc2.3-x86_64/lib conftest.c -lbat -llsf -lnsl  
-lutil  >&5
cc: Warning: -xchip=native detection failed, falling back to -xchip=generic
"conftest.c", line 568: warning: statement not reached
/opt/lsf/8.0/linux2.6-glibc2.3-x86_64/lib/libbat.so: undefined reference to 
`ceil'
configure:84213: $? = 2
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "Open MPI"
| #define PACKAGE_TARNAME "openmpi"
| #define PACKAGE_VERSION "1.5.3"
| #define PACKAGE_STRING "Open MPI 1.5.3"
| #define PACKAGE_BUGREPORT "http://www.open-mpi.org/community/help/;
| #define PACKAGE_URL ""
| #define OPAL_ARCH "x86_64-unknown-linux-gnu"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define __EXTENSIONS__ 1
| #define _ALL_SOURCE 1
| #define _GNU_SOURCE 1
| #define _POSIX_PTHREAD_SEMANTICS 1
| #define _TANDEM_SOURCE 1
| #define OMPI_MAJOR_VERSION 1
| #define OMPI_MINOR_VERSION 5
| #define OMPI_RELEASE_VERSION 3
| #define OMPI_GREEK_VERSION ""
| #define OMPI_VERSION "3"
| #define OMPI_RELEASE_DATE "Mar 16, 2011"
| #define ORTE_MAJOR_VERSION 1
| #define ORTE_MINOR_VERSION 5
| #define ORTE_RELEASE_VERSION 3
| #define ORTE_GREEK_VERSION ""
| #define ORTE_VERSION "3"
| #define ORTE_RELEASE_DATE "Mar 16, 2011"
| #define OPAL_MAJOR_VERSION 1
| #define OPAL_MINOR_VERSION 5
| #define OPAL_RELEASE_VERSION 3
| #define OPAL_GREEK_VERSION ""
| #define OPAL_VERSION "3"
| #define OPAL_RELEASE_DATE "Mar 16, 2011"
| #define OPAL_ENABLE_MEM_DEBUG 0
| #define OPAL_ENABLE_MEM_PROFILE 0
| #define OPAL_ENABLE_DEBUG 0
| #define OPAL_WANT_PRETTY_PRINT_STACKTRACE 1
| #define OPAL_ENABLE_PTY_SUPPORT 1
| #define OPAL_ENABLE_HETEROGENEOUS_SUPPORT 0
| #define OPAL_ENABLE_TRACE 0
| #define OPAL_ENABLE_FT 0
| #define OPAL_ENABLE_FT_CR 0
| #define OPAL_WANT_HOME_CONFIG_FILES 1
| #define OPAL_ENABLE_IPV6 0
| #define OPAL_PACKAGE_STRING "Open MPI pk224...@cluster.rz.rwth-aachen.de 
Distribution"
| #define OPAL_IDENT_STRING "1.5.3"
| #define OPAL_MAX_PROCESSOR_NAME 256
| #define OPAL_MAX_ERROR_STRING 256
| #define OPAL_MAX_OBJECT_NAME 64
| #define OPAL_MAX_INFO_KEY 36
| #define OPAL_MAX_INFO_VAL 256
| #define OPAL_MAX_PORT_NAME 1024
|