[petsc-dev] MPI_Exscan

Mark F. Adams mark.adams at columbia.edu
Thu Jul 28 16:44:22 CDT 2011


I added protection for MPI_Exscan in matnest.c and my code but I can not push the MPI.py file:

~/Codes/petsc-dev/config/BuildSystem>hg push
pushing to http://petsc.cs.iit.edu/petsc/BuildSystem
searching for changes
1 changesets found
remote: ssl required

Mark

On Jul 28, 2011, at 4:40 PM, Barry Smith wrote:

> 
> On Jul 28, 2011, at 3:37 PM, Mark F. Adams wrote:
> 
>> I could not fine PETSC_HAVE_MPI_EXSCAN in the tags file.
>> 
>> Am I missing something?
> 
>   Why would it ever be in the tags file until someone uses it?   Like I said below you need to use it (where needed) and make sure it gets defined by adding code to MPI.py
> 
>   Barry
> 
>> 
>> Mark
>> 
>> On Jul 28, 2011, at 3:31 PM, Barry Smith wrote:
>> 
>>> 
>>> Ideally code like
>>> 
>>> #if defined(PETSC_HAVE_MPI_EXSCAN)
>>>   cool C code that uses MPI_EXSCAN
>>> #else 
>>>   less cool C code that uses something else in MPI that is in MPI 1
>>> #endif
>>> 
>>> less ideal but ok code
>>> 
>>> #if defined(PETSC_HAVE_MPI_EXSCAN)
>>>   cool C code that uses MPI_EXSCAN
>>> #else 
>>>   SETERRQ(..., "Sorry but this code requires MPI_EXSCAN that doesn't exist on your machine's version of MPI, install a MPI2 with PETSc to get this functionality")
>>> #endif
>>> 
>>> 
>>>  Then to make sure PETSC_HAVE_MPI_EXSCAN gets defined when it can add  a test for MPI_Exscan() to bottom of config/BuildSystem/config/packages/MPI.py with the other tests for MPI to functions
>>> 
>>>  PETSc only requires MPI 1.1 support so any 2.0 or later stuff used needs this kind of protection.
>>> 
>>> Barry
>>> 
>>> 
>>> On Jul 28, 2011, at 2:24 PM, Mark F. Adams wrote:
>>> 
>>>> Dumb question: How do you protect it?
>>>> Mark
>>>> 
>>>> On Jul 28, 2011, at 3:05 PM, Barry Smith wrote:
>>>> 
>>>>> 
>>>>> On Jul 28, 2011, at 11:55 AM, Jose E. Roman wrote:
>>>>> 
>>>>>> We are getting an undefined reference `MPI_Exscan'. This function is used in src/mat/impls/nest/matnest.c.
>>>>>> If I am not wrong, MPI_Exscan was introduced in MPI-2 but was not available in the previous standard. Apparently, the machine where we are compiling is very old and has MPI-1 only.
>>>>>> 
>>>>>> I guess there should be a PETSC_HAVE_MPI_EXSCAN test in configure.
>>>>> 
>>>>> Correct, whoever used that MPI 2 function in PETSc is obligated to protect it.
>>>>> 
>>>>> Barry
>>>>> 
>>>>> 
>>>>>> 
>>>>>> Jose
>>>>>> 
>>>>> 
>>>>> 
>>>> 
>>> 
>>> 
>> 
> 
> 




More information about the petsc-dev mailing list