[AMBER-Developers] argument conventions problems in AmberTools/src/rism/amber_rism_interface.F90

From: Åke Sandgren via AMBER-Developers <amber-developers.ambermd.org>
Date: Thu, 23 Jun 2022 09:56:49 +0200

Hi!

In subroutine rism_writeThermodynamicsDistributions there are some daxpy
calls with bad arguments convetions.

===
        ! Outputting entropy map.
        if (len_trim(entropyfile) /= 0 .and. rismprm%entropicDecomp == 1
.and. &
             rism3d_canCalc_DT(rism_3d)) then
           call DAXPY(this%grid%totalLocalPointsR, -1d0,
solvationEnergy_map, 1, excessChemicalPotential_map, 1)
           call
DAXPY(this%grid%totalLocalPointsR*this%solvent%numAtomTypes, -1d0, &
                solvationEnergy_V_map, 1, excessChemicalPotential_V_map, 1)
           call writeThermo(writeVolume,entropyfile, suffix,
excessChemicalPotential_map,&
                excessChemicalPotential_V_map)
        end if

===

Error from gfortran 11
===
/dev/shm/eb-ake/AmberTools/21.12/foss-2021b/AmberTools/src/rism/amber_rism_interface.F90:3153:56:

  3078 |
*this%solvent%charge(iv)*this%solvent%density(iv), this%guv(1, iv), 1,
work, 1)
       | 2
......
  3153 | call DAXPY(this%grid%totalLocalPointsR, -1d0,
solvationEnergy_map, 1, excessChemicalPotential_map, 1)
       | 1
Error: Rank mismatch between actual argument at (1) and actual argument
at (2) (scalar and rank-3)
===

solvationEnergy_map and solvationEnergy_V_map are pointers and gfortran
11 complains about those calls compared to the first daxpy call in that
function:
           call DAXPY(this%grid%totalLocalPointsR, sqrt((KB
*this%solvent%temperature)/COULOMB_CONST_E) &
                *this%solvent%charge(iv)*this%solvent%density(iv),
this%guv(1, iv), 1, work, 1)

There are a couple of other daxpy/dcopy calls with the same problem in
there.

-- 
Ake Sandgren, HPC2N, Umea University, S-90187 Umea, Sweden
Internet: ake.hpc2n.umu.se  Mobile: +46 70 7716134  Fax: +46 90-580 14
WWW: http://www.hpc2n.umu.se
_______________________________________________
AMBER-Developers mailing list
AMBER-Developers.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber-developers
Received on Thu Aug 04 2022 - 13:33:42 PDT
Custom Search