/********************************************************************** * III TTTTTTT U U * * I T U U * * I T U U * * I T U U * * III T UUUUUUU * * * * ITU Informatics Institute * * Computational Science & Engineering Dept. * * Istanbul / TURKIYE * * * * By:H.Hakan GUREL * * E-mail: gurel@be.itu.edu.tr * * Date: 13.10.2005 * * * * Program: This is simple hello program. It prints the processori * * number and the hostname. * *********************************************************************/ #include #include #include "mpi.h" int main(int argc, char **argv) { int rank, size; char host_name[20]; MPI_Init(&argc, &argv); MPI_Comm_size(MPI_COMM_WORLD, &size); MPI_Comm_rank(MPI_COMM_WORLD, &rank); gethostname(host_name, 20); printf("I am processor: %d at %s\n",rank,host_name); MPI_Finalize(); return(0); }