[petsc-users] "--with-cxx=CC" option for ./configure?

Barry Smith bsmith at mcs.anl.gov
Wed Jan 22 09:28:31 CST 2014


On Jan 22, 2014, at 9:17 AM, David Liu <daveliu at mit.edu> wrote:

> Hi,
> 
> I’m trying to run a solver code I wrote in C++ on the Kraken supercomputer. Apparently Kraken already has a pre-built version of Petsc that is optimized for their Cray architecture. So I try compiling my code, and as expected, get an error message saying that “<iostream>” not found, which I’m guessing is because Petsc wasn’t configured with “-with-c-language=cxx”. Fair enough.

   You can still use the C++ compiler to compiler YOUR code even without PETSc being built with -with-c-language=cxx

> 
> However, at the end of the error message, it gives me the list of things it *was* configured with, and I see the flags “--with-cc=cc” and “--with-cxx=CC”. Does anyone know what that second flag means?
   
  That is the C++ compiler.

   So in this case just use CC to compile your code. (note Cray auto-magically has the compiler know all about the MPI includes etc).

   Barry



> 
> best,
> David



More information about the petsc-users mailing list