List Info

Thread: LAM: Linker errors compiling Fortran program




LAM: Linker errors compiling Fortran program
country flaguser name
United States
2007-06-09 13:37:10
Hi,
	I've got LAM-MPI compiled and running, and C programs
compile and  
run great.  However, I'm trying to compile a Fortran-based
program  
and I'm getting a linking error about "multiple
definitions of symbol  
_atexit".  Could this be due to some linker flags I set
wrong?  Here  
are my linker flags:

LD="/usr/local/lammpi/bin/mpif77 -o" 
LDFLAGS="-O2 -ffast-math
--allow-multiple-definition" 


Here's the exact error I'm getting:

/usr/local/lammpi/bin/mpif77 -o DLPOLY.X setup_module.o
.......
/usr/bin/ld: multiple definitions of symbol _atexit
/usr/local/lib/gcc/powerpc-apple-darwin8.6.0/4.2.0/crt3.o
private  
external definition of _atexit in section (__TEXT,__text)
/usr/lib/libdl.dylib(atexit.So) definition of _atexit
/usr/bin/ld: multiple definitions of symbol ___cxa_atexit
/usr/local/lib/gcc/powerpc-apple-darwin8.6.0/4.2.0/crt3.o
private  
external definition of ___cxa_atexit in section
(__TEXT,__text)
/usr/lib/libdl.dylib(atexit.So) definition of ___cxa_atexit
collect2: ld returned 1 exit status

Thank you!

Aaron Thompson
Vanderbilt University
aaron.p.thompsonvanderbilt.edu


_______________________________________________
This list is archived at http://www.l
am-mpi.org/MailArchives/lam/

Re: LAM: Linker errors compiling Fortran program
country flaguser name
United States
2007-06-09 20:41:33
Aaron,

If you are using it in 64-bit mode you'll need to do a bit
more work.
But it looks like you're using it in 32, so...
Try
LDFLAGS = "-Wl,-multiply_defined -Wl,suppress"

Regards,
Greg

On Jun 9, 2007, at 2:37 PM, Aaron Thompson wrote:

> Hi,
> 	I've got LAM-MPI compiled and running, and C programs
compile and
> run great.  However, I'm trying to compile a
Fortran-based program
> and I'm getting a linking error about "multiple
definitions of symbol
> _atexit".  Could this be due to some linker flags
I set wrong?  Here
> are my linker flags:
>
> LD="/usr/local/lammpi/bin/mpif77 -o" 
> LDFLAGS="-O2 -ffast-math
--allow-multiple-definition" 
>
>
> Here's the exact error I'm getting:
>
> /usr/local/lammpi/bin/mpif77 -o DLPOLY.X setup_module.o
.......
> /usr/bin/ld: multiple definitions of symbol _atexit
>
/usr/local/lib/gcc/powerpc-apple-darwin8.6.0/4.2.0/crt3.o
private
> external definition of _atexit in section
(__TEXT,__text)
> /usr/lib/libdl.dylib(atexit.So) definition of _atexit
> /usr/bin/ld: multiple definitions of symbol
___cxa_atexit
>
/usr/local/lib/gcc/powerpc-apple-darwin8.6.0/4.2.0/crt3.o
private
> external definition of ___cxa_atexit in section
(__TEXT,__text)
> /usr/lib/libdl.dylib(atexit.So) definition of
___cxa_atexit
> collect2: ld returned 1 exit status
>
> Thank you!
>
> Aaron Thompson
> Vanderbilt University
> aaron.p.thompsonvanderbilt.edu
>
>
> _______________________________________________
> This list is archived at http://www.l
am-mpi.org/MailArchives/lam/
>

_______________________________________________
This list is archived at http://www.l
am-mpi.org/MailArchives/lam/

Re: LAM: Linker errors compiling Fortran program
country flaguser name
United States
2007-06-09 22:38:04
Greg,
	I tried using those flags, but I got the same error.  If
this helps,  
here's my output from mpif77 -showme:

/usr/local/bin/gfortran -I/usr/local/lammpi/include -Wl,-u -

Wl,_lam_darwin_malloc_linker_hack
-Wl,-multiply_defined,suppress -Wl,- 
force_flat_namespace -Wl,-flat_namespace
-Wl,-multiply_defined - 
Wl,suppress -L/usr/local/lammpi/lib -llammpio -llamf77mpi
-lmpi -llam  
-ldl

Any ideas?

Thank you!

Aaron Thompson
Vanderbilt University
aaron.p.thompsonvanderbilt.edu



On Jun 9, 2007, at 9:41 PM, Gregory J. Orris wrote:

