Maximum length elements

25 views
Skip to first unread message

nbunderson

unread,
Mar 21, 2012, 9:58:11 PM3/21/12
to FoX-discuss
Hi, I'm just getting started using FoX and am building on a windows 32-
bit os. Shane was kind enough to share his modifications and project
file for the intel compiler. The library built without problems but I
had a problem with one of the examples (dom_example_2.f90). It seems
that the sax_parser has trouble reading the large element of h2o.xml.
I got an access violation while reading that element (band in
bandlist). I tried removing some of the unnecessary whitespaces and
that fixed the problem. However, my xml's will have large elements
and it'd be nice to fix the problem. I tried another xml with a large
element and the sax_parser failed on the 996th character of the
element for both xml files. Not sure that's meaningful since access
violations don't usually show up where the problem is. Any help is
much appreciated!

Nate

Andrew Walker

unread,
Mar 22, 2012, 5:43:59 AM3/22/12
to fox-d...@googlegroups.com
Hi Nate,

This sounds like a bug in the intel compiler that was discussed on this list a couple of years ago:

* Intel bug report: http://software.intel.com/en-us/forums/showthread.php?t=77847&o=a&s=lr
* Discussion (mixed in with some issues about windows file names): http://groups.google.com/group/fox-discuss/browse_thread/thread/9f723d21280319e9?hl=en

I believe this particular bug has been fixed. I think increasing the maximum stack size is a potential work around if you cannot upgrade. If you do upgrade it's worth knowing that there are, apparently, additional bugs in ifort 12.0 and 12.1 (segfaults, bus errors and ICEs from the generic procedures in fox_m_fsys_format.F90. I've been sent a work around for these but have yet to merge it. Prod me if this turns out to be a problem.


Best wishes,

Andrew

> --
> You received this message because you are subscribed to the Google Groups "FoX-discuss" group.
> To post to this group, send email to fox-d...@googlegroups.com.
> To unsubscribe from this group, send email to fox-discuss...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/fox-discuss?hl=en.
>

--

Andrew Walker <andrew...@bris.ac.uk>
http://www1.gly.bris.ac.uk/~walker/
phone: 0117 9545698

Department of Earth Sciences,
University of Bristol,
Wills Memorial Building,
Queen’s Road,
Bristol, BS8 1RJ, UK


Shane Clauson

unread,
Mar 22, 2012, 6:27:16 AM3/22/12
to fox-d...@googlegroups.com, Andrew Walker, nbund...@gmail.com
Hi Andrew,
I've forwarded Nate a copy of the ifort project that I'm using here. 
This is running under a VisualStudio 2010 + Intel(R) Visual Fortran Compiler XE 12.1.3.300 
(also, confusingly labelled by Intel as Version 2011 (Update 9))
environment. 

Its a slightly modified code branch merged with the most recent version of FoX from
github labelled as 4.1.2.  

I've encountered various issues with the Intel compiler, including 
possibly the class of problem you're alluding to with fox_m_fsys_format.F90
In this case under the latest intel release, the len() interface is not resolving correctly, 
so calls like this one in str_real_dp_array for example
  
� pure�function�str_real_dp_array(xa)�result(s)
����real(dp),�dimension(:),�intent(in)�::�xa
 �� character(len=len(xa))�::�s

need to be resolved explicitly like so 

���� character(len=str_real_dp_array_len(xa))�::�s

As mentioned in the past, I'm happy to forward a copy of the branched code for 
you to consider merging with the FoX mainline. 

Regards,
Shane Clauson 
phone: 0117 9545698

Department of Earth Sciences,
University of Bristol,
Wills Memorial Building, 
Queen�s Road, 
Bristol, BS8 1RJ, UK







Andrew Walker

unread,
Mar 23, 2012, 5:43:11 AM3/23/12
to Shane Clauson, fox-d...@googlegroups.com, Andrew Walker, nbund...@gmail.com
Hi Shane,

It would be great if you could forward me a copy of the branched code.
(The len interface is the cause of the issue with ifort - leading to a run
time crash I think - but apparently 'make debug' results in an internal
compiler error and I don't know if this is related.) From my point of view
the best way to do this is as a github pull request. However just sending
a copy of the code that I can diff would be almost as easy to deal with.

Cheers,

Andrew


On Thu, March 22, 2012 10:27 am, Shane Clauson wrote:
> Hi Andrew,
> I've forwarded Nate a copy of the ifort project that I'm using here.
> This is running under a VisualStudio 2010 + Intel(R) Visual Fortran
> Compiler XE 12.1.3.300
> (also, confusingly labelled by Intel as Version 2011 (Update 9))
> environment.
>
> Its a slightly modified code branch merged with the most recent version of
> FoX from
> github labelled as 4.1.2.
>
> I've encountered various issues with the Intel compiler, including
> possibly the class of problem you're alluding to with
> fox_m_fsys_format.F90
> In this case under the latest intel release, the len() interface is not
> resolving correctly,
> so calls like this one in str_real_dp_array for example
>

> pure function str_real_dp_array(xa)result(s)
> real(dp),dimension(:),intent(in) :: xa
> character(len=len(xa)) :: s


>
> need to be resolved explicitly like so
>

> character(len=str_real_dp_array_len(xa)) :: s

>> Queenï¿œs Road,
>> Bristol, BS8 1RJ, UK
>>
>>
>>
>>
>>
>>
>
>


--


Nate Bunderson

unread,
Mar 23, 2012, 11:44:21 AM3/23/12
to Andrew Walker, Shane Clauson, fox-d...@googlegroups.com
Shane and Andrew, I updated my compiler and the problem went away.  Thanks to both of you. I look forward to using FoX and I will keep you posted about progress!

Nate

>> Queen s Road,
>> Bristol, BS8 1RJ, UK
>>
>>
>>
>>
>>
>>
>
>


--



Reply all
Reply to author
Forward
0 new messages