Changeset 32289cd for main_p.f


Ignore:
Timestamp:
11/19/09 11:29:41 (14 years ago)
Author:
baerbaer <baerbaer@…>
Branches:
master
Children:
38d77eb
Parents:
6650a56
Message:

Explicitly declare variables.

git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/smmp/trunk@33 26dc1dd8-5c4e-0410-9ffe-d298b4865968

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main_p.f

    r6650a56 r32289cd  
    11!     **************************************************************
    2 !     
     2!
    33!     This file contains the   main (PARALLEL TEMPERING  JOBS ONLY,
    44!     FOR SINGULAR PROCESSOR JOBS USE main)
    5 !     
     5!
    66!     This file contains also the subroutine: p_init_molecule
    7 !     
     7!
    88!     Copyright 2003-2005  Frank Eisenmenger, U.H.E. Hansmann,
    9 !     Shura Hayryan, Chin-Ku 
     9!     Shura Hayryan, Chin-Ku
    1010! Copyright 2007       Frank Eisenmenger, U.H.E. Hansmann,
    1111!                      Jan H. Meinke, Sandipan Mohanty
    12 !     
     12!
    1313!     CALLS init_energy,p_init_molecule,partem_p
    14 !     
     14!
    1515!     **************************************************************
    1616      program pmain
     
    2121      include 'mpif.h'
    2222
     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
    2328      character*80 libdir
    2429      character*80 in_fil,ou_fil,filebase, varfile
     
    2833      logical newsta
    2934
    30 !c    Number of replicas 
     35!c    Number of replicas
    3136      integer num_replica
    3237!c    Number of processors per replica
     
    6267
    6368!     =================================================== Energy setup
    64       libdir='SMMP/'     
     69      libdir='SMMP/'
    6570!     Directory for SMMP libraries
    6671
     
    7176      ientyp = 0
    7277!     0  => ECEPP2 or ECEPP3 depending on the value of sh2
    73 !     1  => FLEX 
     78!     1  => FLEX
    7479!     2  => Lund force field
    7580!     3  => ECEPP with Abagyan corrections
    76 !     
     81!
    7782
    7883      sh2=.false.               ! .true. for ECEPP/2; .false. for ECEPP3
     
    106111                            !   temperatures must have at least as many
    107112                            !   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
    110115      nswp=500000           ! Number of sweeps
    111116      nmes=10               ! Interval for measurements and replica exchange
    112117      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
    115120                            !   initialized?
    116                             ! -1 stretched chain 
     121                            ! -1 stretched chain
    117122                            !  0 don't do anything
    118123                            !  1 initialize each angle to a random value
    119      
     124
    120125      ifrm=0
    121126      ntlml = 0
    122127
    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
    124129      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
    127132      upchswitch=1
    128133      rndord=.true.
    129134!     =================================================================
    130135!     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
    132137!     multiple n of the number of replicas. Each replica then gets n
    133138!     processors to do its energy calculation.
     
    139144!     could just use i * num_ppr but this way it's more flexible.
    140145      j = 0
    141       do i = 1, num_replica 
    142          ranks(i) = j 
     146      do i = 1, num_replica
     147         ranks(i) = j
    143148         proc_range(1) = j
    144149         proc_range(2) = j + num_ppr - 1
     
    146151         call mpi_group_range_incl(group_world, 1, proc_range, group(i)
    147152     &                              ,error)
    148          write (*,*) "Assigning rank ", j, proc_range, 
     153         write (*,*) "Assigning rank ", j, proc_range,
    149154     &               "to group", group(i)
    150155         call flush(6)
     
    167172      call mpi_group_incl(group_world, num_replica, ranks, group_partem,
    168173     &                    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,
    170175     &                     error)
    171176
     
    184189         varfile = 'EXAMPLES/1bdd.var'
    185190         call init_molecule(iabin, grpn, grpc,in_fil,varfile)
    186       else 
     191      else
    187192         filebase = "conf_0000.var"
    188193         call init_molecule(iabin, grpn, grpc,in_fil,
     
    220225      nml = 1
    221226      call distributeWorkLoad(no, nml)
    222      
     227
    223228      call partem_p(num_replica, nequi, nswp, nmes, nsave, newsta,
    224229     &              switch, rep_id, partem_comm)
Note: See TracChangeset for help on using the changeset viewer.