range of arrays: MaxProcs to NProcs
authorEmilia Lubecka <emilia.lubecka@ug.edu.pl>
Thu, 20 Apr 2017 15:06:06 +0000 (17:06 +0200)
committerEmilia Lubecka <emilia.lubecka@ug.edu.pl>
Thu, 20 Apr 2017 15:06:06 +0000 (17:06 +0200)
source/cluster/cluster.f90
source/unres/MCM_MD.f90
source/unres/MREMD.f90
source/unres/cinfo.f90
source/unres/data/control_data.f90
source/unres/muca_md.f90
source/wham/cinfo.f90

index 1b6767c..3b75b28 100644 (file)
@@ -14,7 +14,7 @@
                          c,cref
       use energy_data, only: nnt,nct
       use control_data, only: symetr,outpdb,outmol2,titel,&
-                          iopt,print_dist,MaxProcs
+                          iopt,print_dist !,MaxProcs
       use control, only: tcpu,initialize
 
       use wham_data, only: punch_dist
         call mpi_finalize(ierror)
         stop
       endif
-      if (nprocs.gt.MaxProcs+1) then
-        write (2,*) "Error - too many processors",&
-         nprocs,MaxProcs+1
-        write (2,*) "Increase MaxProcs and recompile"
-        call MPI_Finalize(IERROR)
-        stop
-      endif
+!EL /04/2017  No longer needed, dynamic allocation of arrays
+!      if (nprocs.gt.MaxProcs+1) then
+!        write (2,*) "Error - too many processors",&
+!         nprocs,MaxProcs+1
+!        write (2,*) "Increase MaxProcs and recompile"
+!        call MPI_Finalize(IERROR)
+!        stop
+!      endif
 #endif
 !elwrite(iout,*) "before parmread"
       allocate(printang(max_cut))
index afb31bb..aa3f3fe 100644 (file)
 
       use energy_data
       use geometry_data
-      use MPI_data, only:ifinish,nctasks,WhatsUp,MyID
-      use control_data, only:refstr,MaxProcs
+      use MPI_data, only:ifinish,nctasks,WhatsUp,MyID,NProcs
+      use control_data, only:refstr !,MaxProcs
       use io_base
       use control, only:tcpu,ovrtim
       use regularize_, only:fitsq
       real(kind=8) :: przes(3),obr(3,3)
       real(kind=8),dimension(6*nres) :: varold !(maxvar) (maxvar=6*maxres)
       logical :: non_conv
-      integer,dimension(-1:MaxMoveType+1,0:MaxProcs-1) :: moves1,moves_acc1    !(-1:MaxMoveType+1,0:MaxProcs-1)
+      integer,dimension(-1:MaxMoveType+1,0:NProcs-1) :: moves1,moves_acc1      !(-1:MaxMoveType+1,0:MaxProcs-1)
 #ifdef MPL
-      real(kind=8) :: etot_temp,etot_all(0:MaxProcs)
+      real(kind=8) :: etot_temp,etot_all(0:NProcs) !(0:MaxProcs)
       external d_vadd,d_vmin,d_vmax
       real(kind=8),dimension(-max_ene:max_ene) :: entropy1,nhist1
-      integer,dimension(nres*(MaxProcs+1)) :: nbond_move1,nbond_acc1
+      integer,dimension(nres*(NProcs+1)) :: nbond_move1,nbond_acc1 !(nres*(MaxProcs+1)) 
       integer,dimension(2) :: itemp
 #endif
       real(kind=8),dimension(6*nres) :: var_lowest     !(maxvar) (maxvar=6*maxres)
index 92a1178..ef6ac04 100644 (file)
@@ -7,7 +7,7 @@
       use remd_data
       use geometry_data
       use energy_data
-      use control_data, only:maxprocs
+!      use control_data, only:maxprocs
       use MDyn
 
       implicit none
       integer :: ERRCODE
       real(kind=8),dimension(3) :: L,vcm
       real(kind=8) :: energia(0:n_ene)
