[petsc-users] Compile petsc with bgclang compilers on mira/vesta?
Satish Balay
balay at mcs.anl.gov
Fri Feb 26 22:23:14 CST 2016
looks like '-fPIC' with clang is causing problems. The following works for me.
./configure --with-cc=mpicc --with-cxx=mpic++11 --with-fc=0 --with-clib-autodetect=0 --with-cxxlib-autodetect=0 --with-shared-libraries=0 --download-f2cblaslapack=1
Satish
On Fri, 26 Feb 2016, Guo, Hanqi wrote:
> Hi,
>
> I am trying to compile petsc on mira with bgclang, because my application needs C++11 support. I have tried several ways to configure but didn’t work. Does anyone have ideas on this? Thanks in advance!
>
> The followings are several combinations I have tried:
>
> > ./configure --prefix=$HOME/local.bgclang/petsc-3.6.3 --with-cc=mpicc --with-cxx=mpic++11 --with-fc=0 --with-clanguage=cxx
> ===============================================================================
> Configuring PETSc to compile on your system
> ===============================================================================
> TESTING: checkCxxLibraries from config.compilers(config/BuildSystem/config/compilers.py:413) *******************************************************************************
> UNABLE to EXECUTE BINARIES for ./configure
> -------------------------------------------------------------------------------
> Cannot run executables created with C. If this machine uses a batch system
> to submit jobs you will need to configure using ./configure with the additional option --with-batch.
> Otherwise there is problem with the compilers. Can you compile and run code with your compiler 'mpicc'?
> *******************************************************************************
>
> > ./configure --prefix=$HOME/local.bgclang/petsc-3.6.3 --with-cc=mpicc --with-cxx=mpic++11 --with-fc=0 --with-clanguage=cxx --with-batch
> ===============================================================================
> Configuring PETSc to compile on your system
> ===============================================================================
> TESTING: check from config.libraries(config/BuildSystem/config/libraries.py:146) *******************************************************************************
> UNABLE to CONFIGURE with GIVEN OPTIONS (see configure.log for details):
> -------------------------------------------------------------------------------
> Unable to find mpi in default locations!
> Perhaps you can specify with --with-mpi-dir=<directory>
> If you do not want MPI, then give --with-mpi=0
> You might also consider using --download-mpich instead
> *******************************************************************************
>
> > ./configure --prefix=$HOME/local.bgclang/petsc-3.6.3 --with-fc=0 --with-clanguage=cxx --with-batch --with-mpi-dir=/soft/compilers/bgclang/mpi/bgclang
> ===============================================================================
> Configuring PETSc to compile on your system
> ===============================================================================
> TESTING: configureFortranCommandLine from config.utilities.fortranCommandLine(config/BuildSystem/config/utilities/fortranCommandLine.py:27)
> TESTING: configureLibrary from config.packages.MPI(config/BuildSystem/config/packages/MPI.py:476) *******************************************************************************
> UNABLE to CONFIGURE with GIVEN OPTIONS (see configure.log for details):
> -------------------------------------------------------------------------------
> --with-mpi-dir=/soft/compilers/bgclang/mpi/bgclang did not work
> *******************************************************************************
>
> ...
>
> ---------------
> Hanqi Guo
> Postdoctoral Appointee
> Mathematics and Computer Science Division
> Argonne National Laboratory
> 9700 S. Cass Ave., Bldg 240
> Argonne, IL 60439
> e-mail: hguo at anl.gov
> web: http://www.mcs.anl.gov/~hguo
> phone: 630-252-7225
>
>
More information about the petsc-users
mailing list