[mpich-discuss] mpif90 and mpicc problems
jcrosby
jcrosby at scotiaweather.com
Tue Sep 9 09:49:12 CDT 2008
Thanks all for the replies and the help with mpich2. It would seem that
the error lies within the code I am trying to compile.
Thanks again for the help.
Rajeev Thakur wrote:
> You need to build MPICH2 with the same Fortran compiler as the code you
> want to run. You can do so by setting the environment variables F77 and
> F90 to the names of the compilers before running configure.
>
>
>
> jcrosby wrote:
>
>> Ohh, I see it now. I was running just mpif90/mpicc by themselves and
>> getting that error. I tested it on the f90 example in the example dir
>> and it made an a.out file which ran. So it did install correctly and
>> does work.
>>
>> Reason I was asking was because I have a program I'm trying to compile
>> that uses bpif90 and mpicc. However that program returns errors while
>> compiling. I asked that user group and they told me that it mpich was
>> most likely the issue. But seeing as mpif90 and mpicc compiled the
>> example programs it must be something on the other end.
>>
>> I'll give a snip of the error the program I'm trying to compile is
>> giving, maybe someones seen it with something else.
>>
>> [Error]
>> solve_nmm.f90:(.text+0x518): undefined reference to `mpi_send_'
>> solve_nmm.f90:(.text+0x555): undefined reference to `mpi_barrier_'
>> solve_nmm.f90:(.text+0xc0e): undefined reference to `mpi_recv_'
>> [/Error]
>>
>> Their code is giving me that but they keep telling me its my MPI install.
>>
>> Rajeev Thakur wrote:
>>
>>> Good point. We will look into it.
>>> Rajeev
>>>
>>> ------------------------------------------------------------------------
>>> *From:* owner-mpich-discuss at mcs.anl.gov
>>> [mailto:owner-mpich-discuss at mcs.anl.gov] *On Behalf Of *linzhenhua
>>> *Sent:* Saturday, September 06, 2008 9:49 AM
>>> *To:* mpich-discuss at mcs.anl.gov
>>> *Subject:* Re:RE: [mpich-discuss] mpif90 and mpicc problems
>>>
>>> I think I have also got similiar message when I just begin to try
>>> mpich2. It bother me for quite some time.
>>>
>>> Later I know if I just type the command without source file,there
>>> will be such errors. I think it will be better if the developers
>>> can change this default behavior when typing the command without
>>> source file.
>>>
>>> --
>>>
>>> 在2008-09-06,"Rajeev Thakur" <thakur at mcs.anl.gov> 写道:
>>> >Did you try to compile a program with mpicc/mpif90, i.e., "mpicc foo.c" or
>>> >"mpif90 foo.f90"? If you just run "mpicc" or "mpif90", you will get
>>> >something like the messages below.
>>> >
>>> >Do the example programs in the examples and examples/f90 directories
>>> >compile?
>>> >
>>> >Rajeev
>>> >
>>> >
>>> >
>>> >> -----Original Message-----
>>> >> From: owner-mpich-discuss at mcs.anl.gov
>>> >> [mailto:owner-mpich-discuss at mcs.anl.gov] On Behalf Of jcrosby
>>> >> Sent: Friday, September 05, 2008 9:34 AM
>>> >> To: mpich-discuss at mcs.anl.gov
>>> >> Subject: [mpich-discuss] mpif90 and mpicc problems
>>> >>
>>> >> Good morning,
>>> >>
>>> >> I'm having a few problems getting mpif90 and mpicc to work.
>>> >> Whenever I run them I get the following errors:
>>> >> MPIF90:
>>> >> /opt/intel/fc/10.1.015/lib/for_main.o: In function `main':
>>> >> /users/nbtester/x86linux_nightly/branch-10_1/20080313_000000/l
>>> >> ibdev/frtl/src/libfor/for_main.c:(.text+0x39):
>>> >> undefined reference to `MAIN__'
>>> >>
>>> >> MPICC:
>>> >> /usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/crt1.o: In function
>>> >> `_start':
>>> >> (.text+0x18): undefined reference to `main'
>>> >> collect2: ld returned 1 exit status
>>> >>
>>> >>
>>> >> --
>>> >> Joseph Crosby
>>> >> Network Administrator
>>> >> Scotia Weather Service Inc.
>>> >> netadmin at scotiaweather.com
>>> >> -----------
>>> >> A byte walks into a bar and orders a pint. Bartender asks him
>>> >> "What's wrong?" Byte says "Parity error." Bartender nods and
>>> >> says "Yeah, I thought you looked a bit off."
>>> >>
>>> >>
>>> >
>>>
>>>
>>>
>>>
>>> ------------------------------------------------------------------------
>>> 超大花房赠送,60万轻松入住顺鑫花语
>>> <http://popme.163.com/link/003984_0905_5286.html>
>>>
>>>
>>
>
>
--
Joseph Crosby
Network Administrator
Scotia Weather Service Inc.
netadmin at scotiaweather.com
-----------
A byte walks into a bar and orders a pint. Bartender asks him "What's wrong?" Byte says "Parity error." Bartender nods and says "Yeah, I thought you looked a bit off."
More information about the mpich-discuss
mailing list