From: Adam Liwo Date: Wed, 19 Apr 2017 11:26:46 +0000 (+0200) Subject: Removed the obsolete histent array from WHAM X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=commitdiff_plain;h=bd02e13419b372715884200b98a58b48e1407f62;hp=7035b39139b51c470f29086412b6ca2e98da40e5;p=unres4.git Removed the obsolete histent array from WHAM Fixed (hopefully) tha NaNs problem in VTS/A-MTS; need to test on systems that previously crashed --- diff --git a/source/unres/MD.f90 b/source/unres/MD.f90 index 15fdf68..c378ece 100644 --- a/source/unres/MD.f90 +++ b/source/unres/MD.f90 @@ -1163,6 +1163,12 @@ ! Calculate energy and forces call zerograd call etotal(potEcomp) +! AL 4/17/17: Reduce the steps if NaNs occurred. + if (potEcomp(0).gt.0.99e20 .or. isnan(potEcomp(0)).gt.0) then + d_time=d_time/2 + cycle + endif +! end change if (large.and. mod(itime,ntwe).eq.0) & call enerprint(potEcomp) #ifdef TIMING_ENE @@ -1538,6 +1544,25 @@ ! Calculate energy and forces call zerograd call etotal_short(energia_short) +! AL 4/17/17: Exit itime_split loop when energy goes infinite + if (energia_short(0).gt.0.99e20 .or. isnan(energia_short(0)) ) then + if (PRINT_AMTS_MSG) & + write (iout,*) "Infinities/NaNs in energia_short",energia_short(0),"; increasing ntime_split to",ntime_split + ntime_split=ntime_split*2 + if (ntime_split.gt.maxtime_split) then +#ifdef MPI + write (iout,*) & + "Cannot rescue the run; aborting job. Retry with a smaller time step" + call flush(iout) + call MPI_Abort(MPI_COMM_WORLD,IERROR,ERRCODE) +#else + write (iout,*) & + "Cannot rescue the run; terminating. Retry with a smaller time step" +#endif + endif + exit + endif +! End change if (large.and. mod(itime,ntwe).eq.0) & call enerprint(energia_short) #ifdef TIMING_ENE @@ -1580,6 +1605,8 @@ if (ntime_split.lt.maxtime_split) then scale=.true. ntime_split=ntime_split*2 +! AL 4/17/17: We should exit the itime_split loop when acceleration change is too big + exit do i=0,2*nres do j=1,3 dc_old(j,i)=dc_old0(j,i) @@ -1642,6 +1669,17 @@ #endif call zerograd call etotal_long(energia_long) + if (energia_long(0).gt.0.99e20 .or. isnan(energia_long(0))) then +#ifdef MPI + write (iout,*) & + "Infinitied/NaNs in energia_long, Aborting MPI job." + call flush(iout) + call MPI_Abort(MPI_COMM_WORLD,IERROR,ERRCODE) +#else + write (iout,*) "Infinitied/NaNs in energia_long, terminating." + stop +#endif + endif if (large.and. mod(itime,ntwe).eq.0) & call enerprint(energia_long) #ifdef TIMING_ENE diff --git a/source/unres/cinfo.f90 b/source/unres/cinfo.f90 index 0e022a0..21be40d 100644 --- a/source/unres/cinfo.f90 +++ b/source/unres/cinfo.f90 @@ -1,11 +1,11 @@ ! DO NOT EDIT THIS FILE - IT HAS BEEN GENERATED BY COMPINFO.C -! 0 40376 77 +! 0 40376 81 subroutine cinfo ! include 'COMMON.IOUNITS' use io_units write(iout,*)'++++ Compile info ++++' - write(iout,*)'Version 0.40376 build 77' - write(iout,*)'compiled Mon Apr 17 12:44:50 2017' + write(iout,*)'Version 0.40376 build 81' + write(iout,*)'compiled Wed Apr 19 12:39:43 2017' write(iout,*)'compiled by adam@piasek4' write(iout,*)'OS name: Linux ' write(iout,*)'OS release: 3.2.0-124-generic '