[petsc-dev] elemental problem in next

Satish Balay balay at mcs.anl.gov
Mon Feb 16 14:48:27 CST 2015


On Mon, 16 Feb 2015, Barry Smith wrote:

> 
>   Needs to be fixed
> 
> /sandbox/petsc/petsc.clone-3/arch-linux-pkgs-dbg-ftn-interfaces/include/El/./sparse_direct/numeric.hpp:200:5: warning: variable 'newType' is used uninitialized whenever switch default is taken [-Wsometimes-uninitialized]
> /sandbox/petsc/petsc.clone-3/arch-linux-pkgs-dbg-ftn-interfaces/include/El/./sparse_direct/numeric.hpp:215:5: warning: variable 'newType' is used uninitialized whenever switch default is taken [-Wsometimes-uninitialized]
> 

I think its a problem with clang-3.4+ - I don't see this with: 3.5.0

I fixed the elemental tarball to work around this.

[I can't install 3.5.0 on the testbox (due to clang-3.5
requirements). I see the issue also exists with apple clang (which
presumably is pre-3.5).

At some point - I'll change the clang testbox for petsc to use clang-3.5]

However with clang-3.5.0 configure bombs with --with-cxx-dialect=C++11
- if I don't use: CFLAGS=-Qunused-arguments CXXFLAGS=-Qunused-arguments

Satish

-------
$ ./configure --with-cc=clang --with-cxx=clang++ --with-fc=gfortran PETSC_ARCH=arch-clang --with-mpi=0 --with-cxx-dialect=C++11
===============================================================================
             Configuring PETSc to compile on your system                       
===============================================================================
TESTING: checkCxx11 from config.compilers(config/BuildSystem/config/compilers.py:373)                                                                     *******************************************************************************
         UNABLE to CONFIGURE with GIVEN OPTIONS    (see configure.log for details):
-------------------------------------------------------------------------------
Could not determine compiler flag for with-cxx-dialect=C++11, use CXXFLAGS
*******************************************************************************


>>>>>>>>>>
Executing: clang++ -c -o /tmp/petsc-muHF3Z/config.setCompilers/conftest.o -I/tmp/petsc-muHF3Z/config.setCompilers -I/tmp/petsc-muHF3Z/config.compilers  -std=c++11    /tmp/petsc-muHF3Z/config.setCompilers/conftest.cc 
Possible ERROR while running compiler:
stderr:
clang: warning: argument unused during compilation: '-I /tmp/petsc-muHF3Z/config.setCompilers'
clang: warning: argument unused during compilation: '-I /tmp/petsc-muHF3Z/config.compilers'
Source:
#include "confdefs.h"
#include "conffix.h"

          #include <random>
          template<typename T> constexpr T Cubed( T x ) { return x*x*x; }
          

int main() {

          std::random_device rd;
          std::mt19937 mt(rd());
          std::normal_distribution<double> dist(0,1);
          const double x = dist(mt);
          ;
  return 0;
}
          Rejecting compiler flag -std=c++11 due to 
clang: warning: argument unused during compilation: '-I /tmp/petsc-muHF3Z/config.setCompilers'
clang: warning: argument unused during compilation: '-I /tmp/petsc-muHF3Z/config.compilers'

<<<<<<<<<<<<<<<



More information about the petsc-dev mailing list