Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

656
Views
Abrir MPI: mpirun sale con un error en un programa simple

Recientemente instalé OpenMPI en mi computadora y cuando intento ejecutar un programa simple de Hello World, sale con el siguiente error:

 ------------------------------------------------------- Primary job terminated normally, but 1 process returned a non-zero exit code.. Per user-direction, the job has been aborted. -------------------------------------------------------

Este es el código fuente del programa:

 #include <mpi.h> #include <stdio.h> int main(int argc, char *argv[]) { int size, rank; MPI_Init(&argc, &argv); MPI_Comm_size(MPI_COMM_WORLD, &size); MPI_Comm_rank(MPI_COMM_WORLD, &rank); printf("Hello\n"); MPI_Finalize(); return 0; }

Así compilo el programa:

 mpicc -o hello hello.c

y lo ejecuto con

 mpirun -np 2 hello

No arroja errores en la compilación, y si ejecuto ./hello , funciona bien.

Disculpe mi inglés, cualquier corrección será bienvenida.

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

tienes que ./ el nombre del ejecutable prueba esto, mpirun -np 2 ./hello

over 4 years ago · Santiago Trujillo Report

0

Tratar:

 mpirun -x LD_PRELOAD=libmpi.so -np 2 hello

Si funciona, probablemente tenga un problema con su instalación de OpenMPI. Una solución sencilla sería definir un alias. Si usa bash, agregue ~/.bashrc :

 alias mpirun='mpirun -x LD_PRELOAD=libmpi.so'
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!