Hello PAPI developers,
I am also copying a Fortran list in case some other Fortran person wants
to make suggestions. It concerns the following line in your include
file:
INTEGER, PARAMETER :: PAPI_L1_DCM = -2147483648
One of my Fortran 95 compilers (NAG) gives an error on this:
Error: /HPC/Libraries/PAPI/papi/include/f90papi.h, line 26: Integer
literal 2147483648 too large for default KIND
Error: /HPC/Libraries/PAPI/papi/include/f90papi.h, line 109: Integer
literal 2147483648 too large for default KIND
I am not sure why, maybe because the positive version is not
representable (when I print the PAPI_L1_DCM as defined below, I get the
number -2147483648), but it does (g77 I believe gave a warning on this
literal).
The way to set bit patterns in Fortran (for now) is to use BOZ constants
(starting with letter B, O or Z for binary, octal and hexadecimal), and
also, you can use IEOR to get bitwise or and use the same mechanism you
do in the C header file:
INTEGER, PARAMETER :: PAPI_L1_DCM = Z'80000000'
! Is -2147483648
INTEGER, PARAMETER :: PAPI_L1_ICM = IOR(PAPI_L1_DCM,1)
! Is -2147483647
Thanks,
Aleks
--
__________________________________
Aleksandar Donev
Complex Materials Theory Group (http://cherrypit.princeton.edu/)
Princeton Materials Institute &
Program in Applied and Computational Mathematics
@ Princeton University
Address:
419 Bowen Hall, 70 Prospect Avenue
Princeton University
Princeton, NJ 08540-5211
E-mail: [log in to unmask]
WWW: http://atom.princeton.edu/donev
Phone: (609) 258-2775
Fax: (609) 258-6878
__________________________________
|