Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: Re: [OMPI users] Configure fail: OpenMPI/1.5.3 with Support for LSF using Sun Studio compilers
From: Paul Kapinos (kapinos_at_[hidden])
Date: 2011-04-07 08:36:49


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