why PGF90 Could not resolve generic procedure?

When compiling a package named SIESTA using its makefile, I meet with the problems as follows:


Dragon:~/siesta-2.0/Src$make

Compilation architecture to be used: i686-pc-linux-gnu–Portland
If this is not what you want, create the right
arch.make file using the models in Sys

Hit ^C to abort…

==> Incorporating information about present compilation (compiler and flags)
make[1]: Entering directory /data0/zrh/siesta-2.0/Src' pgf90 -c -g -DFC_HAVE_FLUSH -DFC_HAVE_ABORT compinfo.F90 make[1]: Leaving directory /data0/zrh/siesta-2.0/Src’
#@rm -f compinfo.F90

(cd wxml ; make module)
/data0/zrh/siesta-2.0/Src/wxml
make[1]: Entering directory `/data0/zrh/siesta-2.0/Src/wxml’
pgf90 -c -g flib_wstml.f90
PGF90-S-0155-Could not resolve generic procedure xml_addattribute (flib_wstml.f90: 81)
PGF90-S-0155-Could not resolve generic procedure xml_addattribute (flib_wstml.f90: 82)
PGF90-S-0155-Could not resolve generic procedure xml_addattribute (flib_wstml.f90: 83)
PGF90-S-0155-Could not resolve generic procedure xml_addattribute (flib_wstml.f90: 84)
PGF90-S-0155-Could not resolve generic procedure xml_addattribute (flib_wstml.f90: 85)
PGF90-S-0155-Could not resolve generic procedure xml_addattribute (flib_wstml.f90: 86)
PGF90-S-0155-Could not resolve generic procedure xml_addattribute (flib_wstml.f90: 87)
PGF90-S-0155-Could not resolve generic procedure xml_addattribute (flib_wstml.f90: 88)
PGF90-S-0155-Could not resolve generic procedure xml_addattribute (flib_wstml.f90: 89)
PGF90-S-0155-Could not resolve generic procedure xml_addattribute (flib_wstml.f90: 90)
0 inform, 0 warnings, 10 severes, 0 fatal for stmaddstarttag
PGF90-S-0155-Could not resolve generic procedure xml_addattribute (flib_wstml.f90: 117)
PGF90-S-0155-Could not resolve generic procedure xml_addattribute (flib_wstml.f90: 118)

the code of module flib_wstml.f90 is
module flib_wxml
use m_wxml_text
use m_wxml_core
use m_wxml_overloads
public
end module flib_wxml

and the code of m_wxml_text is
module m_wxml_text
implicit none
!
integer, private, parameter :: sp = selected_real_kind(6,30)
integer, private, parameter :: dp = selected_real_kind(14,100)
!
private
public :: str
interface str
module procedure str_integer_fmt, str_integer, &
str_logical_fmt, str_logical, &
str_real_dp, str_real_sp
end interface
CONTAINS
function str_integer_fmt(i,format) result(s)
integer, intent(in) :: i
character(len=*), intent(in) :: format
character(len=100) :: s

write(s,format) i
s = adjustl(s)
end function str_integer_fmt

function str_integer(i) result(s)
! This will work correctly (return an appropriately-sized
! string) for integers i s.t. -99999999<=i<=999999999
integer, intent(in) :: i
#ifndef WXML_INIT_FIX
character(len=int(merge(log10(real(max(abs(i),1)))+1, &
log10(real(max(abs(i),1)))+2, &
sign(i,1)>0))) :: s

Hi baal,

The error means that no procedure named “xml_addattribute” can be found which matches the arguments of the actual calls. It appears that SIESTA is proprietary software so I’m unable to download a copy and investigate further. Please contact the authors of the package since the issue is more likely a problem with their build process.

Thanks,
Mat

Hi Mat,
Thank you very much for your responses. the procedure named “xml_addattribute” is the interface of module “m_wxml_core.f90”:
module m_wxml_core

use m_wxml_buffer
use m_wxml_array_str, only: assign_array_to_str
use m_wxml_array_str, only: assign_str_to_array
use m_wxml_escape, only: check_Name
use m_wxml_elstack
use m_wxml_dictionary

implicit none

logical, private, save :: pcdata_advance_line_default = .false.
logical, private, save :: pcdata_advance_space_default = .false.

integer, private, parameter :: sp = selected_real_kind(6,30)
integer, private, parameter :: dp = selected_real_kind(14,100)

private

type, public :: xmlf_t
character, pointer :: filename(:)
integer :: lun
type(buffer_t) :: buffer
type(elstack_t) :: stack
module m_wxml_core

use m_wxml_buffer
use m_wxml_array_str, only: assign_array_to_str
use m_wxml_array_str, only: assign_str_to_array
use m_wxml_escape, only: check_Name
use m_wxml_elstack
use m_wxml_dictionary

implicit none

logical, private, save :: pcdata_advance_line_default = .false.
logical, private, save :: pcdata_advance_space_default = .false.

integer, private, parameter :: sp = selected_real_kind(6,30)
integer, private, parameter :: dp = selected_real_kind(14,100)

private

type, public :: xmlf_t
character, pointer :: filename(:)
integer :: lun
type(buffer_t) :: buffer
type(elstack_t) :: stack
type(wxml_dictionary_t) :: dict
logical :: start_tag_closed
logical :: root_element_output
logical :: indenting_requested
end type xmlf_t

public :: xml_OpenFile, xml_NewElement, xml_EndElement, xml_Close
public :: xml_AddXMLDeclaration
public :: xml_AddXMLStylesheet
public :: xml_AddXMLPI
public :: xml_AddComment, xml_AddCdataSection
interface xml_AddPcdata
module procedure xml_AddPcdata_Ch
end interface
!
interface xml_AddAttribute
module procedure xml_AddAttribute_Ch
end interface
!
public :: xml_AddArray
interface xml_AddArray
module procedure xml_AddArray_integer, &
xml_AddArray_real_dp, xml_AddArray_real_sp
end interface
private :: xml_AddArray_integer, xml_AddArray_real_dp, xml_AddArray_real_sp

private :: get_unit
private :: add_eol
private :: write_attributes

!overload error handlers to allow file info
interface wxml_warning
module procedure wxml_warning_xf
end interface
interface wxml_error
module procedure wxml_error_xf
end interface
interface wxml_fatal
module procedure wxml_fatal_xf
end interface

!
! Heuristic (approximate) target for justification of output
! Large unbroken pcdatas will go beyond this limit
!
integer, private, parameter :: COLUMNS = 80

! TOHW - This is the longest string that may be output without
! a newline. The buffer must not be larger than this, but its size
! can be tuned for performance.
integer, private, parameter :: xml_recl = 4096

CONTAINS

!-------------------------------------------------------------------
subroutine xml_OpenFile(filename, xf, indent)
character(len=*), intent(in) :: filename
type(xmlf_t), intent(inout) :: xf
logical, intent(in), optional :: indent

integer :: iostat

allocate(xf%filename(len(filename)))
call assign_str_to_array(xf%filename,filename)

call get_unit(xf%lun,iostat)
if (iostat /= 0) call wxml_fatal(xf, “cannot open file”)
!
! Use large I/O buffer in case the O.S./Compiler combination
! has hard-limits by default (i.e., NAGWare f95’s 1024 byte limit)
! This is related to the maximum size of the buffer.
! TOHW - This is the longest string that may be output without
! a newline. The buffer must not be larger than this, but its size
! can be tuned for performance.

open(unit=xf%lun, file=filename, form=“formatted”, status=“replace”, &
action=“write”, position=“rewind”, recl=xml_recl)

call init_elstack(xf%stack)

call init_dict(xf%dict)
call reset_buffer(xf%buffer)

xf%start_tag_closed = .true.
xf%root_element_output = .false.

xf%indenting_requested = .false.
if (present(indent)) then
xf%indenting_requested = indent
endif
end subroutine xml_OpenFile

!-------------------------------------------------------------------
subroutine xml_AddXMLDeclaration(xf,encoding)
type(xmlf_t), intent(inout) :: xf
character(len=*), intent(in), optional :: encoding

if (present(encoding)) then
call add_to_buffer(“<?xml version=""1.0"" encoding=""" & // trim(encoding) // """ ?>”, xf%buffer)
else
call add_to_buffer(“<?xml version=""1.0"" ?>”, xf%buffer)
endif
end subroutine xml_AddXMLDeclaration

!-------------------------------------------------------------------
subroutine xml_AddXMLStylesheet(xf, href, type, title, media, charset, alternate)
type(xmlf_t), intent(inout) :: xf
character(len=*), intent(in) :: msg

write(6,‘(a)’) ‘ERROR(wxml) in writing to file ‘, xmlf_name(xf)
write(6,’(a)’) msg

call xml_Close(xf)
stop

end subroutine wxml_error_xf

subroutine wxml_fatal_xf(xf, msg)
!Emit error message and abort with coredump. Does not try to
!close file, so should be used from anything xml_Close might
!itself call (to avoid infinite recursion!)

type(xmlf_t), intent(in) :: xf
character(len=*), intent(in) :: msg

write(6,‘(a)’) ‘ERROR(wxml) in writing to file ‘, xmlf_name(xf)
write(6,’(a)’) msg

call pxfabort
stop

end subroutine wxml_fatal_xf

pure function xmlf_name(xf) result(fn)
Type (xmlf_t), intent(in) :: xf
character(len=size(xf%filename)) :: fn
call assign_array_to_str(fn,xf%filename)
end function xmlf_name


end module m_wxml_core

Hi baal,

I see the interface block, but don’t see a definition for the module procedure xml_AddAttribute_Ch. Is it defined elsewhere? Does it’s argument list match the call’s argument list?

  • Mat