#include <stdio.h>#include <stdarg.h>#include <time.h>#include "MacMP.h"#define NINT 1000000000int main(void);/* This program calculates the variance of the first 10^9 integers     *//* using both cpus on the dual processor Macintosh.                    *//* To compile with the Absoft C compiler, use:                         *//* acc -A -O multi.c MacMP.c "{SharedLibraries}"MPLibrary -o multi.out */double make_ssq (int);void make_sum(int *, double *);int main (){int idtask, nargs=2, nproc, n=NINT;double sum = 0.0, mean, ssq;clock_t start_program, end_program;typedef void (*aProcPtr)();start_program = clock ();MP_Init(&nproc);/* Use second cpu to calculate sum */MP_Taskstart(&idtask,(aProcPtr)&make_sum,&nargs,&n,&sum);/* Use main cpu to compute sum of squares */ssq = make_ssq (n);/* Wait for second cpu to complete */MP_Taskwait(&idtask);mean = sum / n;printf("%15d %20.3f %20.3f\n", n, mean, (ssq/n)-(mean * mean));MP_End();end_program = clock();printf("\ntime in sec: %7.2f\n", (end_program-start_program)/60.);return 1;}doublemake_ssq (int n){double s = 0.0;int i;for (i=0;i<n;i++)     s+=(double) i*i;return s;}voidmake_sum (int *n, double *s){int i;for (i=0;i<*n;i++)     *s+=(double) i;}