begin model diffusion_par_bad_5_2
| begin input variables
| | NX_BOUND : int;
| | | diffusion_par_bad.c 4.13--5.13: "input int NX_BOUND;"
| | NSTEPS_BOUND : int;
| | | diffusion_par_bad.c 6.13--7.17: "input int NSTEPS_BOUND;"
| | nx : int;
| | | diffusion_par_bad.c 8.13--9.7: "input {nx>=2 && nx<=NX_BOUND} int nx;"
| | u0 : real[nx];
| | | diffusion_par_bad.c 10.13--11.14: "input double u0[nx];"
| | nsteps : int;
| | | diffusion_par_bad.c 12.13--13.11: "input {nsteps>=0 && nsteps<=NSTEPS_BOUND} int nsteps;"
| | dt : real;
| | | diffusion_par_bad.c 14.13--15.10: "input  {dt>0}double dt;"
| | kappa : real;
| | | diffusion_par_bad.c 16.13--17.13: "input double kappa;"
| end input variables;
| begin output variables
| | data : real[nsteps+1][nx];
| | | diffusion_par_bad.c 19.13--20.26: "output double data[nsteps+1][nx];"
| end output variables;
| begin process 0
| | main function : main;
| | begin process variables
| | | MPI_REQUEST_NULL : pointer(1)<Record[MPIX_Comm_Record; id:int]>;
| | | | libmpi.c 85.0--85.55: "MPI_Request MPI_REQUEST_NULL = (MPIX_Comm_Record*)NULL;"
| | | MPI_STATUS_IGNORE : pointer(2)<Record[MPI_Status; MPI_SOURCE:int, MPI_TAG:int, SIZE:int]>;
| | | | libmpi.c 89.0--89.50: "MPI_Status *MPI_STATUS_IGNORE = (MPI_Status*)NULL;"
| | | MPIX_State : int;
| | | | libmpi.c 94.0--94.19: "int MPIX_State = 0;"
| | | nprocs : int;
| | | | diffusion_par_bad.c 22.0--22.11: "int nprocs;"
| | | myrank : int;
| | | | diffusion_par_bad.c 23.0--23.11: "int myrank;"
| | | left : int;
| | | | diffusion_par_bad.c 24.0--24.9: "int left;"
| | | right : int;
| | | | diffusion_par_bad.c 25.0--25.10: "int right;"
| | | nxl : int;
| | | | diffusion_par_bad.c 26.0--26.8: "int nxl;"
| | | first : int;
| | | | diffusion_par_bad.c 27.0--27.10: "int first;"
| | | start : int;
| | | | diffusion_par_bad.c 28.0--28.10: "int start;"
| | | stop : int;
| | | | diffusion_par_bad.c 29.0--29.9: "int stop;"
| | | buf : pointer(3)<real>;
| | | | diffusion_par_bad.c 30.0--30.12: "double* buf;"
| | | v : pointer(3)<real>;
| | | | diffusion_par_bad.c 31.0--31.10: "double* v;"
| | | v_new : pointer(3)<real>;
| | | | diffusion_par_bad.c 32.0--32.14: "double* v_new;"
| | end process variables;
| | begin function owner
| | | | diffusion_par_bad.c 34.0--34.20: "int owner(int index)"
| | | begin formal parameters
| | | | index : int;
| | | | | diffusion_par_bad.c 34.10--34.19: "int index"
| | | end formal parameters;
| | | start location : 0;
| | | begin location 0
| | | | kind : RETURN;
| | | | return ((nprocs*(index+1))-1)/nx; goto location 1;
| | | | | diffusion_par_bad.c 34.23--34.54: "return (nprocs*(index+1)-1)/nx;"
| | | end location 0;
| | | begin location 1
| | | | kind : TERMINAL;
| | | end location 1;
| | end function owner;
| | begin function firstForProc
| | | | diffusion_par_bad.c 36.0--36.26: "int firstForProc(int rank)"
| | | begin formal parameters
| | | | rank : int;
| | | | | diffusion_par_bad.c 36.17--36.25: "int rank"
| | | end formal parameters;
| | | start location : 0;
| | | begin location 0
| | | | kind : RETURN;
| | | | return (rank*nx)/nprocs; goto location 1;
| | | | | diffusion_par_bad.c 36.29--36.53: "return (rank*nx)/nprocs;"
| | | end location 0;
| | | begin location 1
| | | | kind : TERMINAL;
| | | end location 1;
| | end function firstForProc;
| | begin function countForProc
| | | | diffusion_par_bad.c 38.0--38.26: "int countForProc(int rank)"
| | | begin formal parameters
| | | | rank : int;
| | | | | diffusion_par_bad.c 38.17--38.25: "int rank"
| | | end formal parameters;
| | | begin proper local variables
| | | | a : int;
| | | | | diffusion_par_bad.c 39.1--39.7: "int a;"
| | | | b : int;
| | | | | diffusion_par_bad.c 40.1--40.7: "int b;"
| | | end proper local variables;
| | | start location : 0;
| | | begin location 0
| | | | kind : INVOCATION;
| | | | a = firstForProc(rank+1); goto location 1;
| | | | | diffusion_par_bad.c 42.1--42.26: "a = firstForProc(rank+1);"
| | | end location 0;
| | | begin location 1
| | | | kind : INVOCATION;
| | | | b = firstForProc(rank); goto location 2;
| | | | | diffusion_par_bad.c 43.1--43.24: "b = firstForProc(rank);"
| | | end location 1;
| | | begin location 2
| | | | kind : RETURN;
| | | | return a-b; goto location 3;
| | | | | diffusion_par_bad.c 44.1--44.12: "return a-b;"
| | | end location 2;
| | | begin location 3
| | | | kind : TERMINAL;
| | | end location 3;
| | end function countForProc;
| | begin function init
| | | | diffusion_par_bad.c 48.0--48.11: "void init()"
| | | begin proper local variables
| | | | i : int;
| | | | | diffusion_par_bad.c 49.1--49.7: "int i;"
| | | | owner : int;
| | | | | diffusion_par_bad.c 50.1--50.11: "int owner;"
| | | | bufSize : int;
| | | | | diffusion_par_bad.c 51.1--51.13: "int bufSize;"
| | | end proper local variables;
| | | start location : 0;
| | | begin location 0
| | | | kind : ASSIGNMENT;
| | | | i = 0; goto location 1;
| | | | | diffusion_par_bad.c 53.6--53.9: "i=0"
| | | end location 0;
| | | begin location 1
| | | | kind : CHOICE;
| | | | when i < nx goto location 2;
| | | | | diffusion_par_bad.c 53.1--53.21: "for (i=0; i<nx; i++)"
| | | | when !i < nx goto location 3;
| | | | | diffusion_par_bad.c 53.1--53.21: "for (i=0; i<nx; i++)"
| | | end location 1;
| | | begin location 2
| | | | kind : ASSIGNMENT;
| | | | i = i+1; goto location 1;
| | | | | diffusion_par_bad.c 53.17--53.20: "i++"
| | | end location 2;
| | | begin location 3
| | | | kind : ASSIGNMENT;
| | | | left = myrank-1; goto location 4;
| | | | | diffusion_par_bad.c 54.1--54.17: "left = myrank-1;"
| | | end location 3;
| | | begin location 4
| | | | kind : ASSIGNMENT;
| | | | right = myrank+1; goto location 5;
| | | | | diffusion_par_bad.c 55.1--55.18: "right = myrank+1;"
| | | end location 4;
| | | begin location 5
| | | | kind : INVOCATION;
| | | | first = firstForProc(myrank); goto location 6;
| | | | | diffusion_par_bad.c 56.1--56.30: "first = firstForProc(myrank);"
| | | end location 5;
| | | begin location 6
| | | | kind : INVOCATION;
| | | | nxl = countForProc(myrank); goto location 7;
| | | | | diffusion_par_bad.c 57.1--57.28: "nxl = countForProc(myrank);"
| | | end location 6;
| | | begin location 7
| | | | kind : ASSIGNMENT;
| | | | bufSize = nx/nprocs; goto location 8;
| | | | | diffusion_par_bad.c 58.1--58.21: "bufSize = nx/nprocs;"
| | | end location 7;
| | | begin location 8
| | | | kind : ASSIGNMENT;
| | | | bufSize = bufSize+1; goto location 9;
| | | | | diffusion_par_bad.c 59.27--59.37: "bufSize++;"
| | | end location 8;
| | | begin location 9
| | | | kind : ALLOCATE;
| | | | buf = (real*) malloc(bufSize*sizeof(real)); goto location 10;
| | | | | diffusion_par_bad.c 60.1--60.51: "buf = (double *) malloc(bufSize * sizeof(double));"
| | | end location 9;
| | | begin location 10
| | | | kind : ALLOCATE;
| | | | v = (real*) malloc((nxl+2)*sizeof(real)); goto location 11;
| | | | | diffusion_par_bad.c 61.1--61.51: "v = (double *) malloc((nxl + 2) * sizeof(double));"
| | | end location 10;
| | | begin location 11
| | | | kind : ALLOCATE;
| | | | v_new = (real*) malloc((nxl+2)*sizeof(real)); goto location 12;
| | | | | diffusion_par_bad.c 62.1--62.55: "v_new = (double *) malloc((nxl + 2) * sizeof(double));"
| | | end location 11;
| | | begin location 12
| | | | kind : ASSIGNMENT;
| | | | i = 1; goto location 13;
| | | | | diffusion_par_bad.c 63.6--63.9: "i=1"
| | | end location 12;
| | | begin location 13
| | | | kind : CHOICE;
| | | | when i <= nxl goto location 14;
| | | | | diffusion_par_bad.c 63.1--63.23: "for (i=1; i<=nxl; i++)"
| | | | when !i <= nxl goto location 16;
| | | | | diffusion_par_bad.c 63.1--63.23: "for (i=1; i<=nxl; i++)"
| | | end location 13;
| | | begin location 14
| | | | kind : ASSIGNMENT;
| | | | *(v+i) = u0[(first+i)-1]; goto location 15;
| | | | | diffusion_par_bad.c 63.24--63.45: "v[i] = u0[first+i-1];"
| | | end location 14;
| | | begin location 15
| | | | kind : ASSIGNMENT;
| | | | i = i+1; goto location 13;
| | | | | diffusion_par_bad.c 63.19--63.22: "i++"
| | | end location 15;
| | | begin location 16
| | | | kind : INVOCATION;
| | | | owner = owner(0); goto location 17;
| | | | | diffusion_par_bad.c 64.1--64.18: "owner = owner(0);"
| | | end location 16;
| | | begin location 17
| | | | kind : CHOICE;
| | | | when myrank==owner goto location 18;
| | | | | diffusion_par_bad.c 65.1--65.21: "if (myrank == owner)"
| | | | when !(myrank==owner) goto location 19;
| | | | | diffusion_par_bad.c 65.1--65.21: "if (myrank == owner)"
| | | end location 17;
| | | begin location 18
| | | | kind : ASSIGNMENT;
| | | | start = 2; goto location 20;
| | | | | diffusion_par_bad.c 65.22--65.30: "start=2;"
| | | end location 18;
| | | begin location 19
| | | | kind : ASSIGNMENT;
| | | | start = 1; goto location 20;
| | | | | diffusion_par_bad.c 65.36--65.44: "start=1;"
| | | end location 19;
| | | begin location 20
| | | | kind : INVOCATION;
| | | | owner = owner(nx-1); goto location 21;
| | | | | diffusion_par_bad.c 66.1--66.21: "owner = owner(nx-1);"
| | | end location 20;
| | | begin location 21
| | | | kind : CHOICE;
| | | | when myrank==owner goto location 22;
| | | | | diffusion_par_bad.c 67.1--67.21: "if (myrank == owner)"
| | | | when !(myrank==owner) goto location 23;
| | | | | diffusion_par_bad.c 67.1--67.21: "if (myrank == owner)"
| | | end location 21;
| | | begin location 22
| | | | kind : ASSIGNMENT;
| | | | stop = nxl-1; goto location 24;
| | | | | diffusion_par_bad.c 67.22--67.33: "stop=nxl-1;"
| | | end location 22;
| | | begin location 23
| | | | kind : ASSIGNMENT;
| | | | stop = nxl; goto location 24;
| | | | | diffusion_par_bad.c 67.39--67.48: "stop=nxl;"
| | | end location 23;
| | | begin location 24
| | | | kind : RETURN;
| | | | return null; goto location 25;
| | | | | diffusion_par_bad.c 68.0--68.0: "}"
| | | end location 24;
| | | begin location 25
| | | | kind : TERMINAL;
| | | end location 25;
| | end function init;
| | begin function cleanup
| | | | diffusion_par_bad.c 70.0--70.14: "void cleanup()"
| | | start location : 0;
| | | begin location 0
| | | | kind : INVOCATION;
| | | | free(buf); goto location 1;
| | | | | diffusion_par_bad.c 71.1--71.11: "free(buf);"
| | | end location 0;
| | | begin location 1
| | | | kind : INVOCATION;
| | | | free(v); goto location 2;
| | | | | diffusion_par_bad.c 72.1--72.9: "free(v);"
| | | end location 1;
| | | begin location 2
| | | | kind : INVOCATION;
| | | | free(v_new); goto location 3;
| | | | | diffusion_par_bad.c 73.1--73.13: "free(v_new);"
| | | end location 2;
| | | begin location 3
| | | | kind : RETURN;
| | | | return null; goto location 4;
| | | | | diffusion_par_bad.c 74.0--74.0: "}"
| | | end location 3;
| | | begin location 4
| | | | kind : TERMINAL;
| | | end location 4;
| | end function cleanup;
| | begin function write
| | | | diffusion_par_bad.c 76.0--76.20: "void write(int time)"
| | | begin formal parameters
| | | | time : int;
| | | | | diffusion_par_bad.c 76.11--76.19: "int time"
| | | end formal parameters;
| | | begin proper local variables
| | | | source : int;
| | | | | diffusion_par_bad.c 77.1--77.12: "int source;"
| | | | i : int;
| | | | | diffusion_par_bad.c 78.1--78.7: "int i;"
| | | | j : int;
| | | | | diffusion_par_bad.c 79.1--79.7: "int j;"
| | | | count : int;
| | | | | diffusion_par_bad.c 80.1--80.11: "int count;"
| | | end proper local variables;
| | | start location : 0;
| | | begin location 0
| | | | kind : CHOICE;
| | | | when !(myrank==0) goto location 1;
| | | | | diffusion_par_bad.c 82.1--82.17: "if (myrank != 0)"
| | | | when !!(myrank==0) goto location 2;
| | | | | diffusion_par_bad.c 82.1--82.17: "if (myrank != 0)"
| | | end location 0;
| | | begin location 1
| | | | kind : INVOCATION;
| | | | MPI_Send(v+1,nxl,MPI_DOUBLE,0,0,MPI_COMM_WORLD); goto location 18;
| | | | | diffusion_par_bad.c 83.2--83.55: "MPI_Send(v+1, nxl, MPI_DOUBLE, 0, 0, MPI_COMM_WORLD);"
| | | end location 1;
| | | begin location 2
| | | | kind : ASSIGNMENT;
| | | | j = 0; goto location 3;
| | | | | diffusion_par_bad.c 85.2--85.6: "j=0;"
| | | end location 2;
| | | begin location 3
| | | | kind : ASSIGNMENT;
| | | | source = 0; goto location 4;
| | | | | diffusion_par_bad.c 86.7--86.15: "source=0"
| | | end location 3;
| | | begin location 4
| | | | kind : CHOICE;
| | | | when source < nprocs goto location 5;
| | | | | diffusion_par_bad.c 86.2--86.41: "for (source=0; source<nprocs; source++)"
| | | | when !source < nprocs goto location 18;
| | | | | diffusion_par_bad.c 86.2--86.41: "for (source=0; source<nprocs; source++)"
| | | end location 4;
| | | begin location 5
| | | | kind : INVOCATION;
| | | | count = countForProc(source); goto location 6;
| | | | | diffusion_par_bad.c 87.3--87.32: "count = countForProc(source);"
| | | end location 5;
| | | begin location 6
| | | | kind : CHOICE;
| | | | when !(source==0) goto location 7;
| | | | | diffusion_par_bad.c 88.3--88.19: "if (source != 0)"
| | | | when !!(source==0) goto location 8;
| | | | | diffusion_par_bad.c 88.3--88.19: "if (source != 0)"
| | | end location 6;
| | | begin location 7
| | | | kind : INVOCATION;
| | | | MPI_Recv(buf,count,MPI_DOUBLE,source,0,MPI_COMM_WORLD,MPI_STATUS_IGNORE); goto location 12;
| | | | | diffusion_par_bad.c 89.4--89.83: "MPI_Recv(buf, count, MPI_DOUBLE, source, 0, MPI_COMM_WORLD, MPI_STATUS_IGNORE);"
| | | end location 7;
| | | begin location 8
| | | | kind : ASSIGNMENT;
| | | | i = 0; goto location 9;
| | | | | diffusion_par_bad.c 91.9--91.12: "i=0"
| | | end location 8;
| | | begin location 9
| | | | kind : CHOICE;
| | | | when i < count goto location 10;
| | | | | diffusion_par_bad.c 91.4--91.27: "for (i=0; i<count; i++)"
| | | | when !i < count goto location 12;
| | | | | diffusion_par_bad.c 91.4--91.27: "for (i=0; i<count; i++)"
| | | end location 9;
| | | begin location 10
| | | | kind : ASSIGNMENT;
| | | | *(buf+i) = *(v+(i+1)); goto location 11;
| | | | | diffusion_par_bad.c 91.28--91.44: "buf[i] = v[i+1];"
| | | end location 10;
| | | begin location 11
| | | | kind : ASSIGNMENT;
| | | | i = i+1; goto location 9;
| | | | | diffusion_par_bad.c 91.23--91.26: "i++"
| | | end location 11;
| | | begin location 12
| | | | kind : ASSIGNMENT;
| | | | i = 0; goto location 13;
| | | | | diffusion_par_bad.c 92.8--92.11: "i=0"
| | | end location 12;
| | | begin location 13
| | | | kind : CHOICE;
| | | | when i < count goto location 14;
| | | | | diffusion_par_bad.c 92.3--92.26: "for (i=0; i<count; i++)"
| | | | when !i < count goto location 17;
| | | | | diffusion_par_bad.c 92.3--92.26: "for (i=0; i<count; i++)"
| | | end location 13;
| | | begin location 14
| | | | kind : ASSIGNMENT;
| | | | data[time][j] = *(buf+i); goto location 15;
| | | | | diffusion_par_bad.c 93.4--93.27: "data[time][j] = buf[i];"
| | | end location 14;
| | | begin location 15
| | | | kind : ASSIGNMENT;
| | | | j = j+1; goto location 16;
| | | | | diffusion_par_bad.c 94.4--94.8: "j++;"
| | | end location 15;
| | | begin location 16
| | | | kind : ASSIGNMENT;
| | | | i = i+1; goto location 13;
| | | | | diffusion_par_bad.c 92.22--92.25: "i++"
| | | end location 16;
| | | begin location 17
| | | | kind : ASSIGNMENT;
| | | | source = source+1; goto location 4;
| | | | | diffusion_par_bad.c 86.32--86.40: "source++"
| | | end location 17;
| | | begin location 18
| | | | kind : RETURN;
| | | | return null; goto location 19;
| | | | | diffusion_par_bad.c 98.0--98.0: "}"
| | | end location 18;
| | | begin location 19
| | | | kind : TERMINAL;
| | | end location 19;
| | end function write;
| | begin function exchange_ghost_cells
| | | | diffusion_par_bad.c 101.0--101.27: "void exchange_ghost_cells()"
| | | start location : 0;
| | | begin location 0
| | | | kind : CHOICE;
| | | | when 0 <= left goto location 1;
| | | | | diffusion_par_bad.c 102.1--102.15: "if (left >= 0)"
| | | | when !0 <= left goto location 2;
| | | | | diffusion_par_bad.c 102.1--102.15: "if (left >= 0)"
| | | end location 0;
| | | begin location 1
| | | | kind : INVOCATION;
| | | | MPI_Send(v+1,1,MPI_DOUBLE,left,0,MPI_COMM_WORLD); goto location 2;
| | | | | diffusion_par_bad.c 102.16--102.70: "MPI_Send(v+1, 1, MPI_DOUBLE, left, 0, MPI_COMM_WORLD);"
| | | end location 1;
| | | begin location 2
| | | | kind : CHOICE;
| | | | when right < nprocs goto location 3;
| | | | | diffusion_par_bad.c 103.1--103.20: "if (right < nprocs)"
| | | | when !right < nprocs goto location 5;
| | | | | diffusion_par_bad.c 103.1--103.20: "if (right < nprocs)"
| | | end location 2;
| | | begin location 3
| | | | kind : INVOCATION;
| | | | MPI_Recv(v+(nxl+1),1,MPI_DOUBLE,right,0,MPI_COMM_WORLD,MPI_STATUS_IGNORE); goto location 4;
| | | | | diffusion_par_bad.c 104.2--104.82: "MPI_Recv(v+(nxl+1), 1, MPI_DOUBLE, right, 0, MPI_COMM_WORLD, MPI_STATUS_IGNORE);"
| | | end location 3;
| | | begin location 4
| | | | kind : INVOCATION;
| | | | MPI_Send(v+nxl,1,MPI_DOUBLE,right,0,MPI_COMM_WORLD); goto location 5;
| | | | | diffusion_par_bad.c 105.2--105.59: "MPI_Send(v+nxl, 1, MPI_DOUBLE, right, 0, MPI_COMM_WORLD);"
| | | end location 4;
| | | begin location 5
| | | | kind : CHOICE;
| | | | when 0 <= left goto location 6;
| | | | | diffusion_par_bad.c 107.1--107.15: "if (left >= 0)"
| | | | when !0 <= left goto location 7;
| | | | | diffusion_par_bad.c 107.1--107.15: "if (left >= 0)"
| | | end location 5;
| | | begin location 6
| | | | kind : INVOCATION;
| | | | MPI_Recv(v,1,MPI_DOUBLE,left,0,MPI_COMM_WORLD,MPI_STATUS_IGNORE); goto location 7;
| | | | | diffusion_par_bad.c 107.16--107.87: "MPI_Recv(v, 1, MPI_DOUBLE, left, 0, MPI_COMM_WORLD, MPI_STATUS_IGNORE);"
| | | end location 6;
| | | begin location 7
| | | | kind : RETURN;
| | | | return null; goto location 8;
| | | | | diffusion_par_bad.c 108.0--108.0: "}"
| | | end location 7;
| | | begin location 8
| | | | kind : TERMINAL;
| | | end location 8;
| | end function exchange_ghost_cells;
| | begin function update
| | | | diffusion_par_bad.c 112.0--112.13: "void update()"
| | | begin proper local variables
| | | | i : int;
| | | | | diffusion_par_bad.c 113.1--113.7: "int i;"
| | | end proper local variables;
| | | start location : 0;
| | | begin location 0
| | | | kind : ASSIGNMENT;
| | | | i = start; goto location 1;
| | | | | diffusion_par_bad.c 115.6--115.13: "i=start"
| | | end location 0;
| | | begin location 1
| | | | kind : CHOICE;
| | | | when i <= stop goto location 2;
| | | | | diffusion_par_bad.c 115.1--115.28: "for (i=start; i<=stop; i++)"
| | | | when !i <= stop goto location 4;
| | | | | diffusion_par_bad.c 115.1--115.28: "for (i=start; i<=stop; i++)"
| | | end location 1;
| | | begin location 2
| | | | kind : ASSIGNMENT;
| | | | *(v_new+i) = *(v+i)+(kappa*((*(v+(i+1))+*(v+(i-1)))-((real)2**(v+i)))); goto location 3;
| | | | | diffusion_par_bad.c 115.29--115.80: "v_new[i] = v[i] + kappa*(v[i+1] + v[i-1] - 2*v[i]);"
| | | end location 2;
| | | begin location 3
| | | | kind : ASSIGNMENT;
| | | | i = i+1; goto location 1;
| | | | | diffusion_par_bad.c 115.24--115.27: "i++"
| | | end location 3;
| | | begin location 4
| | | | kind : ASSIGNMENT;
| | | | i = start; goto location 5;
| | | | | diffusion_par_bad.c 116.6--116.13: "i=start"
| | | end location 4;
| | | begin location 5
| | | | kind : CHOICE;
| | | | when i <= stop goto location 6;
| | | | | diffusion_par_bad.c 116.1--116.28: "for (i=start; i<=stop; i++)"
| | | | when !i <= stop goto location 8;
| | | | | diffusion_par_bad.c 116.1--116.28: "for (i=start; i<=stop; i++)"
| | | end location 5;
| | | begin location 6
| | | | kind : ASSIGNMENT;
| | | | *(v+i) = *(v_new+i); goto location 7;
| | | | | diffusion_par_bad.c 116.29--116.45: "v[i] = v_new[i];"
| | | end location 6;
| | | begin location 7
| | | | kind : ASSIGNMENT;
| | | | i = i+1; goto location 5;
| | | | | diffusion_par_bad.c 116.24--116.27: "i++"
| | | end location 7;
| | | begin location 8
| | | | kind : RETURN;
| | | | return null; goto location 9;
| | | | | diffusion_par_bad.c 117.0--117.0: "}"
| | | end location 8;
| | | begin location 9
| | | | kind : TERMINAL;
| | | end location 9;
| | end function update;
| | begin function main
| | | | diffusion_par_bad.c 120.0--120.11: "void main()"
| | | begin proper local variables
| | | | argc : int;
| | | | | diffusion_par_bad.c 121.1--121.10: "int argc;"
| | | | argv : pointer(6)<pointer(7)<char>>;
| | | | | diffusion_par_bad.c 122.1--122.13: "char **argv;"
| | | | iter : int;
| | | | | diffusion_par_bad.c 123.1--123.10: "int iter;"
| | | end proper local variables;
| | | start location : 0;
| | | begin location 0
| | | | kind : INVOCATION;
| | | | MPI_Init(&argc,&argv); goto location 1;
| | | | | diffusion_par_bad.c 125.1--125.23: "MPI_Init(&argc,&argv);"
| | | end location 0;
| | | begin location 1
| | | | kind : INVOCATION;
| | | | MPI_Comm_size(MPI_COMM_WORLD,&nprocs); goto location 2;
| | | | | diffusion_par_bad.c 126.1--126.40: "MPI_Comm_size(MPI_COMM_WORLD, &nprocs);"
| | | end location 1;
| | | begin location 2
| | | | kind : INVOCATION;
| | | | MPI_Comm_rank(MPI_COMM_WORLD,&myrank); goto location 3;
| | | | | diffusion_par_bad.c 127.1--127.40: "MPI_Comm_rank(MPI_COMM_WORLD, &myrank);"
| | | end location 2;
| | | begin location 3
| | | | kind : INVOCATION;
| | | | init(); goto location 4;
| | | | | diffusion_par_bad.c 128.1--128.8: "init();"
| | | end location 3;
| | | begin location 4
| | | | kind : INVOCATION;
| | | | write(0); goto location 5;
| | | | | diffusion_par_bad.c 129.1--129.10: "write(0);"
| | | end location 4;
| | | begin location 5
| | | | kind : ASSIGNMENT;
| | | | iter = 1; goto location 6;
| | | | | diffusion_par_bad.c 130.6--130.14: "iter = 1"
| | | end location 5;
| | | begin location 6
| | | | kind : CHOICE;
| | | | when iter <= nsteps goto location 7;
| | | | | diffusion_par_bad.c 130.1--130.39: "for (iter = 1; iter <= nsteps; iter++)"
| | | | when !iter <= nsteps goto location 11;
| | | | | diffusion_par_bad.c 130.1--130.39: "for (iter = 1; iter <= nsteps; iter++)"
| | | end location 6;
| | | begin location 7
| | | | kind : INVOCATION;
| | | | exchange_ghost_cells(); goto location 8;
| | | | | diffusion_par_bad.c 131.2--131.25: "exchange_ghost_cells();"
| | | end location 7;
| | | begin location 8
| | | | kind : INVOCATION;
| | | | update(); goto location 9;
| | | | | diffusion_par_bad.c 132.2--132.11: "update();"
| | | end location 8;
| | | begin location 9
| | | | kind : INVOCATION;
| | | | write(iter); goto location 10;
| | | | | diffusion_par_bad.c 133.2--133.14: "write(iter);"
| | | end location 9;
| | | begin location 10
| | | | kind : ASSIGNMENT;
| | | | iter = iter+1; goto location 6;
| | | | | diffusion_par_bad.c 130.32--130.38: "iter++"
| | | end location 10;
| | | begin location 11
| | | | kind : INVOCATION;
| | | | cleanup(); goto location 12;
| | | | | diffusion_par_bad.c 135.1--135.11: "cleanup();"
| | | end location 11;
| | | begin location 12
| | | | kind : INVOCATION;
| | | | MPI_Finalize(); goto location 13;
| | | | | diffusion_par_bad.c 136.1--136.16: "MPI_Finalize();"
| | | end location 12;
| | | begin location 13
| | | | kind : RETURN;
| | | | return null; goto location 14;
| | | | | diffusion_par_bad.c 137.0--137.0: "}"
| | | end location 13;
| | | begin location 14
| | | | kind : TERMINAL;
| | | end location 14;
| | end function main;
| | begin function free
| | | | null
| | | begin formal parameters
| | | | pointer : pointer(4)<void>;
| | | | | null
| | | end formal parameters;
| | end function free;
| | begin function MPI_Send
| | | | libmpi.c 147.0--148.28: "int MPI_Send(void* _buf, int _count, MPI_Datatype _datatype, int _dest, int _tag,             MPI_Comm _comm)"
| | | begin formal parameters
| | | | _buf : pointer(4)<void>;
| | | | | libmpi.c 147.13--147.23: "void* _buf"
| | | | _count : int;
| | | | | libmpi.c 147.25--147.35: "int _count"
| | | | _datatype : int;
| | | | | libmpi.c 147.37--147.59: "MPI_Datatype _datatype"
| | | | _dest : int;
| | | | | libmpi.c 147.61--147.70: "int _dest"
| | | | _tag : int;
| | | | | libmpi.c 147.72--147.80: "int _tag"
| | | | _comm : int;
| | | | | libmpi.c 148.13--148.27: "MPI_Comm _comm"
| | | end formal parameters;
| | | begin proper local variables
| | | | _result : int;
| | | | | libmpi.c 149.2--149.14: "int _result;"
| | | end proper local variables;
| | | start location : 0;
| | | begin location 0
| | | | kind : ASSERTION;
| | | | assert MPIX_State==MPIX_INITIALIZED; Attempt to call MPI_Send when MPI is not initialized goto location 1;
| | | | | libmpi.c 151.15--151.109: "assert MPIX_State == MPIX_INITIALIZED, "Attempt to call MPI_Send when MPI is not initialized";"
| | | end location 0;
| | | begin location 1
| | | | kind : CHOICE;
| | | | when _dest==MPI_PROC_NULL goto location 2;
| | | | | libmpi.c 152.2--152.29: "if (_dest == MPI_PROC_NULL)"
| | | | when !(_dest==MPI_PROC_NULL) goto location 3;
| | | | | libmpi.c 152.2--152.29: "if (_dest == MPI_PROC_NULL)"
| | | end location 1;
| | | begin location 2
| | | | kind : RETURN;
| | | | return 0; goto location 3;
| | | | | libmpi.c 153.4--153.13: "return 0;"
| | | end location 2;
| | | begin location 3
| | | | kind : ASSERTION;
| | | | assert _comm==MPI_COMM_WORLD;  goto location 4;
| | | | | libmpi.c 154.15--154.46: "assert _comm == MPI_COMM_WORLD;"
| | | end location 3;
| | | begin location 4
| | | | kind : CHOICE;
| | | | when _datatype==MPI_DOUBLE goto location 5;
| | | | | libmpi.c 155.2--155.30: "if (_datatype == MPI_DOUBLE)"
| | | | when !(_datatype==MPI_DOUBLE) goto location 6;
| | | | | libmpi.c 155.2--155.30: "if (_datatype == MPI_DOUBLE)"
| | | end location 4;
| | | begin location 5
| | | | kind : INVOCATION;
| | | | _result = MPIX_Send_double((pointer(3)<real>)_buf,_count,_dest,_tag,_comm); goto location 9;
| | | | | libmpi.c 156.4--156.74: "_result = MPIX_Send_double((double*)_buf, _count, _dest, _tag, _comm);"
| | | end location 5;
| | | begin location 6
| | | | kind : CHOICE;
| | | | when _datatype==MPI_INT goto location 7;
| | | | | libmpi.c 157.7--157.32: "if (_datatype == MPI_INT)"
| | | | when !(_datatype==MPI_INT) goto location 8;
| | | | | libmpi.c 157.7--157.32: "if (_datatype == MPI_INT)"
| | | end location 6;
| | | begin location 7
| | | | kind : INVOCATION;
| | | | _result = MPIX_Send_int((pointer(5)<int>)_buf,_count,_dest,_tag,_comm); goto location 9;
| | | | | libmpi.c 158.4--158.68: "_result = MPIX_Send_int((int*)_buf, _count, _dest, _tag, _comm);"
| | | end location 7;
| | | begin location 8
| | | | kind : ASSERTION;
| | | | assert false; Currently only MPI_DOUBLE and MPI_INT supported goto location 9;
| | | | | libmpi.c 160.17--160.81: "assert false, "Currently only MPI_DOUBLE and MPI_INT supported";"
| | | end location 8;
| | | begin location 9
| | | | kind : RETURN;
| | | | return _result; goto location 10;
| | | | | libmpi.c 161.2--161.17: "return _result;"
| | | end location 9;
| | | begin location 10
| | | | kind : TERMINAL;
| | | end location 10;
| | end function MPI_Send;
| | begin function MPIX_Send_double
| | | | libmpi.c 164.0--164.83: "int MPIX_Send_double(double* _buf, int _count, int _dest, int _tag, MPI_Comm _comm)"
| | | begin formal parameters
| | | | _buf : pointer(3)<real>;
| | | | | libmpi.c 164.21--164.33: "double* _buf"
| | | | _count : int;
| | | | | libmpi.c 164.35--164.45: "int _count"
| | | | _dest : int;
| | | | | libmpi.c 164.47--164.56: "int _dest"
| | | | _tag : int;
| | | | | libmpi.c 164.58--164.66: "int _tag"
| | | | _comm : int;
| | | | | libmpi.c 164.68--164.82: "MPI_Comm _comm"
| | | end formal parameters;
| | | begin proper local variables
| | | | _tmp : real[_count];
| | | | | libmpi.c 165.2--165.22: "double _tmp[_count];"
| | | | _i : int;
| | | | | libmpi.c 166.2--166.9: "int _i;"
| | | end proper local variables;
| | | start location : 0;
| | | begin location 0
| | | | kind : ASSIGNMENT;
| | | | _i = 0; goto location 1;
| | | | | libmpi.c 168.7--168.11: "_i=0"
| | | end location 0;
| | | begin location 1
| | | | kind : CHOICE;
| | | | when _i < _count goto location 2;
| | | | | libmpi.c 168.2--168.29: "for (_i=0; _i<_count; _i++)"
| | | | when !_i < _count goto location 4;
| | | | | libmpi.c 168.2--168.29: "for (_i=0; _i<_count; _i++)"
| | | end location 1;
| | | begin location 2
| | | | kind : ASSIGNMENT;
| | | | _tmp[_i] = *(_buf+_i); goto location 3;
| | | | | libmpi.c 168.30--168.50: "_tmp[_i] = _buf[_i];"
| | | end location 2;
| | | begin location 3
| | | | kind : ASSIGNMENT;
| | | | _i = _i+1; goto location 1;
| | | | | libmpi.c 168.24--168.28: "_i++"
| | | end location 3;
| | | begin location 4
| | | | kind : SEND;
| | | | send(_tmp,_dest,_tag); goto location 5;
| | | | | libmpi.c 169.2--169.26: "send(_tmp, _dest, _tag);"
| | | end location 4;
| | | begin location 5
| | | | kind : RETURN;
| | | | return 0; goto location 6;
| | | | | libmpi.c 170.2--170.11: "return 0;"
| | | end location 5;
| | | begin location 6
| | | | kind : TERMINAL;
| | | end location 6;
| | end function MPIX_Send_double;
| | begin function MPIX_Send_int
| | | | libmpi.c 173.0--173.77: "int MPIX_Send_int(int* _buf, int _count, int _dest, int _tag, MPI_Comm _comm)"
| | | begin formal parameters
| | | | _buf : pointer(5)<int>;
| | | | | libmpi.c 173.18--173.27: "int* _buf"
| | | | _count : int;
| | | | | libmpi.c 173.29--173.39: "int _count"
| | | | _dest : int;
| | | | | libmpi.c 173.41--173.50: "int _dest"
| | | | _tag : int;
| | | | | libmpi.c 173.52--173.60: "int _tag"
| | | | _comm : int;
| | | | | libmpi.c 173.62--173.76: "MPI_Comm _comm"
| | | end formal parameters;
| | | begin proper local variables
| | | | _tmp : int[_count];
| | | | | libmpi.c 174.2--174.19: "int _tmp[_count];"
| | | | _i : int;
| | | | | libmpi.c 175.2--175.9: "int _i;"
| | | end proper local variables;
| | | start location : 0;
| | | begin location 0
| | | | kind : ASSIGNMENT;
| | | | _i = 0; goto location 1;
| | | | | libmpi.c 177.7--177.11: "_i=0"
| | | end location 0;
| | | begin location 1
| | | | kind : CHOICE;
| | | | when _i < _count goto location 2;
| | | | | libmpi.c 177.2--177.29: "for (_i=0; _i<_count; _i++)"
| | | | when !_i < _count goto location 4;
| | | | | libmpi.c 177.2--177.29: "for (_i=0; _i<_count; _i++)"
| | | end location 1;
| | | begin location 2
| | | | kind : ASSIGNMENT;
| | | | _tmp[_i] = *(_buf+_i); goto location 3;
| | | | | libmpi.c 177.30--177.50: "_tmp[_i] = _buf[_i];"
| | | end location 2;
| | | begin location 3
| | | | kind : ASSIGNMENT;
| | | | _i = _i+1; goto location 1;
| | | | | libmpi.c 177.24--177.28: "_i++"
| | | end location 3;
| | | begin location 4
| | | | kind : SEND;
| | | | send(_tmp,_dest,_tag); goto location 5;
| | | | | libmpi.c 178.2--178.26: "send(_tmp, _dest, _tag);"
| | | end location 4;
| | | begin location 5
| | | | kind : RETURN;
| | | | return 0; goto location 6;
| | | | | libmpi.c 179.2--179.11: "return 0;"
| | | end location 5;
| | | begin location 6
| | | | kind : TERMINAL;
| | | end location 6;
| | end function MPIX_Send_int;
| | begin function MPI_Recv
| | | | libmpi.c 183.0--184.49: "int MPI_Recv(void* _buf, int _count, MPI_Datatype _datatype, int _source, int _tag,             MPI_Comm _comm, MPI_Status *_status)"
| | | begin formal parameters
| | | | _buf : pointer(4)<void>;
| | | | | libmpi.c 183.13--183.23: "void* _buf"
| | | | _count : int;
| | | | | libmpi.c 183.25--183.35: "int _count"
| | | | _datatype : int;
| | | | | libmpi.c 183.37--183.59: "MPI_Datatype _datatype"
| | | | _source : int;
| | | | | libmpi.c 183.61--183.72: "int _source"
| | | | _tag : int;
| | | | | libmpi.c 183.74--183.82: "int _tag"
| | | | _comm : int;
| | | | | libmpi.c 184.13--184.27: "MPI_Comm _comm"
| | | | _status : pointer(2)<Record[MPI_Status; MPI_SOURCE:int, MPI_TAG:int, SIZE:int]>;
| | | | | libmpi.c 184.29--184.48: "MPI_Status *_status"
| | | end formal parameters;
| | | begin proper local variables
| | | | _result : int;
| | | | | libmpi.c 185.2--185.14: "int _result;"
| | | end proper local variables;
| | | start location : 0;
| | | begin location 0
| | | | kind : ASSERTION;
| | | | assert MPIX_State==MPIX_INITIALIZED; Attempt to call MPI_Recv when MPI is not initialized goto location 1;
| | | | | libmpi.c 187.15--187.109: "assert MPIX_State == MPIX_INITIALIZED, "Attempt to call MPI_Recv when MPI is not initialized";"
| | | end location 0;
| | | begin location 1
| | | | kind : CHOICE;
| | | | when _source==MPI_PROC_NULL goto location 2;
| | | | | libmpi.c 188.3--188.32: "if (_source == MPI_PROC_NULL)"
| | | | when !(_source==MPI_PROC_NULL) goto location 3;
| | | | | libmpi.c 188.3--188.32: "if (_source == MPI_PROC_NULL)"
| | | end location 1;
| | | begin location 2
| | | | kind : RETURN;
| | | | return 0; goto location 3;
| | | | | libmpi.c 189.4--189.13: "return 0;"
| | | end location 2;
| | | begin location 3
| | | | kind : ASSERTION;
| | | | assert _comm==MPI_COMM_WORLD;  goto location 4;
| | | | | libmpi.c 190.15--190.46: "assert _comm == MPI_COMM_WORLD;"
| | | end location 3;
| | | begin location 4
| | | | kind : CHOICE;
| | | | when _datatype==MPI_DOUBLE goto location 5;
| | | | | libmpi.c 191.2--191.30: "if (_datatype == MPI_DOUBLE)"
| | | | when !(_datatype==MPI_DOUBLE) goto location 6;
| | | | | libmpi.c 191.2--191.30: "if (_datatype == MPI_DOUBLE)"
| | | end location 4;
| | | begin location 5
| | | | kind : INVOCATION;
| | | | _result = MPIX_Recv_double((pointer(3)<real>)_buf,_count,_source,_tag,_comm,_status); goto location 9;
| | | | | libmpi.c 192.4--192.85: "_result = MPIX_Recv_double((double*)_buf, _count, _source, _tag, _comm, _status);"
| | | end location 5;
| | | begin location 6
| | | | kind : CHOICE;
| | | | when _datatype==MPI_INT goto location 7;
| | | | | libmpi.c 193.7--193.32: "if (_datatype == MPI_INT)"
| | | | when !(_datatype==MPI_INT) goto location 8;
| | | | | libmpi.c 193.7--193.32: "if (_datatype == MPI_INT)"
| | | end location 6;
| | | begin location 7
| | | | kind : INVOCATION;
| | | | _result = MPIX_Recv_int((pointer(5)<int>)_buf,_count,_source,_tag,_comm,_status); goto location 9;
| | | | | libmpi.c 194.4--194.79: "_result = MPIX_Recv_int((int*)_buf, _count, _source, _tag, _comm, _status);"
| | | end location 7;
| | | begin location 8
| | | | kind : ASSERTION;
| | | | assert false;  goto location 9;
| | | | | libmpi.c 196.17--196.30: "assert false;"
| | | end location 8;
| | | begin location 9
| | | | kind : RETURN;
| | | | return _result; goto location 10;
| | | | | libmpi.c 197.2--197.17: "return _result;"
| | | end location 9;
| | | begin location 10
| | | | kind : TERMINAL;
| | | end location 10;
| | end function MPI_Recv;
| | begin function MPIX_Recv_double
| | | | libmpi.c 200.0--201.41: "int MPIX_Recv_double(double *_buf, int _count, int _source, int _tag, MPI_Comm _comm,                     MPI_Status *_status)"
| | | begin formal parameters
| | | | _buf : pointer(3)<real>;
| | | | | libmpi.c 200.21--200.33: "double *_buf"
| | | | _count : int;
| | | | | libmpi.c 200.35--200.45: "int _count"
| | | | _source : int;
| | | | | libmpi.c 200.47--200.58: "int _source"
| | | | _tag : int;
| | | | | libmpi.c 200.60--200.68: "int _tag"
| | | | _comm : int;
| | | | | libmpi.c 200.70--200.84: "MPI_Comm _comm"
| | | | _status : pointer(2)<Record[MPI_Status; MPI_SOURCE:int, MPI_TAG:int, SIZE:int]>;
| | | | | libmpi.c 201.21--201.40: "MPI_Status *_status"
| | | end formal parameters;
| | | begin proper local variables
| | | | _tmp : real[_count];
| | | | | libmpi.c 202.2--202.22: "double _tmp[_count];"
| | | | _i : int;
| | | | | libmpi.c 203.2--203.9: "int _i;"
| | | | thesource : int;
| | | | | libmpi.c 204.2--204.16: "int thesource;"
| | | | thetag : int;
| | | | | libmpi.c 205.2--205.13: "int thetag;"
| | | | thesize : int;
| | | | | libmpi.c 206.2--206.14: "int thesize;"
| | | | thecount : int;
| | | | | libmpi.c 207.2--207.15: "int thecount;"
| | | end proper local variables;
| | | start location : 0;
| | | begin location 0
| | | | kind : CHOICE;
| | | | when !(_source==MPI_ANY_SOURCE) && !(_tag==MPI_ANY_TAG) goto location 1;
| | | | | libmpi.c 209.2--209.55: "if (_source != MPI_ANY_SOURCE && _tag != MPI_ANY_TAG)"
| | | | when !(!(_source==MPI_ANY_SOURCE) && !(_tag==MPI_ANY_TAG)) goto location 4;
| | | | | libmpi.c 209.2--209.55: "if (_source != MPI_ANY_SOURCE && _tag != MPI_ANY_TAG)"
| | | end location 0;
| | | begin location 1
| | | | kind : RECEIVE;
| | | | recv(_tmp,_source,_tag, thesize); goto location 2;
| | | | | libmpi.c 210.4--210.39: "recv(_tmp, _source, _tag, thesize);"
| | | end location 1;
| | | begin location 2
| | | | kind : ASSIGNMENT;
| | | | thesource = _source; goto location 3;
| | | | | libmpi.c 211.4--211.24: "thesource = _source;"
| | | end location 2;
| | | begin location 3
| | | | kind : ASSIGNMENT;
| | | | thetag = _tag; goto location 21;
| | | | | libmpi.c 212.4--212.18: "thetag = _tag;"
| | | end location 3;
| | | begin location 4
| | | | kind : CHOICE;
| | | | when !(_source==MPI_ANY_SOURCE) && (_tag==MPI_ANY_TAG) goto location 5;
| | | | | libmpi.c 213.9--213.62: "if (_source != MPI_ANY_SOURCE && _tag == MPI_ANY_TAG)"
| | | | when !(!(_source==MPI_ANY_SOURCE) && (_tag==MPI_ANY_TAG)) goto location 7;
| | | | | libmpi.c 213.9--213.62: "if (_source != MPI_ANY_SOURCE && _tag == MPI_ANY_TAG)"
| | | end location 4;
| | | begin location 5
| | | | kind : RECEIVE;
| | | | recv(_tmp,_source,any(thetag), thesize); goto location 6;
| | | | | libmpi.c 214.4--214.46: "recv(_tmp, _source, any(thetag), thesize);"
| | | end location 5;
| | | begin location 6
| | | | kind : ASSIGNMENT;
| | | | thesource = _source; goto location 21;
| | | | | libmpi.c 215.4--215.24: "thesource = _source;"
| | | end location 6;
| | | begin location 7
| | | | kind : CHOICE;
| | | | when (_source==MPI_ANY_SOURCE) && !(_tag==MPI_ANY_TAG) goto location 8;
| | | | | libmpi.c 216.9--216.62: "if (_source == MPI_ANY_SOURCE && _tag != MPI_ANY_TAG)"
| | | | when !((_source==MPI_ANY_SOURCE) && !(_tag==MPI_ANY_TAG)) goto location 15;
| | | | | libmpi.c 216.9--216.62: "if (_source == MPI_ANY_SOURCE && _tag != MPI_ANY_TAG)"
| | | end location 7;
| | | begin location 8
| | | | kind : RECEIVE;
| | | | recv(_tmp,0,_tag, thesize); goto location 9;
| | | | | libmpi.c 217.4--217.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | | recv(_tmp,1,_tag, thesize); goto location 10;
| | | | | libmpi.c 217.4--217.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | | recv(_tmp,2,_tag, thesize); goto location 11;
| | | | | libmpi.c 217.4--217.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | | recv(_tmp,3,_tag, thesize); goto location 12;
| | | | | libmpi.c 217.4--217.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | | recv(_tmp,4,_tag, thesize); goto location 13;
| | | | | libmpi.c 217.4--217.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | end location 8;
| | | begin location 9
| | | | kind : ASSIGNMENT;
| | | | thesource = 0; goto location 14;
| | | | | libmpi.c 217.4--217.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | end location 9;
| | | begin location 10
| | | | kind : ASSIGNMENT;
| | | | thesource = 1; goto location 14;
| | | | | libmpi.c 217.4--217.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | end location 10;
| | | begin location 11
| | | | kind : ASSIGNMENT;
| | | | thesource = 2; goto location 14;
| | | | | libmpi.c 217.4--217.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | end location 11;
| | | begin location 12
| | | | kind : ASSIGNMENT;
| | | | thesource = 3; goto location 14;
| | | | | libmpi.c 217.4--217.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | end location 12;
| | | begin location 13
| | | | kind : ASSIGNMENT;
| | | | thesource = 4; goto location 14;
| | | | | libmpi.c 217.4--217.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | end location 13;
| | | begin location 14
| | | | kind : ASSIGNMENT;
| | | | thetag = _tag; goto location 21;
| | | | | libmpi.c 218.4--218.18: "thetag = _tag;"
| | | end location 14;
| | | begin location 15
| | | | kind : RECEIVE;
| | | | recv(_tmp,0,any(thetag), thesize); goto location 16;
| | | | | libmpi.c 220.4--220.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | | recv(_tmp,1,any(thetag), thesize); goto location 17;
| | | | | libmpi.c 220.4--220.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | | recv(_tmp,2,any(thetag), thesize); goto location 18;
| | | | | libmpi.c 220.4--220.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | | recv(_tmp,3,any(thetag), thesize); goto location 19;
| | | | | libmpi.c 220.4--220.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | | recv(_tmp,4,any(thetag), thesize); goto location 20;
| | | | | libmpi.c 220.4--220.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | end location 15;
| | | begin location 16
| | | | kind : ASSIGNMENT;
| | | | thesource = 0; goto location 21;
| | | | | libmpi.c 220.4--220.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | end location 16;
| | | begin location 17
| | | | kind : ASSIGNMENT;
| | | | thesource = 1; goto location 21;
| | | | | libmpi.c 220.4--220.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | end location 17;
| | | begin location 18
| | | | kind : ASSIGNMENT;
| | | | thesource = 2; goto location 21;
| | | | | libmpi.c 220.4--220.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | end location 18;
| | | begin location 19
| | | | kind : ASSIGNMENT;
| | | | thesource = 3; goto location 21;
| | | | | libmpi.c 220.4--220.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | end location 19;
| | | begin location 20
| | | | kind : ASSIGNMENT;
| | | | thesource = 4; goto location 21;
| | | | | libmpi.c 220.4--220.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | end location 20;
| | | begin location 21
| | | | kind : CHOICE;
| | | | when !(_status==MPI_STATUS_IGNORE) goto location 22;
| | | | | libmpi.c 222.2--222.35: "if (_status != MPI_STATUS_IGNORE)"
| | | | when !!(_status==MPI_STATUS_IGNORE) goto location 25;
| | | | | libmpi.c 222.2--222.35: "if (_status != MPI_STATUS_IGNORE)"
| | | end location 21;
| | | begin location 22
| | | | kind : ASSIGNMENT;
| | | | *_status.MPI_SOURCE = thesource; goto location 23;
| | | | | libmpi.c 223.4--223.36: "_status->MPI_SOURCE = thesource;"
| | | end location 22;
| | | begin location 23
| | | | kind : ASSIGNMENT;
| | | | *_status.MPI_TAG = thetag; goto location 24;
| | | | | libmpi.c 224.4--224.30: "_status->MPI_TAG = thetag;"
| | | end location 23;
| | | begin location 24
| | | | kind : ASSIGNMENT;
| | | | *_status.SIZE = thesize; goto location 25;
| | | | | libmpi.c 225.4--225.28: "_status->SIZE = thesize;"
| | | end location 24;
| | | begin location 25
| | | | kind : ASSIGNMENT;
| | | | thecount = thesize/sizeof(real); goto location 26;
| | | | | libmpi.c 227.2--227.36: "thecount = thesize/sizeof(double);"
| | | end location 25;
| | | begin location 26
| | | | kind : ASSIGNMENT;
| | | | _i = 0; goto location 27;
| | | | | libmpi.c 228.7--228.11: "_i=0"
| | | end location 26;
| | | begin location 27
| | | | kind : CHOICE;
| | | | when _i < thecount goto location 28;
| | | | | libmpi.c 228.2--228.31: "for (_i=0; _i<thecount; _i++)"
| | | | when !_i < thecount goto location 30;
| | | | | libmpi.c 228.2--228.31: "for (_i=0; _i<thecount; _i++)"
| | | end location 27;
| | | begin location 28
| | | | kind : ASSIGNMENT;
| | | | *(_buf+_i) = _tmp[_i]; goto location 29;
| | | | | libmpi.c 228.32--228.52: "_buf[_i] = _tmp[_i];"
| | | end location 28;
| | | begin location 29
| | | | kind : ASSIGNMENT;
| | | | _i = _i+1; goto location 27;
| | | | | libmpi.c 228.26--228.30: "_i++"
| | | end location 29;
| | | begin location 30
| | | | kind : RETURN;
| | | | return 0; goto location 31;
| | | | | libmpi.c 229.2--229.11: "return 0;"
| | | end location 30;
| | | begin location 31
| | | | kind : TERMINAL;
| | | end location 31;
| | end function MPIX_Recv_double;
| | begin function MPIX_Recv_int
| | | | libmpi.c 232.0--233.41: "int MPIX_Recv_int(int *_buf, int _count, int _source, int _tag, MPI_Comm _comm,                     MPI_Status *_status)"
| | | begin formal parameters
| | | | _buf : pointer(5)<int>;
| | | | | libmpi.c 232.18--232.27: "int *_buf"
| | | | _count : int;
| | | | | libmpi.c 232.29--232.39: "int _count"
| | | | _source : int;
| | | | | libmpi.c 232.41--232.52: "int _source"
| | | | _tag : int;
| | | | | libmpi.c 232.54--232.62: "int _tag"
| | | | _comm : int;
| | | | | libmpi.c 232.64--232.78: "MPI_Comm _comm"
| | | | _status : pointer(2)<Record[MPI_Status; MPI_SOURCE:int, MPI_TAG:int, SIZE:int]>;
| | | | | libmpi.c 233.21--233.40: "MPI_Status *_status"
| | | end formal parameters;
| | | begin proper local variables
| | | | _tmp : int[_count];
| | | | | libmpi.c 234.2--234.19: "int _tmp[_count];"
| | | | _i : int;
| | | | | libmpi.c 235.2--235.9: "int _i;"
| | | | thesource : int;
| | | | | libmpi.c 236.2--236.16: "int thesource;"
| | | | thetag : int;
| | | | | libmpi.c 237.2--237.13: "int thetag;"
| | | | thesize : int;
| | | | | libmpi.c 238.2--238.14: "int thesize;"
| | | | thecount : int;
| | | | | libmpi.c 239.2--239.15: "int thecount;"
| | | end proper local variables;
| | | start location : 0;
| | | begin location 0
| | | | kind : CHOICE;
| | | | when !(_source==MPI_ANY_SOURCE) && !(_tag==MPI_ANY_TAG) goto location 1;
| | | | | libmpi.c 241.2--241.55: "if (_source != MPI_ANY_SOURCE && _tag != MPI_ANY_TAG)"
| | | | when !(!(_source==MPI_ANY_SOURCE) && !(_tag==MPI_ANY_TAG)) goto location 4;
| | | | | libmpi.c 241.2--241.55: "if (_source != MPI_ANY_SOURCE && _tag != MPI_ANY_TAG)"
| | | end location 0;
| | | begin location 1
| | | | kind : RECEIVE;
| | | | recv(_tmp,_source,_tag, thesize); goto location 2;
| | | | | libmpi.c 242.4--242.39: "recv(_tmp, _source, _tag, thesize);"
| | | end location 1;
| | | begin location 2
| | | | kind : ASSIGNMENT;
| | | | thesource = _source; goto location 3;
| | | | | libmpi.c 243.4--243.24: "thesource = _source;"
| | | end location 2;
| | | begin location 3
| | | | kind : ASSIGNMENT;
| | | | thetag = _tag; goto location 21;
| | | | | libmpi.c 244.4--244.18: "thetag = _tag;"
| | | end location 3;
| | | begin location 4
| | | | kind : CHOICE;
| | | | when !(_source==MPI_ANY_SOURCE) && (_tag==MPI_ANY_TAG) goto location 5;
| | | | | libmpi.c 245.9--245.62: "if (_source != MPI_ANY_SOURCE && _tag == MPI_ANY_TAG)"
| | | | when !(!(_source==MPI_ANY_SOURCE) && (_tag==MPI_ANY_TAG)) goto location 7;
| | | | | libmpi.c 245.9--245.62: "if (_source != MPI_ANY_SOURCE && _tag == MPI_ANY_TAG)"
| | | end location 4;
| | | begin location 5
| | | | kind : RECEIVE;
| | | | recv(_tmp,_source,any(thetag), thesize); goto location 6;
| | | | | libmpi.c 246.4--246.46: "recv(_tmp, _source, any(thetag), thesize);"
| | | end location 5;
| | | begin location 6
| | | | kind : ASSIGNMENT;
| | | | thesource = _source; goto location 21;
| | | | | libmpi.c 247.4--247.24: "thesource = _source;"
| | | end location 6;
| | | begin location 7
| | | | kind : CHOICE;
| | | | when (_source==MPI_ANY_SOURCE) && !(_tag==MPI_ANY_TAG) goto location 8;
| | | | | libmpi.c 248.9--248.62: "if (_source == MPI_ANY_SOURCE && _tag != MPI_ANY_TAG)"
| | | | when !((_source==MPI_ANY_SOURCE) && !(_tag==MPI_ANY_TAG)) goto location 15;
| | | | | libmpi.c 248.9--248.62: "if (_source == MPI_ANY_SOURCE && _tag != MPI_ANY_TAG)"
| | | end location 7;
| | | begin location 8
| | | | kind : RECEIVE;
| | | | recv(_tmp,0,_tag, thesize); goto location 9;
| | | | | libmpi.c 249.4--249.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | | recv(_tmp,1,_tag, thesize); goto location 10;
| | | | | libmpi.c 249.4--249.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | | recv(_tmp,2,_tag, thesize); goto location 11;
| | | | | libmpi.c 249.4--249.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | | recv(_tmp,3,_tag, thesize); goto location 12;
| | | | | libmpi.c 249.4--249.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | | recv(_tmp,4,_tag, thesize); goto location 13;
| | | | | libmpi.c 249.4--249.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | end location 8;
| | | begin location 9
| | | | kind : ASSIGNMENT;
| | | | thesource = 0; goto location 14;
| | | | | libmpi.c 249.4--249.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | end location 9;
| | | begin location 10
| | | | kind : ASSIGNMENT;
| | | | thesource = 1; goto location 14;
| | | | | libmpi.c 249.4--249.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | end location 10;
| | | begin location 11
| | | | kind : ASSIGNMENT;
| | | | thesource = 2; goto location 14;
| | | | | libmpi.c 249.4--249.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | end location 11;
| | | begin location 12
| | | | kind : ASSIGNMENT;
| | | | thesource = 3; goto location 14;
| | | | | libmpi.c 249.4--249.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | end location 12;
| | | begin location 13
| | | | kind : ASSIGNMENT;
| | | | thesource = 4; goto location 14;
| | | | | libmpi.c 249.4--249.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | end location 13;
| | | begin location 14
| | | | kind : ASSIGNMENT;
| | | | thetag = _tag; goto location 21;
| | | | | libmpi.c 250.4--250.18: "thetag = _tag;"
| | | end location 14;
| | | begin location 15
| | | | kind : RECEIVE;
| | | | recv(_tmp,0,any(thetag), thesize); goto location 16;
| | | | | libmpi.c 252.4--252.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | | recv(_tmp,1,any(thetag), thesize); goto location 17;
| | | | | libmpi.c 252.4--252.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | | recv(_tmp,2,any(thetag), thesize); goto location 18;
| | | | | libmpi.c 252.4--252.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | | recv(_tmp,3,any(thetag), thesize); goto location 19;
| | | | | libmpi.c 252.4--252.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | | recv(_tmp,4,any(thetag), thesize); goto location 20;
| | | | | libmpi.c 252.4--252.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | end location 15;
| | | begin location 16
| | | | kind : ASSIGNMENT;
| | | | thesource = 0; goto location 21;
| | | | | libmpi.c 252.4--252.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | end location 16;
| | | begin location 17
| | | | kind : ASSIGNMENT;
| | | | thesource = 1; goto location 21;
| | | | | libmpi.c 252.4--252.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | end location 17;
| | | begin location 18
| | | | kind : ASSIGNMENT;
| | | | thesource = 2; goto location 21;
| | | | | libmpi.c 252.4--252.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | end location 18;
| | | begin location 19
| | | | kind : ASSIGNMENT;
| | | | thesource = 3; goto location 21;
| | | | | libmpi.c 252.4--252.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | end location 19;
| | | begin location 20
| | | | kind : ASSIGNMENT;
| | | | thesource = 4; goto location 21;
| | | | | libmpi.c 252.4--252.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | end location 20;
| | | begin location 21
| | | | kind : CHOICE;
| | | | when !(_status==MPI_STATUS_IGNORE) goto location 22;
| | | | | libmpi.c 254.2--254.35: "if (_status != MPI_STATUS_IGNORE)"
| | | | when !!(_status==MPI_STATUS_IGNORE) goto location 25;
| | | | | libmpi.c 254.2--254.35: "if (_status != MPI_STATUS_IGNORE)"
| | | end location 21;
| | | begin location 22
| | | | kind : ASSIGNMENT;
| | | | *_status.MPI_SOURCE = thesource; goto location 23;
| | | | | libmpi.c 255.4--255.36: "_status->MPI_SOURCE = thesource;"
| | | end location 22;
| | | begin location 23
| | | | kind : ASSIGNMENT;
| | | | *_status.MPI_TAG = thetag; goto location 24;
| | | | | libmpi.c 256.4--256.30: "_status->MPI_TAG = thetag;"
| | | end location 23;
| | | begin location 24
| | | | kind : ASSIGNMENT;
| | | | *_status.SIZE = thesize; goto location 25;
| | | | | libmpi.c 257.4--257.28: "_status->SIZE = thesize;"
| | | end location 24;
| | | begin location 25
| | | | kind : ASSIGNMENT;
| | | | thecount = thesize/sizeof(int); goto location 26;
| | | | | libmpi.c 259.2--259.33: "thecount = thesize/sizeof(int);"
| | | end location 25;
| | | begin location 26
| | | | kind : ASSIGNMENT;
| | | | _i = 0; goto location 27;
| | | | | libmpi.c 260.7--260.11: "_i=0"
| | | end location 26;
| | | begin location 27
| | | | kind : CHOICE;
| | | | when _i < thecount goto location 28;
| | | | | libmpi.c 260.2--260.31: "for (_i=0; _i<thecount; _i++)"
| | | | when !_i < thecount goto location 30;
| | | | | libmpi.c 260.2--260.31: "for (_i=0; _i<thecount; _i++)"
| | | end location 27;
| | | begin location 28
| | | | kind : ASSIGNMENT;
| | | | *(_buf+_i) = _tmp[_i]; goto location 29;
| | | | | libmpi.c 260.32--260.52: "_buf[_i] = _tmp[_i];"
| | | end location 28;
| | | begin location 29
| | | | kind : ASSIGNMENT;
| | | | _i = _i+1; goto location 27;
| | | | | libmpi.c 260.26--260.30: "_i++"
| | | end location 29;
| | | begin location 30
| | | | kind : RETURN;
| | | | return 0; goto location 31;
| | | | | libmpi.c 261.2--261.11: "return 0;"
| | | end location 30;
| | | begin location 31
| | | | kind : TERMINAL;
| | | end location 31;
| | end function MPIX_Recv_int;
| | begin function MPI_Init
| | | | libmpi.c 101.0--101.37: "int MPI_Init(int *argc, char ***argv)"
| | | begin formal parameters
| | | | argc : pointer(5)<int>;
| | | | | libmpi.c 101.13--101.22: "int *argc"
| | | | argv : pointer(8)<pointer(6)<pointer(7)<char>>>;
| | | | | libmpi.c 101.24--101.36: "char ***argv"
| | | end formal parameters;
| | | start location : 0;
| | | begin location 0
| | | | kind : ASSERTION;
| | | | assert MPIX_State==MPIX_UNINITIALIZED; Attempt to call MPI_Init when MPI is already initialized goto location 1;
| | | | | libmpi.c 102.15--102.115: "assert MPIX_State == MPIX_UNINITIALIZED, "Attempt to call MPI_Init when MPI is already initialized";"
| | | end location 0;
| | | begin location 1
| | | | kind : ASSIGNMENT;
| | | | MPIX_State = MPIX_INITIALIZED; goto location 2;
| | | | | libmpi.c 103.2--103.32: "MPIX_State = MPIX_INITIALIZED;"
| | | end location 1;
| | | begin location 2
| | | | kind : RETURN;
| | | | return 0; goto location 3;
| | | | | libmpi.c 104.2--104.11: "return 0;"
| | | end location 2;
| | | begin location 3
| | | | kind : TERMINAL;
| | | end location 3;
| | end function MPI_Init;
| | begin function MPI_Comm_size
| | | | libmpi.c 121.0--121.45: "int MPI_Comm_size(MPI_Comm _comm, int *_size)"
| | | begin formal parameters
| | | | _comm : int;
| | | | | libmpi.c 121.18--121.32: "MPI_Comm _comm"
| | | | _size : pointer(5)<int>;
| | | | | libmpi.c 121.34--121.44: "int *_size"
| | | end formal parameters;
| | | start location : 0;
| | | begin location 0
| | | | kind : ASSERTION;
| | | | assert MPIX_State==MPIX_INITIALIZED; Attempt to call MPI_Comm_size when MPI is not initialized goto location 1;
| | | | | libmpi.c 122.15--122.114: "assert MPIX_State == MPIX_INITIALIZED, "Attempt to call MPI_Comm_size when MPI is not initialized";"
| | | end location 0;
| | | begin location 1
| | | | kind : ASSERTION;
| | | | assert _comm==MPI_COMM_WORLD;  goto location 2;
| | | | | libmpi.c 124.15--124.46: "assert _comm == MPI_COMM_WORLD;"
| | | end location 1;
| | | begin location 2
| | | | kind : ASSIGNMENT;
| | | | *_size = 5; goto location 3;
| | | | | libmpi.c 125.2--125.18: "*_size = NPROCS;"
| | | end location 2;
| | | begin location 3
| | | | kind : RETURN;
| | | | return 0; goto location 4;
| | | | | libmpi.c 126.2--126.11: "return 0;"
| | | end location 3;
| | | begin location 4
| | | | kind : TERMINAL;
| | | end location 4;
| | end function MPI_Comm_size;
| | begin function MPI_Comm_rank
| | | | libmpi.c 113.0--113.45: "int MPI_Comm_rank(MPI_Comm _comm, int *_rank)"
| | | begin formal parameters
| | | | _comm : int;
| | | | | libmpi.c 113.18--113.32: "MPI_Comm _comm"
| | | | _rank : pointer(5)<int>;
| | | | | libmpi.c 113.34--113.44: "int *_rank"
| | | end formal parameters;
| | | start location : 0;
| | | begin location 0
| | | | kind : ASSERTION;
| | | | assert MPIX_State==MPIX_INITIALIZED; Attempt to call MPI_Comm_rank when MPI is not initialized goto location 1;
| | | | | libmpi.c 114.15--114.114: "assert MPIX_State == MPIX_INITIALIZED, "Attempt to call MPI_Comm_rank when MPI is not initialized";"
| | | end location 0;
| | | begin location 1
| | | | kind : ASSERTION;
| | | | assert _comm==MPI_COMM_WORLD;  goto location 2;
| | | | | libmpi.c 116.15--116.46: "assert _comm == MPI_COMM_WORLD;"
| | | end location 1;
| | | begin location 2
| | | | kind : ASSIGNMENT;
| | | | *_rank = 0; goto location 3;
| | | | | libmpi.c 117.2--117.15: "*_rank = PID;"
| | | end location 2;
| | | begin location 3
| | | | kind : RETURN;
| | | | return 0; goto location 4;
| | | | | libmpi.c 118.2--118.11: "return 0;"
| | | end location 3;
| | | begin location 4
| | | | kind : TERMINAL;
| | | end location 4;
| | end function MPI_Comm_rank;
| | begin function MPI_Finalize
| | | | libmpi.c 107.0--107.18: "int MPI_Finalize()"
| | | start location : 0;
| | | begin location 0
| | | | kind : ASSERTION;
| | | | assert MPIX_State==MPIX_INITIALIZED; Attempt to call MPI_Finalize when MPI is not initialized goto location 1;
| | | | | libmpi.c 108.15--108.113: "assert MPIX_State == MPIX_INITIALIZED, "Attempt to call MPI_Finalize when MPI is not initialized";"
| | | end location 0;
| | | begin location 1
| | | | kind : ASSIGNMENT;
| | | | MPIX_State = MPIX_FINALIZED; goto location 2;
| | | | | libmpi.c 109.2--109.30: "MPIX_State = MPIX_FINALIZED;"
| | | end location 1;
| | | begin location 2
| | | | kind : RETURN;
| | | | return 0; goto location 3;
| | | | | libmpi.c 110.2--110.11: "return 0;"
| | | end location 2;
| | | begin location 3
| | | | kind : TERMINAL;
| | | end location 3;
| | end function MPI_Finalize;
| end process 0;
| begin process 1
| | main function : main;
| | begin process variables
| | | MPI_REQUEST_NULL : pointer(1)<Record[MPIX_Comm_Record; id:int]>;
| | | | libmpi.c 85.0--85.55: "MPI_Request MPI_REQUEST_NULL = (MPIX_Comm_Record*)NULL;"
| | | MPI_STATUS_IGNORE : pointer(2)<Record[MPI_Status; MPI_SOURCE:int, MPI_TAG:int, SIZE:int]>;
| | | | libmpi.c 89.0--89.50: "MPI_Status *MPI_STATUS_IGNORE = (MPI_Status*)NULL;"
| | | MPIX_State : int;
| | | | libmpi.c 94.0--94.19: "int MPIX_State = 0;"
| | | nprocs : int;
| | | | diffusion_par_bad.c 22.0--22.11: "int nprocs;"
| | | myrank : int;
| | | | diffusion_par_bad.c 23.0--23.11: "int myrank;"
| | | left : int;
| | | | diffusion_par_bad.c 24.0--24.9: "int left;"
| | | right : int;
| | | | diffusion_par_bad.c 25.0--25.10: "int right;"
| | | nxl : int;
| | | | diffusion_par_bad.c 26.0--26.8: "int nxl;"
| | | first : int;
| | | | diffusion_par_bad.c 27.0--27.10: "int first;"
| | | start : int;
| | | | diffusion_par_bad.c 28.0--28.10: "int start;"
| | | stop : int;
| | | | diffusion_par_bad.c 29.0--29.9: "int stop;"
| | | buf : pointer(3)<real>;
| | | | diffusion_par_bad.c 30.0--30.12: "double* buf;"
| | | v : pointer(3)<real>;
| | | | diffusion_par_bad.c 31.0--31.10: "double* v;"
| | | v_new : pointer(3)<real>;
| | | | diffusion_par_bad.c 32.0--32.14: "double* v_new;"
| | end process variables;
| | begin function owner
| | | | diffusion_par_bad.c 34.0--34.20: "int owner(int index)"
| | | begin formal parameters
| | | | index : int;
| | | | | diffusion_par_bad.c 34.10--34.19: "int index"
| | | end formal parameters;
| | | start location : 0;
| | | begin location 0
| | | | kind : RETURN;
| | | | return ((nprocs*(index+1))-1)/nx; goto location 1;
| | | | | diffusion_par_bad.c 34.23--34.54: "return (nprocs*(index+1)-1)/nx;"
| | | end location 0;
| | | begin location 1
| | | | kind : TERMINAL;
| | | end location 1;
| | end function owner;
| | begin function firstForProc
| | | | diffusion_par_bad.c 36.0--36.26: "int firstForProc(int rank)"
| | | begin formal parameters
| | | | rank : int;
| | | | | diffusion_par_bad.c 36.17--36.25: "int rank"
| | | end formal parameters;
| | | start location : 0;
| | | begin location 0
| | | | kind : RETURN;
| | | | return (rank*nx)/nprocs; goto location 1;
| | | | | diffusion_par_bad.c 36.29--36.53: "return (rank*nx)/nprocs;"
| | | end location 0;
| | | begin location 1
| | | | kind : TERMINAL;
| | | end location 1;
| | end function firstForProc;
| | begin function countForProc
| | | | diffusion_par_bad.c 38.0--38.26: "int countForProc(int rank)"
| | | begin formal parameters
| | | | rank : int;
| | | | | diffusion_par_bad.c 38.17--38.25: "int rank"
| | | end formal parameters;
| | | begin proper local variables
| | | | a : int;
| | | | | diffusion_par_bad.c 39.1--39.7: "int a;"
| | | | b : int;
| | | | | diffusion_par_bad.c 40.1--40.7: "int b;"
| | | end proper local variables;
| | | start location : 0;
| | | begin location 0
| | | | kind : INVOCATION;
| | | | a = firstForProc(rank+1); goto location 1;
| | | | | diffusion_par_bad.c 42.1--42.26: "a = firstForProc(rank+1);"
| | | end location 0;
| | | begin location 1
| | | | kind : INVOCATION;
| | | | b = firstForProc(rank); goto location 2;
| | | | | diffusion_par_bad.c 43.1--43.24: "b = firstForProc(rank);"
| | | end location 1;
| | | begin location 2
| | | | kind : RETURN;
| | | | return a-b; goto location 3;
| | | | | diffusion_par_bad.c 44.1--44.12: "return a-b;"
| | | end location 2;
| | | begin location 3
| | | | kind : TERMINAL;
| | | end location 3;
| | end function countForProc;
| | begin function init
| | | | diffusion_par_bad.c 48.0--48.11: "void init()"
| | | begin proper local variables
| | | | i : int;
| | | | | diffusion_par_bad.c 49.1--49.7: "int i;"
| | | | owner : int;
| | | | | diffusion_par_bad.c 50.1--50.11: "int owner;"
| | | | bufSize : int;
| | | | | diffusion_par_bad.c 51.1--51.13: "int bufSize;"
| | | end proper local variables;
| | | start location : 0;
| | | begin location 0
| | | | kind : ASSIGNMENT;
| | | | i = 0; goto location 1;
| | | | | diffusion_par_bad.c 53.6--53.9: "i=0"
| | | end location 0;
| | | begin location 1
| | | | kind : CHOICE;
| | | | when i < nx goto location 2;
| | | | | diffusion_par_bad.c 53.1--53.21: "for (i=0; i<nx; i++)"
| | | | when !i < nx goto location 3;
| | | | | diffusion_par_bad.c 53.1--53.21: "for (i=0; i<nx; i++)"
| | | end location 1;
| | | begin location 2
| | | | kind : ASSIGNMENT;
| | | | i = i+1; goto location 1;
| | | | | diffusion_par_bad.c 53.17--53.20: "i++"
| | | end location 2;
| | | begin location 3
| | | | kind : ASSIGNMENT;
| | | | left = myrank-1; goto location 4;
| | | | | diffusion_par_bad.c 54.1--54.17: "left = myrank-1;"
| | | end location 3;
| | | begin location 4
| | | | kind : ASSIGNMENT;
| | | | right = myrank+1; goto location 5;
| | | | | diffusion_par_bad.c 55.1--55.18: "right = myrank+1;"
| | | end location 4;
| | | begin location 5
| | | | kind : INVOCATION;
| | | | first = firstForProc(myrank); goto location 6;
| | | | | diffusion_par_bad.c 56.1--56.30: "first = firstForProc(myrank);"
| | | end location 5;
| | | begin location 6
| | | | kind : INVOCATION;
| | | | nxl = countForProc(myrank); goto location 7;
| | | | | diffusion_par_bad.c 57.1--57.28: "nxl = countForProc(myrank);"
| | | end location 6;
| | | begin location 7
| | | | kind : ASSIGNMENT;
| | | | bufSize = nx/nprocs; goto location 8;
| | | | | diffusion_par_bad.c 58.1--58.21: "bufSize = nx/nprocs;"
| | | end location 7;
| | | begin location 8
| | | | kind : ASSIGNMENT;
| | | | bufSize = bufSize+1; goto location 9;
| | | | | diffusion_par_bad.c 59.27--59.37: "bufSize++;"
| | | end location 8;
| | | begin location 9
| | | | kind : ALLOCATE;
| | | | buf = (real*) malloc(bufSize*sizeof(real)); goto location 10;
| | | | | diffusion_par_bad.c 60.1--60.51: "buf = (double *) malloc(bufSize * sizeof(double));"
| | | end location 9;
| | | begin location 10
| | | | kind : ALLOCATE;
| | | | v = (real*) malloc((nxl+2)*sizeof(real)); goto location 11;
| | | | | diffusion_par_bad.c 61.1--61.51: "v = (double *) malloc((nxl + 2) * sizeof(double));"
| | | end location 10;
| | | begin location 11
| | | | kind : ALLOCATE;
| | | | v_new = (real*) malloc((nxl+2)*sizeof(real)); goto location 12;
| | | | | diffusion_par_bad.c 62.1--62.55: "v_new = (double *) malloc((nxl + 2) * sizeof(double));"
| | | end location 11;
| | | begin location 12
| | | | kind : ASSIGNMENT;
| | | | i = 1; goto location 13;
| | | | | diffusion_par_bad.c 63.6--63.9: "i=1"
| | | end location 12;
| | | begin location 13
| | | | kind : CHOICE;
| | | | when i <= nxl goto location 14;
| | | | | diffusion_par_bad.c 63.1--63.23: "for (i=1; i<=nxl; i++)"
| | | | when !i <= nxl goto location 16;
| | | | | diffusion_par_bad.c 63.1--63.23: "for (i=1; i<=nxl; i++)"
| | | end location 13;
| | | begin location 14
| | | | kind : ASSIGNMENT;
| | | | *(v+i) = u0[(first+i)-1]; goto location 15;
| | | | | diffusion_par_bad.c 63.24--63.45: "v[i] = u0[first+i-1];"
| | | end location 14;
| | | begin location 15
| | | | kind : ASSIGNMENT;
| | | | i = i+1; goto location 13;
| | | | | diffusion_par_bad.c 63.19--63.22: "i++"
| | | end location 15;
| | | begin location 16
| | | | kind : INVOCATION;
| | | | owner = owner(0); goto location 17;
| | | | | diffusion_par_bad.c 64.1--64.18: "owner = owner(0);"
| | | end location 16;
| | | begin location 17
| | | | kind : CHOICE;
| | | | when myrank==owner goto location 18;
| | | | | diffusion_par_bad.c 65.1--65.21: "if (myrank == owner)"
| | | | when !(myrank==owner) goto location 19;
| | | | | diffusion_par_bad.c 65.1--65.21: "if (myrank == owner)"
| | | end location 17;
| | | begin location 18
| | | | kind : ASSIGNMENT;
| | | | start = 2; goto location 20;
| | | | | diffusion_par_bad.c 65.22--65.30: "start=2;"
| | | end location 18;
| | | begin location 19
| | | | kind : ASSIGNMENT;
| | | | start = 1; goto location 20;
| | | | | diffusion_par_bad.c 65.36--65.44: "start=1;"
| | | end location 19;
| | | begin location 20
| | | | kind : INVOCATION;
| | | | owner = owner(nx-1); goto location 21;
| | | | | diffusion_par_bad.c 66.1--66.21: "owner = owner(nx-1);"
| | | end location 20;
| | | begin location 21
| | | | kind : CHOICE;
| | | | when myrank==owner goto location 22;
| | | | | diffusion_par_bad.c 67.1--67.21: "if (myrank == owner)"
| | | | when !(myrank==owner) goto location 23;
| | | | | diffusion_par_bad.c 67.1--67.21: "if (myrank == owner)"
| | | end location 21;
| | | begin location 22
| | | | kind : ASSIGNMENT;
| | | | stop = nxl-1; goto location 24;
| | | | | diffusion_par_bad.c 67.22--67.33: "stop=nxl-1;"
| | | end location 22;
| | | begin location 23
| | | | kind : ASSIGNMENT;
| | | | stop = nxl; goto location 24;
| | | | | diffusion_par_bad.c 67.39--67.48: "stop=nxl;"
| | | end location 23;
| | | begin location 24
| | | | kind : RETURN;
| | | | return null; goto location 25;
| | | | | diffusion_par_bad.c 68.0--68.0: "}"
| | | end location 24;
| | | begin location 25
| | | | kind : TERMINAL;
| | | end location 25;
| | end function init;
| | begin function cleanup
| | | | diffusion_par_bad.c 70.0--70.14: "void cleanup()"
| | | start location : 0;
| | | begin location 0
| | | | kind : INVOCATION;
| | | | free(buf); goto location 1;
| | | | | diffusion_par_bad.c 71.1--71.11: "free(buf);"
| | | end location 0;
| | | begin location 1
| | | | kind : INVOCATION;
| | | | free(v); goto location 2;
| | | | | diffusion_par_bad.c 72.1--72.9: "free(v);"
| | | end location 1;
| | | begin location 2
| | | | kind : INVOCATION;
| | | | free(v_new); goto location 3;
| | | | | diffusion_par_bad.c 73.1--73.13: "free(v_new);"
| | | end location 2;
| | | begin location 3
| | | | kind : RETURN;
| | | | return null; goto location 4;
| | | | | diffusion_par_bad.c 74.0--74.0: "}"
| | | end location 3;
| | | begin location 4
| | | | kind : TERMINAL;
| | | end location 4;
| | end function cleanup;
| | begin function write
| | | | diffusion_par_bad.c 76.0--76.20: "void write(int time)"
| | | begin formal parameters
| | | | time : int;
| | | | | diffusion_par_bad.c 76.11--76.19: "int time"
| | | end formal parameters;
| | | begin proper local variables
| | | | source : int;
| | | | | diffusion_par_bad.c 77.1--77.12: "int source;"
| | | | i : int;
| | | | | diffusion_par_bad.c 78.1--78.7: "int i;"
| | | | j : int;
| | | | | diffusion_par_bad.c 79.1--79.7: "int j;"
| | | | count : int;
| | | | | diffusion_par_bad.c 80.1--80.11: "int count;"
| | | end proper local variables;
| | | start location : 0;
| | | begin location 0
| | | | kind : CHOICE;
| | | | when !(myrank==0) goto location 1;
| | | | | diffusion_par_bad.c 82.1--82.17: "if (myrank != 0)"
| | | | when !!(myrank==0) goto location 2;
| | | | | diffusion_par_bad.c 82.1--82.17: "if (myrank != 0)"
| | | end location 0;
| | | begin location 1
| | | | kind : INVOCATION;
| | | | MPI_Send(v+1,nxl,MPI_DOUBLE,0,0,MPI_COMM_WORLD); goto location 18;
| | | | | diffusion_par_bad.c 83.2--83.55: "MPI_Send(v+1, nxl, MPI_DOUBLE, 0, 0, MPI_COMM_WORLD);"
| | | end location 1;
| | | begin location 2
| | | | kind : ASSIGNMENT;
| | | | j = 0; goto location 3;
| | | | | diffusion_par_bad.c 85.2--85.6: "j=0;"
| | | end location 2;
| | | begin location 3
| | | | kind : ASSIGNMENT;
| | | | source = 0; goto location 4;
| | | | | diffusion_par_bad.c 86.7--86.15: "source=0"
| | | end location 3;
| | | begin location 4
| | | | kind : CHOICE;
| | | | when source < nprocs goto location 5;
| | | | | diffusion_par_bad.c 86.2--86.41: "for (source=0; source<nprocs; source++)"
| | | | when !source < nprocs goto location 18;
| | | | | diffusion_par_bad.c 86.2--86.41: "for (source=0; source<nprocs; source++)"
| | | end location 4;
| | | begin location 5
| | | | kind : INVOCATION;
| | | | count = countForProc(source); goto location 6;
| | | | | diffusion_par_bad.c 87.3--87.32: "count = countForProc(source);"
| | | end location 5;
| | | begin location 6
| | | | kind : CHOICE;
| | | | when !(source==0) goto location 7;
| | | | | diffusion_par_bad.c 88.3--88.19: "if (source != 0)"
| | | | when !!(source==0) goto location 8;
| | | | | diffusion_par_bad.c 88.3--88.19: "if (source != 0)"
| | | end location 6;
| | | begin location 7
| | | | kind : INVOCATION;
| | | | MPI_Recv(buf,count,MPI_DOUBLE,source,0,MPI_COMM_WORLD,MPI_STATUS_IGNORE); goto location 12;
| | | | | diffusion_par_bad.c 89.4--89.83: "MPI_Recv(buf, count, MPI_DOUBLE, source, 0, MPI_COMM_WORLD, MPI_STATUS_IGNORE);"
| | | end location 7;
| | | begin location 8
| | | | kind : ASSIGNMENT;
| | | | i = 0; goto location 9;
| | | | | diffusion_par_bad.c 91.9--91.12: "i=0"
| | | end location 8;
| | | begin location 9
| | | | kind : CHOICE;
| | | | when i < count goto location 10;
| | | | | diffusion_par_bad.c 91.4--91.27: "for (i=0; i<count; i++)"
| | | | when !i < count goto location 12;
| | | | | diffusion_par_bad.c 91.4--91.27: "for (i=0; i<count; i++)"
| | | end location 9;
| | | begin location 10
| | | | kind : ASSIGNMENT;
| | | | *(buf+i) = *(v+(i+1)); goto location 11;
| | | | | diffusion_par_bad.c 91.28--91.44: "buf[i] = v[i+1];"
| | | end location 10;
| | | begin location 11
| | | | kind : ASSIGNMENT;
| | | | i = i+1; goto location 9;
| | | | | diffusion_par_bad.c 91.23--91.26: "i++"
| | | end location 11;
| | | begin location 12
| | | | kind : ASSIGNMENT;
| | | | i = 0; goto location 13;
| | | | | diffusion_par_bad.c 92.8--92.11: "i=0"
| | | end location 12;
| | | begin location 13
| | | | kind : CHOICE;
| | | | when i < count goto location 14;
| | | | | diffusion_par_bad.c 92.3--92.26: "for (i=0; i<count; i++)"
| | | | when !i < count goto location 17;
| | | | | diffusion_par_bad.c 92.3--92.26: "for (i=0; i<count; i++)"
| | | end location 13;
| | | begin location 14
| | | | kind : ASSIGNMENT;
| | | | data[time][j] = *(buf+i); goto location 15;
| | | | | diffusion_par_bad.c 93.4--93.27: "data[time][j] = buf[i];"
| | | end location 14;
| | | begin location 15
| | | | kind : ASSIGNMENT;
| | | | j = j+1; goto location 16;
| | | | | diffusion_par_bad.c 94.4--94.8: "j++;"
| | | end location 15;
| | | begin location 16
| | | | kind : ASSIGNMENT;
| | | | i = i+1; goto location 13;
| | | | | diffusion_par_bad.c 92.22--92.25: "i++"
| | | end location 16;
| | | begin location 17
| | | | kind : ASSIGNMENT;
| | | | source = source+1; goto location 4;
| | | | | diffusion_par_bad.c 86.32--86.40: "source++"
| | | end location 17;
| | | begin location 18
| | | | kind : RETURN;
| | | | return null; goto location 19;
| | | | | diffusion_par_bad.c 98.0--98.0: "}"
| | | end location 18;
| | | begin location 19
| | | | kind : TERMINAL;
| | | end location 19;
| | end function write;
| | begin function exchange_ghost_cells
| | | | diffusion_par_bad.c 101.0--101.27: "void exchange_ghost_cells()"
| | | start location : 0;
| | | begin location 0
| | | | kind : CHOICE;
| | | | when 0 <= left goto location 1;
| | | | | diffusion_par_bad.c 102.1--102.15: "if (left >= 0)"
| | | | when !0 <= left goto location 2;
| | | | | diffusion_par_bad.c 102.1--102.15: "if (left >= 0)"
| | | end location 0;
| | | begin location 1
| | | | kind : INVOCATION;
| | | | MPI_Send(v+1,1,MPI_DOUBLE,left,0,MPI_COMM_WORLD); goto location 2;
| | | | | diffusion_par_bad.c 102.16--102.70: "MPI_Send(v+1, 1, MPI_DOUBLE, left, 0, MPI_COMM_WORLD);"
| | | end location 1;
| | | begin location 2
| | | | kind : CHOICE;
| | | | when right < nprocs goto location 3;
| | | | | diffusion_par_bad.c 103.1--103.20: "if (right < nprocs)"
| | | | when !right < nprocs goto location 5;
| | | | | diffusion_par_bad.c 103.1--103.20: "if (right < nprocs)"
| | | end location 2;
| | | begin location 3
| | | | kind : INVOCATION;
| | | | MPI_Recv(v+(nxl+1),1,MPI_DOUBLE,right,0,MPI_COMM_WORLD,MPI_STATUS_IGNORE); goto location 4;
| | | | | diffusion_par_bad.c 104.2--104.82: "MPI_Recv(v+(nxl+1), 1, MPI_DOUBLE, right, 0, MPI_COMM_WORLD, MPI_STATUS_IGNORE);"
| | | end location 3;
| | | begin location 4
| | | | kind : INVOCATION;
| | | | MPI_Send(v+nxl,1,MPI_DOUBLE,right,0,MPI_COMM_WORLD); goto location 5;
| | | | | diffusion_par_bad.c 105.2--105.59: "MPI_Send(v+nxl, 1, MPI_DOUBLE, right, 0, MPI_COMM_WORLD);"
| | | end location 4;
| | | begin location 5
| | | | kind : CHOICE;
| | | | when 0 <= left goto location 6;
| | | | | diffusion_par_bad.c 107.1--107.15: "if (left >= 0)"
| | | | when !0 <= left goto location 7;
| | | | | diffusion_par_bad.c 107.1--107.15: "if (left >= 0)"
| | | end location 5;
| | | begin location 6
| | | | kind : INVOCATION;
| | | | MPI_Recv(v,1,MPI_DOUBLE,left,0,MPI_COMM_WORLD,MPI_STATUS_IGNORE); goto location 7;
| | | | | diffusion_par_bad.c 107.16--107.87: "MPI_Recv(v, 1, MPI_DOUBLE, left, 0, MPI_COMM_WORLD, MPI_STATUS_IGNORE);"
| | | end location 6;
| | | begin location 7
| | | | kind : RETURN;
| | | | return null; goto location 8;
| | | | | diffusion_par_bad.c 108.0--108.0: "}"
| | | end location 7;
| | | begin location 8
| | | | kind : TERMINAL;
| | | end location 8;
| | end function exchange_ghost_cells;
| | begin function update
| | | | diffusion_par_bad.c 112.0--112.13: "void update()"
| | | begin proper local variables
| | | | i : int;
| | | | | diffusion_par_bad.c 113.1--113.7: "int i;"
| | | end proper local variables;
| | | start location : 0;
| | | begin location 0
| | | | kind : ASSIGNMENT;
| | | | i = start; goto location 1;
| | | | | diffusion_par_bad.c 115.6--115.13: "i=start"
| | | end location 0;
| | | begin location 1
| | | | kind : CHOICE;
| | | | when i <= stop goto location 2;
| | | | | diffusion_par_bad.c 115.1--115.28: "for (i=start; i<=stop; i++)"
| | | | when !i <= stop goto location 4;
| | | | | diffusion_par_bad.c 115.1--115.28: "for (i=start; i<=stop; i++)"
| | | end location 1;
| | | begin location 2
| | | | kind : ASSIGNMENT;
| | | | *(v_new+i) = *(v+i)+(kappa*((*(v+(i+1))+*(v+(i-1)))-((real)2**(v+i)))); goto location 3;
| | | | | diffusion_par_bad.c 115.29--115.80: "v_new[i] = v[i] + kappa*(v[i+1] + v[i-1] - 2*v[i]);"
| | | end location 2;
| | | begin location 3
| | | | kind : ASSIGNMENT;
| | | | i = i+1; goto location 1;
| | | | | diffusion_par_bad.c 115.24--115.27: "i++"
| | | end location 3;
| | | begin location 4
| | | | kind : ASSIGNMENT;
| | | | i = start; goto location 5;
| | | | | diffusion_par_bad.c 116.6--116.13: "i=start"
| | | end location 4;
| | | begin location 5
| | | | kind : CHOICE;
| | | | when i <= stop goto location 6;
| | | | | diffusion_par_bad.c 116.1--116.28: "for (i=start; i<=stop; i++)"
| | | | when !i <= stop goto location 8;
| | | | | diffusion_par_bad.c 116.1--116.28: "for (i=start; i<=stop; i++)"
| | | end location 5;
| | | begin location 6
| | | | kind : ASSIGNMENT;
| | | | *(v+i) = *(v_new+i); goto location 7;
| | | | | diffusion_par_bad.c 116.29--116.45: "v[i] = v_new[i];"
| | | end location 6;
| | | begin location 7
| | | | kind : ASSIGNMENT;
| | | | i = i+1; goto location 5;
| | | | | diffusion_par_bad.c 116.24--116.27: "i++"
| | | end location 7;
| | | begin location 8
| | | | kind : RETURN;
| | | | return null; goto location 9;
| | | | | diffusion_par_bad.c 117.0--117.0: "}"
| | | end location 8;
| | | begin location 9
| | | | kind : TERMINAL;
| | | end location 9;
| | end function update;
| | begin function main
| | | | diffusion_par_bad.c 120.0--120.11: "void main()"
| | | begin proper local variables
| | | | argc : int;
| | | | | diffusion_par_bad.c 121.1--121.10: "int argc;"
| | | | argv : pointer(6)<pointer(7)<char>>;
| | | | | diffusion_par_bad.c 122.1--122.13: "char **argv;"
| | | | iter : int;
| | | | | diffusion_par_bad.c 123.1--123.10: "int iter;"
| | | end proper local variables;
| | | start location : 0;
| | | begin location 0
| | | | kind : INVOCATION;
| | | | MPI_Init(&argc,&argv); goto location 1;
| | | | | diffusion_par_bad.c 125.1--125.23: "MPI_Init(&argc,&argv);"
| | | end location 0;
| | | begin location 1
| | | | kind : INVOCATION;
| | | | MPI_Comm_size(MPI_COMM_WORLD,&nprocs); goto location 2;
| | | | | diffusion_par_bad.c 126.1--126.40: "MPI_Comm_size(MPI_COMM_WORLD, &nprocs);"
| | | end location 1;
| | | begin location 2
| | | | kind : INVOCATION;
| | | | MPI_Comm_rank(MPI_COMM_WORLD,&myrank); goto location 3;
| | | | | diffusion_par_bad.c 127.1--127.40: "MPI_Comm_rank(MPI_COMM_WORLD, &myrank);"
| | | end location 2;
| | | begin location 3
| | | | kind : INVOCATION;
| | | | init(); goto location 4;
| | | | | diffusion_par_bad.c 128.1--128.8: "init();"
| | | end location 3;
| | | begin location 4
| | | | kind : INVOCATION;
| | | | write(0); goto location 5;
| | | | | diffusion_par_bad.c 129.1--129.10: "write(0);"
| | | end location 4;
| | | begin location 5
| | | | kind : ASSIGNMENT;
| | | | iter = 1; goto location 6;
| | | | | diffusion_par_bad.c 130.6--130.14: "iter = 1"
| | | end location 5;
| | | begin location 6
| | | | kind : CHOICE;
| | | | when iter <= nsteps goto location 7;
| | | | | diffusion_par_bad.c 130.1--130.39: "for (iter = 1; iter <= nsteps; iter++)"
| | | | when !iter <= nsteps goto location 11;
| | | | | diffusion_par_bad.c 130.1--130.39: "for (iter = 1; iter <= nsteps; iter++)"
| | | end location 6;
| | | begin location 7
| | | | kind : INVOCATION;
| | | | exchange_ghost_cells(); goto location 8;
| | | | | diffusion_par_bad.c 131.2--131.25: "exchange_ghost_cells();"
| | | end location 7;
| | | begin location 8
| | | | kind : INVOCATION;
| | | | update(); goto location 9;
| | | | | diffusion_par_bad.c 132.2--132.11: "update();"
| | | end location 8;
| | | begin location 9
| | | | kind : INVOCATION;
| | | | write(iter); goto location 10;
| | | | | diffusion_par_bad.c 133.2--133.14: "write(iter);"
| | | end location 9;
| | | begin location 10
| | | | kind : ASSIGNMENT;
| | | | iter = iter+1; goto location 6;
| | | | | diffusion_par_bad.c 130.32--130.38: "iter++"
| | | end location 10;
| | | begin location 11
| | | | kind : INVOCATION;
| | | | cleanup(); goto location 12;
| | | | | diffusion_par_bad.c 135.1--135.11: "cleanup();"
| | | end location 11;
| | | begin location 12
| | | | kind : INVOCATION;
| | | | MPI_Finalize(); goto location 13;
| | | | | diffusion_par_bad.c 136.1--136.16: "MPI_Finalize();"
| | | end location 12;
| | | begin location 13
| | | | kind : RETURN;
| | | | return null; goto location 14;
| | | | | diffusion_par_bad.c 137.0--137.0: "}"
| | | end location 13;
| | | begin location 14
| | | | kind : TERMINAL;
| | | end location 14;
| | end function main;
| | begin function free
| | | | null
| | | begin formal parameters
| | | | pointer : pointer(4)<void>;
| | | | | null
| | | end formal parameters;
| | end function free;
| | begin function MPI_Send
| | | | libmpi.c 147.0--148.28: "int MPI_Send(void* _buf, int _count, MPI_Datatype _datatype, int _dest, int _tag,             MPI_Comm _comm)"
| | | begin formal parameters
| | | | _buf : pointer(4)<void>;
| | | | | libmpi.c 147.13--147.23: "void* _buf"
| | | | _count : int;
| | | | | libmpi.c 147.25--147.35: "int _count"
| | | | _datatype : int;
| | | | | libmpi.c 147.37--147.59: "MPI_Datatype _datatype"
| | | | _dest : int;
| | | | | libmpi.c 147.61--147.70: "int _dest"
| | | | _tag : int;
| | | | | libmpi.c 147.72--147.80: "int _tag"
| | | | _comm : int;
| | | | | libmpi.c 148.13--148.27: "MPI_Comm _comm"
| | | end formal parameters;
| | | begin proper local variables
| | | | _result : int;
| | | | | libmpi.c 149.2--149.14: "int _result;"
| | | end proper local variables;
| | | start location : 0;
| | | begin location 0
| | | | kind : ASSERTION;
| | | | assert MPIX_State==MPIX_INITIALIZED; Attempt to call MPI_Send when MPI is not initialized goto location 1;
| | | | | libmpi.c 151.15--151.109: "assert MPIX_State == MPIX_INITIALIZED, "Attempt to call MPI_Send when MPI is not initialized";"
| | | end location 0;
| | | begin location 1
| | | | kind : CHOICE;
| | | | when _dest==MPI_PROC_NULL goto location 2;
| | | | | libmpi.c 152.2--152.29: "if (_dest == MPI_PROC_NULL)"
| | | | when !(_dest==MPI_PROC_NULL) goto location 3;
| | | | | libmpi.c 152.2--152.29: "if (_dest == MPI_PROC_NULL)"
| | | end location 1;
| | | begin location 2
| | | | kind : RETURN;
| | | | return 0; goto location 3;
| | | | | libmpi.c 153.4--153.13: "return 0;"
| | | end location 2;
| | | begin location 3
| | | | kind : ASSERTION;
| | | | assert _comm==MPI_COMM_WORLD;  goto location 4;
| | | | | libmpi.c 154.15--154.46: "assert _comm == MPI_COMM_WORLD;"
| | | end location 3;
| | | begin location 4
| | | | kind : CHOICE;
| | | | when _datatype==MPI_DOUBLE goto location 5;
| | | | | libmpi.c 155.2--155.30: "if (_datatype == MPI_DOUBLE)"
| | | | when !(_datatype==MPI_DOUBLE) goto location 6;
| | | | | libmpi.c 155.2--155.30: "if (_datatype == MPI_DOUBLE)"
| | | end location 4;
| | | begin location 5
| | | | kind : INVOCATION;
| | | | _result = MPIX_Send_double((pointer(3)<real>)_buf,_count,_dest,_tag,_comm); goto location 9;
| | | | | libmpi.c 156.4--156.74: "_result = MPIX_Send_double((double*)_buf, _count, _dest, _tag, _comm);"
| | | end location 5;
| | | begin location 6
| | | | kind : CHOICE;
| | | | when _datatype==MPI_INT goto location 7;
| | | | | libmpi.c 157.7--157.32: "if (_datatype == MPI_INT)"
| | | | when !(_datatype==MPI_INT) goto location 8;
| | | | | libmpi.c 157.7--157.32: "if (_datatype == MPI_INT)"
| | | end location 6;
| | | begin location 7
| | | | kind : INVOCATION;
| | | | _result = MPIX_Send_int((pointer(5)<int>)_buf,_count,_dest,_tag,_comm); goto location 9;
| | | | | libmpi.c 158.4--158.68: "_result = MPIX_Send_int((int*)_buf, _count, _dest, _tag, _comm);"
| | | end location 7;
| | | begin location 8
| | | | kind : ASSERTION;
| | | | assert false; Currently only MPI_DOUBLE and MPI_INT supported goto location 9;
| | | | | libmpi.c 160.17--160.81: "assert false, "Currently only MPI_DOUBLE and MPI_INT supported";"
| | | end location 8;
| | | begin location 9
| | | | kind : RETURN;
| | | | return _result; goto location 10;
| | | | | libmpi.c 161.2--161.17: "return _result;"
| | | end location 9;
| | | begin location 10
| | | | kind : TERMINAL;
| | | end location 10;
| | end function MPI_Send;
| | begin function MPIX_Send_double
| | | | libmpi.c 164.0--164.83: "int MPIX_Send_double(double* _buf, int _count, int _dest, int _tag, MPI_Comm _comm)"
| | | begin formal parameters
| | | | _buf : pointer(3)<real>;
| | | | | libmpi.c 164.21--164.33: "double* _buf"
| | | | _count : int;
| | | | | libmpi.c 164.35--164.45: "int _count"
| | | | _dest : int;
| | | | | libmpi.c 164.47--164.56: "int _dest"
| | | | _tag : int;
| | | | | libmpi.c 164.58--164.66: "int _tag"
| | | | _comm : int;
| | | | | libmpi.c 164.68--164.82: "MPI_Comm _comm"
| | | end formal parameters;
| | | begin proper local variables
| | | | _tmp : real[_count];
| | | | | libmpi.c 165.2--165.22: "double _tmp[_count];"
| | | | _i : int;
| | | | | libmpi.c 166.2--166.9: "int _i;"
| | | end proper local variables;
| | | start location : 0;
| | | begin location 0
| | | | kind : ASSIGNMENT;
| | | | _i = 0; goto location 1;
| | | | | libmpi.c 168.7--168.11: "_i=0"
| | | end location 0;
| | | begin location 1
| | | | kind : CHOICE;
| | | | when _i < _count goto location 2;
| | | | | libmpi.c 168.2--168.29: "for (_i=0; _i<_count; _i++)"
| | | | when !_i < _count goto location 4;
| | | | | libmpi.c 168.2--168.29: "for (_i=0; _i<_count; _i++)"
| | | end location 1;
| | | begin location 2
| | | | kind : ASSIGNMENT;
| | | | _tmp[_i] = *(_buf+_i); goto location 3;
| | | | | libmpi.c 168.30--168.50: "_tmp[_i] = _buf[_i];"
| | | end location 2;
| | | begin location 3
| | | | kind : ASSIGNMENT;
| | | | _i = _i+1; goto location 1;
| | | | | libmpi.c 168.24--168.28: "_i++"
| | | end location 3;
| | | begin location 4
| | | | kind : SEND;
| | | | send(_tmp,_dest,_tag); goto location 5;
| | | | | libmpi.c 169.2--169.26: "send(_tmp, _dest, _tag);"
| | | end location 4;
| | | begin location 5
| | | | kind : RETURN;
| | | | return 0; goto location 6;
| | | | | libmpi.c 170.2--170.11: "return 0;"
| | | end location 5;
| | | begin location 6
| | | | kind : TERMINAL;
| | | end location 6;
| | end function MPIX_Send_double;
| | begin function MPIX_Send_int
| | | | libmpi.c 173.0--173.77: "int MPIX_Send_int(int* _buf, int _count, int _dest, int _tag, MPI_Comm _comm)"
| | | begin formal parameters
| | | | _buf : pointer(5)<int>;
| | | | | libmpi.c 173.18--173.27: "int* _buf"
| | | | _count : int;
| | | | | libmpi.c 173.29--173.39: "int _count"
| | | | _dest : int;
| | | | | libmpi.c 173.41--173.50: "int _dest"
| | | | _tag : int;
| | | | | libmpi.c 173.52--173.60: "int _tag"
| | | | _comm : int;
| | | | | libmpi.c 173.62--173.76: "MPI_Comm _comm"
| | | end formal parameters;
| | | begin proper local variables
| | | | _tmp : int[_count];
| | | | | libmpi.c 174.2--174.19: "int _tmp[_count];"
| | | | _i : int;
| | | | | libmpi.c 175.2--175.9: "int _i;"
| | | end proper local variables;
| | | start location : 0;
| | | begin location 0
| | | | kind : ASSIGNMENT;
| | | | _i = 0; goto location 1;
| | | | | libmpi.c 177.7--177.11: "_i=0"
| | | end location 0;
| | | begin location 1
| | | | kind : CHOICE;
| | | | when _i < _count goto location 2;
| | | | | libmpi.c 177.2--177.29: "for (_i=0; _i<_count; _i++)"
| | | | when !_i < _count goto location 4;
| | | | | libmpi.c 177.2--177.29: "for (_i=0; _i<_count; _i++)"
| | | end location 1;
| | | begin location 2
| | | | kind : ASSIGNMENT;
| | | | _tmp[_i] = *(_buf+_i); goto location 3;
| | | | | libmpi.c 177.30--177.50: "_tmp[_i] = _buf[_i];"
| | | end location 2;
| | | begin location 3
| | | | kind : ASSIGNMENT;
| | | | _i = _i+1; goto location 1;
| | | | | libmpi.c 177.24--177.28: "_i++"
| | | end location 3;
| | | begin location 4
| | | | kind : SEND;
| | | | send(_tmp,_dest,_tag); goto location 5;
| | | | | libmpi.c 178.2--178.26: "send(_tmp, _dest, _tag);"
| | | end location 4;
| | | begin location 5
| | | | kind : RETURN;
| | | | return 0; goto location 6;
| | | | | libmpi.c 179.2--179.11: "return 0;"
| | | end location 5;
| | | begin location 6
| | | | kind : TERMINAL;
| | | end location 6;
| | end function MPIX_Send_int;
| | begin function MPI_Recv
| | | | libmpi.c 183.0--184.49: "int MPI_Recv(void* _buf, int _count, MPI_Datatype _datatype, int _source, int _tag,             MPI_Comm _comm, MPI_Status *_status)"
| | | begin formal parameters
| | | | _buf : pointer(4)<void>;
| | | | | libmpi.c 183.13--183.23: "void* _buf"
| | | | _count : int;
| | | | | libmpi.c 183.25--183.35: "int _count"
| | | | _datatype : int;
| | | | | libmpi.c 183.37--183.59: "MPI_Datatype _datatype"
| | | | _source : int;
| | | | | libmpi.c 183.61--183.72: "int _source"
| | | | _tag : int;
| | | | | libmpi.c 183.74--183.82: "int _tag"
| | | | _comm : int;
| | | | | libmpi.c 184.13--184.27: "MPI_Comm _comm"
| | | | _status : pointer(2)<Record[MPI_Status; MPI_SOURCE:int, MPI_TAG:int, SIZE:int]>;
| | | | | libmpi.c 184.29--184.48: "MPI_Status *_status"
| | | end formal parameters;
| | | begin proper local variables
| | | | _result : int;
| | | | | libmpi.c 185.2--185.14: "int _result;"
| | | end proper local variables;
| | | start location : 0;
| | | begin location 0
| | | | kind : ASSERTION;
| | | | assert MPIX_State==MPIX_INITIALIZED; Attempt to call MPI_Recv when MPI is not initialized goto location 1;
| | | | | libmpi.c 187.15--187.109: "assert MPIX_State == MPIX_INITIALIZED, "Attempt to call MPI_Recv when MPI is not initialized";"
| | | end location 0;
| | | begin location 1
| | | | kind : CHOICE;
| | | | when _source==MPI_PROC_NULL goto location 2;
| | | | | libmpi.c 188.3--188.32: "if (_source == MPI_PROC_NULL)"
| | | | when !(_source==MPI_PROC_NULL) goto location 3;
| | | | | libmpi.c 188.3--188.32: "if (_source == MPI_PROC_NULL)"
| | | end location 1;
| | | begin location 2
| | | | kind : RETURN;
| | | | return 0; goto location 3;
| | | | | libmpi.c 189.4--189.13: "return 0;"
| | | end location 2;
| | | begin location 3
| | | | kind : ASSERTION;
| | | | assert _comm==MPI_COMM_WORLD;  goto location 4;
| | | | | libmpi.c 190.15--190.46: "assert _comm == MPI_COMM_WORLD;"
| | | end location 3;
| | | begin location 4
| | | | kind : CHOICE;
| | | | when _datatype==MPI_DOUBLE goto location 5;
| | | | | libmpi.c 191.2--191.30: "if (_datatype == MPI_DOUBLE)"
| | | | when !(_datatype==MPI_DOUBLE) goto location 6;
| | | | | libmpi.c 191.2--191.30: "if (_datatype == MPI_DOUBLE)"
| | | end location 4;
| | | begin location 5
| | | | kind : INVOCATION;
| | | | _result = MPIX_Recv_double((pointer(3)<real>)_buf,_count,_source,_tag,_comm,_status); goto location 9;
| | | | | libmpi.c 192.4--192.85: "_result = MPIX_Recv_double((double*)_buf, _count, _source, _tag, _comm, _status);"
| | | end location 5;
| | | begin location 6
| | | | kind : CHOICE;
| | | | when _datatype==MPI_INT goto location 7;
| | | | | libmpi.c 193.7--193.32: "if (_datatype == MPI_INT)"
| | | | when !(_datatype==MPI_INT) goto location 8;
| | | | | libmpi.c 193.7--193.32: "if (_datatype == MPI_INT)"
| | | end location 6;
| | | begin location 7
| | | | kind : INVOCATION;
| | | | _result = MPIX_Recv_int((pointer(5)<int>)_buf,_count,_source,_tag,_comm,_status); goto location 9;
| | | | | libmpi.c 194.4--194.79: "_result = MPIX_Recv_int((int*)_buf, _count, _source, _tag, _comm, _status);"
| | | end location 7;
| | | begin location 8
| | | | kind : ASSERTION;
| | | | assert false;  goto location 9;
| | | | | libmpi.c 196.17--196.30: "assert false;"
| | | end location 8;
| | | begin location 9
| | | | kind : RETURN;
| | | | return _result; goto location 10;
| | | | | libmpi.c 197.2--197.17: "return _result;"
| | | end location 9;
| | | begin location 10
| | | | kind : TERMINAL;
| | | end location 10;
| | end function MPI_Recv;
| | begin function MPIX_Recv_double
| | | | libmpi.c 200.0--201.41: "int MPIX_Recv_double(double *_buf, int _count, int _source, int _tag, MPI_Comm _comm,                     MPI_Status *_status)"
| | | begin formal parameters
| | | | _buf : pointer(3)<real>;
| | | | | libmpi.c 200.21--200.33: "double *_buf"
| | | | _count : int;
| | | | | libmpi.c 200.35--200.45: "int _count"
| | | | _source : int;
| | | | | libmpi.c 200.47--200.58: "int _source"
| | | | _tag : int;
| | | | | libmpi.c 200.60--200.68: "int _tag"
| | | | _comm : int;
| | | | | libmpi.c 200.70--200.84: "MPI_Comm _comm"
| | | | _status : pointer(2)<Record[MPI_Status; MPI_SOURCE:int, MPI_TAG:int, SIZE:int]>;
| | | | | libmpi.c 201.21--201.40: "MPI_Status *_status"
| | | end formal parameters;
| | | begin proper local variables
| | | | _tmp : real[_count];
| | | | | libmpi.c 202.2--202.22: "double _tmp[_count];"
| | | | _i : int;
| | | | | libmpi.c 203.2--203.9: "int _i;"
| | | | thesource : int;
| | | | | libmpi.c 204.2--204.16: "int thesource;"
| | | | thetag : int;
| | | | | libmpi.c 205.2--205.13: "int thetag;"
| | | | thesize : int;
| | | | | libmpi.c 206.2--206.14: "int thesize;"
| | | | thecount : int;
| | | | | libmpi.c 207.2--207.15: "int thecount;"
| | | end proper local variables;
| | | start location : 0;
| | | begin location 0
| | | | kind : CHOICE;
| | | | when !(_source==MPI_ANY_SOURCE) && !(_tag==MPI_ANY_TAG) goto location 1;
| | | | | libmpi.c 209.2--209.55: "if (_source != MPI_ANY_SOURCE && _tag != MPI_ANY_TAG)"
| | | | when !(!(_source==MPI_ANY_SOURCE) && !(_tag==MPI_ANY_TAG)) goto location 4;
| | | | | libmpi.c 209.2--209.55: "if (_source != MPI_ANY_SOURCE && _tag != MPI_ANY_TAG)"
| | | end location 0;
| | | begin location 1
| | | | kind : RECEIVE;
| | | | recv(_tmp,_source,_tag, thesize); goto location 2;
| | | | | libmpi.c 210.4--210.39: "recv(_tmp, _source, _tag, thesize);"
| | | end location 1;
| | | begin location 2
| | | | kind : ASSIGNMENT;
| | | | thesource = _source; goto location 3;
| | | | | libmpi.c 211.4--211.24: "thesource = _source;"
| | | end location 2;
| | | begin location 3
| | | | kind : ASSIGNMENT;
| | | | thetag = _tag; goto location 21;
| | | | | libmpi.c 212.4--212.18: "thetag = _tag;"
| | | end location 3;
| | | begin location 4
| | | | kind : CHOICE;
| | | | when !(_source==MPI_ANY_SOURCE) && (_tag==MPI_ANY_TAG) goto location 5;
| | | | | libmpi.c 213.9--213.62: "if (_source != MPI_ANY_SOURCE && _tag == MPI_ANY_TAG)"
| | | | when !(!(_source==MPI_ANY_SOURCE) && (_tag==MPI_ANY_TAG)) goto location 7;
| | | | | libmpi.c 213.9--213.62: "if (_source != MPI_ANY_SOURCE && _tag == MPI_ANY_TAG)"
| | | end location 4;
| | | begin location 5
| | | | kind : RECEIVE;
| | | | recv(_tmp,_source,any(thetag), thesize); goto location 6;
| | | | | libmpi.c 214.4--214.46: "recv(_tmp, _source, any(thetag), thesize);"
| | | end location 5;
| | | begin location 6
| | | | kind : ASSIGNMENT;
| | | | thesource = _source; goto location 21;
| | | | | libmpi.c 215.4--215.24: "thesource = _source;"
| | | end location 6;
| | | begin location 7
| | | | kind : CHOICE;
| | | | when (_source==MPI_ANY_SOURCE) && !(_tag==MPI_ANY_TAG) goto location 8;
| | | | | libmpi.c 216.9--216.62: "if (_source == MPI_ANY_SOURCE && _tag != MPI_ANY_TAG)"
| | | | when !((_source==MPI_ANY_SOURCE) && !(_tag==MPI_ANY_TAG)) goto location 15;
| | | | | libmpi.c 216.9--216.62: "if (_source == MPI_ANY_SOURCE && _tag != MPI_ANY_TAG)"
| | | end location 7;
| | | begin location 8
| | | | kind : RECEIVE;
| | | | recv(_tmp,0,_tag, thesize); goto location 9;
| | | | | libmpi.c 217.4--217.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | | recv(_tmp,1,_tag, thesize); goto location 10;
| | | | | libmpi.c 217.4--217.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | | recv(_tmp,2,_tag, thesize); goto location 11;
| | | | | libmpi.c 217.4--217.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | | recv(_tmp,3,_tag, thesize); goto location 12;
| | | | | libmpi.c 217.4--217.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | | recv(_tmp,4,_tag, thesize); goto location 13;
| | | | | libmpi.c 217.4--217.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | end location 8;
| | | begin location 9
| | | | kind : ASSIGNMENT;
| | | | thesource = 0; goto location 14;
| | | | | libmpi.c 217.4--217.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | end location 9;
| | | begin location 10
| | | | kind : ASSIGNMENT;
| | | | thesource = 1; goto location 14;
| | | | | libmpi.c 217.4--217.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | end location 10;
| | | begin location 11
| | | | kind : ASSIGNMENT;
| | | | thesource = 2; goto location 14;
| | | | | libmpi.c 217.4--217.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | end location 11;
| | | begin location 12
| | | | kind : ASSIGNMENT;
| | | | thesource = 3; goto location 14;
| | | | | libmpi.c 217.4--217.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | end location 12;
| | | begin location 13
| | | | kind : ASSIGNMENT;
| | | | thesource = 4; goto location 14;
| | | | | libmpi.c 217.4--217.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | end location 13;
| | | begin location 14
| | | | kind : ASSIGNMENT;
| | | | thetag = _tag; goto location 21;
| | | | | libmpi.c 218.4--218.18: "thetag = _tag;"
| | | end location 14;
| | | begin location 15
| | | | kind : RECEIVE;
| | | | recv(_tmp,0,any(thetag), thesize); goto location 16;
| | | | | libmpi.c 220.4--220.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | | recv(_tmp,1,any(thetag), thesize); goto location 17;
| | | | | libmpi.c 220.4--220.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | | recv(_tmp,2,any(thetag), thesize); goto location 18;
| | | | | libmpi.c 220.4--220.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | | recv(_tmp,3,any(thetag), thesize); goto location 19;
| | | | | libmpi.c 220.4--220.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | | recv(_tmp,4,any(thetag), thesize); goto location 20;
| | | | | libmpi.c 220.4--220.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | end location 15;
| | | begin location 16
| | | | kind : ASSIGNMENT;
| | | | thesource = 0; goto location 21;
| | | | | libmpi.c 220.4--220.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | end location 16;
| | | begin location 17
| | | | kind : ASSIGNMENT;
| | | | thesource = 1; goto location 21;
| | | | | libmpi.c 220.4--220.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | end location 17;
| | | begin location 18
| | | | kind : ASSIGNMENT;
| | | | thesource = 2; goto location 21;
| | | | | libmpi.c 220.4--220.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | end location 18;
| | | begin location 19
| | | | kind : ASSIGNMENT;
| | | | thesource = 3; goto location 21;
| | | | | libmpi.c 220.4--220.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | end location 19;
| | | begin location 20
| | | | kind : ASSIGNMENT;
| | | | thesource = 4; goto location 21;
| | | | | libmpi.c 220.4--220.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | end location 20;
| | | begin location 21
| | | | kind : CHOICE;
| | | | when !(_status==MPI_STATUS_IGNORE) goto location 22;
| | | | | libmpi.c 222.2--222.35: "if (_status != MPI_STATUS_IGNORE)"
| | | | when !!(_status==MPI_STATUS_IGNORE) goto location 25;
| | | | | libmpi.c 222.2--222.35: "if (_status != MPI_STATUS_IGNORE)"
| | | end location 21;
| | | begin location 22
| | | | kind : ASSIGNMENT;
| | | | *_status.MPI_SOURCE = thesource; goto location 23;
| | | | | libmpi.c 223.4--223.36: "_status->MPI_SOURCE = thesource;"
| | | end location 22;
| | | begin location 23
| | | | kind : ASSIGNMENT;
| | | | *_status.MPI_TAG = thetag; goto location 24;
| | | | | libmpi.c 224.4--224.30: "_status->MPI_TAG = thetag;"
| | | end location 23;
| | | begin location 24
| | | | kind : ASSIGNMENT;
| | | | *_status.SIZE = thesize; goto location 25;
| | | | | libmpi.c 225.4--225.28: "_status->SIZE = thesize;"
| | | end location 24;
| | | begin location 25
| | | | kind : ASSIGNMENT;
| | | | thecount = thesize/sizeof(real); goto location 26;
| | | | | libmpi.c 227.2--227.36: "thecount = thesize/sizeof(double);"
| | | end location 25;
| | | begin location 26
| | | | kind : ASSIGNMENT;
| | | | _i = 0; goto location 27;
| | | | | libmpi.c 228.7--228.11: "_i=0"
| | | end location 26;
| | | begin location 27
| | | | kind : CHOICE;
| | | | when _i < thecount goto location 28;
| | | | | libmpi.c 228.2--228.31: "for (_i=0; _i<thecount; _i++)"
| | | | when !_i < thecount goto location 30;
| | | | | libmpi.c 228.2--228.31: "for (_i=0; _i<thecount; _i++)"
| | | end location 27;
| | | begin location 28
| | | | kind : ASSIGNMENT;
| | | | *(_buf+_i) = _tmp[_i]; goto location 29;
| | | | | libmpi.c 228.32--228.52: "_buf[_i] = _tmp[_i];"
| | | end location 28;
| | | begin location 29
| | | | kind : ASSIGNMENT;
| | | | _i = _i+1; goto location 27;
| | | | | libmpi.c 228.26--228.30: "_i++"
| | | end location 29;
| | | begin location 30
| | | | kind : RETURN;
| | | | return 0; goto location 31;
| | | | | libmpi.c 229.2--229.11: "return 0;"
| | | end location 30;
| | | begin location 31
| | | | kind : TERMINAL;
| | | end location 31;
| | end function MPIX_Recv_double;
| | begin function MPIX_Recv_int
| | | | libmpi.c 232.0--233.41: "int MPIX_Recv_int(int *_buf, int _count, int _source, int _tag, MPI_Comm _comm,                     MPI_Status *_status)"
| | | begin formal parameters
| | | | _buf : pointer(5)<int>;
| | | | | libmpi.c 232.18--232.27: "int *_buf"
| | | | _count : int;
| | | | | libmpi.c 232.29--232.39: "int _count"
| | | | _source : int;
| | | | | libmpi.c 232.41--232.52: "int _source"
| | | | _tag : int;
| | | | | libmpi.c 232.54--232.62: "int _tag"
| | | | _comm : int;
| | | | | libmpi.c 232.64--232.78: "MPI_Comm _comm"
| | | | _status : pointer(2)<Record[MPI_Status; MPI_SOURCE:int, MPI_TAG:int, SIZE:int]>;
| | | | | libmpi.c 233.21--233.40: "MPI_Status *_status"
| | | end formal parameters;
| | | begin proper local variables
| | | | _tmp : int[_count];
| | | | | libmpi.c 234.2--234.19: "int _tmp[_count];"
| | | | _i : int;
| | | | | libmpi.c 235.2--235.9: "int _i;"
| | | | thesource : int;
| | | | | libmpi.c 236.2--236.16: "int thesource;"
| | | | thetag : int;
| | | | | libmpi.c 237.2--237.13: "int thetag;"
| | | | thesize : int;
| | | | | libmpi.c 238.2--238.14: "int thesize;"
| | | | thecount : int;
| | | | | libmpi.c 239.2--239.15: "int thecount;"
| | | end proper local variables;
| | | start location : 0;
| | | begin location 0
| | | | kind : CHOICE;
| | | | when !(_source==MPI_ANY_SOURCE) && !(_tag==MPI_ANY_TAG) goto location 1;
| | | | | libmpi.c 241.2--241.55: "if (_source != MPI_ANY_SOURCE && _tag != MPI_ANY_TAG)"
| | | | when !(!(_source==MPI_ANY_SOURCE) && !(_tag==MPI_ANY_TAG)) goto location 4;
| | | | | libmpi.c 241.2--241.55: "if (_source != MPI_ANY_SOURCE && _tag != MPI_ANY_TAG)"
| | | end location 0;
| | | begin location 1
| | | | kind : RECEIVE;
| | | | recv(_tmp,_source,_tag, thesize); goto location 2;
| | | | | libmpi.c 242.4--242.39: "recv(_tmp, _source, _tag, thesize);"
| | | end location 1;
| | | begin location 2
| | | | kind : ASSIGNMENT;
| | | | thesource = _source; goto location 3;
| | | | | libmpi.c 243.4--243.24: "thesource = _source;"
| | | end location 2;
| | | begin location 3
| | | | kind : ASSIGNMENT;
| | | | thetag = _tag; goto location 21;
| | | | | libmpi.c 244.4--244.18: "thetag = _tag;"
| | | end location 3;
| | | begin location 4
| | | | kind : CHOICE;
| | | | when !(_source==MPI_ANY_SOURCE) && (_tag==MPI_ANY_TAG) goto location 5;
| | | | | libmpi.c 245.9--245.62: "if (_source != MPI_ANY_SOURCE && _tag == MPI_ANY_TAG)"
| | | | when !(!(_source==MPI_ANY_SOURCE) && (_tag==MPI_ANY_TAG)) goto location 7;
| | | | | libmpi.c 245.9--245.62: "if (_source != MPI_ANY_SOURCE && _tag == MPI_ANY_TAG)"
| | | end location 4;
| | | begin location 5
| | | | kind : RECEIVE;
| | | | recv(_tmp,_source,any(thetag), thesize); goto location 6;
| | | | | libmpi.c 246.4--246.46: "recv(_tmp, _source, any(thetag), thesize);"
| | | end location 5;
| | | begin location 6
| | | | kind : ASSIGNMENT;
| | | | thesource = _source; goto location 21;
| | | | | libmpi.c 247.4--247.24: "thesource = _source;"
| | | end location 6;
| | | begin location 7
| | | | kind : CHOICE;
| | | | when (_source==MPI_ANY_SOURCE) && !(_tag==MPI_ANY_TAG) goto location 8;
| | | | | libmpi.c 248.9--248.62: "if (_source == MPI_ANY_SOURCE && _tag != MPI_ANY_TAG)"
| | | | when !((_source==MPI_ANY_SOURCE) && !(_tag==MPI_ANY_TAG)) goto location 15;
| | | | | libmpi.c 248.9--248.62: "if (_source == MPI_ANY_SOURCE && _tag != MPI_ANY_TAG)"
| | | end location 7;
| | | begin location 8
| | | | kind : RECEIVE;
| | | | recv(_tmp,0,_tag, thesize); goto location 9;
| | | | | libmpi.c 249.4--249.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | | recv(_tmp,1,_tag, thesize); goto location 10;
| | | | | libmpi.c 249.4--249.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | | recv(_tmp,2,_tag, thesize); goto location 11;
| | | | | libmpi.c 249.4--249.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | | recv(_tmp,3,_tag, thesize); goto location 12;
| | | | | libmpi.c 249.4--249.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | | recv(_tmp,4,_tag, thesize); goto location 13;
| | | | | libmpi.c 249.4--249.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | end location 8;
| | | begin location 9
| | | | kind : ASSIGNMENT;
| | | | thesource = 0; goto location 14;
| | | | | libmpi.c 249.4--249.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | end location 9;
| | | begin location 10
| | | | kind : ASSIGNMENT;
| | | | thesource = 1; goto location 14;
| | | | | libmpi.c 249.4--249.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | end location 10;
| | | begin location 11
| | | | kind : ASSIGNMENT;
| | | | thesource = 2; goto location 14;
| | | | | libmpi.c 249.4--249.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | end location 11;
| | | begin location 12
| | | | kind : ASSIGNMENT;
| | | | thesource = 3; goto location 14;
| | | | | libmpi.c 249.4--249.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | end location 12;
| | | begin location 13
| | | | kind : ASSIGNMENT;
| | | | thesource = 4; goto location 14;
| | | | | libmpi.c 249.4--249.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | end location 13;
| | | begin location 14
| | | | kind : ASSIGNMENT;
| | | | thetag = _tag; goto location 21;
| | | | | libmpi.c 250.4--250.18: "thetag = _tag;"
| | | end location 14;
| | | begin location 15
| | | | kind : RECEIVE;
| | | | recv(_tmp,0,any(thetag), thesize); goto location 16;
| | | | | libmpi.c 252.4--252.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | | recv(_tmp,1,any(thetag), thesize); goto location 17;
| | | | | libmpi.c 252.4--252.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | | recv(_tmp,2,any(thetag), thesize); goto location 18;
| | | | | libmpi.c 252.4--252.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | | recv(_tmp,3,any(thetag), thesize); goto location 19;
| | | | | libmpi.c 252.4--252.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | | recv(_tmp,4,any(thetag), thesize); goto location 20;
| | | | | libmpi.c 252.4--252.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | end location 15;
| | | begin location 16
| | | | kind : ASSIGNMENT;
| | | | thesource = 0; goto location 21;
| | | | | libmpi.c 252.4--252.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | end location 16;
| | | begin location 17
| | | | kind : ASSIGNMENT;
| | | | thesource = 1; goto location 21;
| | | | | libmpi.c 252.4--252.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | end location 17;
| | | begin location 18
| | | | kind : ASSIGNMENT;
| | | | thesource = 2; goto location 21;
| | | | | libmpi.c 252.4--252.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | end location 18;
| | | begin location 19
| | | | kind : ASSIGNMENT;
| | | | thesource = 3; goto location 21;
| | | | | libmpi.c 252.4--252.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | end location 19;
| | | begin location 20
| | | | kind : ASSIGNMENT;
| | | | thesource = 4; goto location 21;
| | | | | libmpi.c 252.4--252.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | end location 20;
| | | begin location 21
| | | | kind : CHOICE;
| | | | when !(_status==MPI_STATUS_IGNORE) goto location 22;
| | | | | libmpi.c 254.2--254.35: "if (_status != MPI_STATUS_IGNORE)"
| | | | when !!(_status==MPI_STATUS_IGNORE) goto location 25;
| | | | | libmpi.c 254.2--254.35: "if (_status != MPI_STATUS_IGNORE)"
| | | end location 21;
| | | begin location 22
| | | | kind : ASSIGNMENT;
| | | | *_status.MPI_SOURCE = thesource; goto location 23;
| | | | | libmpi.c 255.4--255.36: "_status->MPI_SOURCE = thesource;"
| | | end location 22;
| | | begin location 23
| | | | kind : ASSIGNMENT;
| | | | *_status.MPI_TAG = thetag; goto location 24;
| | | | | libmpi.c 256.4--256.30: "_status->MPI_TAG = thetag;"
| | | end location 23;
| | | begin location 24
| | | | kind : ASSIGNMENT;
| | | | *_status.SIZE = thesize; goto location 25;
| | | | | libmpi.c 257.4--257.28: "_status->SIZE = thesize;"
| | | end location 24;
| | | begin location 25
| | | | kind : ASSIGNMENT;
| | | | thecount = thesize/sizeof(int); goto location 26;
| | | | | libmpi.c 259.2--259.33: "thecount = thesize/sizeof(int);"
| | | end location 25;
| | | begin location 26
| | | | kind : ASSIGNMENT;
| | | | _i = 0; goto location 27;
| | | | | libmpi.c 260.7--260.11: "_i=0"
| | | end location 26;
| | | begin location 27
| | | | kind : CHOICE;
| | | | when _i < thecount goto location 28;
| | | | | libmpi.c 260.2--260.31: "for (_i=0; _i<thecount; _i++)"
| | | | when !_i < thecount goto location 30;
| | | | | libmpi.c 260.2--260.31: "for (_i=0; _i<thecount; _i++)"
| | | end location 27;
| | | begin location 28
| | | | kind : ASSIGNMENT;
| | | | *(_buf+_i) = _tmp[_i]; goto location 29;
| | | | | libmpi.c 260.32--260.52: "_buf[_i] = _tmp[_i];"
| | | end location 28;
| | | begin location 29
| | | | kind : ASSIGNMENT;
| | | | _i = _i+1; goto location 27;
| | | | | libmpi.c 260.26--260.30: "_i++"
| | | end location 29;
| | | begin location 30
| | | | kind : RETURN;
| | | | return 0; goto location 31;
| | | | | libmpi.c 261.2--261.11: "return 0;"
| | | end location 30;
| | | begin location 31
| | | | kind : TERMINAL;
| | | end location 31;
| | end function MPIX_Recv_int;
| | begin function MPI_Init
| | | | libmpi.c 101.0--101.37: "int MPI_Init(int *argc, char ***argv)"
| | | begin formal parameters
| | | | argc : pointer(5)<int>;
| | | | | libmpi.c 101.13--101.22: "int *argc"
| | | | argv : pointer(8)<pointer(6)<pointer(7)<char>>>;
| | | | | libmpi.c 101.24--101.36: "char ***argv"
| | | end formal parameters;
| | | start location : 0;
| | | begin location 0
| | | | kind : ASSERTION;
| | | | assert MPIX_State==MPIX_UNINITIALIZED; Attempt to call MPI_Init when MPI is already initialized goto location 1;
| | | | | libmpi.c 102.15--102.115: "assert MPIX_State == MPIX_UNINITIALIZED, "Attempt to call MPI_Init when MPI is already initialized";"
| | | end location 0;
| | | begin location 1
| | | | kind : ASSIGNMENT;
| | | | MPIX_State = MPIX_INITIALIZED; goto location 2;
| | | | | libmpi.c 103.2--103.32: "MPIX_State = MPIX_INITIALIZED;"
| | | end location 1;
| | | begin location 2
| | | | kind : RETURN;
| | | | return 0; goto location 3;
| | | | | libmpi.c 104.2--104.11: "return 0;"
| | | end location 2;
| | | begin location 3
| | | | kind : TERMINAL;
| | | end location 3;
| | end function MPI_Init;
| | begin function MPI_Comm_size
| | | | libmpi.c 121.0--121.45: "int MPI_Comm_size(MPI_Comm _comm, int *_size)"
| | | begin formal parameters
| | | | _comm : int;
| | | | | libmpi.c 121.18--121.32: "MPI_Comm _comm"
| | | | _size : pointer(5)<int>;
| | | | | libmpi.c 121.34--121.44: "int *_size"
| | | end formal parameters;
| | | start location : 0;
| | | begin location 0
| | | | kind : ASSERTION;
| | | | assert MPIX_State==MPIX_INITIALIZED; Attempt to call MPI_Comm_size when MPI is not initialized goto location 1;
| | | | | libmpi.c 122.15--122.114: "assert MPIX_State == MPIX_INITIALIZED, "Attempt to call MPI_Comm_size when MPI is not initialized";"
| | | end location 0;
| | | begin location 1
| | | | kind : ASSERTION;
| | | | assert _comm==MPI_COMM_WORLD;  goto location 2;
| | | | | libmpi.c 124.15--124.46: "assert _comm == MPI_COMM_WORLD;"
| | | end location 1;
| | | begin location 2
| | | | kind : ASSIGNMENT;
| | | | *_size = 5; goto location 3;
| | | | | libmpi.c 125.2--125.18: "*_size = NPROCS;"
| | | end location 2;
| | | begin location 3
| | | | kind : RETURN;
| | | | return 0; goto location 4;
| | | | | libmpi.c 126.2--126.11: "return 0;"
| | | end location 3;
| | | begin location 4
| | | | kind : TERMINAL;
| | | end location 4;
| | end function MPI_Comm_size;
| | begin function MPI_Comm_rank
| | | | libmpi.c 113.0--113.45: "int MPI_Comm_rank(MPI_Comm _comm, int *_rank)"
| | | begin formal parameters
| | | | _comm : int;
| | | | | libmpi.c 113.18--113.32: "MPI_Comm _comm"
| | | | _rank : pointer(5)<int>;
| | | | | libmpi.c 113.34--113.44: "int *_rank"
| | | end formal parameters;
| | | start location : 0;
| | | begin location 0
| | | | kind : ASSERTION;
| | | | assert MPIX_State==MPIX_INITIALIZED; Attempt to call MPI_Comm_rank when MPI is not initialized goto location 1;
| | | | | libmpi.c 114.15--114.114: "assert MPIX_State == MPIX_INITIALIZED, "Attempt to call MPI_Comm_rank when MPI is not initialized";"
| | | end location 0;
| | | begin location 1
| | | | kind : ASSERTION;
| | | | assert _comm==MPI_COMM_WORLD;  goto location 2;
| | | | | libmpi.c 116.15--116.46: "assert _comm == MPI_COMM_WORLD;"
| | | end location 1;
| | | begin location 2
| | | | kind : ASSIGNMENT;
| | | | *_rank = 1; goto location 3;
| | | | | libmpi.c 117.2--117.15: "*_rank = PID;"
| | | end location 2;
| | | begin location 3
| | | | kind : RETURN;
| | | | return 0; goto location 4;
| | | | | libmpi.c 118.2--118.11: "return 0;"
| | | end location 3;
| | | begin location 4
| | | | kind : TERMINAL;
| | | end location 4;
| | end function MPI_Comm_rank;
| | begin function MPI_Finalize
| | | | libmpi.c 107.0--107.18: "int MPI_Finalize()"
| | | start location : 0;
| | | begin location 0
| | | | kind : ASSERTION;
| | | | assert MPIX_State==MPIX_INITIALIZED; Attempt to call MPI_Finalize when MPI is not initialized goto location 1;
| | | | | libmpi.c 108.15--108.113: "assert MPIX_State == MPIX_INITIALIZED, "Attempt to call MPI_Finalize when MPI is not initialized";"
| | | end location 0;
| | | begin location 1
| | | | kind : ASSIGNMENT;
| | | | MPIX_State = MPIX_FINALIZED; goto location 2;
| | | | | libmpi.c 109.2--109.30: "MPIX_State = MPIX_FINALIZED;"
| | | end location 1;
| | | begin location 2
| | | | kind : RETURN;
| | | | return 0; goto location 3;
| | | | | libmpi.c 110.2--110.11: "return 0;"
| | | end location 2;
| | | begin location 3
| | | | kind : TERMINAL;
| | | end location 3;
| | end function MPI_Finalize;
| end process 1;
| begin process 2
| | main function : main;
| | begin process variables
| | | MPI_REQUEST_NULL : pointer(1)<Record[MPIX_Comm_Record; id:int]>;
| | | | libmpi.c 85.0--85.55: "MPI_Request MPI_REQUEST_NULL = (MPIX_Comm_Record*)NULL;"
| | | MPI_STATUS_IGNORE : pointer(2)<Record[MPI_Status; MPI_SOURCE:int, MPI_TAG:int, SIZE:int]>;
| | | | libmpi.c 89.0--89.50: "MPI_Status *MPI_STATUS_IGNORE = (MPI_Status*)NULL;"
| | | MPIX_State : int;
| | | | libmpi.c 94.0--94.19: "int MPIX_State = 0;"
| | | nprocs : int;
| | | | diffusion_par_bad.c 22.0--22.11: "int nprocs;"
| | | myrank : int;
| | | | diffusion_par_bad.c 23.0--23.11: "int myrank;"
| | | left : int;
| | | | diffusion_par_bad.c 24.0--24.9: "int left;"
| | | right : int;
| | | | diffusion_par_bad.c 25.0--25.10: "int right;"
| | | nxl : int;
| | | | diffusion_par_bad.c 26.0--26.8: "int nxl;"
| | | first : int;
| | | | diffusion_par_bad.c 27.0--27.10: "int first;"
| | | start : int;
| | | | diffusion_par_bad.c 28.0--28.10: "int start;"
| | | stop : int;
| | | | diffusion_par_bad.c 29.0--29.9: "int stop;"
| | | buf : pointer(3)<real>;
| | | | diffusion_par_bad.c 30.0--30.12: "double* buf;"
| | | v : pointer(3)<real>;
| | | | diffusion_par_bad.c 31.0--31.10: "double* v;"
| | | v_new : pointer(3)<real>;
| | | | diffusion_par_bad.c 32.0--32.14: "double* v_new;"
| | end process variables;
| | begin function owner
| | | | diffusion_par_bad.c 34.0--34.20: "int owner(int index)"
| | | begin formal parameters
| | | | index : int;
| | | | | diffusion_par_bad.c 34.10--34.19: "int index"
| | | end formal parameters;
| | | start location : 0;
| | | begin location 0
| | | | kind : RETURN;
| | | | return ((nprocs*(index+1))-1)/nx; goto location 1;
| | | | | diffusion_par_bad.c 34.23--34.54: "return (nprocs*(index+1)-1)/nx;"
| | | end location 0;
| | | begin location 1
| | | | kind : TERMINAL;
| | | end location 1;
| | end function owner;
| | begin function firstForProc
| | | | diffusion_par_bad.c 36.0--36.26: "int firstForProc(int rank)"
| | | begin formal parameters
| | | | rank : int;
| | | | | diffusion_par_bad.c 36.17--36.25: "int rank"
| | | end formal parameters;
| | | start location : 0;
| | | begin location 0
| | | | kind : RETURN;
| | | | return (rank*nx)/nprocs; goto location 1;
| | | | | diffusion_par_bad.c 36.29--36.53: "return (rank*nx)/nprocs;"
| | | end location 0;
| | | begin location 1
| | | | kind : TERMINAL;
| | | end location 1;
| | end function firstForProc;
| | begin function countForProc
| | | | diffusion_par_bad.c 38.0--38.26: "int countForProc(int rank)"
| | | begin formal parameters
| | | | rank : int;
| | | | | diffusion_par_bad.c 38.17--38.25: "int rank"
| | | end formal parameters;
| | | begin proper local variables
| | | | a : int;
| | | | | diffusion_par_bad.c 39.1--39.7: "int a;"
| | | | b : int;
| | | | | diffusion_par_bad.c 40.1--40.7: "int b;"
| | | end proper local variables;
| | | start location : 0;
| | | begin location 0
| | | | kind : INVOCATION;
| | | | a = firstForProc(rank+1); goto location 1;
| | | | | diffusion_par_bad.c 42.1--42.26: "a = firstForProc(rank+1);"
| | | end location 0;
| | | begin location 1
| | | | kind : INVOCATION;
| | | | b = firstForProc(rank); goto location 2;
| | | | | diffusion_par_bad.c 43.1--43.24: "b = firstForProc(rank);"
| | | end location 1;
| | | begin location 2
| | | | kind : RETURN;
| | | | return a-b; goto location 3;
| | | | | diffusion_par_bad.c 44.1--44.12: "return a-b;"
| | | end location 2;
| | | begin location 3
| | | | kind : TERMINAL;
| | | end location 3;
| | end function countForProc;
| | begin function init
| | | | diffusion_par_bad.c 48.0--48.11: "void init()"
| | | begin proper local variables
| | | | i : int;
| | | | | diffusion_par_bad.c 49.1--49.7: "int i;"
| | | | owner : int;
| | | | | diffusion_par_bad.c 50.1--50.11: "int owner;"
| | | | bufSize : int;
| | | | | diffusion_par_bad.c 51.1--51.13: "int bufSize;"
| | | end proper local variables;
| | | start location : 0;
| | | begin location 0
| | | | kind : ASSIGNMENT;
| | | | i = 0; goto location 1;
| | | | | diffusion_par_bad.c 53.6--53.9: "i=0"
| | | end location 0;
| | | begin location 1
| | | | kind : CHOICE;
| | | | when i < nx goto location 2;
| | | | | diffusion_par_bad.c 53.1--53.21: "for (i=0; i<nx; i++)"
| | | | when !i < nx goto location 3;
| | | | | diffusion_par_bad.c 53.1--53.21: "for (i=0; i<nx; i++)"
| | | end location 1;
| | | begin location 2
| | | | kind : ASSIGNMENT;
| | | | i = i+1; goto location 1;
| | | | | diffusion_par_bad.c 53.17--53.20: "i++"
| | | end location 2;
| | | begin location 3
| | | | kind : ASSIGNMENT;
| | | | left = myrank-1; goto location 4;
| | | | | diffusion_par_bad.c 54.1--54.17: "left = myrank-1;"
| | | end location 3;
| | | begin location 4
| | | | kind : ASSIGNMENT;
| | | | right = myrank+1; goto location 5;
| | | | | diffusion_par_bad.c 55.1--55.18: "right = myrank+1;"
| | | end location 4;
| | | begin location 5
| | | | kind : INVOCATION;
| | | | first = firstForProc(myrank); goto location 6;
| | | | | diffusion_par_bad.c 56.1--56.30: "first = firstForProc(myrank);"
| | | end location 5;
| | | begin location 6
| | | | kind : INVOCATION;
| | | | nxl = countForProc(myrank); goto location 7;
| | | | | diffusion_par_bad.c 57.1--57.28: "nxl = countForProc(myrank);"
| | | end location 6;
| | | begin location 7
| | | | kind : ASSIGNMENT;
| | | | bufSize = nx/nprocs; goto location 8;
| | | | | diffusion_par_bad.c 58.1--58.21: "bufSize = nx/nprocs;"
| | | end location 7;
| | | begin location 8
| | | | kind : ASSIGNMENT;
| | | | bufSize = bufSize+1; goto location 9;
| | | | | diffusion_par_bad.c 59.27--59.37: "bufSize++;"
| | | end location 8;
| | | begin location 9
| | | | kind : ALLOCATE;
| | | | buf = (real*) malloc(bufSize*sizeof(real)); goto location 10;
| | | | | diffusion_par_bad.c 60.1--60.51: "buf = (double *) malloc(bufSize * sizeof(double));"
| | | end location 9;
| | | begin location 10
| | | | kind : ALLOCATE;
| | | | v = (real*) malloc((nxl+2)*sizeof(real)); goto location 11;
| | | | | diffusion_par_bad.c 61.1--61.51: "v = (double *) malloc((nxl + 2) * sizeof(double));"
| | | end location 10;
| | | begin location 11
| | | | kind : ALLOCATE;
| | | | v_new = (real*) malloc((nxl+2)*sizeof(real)); goto location 12;
| | | | | diffusion_par_bad.c 62.1--62.55: "v_new = (double *) malloc((nxl + 2) * sizeof(double));"
| | | end location 11;
| | | begin location 12
| | | | kind : ASSIGNMENT;
| | | | i = 1; goto location 13;
| | | | | diffusion_par_bad.c 63.6--63.9: "i=1"
| | | end location 12;
| | | begin location 13
| | | | kind : CHOICE;
| | | | when i <= nxl goto location 14;
| | | | | diffusion_par_bad.c 63.1--63.23: "for (i=1; i<=nxl; i++)"
| | | | when !i <= nxl goto location 16;
| | | | | diffusion_par_bad.c 63.1--63.23: "for (i=1; i<=nxl; i++)"
| | | end location 13;
| | | begin location 14
| | | | kind : ASSIGNMENT;
| | | | *(v+i) = u0[(first+i)-1]; goto location 15;
| | | | | diffusion_par_bad.c 63.24--63.45: "v[i] = u0[first+i-1];"
| | | end location 14;
| | | begin location 15
| | | | kind : ASSIGNMENT;
| | | | i = i+1; goto location 13;
| | | | | diffusion_par_bad.c 63.19--63.22: "i++"
| | | end location 15;
| | | begin location 16
| | | | kind : INVOCATION;
| | | | owner = owner(0); goto location 17;
| | | | | diffusion_par_bad.c 64.1--64.18: "owner = owner(0);"
| | | end location 16;
| | | begin location 17
| | | | kind : CHOICE;
| | | | when myrank==owner goto location 18;
| | | | | diffusion_par_bad.c 65.1--65.21: "if (myrank == owner)"
| | | | when !(myrank==owner) goto location 19;
| | | | | diffusion_par_bad.c 65.1--65.21: "if (myrank == owner)"
| | | end location 17;
| | | begin location 18
| | | | kind : ASSIGNMENT;
| | | | start = 2; goto location 20;
| | | | | diffusion_par_bad.c 65.22--65.30: "start=2;"
| | | end location 18;
| | | begin location 19
| | | | kind : ASSIGNMENT;
| | | | start = 1; goto location 20;
| | | | | diffusion_par_bad.c 65.36--65.44: "start=1;"
| | | end location 19;
| | | begin location 20
| | | | kind : INVOCATION;
| | | | owner = owner(nx-1); goto location 21;
| | | | | diffusion_par_bad.c 66.1--66.21: "owner = owner(nx-1);"
| | | end location 20;
| | | begin location 21
| | | | kind : CHOICE;
| | | | when myrank==owner goto location 22;
| | | | | diffusion_par_bad.c 67.1--67.21: "if (myrank == owner)"
| | | | when !(myrank==owner) goto location 23;
| | | | | diffusion_par_bad.c 67.1--67.21: "if (myrank == owner)"
| | | end location 21;
| | | begin location 22
| | | | kind : ASSIGNMENT;
| | | | stop = nxl-1; goto location 24;
| | | | | diffusion_par_bad.c 67.22--67.33: "stop=nxl-1;"
| | | end location 22;
| | | begin location 23
| | | | kind : ASSIGNMENT;
| | | | stop = nxl; goto location 24;
| | | | | diffusion_par_bad.c 67.39--67.48: "stop=nxl;"
| | | end location 23;
| | | begin location 24
| | | | kind : RETURN;
| | | | return null; goto location 25;
| | | | | diffusion_par_bad.c 68.0--68.0: "}"
| | | end location 24;
| | | begin location 25
| | | | kind : TERMINAL;
| | | end location 25;
| | end function init;
| | begin function cleanup
| | | | diffusion_par_bad.c 70.0--70.14: "void cleanup()"
| | | start location : 0;
| | | begin location 0
| | | | kind : INVOCATION;
| | | | free(buf); goto location 1;
| | | | | diffusion_par_bad.c 71.1--71.11: "free(buf);"
| | | end location 0;
| | | begin location 1
| | | | kind : INVOCATION;
| | | | free(v); goto location 2;
| | | | | diffusion_par_bad.c 72.1--72.9: "free(v);"
| | | end location 1;
| | | begin location 2
| | | | kind : INVOCATION;
| | | | free(v_new); goto location 3;
| | | | | diffusion_par_bad.c 73.1--73.13: "free(v_new);"
| | | end location 2;
| | | begin location 3
| | | | kind : RETURN;
| | | | return null; goto location 4;
| | | | | diffusion_par_bad.c 74.0--74.0: "}"
| | | end location 3;
| | | begin location 4
| | | | kind : TERMINAL;
| | | end location 4;
| | end function cleanup;
| | begin function write
| | | | diffusion_par_bad.c 76.0--76.20: "void write(int time)"
| | | begin formal parameters
| | | | time : int;
| | | | | diffusion_par_bad.c 76.11--76.19: "int time"
| | | end formal parameters;
| | | begin proper local variables
| | | | source : int;
| | | | | diffusion_par_bad.c 77.1--77.12: "int source;"
| | | | i : int;
| | | | | diffusion_par_bad.c 78.1--78.7: "int i;"
| | | | j : int;
| | | | | diffusion_par_bad.c 79.1--79.7: "int j;"
| | | | count : int;
| | | | | diffusion_par_bad.c 80.1--80.11: "int count;"
| | | end proper local variables;
| | | start location : 0;
| | | begin location 0
| | | | kind : CHOICE;
| | | | when !(myrank==0) goto location 1;
| | | | | diffusion_par_bad.c 82.1--82.17: "if (myrank != 0)"
| | | | when !!(myrank==0) goto location 2;
| | | | | diffusion_par_bad.c 82.1--82.17: "if (myrank != 0)"
| | | end location 0;
| | | begin location 1
| | | | kind : INVOCATION;
| | | | MPI_Send(v+1,nxl,MPI_DOUBLE,0,0,MPI_COMM_WORLD); goto location 18;
| | | | | diffusion_par_bad.c 83.2--83.55: "MPI_Send(v+1, nxl, MPI_DOUBLE, 0, 0, MPI_COMM_WORLD);"
| | | end location 1;
| | | begin location 2
| | | | kind : ASSIGNMENT;
| | | | j = 0; goto location 3;
| | | | | diffusion_par_bad.c 85.2--85.6: "j=0;"
| | | end location 2;
| | | begin location 3
| | | | kind : ASSIGNMENT;
| | | | source = 0; goto location 4;
| | | | | diffusion_par_bad.c 86.7--86.15: "source=0"
| | | end location 3;
| | | begin location 4
| | | | kind : CHOICE;
| | | | when source < nprocs goto location 5;
| | | | | diffusion_par_bad.c 86.2--86.41: "for (source=0; source<nprocs; source++)"
| | | | when !source < nprocs goto location 18;
| | | | | diffusion_par_bad.c 86.2--86.41: "for (source=0; source<nprocs; source++)"
| | | end location 4;
| | | begin location 5
| | | | kind : INVOCATION;
| | | | count = countForProc(source); goto location 6;
| | | | | diffusion_par_bad.c 87.3--87.32: "count = countForProc(source);"
| | | end location 5;
| | | begin location 6
| | | | kind : CHOICE;
| | | | when !(source==0) goto location 7;
| | | | | diffusion_par_bad.c 88.3--88.19: "if (source != 0)"
| | | | when !!(source==0) goto location 8;
| | | | | diffusion_par_bad.c 88.3--88.19: "if (source != 0)"
| | | end location 6;
| | | begin location 7
| | | | kind : INVOCATION;
| | | | MPI_Recv(buf,count,MPI_DOUBLE,source,0,MPI_COMM_WORLD,MPI_STATUS_IGNORE); goto location 12;
| | | | | diffusion_par_bad.c 89.4--89.83: "MPI_Recv(buf, count, MPI_DOUBLE, source, 0, MPI_COMM_WORLD, MPI_STATUS_IGNORE);"
| | | end location 7;
| | | begin location 8
| | | | kind : ASSIGNMENT;
| | | | i = 0; goto location 9;
| | | | | diffusion_par_bad.c 91.9--91.12: "i=0"
| | | end location 8;
| | | begin location 9
| | | | kind : CHOICE;
| | | | when i < count goto location 10;
| | | | | diffusion_par_bad.c 91.4--91.27: "for (i=0; i<count; i++)"
| | | | when !i < count goto location 12;
| | | | | diffusion_par_bad.c 91.4--91.27: "for (i=0; i<count; i++)"
| | | end location 9;
| | | begin location 10
| | | | kind : ASSIGNMENT;
| | | | *(buf+i) = *(v+(i+1)); goto location 11;
| | | | | diffusion_par_bad.c 91.28--91.44: "buf[i] = v[i+1];"
| | | end location 10;
| | | begin location 11
| | | | kind : ASSIGNMENT;
| | | | i = i+1; goto location 9;
| | | | | diffusion_par_bad.c 91.23--91.26: "i++"
| | | end location 11;
| | | begin location 12
| | | | kind : ASSIGNMENT;
| | | | i = 0; goto location 13;
| | | | | diffusion_par_bad.c 92.8--92.11: "i=0"
| | | end location 12;
| | | begin location 13
| | | | kind : CHOICE;
| | | | when i < count goto location 14;
| | | | | diffusion_par_bad.c 92.3--92.26: "for (i=0; i<count; i++)"
| | | | when !i < count goto location 17;
| | | | | diffusion_par_bad.c 92.3--92.26: "for (i=0; i<count; i++)"
| | | end location 13;
| | | begin location 14
| | | | kind : ASSIGNMENT;
| | | | data[time][j] = *(buf+i); goto location 15;
| | | | | diffusion_par_bad.c 93.4--93.27: "data[time][j] = buf[i];"
| | | end location 14;
| | | begin location 15
| | | | kind : ASSIGNMENT;
| | | | j = j+1; goto location 16;
| | | | | diffusion_par_bad.c 94.4--94.8: "j++;"
| | | end location 15;
| | | begin location 16
| | | | kind : ASSIGNMENT;
| | | | i = i+1; goto location 13;
| | | | | diffusion_par_bad.c 92.22--92.25: "i++"
| | | end location 16;
| | | begin location 17
| | | | kind : ASSIGNMENT;
| | | | source = source+1; goto location 4;
| | | | | diffusion_par_bad.c 86.32--86.40: "source++"
| | | end location 17;
| | | begin location 18
| | | | kind : RETURN;
| | | | return null; goto location 19;
| | | | | diffusion_par_bad.c 98.0--98.0: "}"
| | | end location 18;
| | | begin location 19
| | | | kind : TERMINAL;
| | | end location 19;
| | end function write;
| | begin function exchange_ghost_cells
| | | | diffusion_par_bad.c 101.0--101.27: "void exchange_ghost_cells()"
| | | start location : 0;
| | | begin location 0
| | | | kind : CHOICE;
| | | | when 0 <= left goto location 1;
| | | | | diffusion_par_bad.c 102.1--102.15: "if (left >= 0)"
| | | | when !0 <= left goto location 2;
| | | | | diffusion_par_bad.c 102.1--102.15: "if (left >= 0)"
| | | end location 0;
| | | begin location 1
| | | | kind : INVOCATION;
| | | | MPI_Send(v+1,1,MPI_DOUBLE,left,0,MPI_COMM_WORLD); goto location 2;
| | | | | diffusion_par_bad.c 102.16--102.70: "MPI_Send(v+1, 1, MPI_DOUBLE, left, 0, MPI_COMM_WORLD);"
| | | end location 1;
| | | begin location 2
| | | | kind : CHOICE;
| | | | when right < nprocs goto location 3;
| | | | | diffusion_par_bad.c 103.1--103.20: "if (right < nprocs)"
| | | | when !right < nprocs goto location 5;
| | | | | diffusion_par_bad.c 103.1--103.20: "if (right < nprocs)"
| | | end location 2;
| | | begin location 3
| | | | kind : INVOCATION;
| | | | MPI_Recv(v+(nxl+1),1,MPI_DOUBLE,right,0,MPI_COMM_WORLD,MPI_STATUS_IGNORE); goto location 4;
| | | | | diffusion_par_bad.c 104.2--104.82: "MPI_Recv(v+(nxl+1), 1, MPI_DOUBLE, right, 0, MPI_COMM_WORLD, MPI_STATUS_IGNORE);"
| | | end location 3;
| | | begin location 4
| | | | kind : INVOCATION;
| | | | MPI_Send(v+nxl,1,MPI_DOUBLE,right,0,MPI_COMM_WORLD); goto location 5;
| | | | | diffusion_par_bad.c 105.2--105.59: "MPI_Send(v+nxl, 1, MPI_DOUBLE, right, 0, MPI_COMM_WORLD);"
| | | end location 4;
| | | begin location 5
| | | | kind : CHOICE;
| | | | when 0 <= left goto location 6;
| | | | | diffusion_par_bad.c 107.1--107.15: "if (left >= 0)"
| | | | when !0 <= left goto location 7;
| | | | | diffusion_par_bad.c 107.1--107.15: "if (left >= 0)"
| | | end location 5;
| | | begin location 6
| | | | kind : INVOCATION;
| | | | MPI_Recv(v,1,MPI_DOUBLE,left,0,MPI_COMM_WORLD,MPI_STATUS_IGNORE); goto location 7;
| | | | | diffusion_par_bad.c 107.16--107.87: "MPI_Recv(v, 1, MPI_DOUBLE, left, 0, MPI_COMM_WORLD, MPI_STATUS_IGNORE);"
| | | end location 6;
| | | begin location 7
| | | | kind : RETURN;
| | | | return null; goto location 8;
| | | | | diffusion_par_bad.c 108.0--108.0: "}"
| | | end location 7;
| | | begin location 8
| | | | kind : TERMINAL;
| | | end location 8;
| | end function exchange_ghost_cells;
| | begin function update
| | | | diffusion_par_bad.c 112.0--112.13: "void update()"
| | | begin proper local variables
| | | | i : int;
| | | | | diffusion_par_bad.c 113.1--113.7: "int i;"
| | | end proper local variables;
| | | start location : 0;
| | | begin location 0
| | | | kind : ASSIGNMENT;
| | | | i = start; goto location 1;
| | | | | diffusion_par_bad.c 115.6--115.13: "i=start"
| | | end location 0;
| | | begin location 1
| | | | kind : CHOICE;
| | | | when i <= stop goto location 2;
| | | | | diffusion_par_bad.c 115.1--115.28: "for (i=start; i<=stop; i++)"
| | | | when !i <= stop goto location 4;
| | | | | diffusion_par_bad.c 115.1--115.28: "for (i=start; i<=stop; i++)"
| | | end location 1;
| | | begin location 2
| | | | kind : ASSIGNMENT;
| | | | *(v_new+i) = *(v+i)+(kappa*((*(v+(i+1))+*(v+(i-1)))-((real)2**(v+i)))); goto location 3;
| | | | | diffusion_par_bad.c 115.29--115.80: "v_new[i] = v[i] + kappa*(v[i+1] + v[i-1] - 2*v[i]);"
| | | end location 2;
| | | begin location 3
| | | | kind : ASSIGNMENT;
| | | | i = i+1; goto location 1;
| | | | | diffusion_par_bad.c 115.24--115.27: "i++"
| | | end location 3;
| | | begin location 4
| | | | kind : ASSIGNMENT;
| | | | i = start; goto location 5;
| | | | | diffusion_par_bad.c 116.6--116.13: "i=start"
| | | end location 4;
| | | begin location 5
| | | | kind : CHOICE;
| | | | when i <= stop goto location 6;
| | | | | diffusion_par_bad.c 116.1--116.28: "for (i=start; i<=stop; i++)"
| | | | when !i <= stop goto location 8;
| | | | | diffusion_par_bad.c 116.1--116.28: "for (i=start; i<=stop; i++)"
| | | end location 5;
| | | begin location 6
| | | | kind : ASSIGNMENT;
| | | | *(v+i) = *(v_new+i); goto location 7;
| | | | | diffusion_par_bad.c 116.29--116.45: "v[i] = v_new[i];"
| | | end location 6;
| | | begin location 7
| | | | kind : ASSIGNMENT;
| | | | i = i+1; goto location 5;
| | | | | diffusion_par_bad.c 116.24--116.27: "i++"
| | | end location 7;
| | | begin location 8
| | | | kind : RETURN;
| | | | return null; goto location 9;
| | | | | diffusion_par_bad.c 117.0--117.0: "}"
| | | end location 8;
| | | begin location 9
| | | | kind : TERMINAL;
| | | end location 9;
| | end function update;
| | begin function main
| | | | diffusion_par_bad.c 120.0--120.11: "void main()"
| | | begin proper local variables
| | | | argc : int;
| | | | | diffusion_par_bad.c 121.1--121.10: "int argc;"
| | | | argv : pointer(6)<pointer(7)<char>>;
| | | | | diffusion_par_bad.c 122.1--122.13: "char **argv;"
| | | | iter : int;
| | | | | diffusion_par_bad.c 123.1--123.10: "int iter;"
| | | end proper local variables;
| | | start location : 0;
| | | begin location 0
| | | | kind : INVOCATION;
| | | | MPI_Init(&argc,&argv); goto location 1;
| | | | | diffusion_par_bad.c 125.1--125.23: "MPI_Init(&argc,&argv);"
| | | end location 0;
| | | begin location 1
| | | | kind : INVOCATION;
| | | | MPI_Comm_size(MPI_COMM_WORLD,&nprocs); goto location 2;
| | | | | diffusion_par_bad.c 126.1--126.40: "MPI_Comm_size(MPI_COMM_WORLD, &nprocs);"
| | | end location 1;
| | | begin location 2
| | | | kind : INVOCATION;
| | | | MPI_Comm_rank(MPI_COMM_WORLD,&myrank); goto location 3;
| | | | | diffusion_par_bad.c 127.1--127.40: "MPI_Comm_rank(MPI_COMM_WORLD, &myrank);"
| | | end location 2;
| | | begin location 3
| | | | kind : INVOCATION;
| | | | init(); goto location 4;
| | | | | diffusion_par_bad.c 128.1--128.8: "init();"
| | | end location 3;
| | | begin location 4
| | | | kind : INVOCATION;
| | | | write(0); goto location 5;
| | | | | diffusion_par_bad.c 129.1--129.10: "write(0);"
| | | end location 4;
| | | begin location 5
| | | | kind : ASSIGNMENT;
| | | | iter = 1; goto location 6;
| | | | | diffusion_par_bad.c 130.6--130.14: "iter = 1"
| | | end location 5;
| | | begin location 6
| | | | kind : CHOICE;
| | | | when iter <= nsteps goto location 7;
| | | | | diffusion_par_bad.c 130.1--130.39: "for (iter = 1; iter <= nsteps; iter++)"
| | | | when !iter <= nsteps goto location 11;
| | | | | diffusion_par_bad.c 130.1--130.39: "for (iter = 1; iter <= nsteps; iter++)"
| | | end location 6;
| | | begin location 7
| | | | kind : INVOCATION;
| | | | exchange_ghost_cells(); goto location 8;
| | | | | diffusion_par_bad.c 131.2--131.25: "exchange_ghost_cells();"
| | | end location 7;
| | | begin location 8
| | | | kind : INVOCATION;
| | | | update(); goto location 9;
| | | | | diffusion_par_bad.c 132.2--132.11: "update();"
| | | end location 8;
| | | begin location 9
| | | | kind : INVOCATION;
| | | | write(iter); goto location 10;
| | | | | diffusion_par_bad.c 133.2--133.14: "write(iter);"
| | | end location 9;
| | | begin location 10
| | | | kind : ASSIGNMENT;
| | | | iter = iter+1; goto location 6;
| | | | | diffusion_par_bad.c 130.32--130.38: "iter++"
| | | end location 10;
| | | begin location 11
| | | | kind : INVOCATION;
| | | | cleanup(); goto location 12;
| | | | | diffusion_par_bad.c 135.1--135.11: "cleanup();"
| | | end location 11;
| | | begin location 12
| | | | kind : INVOCATION;
| | | | MPI_Finalize(); goto location 13;
| | | | | diffusion_par_bad.c 136.1--136.16: "MPI_Finalize();"
| | | end location 12;
| | | begin location 13
| | | | kind : RETURN;
| | | | return null; goto location 14;
| | | | | diffusion_par_bad.c 137.0--137.0: "}"
| | | end location 13;
| | | begin location 14
| | | | kind : TERMINAL;
| | | end location 14;
| | end function main;
| | begin function free
| | | | null
| | | begin formal parameters
| | | | pointer : pointer(4)<void>;
| | | | | null
| | | end formal parameters;
| | end function free;
| | begin function MPI_Send
| | | | libmpi.c 147.0--148.28: "int MPI_Send(void* _buf, int _count, MPI_Datatype _datatype, int _dest, int _tag,             MPI_Comm _comm)"
| | | begin formal parameters
| | | | _buf : pointer(4)<void>;
| | | | | libmpi.c 147.13--147.23: "void* _buf"
| | | | _count : int;
| | | | | libmpi.c 147.25--147.35: "int _count"
| | | | _datatype : int;
| | | | | libmpi.c 147.37--147.59: "MPI_Datatype _datatype"
| | | | _dest : int;
| | | | | libmpi.c 147.61--147.70: "int _dest"
| | | | _tag : int;
| | | | | libmpi.c 147.72--147.80: "int _tag"
| | | | _comm : int;
| | | | | libmpi.c 148.13--148.27: "MPI_Comm _comm"
| | | end formal parameters;
| | | begin proper local variables
| | | | _result : int;
| | | | | libmpi.c 149.2--149.14: "int _result;"
| | | end proper local variables;
| | | start location : 0;
| | | begin location 0
| | | | kind : ASSERTION;
| | | | assert MPIX_State==MPIX_INITIALIZED; Attempt to call MPI_Send when MPI is not initialized goto location 1;
| | | | | libmpi.c 151.15--151.109: "assert MPIX_State == MPIX_INITIALIZED, "Attempt to call MPI_Send when MPI is not initialized";"
| | | end location 0;
| | | begin location 1
| | | | kind : CHOICE;
| | | | when _dest==MPI_PROC_NULL goto location 2;
| | | | | libmpi.c 152.2--152.29: "if (_dest == MPI_PROC_NULL)"
| | | | when !(_dest==MPI_PROC_NULL) goto location 3;
| | | | | libmpi.c 152.2--152.29: "if (_dest == MPI_PROC_NULL)"
| | | end location 1;
| | | begin location 2
| | | | kind : RETURN;
| | | | return 0; goto location 3;
| | | | | libmpi.c 153.4--153.13: "return 0;"
| | | end location 2;
| | | begin location 3
| | | | kind : ASSERTION;
| | | | assert _comm==MPI_COMM_WORLD;  goto location 4;
| | | | | libmpi.c 154.15--154.46: "assert _comm == MPI_COMM_WORLD;"
| | | end location 3;
| | | begin location 4
| | | | kind : CHOICE;
| | | | when _datatype==MPI_DOUBLE goto location 5;
| | | | | libmpi.c 155.2--155.30: "if (_datatype == MPI_DOUBLE)"
| | | | when !(_datatype==MPI_DOUBLE) goto location 6;
| | | | | libmpi.c 155.2--155.30: "if (_datatype == MPI_DOUBLE)"
| | | end location 4;
| | | begin location 5
| | | | kind : INVOCATION;
| | | | _result = MPIX_Send_double((pointer(3)<real>)_buf,_count,_dest,_tag,_comm); goto location 9;
| | | | | libmpi.c 156.4--156.74: "_result = MPIX_Send_double((double*)_buf, _count, _dest, _tag, _comm);"
| | | end location 5;
| | | begin location 6
| | | | kind : CHOICE;
| | | | when _datatype==MPI_INT goto location 7;
| | | | | libmpi.c 157.7--157.32: "if (_datatype == MPI_INT)"
| | | | when !(_datatype==MPI_INT) goto location 8;
| | | | | libmpi.c 157.7--157.32: "if (_datatype == MPI_INT)"
| | | end location 6;
| | | begin location 7
| | | | kind : INVOCATION;
| | | | _result = MPIX_Send_int((pointer(5)<int>)_buf,_count,_dest,_tag,_comm); goto location 9;
| | | | | libmpi.c 158.4--158.68: "_result = MPIX_Send_int((int*)_buf, _count, _dest, _tag, _comm);"
| | | end location 7;
| | | begin location 8
| | | | kind : ASSERTION;
| | | | assert false; Currently only MPI_DOUBLE and MPI_INT supported goto location 9;
| | | | | libmpi.c 160.17--160.81: "assert false, "Currently only MPI_DOUBLE and MPI_INT supported";"
| | | end location 8;
| | | begin location 9
| | | | kind : RETURN;
| | | | return _result; goto location 10;
| | | | | libmpi.c 161.2--161.17: "return _result;"
| | | end location 9;
| | | begin location 10
| | | | kind : TERMINAL;
| | | end location 10;
| | end function MPI_Send;
| | begin function MPIX_Send_double
| | | | libmpi.c 164.0--164.83: "int MPIX_Send_double(double* _buf, int _count, int _dest, int _tag, MPI_Comm _comm)"
| | | begin formal parameters
| | | | _buf : pointer(3)<real>;
| | | | | libmpi.c 164.21--164.33: "double* _buf"
| | | | _count : int;
| | | | | libmpi.c 164.35--164.45: "int _count"
| | | | _dest : int;
| | | | | libmpi.c 164.47--164.56: "int _dest"
| | | | _tag : int;
| | | | | libmpi.c 164.58--164.66: "int _tag"
| | | | _comm : int;
| | | | | libmpi.c 164.68--164.82: "MPI_Comm _comm"
| | | end formal parameters;
| | | begin proper local variables
| | | | _tmp : real[_count];
| | | | | libmpi.c 165.2--165.22: "double _tmp[_count];"
| | | | _i : int;
| | | | | libmpi.c 166.2--166.9: "int _i;"
| | | end proper local variables;
| | | start location : 0;
| | | begin location 0
| | | | kind : ASSIGNMENT;
| | | | _i = 0; goto location 1;
| | | | | libmpi.c 168.7--168.11: "_i=0"
| | | end location 0;
| | | begin location 1
| | | | kind : CHOICE;
| | | | when _i < _count goto location 2;
| | | | | libmpi.c 168.2--168.29: "for (_i=0; _i<_count; _i++)"
| | | | when !_i < _count goto location 4;
| | | | | libmpi.c 168.2--168.29: "for (_i=0; _i<_count; _i++)"
| | | end location 1;
| | | begin location 2
| | | | kind : ASSIGNMENT;
| | | | _tmp[_i] = *(_buf+_i); goto location 3;
| | | | | libmpi.c 168.30--168.50: "_tmp[_i] = _buf[_i];"
| | | end location 2;
| | | begin location 3
| | | | kind : ASSIGNMENT;
| | | | _i = _i+1; goto location 1;
| | | | | libmpi.c 168.24--168.28: "_i++"
| | | end location 3;
| | | begin location 4
| | | | kind : SEND;
| | | | send(_tmp,_dest,_tag); goto location 5;
| | | | | libmpi.c 169.2--169.26: "send(_tmp, _dest, _tag);"
| | | end location 4;
| | | begin location 5
| | | | kind : RETURN;
| | | | return 0; goto location 6;
| | | | | libmpi.c 170.2--170.11: "return 0;"
| | | end location 5;
| | | begin location 6
| | | | kind : TERMINAL;
| | | end location 6;
| | end function MPIX_Send_double;
| | begin function MPIX_Send_int
| | | | libmpi.c 173.0--173.77: "int MPIX_Send_int(int* _buf, int _count, int _dest, int _tag, MPI_Comm _comm)"
| | | begin formal parameters
| | | | _buf : pointer(5)<int>;
| | | | | libmpi.c 173.18--173.27: "int* _buf"
| | | | _count : int;
| | | | | libmpi.c 173.29--173.39: "int _count"
| | | | _dest : int;
| | | | | libmpi.c 173.41--173.50: "int _dest"
| | | | _tag : int;
| | | | | libmpi.c 173.52--173.60: "int _tag"
| | | | _comm : int;
| | | | | libmpi.c 173.62--173.76: "MPI_Comm _comm"
| | | end formal parameters;
| | | begin proper local variables
| | | | _tmp : int[_count];
| | | | | libmpi.c 174.2--174.19: "int _tmp[_count];"
| | | | _i : int;
| | | | | libmpi.c 175.2--175.9: "int _i;"
| | | end proper local variables;
| | | start location : 0;
| | | begin location 0
| | | | kind : ASSIGNMENT;
| | | | _i = 0; goto location 1;
| | | | | libmpi.c 177.7--177.11: "_i=0"
| | | end location 0;
| | | begin location 1
| | | | kind : CHOICE;
| | | | when _i < _count goto location 2;
| | | | | libmpi.c 177.2--177.29: "for (_i=0; _i<_count; _i++)"
| | | | when !_i < _count goto location 4;
| | | | | libmpi.c 177.2--177.29: "for (_i=0; _i<_count; _i++)"
| | | end location 1;
| | | begin location 2
| | | | kind : ASSIGNMENT;
| | | | _tmp[_i] = *(_buf+_i); goto location 3;
| | | | | libmpi.c 177.30--177.50: "_tmp[_i] = _buf[_i];"
| | | end location 2;
| | | begin location 3
| | | | kind : ASSIGNMENT;
| | | | _i = _i+1; goto location 1;
| | | | | libmpi.c 177.24--177.28: "_i++"
| | | end location 3;
| | | begin location 4
| | | | kind : SEND;
| | | | send(_tmp,_dest,_tag); goto location 5;
| | | | | libmpi.c 178.2--178.26: "send(_tmp, _dest, _tag);"
| | | end location 4;
| | | begin location 5
| | | | kind : RETURN;
| | | | return 0; goto location 6;
| | | | | libmpi.c 179.2--179.11: "return 0;"
| | | end location 5;
| | | begin location 6
| | | | kind : TERMINAL;
| | | end location 6;
| | end function MPIX_Send_int;
| | begin function MPI_Recv
| | | | libmpi.c 183.0--184.49: "int MPI_Recv(void* _buf, int _count, MPI_Datatype _datatype, int _source, int _tag,             MPI_Comm _comm, MPI_Status *_status)"
| | | begin formal parameters
| | | | _buf : pointer(4)<void>;
| | | | | libmpi.c 183.13--183.23: "void* _buf"
| | | | _count : int;
| | | | | libmpi.c 183.25--183.35: "int _count"
| | | | _datatype : int;
| | | | | libmpi.c 183.37--183.59: "MPI_Datatype _datatype"
| | | | _source : int;
| | | | | libmpi.c 183.61--183.72: "int _source"
| | | | _tag : int;
| | | | | libmpi.c 183.74--183.82: "int _tag"
| | | | _comm : int;
| | | | | libmpi.c 184.13--184.27: "MPI_Comm _comm"
| | | | _status : pointer(2)<Record[MPI_Status; MPI_SOURCE:int, MPI_TAG:int, SIZE:int]>;
| | | | | libmpi.c 184.29--184.48: "MPI_Status *_status"
| | | end formal parameters;
| | | begin proper local variables
| | | | _result : int;
| | | | | libmpi.c 185.2--185.14: "int _result;"
| | | end proper local variables;
| | | start location : 0;
| | | begin location 0
| | | | kind : ASSERTION;
| | | | assert MPIX_State==MPIX_INITIALIZED; Attempt to call MPI_Recv when MPI is not initialized goto location 1;
| | | | | libmpi.c 187.15--187.109: "assert MPIX_State == MPIX_INITIALIZED, "Attempt to call MPI_Recv when MPI is not initialized";"
| | | end location 0;
| | | begin location 1
| | | | kind : CHOICE;
| | | | when _source==MPI_PROC_NULL goto location 2;
| | | | | libmpi.c 188.3--188.32: "if (_source == MPI_PROC_NULL)"
| | | | when !(_source==MPI_PROC_NULL) goto location 3;
| | | | | libmpi.c 188.3--188.32: "if (_source == MPI_PROC_NULL)"
| | | end location 1;
| | | begin location 2
| | | | kind : RETURN;
| | | | return 0; goto location 3;
| | | | | libmpi.c 189.4--189.13: "return 0;"
| | | end location 2;
| | | begin location 3
| | | | kind : ASSERTION;
| | | | assert _comm==MPI_COMM_WORLD;  goto location 4;
| | | | | libmpi.c 190.15--190.46: "assert _comm == MPI_COMM_WORLD;"
| | | end location 3;
| | | begin location 4
| | | | kind : CHOICE;
| | | | when _datatype==MPI_DOUBLE goto location 5;
| | | | | libmpi.c 191.2--191.30: "if (_datatype == MPI_DOUBLE)"
| | | | when !(_datatype==MPI_DOUBLE) goto location 6;
| | | | | libmpi.c 191.2--191.30: "if (_datatype == MPI_DOUBLE)"
| | | end location 4;
| | | begin location 5
| | | | kind : INVOCATION;
| | | | _result = MPIX_Recv_double((pointer(3)<real>)_buf,_count,_source,_tag,_comm,_status); goto location 9;
| | | | | libmpi.c 192.4--192.85: "_result = MPIX_Recv_double((double*)_buf, _count, _source, _tag, _comm, _status);"
| | | end location 5;
| | | begin location 6
| | | | kind : CHOICE;
| | | | when _datatype==MPI_INT goto location 7;
| | | | | libmpi.c 193.7--193.32: "if (_datatype == MPI_INT)"
| | | | when !(_datatype==MPI_INT) goto location 8;
| | | | | libmpi.c 193.7--193.32: "if (_datatype == MPI_INT)"
| | | end location 6;
| | | begin location 7
| | | | kind : INVOCATION;
| | | | _result = MPIX_Recv_int((pointer(5)<int>)_buf,_count,_source,_tag,_comm,_status); goto location 9;
| | | | | libmpi.c 194.4--194.79: "_result = MPIX_Recv_int((int*)_buf, _count, _source, _tag, _comm, _status);"
| | | end location 7;
| | | begin location 8
| | | | kind : ASSERTION;
| | | | assert false;  goto location 9;
| | | | | libmpi.c 196.17--196.30: "assert false;"
| | | end location 8;
| | | begin location 9
| | | | kind : RETURN;
| | | | return _result; goto location 10;
| | | | | libmpi.c 197.2--197.17: "return _result;"
| | | end location 9;
| | | begin location 10
| | | | kind : TERMINAL;
| | | end location 10;
| | end function MPI_Recv;
| | begin function MPIX_Recv_double
| | | | libmpi.c 200.0--201.41: "int MPIX_Recv_double(double *_buf, int _count, int _source, int _tag, MPI_Comm _comm,                     MPI_Status *_status)"
| | | begin formal parameters
| | | | _buf : pointer(3)<real>;
| | | | | libmpi.c 200.21--200.33: "double *_buf"
| | | | _count : int;
| | | | | libmpi.c 200.35--200.45: "int _count"
| | | | _source : int;
| | | | | libmpi.c 200.47--200.58: "int _source"
| | | | _tag : int;
| | | | | libmpi.c 200.60--200.68: "int _tag"
| | | | _comm : int;
| | | | | libmpi.c 200.70--200.84: "MPI_Comm _comm"
| | | | _status : pointer(2)<Record[MPI_Status; MPI_SOURCE:int, MPI_TAG:int, SIZE:int]>;
| | | | | libmpi.c 201.21--201.40: "MPI_Status *_status"
| | | end formal parameters;
| | | begin proper local variables
| | | | _tmp : real[_count];
| | | | | libmpi.c 202.2--202.22: "double _tmp[_count];"
| | | | _i : int;
| | | | | libmpi.c 203.2--203.9: "int _i;"
| | | | thesource : int;
| | | | | libmpi.c 204.2--204.16: "int thesource;"
| | | | thetag : int;
| | | | | libmpi.c 205.2--205.13: "int thetag;"
| | | | thesize : int;
| | | | | libmpi.c 206.2--206.14: "int thesize;"
| | | | thecount : int;
| | | | | libmpi.c 207.2--207.15: "int thecount;"
| | | end proper local variables;
| | | start location : 0;
| | | begin location 0
| | | | kind : CHOICE;
| | | | when !(_source==MPI_ANY_SOURCE) && !(_tag==MPI_ANY_TAG) goto location 1;
| | | | | libmpi.c 209.2--209.55: "if (_source != MPI_ANY_SOURCE && _tag != MPI_ANY_TAG)"
| | | | when !(!(_source==MPI_ANY_SOURCE) && !(_tag==MPI_ANY_TAG)) goto location 4;
| | | | | libmpi.c 209.2--209.55: "if (_source != MPI_ANY_SOURCE && _tag != MPI_ANY_TAG)"
| | | end location 0;
| | | begin location 1
| | | | kind : RECEIVE;
| | | | recv(_tmp,_source,_tag, thesize); goto location 2;
| | | | | libmpi.c 210.4--210.39: "recv(_tmp, _source, _tag, thesize);"
| | | end location 1;
| | | begin location 2
| | | | kind : ASSIGNMENT;
| | | | thesource = _source; goto location 3;
| | | | | libmpi.c 211.4--211.24: "thesource = _source;"
| | | end location 2;
| | | begin location 3
| | | | kind : ASSIGNMENT;
| | | | thetag = _tag; goto location 21;
| | | | | libmpi.c 212.4--212.18: "thetag = _tag;"
| | | end location 3;
| | | begin location 4
| | | | kind : CHOICE;
| | | | when !(_source==MPI_ANY_SOURCE) && (_tag==MPI_ANY_TAG) goto location 5;
| | | | | libmpi.c 213.9--213.62: "if (_source != MPI_ANY_SOURCE && _tag == MPI_ANY_TAG)"
| | | | when !(!(_source==MPI_ANY_SOURCE) && (_tag==MPI_ANY_TAG)) goto location 7;
| | | | | libmpi.c 213.9--213.62: "if (_source != MPI_ANY_SOURCE && _tag == MPI_ANY_TAG)"
| | | end location 4;
| | | begin location 5
| | | | kind : RECEIVE;
| | | | recv(_tmp,_source,any(thetag), thesize); goto location 6;
| | | | | libmpi.c 214.4--214.46: "recv(_tmp, _source, any(thetag), thesize);"
| | | end location 5;
| | | begin location 6
| | | | kind : ASSIGNMENT;
| | | | thesource = _source; goto location 21;
| | | | | libmpi.c 215.4--215.24: "thesource = _source;"
| | | end location 6;
| | | begin location 7
| | | | kind : CHOICE;
| | | | when (_source==MPI_ANY_SOURCE) && !(_tag==MPI_ANY_TAG) goto location 8;
| | | | | libmpi.c 216.9--216.62: "if (_source == MPI_ANY_SOURCE && _tag != MPI_ANY_TAG)"
| | | | when !((_source==MPI_ANY_SOURCE) && !(_tag==MPI_ANY_TAG)) goto location 15;
| | | | | libmpi.c 216.9--216.62: "if (_source == MPI_ANY_SOURCE && _tag != MPI_ANY_TAG)"
| | | end location 7;
| | | begin location 8
| | | | kind : RECEIVE;
| | | | recv(_tmp,0,_tag, thesize); goto location 9;
| | | | | libmpi.c 217.4--217.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | | recv(_tmp,1,_tag, thesize); goto location 10;
| | | | | libmpi.c 217.4--217.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | | recv(_tmp,2,_tag, thesize); goto location 11;
| | | | | libmpi.c 217.4--217.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | | recv(_tmp,3,_tag, thesize); goto location 12;
| | | | | libmpi.c 217.4--217.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | | recv(_tmp,4,_tag, thesize); goto location 13;
| | | | | libmpi.c 217.4--217.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | end location 8;
| | | begin location 9
| | | | kind : ASSIGNMENT;
| | | | thesource = 0; goto location 14;
| | | | | libmpi.c 217.4--217.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | end location 9;
| | | begin location 10
| | | | kind : ASSIGNMENT;
| | | | thesource = 1; goto location 14;
| | | | | libmpi.c 217.4--217.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | end location 10;
| | | begin location 11
| | | | kind : ASSIGNMENT;
| | | | thesource = 2; goto location 14;
| | | | | libmpi.c 217.4--217.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | end location 11;
| | | begin location 12
| | | | kind : ASSIGNMENT;
| | | | thesource = 3; goto location 14;
| | | | | libmpi.c 217.4--217.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | end location 12;
| | | begin location 13
| | | | kind : ASSIGNMENT;
| | | | thesource = 4; goto location 14;
| | | | | libmpi.c 217.4--217.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | end location 13;
| | | begin location 14
| | | | kind : ASSIGNMENT;
| | | | thetag = _tag; goto location 21;
| | | | | libmpi.c 218.4--218.18: "thetag = _tag;"
| | | end location 14;
| | | begin location 15
| | | | kind : RECEIVE;
| | | | recv(_tmp,0,any(thetag), thesize); goto location 16;
| | | | | libmpi.c 220.4--220.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | | recv(_tmp,1,any(thetag), thesize); goto location 17;
| | | | | libmpi.c 220.4--220.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | | recv(_tmp,2,any(thetag), thesize); goto location 18;
| | | | | libmpi.c 220.4--220.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | | recv(_tmp,3,any(thetag), thesize); goto location 19;
| | | | | libmpi.c 220.4--220.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | | recv(_tmp,4,any(thetag), thesize); goto location 20;
| | | | | libmpi.c 220.4--220.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | end location 15;
| | | begin location 16
| | | | kind : ASSIGNMENT;
| | | | thesource = 0; goto location 21;
| | | | | libmpi.c 220.4--220.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | end location 16;
| | | begin location 17
| | | | kind : ASSIGNMENT;
| | | | thesource = 1; goto location 21;
| | | | | libmpi.c 220.4--220.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | end location 17;
| | | begin location 18
| | | | kind : ASSIGNMENT;
| | | | thesource = 2; goto location 21;
| | | | | libmpi.c 220.4--220.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | end location 18;
| | | begin location 19
| | | | kind : ASSIGNMENT;
| | | | thesource = 3; goto location 21;
| | | | | libmpi.c 220.4--220.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | end location 19;
| | | begin location 20
| | | | kind : ASSIGNMENT;
| | | | thesource = 4; goto location 21;
| | | | | libmpi.c 220.4--220.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | end location 20;
| | | begin location 21
| | | | kind : CHOICE;
| | | | when !(_status==MPI_STATUS_IGNORE) goto location 22;
| | | | | libmpi.c 222.2--222.35: "if (_status != MPI_STATUS_IGNORE)"
| | | | when !!(_status==MPI_STATUS_IGNORE) goto location 25;
| | | | | libmpi.c 222.2--222.35: "if (_status != MPI_STATUS_IGNORE)"
| | | end location 21;
| | | begin location 22
| | | | kind : ASSIGNMENT;
| | | | *_status.MPI_SOURCE = thesource; goto location 23;
| | | | | libmpi.c 223.4--223.36: "_status->MPI_SOURCE = thesource;"
| | | end location 22;
| | | begin location 23
| | | | kind : ASSIGNMENT;
| | | | *_status.MPI_TAG = thetag; goto location 24;
| | | | | libmpi.c 224.4--224.30: "_status->MPI_TAG = thetag;"
| | | end location 23;
| | | begin location 24
| | | | kind : ASSIGNMENT;
| | | | *_status.SIZE = thesize; goto location 25;
| | | | | libmpi.c 225.4--225.28: "_status->SIZE = thesize;"
| | | end location 24;
| | | begin location 25
| | | | kind : ASSIGNMENT;
| | | | thecount = thesize/sizeof(real); goto location 26;
| | | | | libmpi.c 227.2--227.36: "thecount = thesize/sizeof(double);"
| | | end location 25;
| | | begin location 26
| | | | kind : ASSIGNMENT;
| | | | _i = 0; goto location 27;
| | | | | libmpi.c 228.7--228.11: "_i=0"
| | | end location 26;
| | | begin location 27
| | | | kind : CHOICE;
| | | | when _i < thecount goto location 28;
| | | | | libmpi.c 228.2--228.31: "for (_i=0; _i<thecount; _i++)"
| | | | when !_i < thecount goto location 30;
| | | | | libmpi.c 228.2--228.31: "for (_i=0; _i<thecount; _i++)"
| | | end location 27;
| | | begin location 28
| | | | kind : ASSIGNMENT;
| | | | *(_buf+_i) = _tmp[_i]; goto location 29;
| | | | | libmpi.c 228.32--228.52: "_buf[_i] = _tmp[_i];"
| | | end location 28;
| | | begin location 29
| | | | kind : ASSIGNMENT;
| | | | _i = _i+1; goto location 27;
| | | | | libmpi.c 228.26--228.30: "_i++"
| | | end location 29;
| | | begin location 30
| | | | kind : RETURN;
| | | | return 0; goto location 31;
| | | | | libmpi.c 229.2--229.11: "return 0;"
| | | end location 30;
| | | begin location 31
| | | | kind : TERMINAL;
| | | end location 31;
| | end function MPIX_Recv_double;
| | begin function MPIX_Recv_int
| | | | libmpi.c 232.0--233.41: "int MPIX_Recv_int(int *_buf, int _count, int _source, int _tag, MPI_Comm _comm,                     MPI_Status *_status)"
| | | begin formal parameters
| | | | _buf : pointer(5)<int>;
| | | | | libmpi.c 232.18--232.27: "int *_buf"
| | | | _count : int;
| | | | | libmpi.c 232.29--232.39: "int _count"
| | | | _source : int;
| | | | | libmpi.c 232.41--232.52: "int _source"
| | | | _tag : int;
| | | | | libmpi.c 232.54--232.62: "int _tag"
| | | | _comm : int;
| | | | | libmpi.c 232.64--232.78: "MPI_Comm _comm"
| | | | _status : pointer(2)<Record[MPI_Status; MPI_SOURCE:int, MPI_TAG:int, SIZE:int]>;
| | | | | libmpi.c 233.21--233.40: "MPI_Status *_status"
| | | end formal parameters;
| | | begin proper local variables
| | | | _tmp : int[_count];
| | | | | libmpi.c 234.2--234.19: "int _tmp[_count];"
| | | | _i : int;
| | | | | libmpi.c 235.2--235.9: "int _i;"
| | | | thesource : int;
| | | | | libmpi.c 236.2--236.16: "int thesource;"
| | | | thetag : int;
| | | | | libmpi.c 237.2--237.13: "int thetag;"
| | | | thesize : int;
| | | | | libmpi.c 238.2--238.14: "int thesize;"
| | | | thecount : int;
| | | | | libmpi.c 239.2--239.15: "int thecount;"
| | | end proper local variables;
| | | start location : 0;
| | | begin location 0
| | | | kind : CHOICE;
| | | | when !(_source==MPI_ANY_SOURCE) && !(_tag==MPI_ANY_TAG) goto location 1;
| | | | | libmpi.c 241.2--241.55: "if (_source != MPI_ANY_SOURCE && _tag != MPI_ANY_TAG)"
| | | | when !(!(_source==MPI_ANY_SOURCE) && !(_tag==MPI_ANY_TAG)) goto location 4;
| | | | | libmpi.c 241.2--241.55: "if (_source != MPI_ANY_SOURCE && _tag != MPI_ANY_TAG)"
| | | end location 0;
| | | begin location 1
| | | | kind : RECEIVE;
| | | | recv(_tmp,_source,_tag, thesize); goto location 2;
| | | | | libmpi.c 242.4--242.39: "recv(_tmp, _source, _tag, thesize);"
| | | end location 1;
| | | begin location 2
| | | | kind : ASSIGNMENT;
| | | | thesource = _source; goto location 3;
| | | | | libmpi.c 243.4--243.24: "thesource = _source;"
| | | end location 2;
| | | begin location 3
| | | | kind : ASSIGNMENT;
| | | | thetag = _tag; goto location 21;
| | | | | libmpi.c 244.4--244.18: "thetag = _tag;"
| | | end location 3;
| | | begin location 4
| | | | kind : CHOICE;
| | | | when !(_source==MPI_ANY_SOURCE) && (_tag==MPI_ANY_TAG) goto location 5;
| | | | | libmpi.c 245.9--245.62: "if (_source != MPI_ANY_SOURCE && _tag == MPI_ANY_TAG)"
| | | | when !(!(_source==MPI_ANY_SOURCE) && (_tag==MPI_ANY_TAG)) goto location 7;
| | | | | libmpi.c 245.9--245.62: "if (_source != MPI_ANY_SOURCE && _tag == MPI_ANY_TAG)"
| | | end location 4;
| | | begin location 5
| | | | kind : RECEIVE;
| | | | recv(_tmp,_source,any(thetag), thesize); goto location 6;
| | | | | libmpi.c 246.4--246.46: "recv(_tmp, _source, any(thetag), thesize);"
| | | end location 5;
| | | begin location 6
| | | | kind : ASSIGNMENT;
| | | | thesource = _source; goto location 21;
| | | | | libmpi.c 247.4--247.24: "thesource = _source;"
| | | end location 6;
| | | begin location 7
| | | | kind : CHOICE;
| | | | when (_source==MPI_ANY_SOURCE) && !(_tag==MPI_ANY_TAG) goto location 8;
| | | | | libmpi.c 248.9--248.62: "if (_source == MPI_ANY_SOURCE && _tag != MPI_ANY_TAG)"
| | | | when !((_source==MPI_ANY_SOURCE) && !(_tag==MPI_ANY_TAG)) goto location 15;
| | | | | libmpi.c 248.9--248.62: "if (_source == MPI_ANY_SOURCE && _tag != MPI_ANY_TAG)"
| | | end location 7;
| | | begin location 8
| | | | kind : RECEIVE;
| | | | recv(_tmp,0,_tag, thesize); goto location 9;
| | | | | libmpi.c 249.4--249.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | | recv(_tmp,1,_tag, thesize); goto location 10;
| | | | | libmpi.c 249.4--249.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | | recv(_tmp,2,_tag, thesize); goto location 11;
| | | | | libmpi.c 249.4--249.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | | recv(_tmp,3,_tag, thesize); goto location 12;
| | | | | libmpi.c 249.4--249.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | | recv(_tmp,4,_tag, thesize); goto location 13;
| | | | | libmpi.c 249.4--249.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | end location 8;
| | | begin location 9
| | | | kind : ASSIGNMENT;
| | | | thesource = 0; goto location 14;
| | | | | libmpi.c 249.4--249.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | end location 9;
| | | begin location 10
| | | | kind : ASSIGNMENT;
| | | | thesource = 1; goto location 14;
| | | | | libmpi.c 249.4--249.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | end location 10;
| | | begin location 11
| | | | kind : ASSIGNMENT;
| | | | thesource = 2; goto location 14;
| | | | | libmpi.c 249.4--249.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | end location 11;
| | | begin location 12
| | | | kind : ASSIGNMENT;
| | | | thesource = 3; goto location 14;
| | | | | libmpi.c 249.4--249.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | end location 12;
| | | begin location 13
| | | | kind : ASSIGNMENT;
| | | | thesource = 4; goto location 14;
| | | | | libmpi.c 249.4--249.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | end location 13;
| | | begin location 14
| | | | kind : ASSIGNMENT;
| | | | thetag = _tag; goto location 21;
| | | | | libmpi.c 250.4--250.18: "thetag = _tag;"
| | | end location 14;
| | | begin location 15
| | | | kind : RECEIVE;
| | | | recv(_tmp,0,any(thetag), thesize); goto location 16;
| | | | | libmpi.c 252.4--252.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | | recv(_tmp,1,any(thetag), thesize); goto location 17;
| | | | | libmpi.c 252.4--252.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | | recv(_tmp,2,any(thetag), thesize); goto location 18;
| | | | | libmpi.c 252.4--252.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | | recv(_tmp,3,any(thetag), thesize); goto location 19;
| | | | | libmpi.c 252.4--252.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | | recv(_tmp,4,any(thetag), thesize); goto location 20;
| | | | | libmpi.c 252.4--252.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | end location 15;
| | | begin location 16
| | | | kind : ASSIGNMENT;
| | | | thesource = 0; goto location 21;
| | | | | libmpi.c 252.4--252.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | end location 16;
| | | begin location 17
| | | | kind : ASSIGNMENT;
| | | | thesource = 1; goto location 21;
| | | | | libmpi.c 252.4--252.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | end location 17;
| | | begin location 18
| | | | kind : ASSIGNMENT;
| | | | thesource = 2; goto location 21;
| | | | | libmpi.c 252.4--252.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | end location 18;
| | | begin location 19
| | | | kind : ASSIGNMENT;
| | | | thesource = 3; goto location 21;
| | | | | libmpi.c 252.4--252.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | end location 19;
| | | begin location 20
| | | | kind : ASSIGNMENT;
| | | | thesource = 4; goto location 21;
| | | | | libmpi.c 252.4--252.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | end location 20;
| | | begin location 21
| | | | kind : CHOICE;
| | | | when !(_status==MPI_STATUS_IGNORE) goto location 22;
| | | | | libmpi.c 254.2--254.35: "if (_status != MPI_STATUS_IGNORE)"
| | | | when !!(_status==MPI_STATUS_IGNORE) goto location 25;
| | | | | libmpi.c 254.2--254.35: "if (_status != MPI_STATUS_IGNORE)"
| | | end location 21;
| | | begin location 22
| | | | kind : ASSIGNMENT;
| | | | *_status.MPI_SOURCE = thesource; goto location 23;
| | | | | libmpi.c 255.4--255.36: "_status->MPI_SOURCE = thesource;"
| | | end location 22;
| | | begin location 23
| | | | kind : ASSIGNMENT;
| | | | *_status.MPI_TAG = thetag; goto location 24;
| | | | | libmpi.c 256.4--256.30: "_status->MPI_TAG = thetag;"
| | | end location 23;
| | | begin location 24
| | | | kind : ASSIGNMENT;
| | | | *_status.SIZE = thesize; goto location 25;
| | | | | libmpi.c 257.4--257.28: "_status->SIZE = thesize;"
| | | end location 24;
| | | begin location 25
| | | | kind : ASSIGNMENT;
| | | | thecount = thesize/sizeof(int); goto location 26;
| | | | | libmpi.c 259.2--259.33: "thecount = thesize/sizeof(int);"
| | | end location 25;
| | | begin location 26
| | | | kind : ASSIGNMENT;
| | | | _i = 0; goto location 27;
| | | | | libmpi.c 260.7--260.11: "_i=0"
| | | end location 26;
| | | begin location 27
| | | | kind : CHOICE;
| | | | when _i < thecount goto location 28;
| | | | | libmpi.c 260.2--260.31: "for (_i=0; _i<thecount; _i++)"
| | | | when !_i < thecount goto location 30;
| | | | | libmpi.c 260.2--260.31: "for (_i=0; _i<thecount; _i++)"
| | | end location 27;
| | | begin location 28
| | | | kind : ASSIGNMENT;
| | | | *(_buf+_i) = _tmp[_i]; goto location 29;
| | | | | libmpi.c 260.32--260.52: "_buf[_i] = _tmp[_i];"
| | | end location 28;
| | | begin location 29
| | | | kind : ASSIGNMENT;
| | | | _i = _i+1; goto location 27;
| | | | | libmpi.c 260.26--260.30: "_i++"
| | | end location 29;
| | | begin location 30
| | | | kind : RETURN;
| | | | return 0; goto location 31;
| | | | | libmpi.c 261.2--261.11: "return 0;"
| | | end location 30;
| | | begin location 31
| | | | kind : TERMINAL;
| | | end location 31;
| | end function MPIX_Recv_int;
| | begin function MPI_Init
| | | | libmpi.c 101.0--101.37: "int MPI_Init(int *argc, char ***argv)"
| | | begin formal parameters
| | | | argc : pointer(5)<int>;
| | | | | libmpi.c 101.13--101.22: "int *argc"
| | | | argv : pointer(8)<pointer(6)<pointer(7)<char>>>;
| | | | | libmpi.c 101.24--101.36: "char ***argv"
| | | end formal parameters;
| | | start location : 0;
| | | begin location 0
| | | | kind : ASSERTION;
| | | | assert MPIX_State==MPIX_UNINITIALIZED; Attempt to call MPI_Init when MPI is already initialized goto location 1;
| | | | | libmpi.c 102.15--102.115: "assert MPIX_State == MPIX_UNINITIALIZED, "Attempt to call MPI_Init when MPI is already initialized";"
| | | end location 0;
| | | begin location 1
| | | | kind : ASSIGNMENT;
| | | | MPIX_State = MPIX_INITIALIZED; goto location 2;
| | | | | libmpi.c 103.2--103.32: "MPIX_State = MPIX_INITIALIZED;"
| | | end location 1;
| | | begin location 2
| | | | kind : RETURN;
| | | | return 0; goto location 3;
| | | | | libmpi.c 104.2--104.11: "return 0;"
| | | end location 2;
| | | begin location 3
| | | | kind : TERMINAL;
| | | end location 3;
| | end function MPI_Init;
| | begin function MPI_Comm_size
| | | | libmpi.c 121.0--121.45: "int MPI_Comm_size(MPI_Comm _comm, int *_size)"
| | | begin formal parameters
| | | | _comm : int;
| | | | | libmpi.c 121.18--121.32: "MPI_Comm _comm"
| | | | _size : pointer(5)<int>;
| | | | | libmpi.c 121.34--121.44: "int *_size"
| | | end formal parameters;
| | | start location : 0;
| | | begin location 0
| | | | kind : ASSERTION;
| | | | assert MPIX_State==MPIX_INITIALIZED; Attempt to call MPI_Comm_size when MPI is not initialized goto location 1;
| | | | | libmpi.c 122.15--122.114: "assert MPIX_State == MPIX_INITIALIZED, "Attempt to call MPI_Comm_size when MPI is not initialized";"
| | | end location 0;
| | | begin location 1
| | | | kind : ASSERTION;
| | | | assert _comm==MPI_COMM_WORLD;  goto location 2;
| | | | | libmpi.c 124.15--124.46: "assert _comm == MPI_COMM_WORLD;"
| | | end location 1;
| | | begin location 2
| | | | kind : ASSIGNMENT;
| | | | *_size = 5; goto location 3;
| | | | | libmpi.c 125.2--125.18: "*_size = NPROCS;"
| | | end location 2;
| | | begin location 3
| | | | kind : RETURN;
| | | | return 0; goto location 4;
| | | | | libmpi.c 126.2--126.11: "return 0;"
| | | end location 3;
| | | begin location 4
| | | | kind : TERMINAL;
| | | end location 4;
| | end function MPI_Comm_size;
| | begin function MPI_Comm_rank
| | | | libmpi.c 113.0--113.45: "int MPI_Comm_rank(MPI_Comm _comm, int *_rank)"
| | | begin formal parameters
| | | | _comm : int;
| | | | | libmpi.c 113.18--113.32: "MPI_Comm _comm"
| | | | _rank : pointer(5)<int>;
| | | | | libmpi.c 113.34--113.44: "int *_rank"
| | | end formal parameters;
| | | start location : 0;
| | | begin location 0
| | | | kind : ASSERTION;
| | | | assert MPIX_State==MPIX_INITIALIZED; Attempt to call MPI_Comm_rank when MPI is not initialized goto location 1;
| | | | | libmpi.c 114.15--114.114: "assert MPIX_State == MPIX_INITIALIZED, "Attempt to call MPI_Comm_rank when MPI is not initialized";"
| | | end location 0;
| | | begin location 1
| | | | kind : ASSERTION;
| | | | assert _comm==MPI_COMM_WORLD;  goto location 2;
| | | | | libmpi.c 116.15--116.46: "assert _comm == MPI_COMM_WORLD;"
| | | end location 1;
| | | begin location 2
| | | | kind : ASSIGNMENT;
| | | | *_rank = 2; goto location 3;
| | | | | libmpi.c 117.2--117.15: "*_rank = PID;"
| | | end location 2;
| | | begin location 3
| | | | kind : RETURN;
| | | | return 0; goto location 4;
| | | | | libmpi.c 118.2--118.11: "return 0;"
| | | end location 3;
| | | begin location 4
| | | | kind : TERMINAL;
| | | end location 4;
| | end function MPI_Comm_rank;
| | begin function MPI_Finalize
| | | | libmpi.c 107.0--107.18: "int MPI_Finalize()"
| | | start location : 0;
| | | begin location 0
| | | | kind : ASSERTION;
| | | | assert MPIX_State==MPIX_INITIALIZED; Attempt to call MPI_Finalize when MPI is not initialized goto location 1;
| | | | | libmpi.c 108.15--108.113: "assert MPIX_State == MPIX_INITIALIZED, "Attempt to call MPI_Finalize when MPI is not initialized";"
| | | end location 0;
| | | begin location 1
| | | | kind : ASSIGNMENT;
| | | | MPIX_State = MPIX_FINALIZED; goto location 2;
| | | | | libmpi.c 109.2--109.30: "MPIX_State = MPIX_FINALIZED;"
| | | end location 1;
| | | begin location 2
| | | | kind : RETURN;
| | | | return 0; goto location 3;
| | | | | libmpi.c 110.2--110.11: "return 0;"
| | | end location 2;
| | | begin location 3
| | | | kind : TERMINAL;
| | | end location 3;
| | end function MPI_Finalize;
| end process 2;
| begin process 3
| | main function : main;
| | begin process variables
| | | MPI_REQUEST_NULL : pointer(1)<Record[MPIX_Comm_Record; id:int]>;
| | | | libmpi.c 85.0--85.55: "MPI_Request MPI_REQUEST_NULL = (MPIX_Comm_Record*)NULL;"
| | | MPI_STATUS_IGNORE : pointer(2)<Record[MPI_Status; MPI_SOURCE:int, MPI_TAG:int, SIZE:int]>;
| | | | libmpi.c 89.0--89.50: "MPI_Status *MPI_STATUS_IGNORE = (MPI_Status*)NULL;"
| | | MPIX_State : int;
| | | | libmpi.c 94.0--94.19: "int MPIX_State = 0;"
| | | nprocs : int;
| | | | diffusion_par_bad.c 22.0--22.11: "int nprocs;"
| | | myrank : int;
| | | | diffusion_par_bad.c 23.0--23.11: "int myrank;"
| | | left : int;
| | | | diffusion_par_bad.c 24.0--24.9: "int left;"
| | | right : int;
| | | | diffusion_par_bad.c 25.0--25.10: "int right;"
| | | nxl : int;
| | | | diffusion_par_bad.c 26.0--26.8: "int nxl;"
| | | first : int;
| | | | diffusion_par_bad.c 27.0--27.10: "int first;"
| | | start : int;
| | | | diffusion_par_bad.c 28.0--28.10: "int start;"
| | | stop : int;
| | | | diffusion_par_bad.c 29.0--29.9: "int stop;"
| | | buf : pointer(3)<real>;
| | | | diffusion_par_bad.c 30.0--30.12: "double* buf;"
| | | v : pointer(3)<real>;
| | | | diffusion_par_bad.c 31.0--31.10: "double* v;"
| | | v_new : pointer(3)<real>;
| | | | diffusion_par_bad.c 32.0--32.14: "double* v_new;"
| | end process variables;
| | begin function owner
| | | | diffusion_par_bad.c 34.0--34.20: "int owner(int index)"
| | | begin formal parameters
| | | | index : int;
| | | | | diffusion_par_bad.c 34.10--34.19: "int index"
| | | end formal parameters;
| | | start location : 0;
| | | begin location 0
| | | | kind : RETURN;
| | | | return ((nprocs*(index+1))-1)/nx; goto location 1;
| | | | | diffusion_par_bad.c 34.23--34.54: "return (nprocs*(index+1)-1)/nx;"
| | | end location 0;
| | | begin location 1
| | | | kind : TERMINAL;
| | | end location 1;
| | end function owner;
| | begin function firstForProc
| | | | diffusion_par_bad.c 36.0--36.26: "int firstForProc(int rank)"
| | | begin formal parameters
| | | | rank : int;
| | | | | diffusion_par_bad.c 36.17--36.25: "int rank"
| | | end formal parameters;
| | | start location : 0;
| | | begin location 0
| | | | kind : RETURN;
| | | | return (rank*nx)/nprocs; goto location 1;
| | | | | diffusion_par_bad.c 36.29--36.53: "return (rank*nx)/nprocs;"
| | | end location 0;
| | | begin location 1
| | | | kind : TERMINAL;
| | | end location 1;
| | end function firstForProc;
| | begin function countForProc
| | | | diffusion_par_bad.c 38.0--38.26: "int countForProc(int rank)"
| | | begin formal parameters
| | | | rank : int;
| | | | | diffusion_par_bad.c 38.17--38.25: "int rank"
| | | end formal parameters;
| | | begin proper local variables
| | | | a : int;
| | | | | diffusion_par_bad.c 39.1--39.7: "int a;"
| | | | b : int;
| | | | | diffusion_par_bad.c 40.1--40.7: "int b;"
| | | end proper local variables;
| | | start location : 0;
| | | begin location 0
| | | | kind : INVOCATION;
| | | | a = firstForProc(rank+1); goto location 1;
| | | | | diffusion_par_bad.c 42.1--42.26: "a = firstForProc(rank+1);"
| | | end location 0;
| | | begin location 1
| | | | kind : INVOCATION;
| | | | b = firstForProc(rank); goto location 2;
| | | | | diffusion_par_bad.c 43.1--43.24: "b = firstForProc(rank);"
| | | end location 1;
| | | begin location 2
| | | | kind : RETURN;
| | | | return a-b; goto location 3;
| | | | | diffusion_par_bad.c 44.1--44.12: "return a-b;"
| | | end location 2;
| | | begin location 3
| | | | kind : TERMINAL;
| | | end location 3;
| | end function countForProc;
| | begin function init
| | | | diffusion_par_bad.c 48.0--48.11: "void init()"
| | | begin proper local variables
| | | | i : int;
| | | | | diffusion_par_bad.c 49.1--49.7: "int i;"
| | | | owner : int;
| | | | | diffusion_par_bad.c 50.1--50.11: "int owner;"
| | | | bufSize : int;
| | | | | diffusion_par_bad.c 51.1--51.13: "int bufSize;"
| | | end proper local variables;
| | | start location : 0;
| | | begin location 0
| | | | kind : ASSIGNMENT;
| | | | i = 0; goto location 1;
| | | | | diffusion_par_bad.c 53.6--53.9: "i=0"
| | | end location 0;
| | | begin location 1
| | | | kind : CHOICE;
| | | | when i < nx goto location 2;
| | | | | diffusion_par_bad.c 53.1--53.21: "for (i=0; i<nx; i++)"
| | | | when !i < nx goto location 3;
| | | | | diffusion_par_bad.c 53.1--53.21: "for (i=0; i<nx; i++)"
| | | end location 1;
| | | begin location 2
| | | | kind : ASSIGNMENT;
| | | | i = i+1; goto location 1;
| | | | | diffusion_par_bad.c 53.17--53.20: "i++"
| | | end location 2;
| | | begin location 3
| | | | kind : ASSIGNMENT;
| | | | left = myrank-1; goto location 4;
| | | | | diffusion_par_bad.c 54.1--54.17: "left = myrank-1;"
| | | end location 3;
| | | begin location 4
| | | | kind : ASSIGNMENT;
| | | | right = myrank+1; goto location 5;
| | | | | diffusion_par_bad.c 55.1--55.18: "right = myrank+1;"
| | | end location 4;
| | | begin location 5
| | | | kind : INVOCATION;
| | | | first = firstForProc(myrank); goto location 6;
| | | | | diffusion_par_bad.c 56.1--56.30: "first = firstForProc(myrank);"
| | | end location 5;
| | | begin location 6
| | | | kind : INVOCATION;
| | | | nxl = countForProc(myrank); goto location 7;
| | | | | diffusion_par_bad.c 57.1--57.28: "nxl = countForProc(myrank);"
| | | end location 6;
| | | begin location 7
| | | | kind : ASSIGNMENT;
| | | | bufSize = nx/nprocs; goto location 8;
| | | | | diffusion_par_bad.c 58.1--58.21: "bufSize = nx/nprocs;"
| | | end location 7;
| | | begin location 8
| | | | kind : ASSIGNMENT;
| | | | bufSize = bufSize+1; goto location 9;
| | | | | diffusion_par_bad.c 59.27--59.37: "bufSize++;"
| | | end location 8;
| | | begin location 9
| | | | kind : ALLOCATE;
| | | | buf = (real*) malloc(bufSize*sizeof(real)); goto location 10;
| | | | | diffusion_par_bad.c 60.1--60.51: "buf = (double *) malloc(bufSize * sizeof(double));"
| | | end location 9;
| | | begin location 10
| | | | kind : ALLOCATE;
| | | | v = (real*) malloc((nxl+2)*sizeof(real)); goto location 11;
| | | | | diffusion_par_bad.c 61.1--61.51: "v = (double *) malloc((nxl + 2) * sizeof(double));"
| | | end location 10;
| | | begin location 11
| | | | kind : ALLOCATE;
| | | | v_new = (real*) malloc((nxl+2)*sizeof(real)); goto location 12;
| | | | | diffusion_par_bad.c 62.1--62.55: "v_new = (double *) malloc((nxl + 2) * sizeof(double));"
| | | end location 11;
| | | begin location 12
| | | | kind : ASSIGNMENT;
| | | | i = 1; goto location 13;
| | | | | diffusion_par_bad.c 63.6--63.9: "i=1"
| | | end location 12;
| | | begin location 13
| | | | kind : CHOICE;
| | | | when i <= nxl goto location 14;
| | | | | diffusion_par_bad.c 63.1--63.23: "for (i=1; i<=nxl; i++)"
| | | | when !i <= nxl goto location 16;
| | | | | diffusion_par_bad.c 63.1--63.23: "for (i=1; i<=nxl; i++)"
| | | end location 13;
| | | begin location 14
| | | | kind : ASSIGNMENT;
| | | | *(v+i) = u0[(first+i)-1]; goto location 15;
| | | | | diffusion_par_bad.c 63.24--63.45: "v[i] = u0[first+i-1];"
| | | end location 14;
| | | begin location 15
| | | | kind : ASSIGNMENT;
| | | | i = i+1; goto location 13;
| | | | | diffusion_par_bad.c 63.19--63.22: "i++"
| | | end location 15;
| | | begin location 16
| | | | kind : INVOCATION;
| | | | owner = owner(0); goto location 17;
| | | | | diffusion_par_bad.c 64.1--64.18: "owner = owner(0);"
| | | end location 16;
| | | begin location 17
| | | | kind : CHOICE;
| | | | when myrank==owner goto location 18;
| | | | | diffusion_par_bad.c 65.1--65.21: "if (myrank == owner)"
| | | | when !(myrank==owner) goto location 19;
| | | | | diffusion_par_bad.c 65.1--65.21: "if (myrank == owner)"
| | | end location 17;
| | | begin location 18
| | | | kind : ASSIGNMENT;
| | | | start = 2; goto location 20;
| | | | | diffusion_par_bad.c 65.22--65.30: "start=2;"
| | | end location 18;
| | | begin location 19
| | | | kind : ASSIGNMENT;
| | | | start = 1; goto location 20;
| | | | | diffusion_par_bad.c 65.36--65.44: "start=1;"
| | | end location 19;
| | | begin location 20
| | | | kind : INVOCATION;
| | | | owner = owner(nx-1); goto location 21;
| | | | | diffusion_par_bad.c 66.1--66.21: "owner = owner(nx-1);"
| | | end location 20;
| | | begin location 21
| | | | kind : CHOICE;
| | | | when myrank==owner goto location 22;
| | | | | diffusion_par_bad.c 67.1--67.21: "if (myrank == owner)"
| | | | when !(myrank==owner) goto location 23;
| | | | | diffusion_par_bad.c 67.1--67.21: "if (myrank == owner)"
| | | end location 21;
| | | begin location 22
| | | | kind : ASSIGNMENT;
| | | | stop = nxl-1; goto location 24;
| | | | | diffusion_par_bad.c 67.22--67.33: "stop=nxl-1;"
| | | end location 22;
| | | begin location 23
| | | | kind : ASSIGNMENT;
| | | | stop = nxl; goto location 24;
| | | | | diffusion_par_bad.c 67.39--67.48: "stop=nxl;"
| | | end location 23;
| | | begin location 24
| | | | kind : RETURN;
| | | | return null; goto location 25;
| | | | | diffusion_par_bad.c 68.0--68.0: "}"
| | | end location 24;
| | | begin location 25
| | | | kind : TERMINAL;
| | | end location 25;
| | end function init;
| | begin function cleanup
| | | | diffusion_par_bad.c 70.0--70.14: "void cleanup()"
| | | start location : 0;
| | | begin location 0
| | | | kind : INVOCATION;
| | | | free(buf); goto location 1;
| | | | | diffusion_par_bad.c 71.1--71.11: "free(buf);"
| | | end location 0;
| | | begin location 1
| | | | kind : INVOCATION;
| | | | free(v); goto location 2;
| | | | | diffusion_par_bad.c 72.1--72.9: "free(v);"
| | | end location 1;
| | | begin location 2
| | | | kind : INVOCATION;
| | | | free(v_new); goto location 3;
| | | | | diffusion_par_bad.c 73.1--73.13: "free(v_new);"
| | | end location 2;
| | | begin location 3
| | | | kind : RETURN;
| | | | return null; goto location 4;
| | | | | diffusion_par_bad.c 74.0--74.0: "}"
| | | end location 3;
| | | begin location 4
| | | | kind : TERMINAL;
| | | end location 4;
| | end function cleanup;
| | begin function write
| | | | diffusion_par_bad.c 76.0--76.20: "void write(int time)"
| | | begin formal parameters
| | | | time : int;
| | | | | diffusion_par_bad.c 76.11--76.19: "int time"
| | | end formal parameters;
| | | begin proper local variables
| | | | source : int;
| | | | | diffusion_par_bad.c 77.1--77.12: "int source;"
| | | | i : int;
| | | | | diffusion_par_bad.c 78.1--78.7: "int i;"
| | | | j : int;
| | | | | diffusion_par_bad.c 79.1--79.7: "int j;"
| | | | count : int;
| | | | | diffusion_par_bad.c 80.1--80.11: "int count;"
| | | end proper local variables;
| | | start location : 0;
| | | begin location 0
| | | | kind : CHOICE;
| | | | when !(myrank==0) goto location 1;
| | | | | diffusion_par_bad.c 82.1--82.17: "if (myrank != 0)"
| | | | when !!(myrank==0) goto location 2;
| | | | | diffusion_par_bad.c 82.1--82.17: "if (myrank != 0)"
| | | end location 0;
| | | begin location 1
| | | | kind : INVOCATION;
| | | | MPI_Send(v+1,nxl,MPI_DOUBLE,0,0,MPI_COMM_WORLD); goto location 18;
| | | | | diffusion_par_bad.c 83.2--83.55: "MPI_Send(v+1, nxl, MPI_DOUBLE, 0, 0, MPI_COMM_WORLD);"
| | | end location 1;
| | | begin location 2
| | | | kind : ASSIGNMENT;
| | | | j = 0; goto location 3;
| | | | | diffusion_par_bad.c 85.2--85.6: "j=0;"
| | | end location 2;
| | | begin location 3
| | | | kind : ASSIGNMENT;
| | | | source = 0; goto location 4;
| | | | | diffusion_par_bad.c 86.7--86.15: "source=0"
| | | end location 3;
| | | begin location 4
| | | | kind : CHOICE;
| | | | when source < nprocs goto location 5;
| | | | | diffusion_par_bad.c 86.2--86.41: "for (source=0; source<nprocs; source++)"
| | | | when !source < nprocs goto location 18;
| | | | | diffusion_par_bad.c 86.2--86.41: "for (source=0; source<nprocs; source++)"
| | | end location 4;
| | | begin location 5
| | | | kind : INVOCATION;
| | | | count = countForProc(source); goto location 6;
| | | | | diffusion_par_bad.c 87.3--87.32: "count = countForProc(source);"
| | | end location 5;
| | | begin location 6
| | | | kind : CHOICE;
| | | | when !(source==0) goto location 7;
| | | | | diffusion_par_bad.c 88.3--88.19: "if (source != 0)"
| | | | when !!(source==0) goto location 8;
| | | | | diffusion_par_bad.c 88.3--88.19: "if (source != 0)"
| | | end location 6;
| | | begin location 7
| | | | kind : INVOCATION;
| | | | MPI_Recv(buf,count,MPI_DOUBLE,source,0,MPI_COMM_WORLD,MPI_STATUS_IGNORE); goto location 12;
| | | | | diffusion_par_bad.c 89.4--89.83: "MPI_Recv(buf, count, MPI_DOUBLE, source, 0, MPI_COMM_WORLD, MPI_STATUS_IGNORE);"
| | | end location 7;
| | | begin location 8
| | | | kind : ASSIGNMENT;
| | | | i = 0; goto location 9;
| | | | | diffusion_par_bad.c 91.9--91.12: "i=0"
| | | end location 8;
| | | begin location 9
| | | | kind : CHOICE;
| | | | when i < count goto location 10;
| | | | | diffusion_par_bad.c 91.4--91.27: "for (i=0; i<count; i++)"
| | | | when !i < count goto location 12;
| | | | | diffusion_par_bad.c 91.4--91.27: "for (i=0; i<count; i++)"
| | | end location 9;
| | | begin location 10
| | | | kind : ASSIGNMENT;
| | | | *(buf+i) = *(v+(i+1)); goto location 11;
| | | | | diffusion_par_bad.c 91.28--91.44: "buf[i] = v[i+1];"
| | | end location 10;
| | | begin location 11
| | | | kind : ASSIGNMENT;
| | | | i = i+1; goto location 9;
| | | | | diffusion_par_bad.c 91.23--91.26: "i++"
| | | end location 11;
| | | begin location 12
| | | | kind : ASSIGNMENT;
| | | | i = 0; goto location 13;
| | | | | diffusion_par_bad.c 92.8--92.11: "i=0"
| | | end location 12;
| | | begin location 13
| | | | kind : CHOICE;
| | | | when i < count goto location 14;
| | | | | diffusion_par_bad.c 92.3--92.26: "for (i=0; i<count; i++)"
| | | | when !i < count goto location 17;
| | | | | diffusion_par_bad.c 92.3--92.26: "for (i=0; i<count; i++)"
| | | end location 13;
| | | begin location 14
| | | | kind : ASSIGNMENT;
| | | | data[time][j] = *(buf+i); goto location 15;
| | | | | diffusion_par_bad.c 93.4--93.27: "data[time][j] = buf[i];"
| | | end location 14;
| | | begin location 15
| | | | kind : ASSIGNMENT;
| | | | j = j+1; goto location 16;
| | | | | diffusion_par_bad.c 94.4--94.8: "j++;"
| | | end location 15;
| | | begin location 16
| | | | kind : ASSIGNMENT;
| | | | i = i+1; goto location 13;
| | | | | diffusion_par_bad.c 92.22--92.25: "i++"
| | | end location 16;
| | | begin location 17
| | | | kind : ASSIGNMENT;
| | | | source = source+1; goto location 4;
| | | | | diffusion_par_bad.c 86.32--86.40: "source++"
| | | end location 17;
| | | begin location 18
| | | | kind : RETURN;
| | | | return null; goto location 19;
| | | | | diffusion_par_bad.c 98.0--98.0: "}"
| | | end location 18;
| | | begin location 19
| | | | kind : TERMINAL;
| | | end location 19;
| | end function write;
| | begin function exchange_ghost_cells
| | | | diffusion_par_bad.c 101.0--101.27: "void exchange_ghost_cells()"
| | | start location : 0;
| | | begin location 0
| | | | kind : CHOICE;
| | | | when 0 <= left goto location 1;
| | | | | diffusion_par_bad.c 102.1--102.15: "if (left >= 0)"
| | | | when !0 <= left goto location 2;
| | | | | diffusion_par_bad.c 102.1--102.15: "if (left >= 0)"
| | | end location 0;
| | | begin location 1
| | | | kind : INVOCATION;
| | | | MPI_Send(v+1,1,MPI_DOUBLE,left,0,MPI_COMM_WORLD); goto location 2;
| | | | | diffusion_par_bad.c 102.16--102.70: "MPI_Send(v+1, 1, MPI_DOUBLE, left, 0, MPI_COMM_WORLD);"
| | | end location 1;
| | | begin location 2
| | | | kind : CHOICE;
| | | | when right < nprocs goto location 3;
| | | | | diffusion_par_bad.c 103.1--103.20: "if (right < nprocs)"
| | | | when !right < nprocs goto location 5;
| | | | | diffusion_par_bad.c 103.1--103.20: "if (right < nprocs)"
| | | end location 2;
| | | begin location 3
| | | | kind : INVOCATION;
| | | | MPI_Recv(v+(nxl+1),1,MPI_DOUBLE,right,0,MPI_COMM_WORLD,MPI_STATUS_IGNORE); goto location 4;
| | | | | diffusion_par_bad.c 104.2--104.82: "MPI_Recv(v+(nxl+1), 1, MPI_DOUBLE, right, 0, MPI_COMM_WORLD, MPI_STATUS_IGNORE);"
| | | end location 3;
| | | begin location 4
| | | | kind : INVOCATION;
| | | | MPI_Send(v+nxl,1,MPI_DOUBLE,right,0,MPI_COMM_WORLD); goto location 5;
| | | | | diffusion_par_bad.c 105.2--105.59: "MPI_Send(v+nxl, 1, MPI_DOUBLE, right, 0, MPI_COMM_WORLD);"
| | | end location 4;
| | | begin location 5
| | | | kind : CHOICE;
| | | | when 0 <= left goto location 6;
| | | | | diffusion_par_bad.c 107.1--107.15: "if (left >= 0)"
| | | | when !0 <= left goto location 7;
| | | | | diffusion_par_bad.c 107.1--107.15: "if (left >= 0)"
| | | end location 5;
| | | begin location 6
| | | | kind : INVOCATION;
| | | | MPI_Recv(v,1,MPI_DOUBLE,left,0,MPI_COMM_WORLD,MPI_STATUS_IGNORE); goto location 7;
| | | | | diffusion_par_bad.c 107.16--107.87: "MPI_Recv(v, 1, MPI_DOUBLE, left, 0, MPI_COMM_WORLD, MPI_STATUS_IGNORE);"
| | | end location 6;
| | | begin location 7
| | | | kind : RETURN;
| | | | return null; goto location 8;
| | | | | diffusion_par_bad.c 108.0--108.0: "}"
| | | end location 7;
| | | begin location 8
| | | | kind : TERMINAL;
| | | end location 8;
| | end function exchange_ghost_cells;
| | begin function update
| | | | diffusion_par_bad.c 112.0--112.13: "void update()"
| | | begin proper local variables
| | | | i : int;
| | | | | diffusion_par_bad.c 113.1--113.7: "int i;"
| | | end proper local variables;
| | | start location : 0;
| | | begin location 0
| | | | kind : ASSIGNMENT;
| | | | i = start; goto location 1;
| | | | | diffusion_par_bad.c 115.6--115.13: "i=start"
| | | end location 0;
| | | begin location 1
| | | | kind : CHOICE;
| | | | when i <= stop goto location 2;
| | | | | diffusion_par_bad.c 115.1--115.28: "for (i=start; i<=stop; i++)"
| | | | when !i <= stop goto location 4;
| | | | | diffusion_par_bad.c 115.1--115.28: "for (i=start; i<=stop; i++)"
| | | end location 1;
| | | begin location 2
| | | | kind : ASSIGNMENT;
| | | | *(v_new+i) = *(v+i)+(kappa*((*(v+(i+1))+*(v+(i-1)))-((real)2**(v+i)))); goto location 3;
| | | | | diffusion_par_bad.c 115.29--115.80: "v_new[i] = v[i] + kappa*(v[i+1] + v[i-1] - 2*v[i]);"
| | | end location 2;
| | | begin location 3
| | | | kind : ASSIGNMENT;
| | | | i = i+1; goto location 1;
| | | | | diffusion_par_bad.c 115.24--115.27: "i++"
| | | end location 3;
| | | begin location 4
| | | | kind : ASSIGNMENT;
| | | | i = start; goto location 5;
| | | | | diffusion_par_bad.c 116.6--116.13: "i=start"
| | | end location 4;
| | | begin location 5
| | | | kind : CHOICE;
| | | | when i <= stop goto location 6;
| | | | | diffusion_par_bad.c 116.1--116.28: "for (i=start; i<=stop; i++)"
| | | | when !i <= stop goto location 8;
| | | | | diffusion_par_bad.c 116.1--116.28: "for (i=start; i<=stop; i++)"
| | | end location 5;
| | | begin location 6
| | | | kind : ASSIGNMENT;
| | | | *(v+i) = *(v_new+i); goto location 7;
| | | | | diffusion_par_bad.c 116.29--116.45: "v[i] = v_new[i];"
| | | end location 6;
| | | begin location 7
| | | | kind : ASSIGNMENT;
| | | | i = i+1; goto location 5;
| | | | | diffusion_par_bad.c 116.24--116.27: "i++"
| | | end location 7;
| | | begin location 8
| | | | kind : RETURN;
| | | | return null; goto location 9;
| | | | | diffusion_par_bad.c 117.0--117.0: "}"
| | | end location 8;
| | | begin location 9
| | | | kind : TERMINAL;
| | | end location 9;
| | end function update;
| | begin function main
| | | | diffusion_par_bad.c 120.0--120.11: "void main()"
| | | begin proper local variables
| | | | argc : int;
| | | | | diffusion_par_bad.c 121.1--121.10: "int argc;"
| | | | argv : pointer(6)<pointer(7)<char>>;
| | | | | diffusion_par_bad.c 122.1--122.13: "char **argv;"
| | | | iter : int;
| | | | | diffusion_par_bad.c 123.1--123.10: "int iter;"
| | | end proper local variables;
| | | start location : 0;
| | | begin location 0
| | | | kind : INVOCATION;
| | | | MPI_Init(&argc,&argv); goto location 1;
| | | | | diffusion_par_bad.c 125.1--125.23: "MPI_Init(&argc,&argv);"
| | | end location 0;
| | | begin location 1
| | | | kind : INVOCATION;
| | | | MPI_Comm_size(MPI_COMM_WORLD,&nprocs); goto location 2;
| | | | | diffusion_par_bad.c 126.1--126.40: "MPI_Comm_size(MPI_COMM_WORLD, &nprocs);"
| | | end location 1;
| | | begin location 2
| | | | kind : INVOCATION;
| | | | MPI_Comm_rank(MPI_COMM_WORLD,&myrank); goto location 3;
| | | | | diffusion_par_bad.c 127.1--127.40: "MPI_Comm_rank(MPI_COMM_WORLD, &myrank);"
| | | end location 2;
| | | begin location 3
| | | | kind : INVOCATION;
| | | | init(); goto location 4;
| | | | | diffusion_par_bad.c 128.1--128.8: "init();"
| | | end location 3;
| | | begin location 4
| | | | kind : INVOCATION;
| | | | write(0); goto location 5;
| | | | | diffusion_par_bad.c 129.1--129.10: "write(0);"
| | | end location 4;
| | | begin location 5
| | | | kind : ASSIGNMENT;
| | | | iter = 1; goto location 6;
| | | | | diffusion_par_bad.c 130.6--130.14: "iter = 1"
| | | end location 5;
| | | begin location 6
| | | | kind : CHOICE;
| | | | when iter <= nsteps goto location 7;
| | | | | diffusion_par_bad.c 130.1--130.39: "for (iter = 1; iter <= nsteps; iter++)"
| | | | when !iter <= nsteps goto location 11;
| | | | | diffusion_par_bad.c 130.1--130.39: "for (iter = 1; iter <= nsteps; iter++)"
| | | end location 6;
| | | begin location 7
| | | | kind : INVOCATION;
| | | | exchange_ghost_cells(); goto location 8;
| | | | | diffusion_par_bad.c 131.2--131.25: "exchange_ghost_cells();"
| | | end location 7;
| | | begin location 8
| | | | kind : INVOCATION;
| | | | update(); goto location 9;
| | | | | diffusion_par_bad.c 132.2--132.11: "update();"
| | | end location 8;
| | | begin location 9
| | | | kind : INVOCATION;
| | | | write(iter); goto location 10;
| | | | | diffusion_par_bad.c 133.2--133.14: "write(iter);"
| | | end location 9;
| | | begin location 10
| | | | kind : ASSIGNMENT;
| | | | iter = iter+1; goto location 6;
| | | | | diffusion_par_bad.c 130.32--130.38: "iter++"
| | | end location 10;
| | | begin location 11
| | | | kind : INVOCATION;
| | | | cleanup(); goto location 12;
| | | | | diffusion_par_bad.c 135.1--135.11: "cleanup();"
| | | end location 11;
| | | begin location 12
| | | | kind : INVOCATION;
| | | | MPI_Finalize(); goto location 13;
| | | | | diffusion_par_bad.c 136.1--136.16: "MPI_Finalize();"
| | | end location 12;
| | | begin location 13
| | | | kind : RETURN;
| | | | return null; goto location 14;
| | | | | diffusion_par_bad.c 137.0--137.0: "}"
| | | end location 13;
| | | begin location 14
| | | | kind : TERMINAL;
| | | end location 14;
| | end function main;
| | begin function free
| | | | null
| | | begin formal parameters
| | | | pointer : pointer(4)<void>;
| | | | | null
| | | end formal parameters;
| | end function free;
| | begin function MPI_Send
| | | | libmpi.c 147.0--148.28: "int MPI_Send(void* _buf, int _count, MPI_Datatype _datatype, int _dest, int _tag,             MPI_Comm _comm)"
| | | begin formal parameters
| | | | _buf : pointer(4)<void>;
| | | | | libmpi.c 147.13--147.23: "void* _buf"
| | | | _count : int;
| | | | | libmpi.c 147.25--147.35: "int _count"
| | | | _datatype : int;
| | | | | libmpi.c 147.37--147.59: "MPI_Datatype _datatype"
| | | | _dest : int;
| | | | | libmpi.c 147.61--147.70: "int _dest"
| | | | _tag : int;
| | | | | libmpi.c 147.72--147.80: "int _tag"
| | | | _comm : int;
| | | | | libmpi.c 148.13--148.27: "MPI_Comm _comm"
| | | end formal parameters;
| | | begin proper local variables
| | | | _result : int;
| | | | | libmpi.c 149.2--149.14: "int _result;"
| | | end proper local variables;
| | | start location : 0;
| | | begin location 0
| | | | kind : ASSERTION;
| | | | assert MPIX_State==MPIX_INITIALIZED; Attempt to call MPI_Send when MPI is not initialized goto location 1;
| | | | | libmpi.c 151.15--151.109: "assert MPIX_State == MPIX_INITIALIZED, "Attempt to call MPI_Send when MPI is not initialized";"
| | | end location 0;
| | | begin location 1
| | | | kind : CHOICE;
| | | | when _dest==MPI_PROC_NULL goto location 2;
| | | | | libmpi.c 152.2--152.29: "if (_dest == MPI_PROC_NULL)"
| | | | when !(_dest==MPI_PROC_NULL) goto location 3;
| | | | | libmpi.c 152.2--152.29: "if (_dest == MPI_PROC_NULL)"
| | | end location 1;
| | | begin location 2
| | | | kind : RETURN;
| | | | return 0; goto location 3;
| | | | | libmpi.c 153.4--153.13: "return 0;"
| | | end location 2;
| | | begin location 3
| | | | kind : ASSERTION;
| | | | assert _comm==MPI_COMM_WORLD;  goto location 4;
| | | | | libmpi.c 154.15--154.46: "assert _comm == MPI_COMM_WORLD;"
| | | end location 3;
| | | begin location 4
| | | | kind : CHOICE;
| | | | when _datatype==MPI_DOUBLE goto location 5;
| | | | | libmpi.c 155.2--155.30: "if (_datatype == MPI_DOUBLE)"
| | | | when !(_datatype==MPI_DOUBLE) goto location 6;
| | | | | libmpi.c 155.2--155.30: "if (_datatype == MPI_DOUBLE)"
| | | end location 4;
| | | begin location 5
| | | | kind : INVOCATION;
| | | | _result = MPIX_Send_double((pointer(3)<real>)_buf,_count,_dest,_tag,_comm); goto location 9;
| | | | | libmpi.c 156.4--156.74: "_result = MPIX_Send_double((double*)_buf, _count, _dest, _tag, _comm);"
| | | end location 5;
| | | begin location 6
| | | | kind : CHOICE;
| | | | when _datatype==MPI_INT goto location 7;
| | | | | libmpi.c 157.7--157.32: "if (_datatype == MPI_INT)"
| | | | when !(_datatype==MPI_INT) goto location 8;
| | | | | libmpi.c 157.7--157.32: "if (_datatype == MPI_INT)"
| | | end location 6;
| | | begin location 7
| | | | kind : INVOCATION;
| | | | _result = MPIX_Send_int((pointer(5)<int>)_buf,_count,_dest,_tag,_comm); goto location 9;
| | | | | libmpi.c 158.4--158.68: "_result = MPIX_Send_int((int*)_buf, _count, _dest, _tag, _comm);"
| | | end location 7;
| | | begin location 8
| | | | kind : ASSERTION;
| | | | assert false; Currently only MPI_DOUBLE and MPI_INT supported goto location 9;
| | | | | libmpi.c 160.17--160.81: "assert false, "Currently only MPI_DOUBLE and MPI_INT supported";"
| | | end location 8;
| | | begin location 9
| | | | kind : RETURN;
| | | | return _result; goto location 10;
| | | | | libmpi.c 161.2--161.17: "return _result;"
| | | end location 9;
| | | begin location 10
| | | | kind : TERMINAL;
| | | end location 10;
| | end function MPI_Send;
| | begin function MPIX_Send_double
| | | | libmpi.c 164.0--164.83: "int MPIX_Send_double(double* _buf, int _count, int _dest, int _tag, MPI_Comm _comm)"
| | | begin formal parameters
| | | | _buf : pointer(3)<real>;
| | | | | libmpi.c 164.21--164.33: "double* _buf"
| | | | _count : int;
| | | | | libmpi.c 164.35--164.45: "int _count"
| | | | _dest : int;
| | | | | libmpi.c 164.47--164.56: "int _dest"
| | | | _tag : int;
| | | | | libmpi.c 164.58--164.66: "int _tag"
| | | | _comm : int;
| | | | | libmpi.c 164.68--164.82: "MPI_Comm _comm"
| | | end formal parameters;
| | | begin proper local variables
| | | | _tmp : real[_count];
| | | | | libmpi.c 165.2--165.22: "double _tmp[_count];"
| | | | _i : int;
| | | | | libmpi.c 166.2--166.9: "int _i;"
| | | end proper local variables;
| | | start location : 0;
| | | begin location 0
| | | | kind : ASSIGNMENT;
| | | | _i = 0; goto location 1;
| | | | | libmpi.c 168.7--168.11: "_i=0"
| | | end location 0;
| | | begin location 1
| | | | kind : CHOICE;
| | | | when _i < _count goto location 2;
| | | | | libmpi.c 168.2--168.29: "for (_i=0; _i<_count; _i++)"
| | | | when !_i < _count goto location 4;
| | | | | libmpi.c 168.2--168.29: "for (_i=0; _i<_count; _i++)"
| | | end location 1;
| | | begin location 2
| | | | kind : ASSIGNMENT;
| | | | _tmp[_i] = *(_buf+_i); goto location 3;
| | | | | libmpi.c 168.30--168.50: "_tmp[_i] = _buf[_i];"
| | | end location 2;
| | | begin location 3
| | | | kind : ASSIGNMENT;
| | | | _i = _i+1; goto location 1;
| | | | | libmpi.c 168.24--168.28: "_i++"
| | | end location 3;
| | | begin location 4
| | | | kind : SEND;
| | | | send(_tmp,_dest,_tag); goto location 5;
| | | | | libmpi.c 169.2--169.26: "send(_tmp, _dest, _tag);"
| | | end location 4;
| | | begin location 5
| | | | kind : RETURN;
| | | | return 0; goto location 6;
| | | | | libmpi.c 170.2--170.11: "return 0;"
| | | end location 5;
| | | begin location 6
| | | | kind : TERMINAL;
| | | end location 6;
| | end function MPIX_Send_double;
| | begin function MPIX_Send_int
| | | | libmpi.c 173.0--173.77: "int MPIX_Send_int(int* _buf, int _count, int _dest, int _tag, MPI_Comm _comm)"
| | | begin formal parameters
| | | | _buf : pointer(5)<int>;
| | | | | libmpi.c 173.18--173.27: "int* _buf"
| | | | _count : int;
| | | | | libmpi.c 173.29--173.39: "int _count"
| | | | _dest : int;
| | | | | libmpi.c 173.41--173.50: "int _dest"
| | | | _tag : int;
| | | | | libmpi.c 173.52--173.60: "int _tag"
| | | | _comm : int;
| | | | | libmpi.c 173.62--173.76: "MPI_Comm _comm"
| | | end formal parameters;
| | | begin proper local variables
| | | | _tmp : int[_count];
| | | | | libmpi.c 174.2--174.19: "int _tmp[_count];"
| | | | _i : int;
| | | | | libmpi.c 175.2--175.9: "int _i;"
| | | end proper local variables;
| | | start location : 0;
| | | begin location 0
| | | | kind : ASSIGNMENT;
| | | | _i = 0; goto location 1;
| | | | | libmpi.c 177.7--177.11: "_i=0"
| | | end location 0;
| | | begin location 1
| | | | kind : CHOICE;
| | | | when _i < _count goto location 2;
| | | | | libmpi.c 177.2--177.29: "for (_i=0; _i<_count; _i++)"
| | | | when !_i < _count goto location 4;
| | | | | libmpi.c 177.2--177.29: "for (_i=0; _i<_count; _i++)"
| | | end location 1;
| | | begin location 2
| | | | kind : ASSIGNMENT;
| | | | _tmp[_i] = *(_buf+_i); goto location 3;
| | | | | libmpi.c 177.30--177.50: "_tmp[_i] = _buf[_i];"
| | | end location 2;
| | | begin location 3
| | | | kind : ASSIGNMENT;
| | | | _i = _i+1; goto location 1;
| | | | | libmpi.c 177.24--177.28: "_i++"
| | | end location 3;
| | | begin location 4
| | | | kind : SEND;
| | | | send(_tmp,_dest,_tag); goto location 5;
| | | | | libmpi.c 178.2--178.26: "send(_tmp, _dest, _tag);"
| | | end location 4;
| | | begin location 5
| | | | kind : RETURN;
| | | | return 0; goto location 6;
| | | | | libmpi.c 179.2--179.11: "return 0;"
| | | end location 5;
| | | begin location 6
| | | | kind : TERMINAL;
| | | end location 6;
| | end function MPIX_Send_int;
| | begin function MPI_Recv
| | | | libmpi.c 183.0--184.49: "int MPI_Recv(void* _buf, int _count, MPI_Datatype _datatype, int _source, int _tag,             MPI_Comm _comm, MPI_Status *_status)"
| | | begin formal parameters
| | | | _buf : pointer(4)<void>;
| | | | | libmpi.c 183.13--183.23: "void* _buf"
| | | | _count : int;
| | | | | libmpi.c 183.25--183.35: "int _count"
| | | | _datatype : int;
| | | | | libmpi.c 183.37--183.59: "MPI_Datatype _datatype"
| | | | _source : int;
| | | | | libmpi.c 183.61--183.72: "int _source"
| | | | _tag : int;
| | | | | libmpi.c 183.74--183.82: "int _tag"
| | | | _comm : int;
| | | | | libmpi.c 184.13--184.27: "MPI_Comm _comm"
| | | | _status : pointer(2)<Record[MPI_Status; MPI_SOURCE:int, MPI_TAG:int, SIZE:int]>;
| | | | | libmpi.c 184.29--184.48: "MPI_Status *_status"
| | | end formal parameters;
| | | begin proper local variables
| | | | _result : int;
| | | | | libmpi.c 185.2--185.14: "int _result;"
| | | end proper local variables;
| | | start location : 0;
| | | begin location 0
| | | | kind : ASSERTION;
| | | | assert MPIX_State==MPIX_INITIALIZED; Attempt to call MPI_Recv when MPI is not initialized goto location 1;
| | | | | libmpi.c 187.15--187.109: "assert MPIX_State == MPIX_INITIALIZED, "Attempt to call MPI_Recv when MPI is not initialized";"
| | | end location 0;
| | | begin location 1
| | | | kind : CHOICE;
| | | | when _source==MPI_PROC_NULL goto location 2;
| | | | | libmpi.c 188.3--188.32: "if (_source == MPI_PROC_NULL)"
| | | | when !(_source==MPI_PROC_NULL) goto location 3;
| | | | | libmpi.c 188.3--188.32: "if (_source == MPI_PROC_NULL)"
| | | end location 1;
| | | begin location 2
| | | | kind : RETURN;
| | | | return 0; goto location 3;
| | | | | libmpi.c 189.4--189.13: "return 0;"
| | | end location 2;
| | | begin location 3
| | | | kind : ASSERTION;
| | | | assert _comm==MPI_COMM_WORLD;  goto location 4;
| | | | | libmpi.c 190.15--190.46: "assert _comm == MPI_COMM_WORLD;"
| | | end location 3;
| | | begin location 4
| | | | kind : CHOICE;
| | | | when _datatype==MPI_DOUBLE goto location 5;
| | | | | libmpi.c 191.2--191.30: "if (_datatype == MPI_DOUBLE)"
| | | | when !(_datatype==MPI_DOUBLE) goto location 6;
| | | | | libmpi.c 191.2--191.30: "if (_datatype == MPI_DOUBLE)"
| | | end location 4;
| | | begin location 5
| | | | kind : INVOCATION;
| | | | _result = MPIX_Recv_double((pointer(3)<real>)_buf,_count,_source,_tag,_comm,_status); goto location 9;
| | | | | libmpi.c 192.4--192.85: "_result = MPIX_Recv_double((double*)_buf, _count, _source, _tag, _comm, _status);"
| | | end location 5;
| | | begin location 6
| | | | kind : CHOICE;
| | | | when _datatype==MPI_INT goto location 7;
| | | | | libmpi.c 193.7--193.32: "if (_datatype == MPI_INT)"
| | | | when !(_datatype==MPI_INT) goto location 8;
| | | | | libmpi.c 193.7--193.32: "if (_datatype == MPI_INT)"
| | | end location 6;
| | | begin location 7
| | | | kind : INVOCATION;
| | | | _result = MPIX_Recv_int((pointer(5)<int>)_buf,_count,_source,_tag,_comm,_status); goto location 9;
| | | | | libmpi.c 194.4--194.79: "_result = MPIX_Recv_int((int*)_buf, _count, _source, _tag, _comm, _status);"
| | | end location 7;
| | | begin location 8
| | | | kind : ASSERTION;
| | | | assert false;  goto location 9;
| | | | | libmpi.c 196.17--196.30: "assert false;"
| | | end location 8;
| | | begin location 9
| | | | kind : RETURN;
| | | | return _result; goto location 10;
| | | | | libmpi.c 197.2--197.17: "return _result;"
| | | end location 9;
| | | begin location 10
| | | | kind : TERMINAL;
| | | end location 10;
| | end function MPI_Recv;
| | begin function MPIX_Recv_double
| | | | libmpi.c 200.0--201.41: "int MPIX_Recv_double(double *_buf, int _count, int _source, int _tag, MPI_Comm _comm,                     MPI_Status *_status)"
| | | begin formal parameters
| | | | _buf : pointer(3)<real>;
| | | | | libmpi.c 200.21--200.33: "double *_buf"
| | | | _count : int;
| | | | | libmpi.c 200.35--200.45: "int _count"
| | | | _source : int;
| | | | | libmpi.c 200.47--200.58: "int _source"
| | | | _tag : int;
| | | | | libmpi.c 200.60--200.68: "int _tag"
| | | | _comm : int;
| | | | | libmpi.c 200.70--200.84: "MPI_Comm _comm"
| | | | _status : pointer(2)<Record[MPI_Status; MPI_SOURCE:int, MPI_TAG:int, SIZE:int]>;
| | | | | libmpi.c 201.21--201.40: "MPI_Status *_status"
| | | end formal parameters;
| | | begin proper local variables
| | | | _tmp : real[_count];
| | | | | libmpi.c 202.2--202.22: "double _tmp[_count];"
| | | | _i : int;
| | | | | libmpi.c 203.2--203.9: "int _i;"
| | | | thesource : int;
| | | | | libmpi.c 204.2--204.16: "int thesource;"
| | | | thetag : int;
| | | | | libmpi.c 205.2--205.13: "int thetag;"
| | | | thesize : int;
| | | | | libmpi.c 206.2--206.14: "int thesize;"
| | | | thecount : int;
| | | | | libmpi.c 207.2--207.15: "int thecount;"
| | | end proper local variables;
| | | start location : 0;
| | | begin location 0
| | | | kind : CHOICE;
| | | | when !(_source==MPI_ANY_SOURCE) && !(_tag==MPI_ANY_TAG) goto location 1;
| | | | | libmpi.c 209.2--209.55: "if (_source != MPI_ANY_SOURCE && _tag != MPI_ANY_TAG)"
| | | | when !(!(_source==MPI_ANY_SOURCE) && !(_tag==MPI_ANY_TAG)) goto location 4;
| | | | | libmpi.c 209.2--209.55: "if (_source != MPI_ANY_SOURCE && _tag != MPI_ANY_TAG)"
| | | end location 0;
| | | begin location 1
| | | | kind : RECEIVE;
| | | | recv(_tmp,_source,_tag, thesize); goto location 2;
| | | | | libmpi.c 210.4--210.39: "recv(_tmp, _source, _tag, thesize);"
| | | end location 1;
| | | begin location 2
| | | | kind : ASSIGNMENT;
| | | | thesource = _source; goto location 3;
| | | | | libmpi.c 211.4--211.24: "thesource = _source;"
| | | end location 2;
| | | begin location 3
| | | | kind : ASSIGNMENT;
| | | | thetag = _tag; goto location 21;
| | | | | libmpi.c 212.4--212.18: "thetag = _tag;"
| | | end location 3;
| | | begin location 4
| | | | kind : CHOICE;
| | | | when !(_source==MPI_ANY_SOURCE) && (_tag==MPI_ANY_TAG) goto location 5;
| | | | | libmpi.c 213.9--213.62: "if (_source != MPI_ANY_SOURCE && _tag == MPI_ANY_TAG)"
| | | | when !(!(_source==MPI_ANY_SOURCE) && (_tag==MPI_ANY_TAG)) goto location 7;
| | | | | libmpi.c 213.9--213.62: "if (_source != MPI_ANY_SOURCE && _tag == MPI_ANY_TAG)"
| | | end location 4;
| | | begin location 5
| | | | kind : RECEIVE;
| | | | recv(_tmp,_source,any(thetag), thesize); goto location 6;
| | | | | libmpi.c 214.4--214.46: "recv(_tmp, _source, any(thetag), thesize);"
| | | end location 5;
| | | begin location 6
| | | | kind : ASSIGNMENT;
| | | | thesource = _source; goto location 21;
| | | | | libmpi.c 215.4--215.24: "thesource = _source;"
| | | end location 6;
| | | begin location 7
| | | | kind : CHOICE;
| | | | when (_source==MPI_ANY_SOURCE) && !(_tag==MPI_ANY_TAG) goto location 8;
| | | | | libmpi.c 216.9--216.62: "if (_source == MPI_ANY_SOURCE && _tag != MPI_ANY_TAG)"
| | | | when !((_source==MPI_ANY_SOURCE) && !(_tag==MPI_ANY_TAG)) goto location 15;
| | | | | libmpi.c 216.9--216.62: "if (_source == MPI_ANY_SOURCE && _tag != MPI_ANY_TAG)"
| | | end location 7;
| | | begin location 8
| | | | kind : RECEIVE;
| | | | recv(_tmp,0,_tag, thesize); goto location 9;
| | | | | libmpi.c 217.4--217.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | | recv(_tmp,1,_tag, thesize); goto location 10;
| | | | | libmpi.c 217.4--217.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | | recv(_tmp,2,_tag, thesize); goto location 11;
| | | | | libmpi.c 217.4--217.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | | recv(_tmp,3,_tag, thesize); goto location 12;
| | | | | libmpi.c 217.4--217.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | | recv(_tmp,4,_tag, thesize); goto location 13;
| | | | | libmpi.c 217.4--217.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | end location 8;
| | | begin location 9
| | | | kind : ASSIGNMENT;
| | | | thesource = 0; goto location 14;
| | | | | libmpi.c 217.4--217.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | end location 9;
| | | begin location 10
| | | | kind : ASSIGNMENT;
| | | | thesource = 1; goto location 14;
| | | | | libmpi.c 217.4--217.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | end location 10;
| | | begin location 11
| | | | kind : ASSIGNMENT;
| | | | thesource = 2; goto location 14;
| | | | | libmpi.c 217.4--217.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | end location 11;
| | | begin location 12
| | | | kind : ASSIGNMENT;
| | | | thesource = 3; goto location 14;
| | | | | libmpi.c 217.4--217.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | end location 12;
| | | begin location 13
| | | | kind : ASSIGNMENT;
| | | | thesource = 4; goto location 14;
| | | | | libmpi.c 217.4--217.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | end location 13;
| | | begin location 14
| | | | kind : ASSIGNMENT;
| | | | thetag = _tag; goto location 21;
| | | | | libmpi.c 218.4--218.18: "thetag = _tag;"
| | | end location 14;
| | | begin location 15
| | | | kind : RECEIVE;
| | | | recv(_tmp,0,any(thetag), thesize); goto location 16;
| | | | | libmpi.c 220.4--220.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | | recv(_tmp,1,any(thetag), thesize); goto location 17;
| | | | | libmpi.c 220.4--220.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | | recv(_tmp,2,any(thetag), thesize); goto location 18;
| | | | | libmpi.c 220.4--220.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | | recv(_tmp,3,any(thetag), thesize); goto location 19;
| | | | | libmpi.c 220.4--220.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | | recv(_tmp,4,any(thetag), thesize); goto location 20;
| | | | | libmpi.c 220.4--220.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | end location 15;
| | | begin location 16
| | | | kind : ASSIGNMENT;
| | | | thesource = 0; goto location 21;
| | | | | libmpi.c 220.4--220.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | end location 16;
| | | begin location 17
| | | | kind : ASSIGNMENT;
| | | | thesource = 1; goto location 21;
| | | | | libmpi.c 220.4--220.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | end location 17;
| | | begin location 18
| | | | kind : ASSIGNMENT;
| | | | thesource = 2; goto location 21;
| | | | | libmpi.c 220.4--220.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | end location 18;
| | | begin location 19
| | | | kind : ASSIGNMENT;
| | | | thesource = 3; goto location 21;
| | | | | libmpi.c 220.4--220.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | end location 19;
| | | begin location 20
| | | | kind : ASSIGNMENT;
| | | | thesource = 4; goto location 21;
| | | | | libmpi.c 220.4--220.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | end location 20;
| | | begin location 21
| | | | kind : CHOICE;
| | | | when !(_status==MPI_STATUS_IGNORE) goto location 22;
| | | | | libmpi.c 222.2--222.35: "if (_status != MPI_STATUS_IGNORE)"
| | | | when !!(_status==MPI_STATUS_IGNORE) goto location 25;
| | | | | libmpi.c 222.2--222.35: "if (_status != MPI_STATUS_IGNORE)"
| | | end location 21;
| | | begin location 22
| | | | kind : ASSIGNMENT;
| | | | *_status.MPI_SOURCE = thesource; goto location 23;
| | | | | libmpi.c 223.4--223.36: "_status->MPI_SOURCE = thesource;"
| | | end location 22;
| | | begin location 23
| | | | kind : ASSIGNMENT;
| | | | *_status.MPI_TAG = thetag; goto location 24;
| | | | | libmpi.c 224.4--224.30: "_status->MPI_TAG = thetag;"
| | | end location 23;
| | | begin location 24
| | | | kind : ASSIGNMENT;
| | | | *_status.SIZE = thesize; goto location 25;
| | | | | libmpi.c 225.4--225.28: "_status->SIZE = thesize;"
| | | end location 24;
| | | begin location 25
| | | | kind : ASSIGNMENT;
| | | | thecount = thesize/sizeof(real); goto location 26;
| | | | | libmpi.c 227.2--227.36: "thecount = thesize/sizeof(double);"
| | | end location 25;
| | | begin location 26
| | | | kind : ASSIGNMENT;
| | | | _i = 0; goto location 27;
| | | | | libmpi.c 228.7--228.11: "_i=0"
| | | end location 26;
| | | begin location 27
| | | | kind : CHOICE;
| | | | when _i < thecount goto location 28;
| | | | | libmpi.c 228.2--228.31: "for (_i=0; _i<thecount; _i++)"
| | | | when !_i < thecount goto location 30;
| | | | | libmpi.c 228.2--228.31: "for (_i=0; _i<thecount; _i++)"
| | | end location 27;
| | | begin location 28
| | | | kind : ASSIGNMENT;
| | | | *(_buf+_i) = _tmp[_i]; goto location 29;
| | | | | libmpi.c 228.32--228.52: "_buf[_i] = _tmp[_i];"
| | | end location 28;
| | | begin location 29
| | | | kind : ASSIGNMENT;
| | | | _i = _i+1; goto location 27;
| | | | | libmpi.c 228.26--228.30: "_i++"
| | | end location 29;
| | | begin location 30
| | | | kind : RETURN;
| | | | return 0; goto location 31;
| | | | | libmpi.c 229.2--229.11: "return 0;"
| | | end location 30;
| | | begin location 31
| | | | kind : TERMINAL;
| | | end location 31;
| | end function MPIX_Recv_double;
| | begin function MPIX_Recv_int
| | | | libmpi.c 232.0--233.41: "int MPIX_Recv_int(int *_buf, int _count, int _source, int _tag, MPI_Comm _comm,                     MPI_Status *_status)"
| | | begin formal parameters
| | | | _buf : pointer(5)<int>;
| | | | | libmpi.c 232.18--232.27: "int *_buf"
| | | | _count : int;
| | | | | libmpi.c 232.29--232.39: "int _count"
| | | | _source : int;
| | | | | libmpi.c 232.41--232.52: "int _source"
| | | | _tag : int;
| | | | | libmpi.c 232.54--232.62: "int _tag"
| | | | _comm : int;
| | | | | libmpi.c 232.64--232.78: "MPI_Comm _comm"
| | | | _status : pointer(2)<Record[MPI_Status; MPI_SOURCE:int, MPI_TAG:int, SIZE:int]>;
| | | | | libmpi.c 233.21--233.40: "MPI_Status *_status"
| | | end formal parameters;
| | | begin proper local variables
| | | | _tmp : int[_count];
| | | | | libmpi.c 234.2--234.19: "int _tmp[_count];"
| | | | _i : int;
| | | | | libmpi.c 235.2--235.9: "int _i;"
| | | | thesource : int;
| | | | | libmpi.c 236.2--236.16: "int thesource;"
| | | | thetag : int;
| | | | | libmpi.c 237.2--237.13: "int thetag;"
| | | | thesize : int;
| | | | | libmpi.c 238.2--238.14: "int thesize;"
| | | | thecount : int;
| | | | | libmpi.c 239.2--239.15: "int thecount;"
| | | end proper local variables;
| | | start location : 0;
| | | begin location 0
| | | | kind : CHOICE;
| | | | when !(_source==MPI_ANY_SOURCE) && !(_tag==MPI_ANY_TAG) goto location 1;
| | | | | libmpi.c 241.2--241.55: "if (_source != MPI_ANY_SOURCE && _tag != MPI_ANY_TAG)"
| | | | when !(!(_source==MPI_ANY_SOURCE) && !(_tag==MPI_ANY_TAG)) goto location 4;
| | | | | libmpi.c 241.2--241.55: "if (_source != MPI_ANY_SOURCE && _tag != MPI_ANY_TAG)"
| | | end location 0;
| | | begin location 1
| | | | kind : RECEIVE;
| | | | recv(_tmp,_source,_tag, thesize); goto location 2;
| | | | | libmpi.c 242.4--242.39: "recv(_tmp, _source, _tag, thesize);"
| | | end location 1;
| | | begin location 2
| | | | kind : ASSIGNMENT;
| | | | thesource = _source; goto location 3;
| | | | | libmpi.c 243.4--243.24: "thesource = _source;"
| | | end location 2;
| | | begin location 3
| | | | kind : ASSIGNMENT;
| | | | thetag = _tag; goto location 21;
| | | | | libmpi.c 244.4--244.18: "thetag = _tag;"
| | | end location 3;
| | | begin location 4
| | | | kind : CHOICE;
| | | | when !(_source==MPI_ANY_SOURCE) && (_tag==MPI_ANY_TAG) goto location 5;
| | | | | libmpi.c 245.9--245.62: "if (_source != MPI_ANY_SOURCE && _tag == MPI_ANY_TAG)"
| | | | when !(!(_source==MPI_ANY_SOURCE) && (_tag==MPI_ANY_TAG)) goto location 7;
| | | | | libmpi.c 245.9--245.62: "if (_source != MPI_ANY_SOURCE && _tag == MPI_ANY_TAG)"
| | | end location 4;
| | | begin location 5
| | | | kind : RECEIVE;
| | | | recv(_tmp,_source,any(thetag), thesize); goto location 6;
| | | | | libmpi.c 246.4--246.46: "recv(_tmp, _source, any(thetag), thesize);"
| | | end location 5;
| | | begin location 6
| | | | kind : ASSIGNMENT;
| | | | thesource = _source; goto location 21;
| | | | | libmpi.c 247.4--247.24: "thesource = _source;"
| | | end location 6;
| | | begin location 7
| | | | kind : CHOICE;
| | | | when (_source==MPI_ANY_SOURCE) && !(_tag==MPI_ANY_TAG) goto location 8;
| | | | | libmpi.c 248.9--248.62: "if (_source == MPI_ANY_SOURCE && _tag != MPI_ANY_TAG)"
| | | | when !((_source==MPI_ANY_SOURCE) && !(_tag==MPI_ANY_TAG)) goto location 15;
| | | | | libmpi.c 248.9--248.62: "if (_source == MPI_ANY_SOURCE && _tag != MPI_ANY_TAG)"
| | | end location 7;
| | | begin location 8
| | | | kind : RECEIVE;
| | | | recv(_tmp,0,_tag, thesize); goto location 9;
| | | | | libmpi.c 249.4--249.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | | recv(_tmp,1,_tag, thesize); goto location 10;
| | | | | libmpi.c 249.4--249.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | | recv(_tmp,2,_tag, thesize); goto location 11;
| | | | | libmpi.c 249.4--249.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | | recv(_tmp,3,_tag, thesize); goto location 12;
| | | | | libmpi.c 249.4--249.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | | recv(_tmp,4,_tag, thesize); goto location 13;
| | | | | libmpi.c 249.4--249.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | end location 8;
| | | begin location 9
| | | | kind : ASSIGNMENT;
| | | | thesource = 0; goto location 14;
| | | | | libmpi.c 249.4--249.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | end location 9;
| | | begin location 10
| | | | kind : ASSIGNMENT;
| | | | thesource = 1; goto location 14;
| | | | | libmpi.c 249.4--249.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | end location 10;
| | | begin location 11
| | | | kind : ASSIGNMENT;
| | | | thesource = 2; goto location 14;
| | | | | libmpi.c 249.4--249.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | end location 11;
| | | begin location 12
| | | | kind : ASSIGNMENT;
| | | | thesource = 3; goto location 14;
| | | | | libmpi.c 249.4--249.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | end location 12;
| | | begin location 13
| | | | kind : ASSIGNMENT;
| | | | thesource = 4; goto location 14;
| | | | | libmpi.c 249.4--249.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | end location 13;
| | | begin location 14
| | | | kind : ASSIGNMENT;
| | | | thetag = _tag; goto location 21;
| | | | | libmpi.c 250.4--250.18: "thetag = _tag;"
| | | end location 14;
| | | begin location 15
| | | | kind : RECEIVE;
| | | | recv(_tmp,0,any(thetag), thesize); goto location 16;
| | | | | libmpi.c 252.4--252.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | | recv(_tmp,1,any(thetag), thesize); goto location 17;
| | | | | libmpi.c 252.4--252.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | | recv(_tmp,2,any(thetag), thesize); goto location 18;
| | | | | libmpi.c 252.4--252.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | | recv(_tmp,3,any(thetag), thesize); goto location 19;
| | | | | libmpi.c 252.4--252.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | | recv(_tmp,4,any(thetag), thesize); goto location 20;
| | | | | libmpi.c 252.4--252.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | end location 15;
| | | begin location 16
| | | | kind : ASSIGNMENT;
| | | | thesource = 0; goto location 21;
| | | | | libmpi.c 252.4--252.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | end location 16;
| | | begin location 17
| | | | kind : ASSIGNMENT;
| | | | thesource = 1; goto location 21;
| | | | | libmpi.c 252.4--252.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | end location 17;
| | | begin location 18
| | | | kind : ASSIGNMENT;
| | | | thesource = 2; goto location 21;
| | | | | libmpi.c 252.4--252.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | end location 18;
| | | begin location 19
| | | | kind : ASSIGNMENT;
| | | | thesource = 3; goto location 21;
| | | | | libmpi.c 252.4--252.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | end location 19;
| | | begin location 20
| | | | kind : ASSIGNMENT;
| | | | thesource = 4; goto location 21;
| | | | | libmpi.c 252.4--252.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | end location 20;
| | | begin location 21
| | | | kind : CHOICE;
| | | | when !(_status==MPI_STATUS_IGNORE) goto location 22;
| | | | | libmpi.c 254.2--254.35: "if (_status != MPI_STATUS_IGNORE)"
| | | | when !!(_status==MPI_STATUS_IGNORE) goto location 25;
| | | | | libmpi.c 254.2--254.35: "if (_status != MPI_STATUS_IGNORE)"
| | | end location 21;
| | | begin location 22
| | | | kind : ASSIGNMENT;
| | | | *_status.MPI_SOURCE = thesource; goto location 23;
| | | | | libmpi.c 255.4--255.36: "_status->MPI_SOURCE = thesource;"
| | | end location 22;
| | | begin location 23
| | | | kind : ASSIGNMENT;
| | | | *_status.MPI_TAG = thetag; goto location 24;
| | | | | libmpi.c 256.4--256.30: "_status->MPI_TAG = thetag;"
| | | end location 23;
| | | begin location 24
| | | | kind : ASSIGNMENT;
| | | | *_status.SIZE = thesize; goto location 25;
| | | | | libmpi.c 257.4--257.28: "_status->SIZE = thesize;"
| | | end location 24;
| | | begin location 25
| | | | kind : ASSIGNMENT;
| | | | thecount = thesize/sizeof(int); goto location 26;
| | | | | libmpi.c 259.2--259.33: "thecount = thesize/sizeof(int);"
| | | end location 25;
| | | begin location 26
| | | | kind : ASSIGNMENT;
| | | | _i = 0; goto location 27;
| | | | | libmpi.c 260.7--260.11: "_i=0"
| | | end location 26;
| | | begin location 27
| | | | kind : CHOICE;
| | | | when _i < thecount goto location 28;
| | | | | libmpi.c 260.2--260.31: "for (_i=0; _i<thecount; _i++)"
| | | | when !_i < thecount goto location 30;
| | | | | libmpi.c 260.2--260.31: "for (_i=0; _i<thecount; _i++)"
| | | end location 27;
| | | begin location 28
| | | | kind : ASSIGNMENT;
| | | | *(_buf+_i) = _tmp[_i]; goto location 29;
| | | | | libmpi.c 260.32--260.52: "_buf[_i] = _tmp[_i];"
| | | end location 28;
| | | begin location 29
| | | | kind : ASSIGNMENT;
| | | | _i = _i+1; goto location 27;
| | | | | libmpi.c 260.26--260.30: "_i++"
| | | end location 29;
| | | begin location 30
| | | | kind : RETURN;
| | | | return 0; goto location 31;
| | | | | libmpi.c 261.2--261.11: "return 0;"
| | | end location 30;
| | | begin location 31
| | | | kind : TERMINAL;
| | | end location 31;
| | end function MPIX_Recv_int;
| | begin function MPI_Init
| | | | libmpi.c 101.0--101.37: "int MPI_Init(int *argc, char ***argv)"
| | | begin formal parameters
| | | | argc : pointer(5)<int>;
| | | | | libmpi.c 101.13--101.22: "int *argc"
| | | | argv : pointer(8)<pointer(6)<pointer(7)<char>>>;
| | | | | libmpi.c 101.24--101.36: "char ***argv"
| | | end formal parameters;
| | | start location : 0;
| | | begin location 0
| | | | kind : ASSERTION;
| | | | assert MPIX_State==MPIX_UNINITIALIZED; Attempt to call MPI_Init when MPI is already initialized goto location 1;
| | | | | libmpi.c 102.15--102.115: "assert MPIX_State == MPIX_UNINITIALIZED, "Attempt to call MPI_Init when MPI is already initialized";"
| | | end location 0;
| | | begin location 1
| | | | kind : ASSIGNMENT;
| | | | MPIX_State = MPIX_INITIALIZED; goto location 2;
| | | | | libmpi.c 103.2--103.32: "MPIX_State = MPIX_INITIALIZED;"
| | | end location 1;
| | | begin location 2
| | | | kind : RETURN;
| | | | return 0; goto location 3;
| | | | | libmpi.c 104.2--104.11: "return 0;"
| | | end location 2;
| | | begin location 3
| | | | kind : TERMINAL;
| | | end location 3;
| | end function MPI_Init;
| | begin function MPI_Comm_size
| | | | libmpi.c 121.0--121.45: "int MPI_Comm_size(MPI_Comm _comm, int *_size)"
| | | begin formal parameters
| | | | _comm : int;
| | | | | libmpi.c 121.18--121.32: "MPI_Comm _comm"
| | | | _size : pointer(5)<int>;
| | | | | libmpi.c 121.34--121.44: "int *_size"
| | | end formal parameters;
| | | start location : 0;
| | | begin location 0
| | | | kind : ASSERTION;
| | | | assert MPIX_State==MPIX_INITIALIZED; Attempt to call MPI_Comm_size when MPI is not initialized goto location 1;
| | | | | libmpi.c 122.15--122.114: "assert MPIX_State == MPIX_INITIALIZED, "Attempt to call MPI_Comm_size when MPI is not initialized";"
| | | end location 0;
| | | begin location 1
| | | | kind : ASSERTION;
| | | | assert _comm==MPI_COMM_WORLD;  goto location 2;
| | | | | libmpi.c 124.15--124.46: "assert _comm == MPI_COMM_WORLD;"
| | | end location 1;
| | | begin location 2
| | | | kind : ASSIGNMENT;
| | | | *_size = 5; goto location 3;
| | | | | libmpi.c 125.2--125.18: "*_size = NPROCS;"
| | | end location 2;
| | | begin location 3
| | | | kind : RETURN;
| | | | return 0; goto location 4;
| | | | | libmpi.c 126.2--126.11: "return 0;"
| | | end location 3;
| | | begin location 4
| | | | kind : TERMINAL;
| | | end location 4;
| | end function MPI_Comm_size;
| | begin function MPI_Comm_rank
| | | | libmpi.c 113.0--113.45: "int MPI_Comm_rank(MPI_Comm _comm, int *_rank)"
| | | begin formal parameters
| | | | _comm : int;
| | | | | libmpi.c 113.18--113.32: "MPI_Comm _comm"
| | | | _rank : pointer(5)<int>;
| | | | | libmpi.c 113.34--113.44: "int *_rank"
| | | end formal parameters;
| | | start location : 0;
| | | begin location 0
| | | | kind : ASSERTION;
| | | | assert MPIX_State==MPIX_INITIALIZED; Attempt to call MPI_Comm_rank when MPI is not initialized goto location 1;
| | | | | libmpi.c 114.15--114.114: "assert MPIX_State == MPIX_INITIALIZED, "Attempt to call MPI_Comm_rank when MPI is not initialized";"
| | | end location 0;
| | | begin location 1
| | | | kind : ASSERTION;
| | | | assert _comm==MPI_COMM_WORLD;  goto location 2;
| | | | | libmpi.c 116.15--116.46: "assert _comm == MPI_COMM_WORLD;"
| | | end location 1;
| | | begin location 2
| | | | kind : ASSIGNMENT;
| | | | *_rank = 3; goto location 3;
| | | | | libmpi.c 117.2--117.15: "*_rank = PID;"
| | | end location 2;
| | | begin location 3
| | | | kind : RETURN;
| | | | return 0; goto location 4;
| | | | | libmpi.c 118.2--118.11: "return 0;"
| | | end location 3;
| | | begin location 4
| | | | kind : TERMINAL;
| | | end location 4;
| | end function MPI_Comm_rank;
| | begin function MPI_Finalize
| | | | libmpi.c 107.0--107.18: "int MPI_Finalize()"
| | | start location : 0;
| | | begin location 0
| | | | kind : ASSERTION;
| | | | assert MPIX_State==MPIX_INITIALIZED; Attempt to call MPI_Finalize when MPI is not initialized goto location 1;
| | | | | libmpi.c 108.15--108.113: "assert MPIX_State == MPIX_INITIALIZED, "Attempt to call MPI_Finalize when MPI is not initialized";"
| | | end location 0;
| | | begin location 1
| | | | kind : ASSIGNMENT;
| | | | MPIX_State = MPIX_FINALIZED; goto location 2;
| | | | | libmpi.c 109.2--109.30: "MPIX_State = MPIX_FINALIZED;"
| | | end location 1;
| | | begin location 2
| | | | kind : RETURN;
| | | | return 0; goto location 3;
| | | | | libmpi.c 110.2--110.11: "return 0;"
| | | end location 2;
| | | begin location 3
| | | | kind : TERMINAL;
| | | end location 3;
| | end function MPI_Finalize;
| end process 3;
| begin process 4
| | main function : main;
| | begin process variables
| | | MPI_REQUEST_NULL : pointer(1)<Record[MPIX_Comm_Record; id:int]>;
| | | | libmpi.c 85.0--85.55: "MPI_Request MPI_REQUEST_NULL = (MPIX_Comm_Record*)NULL;"
| | | MPI_STATUS_IGNORE : pointer(2)<Record[MPI_Status; MPI_SOURCE:int, MPI_TAG:int, SIZE:int]>;
| | | | libmpi.c 89.0--89.50: "MPI_Status *MPI_STATUS_IGNORE = (MPI_Status*)NULL;"
| | | MPIX_State : int;
| | | | libmpi.c 94.0--94.19: "int MPIX_State = 0;"
| | | nprocs : int;
| | | | diffusion_par_bad.c 22.0--22.11: "int nprocs;"
| | | myrank : int;
| | | | diffusion_par_bad.c 23.0--23.11: "int myrank;"
| | | left : int;
| | | | diffusion_par_bad.c 24.0--24.9: "int left;"
| | | right : int;
| | | | diffusion_par_bad.c 25.0--25.10: "int right;"
| | | nxl : int;
| | | | diffusion_par_bad.c 26.0--26.8: "int nxl;"
| | | first : int;
| | | | diffusion_par_bad.c 27.0--27.10: "int first;"
| | | start : int;
| | | | diffusion_par_bad.c 28.0--28.10: "int start;"
| | | stop : int;
| | | | diffusion_par_bad.c 29.0--29.9: "int stop;"
| | | buf : pointer(3)<real>;
| | | | diffusion_par_bad.c 30.0--30.12: "double* buf;"
| | | v : pointer(3)<real>;
| | | | diffusion_par_bad.c 31.0--31.10: "double* v;"
| | | v_new : pointer(3)<real>;
| | | | diffusion_par_bad.c 32.0--32.14: "double* v_new;"
| | end process variables;
| | begin function owner
| | | | diffusion_par_bad.c 34.0--34.20: "int owner(int index)"
| | | begin formal parameters
| | | | index : int;
| | | | | diffusion_par_bad.c 34.10--34.19: "int index"
| | | end formal parameters;
| | | start location : 0;
| | | begin location 0
| | | | kind : RETURN;
| | | | return ((nprocs*(index+1))-1)/nx; goto location 1;
| | | | | diffusion_par_bad.c 34.23--34.54: "return (nprocs*(index+1)-1)/nx;"
| | | end location 0;
| | | begin location 1
| | | | kind : TERMINAL;
| | | end location 1;
| | end function owner;
| | begin function firstForProc
| | | | diffusion_par_bad.c 36.0--36.26: "int firstForProc(int rank)"
| | | begin formal parameters
| | | | rank : int;
| | | | | diffusion_par_bad.c 36.17--36.25: "int rank"
| | | end formal parameters;
| | | start location : 0;
| | | begin location 0
| | | | kind : RETURN;
| | | | return (rank*nx)/nprocs; goto location 1;
| | | | | diffusion_par_bad.c 36.29--36.53: "return (rank*nx)/nprocs;"
| | | end location 0;
| | | begin location 1
| | | | kind : TERMINAL;
| | | end location 1;
| | end function firstForProc;
| | begin function countForProc
| | | | diffusion_par_bad.c 38.0--38.26: "int countForProc(int rank)"
| | | begin formal parameters
| | | | rank : int;
| | | | | diffusion_par_bad.c 38.17--38.25: "int rank"
| | | end formal parameters;
| | | begin proper local variables
| | | | a : int;
| | | | | diffusion_par_bad.c 39.1--39.7: "int a;"
| | | | b : int;
| | | | | diffusion_par_bad.c 40.1--40.7: "int b;"
| | | end proper local variables;
| | | start location : 0;
| | | begin location 0
| | | | kind : INVOCATION;
| | | | a = firstForProc(rank+1); goto location 1;
| | | | | diffusion_par_bad.c 42.1--42.26: "a = firstForProc(rank+1);"
| | | end location 0;
| | | begin location 1
| | | | kind : INVOCATION;
| | | | b = firstForProc(rank); goto location 2;
| | | | | diffusion_par_bad.c 43.1--43.24: "b = firstForProc(rank);"
| | | end location 1;
| | | begin location 2
| | | | kind : RETURN;
| | | | return a-b; goto location 3;
| | | | | diffusion_par_bad.c 44.1--44.12: "return a-b;"
| | | end location 2;
| | | begin location 3
| | | | kind : TERMINAL;
| | | end location 3;
| | end function countForProc;
| | begin function init
| | | | diffusion_par_bad.c 48.0--48.11: "void init()"
| | | begin proper local variables
| | | | i : int;
| | | | | diffusion_par_bad.c 49.1--49.7: "int i;"
| | | | owner : int;
| | | | | diffusion_par_bad.c 50.1--50.11: "int owner;"
| | | | bufSize : int;
| | | | | diffusion_par_bad.c 51.1--51.13: "int bufSize;"
| | | end proper local variables;
| | | start location : 0;
| | | begin location 0
| | | | kind : ASSIGNMENT;
| | | | i = 0; goto location 1;
| | | | | diffusion_par_bad.c 53.6--53.9: "i=0"
| | | end location 0;
| | | begin location 1
| | | | kind : CHOICE;
| | | | when i < nx goto location 2;
| | | | | diffusion_par_bad.c 53.1--53.21: "for (i=0; i<nx; i++)"
| | | | when !i < nx goto location 3;
| | | | | diffusion_par_bad.c 53.1--53.21: "for (i=0; i<nx; i++)"
| | | end location 1;
| | | begin location 2
| | | | kind : ASSIGNMENT;
| | | | i = i+1; goto location 1;
| | | | | diffusion_par_bad.c 53.17--53.20: "i++"
| | | end location 2;
| | | begin location 3
| | | | kind : ASSIGNMENT;
| | | | left = myrank-1; goto location 4;
| | | | | diffusion_par_bad.c 54.1--54.17: "left = myrank-1;"
| | | end location 3;
| | | begin location 4
| | | | kind : ASSIGNMENT;
| | | | right = myrank+1; goto location 5;
| | | | | diffusion_par_bad.c 55.1--55.18: "right = myrank+1;"
| | | end location 4;
| | | begin location 5
| | | | kind : INVOCATION;
| | | | first = firstForProc(myrank); goto location 6;
| | | | | diffusion_par_bad.c 56.1--56.30: "first = firstForProc(myrank);"
| | | end location 5;
| | | begin location 6
| | | | kind : INVOCATION;
| | | | nxl = countForProc(myrank); goto location 7;
| | | | | diffusion_par_bad.c 57.1--57.28: "nxl = countForProc(myrank);"
| | | end location 6;
| | | begin location 7
| | | | kind : ASSIGNMENT;
| | | | bufSize = nx/nprocs; goto location 8;
| | | | | diffusion_par_bad.c 58.1--58.21: "bufSize = nx/nprocs;"
| | | end location 7;
| | | begin location 8
| | | | kind : ASSIGNMENT;
| | | | bufSize = bufSize+1; goto location 9;
| | | | | diffusion_par_bad.c 59.27--59.37: "bufSize++;"
| | | end location 8;
| | | begin location 9
| | | | kind : ALLOCATE;
| | | | buf = (real*) malloc(bufSize*sizeof(real)); goto location 10;
| | | | | diffusion_par_bad.c 60.1--60.51: "buf = (double *) malloc(bufSize * sizeof(double));"
| | | end location 9;
| | | begin location 10
| | | | kind : ALLOCATE;
| | | | v = (real*) malloc((nxl+2)*sizeof(real)); goto location 11;
| | | | | diffusion_par_bad.c 61.1--61.51: "v = (double *) malloc((nxl + 2) * sizeof(double));"
| | | end location 10;
| | | begin location 11
| | | | kind : ALLOCATE;
| | | | v_new = (real*) malloc((nxl+2)*sizeof(real)); goto location 12;
| | | | | diffusion_par_bad.c 62.1--62.55: "v_new = (double *) malloc((nxl + 2) * sizeof(double));"
| | | end location 11;
| | | begin location 12
| | | | kind : ASSIGNMENT;
| | | | i = 1; goto location 13;
| | | | | diffusion_par_bad.c 63.6--63.9: "i=1"
| | | end location 12;
| | | begin location 13
| | | | kind : CHOICE;
| | | | when i <= nxl goto location 14;
| | | | | diffusion_par_bad.c 63.1--63.23: "for (i=1; i<=nxl; i++)"
| | | | when !i <= nxl goto location 16;
| | | | | diffusion_par_bad.c 63.1--63.23: "for (i=1; i<=nxl; i++)"
| | | end location 13;
| | | begin location 14
| | | | kind : ASSIGNMENT;
| | | | *(v+i) = u0[(first+i)-1]; goto location 15;
| | | | | diffusion_par_bad.c 63.24--63.45: "v[i] = u0[first+i-1];"
| | | end location 14;
| | | begin location 15
| | | | kind : ASSIGNMENT;
| | | | i = i+1; goto location 13;
| | | | | diffusion_par_bad.c 63.19--63.22: "i++"
| | | end location 15;
| | | begin location 16
| | | | kind : INVOCATION;
| | | | owner = owner(0); goto location 17;
| | | | | diffusion_par_bad.c 64.1--64.18: "owner = owner(0);"
| | | end location 16;
| | | begin location 17
| | | | kind : CHOICE;
| | | | when myrank==owner goto location 18;
| | | | | diffusion_par_bad.c 65.1--65.21: "if (myrank == owner)"
| | | | when !(myrank==owner) goto location 19;
| | | | | diffusion_par_bad.c 65.1--65.21: "if (myrank == owner)"
| | | end location 17;
| | | begin location 18
| | | | kind : ASSIGNMENT;
| | | | start = 2; goto location 20;
| | | | | diffusion_par_bad.c 65.22--65.30: "start=2;"
| | | end location 18;
| | | begin location 19
| | | | kind : ASSIGNMENT;
| | | | start = 1; goto location 20;
| | | | | diffusion_par_bad.c 65.36--65.44: "start=1;"
| | | end location 19;
| | | begin location 20
| | | | kind : INVOCATION;
| | | | owner = owner(nx-1); goto location 21;
| | | | | diffusion_par_bad.c 66.1--66.21: "owner = owner(nx-1);"
| | | end location 20;
| | | begin location 21
| | | | kind : CHOICE;
| | | | when myrank==owner goto location 22;
| | | | | diffusion_par_bad.c 67.1--67.21: "if (myrank == owner)"
| | | | when !(myrank==owner) goto location 23;
| | | | | diffusion_par_bad.c 67.1--67.21: "if (myrank == owner)"
| | | end location 21;
| | | begin location 22
| | | | kind : ASSIGNMENT;
| | | | stop = nxl-1; goto location 24;
| | | | | diffusion_par_bad.c 67.22--67.33: "stop=nxl-1;"
| | | end location 22;
| | | begin location 23
| | | | kind : ASSIGNMENT;
| | | | stop = nxl; goto location 24;
| | | | | diffusion_par_bad.c 67.39--67.48: "stop=nxl;"
| | | end location 23;
| | | begin location 24
| | | | kind : RETURN;
| | | | return null; goto location 25;
| | | | | diffusion_par_bad.c 68.0--68.0: "}"
| | | end location 24;
| | | begin location 25
| | | | kind : TERMINAL;
| | | end location 25;
| | end function init;
| | begin function cleanup
| | | | diffusion_par_bad.c 70.0--70.14: "void cleanup()"
| | | start location : 0;
| | | begin location 0
| | | | kind : INVOCATION;
| | | | free(buf); goto location 1;
| | | | | diffusion_par_bad.c 71.1--71.11: "free(buf);"
| | | end location 0;
| | | begin location 1
| | | | kind : INVOCATION;
| | | | free(v); goto location 2;
| | | | | diffusion_par_bad.c 72.1--72.9: "free(v);"
| | | end location 1;
| | | begin location 2
| | | | kind : INVOCATION;
| | | | free(v_new); goto location 3;
| | | | | diffusion_par_bad.c 73.1--73.13: "free(v_new);"
| | | end location 2;
| | | begin location 3
| | | | kind : RETURN;
| | | | return null; goto location 4;
| | | | | diffusion_par_bad.c 74.0--74.0: "}"
| | | end location 3;
| | | begin location 4
| | | | kind : TERMINAL;
| | | end location 4;
| | end function cleanup;
| | begin function write
| | | | diffusion_par_bad.c 76.0--76.20: "void write(int time)"
| | | begin formal parameters
| | | | time : int;
| | | | | diffusion_par_bad.c 76.11--76.19: "int time"
| | | end formal parameters;
| | | begin proper local variables
| | | | source : int;
| | | | | diffusion_par_bad.c 77.1--77.12: "int source;"
| | | | i : int;
| | | | | diffusion_par_bad.c 78.1--78.7: "int i;"
| | | | j : int;
| | | | | diffusion_par_bad.c 79.1--79.7: "int j;"
| | | | count : int;
| | | | | diffusion_par_bad.c 80.1--80.11: "int count;"
| | | end proper local variables;
| | | start location : 0;
| | | begin location 0
| | | | kind : CHOICE;
| | | | when !(myrank==0) goto location 1;
| | | | | diffusion_par_bad.c 82.1--82.17: "if (myrank != 0)"
| | | | when !!(myrank==0) goto location 2;
| | | | | diffusion_par_bad.c 82.1--82.17: "if (myrank != 0)"
| | | end location 0;
| | | begin location 1
| | | | kind : INVOCATION;
| | | | MPI_Send(v+1,nxl,MPI_DOUBLE,0,0,MPI_COMM_WORLD); goto location 18;
| | | | | diffusion_par_bad.c 83.2--83.55: "MPI_Send(v+1, nxl, MPI_DOUBLE, 0, 0, MPI_COMM_WORLD);"
| | | end location 1;
| | | begin location 2
| | | | kind : ASSIGNMENT;
| | | | j = 0; goto location 3;
| | | | | diffusion_par_bad.c 85.2--85.6: "j=0;"
| | | end location 2;
| | | begin location 3
| | | | kind : ASSIGNMENT;
| | | | source = 0; goto location 4;
| | | | | diffusion_par_bad.c 86.7--86.15: "source=0"
| | | end location 3;
| | | begin location 4
| | | | kind : CHOICE;
| | | | when source < nprocs goto location 5;
| | | | | diffusion_par_bad.c 86.2--86.41: "for (source=0; source<nprocs; source++)"
| | | | when !source < nprocs goto location 18;
| | | | | diffusion_par_bad.c 86.2--86.41: "for (source=0; source<nprocs; source++)"
| | | end location 4;
| | | begin location 5
| | | | kind : INVOCATION;
| | | | count = countForProc(source); goto location 6;
| | | | | diffusion_par_bad.c 87.3--87.32: "count = countForProc(source);"
| | | end location 5;
| | | begin location 6
| | | | kind : CHOICE;
| | | | when !(source==0) goto location 7;
| | | | | diffusion_par_bad.c 88.3--88.19: "if (source != 0)"
| | | | when !!(source==0) goto location 8;
| | | | | diffusion_par_bad.c 88.3--88.19: "if (source != 0)"
| | | end location 6;
| | | begin location 7
| | | | kind : INVOCATION;
| | | | MPI_Recv(buf,count,MPI_DOUBLE,source,0,MPI_COMM_WORLD,MPI_STATUS_IGNORE); goto location 12;
| | | | | diffusion_par_bad.c 89.4--89.83: "MPI_Recv(buf, count, MPI_DOUBLE, source, 0, MPI_COMM_WORLD, MPI_STATUS_IGNORE);"
| | | end location 7;
| | | begin location 8
| | | | kind : ASSIGNMENT;
| | | | i = 0; goto location 9;
| | | | | diffusion_par_bad.c 91.9--91.12: "i=0"
| | | end location 8;
| | | begin location 9
| | | | kind : CHOICE;
| | | | when i < count goto location 10;
| | | | | diffusion_par_bad.c 91.4--91.27: "for (i=0; i<count; i++)"
| | | | when !i < count goto location 12;
| | | | | diffusion_par_bad.c 91.4--91.27: "for (i=0; i<count; i++)"
| | | end location 9;
| | | begin location 10
| | | | kind : ASSIGNMENT;
| | | | *(buf+i) = *(v+(i+1)); goto location 11;
| | | | | diffusion_par_bad.c 91.28--91.44: "buf[i] = v[i+1];"
| | | end location 10;
| | | begin location 11
| | | | kind : ASSIGNMENT;
| | | | i = i+1; goto location 9;
| | | | | diffusion_par_bad.c 91.23--91.26: "i++"
| | | end location 11;
| | | begin location 12
| | | | kind : ASSIGNMENT;
| | | | i = 0; goto location 13;
| | | | | diffusion_par_bad.c 92.8--92.11: "i=0"
| | | end location 12;
| | | begin location 13
| | | | kind : CHOICE;
| | | | when i < count goto location 14;
| | | | | diffusion_par_bad.c 92.3--92.26: "for (i=0; i<count; i++)"
| | | | when !i < count goto location 17;
| | | | | diffusion_par_bad.c 92.3--92.26: "for (i=0; i<count; i++)"
| | | end location 13;
| | | begin location 14
| | | | kind : ASSIGNMENT;
| | | | data[time][j] = *(buf+i); goto location 15;
| | | | | diffusion_par_bad.c 93.4--93.27: "data[time][j] = buf[i];"
| | | end location 14;
| | | begin location 15
| | | | kind : ASSIGNMENT;
| | | | j = j+1; goto location 16;
| | | | | diffusion_par_bad.c 94.4--94.8: "j++;"
| | | end location 15;
| | | begin location 16
| | | | kind : ASSIGNMENT;
| | | | i = i+1; goto location 13;
| | | | | diffusion_par_bad.c 92.22--92.25: "i++"
| | | end location 16;
| | | begin location 17
| | | | kind : ASSIGNMENT;
| | | | source = source+1; goto location 4;
| | | | | diffusion_par_bad.c 86.32--86.40: "source++"
| | | end location 17;
| | | begin location 18
| | | | kind : RETURN;
| | | | return null; goto location 19;
| | | | | diffusion_par_bad.c 98.0--98.0: "}"
| | | end location 18;
| | | begin location 19
| | | | kind : TERMINAL;
| | | end location 19;
| | end function write;
| | begin function exchange_ghost_cells
| | | | diffusion_par_bad.c 101.0--101.27: "void exchange_ghost_cells()"
| | | start location : 0;
| | | begin location 0
| | | | kind : CHOICE;
| | | | when 0 <= left goto location 1;
| | | | | diffusion_par_bad.c 102.1--102.15: "if (left >= 0)"
| | | | when !0 <= left goto location 2;
| | | | | diffusion_par_bad.c 102.1--102.15: "if (left >= 0)"
| | | end location 0;
| | | begin location 1
| | | | kind : INVOCATION;
| | | | MPI_Send(v+1,1,MPI_DOUBLE,left,0,MPI_COMM_WORLD); goto location 2;
| | | | | diffusion_par_bad.c 102.16--102.70: "MPI_Send(v+1, 1, MPI_DOUBLE, left, 0, MPI_COMM_WORLD);"
| | | end location 1;
| | | begin location 2
| | | | kind : CHOICE;
| | | | when right < nprocs goto location 3;
| | | | | diffusion_par_bad.c 103.1--103.20: "if (right < nprocs)"
| | | | when !right < nprocs goto location 5;
| | | | | diffusion_par_bad.c 103.1--103.20: "if (right < nprocs)"
| | | end location 2;
| | | begin location 3
| | | | kind : INVOCATION;
| | | | MPI_Recv(v+(nxl+1),1,MPI_DOUBLE,right,0,MPI_COMM_WORLD,MPI_STATUS_IGNORE); goto location 4;
| | | | | diffusion_par_bad.c 104.2--104.82: "MPI_Recv(v+(nxl+1), 1, MPI_DOUBLE, right, 0, MPI_COMM_WORLD, MPI_STATUS_IGNORE);"
| | | end location 3;
| | | begin location 4
| | | | kind : INVOCATION;
| | | | MPI_Send(v+nxl,1,MPI_DOUBLE,right,0,MPI_COMM_WORLD); goto location 5;
| | | | | diffusion_par_bad.c 105.2--105.59: "MPI_Send(v+nxl, 1, MPI_DOUBLE, right, 0, MPI_COMM_WORLD);"
| | | end location 4;
| | | begin location 5
| | | | kind : CHOICE;
| | | | when 0 <= left goto location 6;
| | | | | diffusion_par_bad.c 107.1--107.15: "if (left >= 0)"
| | | | when !0 <= left goto location 7;
| | | | | diffusion_par_bad.c 107.1--107.15: "if (left >= 0)"
| | | end location 5;
| | | begin location 6
| | | | kind : INVOCATION;
| | | | MPI_Recv(v,1,MPI_DOUBLE,left,0,MPI_COMM_WORLD,MPI_STATUS_IGNORE); goto location 7;
| | | | | diffusion_par_bad.c 107.16--107.87: "MPI_Recv(v, 1, MPI_DOUBLE, left, 0, MPI_COMM_WORLD, MPI_STATUS_IGNORE);"
| | | end location 6;
| | | begin location 7
| | | | kind : RETURN;
| | | | return null; goto location 8;
| | | | | diffusion_par_bad.c 108.0--108.0: "}"
| | | end location 7;
| | | begin location 8
| | | | kind : TERMINAL;
| | | end location 8;
| | end function exchange_ghost_cells;
| | begin function update
| | | | diffusion_par_bad.c 112.0--112.13: "void update()"
| | | begin proper local variables
| | | | i : int;
| | | | | diffusion_par_bad.c 113.1--113.7: "int i;"
| | | end proper local variables;
| | | start location : 0;
| | | begin location 0
| | | | kind : ASSIGNMENT;
| | | | i = start; goto location 1;
| | | | | diffusion_par_bad.c 115.6--115.13: "i=start"
| | | end location 0;
| | | begin location 1
| | | | kind : CHOICE;
| | | | when i <= stop goto location 2;
| | | | | diffusion_par_bad.c 115.1--115.28: "for (i=start; i<=stop; i++)"
| | | | when !i <= stop goto location 4;
| | | | | diffusion_par_bad.c 115.1--115.28: "for (i=start; i<=stop; i++)"
| | | end location 1;
| | | begin location 2
| | | | kind : ASSIGNMENT;
| | | | *(v_new+i) = *(v+i)+(kappa*((*(v+(i+1))+*(v+(i-1)))-((real)2**(v+i)))); goto location 3;
| | | | | diffusion_par_bad.c 115.29--115.80: "v_new[i] = v[i] + kappa*(v[i+1] + v[i-1] - 2*v[i]);"
| | | end location 2;
| | | begin location 3
| | | | kind : ASSIGNMENT;
| | | | i = i+1; goto location 1;
| | | | | diffusion_par_bad.c 115.24--115.27: "i++"
| | | end location 3;
| | | begin location 4
| | | | kind : ASSIGNMENT;
| | | | i = start; goto location 5;
| | | | | diffusion_par_bad.c 116.6--116.13: "i=start"
| | | end location 4;
| | | begin location 5
| | | | kind : CHOICE;
| | | | when i <= stop goto location 6;
| | | | | diffusion_par_bad.c 116.1--116.28: "for (i=start; i<=stop; i++)"
| | | | when !i <= stop goto location 8;
| | | | | diffusion_par_bad.c 116.1--116.28: "for (i=start; i<=stop; i++)"
| | | end location 5;
| | | begin location 6
| | | | kind : ASSIGNMENT;
| | | | *(v+i) = *(v_new+i); goto location 7;
| | | | | diffusion_par_bad.c 116.29--116.45: "v[i] = v_new[i];"
| | | end location 6;
| | | begin location 7
| | | | kind : ASSIGNMENT;
| | | | i = i+1; goto location 5;
| | | | | diffusion_par_bad.c 116.24--116.27: "i++"
| | | end location 7;
| | | begin location 8
| | | | kind : RETURN;
| | | | return null; goto location 9;
| | | | | diffusion_par_bad.c 117.0--117.0: "}"
| | | end location 8;
| | | begin location 9
| | | | kind : TERMINAL;
| | | end location 9;
| | end function update;
| | begin function main
| | | | diffusion_par_bad.c 120.0--120.11: "void main()"
| | | begin proper local variables
| | | | argc : int;
| | | | | diffusion_par_bad.c 121.1--121.10: "int argc;"
| | | | argv : pointer(6)<pointer(7)<char>>;
| | | | | diffusion_par_bad.c 122.1--122.13: "char **argv;"
| | | | iter : int;
| | | | | diffusion_par_bad.c 123.1--123.10: "int iter;"
| | | end proper local variables;
| | | start location : 0;
| | | begin location 0
| | | | kind : INVOCATION;
| | | | MPI_Init(&argc,&argv); goto location 1;
| | | | | diffusion_par_bad.c 125.1--125.23: "MPI_Init(&argc,&argv);"
| | | end location 0;
| | | begin location 1
| | | | kind : INVOCATION;
| | | | MPI_Comm_size(MPI_COMM_WORLD,&nprocs); goto location 2;
| | | | | diffusion_par_bad.c 126.1--126.40: "MPI_Comm_size(MPI_COMM_WORLD, &nprocs);"
| | | end location 1;
| | | begin location 2
| | | | kind : INVOCATION;
| | | | MPI_Comm_rank(MPI_COMM_WORLD,&myrank); goto location 3;
| | | | | diffusion_par_bad.c 127.1--127.40: "MPI_Comm_rank(MPI_COMM_WORLD, &myrank);"
| | | end location 2;
| | | begin location 3
| | | | kind : INVOCATION;
| | | | init(); goto location 4;
| | | | | diffusion_par_bad.c 128.1--128.8: "init();"
| | | end location 3;
| | | begin location 4
| | | | kind : INVOCATION;
| | | | write(0); goto location 5;
| | | | | diffusion_par_bad.c 129.1--129.10: "write(0);"
| | | end location 4;
| | | begin location 5
| | | | kind : ASSIGNMENT;
| | | | iter = 1; goto location 6;
| | | | | diffusion_par_bad.c 130.6--130.14: "iter = 1"
| | | end location 5;
| | | begin location 6
| | | | kind : CHOICE;
| | | | when iter <= nsteps goto location 7;
| | | | | diffusion_par_bad.c 130.1--130.39: "for (iter = 1; iter <= nsteps; iter++)"
| | | | when !iter <= nsteps goto location 11;
| | | | | diffusion_par_bad.c 130.1--130.39: "for (iter = 1; iter <= nsteps; iter++)"
| | | end location 6;
| | | begin location 7
| | | | kind : INVOCATION;
| | | | exchange_ghost_cells(); goto location 8;
| | | | | diffusion_par_bad.c 131.2--131.25: "exchange_ghost_cells();"
| | | end location 7;
| | | begin location 8
| | | | kind : INVOCATION;
| | | | update(); goto location 9;
| | | | | diffusion_par_bad.c 132.2--132.11: "update();"
| | | end location 8;
| | | begin location 9
| | | | kind : INVOCATION;
| | | | write(iter); goto location 10;
| | | | | diffusion_par_bad.c 133.2--133.14: "write(iter);"
| | | end location 9;
| | | begin location 10
| | | | kind : ASSIGNMENT;
| | | | iter = iter+1; goto location 6;
| | | | | diffusion_par_bad.c 130.32--130.38: "iter++"
| | | end location 10;
| | | begin location 11
| | | | kind : INVOCATION;
| | | | cleanup(); goto location 12;
| | | | | diffusion_par_bad.c 135.1--135.11: "cleanup();"
| | | end location 11;
| | | begin location 12
| | | | kind : INVOCATION;
| | | | MPI_Finalize(); goto location 13;
| | | | | diffusion_par_bad.c 136.1--136.16: "MPI_Finalize();"
| | | end location 12;
| | | begin location 13
| | | | kind : RETURN;
| | | | return null; goto location 14;
| | | | | diffusion_par_bad.c 137.0--137.0: "}"
| | | end location 13;
| | | begin location 14
| | | | kind : TERMINAL;
| | | end location 14;
| | end function main;
| | begin function free
| | | | null
| | | begin formal parameters
| | | | pointer : pointer(4)<void>;
| | | | | null
| | | end formal parameters;
| | end function free;
| | begin function MPI_Send
| | | | libmpi.c 147.0--148.28: "int MPI_Send(void* _buf, int _count, MPI_Datatype _datatype, int _dest, int _tag,             MPI_Comm _comm)"
| | | begin formal parameters
| | | | _buf : pointer(4)<void>;
| | | | | libmpi.c 147.13--147.23: "void* _buf"
| | | | _count : int;
| | | | | libmpi.c 147.25--147.35: "int _count"
| | | | _datatype : int;
| | | | | libmpi.c 147.37--147.59: "MPI_Datatype _datatype"
| | | | _dest : int;
| | | | | libmpi.c 147.61--147.70: "int _dest"
| | | | _tag : int;
| | | | | libmpi.c 147.72--147.80: "int _tag"
| | | | _comm : int;
| | | | | libmpi.c 148.13--148.27: "MPI_Comm _comm"
| | | end formal parameters;
| | | begin proper local variables
| | | | _result : int;
| | | | | libmpi.c 149.2--149.14: "int _result;"
| | | end proper local variables;
| | | start location : 0;
| | | begin location 0
| | | | kind : ASSERTION;
| | | | assert MPIX_State==MPIX_INITIALIZED; Attempt to call MPI_Send when MPI is not initialized goto location 1;
| | | | | libmpi.c 151.15--151.109: "assert MPIX_State == MPIX_INITIALIZED, "Attempt to call MPI_Send when MPI is not initialized";"
| | | end location 0;
| | | begin location 1
| | | | kind : CHOICE;
| | | | when _dest==MPI_PROC_NULL goto location 2;
| | | | | libmpi.c 152.2--152.29: "if (_dest == MPI_PROC_NULL)"
| | | | when !(_dest==MPI_PROC_NULL) goto location 3;
| | | | | libmpi.c 152.2--152.29: "if (_dest == MPI_PROC_NULL)"
| | | end location 1;
| | | begin location 2
| | | | kind : RETURN;
| | | | return 0; goto location 3;
| | | | | libmpi.c 153.4--153.13: "return 0;"
| | | end location 2;
| | | begin location 3
| | | | kind : ASSERTION;
| | | | assert _comm==MPI_COMM_WORLD;  goto location 4;
| | | | | libmpi.c 154.15--154.46: "assert _comm == MPI_COMM_WORLD;"
| | | end location 3;
| | | begin location 4
| | | | kind : CHOICE;
| | | | when _datatype==MPI_DOUBLE goto location 5;
| | | | | libmpi.c 155.2--155.30: "if (_datatype == MPI_DOUBLE)"
| | | | when !(_datatype==MPI_DOUBLE) goto location 6;
| | | | | libmpi.c 155.2--155.30: "if (_datatype == MPI_DOUBLE)"
| | | end location 4;
| | | begin location 5
| | | | kind : INVOCATION;
| | | | _result = MPIX_Send_double((pointer(3)<real>)_buf,_count,_dest,_tag,_comm); goto location 9;
| | | | | libmpi.c 156.4--156.74: "_result = MPIX_Send_double((double*)_buf, _count, _dest, _tag, _comm);"
| | | end location 5;
| | | begin location 6
| | | | kind : CHOICE;
| | | | when _datatype==MPI_INT goto location 7;
| | | | | libmpi.c 157.7--157.32: "if (_datatype == MPI_INT)"
| | | | when !(_datatype==MPI_INT) goto location 8;
| | | | | libmpi.c 157.7--157.32: "if (_datatype == MPI_INT)"
| | | end location 6;
| | | begin location 7
| | | | kind : INVOCATION;
| | | | _result = MPIX_Send_int((pointer(5)<int>)_buf,_count,_dest,_tag,_comm); goto location 9;
| | | | | libmpi.c 158.4--158.68: "_result = MPIX_Send_int((int*)_buf, _count, _dest, _tag, _comm);"
| | | end location 7;
| | | begin location 8
| | | | kind : ASSERTION;
| | | | assert false; Currently only MPI_DOUBLE and MPI_INT supported goto location 9;
| | | | | libmpi.c 160.17--160.81: "assert false, "Currently only MPI_DOUBLE and MPI_INT supported";"
| | | end location 8;
| | | begin location 9
| | | | kind : RETURN;
| | | | return _result; goto location 10;
| | | | | libmpi.c 161.2--161.17: "return _result;"
| | | end location 9;
| | | begin location 10
| | | | kind : TERMINAL;
| | | end location 10;
| | end function MPI_Send;
| | begin function MPIX_Send_double
| | | | libmpi.c 164.0--164.83: "int MPIX_Send_double(double* _buf, int _count, int _dest, int _tag, MPI_Comm _comm)"
| | | begin formal parameters
| | | | _buf : pointer(3)<real>;
| | | | | libmpi.c 164.21--164.33: "double* _buf"
| | | | _count : int;
| | | | | libmpi.c 164.35--164.45: "int _count"
| | | | _dest : int;
| | | | | libmpi.c 164.47--164.56: "int _dest"
| | | | _tag : int;
| | | | | libmpi.c 164.58--164.66: "int _tag"
| | | | _comm : int;
| | | | | libmpi.c 164.68--164.82: "MPI_Comm _comm"
| | | end formal parameters;
| | | begin proper local variables
| | | | _tmp : real[_count];
| | | | | libmpi.c 165.2--165.22: "double _tmp[_count];"
| | | | _i : int;
| | | | | libmpi.c 166.2--166.9: "int _i;"
| | | end proper local variables;
| | | start location : 0;
| | | begin location 0
| | | | kind : ASSIGNMENT;
| | | | _i = 0; goto location 1;
| | | | | libmpi.c 168.7--168.11: "_i=0"
| | | end location 0;
| | | begin location 1
| | | | kind : CHOICE;
| | | | when _i < _count goto location 2;
| | | | | libmpi.c 168.2--168.29: "for (_i=0; _i<_count; _i++)"
| | | | when !_i < _count goto location 4;
| | | | | libmpi.c 168.2--168.29: "for (_i=0; _i<_count; _i++)"
| | | end location 1;
| | | begin location 2
| | | | kind : ASSIGNMENT;
| | | | _tmp[_i] = *(_buf+_i); goto location 3;
| | | | | libmpi.c 168.30--168.50: "_tmp[_i] = _buf[_i];"
| | | end location 2;
| | | begin location 3
| | | | kind : ASSIGNMENT;
| | | | _i = _i+1; goto location 1;
| | | | | libmpi.c 168.24--168.28: "_i++"
| | | end location 3;
| | | begin location 4
| | | | kind : SEND;
| | | | send(_tmp,_dest,_tag); goto location 5;
| | | | | libmpi.c 169.2--169.26: "send(_tmp, _dest, _tag);"
| | | end location 4;
| | | begin location 5
| | | | kind : RETURN;
| | | | return 0; goto location 6;
| | | | | libmpi.c 170.2--170.11: "return 0;"
| | | end location 5;
| | | begin location 6
| | | | kind : TERMINAL;
| | | end location 6;
| | end function MPIX_Send_double;
| | begin function MPIX_Send_int
| | | | libmpi.c 173.0--173.77: "int MPIX_Send_int(int* _buf, int _count, int _dest, int _tag, MPI_Comm _comm)"
| | | begin formal parameters
| | | | _buf : pointer(5)<int>;
| | | | | libmpi.c 173.18--173.27: "int* _buf"
| | | | _count : int;
| | | | | libmpi.c 173.29--173.39: "int _count"
| | | | _dest : int;
| | | | | libmpi.c 173.41--173.50: "int _dest"
| | | | _tag : int;
| | | | | libmpi.c 173.52--173.60: "int _tag"
| | | | _comm : int;
| | | | | libmpi.c 173.62--173.76: "MPI_Comm _comm"
| | | end formal parameters;
| | | begin proper local variables
| | | | _tmp : int[_count];
| | | | | libmpi.c 174.2--174.19: "int _tmp[_count];"
| | | | _i : int;
| | | | | libmpi.c 175.2--175.9: "int _i;"
| | | end proper local variables;
| | | start location : 0;
| | | begin location 0
| | | | kind : ASSIGNMENT;
| | | | _i = 0; goto location 1;
| | | | | libmpi.c 177.7--177.11: "_i=0"
| | | end location 0;
| | | begin location 1
| | | | kind : CHOICE;
| | | | when _i < _count goto location 2;
| | | | | libmpi.c 177.2--177.29: "for (_i=0; _i<_count; _i++)"
| | | | when !_i < _count goto location 4;
| | | | | libmpi.c 177.2--177.29: "for (_i=0; _i<_count; _i++)"
| | | end location 1;
| | | begin location 2
| | | | kind : ASSIGNMENT;
| | | | _tmp[_i] = *(_buf+_i); goto location 3;
| | | | | libmpi.c 177.30--177.50: "_tmp[_i] = _buf[_i];"
| | | end location 2;
| | | begin location 3
| | | | kind : ASSIGNMENT;
| | | | _i = _i+1; goto location 1;
| | | | | libmpi.c 177.24--177.28: "_i++"
| | | end location 3;
| | | begin location 4
| | | | kind : SEND;
| | | | send(_tmp,_dest,_tag); goto location 5;
| | | | | libmpi.c 178.2--178.26: "send(_tmp, _dest, _tag);"
| | | end location 4;
| | | begin location 5
| | | | kind : RETURN;
| | | | return 0; goto location 6;
| | | | | libmpi.c 179.2--179.11: "return 0;"
| | | end location 5;
| | | begin location 6
| | | | kind : TERMINAL;
| | | end location 6;
| | end function MPIX_Send_int;
| | begin function MPI_Recv
| | | | libmpi.c 183.0--184.49: "int MPI_Recv(void* _buf, int _count, MPI_Datatype _datatype, int _source, int _tag,             MPI_Comm _comm, MPI_Status *_status)"
| | | begin formal parameters
| | | | _buf : pointer(4)<void>;
| | | | | libmpi.c 183.13--183.23: "void* _buf"
| | | | _count : int;
| | | | | libmpi.c 183.25--183.35: "int _count"
| | | | _datatype : int;
| | | | | libmpi.c 183.37--183.59: "MPI_Datatype _datatype"
| | | | _source : int;
| | | | | libmpi.c 183.61--183.72: "int _source"
| | | | _tag : int;
| | | | | libmpi.c 183.74--183.82: "int _tag"
| | | | _comm : int;
| | | | | libmpi.c 184.13--184.27: "MPI_Comm _comm"
| | | | _status : pointer(2)<Record[MPI_Status; MPI_SOURCE:int, MPI_TAG:int, SIZE:int]>;
| | | | | libmpi.c 184.29--184.48: "MPI_Status *_status"
| | | end formal parameters;
| | | begin proper local variables
| | | | _result : int;
| | | | | libmpi.c 185.2--185.14: "int _result;"
| | | end proper local variables;
| | | start location : 0;
| | | begin location 0
| | | | kind : ASSERTION;
| | | | assert MPIX_State==MPIX_INITIALIZED; Attempt to call MPI_Recv when MPI is not initialized goto location 1;
| | | | | libmpi.c 187.15--187.109: "assert MPIX_State == MPIX_INITIALIZED, "Attempt to call MPI_Recv when MPI is not initialized";"
| | | end location 0;
| | | begin location 1
| | | | kind : CHOICE;
| | | | when _source==MPI_PROC_NULL goto location 2;
| | | | | libmpi.c 188.3--188.32: "if (_source == MPI_PROC_NULL)"
| | | | when !(_source==MPI_PROC_NULL) goto location 3;
| | | | | libmpi.c 188.3--188.32: "if (_source == MPI_PROC_NULL)"
| | | end location 1;
| | | begin location 2
| | | | kind : RETURN;
| | | | return 0; goto location 3;
| | | | | libmpi.c 189.4--189.13: "return 0;"
| | | end location 2;
| | | begin location 3
| | | | kind : ASSERTION;
| | | | assert _comm==MPI_COMM_WORLD;  goto location 4;
| | | | | libmpi.c 190.15--190.46: "assert _comm == MPI_COMM_WORLD;"
| | | end location 3;
| | | begin location 4
| | | | kind : CHOICE;
| | | | when _datatype==MPI_DOUBLE goto location 5;
| | | | | libmpi.c 191.2--191.30: "if (_datatype == MPI_DOUBLE)"
| | | | when !(_datatype==MPI_DOUBLE) goto location 6;
| | | | | libmpi.c 191.2--191.30: "if (_datatype == MPI_DOUBLE)"
| | | end location 4;
| | | begin location 5
| | | | kind : INVOCATION;
| | | | _result = MPIX_Recv_double((pointer(3)<real>)_buf,_count,_source,_tag,_comm,_status); goto location 9;
| | | | | libmpi.c 192.4--192.85: "_result = MPIX_Recv_double((double*)_buf, _count, _source, _tag, _comm, _status);"
| | | end location 5;
| | | begin location 6
| | | | kind : CHOICE;
| | | | when _datatype==MPI_INT goto location 7;
| | | | | libmpi.c 193.7--193.32: "if (_datatype == MPI_INT)"
| | | | when !(_datatype==MPI_INT) goto location 8;
| | | | | libmpi.c 193.7--193.32: "if (_datatype == MPI_INT)"
| | | end location 6;
| | | begin location 7
| | | | kind : INVOCATION;
| | | | _result = MPIX_Recv_int((pointer(5)<int>)_buf,_count,_source,_tag,_comm,_status); goto location 9;
| | | | | libmpi.c 194.4--194.79: "_result = MPIX_Recv_int((int*)_buf, _count, _source, _tag, _comm, _status);"
| | | end location 7;
| | | begin location 8
| | | | kind : ASSERTION;
| | | | assert false;  goto location 9;
| | | | | libmpi.c 196.17--196.30: "assert false;"
| | | end location 8;
| | | begin location 9
| | | | kind : RETURN;
| | | | return _result; goto location 10;
| | | | | libmpi.c 197.2--197.17: "return _result;"
| | | end location 9;
| | | begin location 10
| | | | kind : TERMINAL;
| | | end location 10;
| | end function MPI_Recv;
| | begin function MPIX_Recv_double
| | | | libmpi.c 200.0--201.41: "int MPIX_Recv_double(double *_buf, int _count, int _source, int _tag, MPI_Comm _comm,                     MPI_Status *_status)"
| | | begin formal parameters
| | | | _buf : pointer(3)<real>;
| | | | | libmpi.c 200.21--200.33: "double *_buf"
| | | | _count : int;
| | | | | libmpi.c 200.35--200.45: "int _count"
| | | | _source : int;
| | | | | libmpi.c 200.47--200.58: "int _source"
| | | | _tag : int;
| | | | | libmpi.c 200.60--200.68: "int _tag"
| | | | _comm : int;
| | | | | libmpi.c 200.70--200.84: "MPI_Comm _comm"
| | | | _status : pointer(2)<Record[MPI_Status; MPI_SOURCE:int, MPI_TAG:int, SIZE:int]>;
| | | | | libmpi.c 201.21--201.40: "MPI_Status *_status"
| | | end formal parameters;
| | | begin proper local variables
| | | | _tmp : real[_count];
| | | | | libmpi.c 202.2--202.22: "double _tmp[_count];"
| | | | _i : int;
| | | | | libmpi.c 203.2--203.9: "int _i;"
| | | | thesource : int;
| | | | | libmpi.c 204.2--204.16: "int thesource;"
| | | | thetag : int;
| | | | | libmpi.c 205.2--205.13: "int thetag;"
| | | | thesize : int;
| | | | | libmpi.c 206.2--206.14: "int thesize;"
| | | | thecount : int;
| | | | | libmpi.c 207.2--207.15: "int thecount;"
| | | end proper local variables;
| | | start location : 0;
| | | begin location 0
| | | | kind : CHOICE;
| | | | when !(_source==MPI_ANY_SOURCE) && !(_tag==MPI_ANY_TAG) goto location 1;
| | | | | libmpi.c 209.2--209.55: "if (_source != MPI_ANY_SOURCE && _tag != MPI_ANY_TAG)"
| | | | when !(!(_source==MPI_ANY_SOURCE) && !(_tag==MPI_ANY_TAG)) goto location 4;
| | | | | libmpi.c 209.2--209.55: "if (_source != MPI_ANY_SOURCE && _tag != MPI_ANY_TAG)"
| | | end location 0;
| | | begin location 1
| | | | kind : RECEIVE;
| | | | recv(_tmp,_source,_tag, thesize); goto location 2;
| | | | | libmpi.c 210.4--210.39: "recv(_tmp, _source, _tag, thesize);"
| | | end location 1;
| | | begin location 2
| | | | kind : ASSIGNMENT;
| | | | thesource = _source; goto location 3;
| | | | | libmpi.c 211.4--211.24: "thesource = _source;"
| | | end location 2;
| | | begin location 3
| | | | kind : ASSIGNMENT;
| | | | thetag = _tag; goto location 21;
| | | | | libmpi.c 212.4--212.18: "thetag = _tag;"
| | | end location 3;
| | | begin location 4
| | | | kind : CHOICE;
| | | | when !(_source==MPI_ANY_SOURCE) && (_tag==MPI_ANY_TAG) goto location 5;
| | | | | libmpi.c 213.9--213.62: "if (_source != MPI_ANY_SOURCE && _tag == MPI_ANY_TAG)"
| | | | when !(!(_source==MPI_ANY_SOURCE) && (_tag==MPI_ANY_TAG)) goto location 7;
| | | | | libmpi.c 213.9--213.62: "if (_source != MPI_ANY_SOURCE && _tag == MPI_ANY_TAG)"
| | | end location 4;
| | | begin location 5
| | | | kind : RECEIVE;
| | | | recv(_tmp,_source,any(thetag), thesize); goto location 6;
| | | | | libmpi.c 214.4--214.46: "recv(_tmp, _source, any(thetag), thesize);"
| | | end location 5;
| | | begin location 6
| | | | kind : ASSIGNMENT;
| | | | thesource = _source; goto location 21;
| | | | | libmpi.c 215.4--215.24: "thesource = _source;"
| | | end location 6;
| | | begin location 7
| | | | kind : CHOICE;
| | | | when (_source==MPI_ANY_SOURCE) && !(_tag==MPI_ANY_TAG) goto location 8;
| | | | | libmpi.c 216.9--216.62: "if (_source == MPI_ANY_SOURCE && _tag != MPI_ANY_TAG)"
| | | | when !((_source==MPI_ANY_SOURCE) && !(_tag==MPI_ANY_TAG)) goto location 15;
| | | | | libmpi.c 216.9--216.62: "if (_source == MPI_ANY_SOURCE && _tag != MPI_ANY_TAG)"
| | | end location 7;
| | | begin location 8
| | | | kind : RECEIVE;
| | | | recv(_tmp,0,_tag, thesize); goto location 9;
| | | | | libmpi.c 217.4--217.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | | recv(_tmp,1,_tag, thesize); goto location 10;
| | | | | libmpi.c 217.4--217.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | | recv(_tmp,2,_tag, thesize); goto location 11;
| | | | | libmpi.c 217.4--217.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | | recv(_tmp,3,_tag, thesize); goto location 12;
| | | | | libmpi.c 217.4--217.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | | recv(_tmp,4,_tag, thesize); goto location 13;
| | | | | libmpi.c 217.4--217.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | end location 8;
| | | begin location 9
| | | | kind : ASSIGNMENT;
| | | | thesource = 0; goto location 14;
| | | | | libmpi.c 217.4--217.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | end location 9;
| | | begin location 10
| | | | kind : ASSIGNMENT;
| | | | thesource = 1; goto location 14;
| | | | | libmpi.c 217.4--217.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | end location 10;
| | | begin location 11
| | | | kind : ASSIGNMENT;
| | | | thesource = 2; goto location 14;
| | | | | libmpi.c 217.4--217.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | end location 11;
| | | begin location 12
| | | | kind : ASSIGNMENT;
| | | | thesource = 3; goto location 14;
| | | | | libmpi.c 217.4--217.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | end location 12;
| | | begin location 13
| | | | kind : ASSIGNMENT;
| | | | thesource = 4; goto location 14;
| | | | | libmpi.c 217.4--217.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | end location 13;
| | | begin location 14
| | | | kind : ASSIGNMENT;
| | | | thetag = _tag; goto location 21;
| | | | | libmpi.c 218.4--218.18: "thetag = _tag;"
| | | end location 14;
| | | begin location 15
| | | | kind : RECEIVE;
| | | | recv(_tmp,0,any(thetag), thesize); goto location 16;
| | | | | libmpi.c 220.4--220.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | | recv(_tmp,1,any(thetag), thesize); goto location 17;
| | | | | libmpi.c 220.4--220.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | | recv(_tmp,2,any(thetag), thesize); goto location 18;
| | | | | libmpi.c 220.4--220.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | | recv(_tmp,3,any(thetag), thesize); goto location 19;
| | | | | libmpi.c 220.4--220.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | | recv(_tmp,4,any(thetag), thesize); goto location 20;
| | | | | libmpi.c 220.4--220.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | end location 15;
| | | begin location 16
| | | | kind : ASSIGNMENT;
| | | | thesource = 0; goto location 21;
| | | | | libmpi.c 220.4--220.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | end location 16;
| | | begin location 17
| | | | kind : ASSIGNMENT;
| | | | thesource = 1; goto location 21;
| | | | | libmpi.c 220.4--220.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | end location 17;
| | | begin location 18
| | | | kind : ASSIGNMENT;
| | | | thesource = 2; goto location 21;
| | | | | libmpi.c 220.4--220.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | end location 18;
| | | begin location 19
| | | | kind : ASSIGNMENT;
| | | | thesource = 3; goto location 21;
| | | | | libmpi.c 220.4--220.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | end location 19;
| | | begin location 20
| | | | kind : ASSIGNMENT;
| | | | thesource = 4; goto location 21;
| | | | | libmpi.c 220.4--220.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | end location 20;
| | | begin location 21
| | | | kind : CHOICE;
| | | | when !(_status==MPI_STATUS_IGNORE) goto location 22;
| | | | | libmpi.c 222.2--222.35: "if (_status != MPI_STATUS_IGNORE)"
| | | | when !!(_status==MPI_STATUS_IGNORE) goto location 25;
| | | | | libmpi.c 222.2--222.35: "if (_status != MPI_STATUS_IGNORE)"
| | | end location 21;
| | | begin location 22
| | | | kind : ASSIGNMENT;
| | | | *_status.MPI_SOURCE = thesource; goto location 23;
| | | | | libmpi.c 223.4--223.36: "_status->MPI_SOURCE = thesource;"
| | | end location 22;
| | | begin location 23
| | | | kind : ASSIGNMENT;
| | | | *_status.MPI_TAG = thetag; goto location 24;
| | | | | libmpi.c 224.4--224.30: "_status->MPI_TAG = thetag;"
| | | end location 23;
| | | begin location 24
| | | | kind : ASSIGNMENT;
| | | | *_status.SIZE = thesize; goto location 25;
| | | | | libmpi.c 225.4--225.28: "_status->SIZE = thesize;"
| | | end location 24;
| | | begin location 25
| | | | kind : ASSIGNMENT;
| | | | thecount = thesize/sizeof(real); goto location 26;
| | | | | libmpi.c 227.2--227.36: "thecount = thesize/sizeof(double);"
| | | end location 25;
| | | begin location 26
| | | | kind : ASSIGNMENT;
| | | | _i = 0; goto location 27;
| | | | | libmpi.c 228.7--228.11: "_i=0"
| | | end location 26;
| | | begin location 27
| | | | kind : CHOICE;
| | | | when _i < thecount goto location 28;
| | | | | libmpi.c 228.2--228.31: "for (_i=0; _i<thecount; _i++)"
| | | | when !_i < thecount goto location 30;
| | | | | libmpi.c 228.2--228.31: "for (_i=0; _i<thecount; _i++)"
| | | end location 27;
| | | begin location 28
| | | | kind : ASSIGNMENT;
| | | | *(_buf+_i) = _tmp[_i]; goto location 29;
| | | | | libmpi.c 228.32--228.52: "_buf[_i] = _tmp[_i];"
| | | end location 28;
| | | begin location 29
| | | | kind : ASSIGNMENT;
| | | | _i = _i+1; goto location 27;
| | | | | libmpi.c 228.26--228.30: "_i++"
| | | end location 29;
| | | begin location 30
| | | | kind : RETURN;
| | | | return 0; goto location 31;
| | | | | libmpi.c 229.2--229.11: "return 0;"
| | | end location 30;
| | | begin location 31
| | | | kind : TERMINAL;
| | | end location 31;
| | end function MPIX_Recv_double;
| | begin function MPIX_Recv_int
| | | | libmpi.c 232.0--233.41: "int MPIX_Recv_int(int *_buf, int _count, int _source, int _tag, MPI_Comm _comm,                     MPI_Status *_status)"
| | | begin formal parameters
| | | | _buf : pointer(5)<int>;
| | | | | libmpi.c 232.18--232.27: "int *_buf"
| | | | _count : int;
| | | | | libmpi.c 232.29--232.39: "int _count"
| | | | _source : int;
| | | | | libmpi.c 232.41--232.52: "int _source"
| | | | _tag : int;
| | | | | libmpi.c 232.54--232.62: "int _tag"
| | | | _comm : int;
| | | | | libmpi.c 232.64--232.78: "MPI_Comm _comm"
| | | | _status : pointer(2)<Record[MPI_Status; MPI_SOURCE:int, MPI_TAG:int, SIZE:int]>;
| | | | | libmpi.c 233.21--233.40: "MPI_Status *_status"
| | | end formal parameters;
| | | begin proper local variables
| | | | _tmp : int[_count];
| | | | | libmpi.c 234.2--234.19: "int _tmp[_count];"
| | | | _i : int;
| | | | | libmpi.c 235.2--235.9: "int _i;"
| | | | thesource : int;
| | | | | libmpi.c 236.2--236.16: "int thesource;"
| | | | thetag : int;
| | | | | libmpi.c 237.2--237.13: "int thetag;"
| | | | thesize : int;
| | | | | libmpi.c 238.2--238.14: "int thesize;"
| | | | thecount : int;
| | | | | libmpi.c 239.2--239.15: "int thecount;"
| | | end proper local variables;
| | | start location : 0;
| | | begin location 0
| | | | kind : CHOICE;
| | | | when !(_source==MPI_ANY_SOURCE) && !(_tag==MPI_ANY_TAG) goto location 1;
| | | | | libmpi.c 241.2--241.55: "if (_source != MPI_ANY_SOURCE && _tag != MPI_ANY_TAG)"
| | | | when !(!(_source==MPI_ANY_SOURCE) && !(_tag==MPI_ANY_TAG)) goto location 4;
| | | | | libmpi.c 241.2--241.55: "if (_source != MPI_ANY_SOURCE && _tag != MPI_ANY_TAG)"
| | | end location 0;
| | | begin location 1
| | | | kind : RECEIVE;
| | | | recv(_tmp,_source,_tag, thesize); goto location 2;
| | | | | libmpi.c 242.4--242.39: "recv(_tmp, _source, _tag, thesize);"
| | | end location 1;
| | | begin location 2
| | | | kind : ASSIGNMENT;
| | | | thesource = _source; goto location 3;
| | | | | libmpi.c 243.4--243.24: "thesource = _source;"
| | | end location 2;
| | | begin location 3
| | | | kind : ASSIGNMENT;
| | | | thetag = _tag; goto location 21;
| | | | | libmpi.c 244.4--244.18: "thetag = _tag;"
| | | end location 3;
| | | begin location 4
| | | | kind : CHOICE;
| | | | when !(_source==MPI_ANY_SOURCE) && (_tag==MPI_ANY_TAG) goto location 5;
| | | | | libmpi.c 245.9--245.62: "if (_source != MPI_ANY_SOURCE && _tag == MPI_ANY_TAG)"
| | | | when !(!(_source==MPI_ANY_SOURCE) && (_tag==MPI_ANY_TAG)) goto location 7;
| | | | | libmpi.c 245.9--245.62: "if (_source != MPI_ANY_SOURCE && _tag == MPI_ANY_TAG)"
| | | end location 4;
| | | begin location 5
| | | | kind : RECEIVE;
| | | | recv(_tmp,_source,any(thetag), thesize); goto location 6;
| | | | | libmpi.c 246.4--246.46: "recv(_tmp, _source, any(thetag), thesize);"
| | | end location 5;
| | | begin location 6
| | | | kind : ASSIGNMENT;
| | | | thesource = _source; goto location 21;
| | | | | libmpi.c 247.4--247.24: "thesource = _source;"
| | | end location 6;
| | | begin location 7
| | | | kind : CHOICE;
| | | | when (_source==MPI_ANY_SOURCE) && !(_tag==MPI_ANY_TAG) goto location 8;
| | | | | libmpi.c 248.9--248.62: "if (_source == MPI_ANY_SOURCE && _tag != MPI_ANY_TAG)"
| | | | when !((_source==MPI_ANY_SOURCE) && !(_tag==MPI_ANY_TAG)) goto location 15;
| | | | | libmpi.c 248.9--248.62: "if (_source == MPI_ANY_SOURCE && _tag != MPI_ANY_TAG)"
| | | end location 7;
| | | begin location 8
| | | | kind : RECEIVE;
| | | | recv(_tmp,0,_tag, thesize); goto location 9;
| | | | | libmpi.c 249.4--249.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | | recv(_tmp,1,_tag, thesize); goto location 10;
| | | | | libmpi.c 249.4--249.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | | recv(_tmp,2,_tag, thesize); goto location 11;
| | | | | libmpi.c 249.4--249.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | | recv(_tmp,3,_tag, thesize); goto location 12;
| | | | | libmpi.c 249.4--249.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | | recv(_tmp,4,_tag, thesize); goto location 13;
| | | | | libmpi.c 249.4--249.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | end location 8;
| | | begin location 9
| | | | kind : ASSIGNMENT;
| | | | thesource = 0; goto location 14;
| | | | | libmpi.c 249.4--249.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | end location 9;
| | | begin location 10
| | | | kind : ASSIGNMENT;
| | | | thesource = 1; goto location 14;
| | | | | libmpi.c 249.4--249.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | end location 10;
| | | begin location 11
| | | | kind : ASSIGNMENT;
| | | | thesource = 2; goto location 14;
| | | | | libmpi.c 249.4--249.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | end location 11;
| | | begin location 12
| | | | kind : ASSIGNMENT;
| | | | thesource = 3; goto location 14;
| | | | | libmpi.c 249.4--249.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | end location 12;
| | | begin location 13
| | | | kind : ASSIGNMENT;
| | | | thesource = 4; goto location 14;
| | | | | libmpi.c 249.4--249.46: "recv(_tmp, any(thesource), _tag, thesize);"
| | | end location 13;
| | | begin location 14
| | | | kind : ASSIGNMENT;
| | | | thetag = _tag; goto location 21;
| | | | | libmpi.c 250.4--250.18: "thetag = _tag;"
| | | end location 14;
| | | begin location 15
| | | | kind : RECEIVE;
| | | | recv(_tmp,0,any(thetag), thesize); goto location 16;
| | | | | libmpi.c 252.4--252.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | | recv(_tmp,1,any(thetag), thesize); goto location 17;
| | | | | libmpi.c 252.4--252.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | | recv(_tmp,2,any(thetag), thesize); goto location 18;
| | | | | libmpi.c 252.4--252.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | | recv(_tmp,3,any(thetag), thesize); goto location 19;
| | | | | libmpi.c 252.4--252.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | | recv(_tmp,4,any(thetag), thesize); goto location 20;
| | | | | libmpi.c 252.4--252.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | end location 15;
| | | begin location 16
| | | | kind : ASSIGNMENT;
| | | | thesource = 0; goto location 21;
| | | | | libmpi.c 252.4--252.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | end location 16;
| | | begin location 17
| | | | kind : ASSIGNMENT;
| | | | thesource = 1; goto location 21;
| | | | | libmpi.c 252.4--252.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | end location 17;
| | | begin location 18
| | | | kind : ASSIGNMENT;
| | | | thesource = 2; goto location 21;
| | | | | libmpi.c 252.4--252.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | end location 18;
| | | begin location 19
| | | | kind : ASSIGNMENT;
| | | | thesource = 3; goto location 21;
| | | | | libmpi.c 252.4--252.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | end location 19;
| | | begin location 20
| | | | kind : ASSIGNMENT;
| | | | thesource = 4; goto location 21;
| | | | | libmpi.c 252.4--252.53: "recv(_tmp, any(thesource), any(thetag), thesize);"
| | | end location 20;
| | | begin location 21
| | | | kind : CHOICE;
| | | | when !(_status==MPI_STATUS_IGNORE) goto location 22;
| | | | | libmpi.c 254.2--254.35: "if (_status != MPI_STATUS_IGNORE)"
| | | | when !!(_status==MPI_STATUS_IGNORE) goto location 25;
| | | | | libmpi.c 254.2--254.35: "if (_status != MPI_STATUS_IGNORE)"
| | | end location 21;
| | | begin location 22
| | | | kind : ASSIGNMENT;
| | | | *_status.MPI_SOURCE = thesource; goto location 23;
| | | | | libmpi.c 255.4--255.36: "_status->MPI_SOURCE = thesource;"
| | | end location 22;
| | | begin location 23
| | | | kind : ASSIGNMENT;
| | | | *_status.MPI_TAG = thetag; goto location 24;
| | | | | libmpi.c 256.4--256.30: "_status->MPI_TAG = thetag;"
| | | end location 23;
| | | begin location 24
| | | | kind : ASSIGNMENT;
| | | | *_status.SIZE = thesize; goto location 25;
| | | | | libmpi.c 257.4--257.28: "_status->SIZE = thesize;"
| | | end location 24;
| | | begin location 25
| | | | kind : ASSIGNMENT;
| | | | thecount = thesize/sizeof(int); goto location 26;
| | | | | libmpi.c 259.2--259.33: "thecount = thesize/sizeof(int);"
| | | end location 25;
| | | begin location 26
| | | | kind : ASSIGNMENT;
| | | | _i = 0; goto location 27;
| | | | | libmpi.c 260.7--260.11: "_i=0"
| | | end location 26;
| | | begin location 27
| | | | kind : CHOICE;
| | | | when _i < thecount goto location 28;
| | | | | libmpi.c 260.2--260.31: "for (_i=0; _i<thecount; _i++)"
| | | | when !_i < thecount goto location 30;
| | | | | libmpi.c 260.2--260.31: "for (_i=0; _i<thecount; _i++)"
| | | end location 27;
| | | begin location 28
| | | | kind : ASSIGNMENT;
| | | | *(_buf+_i) = _tmp[_i]; goto location 29;
| | | | | libmpi.c 260.32--260.52: "_buf[_i] = _tmp[_i];"
| | | end location 28;
| | | begin location 29
| | | | kind : ASSIGNMENT;
| | | | _i = _i+1; goto location 27;
| | | | | libmpi.c 260.26--260.30: "_i++"
| | | end location 29;
| | | begin location 30
| | | | kind : RETURN;
| | | | return 0; goto location 31;
| | | | | libmpi.c 261.2--261.11: "return 0;"
| | | end location 30;
| | | begin location 31
| | | | kind : TERMINAL;
| | | end location 31;
| | end function MPIX_Recv_int;
| | begin function MPI_Init
| | | | libmpi.c 101.0--101.37: "int MPI_Init(int *argc, char ***argv)"
| | | begin formal parameters
| | | | argc : pointer(5)<int>;
| | | | | libmpi.c 101.13--101.22: "int *argc"
| | | | argv : pointer(8)<pointer(6)<pointer(7)<char>>>;
| | | | | libmpi.c 101.24--101.36: "char ***argv"
| | | end formal parameters;
| | | start location : 0;
| | | begin location 0
| | | | kind : ASSERTION;
| | | | assert MPIX_State==MPIX_UNINITIALIZED; Attempt to call MPI_Init when MPI is already initialized goto location 1;
| | | | | libmpi.c 102.15--102.115: "assert MPIX_State == MPIX_UNINITIALIZED, "Attempt to call MPI_Init when MPI is already initialized";"
| | | end location 0;
| | | begin location 1
| | | | kind : ASSIGNMENT;
| | | | MPIX_State = MPIX_INITIALIZED; goto location 2;
| | | | | libmpi.c 103.2--103.32: "MPIX_State = MPIX_INITIALIZED;"
| | | end location 1;
| | | begin location 2
| | | | kind : RETURN;
| | | | return 0; goto location 3;
| | | | | libmpi.c 104.2--104.11: "return 0;"
| | | end location 2;
| | | begin location 3
| | | | kind : TERMINAL;
| | | end location 3;
| | end function MPI_Init;
| | begin function MPI_Comm_size
| | | | libmpi.c 121.0--121.45: "int MPI_Comm_size(MPI_Comm _comm, int *_size)"
| | | begin formal parameters
| | | | _comm : int;
| | | | | libmpi.c 121.18--121.32: "MPI_Comm _comm"
| | | | _size : pointer(5)<int>;
| | | | | libmpi.c 121.34--121.44: "int *_size"
| | | end formal parameters;
| | | start location : 0;
| | | begin location 0
| | | | kind : ASSERTION;
| | | | assert MPIX_State==MPIX_INITIALIZED; Attempt to call MPI_Comm_size when MPI is not initialized goto location 1;
| | | | | libmpi.c 122.15--122.114: "assert MPIX_State == MPIX_INITIALIZED, "Attempt to call MPI_Comm_size when MPI is not initialized";"
| | | end location 0;
| | | begin location 1
| | | | kind : ASSERTION;
| | | | assert _comm==MPI_COMM_WORLD;  goto location 2;
| | | | | libmpi.c 124.15--124.46: "assert _comm == MPI_COMM_WORLD;"
| | | end location 1;
| | | begin location 2
| | | | kind : ASSIGNMENT;
| | | | *_size = 5; goto location 3;
| | | | | libmpi.c 125.2--125.18: "*_size = NPROCS;"
| | | end location 2;
| | | begin location 3
| | | | kind : RETURN;
| | | | return 0; goto location 4;
| | | | | libmpi.c 126.2--126.11: "return 0;"
| | | end location 3;
| | | begin location 4
| | | | kind : TERMINAL;
| | | end location 4;
| | end function MPI_Comm_size;
| | begin function MPI_Comm_rank
| | | | libmpi.c 113.0--113.45: "int MPI_Comm_rank(MPI_Comm _comm, int *_rank)"
| | | begin formal parameters
| | | | _comm : int;
| | | | | libmpi.c 113.18--113.32: "MPI_Comm _comm"
| | | | _rank : pointer(5)<int>;
| | | | | libmpi.c 113.34--113.44: "int *_rank"
| | | end formal parameters;
| | | start location : 0;
| | | begin location 0
| | | | kind : ASSERTION;
| | | | assert MPIX_State==MPIX_INITIALIZED; Attempt to call MPI_Comm_rank when MPI is not initialized goto location 1;
| | | | | libmpi.c 114.15--114.114: "assert MPIX_State == MPIX_INITIALIZED, "Attempt to call MPI_Comm_rank when MPI is not initialized";"
| | | end location 0;
| | | begin location 1
| | | | kind : ASSERTION;
| | | | assert _comm==MPI_COMM_WORLD;  goto location 2;
| | | | | libmpi.c 116.15--116.46: "assert _comm == MPI_COMM_WORLD;"
| | | end location 1;
| | | begin location 2
| | | | kind : ASSIGNMENT;
| | | | *_rank = 4; goto location 3;
| | | | | libmpi.c 117.2--117.15: "*_rank = PID;"
| | | end location 2;
| | | begin location 3
| | | | kind : RETURN;
| | | | return 0; goto location 4;
| | | | | libmpi.c 118.2--118.11: "return 0;"
| | | end location 3;
| | | begin location 4
| | | | kind : TERMINAL;
| | | end location 4;
| | end function MPI_Comm_rank;
| | begin function MPI_Finalize
| | | | libmpi.c 107.0--107.18: "int MPI_Finalize()"
| | | start location : 0;
| | | begin location 0
| | | | kind : ASSERTION;
| | | | assert MPIX_State==MPIX_INITIALIZED; Attempt to call MPI_Finalize when MPI is not initialized goto location 1;
| | | | | libmpi.c 108.15--108.113: "assert MPIX_State == MPIX_INITIALIZED, "Attempt to call MPI_Finalize when MPI is not initialized";"
| | | end location 0;
| | | begin location 1
| | | | kind : ASSIGNMENT;
| | | | MPIX_State = MPIX_FINALIZED; goto location 2;
| | | | | libmpi.c 109.2--109.30: "MPIX_State = MPIX_FINALIZED;"
| | | end location 1;
| | | begin location 2
| | | | kind : RETURN;
| | | | return 0; goto location 3;
| | | | | libmpi.c 110.2--110.11: "return 0;"
| | | end location 2;
| | | begin location 3
| | | | kind : TERMINAL;
| | | end location 3;
| | end function MPI_Finalize;
| end process 4;
end model diffusion_par_bad_5_2.