-      real(kind=8) :: remd_t_bath(maxprocs)
-      integer :: iremd_iset(maxprocs)
-      integer(kind=2) :: i_index(maxprocs/4,maxprocs/20,maxprocs/200,maxprocs/200)
-      real(kind=8) :: remd_ene(0:n_ene+4,maxprocs)
-      integer :: iremd_acc(maxprocs),iremd_tot(maxprocs)
-      integer :: iremd_acc_usa(maxprocs),iremd_tot_usa(maxprocs)
+      real(kind=8) :: remd_t_bath(Nprocs) !(maxprocs)
+      integer :: iremd_iset(Nprocs) !(maxprocs)
+      integer(kind=2) :: i_index(Nprocs/4,Nprocs/20,Nprocs/200,Nprocs/200)
+! (maxprocs/4,maxprocs/20,maxprocs/200,maxprocs/200)
+      real(kind=8) :: remd_ene(0:n_ene+4,Nprocs) !(0:n_ene+4,maxprocs)
+      integer :: iremd_acc(Nprocs),iremd_tot(Nprocs) !(maxprocs)
+      integer :: iremd_acc_usa(Nprocs),iremd_tot_usa(Nprocs) !(maxprocs)
       integer :: rstcount      !el ilen,
 !el      external ilen
       character(len=50) :: tytul
 !el      common /gucio/ cm
       integer :: itime
 !old      integer nup(0:maxprocs),ndown(0:maxprocs)
-      integer :: rep2i(0:maxprocs),ireqi(maxprocs)
-      integer :: icache_all(maxprocs)
-      integer :: status(MPI_STATUS_SIZE),statusi(MPI_STATUS_SIZE,maxprocs)
+      integer :: rep2i(0:Nprocs),ireqi(Nprocs) !(maxprocs)
+      integer :: icache_all(Nprocs) !(maxprocs)
+      integer :: status(MPI_STATUS_SIZE),statusi(MPI_STATUS_SIZE,Nprocs)! (MPI_STATUS_SIZE,maxprocs)
       logical :: synflag, end_of_run, file_exist = .false.!, ovrtim
 
       real(kind=8) :: delta,time00,time01,time001,time02,time03,time04,&
       real(kind=4) :: r_d(3,2*nres)
       real(kind=4) :: t5_restart1(5)
       integer :: iret,itmp
-      integer(kind=2) :: i_index(maxprocs/4,maxprocs/20,maxprocs/200,maxprocs/200)
+      integer(kind=2) :: i_index(Nprocs/4,Nprocs/20,Nprocs/200,Nprocs/200)
+      !(maxprocs/4,maxprocs/20,maxprocs/200,maxprocs/200)
 !el       common /przechowalnia/ d_restart1,d_restart2
       integer :: i,j,il,il1,ierr,ixdrf
 
       real(kind=4) :: xcoord(3,2*nres+2),prec
       real(kind=4) :: r_qfrag(50),r_qpair(100)
       real(kind=4) :: r_utheta(50),r_ugamma(100),r_uscdiff(100)
-      real(kind=4) :: p_qfrag(50*maxprocs),p_qpair(100*maxprocs)
-      real(kind=4) :: p_utheta(50*maxprocs),p_ugamma(100*maxprocs),&
-           p_uscdiff(100*maxprocs)
+      real(kind=4) :: p_qfrag(50*Nprocs),p_qpair(100*Nprocs) !(100*maxprocs)
+      real(kind=4) :: p_utheta(50*Nprocs),p_ugamma(100*Nprocs),&
+           p_uscdiff(100*Nprocs) !(100*maxprocs)
 !el      real(kind=4) :: p_c(3,(nres2+2)*maxprocs)
       real(kind=4) :: r_c(3,2*nres+2)
 !el      common /przechowalnia/ p_c
 !      include 'COMMON.INTERACT'
 !el      real(kind=4) :: d_restart1(3,2*nres*maxprocs)
       real(kind=4) :: r_d(3,2*nres),t5_restart1(5)
