[petsc-users] [petsc-dev] FFT Matrix Examples/Tests: Compiletime error

Jed Brown jedbrown at mcs.anl.gov
Tue Jul 10 12:06:38 CDT 2012


On Tue, Jul 10, 2012 at 12:04 PM, Matthew Knepley <knepley at gmail.com> wrote:

> On Tue, Jul 10, 2012 at 11:59 AM, Thomas Hisch <t.hisch at gmail.com> wrote:
>
>> Thx for the hint.
>>
>> Should PETSc-dev in principle work with gcc-4.7, because I get the
>> following error while building petsc:
>>
>
> Jed is fixing that now. C++ compilers are extraordinarily dumb, and cannot
> cast
> a 'volatile std::complex' to 'std::complex'. Should be ready soon.
>

http://petsc.cs.iit.edu/petsc/petsc-dev/rev/664ec55a8ab3


>
>   Matt
>
>
>> -----------------------------------------
>> Using C/C++ compile: mpicxx -c -Wall -Wwrite-strings
>> -Wno-strict-aliasing -Wno-unknown-pragmas -O3   -fPIC
>> -I/home/thomas/local/src/petsc-dev/include
>> -I/home/thomas/local/src/petsc-dev/arch-linux2-cxx-release/include
>> -I/usr/lib/openmpi/include -I/usr/lib/openmpi/include/openmpi
>> -D__INSDIR__=./
>> Using Fortran compile: mpif90 -c -fPIC -Wall -Wno-unused-variable
>> -Wno-unused-dummy-argument
>> -I/home/thomas/local/src/petsc-dev/include
>> -I/home/thomas/local/src/petsc-dev/arch-linux2-cxx-release/include
>> -I/usr/lib/openmpi/include -I/usr/lib/openmpi/include/openmpi
>> -----------------------------------------
>> Using C/C++ linker: mpicxx
>> Using C/C++ flags: -Wall -Wwrite-strings -Wno-strict-aliasing
>> -Wno-unknown-pragmas -O3
>> Using Fortran linker: mpif90
>> Using Fortran flags: -fPIC -Wall -Wno-unused-variable
>> -Wno-unused-dummy-argument
>> -----------------------------------------
>> Using libraries:
>> -Wl,-rpath,/home/thomas/local/src/petsc-dev/arch-linux2-cxx-release/lib
>> -L/home/thomas/local/src/petsc-dev/arch-linux2-cxx-release/lib
>> -lpetsc -lX11
>> -Wl,-rpath,/home/thomas/local/src/petsc-dev/arch-linux2-cxx-release/lib
>> -lfftw3_mpi -lfftw3 -lpthread
>> -Wl,-rpath,/opt/intel/composer_xe_2011_sp1.11.339/mkl/lib/intel64
>> -L/opt/intel/composer_xe_2011_sp1.11.339/mkl/lib/intel64 -llapack
>> -lblas -Wl,-rpath,/usr/lib/openmpi/lib -L/usr/lib/openmpi/lib
>> -Wl,-rpath,/usr/lib/gcc/x86_64-linux-gnu/4.7
>> -L/usr/lib/gcc/x86_64-linux-gnu/4.7
>> -Wl,-rpath,/usr/lib/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu
>> -Wl,-rpath,/lib/x86_64-linux-gnu -L/lib/x86_64-linux-gnu
>> -Wl,-rpath,/opt/intel/composer_xe_2011_sp1.11.339/compiler/lib/intel64
>> -L/opt/intel/composer_xe_2011_sp1.11.339/compiler/lib/intel64
>> -Wl,-rpath,/opt/intel/composer_xe_2011_sp1.10.319/compiler/lib/intel64
>> -L/opt/intel/composer_xe_2011_sp1.10.319/compiler/lib/intel64
>> -Wl,-rpath,/opt/intel/composer_xe_2011_sp1.10.319/ipp/lib/intel64
>> -L/opt/intel/composer_xe_2011_sp1.10.319/ipp/lib/intel64
>> -Wl,-rpath,/opt/intel/composer_xe_2011_sp1.10.319/mkl/lib/intel64
>> -L/opt/intel/composer_xe_2011_sp1.10.319/mkl/lib/intel64
>>
>> -Wl,-rpath,/opt/intel/composer_xe_2011_sp1.10.319/tbb/lib/intel64/cc4.1.0_libc2.4_kernel2.6.16.21
>>
>> -L/opt/intel/composer_xe_2011_sp1.10.319/tbb/lib/intel64/cc4.1.0_libc2.4_kernel2.6.16.21
>> -lmpi_f90 -lmpi_f77 -lgfortran -lm -lgfortran -lm -lgfortran -lm -lm
>> -lquadmath -lm -lmpi_cxx -lstdc++ -ldl -lmpi -lopen-rte -lopen-pal
>> -lnsl -lutil -lgcc_s -lpthread -ldl
>> ------------------------------------------
>> Using mpiexec: mpiexec
>> ==========================================
>> Building PETSc using CMake with 5 build threads
>> ==========================================
>> Re-run cmake file: Makefile older than: ../CMakeLists.txt
>> -- Configuring done
>> -- Generating done
>> -- Build files have been written to:
>> /home/thomas/local/src/petsc-dev/arch-linux2-cxx-release
>> Scanning dependencies of target petsc
>> [  0%] Building Fortran object
>> CMakeFiles/petsc.dir/src/sys/f90-mod/petscsysmod.F.o
>> [  0%] Building Fortran object
>> CMakeFiles/petsc.dir/src/vec/f90-mod/petscvecmod.F.o
>> [  1%] Building Fortran object
>> CMakeFiles/petsc.dir/src/mat/f90-mod/petscmatmod.F.o
>> [  1%] Building Fortran object
>> CMakeFiles/petsc.dir/src/dm/f90-mod/petscdmmod.F.o
>> [  1%] Building Fortran object
>> CMakeFiles/petsc.dir/src/ksp/f90-mod/petsckspmod.F.o
>> [  1%] Building Fortran object
>> CMakeFiles/petsc.dir/src/snes/f90-mod/petscsnesmod.F.o
>> [  2%] [  2%] [  2%] [  2%] [  2%] Building Fortran object
>> CMakeFiles/petsc.dir/src/ts/f90-mod/petsctsmod.F.o
>> Building CXX object CMakeFiles/petsc.dir/src/sys/verbose/verboseinfo.c.o
>> Building CXX object CMakeFiles/petsc.dir/src/sys/viewer/interface/view.c.o
>> Building CXX object
>> CMakeFiles/petsc.dir/src/sys/viewer/interface/viewregall.c.o
>> Building CXX object
>> CMakeFiles/petsc.dir/src/sys/viewer/interface/flush.c.o
>> [  2%] In file included from
>> /home/thomas/local/src/petsc-dev/include/petscsys.h:1536:0,
>>                  from
>> /home/thomas/local/src/petsc-dev/src/sys/verbose/verboseinfo.c:6:
>> /home/thomas/local/src/petsc-dev/include/petsc-private/petscimpl.h: In
>> function ‘PetscBool PetscCheckPointer(const void*, PetscDataType)’:
>> /home/thomas/local/src/petsc-dev/include/petsc-private/petscimpl.h:197:60:
>> error: no matching function for call to
>> ‘std::complex<double>::complex(volatile PetscScalar&)’
>> /home/thomas/local/src/petsc-dev/include/petsc-private/petscimpl.h:197:60:
>> note: candidates are:
>> In file included from
>> /home/thomas/local/src/petsc-dev/include/petscmath.h:60:0,
>>                  from
>> /home/thomas/local/src/petsc-dev/include/petscsys.h:337,
>>                  from
>> /home/thomas/local/src/petsc-dev/src/sys/verbose/verboseinfo.c:6:
>> /usr/include/c++/4.7/complex:1205:26: note:
>> std::complex<double>::complex(const std::complex<float>&)
>> /usr/include/c++/4.7/complex:1205:26: note:   no known conversion for
>> argument 1 from ‘volatile PetscScalar {aka volatile
>> std::complex<double>}’ to ‘const std::complex<float>&’
>> /usr/include/c++/4.7/complex:1195:26: note:
>> std::complex<double>::complex(double, double)
>> /usr/include/c++/4.7/complex:1195:26: note:   no known conversion for
>> argument 1 from ‘volatile PetscScalar {aka volatile
>> std::complex<double>}’ to ‘double’
>> /usr/include/c++/4.7/complex:1193:26: note:
>> std::complex<double>::complex(std::complex<double>::_ComplexT)
>> /usr/include/c++/4.7/complex:1193:26: note:   no known conversion for
>> argument 1 from ‘volatile PetscScalar {aka volatile
>> std::complex<double>}’ to ‘std::complex<double>::_ComplexT {aka
>> __complex__ double}’
>> /usr/include/c++/4.7/complex:1188:12: note:
>> std::complex<double>::complex(const std::complex<double>&)
>> /usr/include/c++/4.7/complex:1188:12: note:   no known conversion for
>> argument 1 from ‘volatile PetscScalar {aka volatile
>> std::complex<double>}’ to ‘const std::complex<double>&’
>> In file included from
>> /home/thomas/local/src/petsc-dev/include/petscsys.h:1536:0,
>>                  from
>> /home/thomas/local/src/petsc-dev/include/petsc-private/viewerimpl.h:5,
>>                  from
>> /home/thomas/local/src/petsc-dev/src/sys/viewer/interface/flush.c:2:
>> /home/thomas/local/src/petsc-dev/include/petsc-private/petscimpl.h: In
>> function ‘PetscBool PetscCheckPointer(const void*, PetscDataType)’:
>> /home/thomas/local/src/petsc-dev/include/petsc-private/petscimpl.h:197:60:
>> error: no matching function for call to
>> ‘std::complex<double>::complex(volatile PetscScalar&)’
>> /home/thomas/local/src/petsc-dev/include/petsc-private/petscimpl.h:197:60:
>> note: candidates are:
>> In file included from
>> /home/thomas/local/src/petsc-dev/include/petscmath.h:60:0,
>>                  from
>> /home/thomas/local/src/petsc-dev/include/petscsys.h:337,
>>                  from
>> /home/thomas/local/src/petsc-dev/include/petsc-private/viewerimpl.h:5,
>>                  from
>> /home/thomas/local/src/petsc-dev/src/sys/viewer/interface/flush.c:2:
>> /usr/include/c++/4.7/complex:1205:26: note:
>> std::complex<double>::complex(const std::complex<float>&)
>> /usr/include/c++/4.7/complex:1205:26: note:   no known conversion for
>> argument 1 from ‘volatile PetscScalar {aka volatile
>> std::complex<double>}’ to ‘const std::complex<float>&’
>> /usr/include/c++/4.7/complex:1195:26: note:
>> std::complex<double>::complex(double, double)
>> /usr/include/c++/4.7/complex:1195:26: note:   no known conversion for
>> argument 1 from ‘volatile PetscScalar {aka volatile
>> std::complex<double>}’ to ‘double’
>> /usr/include/c++/4.7/complex:1193:26: note:
>> std::complex<double>::complex(std::complex<double>::_ComplexT)
>> /usr/include/c++/4.7/complex:1193:26: note:   no known conversion for
>> argument 1 from ‘volatile PetscScalar {aka volatile
>> std::complex<double>}’ to ‘std::complex<double>::_ComplexT {aka
>> __complex__ double}’
>> /usr/include/c++/4.7/complex:1188:12: note:
>> std::complex<double>::complex(const std::complex<double>&)
>> /usr/include/c++/4.7/complex:1188:12: note:   no known conversion for
>> argument 1 from ‘volatile PetscScalar {aka volatile
>> std::complex<double>}’ to ‘const std::complex<double>&’
>> Building CXX object
>> CMakeFiles/petsc.dir/src/sys/viewer/interface/viewreg.c.o
>> In file included from
>> /home/thomas/local/src/petsc-dev/include/petscsys.h:1536:0,
>>                  from
>> /home/thomas/local/src/petsc-dev/include/petsc-private/viewerimpl.h:5,
>>                  from
>> /home/thomas/local/src/petsc-dev/src/sys/viewer/interface/viewregall.c:2:
>> /home/thomas/local/src/petsc-dev/include/petsc-private/petscimpl.h: In
>> function ‘PetscBool PetscCheckPointer(const void*, PetscDataType)’:
>> /home/thomas/local/src/petsc-dev/include/petsc-private/petscimpl.h:197:60:
>> error: no matching function for call to
>> ‘std::complex<double>::complex(volatile PetscScalar&)’
>> /home/thomas/local/src/petsc-dev/include/petsc-private/petscimpl.h:197:60:
>> note: candidates are:
>> In file included from
>> /home/thomas/local/src/petsc-dev/include/petscmath.h:60:0,
>>                  from
>> /home/thomas/local/src/petsc-dev/include/petscsys.h:337,
>>                  from
>> /home/thomas/local/src/petsc-dev/include/petsc-private/viewerimpl.h:5,
>>                  from
>> /home/thomas/local/src/petsc-dev/src/sys/viewer/interface/viewregall.c:2:
>> /usr/include/c++/4.7/complex:1205:26: note:
>> std::complex<double>::complex(const std::complex<float>&)
>> /usr/include/c++/4.7/complex:1205:26: note:   no known conversion for
>> argument 1 from ‘volatile PetscScalar {aka volatile
>> std::complex<double>}’ to ‘const std::complex<float>&’
>> /usr/include/c++/4.7/complex:1195:26: note:
>> std::complex<double>::complex(double, double)
>> /usr/include/c++/4.7/complex:1195:26: note:   no known conversion for
>> argument 1 from ‘volatile PetscScalar {aka volatile
>> std::complex<double>}’ to ‘double’
>> /usr/include/c++/4.7/complex:1193:26: note:
>> std::complex<double>::complex(std::complex<double>::_ComplexT)
>> /usr/include/c++/4.7/complex:1193:26: note:   no known conversion for
>> argument 1 from ‘volatile PetscScalar {aka volatile
>> std::complex<double>}’ to ‘std::complex<double>::_ComplexT {aka
>> __complex__ double}’
>> /usr/include/c++/4.7/complex:1188:12: note:
>> std::complex<double>::complex(const std::complex<double>&)
>> /usr/include/c++/4.7/complex:1188:12: note:   no known conversion for
>> argument 1 from ‘volatile PetscScalar {aka volatile
>> std::complex<double>}’ to ‘const std::complex<double>&’
>> ......
>>
>> I called configure with:
>>
>> ./configure --with-c++-support=1 --with-scalar-type=complex
>> --with-x11=0 --with-clanguage=cxx
>>
>> --with-blas-lapack-dir=/opt/intel/composer_xe_2011_sp1.11.339/mkl/lib/intel64
>> CXXOPTFLAGS="-O3" COPTFLAGS="-O3" FOPTFLAGS="-03"
>> --with-shared-libraries=1 --with-debugging=0 --download-fftw=1
>>
>> Regards
>> Thomas
>>
>>
>> On Tue, Jul 10, 2012 at 6:44 PM, ajay.rawat83 at gmail.com
>> <ajay.rawat83 at gmail.com> wrote:
>> > No, try to use petsc-dev with slepc-dev
>> > -----Original message-----
>> > From: Thomas Hisch
>> > Sent:  10/07/2012, 9:07  pm
>> > To: PETSc users list
>> > Subject: Re: [petsc-users] FFT Matrix Examples/Tests: Compiletime error
>> >
>> >
>> > Hey,
>> >
>> > thx for your quick response! Is petsc-3.3 compatible with the current
>> > slepc-3.2 ??
>> >
>> > On Tue, Jul 10, 2012 at 5:31 PM, Hong Zhang <hzhang at mcs.anl.gov> wrote:
>> >> Thomas:
>> >> Please update to petsc-3.3, and build it with FFTW.
>> >> ex148.c was rewritten using FFTW.
>> >>
>> >> Hong
>> >>
>> >>> Hello list!
>> >>>
>> >>> I tried to test one of the FFT examples in src/mat/examples/tests/ by
>> >>> typing "make ex148" in this directory. Unfortunately the compilation
>> >>> failed:
>> >>>
>> >>> mpicxx -o ex148.o -c -Wall -Wwrite-strings -Wno-strict-aliasing
>> >>> -Wno-unknown-pragmas -O3 -fPIC
>> >>> -I/home/thomas/local/src/petsc-3.2-p6/include
>> >>> -I/home/thomas/local/src/petsc-3.2-p6/arch-linux2-cxx-release/include
>> >>> -I/usr/lib/openmpi/include -I/usr/lib/openmpi/include/openmpi
>> >>> -D__INSDIR__=src/mat/examples/tests/ ex148.c
>> >>> ex148.c: In function ‘PetscInt main(PetscInt, char**)’:
>> >>> ex148.c:45:37: error: ‘InputTransformFFT’ was not declared in this
>> scope
>> >>> ex148.c:54:39: error: ‘OutputTransformFFT’ was not declared in this
>> scope
>> >>> make: [ex148.o] Error 1 (ignored)
>> >>>
>> >>> All the other FFT examples seem to use these two Transformation
>> >>> functions as well. Any ideas where these functions are defined ?
>> >>>
>> >>> Regards,
>> >>> Thomas
>> >>
>> >>
>> >
>>
>
>
>
> --
> What most experimenters take for granted before they begin their
> experiments is infinitely more interesting than any results to which their
> experiments lead.
> -- Norbert Wiener
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120710/55b220d4/attachment.html>


More information about the petsc-users mailing list