On Sat, Nov 22, 2014 at 5:37 PM, Parker de Waal <Parker.deWaal.vai.org>
wrote:
> Hi Everyone,
>
> I'm currently working to install Amber14 on our new workstation, however
> whenever I try to compile the serial version with gnu (./configure gnu) the
> following error occurs:
>
> make[3]: Leaving directory '/opt/amber14/AmberTools/src/rism'
> gfortran -DBINTRAJ -DEMIL -c -O0 -ffree-form -I../pbsa -I../sqm
> -I../rism -I../../../include -I/opt/amber14/include
> -I/opt/amber14/include -DRISMSANDER -o pupildata.o pupildata.F90
> pupildata.F90:68.31:
>
> character(len=4) :: to_upper
> 1
> Error: Explicit interface required for 'to_upper' at (1): result with
> non-constant character length
>
What version of gfortran are you using? (i.e., what is the output of
"gfortran --version"?)
So what I *think* the problem here is that to_upper is defined as a
length-4 integer, whereas the to_upper function (see line 164 of
pupildata.F90) is defined as length-* character function (basically any
length). As a result, gfortran chokes, because it doesn't find a
"to_upper" function that matches the specific type it is assigned.
Therefore, gfortran asks for an explicit interface (which, as I understand
it, is basically Fortran's way of implementing function overloading in the
C++ sense) that defines how to_upper behaves as a length-4 character
function.
The simplest solution here, in my opinion, is to change (len=4) in that
line (pupildata.F90, line 68) to (len=*).
If you make that change, does it work? On the other hand, you can try to
define to_upper to use length-4 characters rather than arbitrary length
(again, so call signatures match). If you find something that fixes this
problem, please let us know so we can make that same fix.
It would also help to know what version of compilers you are using so I can
try and reproduce the issue on my machine to better understand what's
happening.
Thanks!
Jason
--
Jason M. Swails
BioMaPS,
Rutgers University
Postdoctoral Researcher
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Sat Nov 22 2014 - 21:00:03 PST