LAM/MPI logo

LAM/MPI General User's Mailing List Archives

  |   Home   |   Download   |   Documentation   |   FAQ   |   all just in this list

From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2005-05-31 21:40:05


We Llamas talked about this a bit more immediately after I sent the
mail below (of course), and we figured out the real problem.

Honestly, the problem is that gfortran is poorly configured to not
automatically add -lSystemStubs. I'm guessing that there's a way to
make gfortran do this automatically by tweaking your gfortran
installation, but I don't know the Right Way to do that (I don't have
access to a gfortran installation to poke around).

We never anticipated needing to add libraries or flags to compile this
simple test in LAM -- neither 7.0.x nor 7.1.1 have a mechanism for the
user to add Fortran compiler / linker flags to these tests. So I've
just added this to LAM 7.1.2's configure script -- now it uses both
LDFLAGS and LIBS when linking these sample fortran applications.

I'll upload a new 7.1.2 beta shortly (b21 -- see
http://www.lam-mpi.org/beta/) that will have these changes. With this
version, you should be able to:

        ./configure FC=gfortran LIBS=-lSystemStubs ....

Please let me know if this works for you. Sorry it took so long to
come to resolution.

On May 31, 2005, at 9:44 PM, Jeff Squyres wrote:

> The problem is definitely that it is not producing a valid fortran
> executable because the test program fails to link due to a missing
> symbol.
>
> Did you get exactly the same error in the config.log when you used the
> LIBS=-lSystemStubs flag to configure?
>
> I'm afraid that I don't have a Tiger system with gfortran installed to
> try this on. Here's what our test case does -- once you can get this
> to compile, you should be able use the same flags to get LAM's
> configure to work:
>
> - create a C source file with the following (e.g., size.c)
>
> #include <stdio.h>
> #include <stdlib.h>
>
> void sizeof_(char *a, char *b)
> {
> int diff = (int) (b - a);
> FILE *f=fopen("conftestval", "w");
> if (!f) exit(1);
> fprintf(f, "%d\n", diff);
> }
>
> - create a Fortran source file with the following (e.g., main.f):
>
> program fsize
> external SIZE
> $1 x(2)
> call SIZE(x(1),x(2))
> end
>
> - compile each of those into .o files, e.g.:
>
> gcc size.c -c
> gfortran main.f
>
> - link these together into an executable
>
> gfortran main.o size.o -o main
>
> The link step is what is failing due to a missing symbol. We had
> another user who said that adding -lSystemStubs to the final link line
> made it link for him, but I can't verify this. :-\
>
> Can you try that?
>
>
> On May 24, 2005, at 3:45 PM, Ben Heaps wrote:
>
>> Hi Jeff,
>>
>> My solution and your solution both dont seem to work. Any other hints
>> would be appreciated.
>>
>> Ben
>>
>>
>> ----- Original Message -----
>> From: "Jeff Squyres" <jsquyres_at_[hidden]>
>> To: "General LAM/MPI mailing list" <lam_at_[hidden]>
>> Sent: Saturday, May 21, 2005 6:46 AM
>> Subject: Re: LAM: compile error during lam install
>>
>>
>>> On May 20, 2005, at 6:10 PM, Ben Heaps wrote:
>>>
>>>> Im not too familiar with UNIX yet, but getting there.
>>>>
>>>> Hopefuly step 2 solves the problem, is adding -lSystemStubs to my
>>>> libraries easy to do in a bash shell?
>>>>
>>>> I tried editing .bashrc and adding LDFLAGS = -lSystemStubs
>>>
>>> Did that work?
>>>
>>> I would recommend instead:
>>>
>>> ./configure LIBS=-lSystemStubs
>>>
>>> --
>>> {+} Jeff Squyres
>>> {+} jsquyres_at_[hidden]
>>> {+} http://www.lam-mpi.org/
>>>
>>> _______________________________________________
>>> This list is archived at http://www.lam-mpi.org/MailArchives/lam/
>>>
>>
>> _______________________________________________
>> This list is archived at http://www.lam-mpi.org/MailArchives/lam/
>>
>
> --
> {+} Jeff Squyres
> {+} jsquyres_at_[hidden]
> {+} http://www.lam-mpi.org/
>
> _______________________________________________
> This list is archived at http://www.lam-mpi.org/MailArchives/lam/
>

-- 
{+} Jeff Squyres
{+} jsquyres_at_[hidden]
{+} http://www.lam-mpi.org/