Hi Jason,
Currently I am using GNU Fortran (GCC) 4.9.2.
Unfortunately after changing len=4 to character(len=*) :: to_upper an error still persists:
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=*) :: to_upper
1
Error: Explicit interface required for 'to_upper' at (1): result with non-constant character length
pupildata.F90:94.13:
auxname = to_upper(name)
1
Error: Function 'to_upper' is declared CHARACTER(*) and cannot be used at (1) since it is not a dummy argument
depend:3757: recipe for target 'pupildata.o' failed
make[2]: *** [pupildata.o] Error 1
make[2]: Leaving directory '/opt/amber14/AmberTools/src/sander'
Makefile:16: recipe for target 'serial' failed
make[1]: *** [serial] Error 2
make[1]: Leaving directory '/opt/amber14/AmberTools/src'
Makefile:7: recipe for target 'install' failed
make: *** [install] Error 2
Best,
Parker
________________________________________
From: Jason Swails [jason.swails.gmail.com]
Sent: Saturday, November 22, 2014 11:58 PM
To: AMBER Mailing List
Subject: Re: [AMBER] Installation error: recipe for target 'pupildata.o' failed
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://scanmail.trustwave.com/?c=129&d=4-nx1OI17dsUHw1yBJIwNJSyaCnmmVZIg1H6UGOX_g&u=http%3a%2f%2flists%2eambermd%2eorg%2fmailman%2flistinfo%2famber
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Sun Nov 23 2014 - 08:30:02 PST