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


#include <stdio.h>
#include <errno.h>
#include <sys/signal.h>
#include "Tmk.h"
void main(int argc, char **argv)
{
int c ;
while ((c = getopt(argc, argv, "")) != -1) ;
Tmk_startup(argc, argv);
printf("hello from process %d\n", Tmk_proc_id) ;
/* All processes wait for keyboard input on local host. */
if(Tmk_proc_id == 0)
do {
c = getchar() ;
} while (c < 0 && errno == EINTR);
Tmk_barrier(0);
Tmk_exit(0);
}



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