> Aaron,
>
> If you are using it in 64-bit mode you'll need to do a
bit more work.
> But it looks like you're using it in 32, so...
> Try
> LDFLAGS = "-Wl,-multiply_defined
-Wl,suppress"
>
> Regards,
> Greg
>
> On Jun 9, 2007, at 2:37 PM, Aaron Thompson wrote:
>
>> Hi,
>> 	I've got LAM-MPI compiled and running, and C
programs compile and
>> run great.  However, I'm trying to compile a
Fortran-based program
>> and I'm getting a linking error about
"multiple definitions of symbol
>> _atexit".  Could this be due to some linker
flags I set wrong?  Here
>> are my linker flags:
>>
>> LD="/usr/local/lammpi/bin/mpif77 -o" 
>> LDFLAGS="-O2 -ffast-math
--allow-multiple-definition" 
>>
>>
>> Here's the exact error I'm getting:
>>
>> /usr/local/lammpi/bin/mpif77 -o DLPOLY.X
setup_module.o .......
>> /usr/bin/ld: multiple definitions of symbol
_atexit
>>
/usr/local/lib/gcc/powerpc-apple-darwin8.6.0/4.2.0/crt3.o
private
>> external definition of _atexit in section
(__TEXT,__text)
>> /usr/lib/libdl.dylib(atexit.So) definition of
_atexit
>> /usr/bin/ld: multiple definitions of symbol
___cxa_atexit
>>
/usr/local/lib/gcc/powerpc-apple-darwin8.6.0/4.2.0/crt3.o
private
>> external definition of ___cxa_atexit in section
(__TEXT,__text)
>> /usr/lib/libdl.dylib(atexit.So) definition of
___cxa_atexit
>> collect2: ld returned 1 exit status
>>
>> Thank you!
>>
>> Aaron Thompson
>> Vanderbilt University
>> aaron.p.thompsonvanderbilt.edu
>>
>>
>> _______________________________________________
>> This list is archived at http://www.l
am-mpi.org/MailArchives/lam/
>>
>
> _______________________________________________
> This list is archived at http://www.l
am-mpi.org/MailArchives/lam/

_______________________________________________
This list is archived at http://www.l
am-mpi.org/MailArchives/lam/

Re: LAM: Linker errors compiling Fortran program
country flaguser name
United States
2007-06-10 21:38:26
I fixed the problem!  Looks like there's some sort of bug in
gcc  
4.2.0 on Mac OS X 10.4 when using -force_flat_namespace. 
For those  
searching the list with the same problem, see here: http://

gcc.gnu.org/ml/gcc-bugs/2006-05/msg00273.html
Instead of using mpif77, I ran gfortran without the linker
and  
excluded -force_flat_namespace manually.  Is there any way I
can  
change the arguments that mpif77 uses without recompiling?

Thanks,

Aaron Thompson
Vanderbilt University
aaron.p.thompsonvanderbilt.edu



On Jun 9, 2007, at 11:38 PM, Aaron Thompson wrote:

> Greg,
> 	I tried using those flags, but I got the same error. 
If this helps,
> here's my output from mpif77 -showme:
>
> /usr/local/bin/gfortran -I/usr/local/lammpi/include
-Wl,-u -
> Wl,_lam_darwin_malloc_linker_hack
-Wl,-multiply_defined,suppress -Wl,-
> force_flat_namespace -Wl,-flat_namespace
-Wl,-multiply_defined -
> Wl,suppress -L/usr/local/lammpi/lib -llammpio
-llamf77mpi -lmpi -llam
> -ldl
>
> Any ideas?
>
> Thank you!
>
> Aaron Thompson
> Vanderbilt University
> aaron.p.thompsonvanderbilt.edu
>
>
>
> On Jun 9, 2007, at 9:41 PM, Gregory J. Orris wrote:
>
>> Aaron,
>>
>> If you are using it in 64-bit mode you'll need to
do a bit more work.
>> But it looks like you're using it in 32, so...
>> Try
>> LDFLAGS = "-Wl,-multiply_defined
-Wl,suppress"
>>
>> Regards,
>> Greg
>>
>> On Jun 9, 2007, at 2:37 PM, Aaron Thompson wrote:
>>
>>> Hi,
>>> 	I've got LAM-MPI compiled and running, and C
programs compile and
>>> run great.  However, I'm trying to compile a
Fortran-based program
>>> and I'm getting a linking error about
"multiple definitions of  
>>> symbol
>>> _atexit".  Could this be due to some
linker flags I set wrong?  Here
>>> are my linker flags:
>>>
>>> LD="/usr/local/lammpi/bin/mpif77 -o"

>>> LDFLAGS="-O2 -ffast-math
--allow-multiple-definition" 
>>>
>>>
>>> Here's the exact error I'm getting:
>>>
>>> /usr/local/lammpi/bin/mpif77 -o DLPOLY.X
setup_module.o .......
>>> /usr/bin/ld: multiple definitions of symbol
_atexit
>>>
/usr/local/lib/gcc/powerpc-apple-darwin8.6.0/4.2.0/crt3.o
private
>>> external definition of _atexit in section
(__TEXT,__text)
>>> /usr/lib/libdl.dylib(atexit.So) definition of
_atexit
>>> /usr/bin/ld: multiple definitions of symbol
___cxa_atexit
>>>
/usr/local/lib/gcc/powerpc-apple-darwin8.6.0/4.2.0/crt3.o
private
>>> external definition of ___cxa_atexit in section
(__TEXT,__text)
>>> /usr/lib/libdl.dylib(atexit.So) definition of
___cxa_atexit
>>> collect2: ld returned 1 exit status
>>>
>>> Thank you!
>>>
>>> Aaron Thompson
>>> Vanderbilt University
>>> aaron.p.thompsonvanderbilt.edu
>>>
>>>
>>>
_______________________________________________
>>> This list is archived at http://www.l
am-mpi.org/MailArchives/lam/
>>>
>>
>> _______________________________________________
>> This list is archived at http://www.l
am-mpi.org/MailArchives/lam/
>
> _______________________________________________
> This list is archived at http://www.l
am-mpi.org/MailArchives/lam/

