0

PROGRAM :

#include <stdio.h>
#include <mpi.h>


int main (argc, argv)
int argc;
char *argv[];
{
    int rank, size;

    MPI_Init (&argc, &argv);    /* starts MPI */
    MPI_Comm_rank (MPI_COMM_WORLD, &rank);  /* get current process id */
    MPI_Comm_size (MPI_COMM_WORLD, &size);  /* get number of processes */
    printf( "Hello world from process %d of %d\n", rank, size );
    MPI_Finalize();
    return 0;
}

ERROR :

/usr/lib/gcc/i586-suse-linux/4.4/../../../../i586-suse-linux/bin/ld: cannot find -lopen-rte
collect2: ld returned 1 exit status

command for compilation :mpicc hello.c -o ./hello. I am trying to build a cluster of openSUSE nodes. So I am testing if mpich2 programs run on every node.

rene
  • 41,474
  • 78
  • 114
  • 152
  • Check these links, it seems your system is misconfigured (e.g. you are missing some package) http://www.lam-mpi.org/MailArchives/lam/2010/04/14195.php, http://www.lam-mpi.org/MailArchives/lam/2010/04/14196.php – oz123 Feb 24 '14 at 07:03
  • That's a linker error; you're missing a key library (`libopen-rte.so`). – Jonathan Leffler Feb 24 '14 at 08:01
  • k thanks ...i'll fix that .....also on other nodes m getting this error: mpi.h no such file or directory – user3136546 Feb 24 '14 at 09:12

2 Answers2

1

libopen-rte.so refers to OpenMPI, not MPICH2. Check default MPI implementation using mpi-selector tool. I personally prefer OpenMPI.

Milos
  • 11
  • 1
0

It looks like you have two MPI libraries installed at the same time. While this is possible, it's usually a pain to configure and use if you're not very careful. I'd suggest uninstalling either Open MPI or MPICH. That should take care of your problem.

Wesley Bland
  • 8,816
  • 3
  • 44
  • 59