[MPICH] minor problem with mpif.h with gfortran-4.0 gcc-4.0

Rajeev Thakur thakur at mcs.anl.gov
Mon Jul 4 13:58:36 CDT 2005


Yes, it's a known bug that will be fixed in the next release.

Rajeev 

> -----Original Message-----
> From: owner-mpich-discuss at mcs.anl.gov 
> [mailto:owner-mpich-discuss at mcs.anl.gov] On Behalf Of 
> Kamaraju Kusumanchi
> Sent: Monday, July 04, 2005 1:35 PM
> To: mpich-discuss at mcs.anl.gov
> Subject: [MPICH] minor problem with mpif.h with gfortran-4.0 gcc-4.0
> 
> May be this is just me doing something stupid and I hope others will
> correct me if that is the case. I compiled mpich2 1.0.2 using gcc-4.0,
> gfortran-4.0 on Debian Sid using the --enable-f90 option.
> 
> The compilation went fine. But when I tried to run a hello world
> program, I got the following errors.
> 
> $mpif90 hello_world2.f90
>  In file mpif.h:1
> 
>      Included at hello_world2.f90:8
> 
> C      /* -*- Mode: Fortran; -*- */
> 1
> Error: Unclassifiable statement at (1)
>  In file mpif.h:1
> 
>      Included at hello_world2.f90:8
> 
> C      /* -*- Mode: Fortran; -*- */
>                             1
> Error: Unclassifiable statement at (1)
>  In file mpif.h:2
> 
>      Included at hello_world2.f90:8
> 
> C
> 1
> Error: Unclassifiable statement at (1)
>  In file mpif.h:3
> 
>      Included at hello_world2.f90:8
> 
> C      (C) 2001 by Argonne National Laboratory.
> 1
> Error: Unclassifiable statement at (1)
>  In file mpif.h:4
> 
>      Included at hello_world2.f90:8
> 
> C      See COPYRIGHT in top-level directory.
> 1
> Error: Unclassifiable statement at (1)
>  In file mpif.h:5
> 
>      Included at hello_world2.f90:8
> 
> C
> 1
> Error: Unclassifiable statement at (1)
>  In file mpif.h:6
> 
>      Included at hello_world2.f90:8
> 
> C      DO NOT EDIT
> 1
> Error: Unclassifiable statement at (1)
>  In file mpif.h:7
> 
>      Included at hello_world2.f90:8
> 
> C      This file created by buildiface
> 1
> Error: Unclassifiable statement at (1)
>  In file mpif.h:8
> 
>      Included at hello_world2.f90:8
> 
> C
> 1
> Error: Unclassifiable statement at (1)
> 
> 
> I realized that this is due to the Fortran77 style commenting in
> mpif.h file. When I applied the following patch
> 
> $diff mpif.h mpif.h.original
> 1,8c1,8
> < !      /* -*- Mode: Fortran; -*- */
> < !
> < !      (C) 2001 by Argonne National Laboratory.
> < !      See COPYRIGHT in top-level directory.
> < !
> < !      DO NOT EDIT
> < !      This file created by buildiface
> < !
> ---
> > C      /* -*- Mode: Fortran; -*- */
> > C
> > C      (C) 2001 by Argonne National Laboratory.
> > C      See COPYRIGHT in top-level directory.
> > C
> > C      DO NOT EDIT
> > C      This file created by buildiface
> > C
> 
> 
> Then everything went fine. Is this a bug? If so, could it be fixed in
> the future versions?
> 
> thanks
> raju
> 
> 




More information about the mpich-discuss mailing list