/[MITgcm]/MITgcm_contrib/llc_hires/llc_1080/code-async/asyncio_init.F
ViewVC logotype

Contents of /MITgcm_contrib/llc_hires/llc_1080/code-async/asyncio_init.F

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


Revision 1.1 - (show annotations) (download)
Sun Sep 29 22:43:00 2013 UTC (11 years, 10 months ago) by dimitri
Branch: MAIN
CVS Tags: HEAD
adding code-async for llc1080

1 C $Header: /u/gcmpack/MITgcm_contrib/llc_hires/llc_4320/code-async/asyncio_init.F,v 1.1 2013/09/20 12:38:03 dimitri Exp $
2 #include "CPP_EEOPTIONS.h"
3
4 SUBROUTINE ASYNCIO_INIT(
5 I mpiCommParent,
6 U mpiCommCompute )
7
8 IMPLICIT NONE
9 #include "SIZE.h"
10
11 INTEGER mpiCommParent, mpiCommCompute
12
13 INTEGER mpiRC
14 INTEGER mpiCommIO
15 INTEGER mpiParentNP
16 INTEGER myParentRank
17
18 INTEGER mpiMyColor
19 INTEGER mpiComputeNP
20 INTEGER mpiIONP
21 INTEGER totalNumTiles
22 INTEGER numComputeProcesses
23
24 CALL MPI_COMM_SIZE(mpiCommParent, mpiParentNP, mpiRC )
25 CALL MPI_COMM_RANK(mpiCommParent, myParentRank, mpiRC )
26
27 C-- Hand control of I/O ranks to I/O library code.
28 C-- Get back communicator for compute ranks to use.
29 totalNumTiles = nPx*nPy*nSx*nSy
30 numComputeProcesses = nPx*nPy
31 IF ( myParentRank .EQ. 0 ) THEN
32 PRINT *, 'totalNumTiles ',totalNumTiles
33 PRINT *, 'numComputeProcesses ', numComputeProcesses
34 ENDIF
35 CALL ASYNCIO_BRON_F_F1(mpiCommParent,
36 I numComputeProcesses,
37 I totalNumTiles,
38 O mpiCommCompute)
39 RETURN
40
41 C-- ** MOST CODE FROM HERE IS PLACE HOLDER UNTIL WORKING
42 C-- ** BRON CODE EXISTS
43 C-- Distribute procs to "compute pool" and "I/O pool"
44 mpiCommIO = -1
45 mpiCommCompute = -1
46 ! mpiComputeNP = mpiParentNP*3/4
47 mpiComputeNP = npx*npy
48 mpiIONP = mpiParentNP-mpiComputeNP
49
50 IF ( myParentRank .GE. mpiComputeNP ) THEN
51 mpiMyColor=1
52 ELSE
53 mpiMyColor=2
54 ENDIF
55
56 IF ( mpiMyColor .EQ. 1 ) THEN
57 CALL MPI_COMM_SPLIT(mpiCommParent, mpiMyColor, 0, mpiCommIO,
58 & mpiRC )
59 ELSE
60 CALL MPI_COMM_SPLIT(mpiCommParent, mpiMyColor, 0, mpiCommCompute,
61 & mpiRC)
62 ENDIF
63
64 IF ( mpiCommIO .NE. -1 ) THEN
65 CALL ASYNCIO_DRIVER_INIT(
66 I mpiCommIO, mpiCommParent,
67 I sNx, sNy, Nr, OLx, OLy
68 I )
69 C-- ** WILL NEED SOMETHING LIKE THESE THREE LINES EVEN
70 C-- ** AFTER BRON CODE
71 CALL MPI_BARRIER(mpiCommParent,mpiRC)
72 CALL MPI_FINALIZE(mpiRC)
73 STOP 'NORMAL END: ASYNC IO PROCS'
74 ENDIF
75
76 RETURN
77 END

  ViewVC Help
Powered by ViewVC 1.1.22