Example Stommel Code Output

Data generated running stc_01d.c with the input file st.mini

Program Task 0 Task 1 Task 2
  for( i=1; i<=steps;i++) {
fprintf(fout,"block 9 i=%d\n",i);
mat_out(fout,"block 10 psi",psi,i1-1,i2+1,j1-1,j2+1);







    do_jacobi(psi,new_psi,&mydiff,i1,i2,j1,j2);
fprintf(fout,"block 11 mydiff=%g\n",mydiff);
mat_out(fout,"block 12 psi",psi,i1-1,i2+1,j1-1,j2+1);







    do_transfer(psi,i1,i2,j1,j2);
mat_out(fout,"block 13 psi",psi,i1-1,i2+1,j1-1,j2+1);






    mpi_err= MPI_Reduce(&mydiff,&diff,1,MPI_DOUBLE,
              MPI_SUM,mpi_master,MPI_COMM_WORLD);
fprintf(fout,"block 14 diff=%g\n",diff);
    if(myid == mpi_master && i % iout == 0){
       printf("%8d %15.5f\n",i,diff);
      }
  }
		

block 9 i=1
block 10 psi[0:3][0:7]
         0         0         0         0
         0         1         1         1
         0         1         1         1
         0         1         1         1
         0         1         1         1
         0         1         1         1
         0         1         1         1
         0         0         0         0
block 11 mydiff=5.96093e+07
block 12 psi[0:3][0:7]
         0         0         0         0
         0   2951591   2951591         1
         0   5318583   5318583         1
         0   6632164   6632164         1
         0   6632164   6632164         1
         0   5318583   5318583         1
         0   2951591   2951591         1
         0         0         0         0
block 13 psi[0:3][0:7]
         0         0         0         0
         0   2951591   2951591   2951591
         0   5318583   5318583   5318583
         0   6632164   6632164   6632164
         0   6632164   6632164   6632164
         0   5318583   5318583   5318583
         0   2951591   2951591   2951591
         0         0         0         0
block 14 diff=1.78828e+08
		

block 9 i=1
block 10 psi[2:5][0:7]
         0         0         0         0
         1         1         1         1
         1         1         1         1
         1         1         1         1
         1         1         1         1
         1         1         1         1
         1         1         1         1
         0         0         0         0
block 11 mydiff=5.96093e+07
block 12 psi[2:5][0:7]
         0         0         0         0
         1   2951591   2951591         1
         1   5318583   5318583         1
         1   6632164   6632164         1
         1   6632164   6632164         1
         1   5318583   5318583         1
         1   2951591   2951591         1
         0         0         0         0
block 13 psi[2:5][0:7]
         0         0         0         0
   2951591   2951591   2951591   2951591
   5318583   5318583   5318583   5318583
   6632164   6632164   6632164   6632164
   6632164   6632164   6632164   6632164
   5318583   5318583   5318583   5318583
   2951591   2951591   2951591   2951591
         0         0         0         0
block 14 diff=2.122e-314
		

block 9 i=1
block 10 psi[4:7][0:7]
         0         0         0         0
         1         1         1         0
         1         1         1         0
         1         1         1         0
         1         1         1         0
         1         1         1         0
         1         1         1         0
         0         0         0         0
block 11 mydiff=5.96093e+07
block 12 psi[4:7][0:7]
         0         0         0         0
         1   2951591   2951590         0
         1   5318583   5318582         0
         1   6632164   6632163         0
         1   6632164   6632163         0
         1   5318583   5318582         0
         1   2951591   2951590         0
         0         0         0         0
block 13 psi[4:7][0:7]
         0         0         0         0
   2951591   2951591   2951590         0
   5318583   5318583   5318582         0
   6632164   6632164   6632163         0
   6632164   6632164   6632163         0
   5318583   5318583   5318582         0
   2951591   2951591   2951590         0
         0         0         0         0
block 14 diff=0
		