_______________________________________________
This list is archived at http://www.l
am-mpi.org/MailArchives/lam/

Re: LAM: Linker errors compiling Fortran program
country flaguser name
Poland
2007-06-11 07:47:25
Hi,

The mpif77 is a script - you can edit it manually without
any problem.

HtH
Konrad Karczewski

On Sun, 10 Jun 2007, Aaron Thompson wrote:

> I fixed the problem!  Looks like there's some sort of
bug in gcc
> 4.2.0 on Mac OS X 10.4 when using
-force_flat_namespace.  For those
> searching the list with the same problem, see here:
http://
> gcc.gnu.org/ml/gcc-bugs/2006-05/msg00273.html
> Instead of using mpif77, I ran gfortran without the
linker and
> excluded -force_flat_namespace manually.  Is there any
way I can
> change the arguments that mpif77 uses without
recompiling?
>
> Thanks,
>
> Aaron Thompson
> Vanderbilt University
> aaron.p.thompsonvanderbilt.edu
>
>
>
> On Jun 9, 2007, at 11:38 PM, Aaron Thompson wrote:
>
> > Greg,
> > 	I tried using those flags, but I got the same
error.  If this helps,
> > here's my output from mpif77 -showme:
> >
> > /usr/local/bin/gfortran
-I/usr/local/lammpi/include -Wl,-u -
> > Wl,_lam_darwin_malloc_linker_hack
-Wl,-multiply_defined,suppress -Wl,-
> > force_flat_namespace -Wl,-flat_namespace
-Wl,-multiply_defined -
> > Wl,suppress -L/usr/local/lammpi/lib -llammpio
-llamf77mpi -lmpi -llam
> > -ldl
> >
> > Any ideas?
> >
> > Thank you!
> >
> > Aaron Thompson
> > Vanderbilt University
> > aaron.p.thompsonvanderbilt.edu
> >
> >
> >
> > On Jun 9, 2007, at 9:41 PM, Gregory J. Orris
wrote:
> >
> >> Aaron,
> >>
> >> If you are using it in 64-bit mode you'll need
to do a bit more work.
> >> But it looks like you're using it in 32,
so...
> >> Try
> >> LDFLAGS = "-Wl,-multiply_defined
-Wl,suppress"
> >>
> >> Regards,
> >> Greg
> >>
> >> On Jun 9, 2007, at 2:37 PM, Aaron Thompson
wrote:
> >>
> >>> Hi,
> >>> 	I've got LAM-MPI compiled and running,
and C programs compile and
> >>> run great.  However, I'm trying to compile
a Fortran-based program
> >>> and I'm getting a linking error about
"multiple definitions of
> >>> symbol
> >>> _atexit".  Could this be due to some
linker flags I set wrong?  Here
> >>> are my linker flags:
> >>>
> >>> LD="/usr/local/lammpi/bin/mpif77
-o" 
> >>> LDFLAGS="-O2 -ffast-math
--allow-multiple-definition" 
> >>>
> >>>
> >>> Here's the exact error I'm getting:
> >>>
> >>> /usr/local/lammpi/bin/mpif77 -o DLPOLY.X
setup_module.o .......
> >>> /usr/bin/ld: multiple definitions of
symbol _atexit
> >>>
/usr/local/lib/gcc/powerpc-apple-darwin8.6.0/4.2.0/crt3.o
private
> >>> external definition of _atexit in section
(__TEXT,__text)
> >>> /usr/lib/libdl.dylib(atexit.So) definition
of _atexit
> >>> /usr/bin/ld: multiple definitions of
symbol ___cxa_atexit
> >>>
/usr/local/lib/gcc/powerpc-apple-darwin8.6.0/4.2.0/crt3.o
private
> >>> external definition of ___cxa_atexit in
section (__TEXT,__text)
> >>> /usr/lib/libdl.dylib(atexit.So) definition
of ___cxa_atexit
> >>> collect2: ld returned 1 exit status
> >>>
> >>> Thank you!
> >>>
> >>> Aaron Thompson
> >>> Vanderbilt University
> >>> aaron.p.thompsonvanderbilt.edu
> >>>
> >>>
> >>>
_______________________________________________
> >>> This list is archived at http://www.l
am-mpi.org/MailArchives/lam/
> >>>
> >>
> >>
_______________________________________________
> >> This list is archived at http://www.l
am-mpi.org/MailArchives/lam/
> >
> > _______________________________________________
> > This list is archived at http://www.l
am-mpi.org/MailArchives/lam/
>
> _______________________________________________
> This list is archived at http://www.l
am-mpi.org/MailArchives/lam/
>
_______________________________________________
This list is archived at http://www.l
am-mpi.org/MailArchives/lam/

