[petsc-dev] source code and configure don't know what each other is doing?
Jed Brown
jedbrown at mcs.anl.gov
Mon Nov 18 01:33:51 CST 2013
Barry Smith <bsmith at mcs.anl.gov> writes:
> configure looks for complex but source code uses _Complex.
include/petscmath.h:/* Use C99 _Complex for the type. Do not include complex.h by default to define "complex" because of symbol conflicts in Hypre. */
include/petscmath.h-/* Compilation units that can safely use complex should define PETSC_DESIRE_COMPLEX before including any headers */
> Come guys this is just absurd. How can we make sure our configure
> tests actually have something to do with the real usage?
Do you have a case where this does not work? "_Complex" is the C99
keyword, where as complex.h is the C99 complex header, which defines
"complex" and related stuff. complex.h conflicts with Hypre so we can't
include it by default, thus the comment in the source.
>
> TEST checkC99Complex from config.types(/sandbox/petsc/petsc.clone-2/config/BuildSystem/config/types.py:106)
> TESTING: checkC99Complex from config.types(/sandbox/petsc/petsc.clone-2/config/BuildSystem/config/types.py:106)
> Check for complex numbers in in C99 std
> Executing: mpicc -c -o /tmp/petsc-t5CRsd/config.types/conftest.o -I/tmp/petsc-t5CRsd/config.libraries -I/tmp/petsc-t5CRsd/config.compilers -I/tmp/petsc-t5CRsd/config.setCompilers -I/tmp/petsc-t5CRsd/config.headers -I/tmp/petsc-t5CRsd/PETSc.utilities.cacheDetails -I/tmp/petsc-t5CRsd/config.functions -I/tmp/petsc-t5CRsd/config.types -std=c89 -pedantic -Wno-long-long -fPIC -g3 -O0 /tmp/petsc-t5CRsd/config.types/conftest.c
> Successful compile:
> Source:
> #include "confdefs.h"
> #include "conffix.h"
> #include <complex.h>
>
> int main() {
> double complex x;
> x = I;
> ;
> return 0;
> }
>
> #elif defined(PETSC_USE_REAL_DOUBLE)
> typedef double _Complex PetscComplex;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20131118/14b7387c/attachment.sig>
More information about the petsc-dev
mailing list