LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-20-2005, 01:59 PM   #1
longredhat
LQ Newbie
 
Registered: Apr 2005
Posts: 1

Rep: Reputation: 0
Problem with MPI in Redhat 9


Hi.

I am using Redhat Linux 9 and LAM 6.5.8/MPI 2 C++/ROMEO -Indiana University (it go with Redhat, I think so).

I have a C program like this (greetings.c)
######################################

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

main (int argc, char** argv) {
int my_rank;
int p;
int source;
int dest;
int tag = 50;
char message[100];
MPI_Status status;

MPI_Init(&argc, &argv);
MPI_Comm_rank(MPI_COMM_WORLD, &my_rank);
MPI_Comm_Size(MPI_COMM_WORLD, &p);

if (my_rank != 0) {
sprintf(message, "Greetings from process %d!", my_rank);
dest = 0;
MPI_Send(message, strlen(message) + 1, MPI_CHAR, dest, tag, MPI_COMM_WORLD);
}
else {
for (source = 1; source < p; source++) {
MPI_Recv(message, 100, MPI_CHAR, source, tag, MPI_COMM_WORLD, &status);
printf("%s\n", message);
}
}
MPI_Finalize();
}

####################################

And when I run this command

mpicc -o greetings greetings.c

I have a error message like this

/usr/bin/ld: cannot find -laio
collect2: ld returned 1 exit status

Can any one help me please. Thank you very much
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mpi chui_yap Programming 1 03-07-2006 07:22 AM
what do I need to know to use MPI kgustaf Linux - Networking 0 07-25-2005 04:13 PM
problem with LAM/MPI (cluster software) breaditor2 Linux - Software 1 04-16-2005 05:04 AM
MPI troubles larsonse Programming 1 04-05-2004 03:56 AM
Lam/mpi Rex_chaos Linux - General 0 08-29-2001 11:00 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration