TreadMarks - Parallel “Hello World”
TreadMarks - Parallel “Hello World”
#include
#include
#include
#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);
}