GUÍA DE OPERACIÓN Y ADMINISTRACIÓN DEL CLUSTER ABACUS |
|
![]() |
CLUSTER ABACUS GRUPO DE EVOLUCIÓN ARTIFICIAL (GEA), UNIVERSIDAD DE EXTREMADURA Descripción: Cluster Beowulf para realizar computación de altas prestaciones Nº actual de nodos: 10 (1 nodo maestro y 9 nodos de computación) Sistema operativo: NPACI ROCKS (basado en Red Hat Linux) |
[jlguisado@abacus mpi_practicas]$ cat hello_advanced.c
/*************************************************************************
PROGRAM hello_advanced.cA program to try MPI_Comm_size and MPI_Comm_rank
**************************************************************************/#include <stdio.h>
#include <mpi.h>void main(int argc, char *argv[])
{
int my_rank, size;MPI_Init(&argc, &argv);
MPI_Comm_rank(MPI_COMM_WORLD, &my_rank);
MPI_Comm_size(MPI_COMM_WORLD, &size);
if (my_rank == 0)
{
printf ("I am process %i out of %i: Hello world!\n", my_rank, size);
}
else
{
printf ("I am process %i out of %i.\n", my_rank, size);
}
MPI_Finalize();
}
[jlguisado@abacus mpi_practicas]$ mpicc -o helloworld helloworld.c
[jlguisado@abacus mpi_practicas]$ ssh-agent $SHELL
[jlguisado@abacus mpi_practicas]$ ssh-add
Enter passphrase for jlguisado@abacus.unex.es:
Identity added: /home/jlguisado/.ssh/identity (jlguisado@abacus.unex.es)
[jlguisado@abacus mpi_practicas]$ mpirun -np 2 -nolocal -machinefile machines /home/jlguisado/mpi_practicas/hello_advanced
I am process 1 out of 2.
I am process 0 out of 2: Hello world!
Orden: #/etc/init.d/network {start,stop}
![]()
|
José Luis Guisado Lizar Grupo de Evolución Artificial. E-mail de Contacto: jlguisado@unex.es
|