Robin Vowels wrote:
>
> Pierre Hugnett wrote:
>
> > Robin Vowels wrote:
> >
> > > > on a machine with 4, 8 & 16 bytes reals:
> > > > integer, parameter :: sp=4, dp=8, qp=16
> > >
> > > 4, 8, and 16? How do these relate to the kind values?
> > >
> > these _are_ the kind values (these values may vary from one compiler to
> > another, of course)
>
> Then they are not portable.
> Better is to use SELECTED_REAL_KIND or some such.
>
I have one different .f90 file that contains the definitions of sp/dp/qp for each compiler I use. The right file is selected in the makefile (or in a shell script that runs the compilation commands) according to the machine I am running on... So I _know_ for a given compiler the kind values I must put in the corresponding file.
I gave up with SELECTED_REAL_KIND since I arrived to the conclusion that it can not be satisfactory when running on very different platforms (but this has been already discussed :-) )
Pierre Hugonnet
--
+-----------------------------------+----------------------------+
| Pierre Hugonnet | mail....CGG |
| | 1, rue Leon Migaux |
| Seismic Data Processing R&D | 91341 MASSY cedex |
| | FRANCE |
| COMPAGNIE GENERALE DE GEOPHYSIQUE | phone...(33) 164 47 45 59 |
| Massy processing centre (France) | fax.....(33) 164 47 32 49 |
| http://www.cgg.com | [log in to unmask] |
+-----------------------------------+----------------------------+
My opinions are not necessarily those of CGG
--------------------------------------------------------------------------------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|