Hello all,


I am new to open-MPI programming and I have a strange error while running my
simple code:



My platform is a IBM T42 notebook with just a single-core processor, and I
just installed OpenSuSE 10.3 with KDevelop as my IDE. I have downloaded the
openmpi-1.2.5.tar.gz and install using the commands,



shell$ gunzip -c openmpi-1.2.5.tar.gz | tar xf - shell$ cd openmpi-1.2.5
shell$ ./configure --prefix=/usr/local <...lots of output...> shell$ make
all install



Then I add -lmpi, -lmpi_cxx, -lopen-pal, -lopen-rte, -lmca_common_sm options
to the link libraries outside project (LDADD) in the Automake Manager inside
Kdevelop. I have also added the PATH /usr/local/bin and LD_LIBRARY_PATH
/usr/local/lib in the Enviroment variables in the Run options of Project
Options. I can compile my code with no error.



Here are my codes,

#ifdef HAVE_CONFIG_H

#include <config.h>

#endif



#include <iostream>

#include <math.h>

#include <mpi.h>

//#include <iostream>

//#include <cstdlib>



using namespace std;



int main(int argc, char ** argv)

{

  int mynode, totalnodes;



  MPI_Init(&argc,&argv);

  MPI_Comm_size(MPI_COMM_WORLD, &totalnodes);

  MPI_Comm_rank(MPI_COMM_WORLD, &mynode);



  cout << "Hello world from processor " << mynode << " of " << totalnodes <<
endl;



  MPI_Finalize();

}



I am expecting the output as: Hello world from processor 0 of 1. But it does
not work and MPI failed to initialize. The output is strange:



[rollyopensuse:24924] [0,0,0] ORTE_ERROR_LOG: Error in file
runtime/orte_init_stage1.c at line 312

--------------------------------------------------------------------------

It looks like orte_init failed for some reason; your parallel process is
likely to abort.  There are many reasons that a parallel process can fail
during orte_init; some of which are due to configuration or environment
problems.  This failure appears to be an internal failure; here's some
additional information (which may only be relevant to an Open MPI
developer):



  orte_pls_base_select failed

  --> Returned value -1 instead of ORTE_SUCCESS



--------------------------------------------------------------------------

--------------------------------------------------------------------------

It looks like MPI_INIT failed for some reason; your parallel process is
likely to abort.  There are many reasons that a parallel process can fail
during MPI_INIT; some of which are due to configuration or environment
problems.  This failure appears to be an internal failure; here's some
additional information (which may only be relevant to an Open MPI

developer):



  ompi_mpi_init: orte_init_stage1 failed

  --> Returned "Error" (-1) instead of "Success" (0)

--------------------------------------------------------------------------

*** An error occurred in MPI_Init

*** before MPI was initialized

*** MPI_ERRORS_ARE_FATAL (goodbye)

[rollyopensuse:24924] Abort before MPI_INIT completed successfully; not able
to guarantee that all other processes were killed!

Press Enter to continue!



Did I must some important parameters while configuring the openMPI setup?
How can I correct the error? Thank you very much!



Regards,

Rolly



Reply via email to