[Pw_forum] Error encountered while attempting to allocate a d ata object.

Serguei Patchkovskii ps at ned.sims.nrc.ca
Sat Jan 31 21:37:02 CET 2004

On Sat, 31 Jan 2004, Konstantin Kudin wrote:
> in memory.f90:
> >  integer, parameter :: real_size = 8, int_size = 4
> >  integer, parameter :: comp_size = 2*real_size
>  By the following:
>   integer, parameter :: real_size_i = 8, int_size_i = 4
>   integer, parameter :: comp_size_i = 2*real_size_i

Actually, this is a very bad practice from the point of view of
portability. The kind numbers are not guaranteed to have specific
values. Fortunately, Fortran-90 provides a portable way of
specifying non-default kinds (through the SELECTED_REAL_KIND
and SELECTED_INTEGER_KIND intrinsics). Why not use those, and
make the code portable?


Dr. Serguei Patchkovskii

Tel: +1-(613)-990-0945
Fax: +1-(613)-947-2838
E-mail: Serguei.Patchkovskii at nrc.ca

Coordinator of Modelling Software
Theory and Computation Group
Steacie Institute for Molecular Sciences
National Research Council Canada
Room 2011, 100 Sussex Drive
Ottawa, Ontario
K1A 0R6 Canada

More information about the users mailing list