Basic HTML version of Foils prepared May 7 1996

Foil 94 TreadMarks - Parallel "Hello World"

From MetaComputing -- MRA Meeting Part I:Concepts and Issues Tutorial for CRPC MRA Meeting at Cornell -- May 7 1996. by Mark Baker, Geoffrey Fox


1 #include <stdio.h>
2 #include <errno.h>
3 #include <sys/signal.h>
4 #include "Tmk.h"
5 void main(int argc, char **argv)
6 {
7 int c ;
8 while ((c = getopt(argc, argv, "")) != -1) ;
9 Tmk_startup(argc, argv);
10 printf("hello from process %d\n", Tmk_proc_id) ;
11 /* All processes wait for keyboard input on local host. */
12 if(Tmk_proc_id == 0)
13 do {
14 c = getchar() ;
15 } while (c < 0 && errno == EINTR);
16 Tmk_barrier(0);
17 Tmk_exit(0);
18 }

in Table To:


Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sun Apr 11 1999