Advertisement
Guest User

Untitled

a guest
Mar 25th, 2010
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. cliff@ubuntu:~/Documents$ cat test.c
  2. #include <mpi.h>
  3. #include <stdio.h>
  4. #include <unistd.h>
  5. int main (int argc, char * argv[0]) {
  6. alarm(3);
  7. char message [16] = "Hello World !!";
  8. MPI_Init (&argc, &argv);
  9. printf ("%s\n", message);
  10. MPI_Finalize();
  11. pause();
  12. return (0); }
  13. cliff@ubuntu:~/Documents$
  14. ----------------------------------------------------------------
  15.  
  16. cliff@ubuntu:~/Documents$ ls
  17. erg2 erg3.exe erg4.c MPI_NOTES.pdf
  18. erg3.c erg3.o mpi-1.1-report-marked.ps test.c
  19. cliff@ubuntu:~/Documents$ mpicc -c test.c
  20. cliff@ubuntu:~/Documents$ mpicc -o test.exe test.o
  21. cliff@ubuntu:~/Documents$ mpirun -np 5 test.exe
  22. Alarm clock
  23. cliff@ubuntu:~/Documents$
  24.  
  25.  
  26.  
  27. cliff@ubuntu:~/Documents$ file test.exe
  28. test.exe: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, not stripped
  29. cliff@ubuntu:~/Documents$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement