00001 #define EXTERN
00002
00003 #include "pglobalc.h"
00004 #include "seqfilesm.h"
00005 #include "seqfilest.h"
00006 #include "seqfilesc.h"
00007 #include "psolverc.h"
00008
00009 #include "pmetrinit.h"
00010
00011 #include <stdio.h>
00012 #include <string.h>
00013 #include "mpi.h"
00014 #include <time.h>
00015
00016 int main (int argc, char *argv[])
00017 {
00018 time_t bt,et;
00019 stochdriver *stochdm;
00020 stochdm = new stochdriver;
00021 stochdrivert *stochdt;
00022 stochdt = new stochdrivert;
00023 long hod,min;
00024 double sec = clock();
00025
00026 bt = time (NULL);
00027
00028
00029 MPI_Init(&argc,&argv);
00030 MPI_Comm_rank(MPI_COMM_WORLD,&Myrank);
00031 MPI_Comm_size(MPI_COMM_WORLD,&Nproc);
00032 MPI_Get_processor_name(proc_namec,&nameLengthc);
00033
00034
00035 pmetr_init (argc,(const char **)argv,stochdm,stochdt);
00036
00037
00038 par_solve_metr_problem ();
00039
00040 et = time (NULL);
00041 if (Myrank==0){
00042 fprintf (Outc,"\n\n\n Data about computation time \n");
00043 fprintf (Outc,"\n\n Total time of computation %ld",et-bt);
00044 }
00045
00046 sec = (clock() - sec) / (double)CLOCKS_PER_SEC;
00047 hod = (long)sec/3600; sec -= hod*3600;
00048 min = (long)sec/60; sec -= min*60;
00049
00050 if (Myrank==0){
00051 fprintf (stdout,"\n ------------------------------------");
00052 fprintf (stdout,"\n Consumed time by PMETR %2ld:%02ld:%05.2f",hod,min,sec);
00053 fprintf (stdout,"\n ------------------------------------\n");
00054 }
00055
00056 fprintf (stdout,"\n"); fprintf (stderr,"\n");
00057
00058 fclose (Outc);
00059
00060
00061 MPI_Finalize ();
00062
00063 }