- Timestamp:
- 11/19/09 11:29:41 (14 years ago)
- Branches:
- master
- Children:
- 38d77eb
- Parents:
- 6650a56
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main_p.f
r6650a56 r32289cd 1 1 ! ************************************************************** 2 ! 2 ! 3 3 ! This file contains the main (PARALLEL TEMPERING JOBS ONLY, 4 4 ! FOR SINGULAR PROCESSOR JOBS USE main) 5 ! 5 ! 6 6 ! This file contains also the subroutine: p_init_molecule 7 ! 7 ! 8 8 ! Copyright 2003-2005 Frank Eisenmenger, U.H.E. Hansmann, 9 ! Shura Hayryan, Chin-Ku 9 ! Shura Hayryan, Chin-Ku 10 10 ! Copyright 2007 Frank Eisenmenger, U.H.E. Hansmann, 11 11 ! Jan H. Meinke, Sandipan Mohanty 12 ! 12 ! 13 13 ! CALLS init_energy,p_init_molecule,partem_p 14 ! 14 ! 15 15 ! ************************************************************** 16 16 program pmain … … 21 21 include 'mpif.h' 22 22 23 double precision startwtime, group_world, error, endwtime 24 25 integer ierr, num_proc, iabin, nequi, nswp, nmes, nsave, ifrm, j 26 integer i, nml, nresi, my_pt_rank, ncalls, nacalls 27 23 28 character*80 libdir 24 29 character*80 in_fil,ou_fil,filebase, varfile … … 28 33 logical newsta 29 34 30 !c Number of replicas 35 !c Number of replicas 31 36 integer num_replica 32 37 !c Number of processors per replica … … 62 67 63 68 ! =================================================== Energy setup 64 libdir='SMMP/' 69 libdir='SMMP/' 65 70 ! Directory for SMMP libraries 66 71 … … 71 76 ientyp = 0 72 77 ! 0 => ECEPP2 or ECEPP3 depending on the value of sh2 73 ! 1 => FLEX 78 ! 1 => FLEX 74 79 ! 2 => Lund force field 75 80 ! 3 => ECEPP with Abagyan corrections 76 ! 81 ! 77 82 78 83 sh2=.false. ! .true. for ECEPP/2; .false. for ECEPP3 … … 106 111 ! temperatures must have at least as many 107 112 ! entries 108 nequi=10 ! Number of MC sweeps before measurements 109 ! and replica exchanges are started 113 nequi=10 ! Number of MC sweeps before measurements 114 ! and replica exchanges are started 110 115 nswp=500000 ! Number of sweeps 111 116 nmes=10 ! Interval for measurements and replica exchange 112 117 nsave=1000 ! Not used at the moment 113 114 switch = -1 ! How should the configuration be 118 119 switch = -1 ! How should the configuration be 115 120 ! initialized? 116 ! -1 stretched chain 121 ! -1 stretched chain 117 122 ! 0 don't do anything 118 123 ! 1 initialize each angle to a random value 119 124 120 125 ifrm=0 121 126 ntlml = 0 122 127 123 ! Decide if and when to use BGS, and initialize Lund data structures 128 ! Decide if and when to use BGS, and initialize Lund data structures 124 129 bgsprob=0.6 ! Prob for BGS, given that it is possible 125 ! upchswitch= 0 => No BGS 1 => BGS with probability bgsprob 126 ! 2 => temperature dependent choice 130 ! upchswitch= 0 => No BGS 1 => BGS with probability bgsprob 131 ! 2 => temperature dependent choice 127 132 upchswitch=1 128 133 rndord=.true. 129 134 ! ================================================================= 130 135 ! Distribute nodes to parallel tempering tasks 131 ! I assume that the number of nodes available is an integer 136 ! I assume that the number of nodes available is an integer 132 137 ! multiple n of the number of replicas. Each replica then gets n 133 138 ! processors to do its energy calculation. … … 139 144 ! could just use i * num_ppr but this way it's more flexible. 140 145 j = 0 141 do i = 1, num_replica 142 ranks(i) = j 146 do i = 1, num_replica 147 ranks(i) = j 143 148 proc_range(1) = j 144 149 proc_range(2) = j + num_ppr - 1 … … 146 151 call mpi_group_range_incl(group_world, 1, proc_range, group(i) 147 152 & ,error) 148 write (*,*) "Assigning rank ", j, proc_range, 153 write (*,*) "Assigning rank ", j, proc_range, 149 154 & "to group", group(i) 150 155 call flush(6) … … 167 172 call mpi_group_incl(group_world, num_replica, ranks, group_partem, 168 173 & error) 169 call mpi_comm_create(mpi_comm_world, group_partem, partem_comm, 174 call mpi_comm_create(mpi_comm_world, group_partem, partem_comm, 170 175 & error) 171 176 … … 184 189 varfile = 'EXAMPLES/1bdd.var' 185 190 call init_molecule(iabin, grpn, grpc,in_fil,varfile) 186 else 191 else 187 192 filebase = "conf_0000.var" 188 193 call init_molecule(iabin, grpn, grpc,in_fil, … … 220 225 nml = 1 221 226 call distributeWorkLoad(no, nml) 222 227 223 228 call partem_p(num_replica, nequi, nswp, nmes, nsave, newsta, 224 229 & switch, rep_id, partem_comm)
Note:
See TracChangeset
for help on using the changeset viewer.