LAM/MPI logo

LAM/MPI General User's Mailing List Archives

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

From: Yu Chen (chen_at_[hidden])
Date: 2007-03-30 16:09:28


Thanks Jeff, and Davide,

I actually sucessfully compiled everthing with passing the FFLAGS to LAM
configure/build, although I have not run the application yet.

Do you mean even if it compiles, don't do the -f thing?
I think after I took out the FFLAGS from both, the undefined errors are
MPI unrelated, but I don't see any other libriaries being used. I am not
actually a programmer, it's other people's software. So I don't know too
much about the program. Could it be the '-f' is in his code, and has to be
there?

Regards,
Chen

>>>> FFLAGS = -fno-underscoring -O
>>>> FFLAGS2 = -fno-underscoring -O
>>>
>>> What are FFLAGS and FFLAGS2 used for? Are those flags passed to
>>> LAM's configure/build process, or just to the configure/build process
>>> of your application?
>>>
>>> If they're just passed to your application, I suspect that this is
>>> your problem (i.e., remove them and things should be fine).
>>
>> Yeah, it just passed to the application, I removed them, but still not
>> working, although it gave lot less undefined errors, I will try to
>> pass
>> that to LAM's configure/build process, see it that works.
>
> No, don't do that.
>
> The issue here is that all Fortran compilers have a specific name-
> mangling scheme. There are 4 typical schemes:
>
> - all lower case
> - all upper case
> - add one underscore to the end of the symbol
> - add one underscore to the end of the symbol unless there's already
> an underscore in the symbol -- then add 2 underscores
>
> You just need LAM and your application to match. If you use the -f
> switch, you're telling the fortran compiler to change its name
> mangling scheme. Using the "native" scheme is usually the easiest.
> So just don't pass the -f flag to either LAM's or your application's
> build process.

