amber-developers: qmmm2/neb_gb;compile problem with evb_input.f (ifort on linux)

From: David Mathews <David_Mathews.urmc.rochester.edu>
Date: Mon, 27 Mar 2006 16:37:40 -0700

Hi All:

         Ross's fix will take of this bug with neb_gb. I don't know why
it
wasn't spotted before; sorry.

         Also, the current CVS tree will not compile for me on Red Hat
Enterprise Linux (32 bit) using ifort 8.
I get:
ifort -c -w95 -mp1 -O0 -tpp7 -FR -o evb_input.o _evb_input.f
fortcom: Error: _evb_input.f, line 749: Unbalanced parentheses
              , emap(n)% lambda, n = 1, nbias )
---------------------------------------------^
fortcom: Error: _evb_input.f, line 747: Syntax error, found ',' when
expecting o
ne of: :
       write(6,'((5x,2(a,i4),a,2x,a,f10.5))') ( 'emap(', emap(n)% ist, ','
&
------------------------------------------------------^
fortcom: Error: _evb_input.f, line 748: Syntax error, found ''' when
expecting o
ne of: ( <IDENTIFIER> <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM>
<CHARACTER_CON
STANT> <INTEGER_CONSTANT> ...
              , emap(n)% jst, ') ::', 'lambda = ' &
-----------------------------^
compilation aborted for _evb_input.f (code 1)


         This is with "make serial" after "config -p4 ifort_ia32"

         Has anyone else encountered this problem?

Thanks,
Dave


At 04:34 PM 3/27/2006, you wrote:
>Divide by zero exception in this function:
>
>subroutine normalize(vector,dim)
> !normalize a vector of components of a dim dimensional vector
> !Very small vectors need to be considered zero for simulated
annealing.
> !These are trapped below and not normalized.
> implicit none
> _REAL_ vector(*),vlength
> integer dim, i
>
> vlength = 0.d0
> do i = 1, dim
> vlength = vlength + vector(i)*vector(i)
> end do
> vlength = 1.0d0/sqrt(vlength) !DIVIDE BY ZERO
> if (vlength<1000.0d0) then
> vector(1:dim) = vector(1:dim)*vlength
> else
> vector(1:dim) = 0.d0
> end if
>
>end subroutine normalize
>
>at line 140 of pimd_force.f
>
>You get a divide by zero when all the components of vector are == 0.
>Again, not sure why we're not seeing this on othe
ore familiar with this part of the code to
>determine whether the bug is that normalize can't handle the zero vector
>or that the zero vector should never have been passed to normalize.
>
>John
>

___________________________________________________
David Mathews, MD, PhD
Assistant Professor of Biochemistry & Biophysics
        and of Biostatistics & Computational Biology
University of Rochester Medical Center
Room 3-6830
601 Elmwood Avenue, Box 712
Rochester, New York 14642
http://rna.urmc.rochester.edu
Received on Wed Apr 05 2006 - 23:49:35 PDT
Custom Search