dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #06605
Case sensitivity
I spent hours today debugging a problem I kept getting when compiling
dolfin with petsc (and openmpi) on my Macbook (really, the demos):
/usr/local/include/petscmath.h:16: error: 'MPI_Datatype' does not name a
type
/usr/local/include/petscmath.h:17: error: 'MPI_Datatype' does not name a
type
/usr/local/include/petscmath.h:294: error: 'MPI_Comm' has not been declared
/usr/local/include/petscmath.h:295: error: 'MPI_Comm' has not been declared
/usr/local/include/petscmath.h:296: error: 'MPI_Comm' has not been declared
/usr/local/include/petsc.h:451: error: 'MPI_Comm' does not name a type
/usr/local/include/petsc.h:469: error: expected primary-expression
before '(' token
[...]
/usr/local/include/petscksp.h:528: error: initializer expression list
treated as compound expression
scons: *** [demo/fem/assembly/cpp/main.o] Error 1
scons: building terminated because of errors.
I dug deep down in petsc internals, its includes, dependencies etc. At
last I found the error, but it had nothing to do with petsc or MPI.
Someone had checked in the file MPI.h in dolfin/main. OSX is, just as
Windows, case-insensitive (except Åsmunds machine, as he made it
case-sensitive). Because petsc.h includes mpi.h, and the flag
-I/dolfin/main is present as well as -I/usr/include, petsc tried to
include the file dolfin/main/MPI.h, which certainly does not have all
the declarations as /usr/include/mpi.h
This problem will affect all Mac and Window users. I don't know where
the file MPI.h is included, but simply renaming it worked for me. Can
the right person (Garth, I saw your name in the file?) rename the file
and all places it is used?
I guess the conclusion is that we should avoid all file names that,
regardless of case, might be used elsewhere.
ilmar
Follow ups