Program Task 0 Task 1 Task 2
  for( i=1; i<=steps;i++) {
fprintf(fout,"block 9 i=%d\n",i);
mat_out(fout,"block 10 psi",psi,i1-1,i2+1,j1-1,j2+1);







    do_jacobi(psi,new_psi,&mydiff,i1,i2,j1,j2);
fprintf(fout,"block 11 mydiff=%g\n",mydiff);
mat_out(fout,"block 12 psi",psi,i1-1,i2+1,j1-1,j2+1);







    do_transfer(psi,i1,i2,j1,j2);
mat_out(fout,"block 13 psi",psi,i1-1,i2+1,j1-1,j2+1);






    mpi_err= MPI_Reduce(&mydiff,&diff,1,MPI_DOUBLE,
              MPI_SUM,mpi_master,MPI_COMM_WORLD);
fprintf(fout,"block 14 diff=%g\n",diff);
    if(myid == mpi_master && i % iout == 0){
       printf("%8d %15.5f\n",i,diff);
      }
  }
		

block 9 i=2
block 10 psi[0:3][0:7]
         0         0         0         0
         0   2951591   2951591   2951591
         0   5318583   5318583   5318583
         0   6632164   6632164   6632164
         0   6632164   6632164   6632164
         0   5318583   5318583   5318583
         0   2951591   2951591   2951591
         0         0         0         0
block 11 mydiff=5.719e+07
block 12 psi[0:3][0:7]
         0         0         0         0
         0   5809738   5757031   2951591
         0  10468786  10373811   5318583
         0  13054363  12935931   6632164
         0  13054363  12935931   6632164
         0  10468786  10373811   5318583
         0   5809738   5757031   2951591
         0         0         0         0
block 13 psi[0:3][0:7]
         0         0         0         0
         0   5809738   5757031   5757031
         0  10468786  10373811  10373811
         0  13054363  12935931  12935931
         0  13054363  12935931  12935931
         0  10468786  10373811  10373811
         0   5809738   5757031   5757031
         0         0         0         0
block 14 diff=1.55071e+08
		

block 9 i=2
block 10 psi[2:5][0:7]
         0         0         0         0
   2951591   2951591   2951591   2951591
   5318583   5318583   5318583   5318583
   6632164   6632164   6632164   6632164
   6632164   6632164   6632164   6632164
   5318583   5318583   5318583   5318583
   2951591   2951591   2951591   2951591
         0         0         0         0
block 11 mydiff=5.66577e+07
block 12 psi[2:5][0:7]
         0         0         0         0
   2951591   5757031   5757031   2951591
   5318583  10373811  10373811   5318583
   6632164  12935931  12935931   6632164
   6632164  12935931  12935931   6632164
   5318583  10373811  10373811   5318583
   2951591   5757031   5757031   2951591
         0         0         0         0
block 13 psi[2:5][0:7]
         0         0         0         0
   5757031   5757031   5757031   5757031
  10373811  10373811  10373811  10373811
  12935931  12935931  12935931  12935931
  12935931  12935931  12935931  12935931
  10373811  10373811  10373811  10373811
   5757031   5757031   5757031   5757031
         0         0         0         0
block 14 diff=2.122e-314
		

block 9 i=2
block 10 psi[4:7][0:7]
         0         0         0         0
   2951591   2951591   2951590         0
   5318583   5318583   5318582         0
   6632164   6632164   6632163         0
   6632164   6632164   6632163         0
   5318583   5318583   5318582         0
   2951591   2951591   2951590         0
         0         0         0         0
block 11 mydiff=4.12232e+07
block 12 psi[4:7][0:7]
         0         0         0         0
   2951591   5757031   4228529         0
   5318583  10373811   7619545         0
   6632164  12935931   9501417         0
   6632164  12935931   9501417         0
   5318583  10373811   7619545         0
   2951591   5757031   4228529         0
         0         0         0         0
block 13 psi[4:7][0:7]
         0         0         0         0
   5757031   5757031   4228529         0
  10373811  10373811   7619545         0
  12935931  12935931   9501417         0
  12935931  12935931   9501417         0
  10373811  10373811   7619545         0
   5757031   5757031   4228529         0
         0         0         0         0
block 14 diff=0
		



