CMake + Fortran

I've added some support for Fortran compilation using CMake to the git branch of hdf5 1.8.x
In order to play with the fortran stuff, you'll need cmake 2.8.0 (the latest release, which seems to handle fortran much better than previous versions).

I've tested it on linux using intel fortran 11.x and all is working nicely.

On windows using intel fortran 11.x all works except for a couple of wrinkles
1) There seems to be a bug in the visual studio generation of the name mangling detection project, so you have to click "yes" a few times for it to complete when a dialog pops up.
2) When compiling the various utility projects which detect type sizes, a cryptic message pops up reading

warning: Fortran REAL is 16 bytes, no corresponding C floating type
         Disabling Fortran 16 byte REALs

This is ok by me, (it is generated by H5match_types.c) - but I have one fortran test which fails to compile ...
tH5T.f90
     CALL h5dwrite_f(dset_id, dt3_id, double_member, data_dims, error, xfer_prp = plist_id)
         CALL check("h5dwrite_f", error, total_error)
Error 2 error #6285: There is no matching specific subroutine for this generic subroutine call. [H5DWRITE_F] D:\Code\hdf5-v18\fortran\test\tH5T.f90 256
Error 3 error #6285: There is no matching specific subroutine for this generic subroutine call. [H5DREAD_F] D:\Code\hdf5-v18\fortran\test\tH5T.f90 496

Now the last time I worked with Fortran was (I suspect) before some people on this list were born, so my best guess to this error, is that the test is trying to use the "real 16" type which has been disabled.

Could be I'm way off, but either way, does anyone know what to do?

Many thanks
NB. Latest dashboard for two test machines is here :
http://my.cdash.org/index.php?project=hdf5-v18

JB

···

--
John Biddiscombe, email:biddisco @ cscs.ch

CSCS, Swiss National Supercomputing Centre | Tel: +41 (91) 610.82.07
Via Cantonale, 6928 Manno, Switzerland | Fax: +41 (91) 610.82.82

If you compiled hdf5 where the default real is not double precision (i.e. you did not compile with -r8) then you need to compile the H5_DBLE_InterfaceInclude.f90, otherwise if your default real is double precision (with -r8) you need to compile H5_DBLE_InterfaceExclude.f90. This is done to avoid a non-unique conflict with the generic interfaces declared as REAL

Biddiscombe, John A. wrote:

···

I've added some support for Fortran compilation using CMake to the git branch of hdf5 1.8.x
In order to play with the fortran stuff, you'll need cmake 2.8.0 (the latest release, which seems to handle fortran much better than previous versions).

I've tested it on linux using intel fortran 11.x and all is working nicely.

On windows using intel fortran 11.x all works except for a couple of wrinkles
1) There seems to be a bug in the visual studio generation of the name mangling detection project, so you have to click "yes" a few times for it to complete when a dialog pops up.
2) When compiling the various utility projects which detect type sizes, a cryptic message pops up reading

warning: Fortran REAL is 16 bytes, no corresponding C floating type
         Disabling Fortran 16 byte REALs

This is ok by me, (it is generated by H5match_types.c) - but I have one fortran test which fails to compile ...
tH5T.f90
     CALL h5dwrite_f(dset_id, dt3_id, double_member, data_dims, error, xfer_prp = plist_id)
         CALL check("h5dwrite_f", error, total_error)
Error 2 error #6285: There is no matching specific subroutine for this generic subroutine call. [H5DWRITE_F] D:\Code\hdf5-v18\fortran\test\tH5T.f90 256
Error 3 error #6285: There is no matching specific subroutine for this generic subroutine call. [H5DREAD_F] D:\Code\hdf5-v18\fortran\test\tH5T.f90 496

Now the last time I worked with Fortran was (I suspect) before some people on this list were born, so my best guess to this error, is that the test is trying to use the "real 16" type which has been disabled.

Could be I'm way off, but either way, does anyone know what to do?

Many thanks
NB. Latest dashboard for two test machines is here :
http://my.cdash.org/index.php?project=hdf5-v18

JB

--

M. Scot Breitenfeld
The HDF Group
1901 So First ST.
Suite C-2
Champaign, IL 61820

brtnfld@hdfgroup.org
(217)244-5664 (office)
(217)333-9049 (fax)

Scott

I tested for RealIsDouble but had the result the wrong way around it seems. Swapping the result of the test over so that the other one is included seems to fix the compile error (I'd better check things still work if I force -r8 etc...)

Thanks for the help

JB

···

-----Original Message-----
From: hdf-forum-bounces@hdfgroup.org [mailto:hdf-forum-bounces@hdfgroup.org]
On Behalf Of Scot Breitenfeld
Sent: 25 November 2009 16:40
To: hdf-forum@hdfgroup.org
Subject: Re: [Hdf-forum] CMake + Fortran

If you compiled hdf5 where the default real is not double precision
(i.e. you did not compile with -r8) then you need to compile the
H5_DBLE_InterfaceInclude.f90, otherwise if your default real is double
precision (with -r8) you need to compile H5_DBLE_InterfaceExclude.f90.
This is done to avoid a non-unique conflict with the generic interfaces
declared as REAL

Biddiscombe, John A. wrote:
> I've added some support for Fortran compilation using CMake to the git
branch of hdf5 1.8.x
> In order to play with the fortran stuff, you'll need cmake 2.8.0 (the
latest release, which seems to handle fortran much better than previous
versions).
>
> I've tested it on linux using intel fortran 11.x and all is working
nicely.
>
> On windows using intel fortran 11.x all works except for a couple of
wrinkles
> 1) There seems to be a bug in the visual studio generation of the name
mangling detection project, so you have to click "yes" a few times for it to
complete when a dialog pops up.
> 2) When compiling the various utility projects which detect type sizes, a
cryptic message pops up reading
>
> warning: Fortran REAL is 16 bytes, no corresponding C floating type
> Disabling Fortran 16 byte REALs
>
> This is ok by me, (it is generated by H5match_types.c) - but I have one
fortran test which fails to compile ...
> tH5T.f90
> CALL h5dwrite_f(dset_id, dt3_id, double_member, data_dims, error,
xfer_prp = plist_id)
> CALL check("h5dwrite_f", error, total_error)
> Error 2 error #6285: There is no matching specific subroutine
for this generic subroutine call. [H5DWRITE_F] D:\Code\hdf5-
v18\fortran\test\tH5T.f90 256
> Error 3 error #6285: There is no matching specific subroutine
for this generic subroutine call. [H5DREAD_F] D:\Code\hdf5-
v18\fortran\test\tH5T.f90 496
>
> Now the last time I worked with Fortran was (I suspect) before some people
on this list were born, so my best guess to this error, is that the test is
trying to use the "real 16" type which has been disabled.
>
> Could be I'm way off, but either way, does anyone know what to do?
>
> Many thanks
> NB. Latest dashboard for two test machines is here :
> http://my.cdash.org/index.php?project=hdf5-v18
>
> JB
>
>

--

M. Scot Breitenfeld
The HDF Group
1901 So First ST.
Suite C-2
Champaign, IL 61820

brtnfld@hdfgroup.org
(217)244-5664 (office)
(217)333-9049 (fax)

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@hdfgroup.org
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org