Hi,

   It seems that there is a problem in the FoX library, included in siesta,
with some compilers.
http://software.intel.com/en-us/forums/intel-fortran-compiler-for-linux-and-mac-os-x/topic/70208/

<http://software.intel.com/en-us/forums/intel-fortran-compiler-for-linux-and-mac-os-x/topic/70208/>
Try to switch to an older version or another compiler.

Regards

On Mon, Nov 30, 2009 at 6:19 AM, Ferdinand Rissner <[email protected]>wrote:

> Hi,
>
> I think I observe the same problem here. Using the Intel Compiler 11.0 I
> also had to modify siesta_force.F in order to compile siesta successfully.
>
> Jobs then abort almost immediately printing the error message
>
> "ERROR(FoX)
> xml_AddAttribute: Invalid character in value" .
>
> I found that the error occurs in the loop
>
>   do i = 1,3
>      call xml_NewElement(xf, "latticeVector")
>      if (present(units)) then
>        call xml_AddAttribute(xf, "units", units)
>      else
>        call xml_AddAttribute(xf, "units", U_ANGSTR)
>      endif
>      call xml_AddAttribute(xf, "dictRef", "cml:latticeVector")
>      call xml_AddCharacters(xf, cell(:,i), fmt)
>      call xml_EndElement(xf, "latticeVector")
>    enddo
>
> in the subroutine cmlAddLatticedp in the file
>
> ~/siesta-3.0-b/Src/FoX/wcml/m_wcml_lattice.F90 .
>
> I inserted lines
>
>        write(6,*)"MYOUTPUT:",i,units
>
> before and after every call in this loop and found that "units" changes
> from "siestaUnits:angstrom" to complete mess for i=1 after calling
> xml_AddCharacters .
>
> Hope it helps,
> Ferdinand
>
>
> Ozan ARI wrote:
>
>> I digged around about the problem and found the file that causes the
>> problem.
>>
>> The error comes from "m_wxml_core.f90" ...
>> When i opened the file and search for error string then i found the
>> if (.not.checkChars(value, xf%xds%xml_version)) call
>> wxml_error("xml_AddAttribute: Invalid character in value")
>>
>> problem but i couldnot understand at all.
>>
>> But i think its about some subroutine so i am copying necessary parts of
>> file again:
>>
>> subroutine xml_AddAttribute_Ch(xf, name, value, escape, type,
>> ws_significant)
>> type(xmlf_t), intent(inout) :: xf
>> character(len=*), intent(in) :: name
>> character(len=*), intent(in) :: value
>> logical, intent(in), optional :: escape
>> character(len=*), intent(in), optional :: type
>> logical, intent(in), optional :: ws_significant
>>
>> #ifndef DUMMYLIB
>> logical :: esc
>> character, pointer :: type_(:)
>>
>> if (present(type)) then
>> if
>> (type/='CDATA'.and.type/='ID'.and.type/='IDREF'.and.type/='IDREFS'.and.type/='NMTOKEN'.and.type/='NMTOKENS'
>> &
>> .and.type/='ENTITY'.and.type/='ENTITIES'.and.type/='NOTATION') then
>> call wxml_fatal("Invalid type in xml_AddAttribute: "//type)
>> endif
>> type_ => vs_str_alloc(type)
>> else
>> ! We assume CDATA, but need to worry about whether the caller cares about
>> whitespace ...
>> if (present(ws_significant)) then
>> if (ws_significant) then
>> type_ => vs_str_alloc('CDATA')
>> else
>> type_ => vs_str_alloc('CDANO') ! CDAta, whitespace Not significant
>> endif
>> else
>> type_ => vs_str_alloc('CDAMB') ! CDAta, whitespace MayBe significant
>> endif
>> endif
>>
>> call check_xf(xf)
>>
>> if (.not.checkChars(value, xf%xds%xml_version)) call
>> wxml_error("xml_AddAttribute: Invalid character in value")
>>
>> if (xf%namespace) then
>> if (.not.checkQName(name, xf%xds%xml_version)) &
>> call wxml_error("Invalid Attribute Name "//name)
>> else
>> if (.not.checkName(name, xf%xds%xml_version)) &
>> call wxml_error("Invalid Attribute Name "//name)
>> endif
>>
>> if (present(escape)) then
>> esc = escape
>> else
>> esc = .true.
>> endif
>>
>> if (name=="xml:space") then
>> ! The value can only be "default" or "preserve", by 2.10
>> if (.not.esc) then
>> if (value/="default".and.value/="preserve") &
>> call wxml_fatal("Invalid value for xml:space attrbute")
>> endif
>> endif
>>
>> ! FIXME when escape is false we should still do full verification
>> ! where possible.
>> ! Currently - minimal check: only extra allowed is character entity
>> references.
>> ! We check they exist, and are not unparsed.
>> ! Ideally we would fully expand all entity references (at least for
>> ! a standalone document where we can) and then
>> ! match the resultant production against [XML]-3.3.1. This is
>> ! initially too much work though, so we just check simple
>> ! syntactic constraint.
>>
>> if (.not.esc) then
>> if (.not.checkAttValue(value, xf%xds%xml_version)) &
>> call wxml_error(xf, "Invalid attribute value: "//value)
>> if (index(value, '&') > 0) then
>> ! There are entity references
>> ! They should exist (unless we are not standalone) and they must not be
>> unparsed.
>> if (.not.checkExistingRefsInAttValue()) then
>> if (xf%xds%standalone) then
>> call wxml_error(xf, "outputting unknown entity. Cannot guarantee
>> validity.")
>> else
>> call wxml_warning(xf, "Warning: outputting unknown entity. Cannot
>> guarantee validity.")
>> endif
>> endif
>> if (.not.checkParsedRefsInAttValue()) &
>> call wxml_error(xf, "Warning: outputting unknown entity. Cannot guarantee
>> validity.")
>> endif
>> endif
>>
>> if (xf%state_2 /= WXML_STATE_2_INSIDE_ELEMENT) &
>> call wxml_error(xf, "attributes outside element content: "//name)
>>
>> if (hasKey(xf%dict,name)) then
>> call wxml_error(xf, "duplicate att name: "//name)
>> elseif (xf%namespace) then
>> if (hasKey(xf%dict, &
>> getnamespaceURI(xf%nsDict,prefixOfQname(name)), localpartofQname(name)))
>> then
>> call wxml_error(xf, "duplicate att after namespace processing: "//name)
>> endif
>> endif
>>
>> if (xf%namespace) then
>> if (len(prefixOfQName(name))>0) then
>> if (prefixOfQName(name)/="xml".and.prefixOfQName(name)/="xmlns") then
>> if (.not.isPrefixInForce(xf%nsDict, prefixOfQName(name))) &
>> call wxml_error(xf, "namespace prefix not registered:
>> "//prefixOfQName(name))
>> endif
>> if (esc) then
>> call add_item_to_dict(xf%dict, localpartofQname(name),
>> escape_string(value, xf%xds%xml_version), prefixOfQName(name), &
>> getnamespaceURI(xf%nsDict,prefixOfQname(name)), type=str_vs(type_))
>> else
>> call add_item_to_dict(xf%dict, localpartofQname(name), value,
>> prefixOfQName(name), &
>> getnamespaceURI(xf%nsDict,prefixOfQName(name)), type=str_vs(type_))
>> endif
>> else
>> if (esc) then
>> call add_item_to_dict(xf%dict, name, escape_string(value,
>> xf%xds%xml_version), type=str_vs(type_))
>> else
>> call add_item_to_dict(xf%dict, name, value, type=str_vs(type_))
>> endif
>> endif
>> else
>> if (esc) then
>> call add_item_to_dict(xf%dict, name, escape_string(value,
>> xf%xds%xml_version), type=str_vs(type_))
>> else
>> call add_item_to_dict(xf%dict, name, value, type=str_vs(type_))
>> endif
>> endif
>>
>> !FIXME need to deallocate this when we move to better error handling
>> deallocate(type_)
>>
>> contains
>> function checkExistingRefsInAttValue() result(p)
>> logical :: p
>>
>> integer :: i1, i2
>>
>> ! Here we assume we have syntactic well-formedness as
>> ! checked by checkAttValue.
>> ! We also assume we do not have simply one entity as
>> ! the contents - that is checked by checkAttValueEntity
>>
>> p = .false.
>> i1 = index(value, '&')
>> i2 = 0
>> do while (i1 > 0)
>> i1 = i2 + i1
>> i2 = index(value(i1+1:),';')
>> if (i2 == 0) return
>> i2 = i1 + i2
>> if (.not.existing_entity(xf%xds%entityList, value(i1+1:i2-1)) .and. &
>> .not.checkCharacterEntityReference(value(i1+1:i2-1), xf%xds%xml_version))
>> &
>> return
>> i1 = index(value(i2+1:), '&')
>> enddo
>> p = .true.
>>
>> end function checkExistingRefsInAttValue
>>
>> function checkParsedRefsInAttValue() result(p)
>> logical :: p
>>
>> integer :: i1, i2
>>
>> ! Here we assume we have syntactic well-formedness as
>> ! checked by checkAttValue.
>>
>> p = .false.
>> i1 = index(value, '&')
>> i2 = 0
>> do while (i1 > 0)
>> i1 = i1 + i2
>> i2 = index(value(i1+1:),';')
>> if (i2 == 0) return
>> i2 = i1 + i2
>> if (is_unparsed_entity(xf%xds%entityList, value(i1+1:i2-1))) &
>> return
>> i1 = index(value(i2+1:), '&')
>> enddo
>> p = .true.
>>
>> end function checkParsedRefsInAttValue
>> #endif
>> end subroutine xml_AddAttribute_Ch
>>
>>
>>
>>
>> Any idea people?
>>
>>
>> 2009/11/28 Ozan ARI <[email protected] <mailto:[email protected]>>
>>
>>    Thanx for your reply,
>>
>>    I changed the siesta_forces.F file and it fixed compiling problem
>>    but now i get some wierd error while i try to run any test or my
>>    calculations.
>>
>>
>>                                   mpirun -n 8 siesta <input.fdf > out.fdf
>>    ERROR(FoX)
>>    xml_AddAttribute: Invalid character in value
>>
>>
>>
>>    when i check the out file it seems the PAO.basis block is well done
>>    but the next lines are
>>
>>
>>    prinput:
>>    ----------------------------------------------------------------------
>>
>>    coor:   Atomic-coordinates input format  =     Cartesian coordinates
>>    coor:                                          (in Angstroms)
>>
>>    siesta: Atomic coordinates (Bohr) and species
>>    siesta:      1.30391   2.25844   0.00000  1        1
>>    siesta:      2.60782   0.00000   0.00000  1        2
>>    siesta:      1.30391  -2.25844   0.00000  1        3
>>    siesta:     -1.30391  -2.25844   0.00000  1        4
>>    siesta:     -2.60782   0.00000   0.00000  1        5
>>    siesta:     -1.30391   2.25844   0.00000  1        6
>>    siesta:      2.30547   3.99319   0.00000  2        7
>>    siesta:      4.61093   0.00000   0.00000  2        8
>>    siesta:      2.30547  -3.99319   0.00000  2        9
>>    siesta:     -2.30547  -3.99319   0.00000  2       10
>>    siesta:     -4.61093   0.00000   0.00000  2       11
>>    siesta:     -2.30547   3.99319   0.00000  2       12
>>
>>    siesta: System type = molecule    rank 0 in job 19  tuz_42241   caused
>> collective abort of all ranks
>>      exit status of rank 0: killed by signal 9
>>
>>
>>    Thanks for help again. I could not understand the error here, may be
>>    system type?
>>
>>
>>
>

Responder a