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

sasha lambert lambert.sasha at gmail.com
Sun Aug 15 10:02:24 CDT 2010


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/mpich-discuss/attachments/20100815/78aaa0e5/attachment.htm>


More information about the mpich-discuss mailing list