*************** *** 792,803 **** 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) call init_coulomb_switch(cutoffnb,dxdr, & - 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)) --- 792,805 ---- call fill_xtran(xtran) call fill_tranvec() + 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) call vdw_correct_setup(numatoms,ix(i04),ntypes,ix(invdwcls)) if( icfe /= 0 ) & call vdw_correct_setup(numatoms,ix(i84),ntypes,ix(invdwcls2)) *************** *** 810,818 **** 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) #ifdef MPI call mpi_comm_size(world_comm,numtasks,ierr) call mpi_comm_rank(world_comm,mytaskid,ierr) --- 812,822 ---- call mpi_comm_size(recip_comm,numtasks,ierr) call mpi_comm_rank(recip_comm,mytaskid,ierr) #endif + 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)