>
> If you're getting other missing symbols, are they LAM or MPI
> related? If not, you might want to check the -f settings for your
> other libraries, ensure that you're linking in all the right
> libraries, etc.
>
>> Regards,
>> Chen
>>
>>
>>>
>>>> Regards,
>>>> Chen
>>>>
>>>>
>>>>> It sounds like you have a case of compiling LAM/MPI with one
>>>>> fortran
>>>>> compiler and compiling your application with a different Fortran
>>>>> compiler.
>>>>>
>>>>> Can you verify that you're using the same Fortran compiler for
>>>>> both?
>>>>>
>>>>>
>>>>> On Mar 29, 2007, at 1:39 PM, Yu Chen wrote:
>>>>>
>>>>>> Hi, wondering if someone can help me out;
>>>>>>
>>>>>> I am using RHEL 4, with g95 version of G95 (GCC 4.0.3 (g95 0.90!)
>>>>>> Jul 27
>>>>>> 2006), when installing LAM-MPI 7.1.3, everything is fine, the
>>>>>> "laminfo"
>>>>>> and "mpif77 --showme" outputs follows. Then when I
>>>>>> tried to compile our program, it gave out following error.
>>>>>>
>>>>>> ......
>>>>>> In function `MAIN_':
>>>>>> : undefined reference to `mpi_init'
>>>>>> In function `MAIN_':
>>>>>> : undefined reference to `mpi_comm_rank'
>>>>>> In function `MAIN_':
>>>>>> : undefined reference to `mpi_comm_size'
>>>>>> In function `MAIN_':
>>>>>> : undefined reference to `mpi_barrier'
>>>>>> In function `MAIN_':
>>>>>> : undefined reference to `mpi_bcast'
>>>>>> In function `MAIN_':
>>>>>> : undefined reference to `mpi_bcast'
>>>>>> undefined reference to `mpi_comm_dup_fn'
>>>>>> undefined reference to `mpi_comm_null_delete_fn'
>>>>>> undefined reference to `mpi_comm_null_copy_fn'
>>>>>> undefined reference to `mpi_dup_fn'
>>>>>> undefined reference to `mpi_null_copy_fn'
>>>>>> undefined reference to `mpi_null_delete_fn'
>>>>>> undefined reference to `mpi_type_null_copy_fn'
>>>>>> undefined reference to `mpi_type_null_delete_fn'
>>>>>> undefined reference to `mpi_type_dup_fn'
>>>>>> undefined reference to `mpi_win_null_copy_fn'
>>>>>> undefined reference to `mpi_win_dup_fn'
>>>>>> undefined reference to `mpi_win_null_delete_fn'
>>>>>> ......
>>>>>>
>>>>>> #### Laminfo output ####
>>>>>> LAM/MPI: 7.1.3
>>>>>> Prefix: /usr/local/lam-g95
>>>>>> Architecture: x86_64-unknown-linux-gnu
>>>>>> Configured by: cheny
>>>>>> Configured on: Thu Mar 29 10:26:01 EDT 2007
>>>>>> Memory manager: ptmalloc2
>>>>>> C bindings: yes
>>>>>> C++ bindings: yes
>>>>>> Fortran bindings: yes
>>>>>> C compiler: gcc
>>>>>> C++ compiler: g++
>>>>>> Fortran compiler: /usr/local/g95-32/bin/g95
>>>>>> Fortran symbols: double_underscore
>>>>>> C profiling: yes
>>>>>> C++ profiling: yes
>>>>>> Fortran profiling: yes
>>>>>> C++ exceptions: no
>>>>>> Thread support: yes
>>>>>> ROMIO support: yes
>>>>>> IMPI support: no
>>>>>> Debug support: no
>>>>>> Purify clean: no
>>>>>> SSI boot: globus (API v1.1, Module v0.6)
>>>>>> SSI boot: rsh (API v1.1, Module v1.1)
>>>>>> SSI boot: slurm (API v1.1, Module v1.0)
>>>>>> SSI coll: lam_basic (API v1.1, Module v7.1)
>>>>>> SSI coll: shmem (API v1.1, Module v1.0)
>>>>>> SSI coll: smp (API v1.1, Module v1.2)
>>>>>> SSI rpi: crtcp (API v1.1, Module v1.1)
>>>>>> SSI rpi: lamd (API v1.0, Module v7.1)
>>>>>> SSI rpi: sysv (API v1.0, Module v7.1)
>>>>>> SSI rpi: tcp (API v1.0, Module v7.1)
>>>>>> SSI rpi: usysv (API v1.0, Module v7.1)
>>>>>> SSI cr: self (API v1.0, Module v1.0)
>>>>>>
>>>>>> #### mpif77 --showme outputs ####
>>>>>> /usr/local/g95-32/bin/g95 -I/usr/local/lam-g95/include -pthread
>>>>>> -L/usr/local/lam-g95/lib -llammpio -llamf77mpi -lmpi -llam -laio -
>>>>>> laio
>>>>>> -lutil -ldl
>>>>>>
>>>>>> Thank you
>>>>>>
>>>>>> Chen
>>>>>>
>>>>>> ===========================================
>>>>>> Yu Chen
>>>>>> Howard Hughes Medical Institute
>>>>>> Chemistry Building, Rm 182
>>>>>> University of Maryland at Baltimore County
>>>>>> 1000 Hilltop Circle
>>>>>> Baltimore, MD 21250
>>>>>>
>>>>>> phone: (410)455-6347 (primary)
>>>>>> (410)455-2718 (secondary)
>>>>>> fax: (410)455-1174
>>>>>> email: chen_at_[hidden]
>>>>>> ===========================================
>>>>>> _______________________________________________
>>>>>> This list is archived at http://www.lam-mpi.org/MailArchives/lam/
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> ===========================================
>>>> Yu Chen
>>>> Howard Hughes Medical Institute
>>>> Chemistry Building, Rm 182
>>>> University of Maryland at Baltimore County
>>>> 1000 Hilltop Circle
>>>> Baltimore, MD 21250
>>>>
>>>> phone: (410)455-6347 (primary)
>>>> (410)455-2718 (secondary)
>>>> fax: (410)455-1174
>>>> email: chen_at_[hidden]
>>>> ===========================================
>>>> _______________________________________________
>>>> This list is archived at http://www.lam-mpi.org/MailArchives/lam/
>>>
>>>
>>>
>>
>>
>> ===========================================
>> Yu Chen
>> Howard Hughes Medical Institute
>> Chemistry Building, Rm 182
>> University of Maryland at Baltimore County
>> 1000 Hilltop Circle
>> Baltimore, MD 21250
>>
>> phone: (410)455-6347 (primary)
>> (410)455-2718 (secondary)
>> fax: (410)455-1174
>> email: chen_at_[hidden]
>> ===========================================
>> _______________________________________________
>> This list is archived at http://www.lam-mpi.org/MailArchives/lam/
>
>
>

===========================================
Yu Chen
Howard Hughes Medical Institute
Chemistry Building, Rm 182
University of Maryland at Baltimore County
1000 Hilltop Circle
Baltimore, MD 21250

phone: (410)455-6347 (primary)
         (410)455-2718 (secondary)
fax: (410)455-1174
email: chen_at_[hidden]
===========================================