Re: LAM: Linker errors compiling Fortran program
country flaguser name
United States
2007-06-11 09:38:22
I just looked at mpif77 using vi.  Call me crazy, but it
definitely  
seems like a binary executable to me (lots of ^^G^^^^E^^^).   
Is there some LAM build configure option where you can
compile it as  
a shell script as opposed to a binary?

Thank you,

Aaron Thompson
Vanderbilt University
aaron.p.thompsonvanderbilt.edu



On Jun 11, 2007, at 8:47 AM, Konrad Karczewski wrote:

> Hi,
>
> The mpif77 is a script - you can edit it manually
without any problem.
>
> HtH
> Konrad Karczewski
>
> On Sun, 10 Jun 2007, Aaron Thompson wrote:
>
>> I fixed the problem!  Looks like there's some sort
of bug in gcc
>> 4.2.0 on Mac OS X 10.4 when using
-force_flat_namespace.  For those
>> searching the list with the same problem, see here:
http://
>> gcc.gnu.org/ml/gcc-bugs/2006-05/msg00273.html
>> Instead of using mpif77, I ran gfortran without the
linker and
>> excluded -force_flat_namespace manually.  Is there
any way I can
>> change the arguments that mpif77 uses without
recompiling?
>>
>> Thanks,
>>
>> Aaron Thompson
>> Vanderbilt University
>> aaron.p.thompsonvanderbilt.edu
>>
>>
>>
>> On Jun 9, 2007, at 11:38 PM, Aaron Thompson wrote:
>>
>>> Greg,
>>> 	I tried using those flags, but I got the same
error.  If this  
>>> helps,
>>> here's my output from mpif77 -showme:
>>>
>>> /usr/local/bin/gfortran
-I/usr/local/lammpi/include -Wl,-u -
>>> Wl,_lam_darwin_malloc_linker_hack
-Wl,-multiply_defined,suppress - 
>>> Wl,-
>>> force_flat_namespace -Wl,-flat_namespace
-Wl,-multiply_defined -
>>> Wl,suppress -L/usr/local/lammpi/lib -llammpio
-llamf77mpi -lmpi - 
>>> llam
>>> -ldl
>>>
>>> Any ideas?
>>>
>>> Thank you!
>>>
>>> Aaron Thompson
>>> Vanderbilt University
>>> aaron.p.thompsonvanderbilt.edu
>>>
>>>
>>>
>>> On Jun 9, 2007, at 9:41 PM, Gregory J. Orris
wrote:
>>>
>>>> Aaron,
>>>>
>>>> If you are using it in 64-bit mode you'll
need to do a bit more  
>>>> work.
>>>> But it looks like you're using it in 32,
so...
>>>> Try
>>>> LDFLAGS = "-Wl,-multiply_defined
-Wl,suppress"
>>>>
>>>> Regards,
>>>> Greg
>>>>
>>>> On Jun 9, 2007, at 2:37 PM, Aaron Thompson
wrote:
>>>>
>>>>> Hi,
>>>>> 	I've got LAM-MPI compiled and running,
and C programs compile and
>>>>> run great.  However, I'm trying to
compile a Fortran-based program
>>>>> and I'm getting a linking error about
"multiple definitions of
>>>>> symbol
>>>>> _atexit".  Could this be due to
some linker flags I set wrong?   
>>>>> Here
>>>>> are my linker flags:
>>>>>
>>>>> LD="/usr/local/lammpi/bin/mpif77
-o" 
>>>>> LDFLAGS="-O2 -ffast-math
--allow-multiple-definition" 
>>>>>
>>>>>
>>>>> Here's the exact error I'm getting:
>>>>>
>>>>> /usr/local/lammpi/bin/mpif77 -o
DLPOLY.X setup_module.o .......
>>>>> /usr/bin/ld: multiple definitions of
symbol _atexit
>>>>>
/usr/local/lib/gcc/powerpc-apple-darwin8.6.0/4.2.0/crt3.o
private
>>>>> external definition of _atexit in
section (__TEXT,__text)
>>>>> /usr/lib/libdl.dylib(atexit.So)
definition of _atexit
>>>>> /usr/bin/ld: multiple definitions of
symbol ___cxa_atexit
>>>>>
/usr/local/lib/gcc/powerpc-apple-darwin8.6.0/4.2.0/crt3.o
private
>>>>> external definition of ___cxa_atexit in
section (__TEXT,__text)
>>>>> /usr/lib/libdl.dylib(atexit.So)
definition of ___cxa_atexit
>>>>> collect2: ld returned 1 exit status
>>>>>
>>>>> Thank you!
>>>>>
>>>>> Aaron Thompson
>>>>> Vanderbilt University
>>>>> aaron.p.thompsonvanderbilt.edu
>>>>>
>>>>>
>>>>>
_______________________________________________
>>>>> This list is archived at http://www.l
am-mpi.org/MailArchives/lam/
>>>>>
>>>>
>>>>
_______________________________________________
>>>> This list is archived at http://www.l
am-mpi.org/MailArchives/lam/
>>>
>>>
_______________________________________________
>>> This list is archived at http://www.l
am-mpi.org/MailArchives/lam/
>>
>> _______________________________________________
>> This list is archived at http://www.l
am-mpi.org/MailArchives/lam/
>>
> _______________________________________________
> This list is archived at http://www.l
am-mpi.org/MailArchives/lam/

