Έχω κάνει το ~/.mpi_hostfile με τα εξής περιεχόμενα:
- Κώδικας: Επιλογή όλων
# The Hostfile for Open MPI
# The master node, 'slots=2' is used because it is a dual-processor machine.
localhost slots=2
# The following slave nodes are single processor machines:
192.168.2.3
Όμως η εκτέλεση ενός απλού προγράμματος όπως:(Εφόσον το έχω κάνει compile με mpicc)
- Κώδικας: Επιλογή όλων
#include "mpi.h"
#include <stdio.h>
#include<unistd.h>
int main( int argc,char *argv[] )
{
int rank, size;
char hostname[10];
MPI_Init( &argc, &argv );
MPI_Comm_rank( MPI_COMM_WORLD, &rank );
MPI_Comm_size( MPI_COMM_WORLD, &size );
gethostname(hostname,10);
printf( "Cluster size: %d\nTerminal ID: %d\nHostname: %s\n",size,rank,hostname);
MPI_Finalize();
return 0;
}
Μου παίνρει πολύ καιρό γιατί?