On 2008-08-01 22:24+0100 Andrew Ross wrote:

> On Fri, Aug 01, 2008 at 12:33:05PM -0700, Alan Irwin wrote:
>> The result does not build for gfortran on my 64-bit Debian testing platform.
>>
>> Here is the x23f build error message.
>>
>> /home/software/plplot_cvs/HEAD/plplot_cmake/examples/f95/x23f.f90:314.19:
>>
>>         call plsfci(0)
>>                    1
>> Error: Type mismatch in argument 'fci' at (1); passed INTEGER(4) to 
>> INTEGER(16)
>> make[2]: *** [examples/f95/CMakeFiles/x23f95.dir/x23f.o] Error 1
>>
>> Here is the first line of the result from gfortran --version
>> GNU Fortran (Debian 4.3.1-2) 4.3.1

> I've commited a fix to explicitly make the 0 of kind plunicode.
> Hopefully this should allow the example to build. I am concerned that
> about the integer(16) though. I was assuming that an integer larger than
> integer(4) would be integer(8). Is long long also 128 bit on your
> machine? If not then the bindings may still not work correctly anyway.

I am pretty sure long long corresponds to 64-bit integers on my platform,
but I have sent you my limits.h and features.h off-list to see if you can
come to a definitive conclusion from that thicket of preprocessor logic.

I also noticed the integer(16) and did not like it since in fortran 77 at
least integer*8 would correspond to 64 bits and integer*16 to 128 bits.
Arjen, do you know about this?

> Can you test again with my fix and see what happens?

The f95 example build errors are gone now.  Also, the resulting C and f95
results agree exactly now.  So your change appears to be a good fix
for the 64-bit problem I found.

<other topics brought up by the fortran comparisons I did>

I tested the fortran 95 results against the corresponding C results using

[EMAIL PROTECTED]> (for LIST in `ls x??f95.psc |sed 's?f95.psc??'`; do echo
$LIST;  diff ${LIST}c.psc ${LIST}f95.psc; done) |less

Most examples agreed exactly.  The exceptions were x06, x07, x20 and x21
here is the start of the diff from example 6.

[EMAIL PROTECTED]> diff x06f95.psc x06c.psc |head -20
6c6
< %%CreationDate: Fri Aug  1 15:37:27 2008
---
> %%CreationDate: Fri Aug  1 15:37:48 2008
217c217
< -1.000 (  0) SW
---
> -1.000 (0) SW
219c219
< (  0) show
---
> (0) show
253c253
< -1.000 ( 10) SW
---
> -1.000 (10) SW
255c255
< ( 10) show
---
> (10) show

Why does the Fortran 95 version have leading blanks for the numbers?  If we
could solve that formatting issue, it appears both example 6 and 7 for
Fortran 95 would be identical to the corresponding C examples.  In contrast
the differences for examples 20 and 21 are numerical rather than format
issues.  Those examples may just require some reprogramming to identically
follow the C template.

I did a similar test for f77.

f77 examples 20 and 21 agree with their fortran 95 counterparts so also
need adjustment to agree with the C template for those two examples.

Obviously f77 example 23 is not consistent with the f95 or C example because
the FCI stuff has not been implemented yet.

All other f77 results were the same as the C results.

In particular example 6 and 7 are fine (no formatting issues). So that
result may give a clue where to look to fix the formatting issue for the f95
case for those two examples.

</other topics brought up by the fortran comparisons I did>

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to