[petsc-dev] Problem with latest "petsc-dev" change

Bobby Philip philipb at ornl.gov
Wed Nov 3 22:05:12 CDT 2010


Guys:

As far as I can tell SAMRAI uses petsc assuming the C style calls for petsc. In cases where
I have enabled C++ in PETSc it has broken SAMRAI.

Bobby

On Nov 3, 2010, at 7:50 PM, Satish Balay wrote:

> I think I understand the issue. I'm pushing something that should fix it.
> 
> [so here - you have to do 'hg pull -u' to get this fix and rerun configure]
> 
> Jed,
> 
> The issue is: PETSc is built without a c++ compiler, but SAMRAI - is
> using it with c++ - hence the error [with missing
> PETSC_FUNCTION_NAME_CXX]. So I think we'll have to always set
> PETSC_FUNCTION_NAME_CXX irrespective of c++ usage in petsc.
> 
> Perhaps you might want to cleanup my fix..
> 
> Satish
> 
>> ./configure --with-cc=mpicc --with-fc=mpif90 --download-f-blas-lapack=1
>> --download-hdf5=1 --prefix=$PETSC_DIR/$PETSC_ARCH
>> make PETSC_DIR=$PWD PETSC_ARCH=arch-linux-gnu-c-debug all
>> 
> 
> On Wed, 3 Nov 2010, Carl Ponder wrote:
> 
>> 
>> Satash -- the filepetsc-dev/include/petscsys.h contains a statement
>> 
>>   25   #if defined(__cplusplus)
>>   *26   #  define PETSC_FUNCTION_NAME PETSC_FUNCTION_NAME_CXX*
>>   27   #else
>>   28   #  define PETSC_FUNCTION_NAME PETSC_FUNCTION_NAME_C
>>   29   #endif
>> 
>> I don't see thisPETSC_FUNCTION_NAME_CXX declared anywhere in the source base,
>> and am running into errors of the form
>> 
>>   /home/cponder/CUDA/PFlotran/petsc-dev/include/petscsys.h: In
>>   function 'PetscErrorCode PetscMemcpy(void*, const void*, size_t)':
>>   /home/cponder/CUDA/PFlotran/petsc-dev/include/petscsys.h:1828:
>>   error: 'PETSC_FUNCTION_NAME_CXX' was not declared in this scope
>>   /home/cponder/CUDA/PFlotran/petsc-dev/include/petscsys.h:1829:
>>   error: 'PETSC_FUNCTION_NAME_CXX' was not declared in this scope
>>   /home/cponder/CUDA/PFlotran/petsc-dev/include/petscsys.h:1831:
>>   error: 'PETSC_FUNCTION_NAME_CXX' was not declared in this scope
>>   /home/cponder/CUDA/PFlotran/petsc-dev/include/petscsys.h:1831:
>>   error: 'PETSC_FUNCTION_NAME_CXX' was not declared in this scope
>>   /home/cponder/CUDA/PFlotran/petsc-dev/include/petscsys.h:1835:
>>   error: 'PETSC_FUNCTION_NAME_CXX' was not declared in this scope
>> 
>> when I build SAMRAI. Can you tell me what is missing?
>> Thanks,
>> 
>>            Carl Ponder
>> 
>> 
>> -----------------------------------------------------------------------------------
>> This email message is for the sole use of the intended recipient(s) and may
>> contain
>> confidential information.  Any unauthorized review, use, disclosure or
>> distribution
>> is prohibited.  If you are not the intended recipient, please contact the
>> sender by
>> reply email and destroy all copies of the original message.
>> -----------------------------------------------------------------------------------
>> 
> 




More information about the petsc-dev mailing list