Hi all,
I've been going through building Amber with warnings turned on in the
compilation. This has drawn my attention to a number of aspects of the
code which are usually tolerated but when warnings are enabled die with
fatal errors.
One of those is the following:
_qm2_energy.SQM.f(116): error #7836: If the actual argument is scalar,
the corresponding dummy argument shall be scalar unless the actual
argument is an element of an array that is not an assumed-shape or
pointer array, or a substring of such an element. [REAL_SCRATCH1]
call qmgb_calc_mm_pot(natom, qm_gb%gb_mmpot, qmmm_struct%atom_mask, &
-----------^
_qm2_energy.SQM.f(116): error #7836: If the actual argument is scalar,
the corre
sponding dummy argument shall be scalar unless the actual argument is an
element
of an array that is not an assumed-shape or pointer array, or a
substring of su
ch an element. [REAL_SCRATCH2]
call qmgb_calc_mm_pot(natom, qm_gb%gb_mmpot, qmmm_struct%atom_mask, &
-----------^
_qm2_energy.SQM.f(116): error #7836: If the actual argument is scalar,
the corresponding dummy argument shall be scalar unless the actual
argument is an element of an array that is not an assumed-shape or
pointer array, or a substring of such an element. [INT_SCRATCH1]
call qmgb_calc_mm_pot(natom, qm_gb%gb_mmpot, qmmm_struct%atom_mask, &
-----------^
Now, I've had a look, and the variables REAL_SCRATCH1, REAL_SCRATCH2 and
INT_SCRATCH1 are passed in from qm2_energy.f (line 143ff. unless
preprocessed) as qmmm_scratch%qm_real_scratch(1),
qmmm_scratch%qm_real_scratch(natom+1) and
qmmm_scratch%qm_int_scratch(1). I suppose these variables are scalars,
while in qmgb_calc_mm_pot (line 114ff. in qm_gb.f), the dummy variables
are declared as arrays of length NATOM.
What's the correct fix here - is it to change the nature of the
arguments passed, or to rewrite the parameter declarations as scalar values?
Cheers,
Ben
_______________________________________________
AMBER-Developers mailing list
AMBER-Developers.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber-developers
Received on Wed Feb 10 2010 - 12:30:03 PST