 Parent Directory
|
 Parent Directory
|  Revision Log
|
 Revision Log
|  Revision Graph
 Revision Graph
Initial version of CG2D benchmark code (serial and parallel) by Chris Hill
| 1 | ce107 | 1.1 | SUBROUTINE GSUM_R8( ans, phi ) | 
| 2 | |||
| 3 | #ifdef ALLOW_MPI | ||
| 4 | #include "mpif.h" | ||
| 5 | #endif | ||
| 6 | |||
| 7 | Real*8 ans | ||
| 8 | Real*8 phi | ||
| 9 | |||
| 10 | INTEGER RC | ||
| 11 | |||
| 12 | ans = phi | ||
| 13 | |||
| 14 | #ifdef USE_MPI_GSUM | ||
| 15 | CALL MPI_Allreduce( phi, | ||
| 16 | & ans, | ||
| 17 | & 1, | ||
| 18 | & MPI_REAL8, | ||
| 19 | & MPI_SUM, | ||
| 20 | & MPI_COMM_WORLD, | ||
| 21 | & rc | ||
| 22 | & ) | ||
| 23 | #endif | ||
| 24 | |||
| 25 | #ifdef USE_JAM_GSUM | ||
| 26 | C JAM global sum | ||
| 27 | CALL JAM_barrier_start( phi ) | ||
| 28 | CALL JAM_barrier_done( ans ) | ||
| 29 | #endif | ||
| 30 | |||
| 31 | C WRITE(6,*) ' phi = ', phi, ' Sum = ', ans | ||
| 32 | C CALL MPI_Finalize( rc ) | ||
| 33 | C STOP | ||
| 34 | |||
| 35 | RETURN | ||
| 36 | END | 
| ViewVC Help | |
| Powered by ViewVC 1.1.22 |