_______________________________________________
This list is archived at http://www.l
am-mpi.org/MailArchives/lam/

Re: LAM: Linker errors compiling Fortran program
country flaguser name
United States
2007-06-11 09:44:36
No, LAM's wrapper compilers are always a binary and the
paths and flags 
are always encoded into the wrappers.

You actually really don't want to remove the
force_flat_namespace flag 
when linking LAM/MPI -- the flag is there to work around an
issue with the 
way the memory hooks work in LAM/MPI.  The memory hooks are
only needed 
for interconnects such as InfiniBand or Myrinet.  If you are
using TCP, 
you can recompile LAM without the memory hooks by giving the
option 
--without-memory-manager to configure.

Hope this helps,

Brian

On Mon, 11 Jun 2007, Aaron Thompson wrote:

> I just looked at mpif77 using vi.  Call me crazy, but
it definitely
> seems like a binary executable to me (lots of ^^G^^^^E^^^).
> Is there some LAM build configure option where you can
compile it as
> a shell script as opposed to a binary?
>
> Thank you,
>
> Aaron Thompson
> Vanderbilt University
> aaron.p.thompsonvanderbilt.edu
>
>
>
> On Jun 11, 2007, at 8:47 AM, Konrad Karczewski wrote:
>
>> Hi,
>>
>> The mpif77 is a script - you can edit it manually
without any problem.
>>
>> HtH
>> Konrad Karczewski
>>
>> On Sun, 10 Jun 2007, Aaron Thompson wrote:
>>
>>> I fixed the problem!  Looks like there's some
sort of bug in gcc
>>> 4.2.0 on Mac OS X 10.4 when using
-force_flat_namespace.  For those
>>> searching the list with the same problem, see
here: http://
>>> gcc.gnu.org/ml/gcc-bugs/2006-05/msg00273.html
>>> Instead of using mpif77, I ran gfortran without
the linker and
>>> excluded -force_flat_namespace manually.  Is
there any way I can
>>> change the arguments that mpif77 uses without
recompiling?
>>>
>>> Thanks,
>>>
>>> Aaron Thompson
>>> Vanderbilt University
>>> aaron.p.thompsonvanderbilt.edu
>>>
>>>
>>>
>>> On Jun 9, 2007, at 11:38 PM, Aaron Thompson
wrote:
>>>
>>>> Greg,
>>>> 	I tried using those flags, but I got the
same error.  If this
>>>> helps,
>>>> here's my output from mpif77 -showme:
>>>>
>>>> /usr/local/bin/gfortran
-I/usr/local/lammpi/include -Wl,-u -
>>>> Wl,_lam_darwin_malloc_linker_hack
-Wl,-multiply_defined,suppress -
>>>> Wl,-
>>>> force_flat_namespace -Wl,-flat_namespace
-Wl,-multiply_defined -
>>>> Wl,suppress -L/usr/local/lammpi/lib
-llammpio -llamf77mpi -lmpi -
>>>> llam
>>>> -ldl
>>>>
>>>> Any ideas?
>>>>
>>>> Thank you!
>>>>
>>>> Aaron Thompson
>>>> Vanderbilt University
>>>> aaron.p.thompsonvanderbilt.edu
>>>>
>>>>
>>>>
>>>> On Jun 9, 2007, at 9:41 PM, Gregory J.
Orris wrote:
>>>>
>>>>> Aaron,
>>>>>
>>>>> If you are using it in 64-bit mode
you'll need to do a bit more
>>>>> work.
>>>>> But it looks like you're using it in
32, so...
>>>>> Try
>>>>> LDFLAGS = "-Wl,-multiply_defined
-Wl,suppress"
>>>>>
>>>>> Regards,
>>>>> Greg
>>>>>
>>>>> On Jun 9, 2007, at 2:37 PM, Aaron
Thompson wrote:
>>>>>
>>>>>> Hi,
>>>>>> 	I've got LAM-MPI compiled and
running, and C programs compile and
>>>>>> run great.  However, I'm trying to
compile a Fortran-based program
>>>>>> and I'm getting a linking error
about "multiple definitions of
>>>>>> symbol
>>>>>> _atexit".  Could this be due
to some linker flags I set wrong?
>>>>>> Here
>>>>>> are my linker flags:
>>>>>>
>>>>>>
LD="/usr/local/lammpi/bin/mpif77 -o" 
>>>>>> LDFLAGS="-O2 -ffast-math
--allow-multiple-definition" 
>>>>>>
>>>>>>
>>>>>> Here's the exact error I'm
getting:
>>>>>>
>>>>>> /usr/local/lammpi/bin/mpif77 -o
DLPOLY.X setup_module.o .......
>>>>>> /usr/bin/ld: multiple definitions
of symbol _atexit
>>>>>>
/usr/local/lib/gcc/powerpc-apple-darwin8.6.0/4.2.0/crt3.o
private
>>>>>> external definition of _atexit in
section (__TEXT,__text)
>>>>>> /usr/lib/libdl.dylib(atexit.So)
definition of _atexit
>>>>>> /usr/bin/ld: multiple definitions
of symbol ___cxa_atexit
>>>>>>
/usr/local/lib/gcc/powerpc-apple-darwin8.6.0/4.2.0/crt3.o
private
>>>>>> external definition of
___cxa_atexit in section (__TEXT,__text)
>>>>>> /usr/lib/libdl.dylib(atexit.So)
definition of ___cxa_atexit
>>>>>> collect2: ld returned 1 exit
status
>>>>>>
>>>>>> Thank you!
>>>>>>
>>>>>> Aaron Thompson
>>>>>> Vanderbilt University
>>>>>> aaron.p.thompsonvanderbilt.edu
>>>>>>
>>>>>>
>>>>>>
_______________________________________________
>>>>>> This list is archived at http://www.l
am-mpi.org/MailArchives/lam/
>>>>>>
>>>>>
>>>>>
_______________________________________________
>>>>> This list is archived at http://www.l
am-mpi.org/MailArchives/lam/
>>>>
>>>>
_______________________________________________
>>>> This list is archived at http://www.l
am-mpi.org/MailArchives/lam/
>>>
>>>
_______________________________________________
>>> This list is archived at http://www.l
am-mpi.org/MailArchives/lam/
>>>
>> _______________________________________________
>> This list is archived at http://www.l
am-mpi.org/MailArchives/lam/
>
> _______________________________________________
> This list is archived at http://www.l
am-mpi.org/MailArchives/lam/
>
_______________________________________________
This list is archived at http://www.l
am-mpi.org/MailArchives/lam/

