/[MITgcm]/MITgcm/eesupp/src/gsum_jam.F
ViewVC logotype

Contents of /MITgcm/eesupp/src/gsum_jam.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.5 - (show annotations) (download)
Sat Mar 27 03:51:51 2004 UTC (20 years, 2 months ago) by edhill
Branch: MAIN
CVS Tags: checkpoint57m_post, checkpoint57g_pre, checkpoint57s_post, checkpoint58b_post, checkpoint57b_post, checkpoint57g_post, checkpoint56b_post, checkpoint57y_post, checkpoint54d_post, checkpoint54e_post, checkpoint62c, checkpoint57r_post, checkpoint57d_post, checkpoint57i_post, checkpoint59, checkpoint58, checkpoint55, checkpoint54, checkpoint57, checkpoint56, checkpoint53, checkpoint58f_post, checkpoint57n_post, checkpoint58d_post, checkpoint58a_post, checkpoint57z_post, checkpoint54f_post, checkpoint62a, checkpoint58y_post, checkpoint55a_post, checkpoint58t_post, checkpoint55i_post, checkpoint57l_post, checkpoint57h_post, checkpoint57t_post, checkpoint55c_post, checkpoint57v_post, checkpoint57f_post, checkpoint53d_post, checkpoint60, checkpoint61, checkpoint62, checkpoint57a_post, checkpoint57h_pre, checkpoint57x_post, checkpoint54b_post, checkpoint58w_post, checkpoint52m_post, checkpoint57y_pre, checkpoint55g_post, checkpoint58o_post, checkpoint57c_post, checkpoint58p_post, checkpoint58q_post, checkpoint55d_post, checkpoint58e_post, checkpoint58m_post, checkpoint53c_post, checkpoint55d_pre, checkpoint57c_pre, checkpoint58r_post, checkpoint55j_post, checkpoint54a_post, checkpoint55h_post, checkpoint58n_post, checkpoint57e_post, checkpoint55b_post, checkpoint53a_post, checkpoint59q, checkpoint59p, checkpoint59r, checkpoint59e, checkpoint59d, checkpoint59g, checkpoint59f, checkpoint59a, checkpoint55f_post, checkpoint59c, checkpoint59b, checkpoint59m, checkpoint59l, checkpoint59o, checkpoint59n, checkpoint59i, checkpoint59h, checkpoint59k, checkpoint53g_post, checkpoint57p_post, checkpint57u_post, checkpoint57q_post, mitgcm_mapl_00, eckpoint57e_pre, checkpoint58k_post, checkpoint62b, checkpoint58v_post, checkpoint56a_post, checkpoint58l_post, checkpoint53f_post, checkpoint54a_pre, checkpoint53b_pre, checkpoint57h_done, checkpoint57j_post, checkpoint57f_pre, checkpoint61f, checkpoint58g_post, checkpoint58x_post, checkpoint61n, checkpoint52n_post, checkpoint59j, checkpoint58h_post, checkpoint56c_post, checkpoint58j_post, checkpoint57a_pre, checkpoint57o_post, checkpoint61q, checkpoint57k_post, checkpoint61z, checkpoint53b_post, checkpoint57w_post, checkpoint61e, checkpoint58i_post, checkpoint58c_post, checkpoint58u_post, checkpoint53d_pre, checkpoint58s_post, checkpoint55e_post, checkpoint61g, checkpoint61d, checkpoint54c_post, checkpoint61b, checkpoint61c, checkpoint61a, checkpoint61o, checkpoint61l, checkpoint61m, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i, checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint61p, checkpoint61x, checkpoint61y
Changes since 1.4: +2 -2 lines
 o cleanup comments (NO CODE CHANGES) in eesupp for protex
 o the "api reference" framework now builds documentation for:
     eesupp, pkg/generic_advdiff, and pkg/gmredi
 o remove mnc from the default gfd in pkg_groups pending
     further testing on systems where NetCDF is not installed

1 C $Header: /u/gcmpack/MITgcm/eesupp/src/gsum_jam.F,v 1.4 2001/09/21 03:54:35 cnh Exp $
2 C $Name: $
3
4 #include "CPP_EEOPTIONS.h"
5
6 #undef USE_MPI_GSUM
7 #define USE_JAM_GSUM
8
9 CBOP
10 C !ROUTINE: GLOBAL_SUM_R8_JAM
11
12 C !INTERFACE:
13 SUBROUTINE GLOBAL_SUM_R8_JAM( ans, myThid )
14
15 C !DESCRIPTION:
16 C *=========================================================================*
17 C | SUBROUTINE GLOBAL\_SUM\_R8\_JAM
18 C | o JAM binding of global sum routine
19 C *=========================================================================*
20 C | Does a super fast global sum over the JAM library. With JAM
21 C | timings for dual proc SMP nodes over Arctic are about
22 C | 4.3usecs log2(NP/2). When it was done this was faster than any other
23 C | cluster on the planet :-).
24 C *=========================================================================*
25
26 C !USES:
27 #ifdef ALLOW_MPI
28 #include "mpif.h"
29 #endif
30
31 C !INPUT/OUTPUT PARAMETERS:
32 C ans :: Returned sum value
33 C myThid :: Thread number of this instance
34 Real*8 ans
35 INTEGER myThid
36
37 #ifdef LETS_MAKE_JAM
38
39 C !LOCAL VARIABLES:
40 C phi :: Temp. for accumulating sum
41 C RC :: Return code
42 Real*8 phi
43 INTEGER RC
44
45 phi = ans
46
47 #ifdef USE_MPI_GSUM
48 CALL MPI_Allreduce( phi,
49 & ans,
50 & 1,
51 & MPI_REAL8,
52 & MPI_SUM,
53 & MPI_COMM_WORLD,
54 & rc
55 & )
56 #endif
57
58 #ifdef USE_JAM_GSUM
59 C JAM global sum
60 CALL JAM_barrier_start( phi )
61 CALL JAM_barrier_done( ans )
62 #endif
63
64 C WRITE(6,*) ' phi = ', phi, ' Sum = ', ans
65 C CALL MPI_Finalize( rc )
66 C STOP
67
68 #endif /* LETS_MAKE_JAM */
69
70 RETURN
71 END

  ViewVC Help
Powered by ViewVC 1.1.22