strange error with private in modules: Unresolved fixup
jdelia@intec.unl.edu.ar
jdelia@intec.unl.edu.ar
Wed Mar 5 14:26:00 GMT 2008
FX Coudert <fxcoudert@gmail.com> ha escrito:
>> OK, I have isolated the problem and it looks as if it is probably
>> with either
>> me or the hdf5 library. The following code causes the problem (the
>> hdf5 module
>> is from the hdf5 library):
>>
>> [...]
>>
>> It fails with both hdf5-1.6.6 and 1.8.0, both of which I compiled with the
>> same gcc and gfortran version as I am using.
>
> OK. Could you give us an ordered list of actions triggering it, so that
> we can reproduce it completely? I mean something like the following:
>
> 1. get hdf5-1.6.6.tar.gz from [URL], unpack it
> 2. go into the hdf5-1.6.6 directory and run "./configure
> --this-option" then "make"
> 3. go into the "src/modules" directory where the "hdf.mod" file was created
> 4. create there a file there containing the code below...
> 5. compile it with "gfortran -useful-option myfile.f90"
>
> I'm sorry if it seems a bit long to do, but it really helps because it
> avoids numerous misunderstandings and helps us through codebases and
> building procedures we're not always familiar with (hdf, in that case).
>
> Thanks again,
> FX
>
> --
> François-Xavier Coudert
> http://www.homepages.ucl.ac.uk/~uccafco/
Hi all,
At least with gfortran 4.1.1 and HDF5 1.8
http://hdf.ncsa.uiuc.edu/products/hdf5/index.html
that test has no any problem.
Here there is two alternatives of compilation, first using the -I
gfortran flag and the second one using the "h5pfc" driver similar to,
for instance, the mpif90 driver of MPI.
Regards,
Jorge.
--
!
! $ which gfortran
! /usr/bin/gfortran
! $ which h5pfc
! /usr/local/hdf5-mpi/1.8.0/bin/h5pfc
! $ gfortran --version
! GNU Fortran 95 (GCC) 4.1.1 20070105 (Red Hat 4.1.1-51)
! Copyright (C) 2006 Free Software Foundation, Inc.
!
! $ /usr/gfortran -I/usr/local/hdf5-mpi/1.8.0/include -o test.exe test.f90
! $ test.exe
! hello
!
! $ /usr/local/hdf5/1.8.0/bin/h5pfc -o test.exe test.f90
! $ test.exe
! hello
!
module module
use hdf5
implicit none
private
end module module
!
program test
use module
print*, "hello"
end program test
--
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
More information about the Fortran
mailing list