Program Task 0 Task 1 Task 2
  for( i=1; i<=steps;i++) {
fprintf(fout,"block 9 i=%d\n",i);
mat_out(fout,"block 10 psi",psi,i1-1,i2+1,j1-1,j2+1);







    do_jacobi(psi,new_psi,&mydiff,i1,i2,j1,j2);
fprintf(fout,"block 11 mydiff=%g\n",mydiff);
mat_out(fout,"block 12 psi",psi,i1-1,i2+1,j1-1,j2+1);







    do_transfer(psi,i1,i2,j1,j2);
mat_out(fout,"block 13 psi",psi,i1-1,i2+1,j1-1,j2+1);






    mpi_err= MPI_Reduce(&mydiff,&diff,1,MPI_DOUBLE,
              MPI_SUM,mpi_master,MPI_COMM_WORLD);
fprintf(fout,"block 14 diff=%g\n",diff);
    if(myid == mpi_master && i % iout == 0){
       printf("%8d %15.5f\n",i,diff);
      }
  }
		

block 9 i=9
block 10 psi[0:3][0:7]
         0         0         0         0
         0  20148613  18763290  16830400
         0  36306547  33810280  30327333
         0  45273523  42160730  37817565
         0  45273523  42160730  37817565
         0  36306547  33810280  30327333
         0  20148613  18763290  16830400
         0         0         0         0
block 11 mydiff=2.6185e+07
block 12 psi[0:3][0:7]
         0         0         0         0
         0  21744930  19760106  16830400
         0  39183011  35606481  30327333
         0  48860415  44400556  37817565
         0  48860415  44400556  37817565
         0  39183011  35606481  30327333
         0  21744930  19760106  16830400
         0         0         0         0
block 13 psi[0:3][0:7]
         0         0         0         0
         0  21744930  19760106  17291345
         0  39183011  35606481  31157927
         0  48860415  44400556  38853299
         0  48860415  44400556  38853299
         0  39183011  35606481  31157927
         0  21744930  19760106  17291345
         0         0         0         0
block 14 diff=3.23082e+07
		

block 9 i=9
block 10 psi[2:5][0:7]
         0         0         0         0
  18763290  16830400  13696789   9664768
  33810280  30327333  24680762  17415311
  42160730  37817565  30776406  21716538
  42160730  37817565  30776406  21716538
  33810280  30327333  24680762  17415311
  18763290  16830400  13696789   9664768
         0         0         0         0
block 11 mydiff=5.96138e+06
block 12 psi[2:5][0:7]
         0         0         0         0
  18763290  17291345  13826207   9664768
  33810280  31157927  24913964  17415311
  42160730  38853299  31067205  21716538
  42160730  38853299  31067205  21716538
  33810280  31157927  24913964  17415311
  18763290  17291345  13826207   9664768
         0         0         0         0
block 13 psi[2:5][0:7]
         0         0         0         0
  19760106  17291345  13826207   9680248
  35606481  31157927  24913964  17443204
  44400556  38853299  31067205  21751319
  44400556  38853299  31067205  21751319
  35606481  31157927  24913964  17443204
  19760106  17291345  13826207   9680248
         0         0         0         0
block 14 diff=2.122e-314
		

block 9 i=9
block 10 psi[4:7][0:7]
         0         0         0         0
  13696789   9664768   5058181         0
  24680762  17415311   9114528         0
  30776406  21716538  11365630         0
  30776406  21716538  11365630         0
  24680762  17415311   9114528         0
  13696789   9664768   5058181         0
         0         0         0         0
block 11 mydiff=161804
block 12 psi[4:7][0:7]
         0         0         0         0
  13696789   9680248   5057637         0
  24680762  17443204   9113547         0
  30776406  21751319  11364407         0
  30776406  21751319  11364407         0
  24680762  17443204   9113547         0
  13696789   9680248   5057637         0
         0         0         0         0
block 13 psi[4:7][0:7]
         0         0         0         0
  13826207   9680248   5057637         0
  24913964  17443204   9113547         0
  31067205  21751319  11364407         0
  31067205  21751319  11364407         0
  24913964  17443204   9113547         0
  13826207   9680248   5057637         0
         0         0         0         0
block 14 diff=0
		

