********>Bugfix 50:
Author: Ross Walker and Mike Crowley
Date: 08/25/2005
Programs: Sander
Description: When doing non periodic simulations with extended systems sander
could erroneously produce an error about FFT dimensions. This
was due to memory being allocated for periodic FFT's even when
running in gas phase.
Fix: Apply the following patch to amber8/src/sander/ew_setup.f
------------------------------------------------------------------------------
--- ew_setup.f 2005-08-25 15:05:07.000000000 -0700
+++ ew_setup.f 2005-08-25 15:04:54.000000000 -0700
@@ -792,12 +792,14 @@
call fill_xtran(xtran)
call fill_tranvec()
- call get_stack(l_tau,mxeedtab)
- call fill_eed_table(eedtbdns,mxeedtab, &
- x(leed_cub),r_stack(l_tau),x(leed_lin),eedmeth,ee_type)
- call free_stack(l_tau)
+ if (periodic /= 0) then !Do not need this memory for non-periodic sim.
+ call get_stack(l_tau,mxeedtab)
+ call fill_eed_table(eedtbdns,mxeedtab, &
+ x(leed_cub),r_stack(l_tau),x(leed_lin),eedmeth,ee_type)
+ call free_stack(l_tau)
+ end if
call init_coulomb_switch(cutoffnb,dxdr, &
- x(leed_cub),x(leed_lin),eedtbdns,eedmeth,ee_type)
+ x(leed_cub),x(leed_lin),eedtbdns,eedmeth,ee_type)
call vdw_correct_setup(numatoms,ix(i04),ntypes,ix(invdwcls))
if( icfe /= 0 ) &
call vdw_correct_setup(numatoms,ix(i84),ntypes,ix(invdwcls2))
@@ -810,9 +812,11 @@
call mpi_comm_size(recip_comm,numtasks,ierr)
call mpi_comm_rank(recip_comm,mytaskid,ierr)
#endif
- call pmesh_kspace_setup( &
- x(lprefac1),x(lprefac2),x(lprefac3),x(lfftable), &
- nfft1,nfft2,nfft3,order,sizfftab,sizffwrk,opt_infl,ew_type)
+ if (periodic /= 0) then !do not need to do this for non-periodi
+ call pmesh_kspace_setup( &
+ x(lprefac1),x(lprefac2),x(lprefac3),x(lfftable), &
+ nfft1,nfft2,nfft3,order,sizfftab,sizffwrk,opt_infl,ew_type)
+ end if
#ifdef MPI
call mpi_comm_size(world_comm,numtasks,ierr)
call mpi_comm_rank(world_comm,mytaskid,ierr)
-------------------------------------------------------------------------------
Temporary workaround: None