Re: LAM: Linker errors compiling Fortran program
country flaguser name
United States
2007-06-11 13:00:21
Aaron
May I suggest loading gfortran 4.3.
It seems to work fine on the intel's.
Haven't tried it on my old G5.

for the record, mpich is scripted. lam is a compiled
binary.

Regards,
Greg

On Jun 11, 2007, at 10:38, Aaron Thompson wrote:

> I just looked at mpif77 using vi.  Call me crazy, but
it definitely
> seems like a binary executable to me (lots of ^^G^^^^E^^^).
> Is there some LAM build configure option where you can
compile it as
> a shell script as opposed to a binary?
>
> Thank you,
>
> Aaron Thompson
> Vanderbilt University
> aaron.p.thompsonvanderbilt.edu
>
>
>
> On Jun 11, 2007, at 8:47 AM, Konrad Karczewski wrote:
>
>> Hi,
>>
>> The mpif77 is a script - you can edit it manually
without any  
>> problem.
>>
>> HtH
>> Konrad Karczewski
>>
>> On Sun, 10 Jun 2007, Aaron Thompson wrote:
>>
>>> I fixed the problem!  Looks like there's some
sort of bug in gcc
>>> 4.2.0 on Mac OS X 10.4 when using
-force_flat_namespace.  For those
>>> searching the list with the same problem, see
here: http://
>>> gcc.gnu.org/ml/gcc-bugs/2006-05/msg00273.html
>>> Instead of using mpif77, I ran gfortran without
the linker and
>>> excluded -force_flat_namespace manually.  Is
there any way I can
>>> change the arguments that mpif77 uses without
recompiling?
>>>
>>> Thanks,
>>>
>>> Aaron Thompson
>>> Vanderbilt University
>>> aaron.p.thompsonvanderbilt.edu
>>>
>>>
>>>
>>> On Jun 9, 2007, at 11:38 PM, Aaron Thompson
wrote:
>>>
>>>> Greg,
>>>> 	I tried using those flags, but I got the
same error.  If this
>>>> helps,
>>>> here's my output from mpif77 -showme:
>>>>
>>>> /usr/local/bin/gfortran
-I/usr/local/lammpi/include -Wl,-u -
>>>> Wl,_lam_darwin_malloc_linker_hack
-Wl,-multiply_defined,suppress -
>>>> Wl,-
>>>> force_flat_namespace -Wl,-flat_namespace
-Wl,-multiply_defined -
>>>> Wl,suppress -L/usr/local/lammpi/lib
-llammpio -llamf77mpi -lmpi -
>>>> llam
>>>> -ldl
>>>>
>>>> Any ideas?
>>>>
>>>> Thank you!
>>>>
>>>> Aaron Thompson
>>>> Vanderbilt University
>>>> aaron.p.thompsonvanderbilt.edu
>>>>
>>>>
>>>>
>>>> On Jun 9, 2007, at 9:41 PM, Gregory J.
Orris wrote:
>>>>
>>>>> Aaron,
>>>>>
>>>>> If you are using it in 64-bit mode
you'll need to do a bit more
>>>>> work.
>>>>> But it looks like you're using it in
32, so...
>>>>> Try
>>>>> LDFLAGS = "-Wl,-multiply_defined
-Wl,suppress"
>>>>>
>>>>> Regards,
>>>>> Greg
>>>>>
>>>>> On Jun 9, 2007, at 2:37 PM, Aaron
Thompson wrote:
>>>>>
>>>>>> Hi,
>>>>>> 	I've got LAM-MPI compiled and
running, and C programs compile  
>>>>>> and
>>>>>> run great.  However, I'm trying to
compile a Fortran-based  
>>>>>> program
>>>>>> and I'm getting a linking error
about "multiple definitions of
>>>>>> symbol
>>>>>> _atexit".  Could this be due
to some linker flags I set wrong?
>>>>>> Here
>>>>>> are my linker flags:
>>>>>>
>>>>>>
LD="/usr/local/lammpi/bin/mpif77 -o" 
>>>>>> LDFLAGS="-O2 -ffast-math
--allow-multiple-definition" 
>>>>>>
>>>>>>
>>>>>> Here's the exact error I'm
getting:
>>>>>>
>>>>>> /usr/local/lammpi/bin/mpif77 -o
DLPOLY.X setup_module.o .......
>>>>>> /usr/bin/ld: multiple definitions
of symbol _atexit
>>>>>>
/usr/local/lib/gcc/powerpc-apple-darwin8.6.0/4.2.0/crt3.o
private
>>>>>> external definition of _atexit in
section (__TEXT,__text)
>>>>>> /usr/lib/libdl.dylib(atexit.So)
definition of _atexit
>>>>>> /usr/bin/ld: multiple definitions
of symbol ___cxa_atexit
>>>>>>
/usr/local/lib/gcc/powerpc-apple-darwin8.6.0/4.2.0/crt3.o
private
>>>>>> external definition of
___cxa_atexit in section (__TEXT,__text)
>>>>>> /usr/lib/libdl.dylib(atexit.So)
definition of ___cxa_atexit
>>>>>> collect2: ld returned 1 exit
status
>>>>>>
>>>>>> Thank you!
>>>>>>
>>>>>> Aaron Thompson
>>>>>> Vanderbilt University
>>>>>> aaron.p.thompsonvanderbilt.edu
>>>>>>
>>>>>>
>>>>>>
_______________________________________________
>>>>>> This list is archived at http://www.l
am-mpi.org/MailArchives/lam/
>>>>>>
>>>>>
>>>>>
_______________________________________________
>>>>> This list is archived at http://www.l
am-mpi.org/MailArchives/lam/
>>>>
>>>>
_______________________________________________
>>>> This list is archived at http://www.l
am-mpi.org/MailArchives/lam/
>>>
>>>
_______________________________________________
>>> This list is archived at http://www.l
am-mpi.org/MailArchives/lam/
>>>
>> _______________________________________________
>> This list is archived at http://www.l
am-mpi.org/MailArchives/lam/
>
> _______________________________________________
> This list is archived at http://www.l
am-mpi.org/MailArchives/lam/
>