-      integer(kind=2) :: i_index(maxprocs/4,maxprocs/20,maxprocs/200,maxprocs/200)
+      integer(kind=2) :: i_index(Nprocs/4,Nprocs/20,Nprocs/200,Nprocs/200)
+      !(maxprocs/4,maxprocs/20,maxprocs/200,maxprocs/200)
 !el      common /przechowalnia/ d_restart1
       integer :: i,j,il,il1,ierr,itmp,iret,ixdrf
 
index 6e9b6c8..bef6c1b 100644 (file)
@@ -1,11 +1,11 @@
 ! DO NOT EDIT THIS FILE - IT HAS BEEN GENERATED BY COMPINFO.C
-! 0 40376 83
+! 0 40376 87
       subroutine cinfo
 !      include 'COMMON.IOUNITS'
       use io_units
       write(iout,*)'++++ Compile info ++++'
-      write(iout,*)'Version 0.40376 build 83'
-      write(iout,*)'compiled Thu Apr 20 14:26:12 2017'
+      write(iout,*)'Version 0.40376 build 87'
+      write(iout,*)'compiled Thu Apr 20 16:46:25 2017'
       write(iout,*)'compiled by emilial@piasek4'
       write(iout,*)'OS name:    Linux '
       write(iout,*)'OS release: 3.2.0-124-generic '
index 7f0dc87..1e2bbf9 100644 (file)
@@ -85,7 +85,7 @@
       integer,parameter :: MaxMoveType = 4
 !-----------------------------------------------------------------------------
 ! Max. number of processors.
-      integer,parameter :: maxprocs=2048
+!      integer,parameter :: maxprocs=2048
 !el      integer,parameter :: maxprocs=4200
 !-----------------------------------------------------------------------------
 !-----------------------------------------------------------------------------
index 79189a2..b490c4f 100644 (file)
 !-----------------------------------------------------------------------------
       subroutine read_muca
 
-      use control_data, only: modecalc,maxprocs
+      use control_data, only: modecalc !,maxprocs
       use MD_data
       use REMD_data
       use MPI_data
       real(kind=8) :: yp1,ypn,yp,x,y,muca_ene !,muca_factor
 !el local variable
       real(kind=8) :: emuca_alloc(4*maxres),nemuca_alloc(4*maxres)
-      integer(kind=2) :: i2rep_alloc(0:maxprocs)
+      integer(kind=2) :: i2rep_alloc(0:Nprocs) !(0:maxprocs)
       integer :: i,k,j
 !     real(kind=8) :: var,ene
 
 !-----------------------------------------------------------------------------
       subroutine print_muca
 
-      use control_data, only: modecalc,mucadyn,maxprocs
+      use control_data, only: modecalc,mucadyn !,maxprocs
       use MD_data
       use REMD_data
       use MPI_data
 !      include 'COMMON.SETUP'
 !      include 'COMMON.IOUNITS'
       real(kind=8) :: yp1,ypn,yp,x,y  !,muca_ene,muca_factor
-      real(kind=8) :: dummy(maxprocs)
+      real(kind=8) :: dummy(Nprocs) !(maxprocs)
 !el local variables
       integer :: i,j,k
 
index 0c2ecac..f54feea 100644 (file)
@@ -1,11 +1,11 @@
 ! DO NOT EDIT THIS FILE - IT HAS BEEN GENERATED BY COMPINFO.C
-! 0 0 1265
+! 0 0 1267
       subroutine cinfo
 !      include 'COMMON.IOUNITS'
       use IO_UNITS
       write(iout,*)'++++ Compile info ++++'
-      write(iout,*)'Version 0.0 build 1265'
-      write(iout,*)'compiled Thu Apr 20 14:48:48 2017'
+      write(iout,*)'Version 0.0 build 1267'
+      write(iout,*)'compiled Thu Apr 20 16:48:13 2017'
       write(iout,*)'compiled by emilial@piasek4'
       write(iout,*)'OS name:    Linux '
       write(iout,*)'OS release: 3.2.0-124-generic '