[MPIWG Fortran] Question about named constants
jczhang at mcs.anl.gov
Thu Jun 18 11:05:54 CDT 2015
Hello, Fortran experts,
I am a little puzzled by MPI-3.1 Chapter 2.5.4,
All named constants, with the exceptions noted below for Fortran, can be
initialization expressions or assignments, but not necessarily in array
declarations or as
labels in C switch or Fortran select/case statements. This implies named
to be link-time but not necessarily compile-time constants.
Then in F08, should MPI_INTEGER be declared as a parameter variable? If
no, then I get an error when compiling this initialization expression with
type(MPI_Datatype) :: dtype = MPI_INTEGER
Error: Parameter 'mpi_integer' at (1) has not been declared or is a
variable, which does not reduce to a constant expression
If yes, then of course I can use MPI_INTEGER in Fortran select/case.
Another question is what is the meaning of "link-time constants". I could
not find in MPI. Does it mean I can use MPI_INTEGER after main before
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the mpiwg-fortran