_______________________________________________
This list is archived at http://www.l
am-mpi.org/MailArchives/lam/

Re: LAM: Linker errors compiling Fortran program
country flaguser name
United States
2007-06-11 14:19:49
Thanks for the tip, but I got everything working as it
should with  
gfortan 4.2 using the compile flags that Brian Barrett
suggested.  Is  
there any other reason for me to do the extra work to update
to 4.3?

Thank you,

Aaron Thompson
Vanderbilt University
aaron.p.thompsonvanderbilt.edu



On Jun 11, 2007, at 2:00 PM, Gregory Orris wrote:

> Aaron
> May I suggest loading gfortran 4.3.
> It seems to work fine on the intel's.
> Haven't tried it on my old G5.
>
> for the record, mpich is scripted. lam is a compiled
binary.
>
> Regards,
> Greg
>
> On Jun 11, 2007, at 10:38, Aaron Thompson wrote:
>
>> I just looked at mpif77 using vi.  Call me crazy,
but it definitely
>> seems like a binary executable to me (lots of ^^G^^^^E^^^).
>> Is there some LAM build configure option where you
can compile it as
>> a shell script as opposed to a binary?
>>
>> Thank you,
>>
>> Aaron Thompson
>> Vanderbilt University
>> aaron.p.thompsonvanderbilt.edu
>>
>>
>>
>> On Jun 11, 2007, at 8:47 AM, Konrad Karczewski
wrote:
>>
>>> Hi,
>>>
>>> The mpif77 is a script - you can edit it
manually without any
>>> problem.
>>>
>>> HtH
>>> Konrad Karczewski
>>>
>>> On Sun, 10 Jun 2007, Aaron Thompson wrote:
>>>
>>>> I fixed the problem!  Looks like there's
some sort of bug in gcc
>>>> 4.2.0 on Mac OS X 10.4 when using
-force_flat_namespace.  For those
>>>> searching the list with the same problem,
see here: http://
>>>>
gcc.gnu.org/ml/gcc-bugs/2006-05/msg00273.html
>>>> Instead of using mpif77, I ran gfortran
without the linker and
>>>> excluded -force_flat_namespace manually. 
Is there any way I can
>>>> change the arguments that mpif77 uses
without recompiling?
>>>>
>>>> Thanks,
>>>>
>>>> Aaron Thompson
>>>> Vanderbilt University
>>>> aaron.p.thompsonvanderbilt.edu
>>>>
>>>>
>>>>
>>>> On Jun 9, 2007, at 11:38 PM, Aaron Thompson
wrote:
>>>>
>>>>> Greg,
>>>>> 	I tried using those flags, but I got
the same error.  If this
>>>>> helps,
>>>>> here's my output from mpif77 -showme:
>>>>>
>>>>> /usr/local/bin/gfortran
-I/usr/local/lammpi/include -Wl,-u -
>>>>> Wl,_lam_darwin_malloc_linker_hack
-Wl,-multiply_defined,suppress -
>>>>> Wl,-
>>>>> force_flat_namespace
-Wl,-flat_namespace -Wl,-multiply_defined -
>>>>> Wl,suppress -L/usr/local/lammpi/lib
-llammpio -llamf77mpi -lmpi -
>>>>> llam
>>>>> -ldl
>>>>>
>>>>> Any ideas?
>>>>>
>>>>> Thank you!
>>>>>
>>>>> Aaron Thompson
>>>>> Vanderbilt University
>>>>> aaron.p.thompsonvanderbilt.edu
>>>>>
>>>>>
>>>>>
>>>>> On Jun 9, 2007, at 9:41 PM, Gregory J.
Orris wrote:
>>>>>
>>>>>> Aaron,
>>>>>>
>>>>>> If you are using it in 64-bit mode
you'll need to do a bit more
>>>>>> work.
>>>>>> But it looks like you're using it
in 32, so...
>>>>>> Try
>>>>>> LDFLAGS =
"-Wl,-multiply_defined -Wl,suppress"
>>>>>>
>>>>>> Regards,
>>>>>> Greg
>>>>>>
>>>>>> On Jun 9, 2007, at 2:37 PM, Aaron
Thompson wrote:
>>>>>>
>>>>>>> Hi,
>>>>>>> 	I've got LAM-MPI compiled and
running, and C programs compile
>>>>>>> and
>>>>>>> run great.  However, I'm trying
to compile a Fortran-based
>>>>>>> program
>>>>>>> and I'm getting a linking error
about "multiple definitions of
>>>>>>> symbol
>>>>>>> _atexit".  Could this be
due to some linker flags I set wrong?
>>>>>>> Here
>>>>>>> are my linker flags:
>>>>>>>
>>>>>>>
LD="/usr/local/lammpi/bin/mpif77 -o" 
>>>>>>> LDFLAGS="-O2 -ffast-math
--allow-multiple-definition" 
>>>>>>>
>>>>>>>
>>>>>>> Here's the exact error I'm
getting:
>>>>>>>
>>>>>>> /usr/local/lammpi/bin/mpif77 -o
DLPOLY.X setup_module.o .......
>>>>>>> /usr/bin/ld: multiple
definitions of symbol _atexit
>>>>>>>
/usr/local/lib/gcc/powerpc-apple-darwin8.6.0/4.2.0/crt3.o  
>>>>>>> private
>>>>>>> external definition of _atexit
in section (__TEXT,__text)
>>>>>>> /usr/lib/libdl.dylib(atexit.So)
definition of _atexit
>>>>>>> /usr/bin/ld: multiple
definitions of symbol ___cxa_atexit
>>>>>>>
/usr/local/lib/gcc/powerpc-apple-darwin8.6.0/4.2.0/crt3.o  
>>>>>>> private
>>>>>>> external definition of
___cxa_atexit in section (__TEXT,__text)
>>>>>>> /usr/lib/libdl.dylib(atexit.So)
definition of ___cxa_atexit
>>>>>>> collect2: ld returned 1 exit
status
>>>>>>>
>>>>>>> Thank you!
>>>>>>>
>>>>>>> Aaron Thompson
>>>>>>> Vanderbilt University
>>>>>>> aaron.p.thompsonvanderbilt.edu
>>>>>>>
>>>>>>>
>>>>>>>
_______________________________________________
>>>>>>> This list is archived at http://www.lam-m
pi.org/MailArchives/ 
>>>>>>> lam/
>>>>>>>
>>>>>>
>>>>>>
_______________________________________________
>>>>>> This list is archived at http://www.l
am-mpi.org/MailArchives/lam/
>>>>>
>>>>>
_______________________________________________
>>>>> This list is archived at http://www.l
am-mpi.org/MailArchives/lam/
>>>>
>>>>
_______________________________________________
>>>> This list is archived at http://www.l
am-mpi.org/MailArchives/lam/
>>>>
>>>
_______________________________________________
>>> This list is archived at http://www.l
am-mpi.org/MailArchives/lam/
>>
>> _______________________________________________
>> This list is archived at http://www.l
am-mpi.org/MailArchives/lam/
>>
>
> _______________________________________________
> This list is archived at http://www.l
am-mpi.org/MailArchives/lam/

_______________________________________________
This list is archived at http://www.l
am-mpi.org/MailArchives/lam/

[1-9]

about | contact  Other archives ( Real Estate discussion Medical topics )