[mpich-discuss] libmpich.a "No such file or directory"

sasha lambert lambert.sasha at gmail.com
Sun Aug 15 10:38:16 CDT 2010


Hmm still nothing; no errors but no main.o.
My mpich configure, make, and make install steps went smoothly. The "which
mpicc" test was successful, indicating its location at usr/bin.

Sasha

On Sun, Aug 15, 2010 at 11:25 AM, Si Hammond <simon.hammond at gmail.com>wrote:

> Can you try...
>
> mpicc -o main.o -c main.c
> mpicc -o hello main.o
>
> You should see the main.o in the directory, if no errors on the screen then
> it sounds like its working fine.
>
>
> S.
>
> On 15 Aug 2010, at 16:21, sasha lambert wrote:
>
> I tried compiling using mpicc, and nothing seems to happen.
> The prompt just reappears and no executable file has been made.
>
> Sasha
>
> On Sun, Aug 15, 2010 at 11:12 AM, Si Hammond <simon.hammond at gmail.com>wrote:
>
>> Have you tried compiling with mpicc?
>>
>> mpicc -o hello main.c
>>
>> This sets up the linking etc for you.
>>
>>
>>
>> S.
>>
>>
>> On 15 Aug 2010, at 16:02, sasha lambert wrote:
>>
>> I'm fairly new to unix and mpich, so please bear with me.
>>
>> I've tried to compile a simple "hello" program below:
>>
>> /*The Parallel Hello World Program*/
>> #include <stdio.h>
>> #include <mpi.h>
>>
>> main(int argc, char **argv)
>> {
>>  int node;
>> MPI_Init(&argc,&argv);
>>  MPI_Comm_rank(MPI_COMM_WORLD, &node);
>>
>>  printf("Hello World from Node %d\n",node);
>>
>>  MPI_Finalize();
>> }
>>
>> Here is the shell response:
>>
>> $ gcc main.c -o hello
>> Undefined symbols:
>>   "_MPI_Comm_rank", referenced from:
>>       _main in ccWLoMyo.o
>>   "_MPI_Finalize", referenced from:
>>       _main in ccWLoMyo.o
>>   "_MPI_Init", referenced from:
>>       _main in ccWLoMyo.o
>> ld: symbol(s) not found
>> collect2: ld returned 1 exit status
>>
>> I tried searching for "MPI_init" in libmpich.a, thinking it might have to
>> do with the added underscore in " _MPI_Init".
>> Shell response:
>>
>> $ nm libmpich.a | grep mpi_init
>> nm: can't open file: libmpich.a (No such file or directory)
>>
>> I've added usr/local/lib to the PATH, but still nothing. Any suggestions?
>>
>> Thanks,
>> Sasha
>> _______________________________________________
>> mpich-discuss mailing list
>> mpich-discuss at mcs.anl.gov
>> https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss
>>
>>
>>
>>
>> ---------------------------------------------------------------------------------------
>> Si Hammond
>>
>> Research Fellow & Knowledge Transfer Associate
>> Performance Computing & Visualisation Group
>> Department of Computer Science
>> University of Warwick, CV4 7AL, UK
>> http://go.warwick.ac.uk/hpsg
>>
>> ----------------------------------------------------------------------------------------
>>
>>
>>
>>
>>
>> _______________________________________________
>> mpich-discuss mailing list
>> mpich-discuss at mcs.anl.gov
>> https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss
>>
>>
> _______________________________________________
> mpich-discuss mailing list
> mpich-discuss at mcs.anl.gov
> https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss
>
>
>
>
> ---------------------------------------------------------------------------------------
> Si Hammond
>
> Research Fellow & Knowledge Transfer Associate
> Performance Computing & Visualisation Group
> Department of Computer Science
> University of Warwick, CV4 7AL, UK
> http://go.warwick.ac.uk/hpsg
>
> ----------------------------------------------------------------------------------------
>
>
>
>
>
> _______________________________________________
> mpich-discuss mailing list
> mpich-discuss at mcs.anl.gov
> https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/mpich-discuss/attachments/20100815/05270167/attachment-0001.htm>


More information about the mpich-discuss mailing list