Program Task 0 Task 1 Task 2
  for( i=1; i<=steps;i++) {
fprintf(fout,"block 9 i=%d\n",i);
mat_out(fout,"block 10 psi",psi,i1-1,i2+1,j1-1,j2+1);







    do_jacobi(psi,new_psi,&mydiff,i1,i2,j1,j2);
fprintf(fout,"block 11 mydiff=%g\n",mydiff);
mat_out(fout,"block 12 psi",psi,i1-1,i2+1,j1-1,j2+1);







    do_transfer(psi,i1,i2,j1,j2);
mat_out(fout,"block 13 psi",psi,i1-1,i2+1,j1-1,j2+1);






    mpi_err= MPI_Reduce(&mydiff,&diff,1,MPI_DOUBLE,
              MPI_SUM,mpi_master,MPI_COMM_WORLD);
fprintf(fout,"block 14 diff=%g\n",diff);
    if(myid == mpi_master && i % iout == 0){
       printf("%8d %15.5f\n",i,diff);
      }
  }
		

block 9 i=10
block 10 psi[0:3][0:7]
         0         0         0         0
         0  21744930  19760106  17291345
         0  39183011  35606481  31157927
         0  48860415  44400556  38853299
         0  48860415  44400556  38853299
         0  39183011  35606481  31157927
         0  21744930  19760106  17291345
         0         0         0         0
block 11 mydiff=1.91311e+07
block 12 psi[0:3][0:7]
         0         0         0         0
         0  22980255  20419354  17291345
         0  41408988  36794405  31157927
         0  51636164  45881873  38853299
         0  51636164  45881873  38853299
         0  41408988  36794405  31157927
         0  22980255  20419354  17291345
         0         0         0         0
block 13 psi[0:3][0:7]
         0         0         0         0
         0  22980255  20419354  17548213
         0  41408988  36794405  31620787
         0  51636164  45881873  39430476
         0  51636164  45881873  39430476
         0  41408988  36794405  31620787
         0  22980255  20419354  17548213
         0         0         0         0
block 14 diff=2.23609e+07
		

block 9 i=10
block 10 psi[2:5][0:7]
         0         0         0         0
  19760106  17291345  13826207   9680248
  35606481  31157927  24913964  17443204
  44400556  38853299  31067205  21751319
  44400556  38853299  31067205  21751319
  35606481  31157927  24913964  17443204
  19760106  17291345  13826207   9680248
         0         0         0         0
block 11 mydiff=3.18035e+06
block 12 psi[2:5][0:7]
         0         0         0         0
  19760106  17548213  13884292   9680248
  35606481  31620787  25018631  17443204
  44400556  39430476  31197722  21751319
  44400556  39430476  31197722  21751319
  35606481  31620787  25018631  17443204
  19760106  17548213  13884292   9680248
         0         0         0         0
block 13 psi[2:5][0:7]
         0         0         0         0
  20419354  17548213  13884292   9684628
  36794405  31620787  25018631  17451096
  45881873  39430476  31197722  21761161
  45881873  39430476  31197722  21761161
  36794405  31620787  25018631  17451096
  20419354  17548213  13884292   9684628
         0         0         0         0
block 14 diff=6.95316e-310
		

block 9 i=10
block 10 psi[4:7][0:7]
         0         0         0         0
  13826207   9680248   5057637         0
  24913964  17443204   9113547         0
  31067205  21751319  11364407         0
  31067205  21751319  11364407         0
  24913964  17443204   9113547         0
  13826207   9680248   5057637         0
         0         0         0         0
block 11 mydiff=49497.8
block 12 psi[4:7][0:7]
         0         0         0         0
  13826207   9684628   5057115         0
  24913964  17451096   9112607         0
  31067205  21761161  11363235         0
  31067205  21761161  11363235         0
  24913964  17451096   9112607         0
  13826207   9684628   5057115         0
         0         0         0         0
block 13 psi[4:7][0:7]
         0         0         0         0
  13884292   9684628   5057115         0
  25018631  17451096   9112607         0
  31197722  21761161  11363235         0
  31197722  21761161  11363235         0
  25018631  17451096   9112607         0
  13884292   9684628   5057115         0
         0         0         0         0
block 14 diff=0