So if i give the full path to mpicc, this is what i get:<div><br></div><div><div>$ /usr/local/bin/mpicc -show</div><div>gcc -I/usr/local/include -L/usr/local/lib -L/usr/local/lib -lpmpich -lmpich -lopa -lpthread</div><div>
<br></div><div>Make sense?</div><br><div class="gmail_quote">On Sun, Aug 15, 2010 at 7:57 PM, Rajeev Thakur <span dir="ltr"><<a href="mailto:thakur@mcs.anl.gov">thakur@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
That mpicc is from Open MPI, not MPICH2. Give the full path to mpicc.<br>
<div><div></div><div class="h5"><br>
<br>
On Aug 15, 2010, at 1:37 PM, sasha lambert wrote:<br>
<br>
> That would be the following:<br>
><br>
> $ mpicc -show<br>
> gcc -D_REENTRANT -Wl,-u,_munmap -Wl,-multiply_defined,suppress -lmpi -lopen-rte -lopen-pal<br>
><br>
> S<br>
><br>
> On Sun, Aug 15, 2010 at 1:08 PM, <a href="mailto:michael.bane@manchester.ac.uk">michael.bane@manchester.ac.uk</a> <<a href="mailto:michael.bane@manchester.ac.uk">michael.bane@manchester.ac.uk</a>> wrote:<br>
> What is output of mpicc -show<br>
><br>
> ---<br>
> Michael<br>
><br>
><br>
> ----- Reply message -----<br>
> From: "sasha lambert" <<a href="mailto:lambert.sasha@gmail.com">lambert.sasha@gmail.com</a>><br>
> Date: Sun, Aug 15, 2010 17:32<br>
> Subject: [mpich-discuss] libmpich.a "No such file or directory"<br>
> To: <<a href="mailto:mpich-discuss@mcs.anl.gov">mpich-discuss@mcs.anl.gov</a>><br>
><br>
> Still nothing : ( There must be something basic i'm missing, or syntax error somewhere. Hmm.<br>
><br>
> Thanks for the help!<br>
><br>
> Sasha<br>
><br>
> On Sun, Aug 15, 2010 at 11:59 AM, Si Hammond <<a href="mailto:simon.hammond@gmail.com">simon.hammond@gmail.com</a>> wrote:<br>
> Pretty odd.<br>
><br>
> Have you tried specifying the exact path?<br>
><br>
> mpicc -o /home/abcd/main.o main.c<br>
> mpicc -o /home/abcd/hello /home/acbd/main.o<br>
><br>
><br>
> S.<br>
><br>
><br>
> On 15 Aug 2010, at 16:38, sasha lambert wrote:<br>
><br>
>> Hmm still nothing; no errors but no main.o.<br>
>> My mpich configure, make, and make install steps went smoothly. The "which mpicc" test was successful, indicating its location at usr/bin.<br>
>><br>
>> Sasha<br>
>><br>
>> On Sun, Aug 15, 2010 at 11:25 AM, Si Hammond <<a href="mailto:simon.hammond@gmail.com">simon.hammond@gmail.com</a>> wrote:<br>
>> Can you try...<br>
>><br>
>> mpicc -o main.o -c main.c<br>
>> mpicc -o hello main.o<br>
>><br>
>> You should see the main.o in the directory, if no errors on the screen then it sounds like its working fine.<br>
>><br>
>><br>
>> S.<br>
>><br>
>> On 15 Aug 2010, at 16:21, sasha lambert wrote:<br>
>><br>
>>> I tried compiling using mpicc, and nothing seems to happen.<br>
>>> The prompt just reappears and no executable file has been made.<br>
>>><br>
>>> Sasha<br>
>>><br>
>>> On Sun, Aug 15, 2010 at 11:12 AM, Si Hammond <<a href="mailto:simon.hammond@gmail.com">simon.hammond@gmail.com</a>> wrote:<br>
>>> Have you tried compiling with mpicc?<br>
>>><br>
>>> mpicc -o hello main.c<br>
>>><br>
>>> This sets up the linking etc for you.<br>
>>><br>
>>><br>
>>><br>
>>> S.<br>
>>><br>
>>><br>
>>> On 15 Aug 2010, at 16:02, sasha lambert wrote:<br>
>>><br>
>>>> I'm fairly new to unix and mpich, so please bear with me.<br>
>>>><br>
>>>> I've tried to compile a simple "hello" program below:<br>
>>>><br>
>>>> /*The Parallel Hello World Program*/<br>
>>>> #include <stdio.h><br>
>>>> #include <mpi.h><br>
>>>><br>
>>>> main(int argc, char **argv)<br>
>>>> {<br>
>>>> int node;<br>
>>>> MPI_Init(&argc,&argv);<br>
>>>> MPI_Comm_rank(MPI_COMM_WORLD, &node);<br>
>>>><br>
>>>> printf("Hello World from Node %d\n",node);<br>
>>>><br>
>>>> MPI_Finalize();<br>
>>>> }<br>
>>>><br>
>>>> Here is the shell response:<br>
>>>><br>
>>>> $ gcc main.c -o hello<br>
>>>> Undefined symbols:<br>
>>>> "_MPI_Comm_rank", referenced from:<br>
>>>> _main in ccWLoMyo.o<br>
>>>> "_MPI_Finalize", referenced from:<br>
>>>> _main in ccWLoMyo.o<br>
>>>> "_MPI_Init", referenced from:<br>
>>>> _main in ccWLoMyo.o<br>
>>>> ld: symbol(s) not found<br>
>>>> collect2: ld returned 1 exit status<br>
>>>><br>
>>>> I tried searching for "MPI_init" in libmpich.a, thinking it might have to do with the added underscore in " _MPI_Init".<br>
>>>> Shell response:<br>
>>>><br>
>>>> $ nm libmpich.a | grep mpi_init<br>
>>>> nm: can't open file: libmpich.a (No such file or directory)<br>
>>>><br>
>>>> I've added usr/local/lib to the PATH, but still nothing. Any suggestions?<br>
>>>><br>
>>>> Thanks,<br>
>>>> Sasha<br>
>>>> _______________________________________________<br>
>>>> mpich-discuss mailing list<br>
>>>> <a href="mailto:mpich-discuss@mcs.anl.gov">mpich-discuss@mcs.anl.gov</a><br>
>>>> <a href="https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss" target="_blank">https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss</a><br>
>>><br>
>>><br>
>>> ---------------------------------------------------------------------------------------<br>
>>> Si Hammond<br>
>>><br>
>>> Research Fellow & Knowledge Transfer Associate<br>
>>> Performance Computing & Visualisation Group<br>
>>> Department of Computer Science<br>
>>> University of Warwick, CV4 7AL, UK<br>
>>> <a href="http://go.warwick.ac.uk/hpsg" target="_blank">http://go.warwick.ac.uk/hpsg</a><br>
>>> ----------------------------------------------------------------------------------------<br>
>>><br>
>>><br>
>>><br>
>>><br>
>>><br>
>>> _______________________________________________<br>
>>> mpich-discuss mailing list<br>
>>> <a href="mailto:mpich-discuss@mcs.anl.gov">mpich-discuss@mcs.anl.gov</a><br>
>>> <a href="https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss" target="_blank">https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss</a><br>
>>><br>
>>><br>
>>> _______________________________________________<br>
>>> mpich-discuss mailing list<br>
>>> <a href="mailto:mpich-discuss@mcs.anl.gov">mpich-discuss@mcs.anl.gov</a><br>
>>> <a href="https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss" target="_blank">https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss</a><br>
>><br>
>><br>
>> ---------------------------------------------------------------------------------------<br>
>> Si Hammond<br>
>><br>
>> Research Fellow & Knowledge Transfer Associate<br>
>> Performance Computing & Visualisation Group<br>
>> Department of Computer Science<br>
>> University of Warwick, CV4 7AL, UK<br>
>> <a href="http://go.warwick.ac.uk/hpsg" target="_blank">http://go.warwick.ac.uk/hpsg</a><br>
>> ----------------------------------------------------------------------------------------<br>
>><br>
>><br>
>><br>
>><br>
>><br>
>> _______________________________________________<br>
>> mpich-discuss mailing list<br>
>> <a href="mailto:mpich-discuss@mcs.anl.gov">mpich-discuss@mcs.anl.gov</a><br>
>> <a href="https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss" target="_blank">https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss</a><br>
>><br>
>><br>
>> _______________________________________________<br>
>> mpich-discuss mailing list<br>
>> <a href="mailto:mpich-discuss@mcs.anl.gov">mpich-discuss@mcs.anl.gov</a><br>
>> <a href="https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss" target="_blank">https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss</a><br>
><br>
><br>
> ---------------------------------------------------------------------------------------<br>
> Si Hammond<br>
><br>
> Research Fellow & Knowledge Transfer Associate<br>
> Performance Computing & Visualisation Group<br>
> Department of Computer Science<br>
> University of Warwick, CV4 7AL, UK<br>
> <a href="http://go.warwick.ac.uk/hpsg" target="_blank">http://go.warwick.ac.uk/hpsg</a><br>
> ----------------------------------------------------------------------------------------<br>
><br>
><br>
><br>
><br>
><br>
> _______________________________________________<br>
> mpich-discuss mailing list<br>
> <a href="mailto:mpich-discuss@mcs.anl.gov">mpich-discuss@mcs.anl.gov</a><br>
> <a href="https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss" target="_blank">https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss</a><br>
><br>
><br>
><br>
> _______________________________________________<br>
> mpich-discuss mailing list<br>
> <a href="mailto:mpich-discuss@mcs.anl.gov">mpich-discuss@mcs.anl.gov</a><br>
> <a href="https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss" target="_blank">https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss</a><br>
<br>
_______________________________________________<br>
mpich-discuss mailing list<br>
<a href="mailto:mpich-discuss@mcs.anl.gov">mpich-discuss@mcs.anl.gov</a><br>
<a href="https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss" target="_blank">https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss</a><br>
</div></div></blockquote></div><br></div>