<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">body {word-wrap: break-word; background-color:#ffffff;}</style>
</head>
<body>
<div style="font-family: sans-serif; font-size: 16px">Much better would be to use the MPI macros introduced to deal with exactly this problem. Then no addition tests are necessary.<br>
Bill<br>
<br>
<font color="#333333"><i><span style="font-size: 14px"><font face="sans-serif">Connected by DROID on Verizon Wireless</font></span></i></font></div>
<br>
<br>
-----Original message-----<br>
<blockquote style="; border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;">
<div style="font-family: sans-serif; font-size: 14px"><b>From: </b>Barry Smith <bsmith@mcs.anl.gov><b><br>
To: </b>For users of the development version of PETSc <petsc-dev@mcs.anl.gov><b><br>
Sent: </b>Thu, Jul 28, 2011 20:40:59 GMT+00:00<b><br>
Subject: </b>Re: [petsc-dev] MPI_Exscan<br>
<br>
</div>
<div>
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
<div><font size="2"><span style="font-size:10pt;">
<div class="PlainText"><br>
On Jul 28, 2011, at 3:37 PM, Mark F. Adams wrote:<br>
<br>
> I could not fine PETSC_HAVE_MPI_EXSCAN in the tags file.<br>
> <br>
> Am I missing something?<br>
<br>
   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<br>
<br>
   Barry<br>
<br>
> <br>
> Mark<br>
> <br>
> On Jul 28, 2011, at 3:31 PM, Barry Smith wrote:<br>
> <br>
>> <br>
>> Ideally code like<br>
>> <br>
>> #if defined(PETSC_HAVE_MPI_EXSCAN)<br>
>>    cool C code that uses MPI_EXSCAN<br>
>> #else <br>
>>    less cool C code that uses something else in MPI that is in MPI 1<br>
>> #endif<br>
>> <br>
>> less ideal but ok code<br>
>> <br>
>> #if defined(PETSC_HAVE_MPI_EXSCAN)<br>
>>    cool C code that uses MPI_EXSCAN<br>
>> #else <br>
>>    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")<br>
>> #endif<br>
>> <br>
>> <br>
>>   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<br>
>> <br>
>>   PETSc only requires MPI 1.1 support so any 2.0 or later stuff used needs this kind of protection.<br>
>> <br>
>>  Barry<br>
>> <br>
>> <br>
>> On Jul 28, 2011, at 2:24 PM, Mark F. Adams wrote:<br>
>> <br>
>>> Dumb question: How do you protect it?<br>
>>> Mark<br>
>>> <br>
>>> On Jul 28, 2011, at 3:05 PM, Barry Smith wrote:<br>
>>> <br>
>>>> <br>
>>>> On Jul 28, 2011, at 11:55 AM, Jose E. Roman wrote:<br>
>>>> <br>
>>>>> We are getting an undefined reference `MPI_Exscan'. This function is used in src/mat/impls/nest/matnest.c.<br>
>>>>> 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.<br>
>>>>> <br>
>>>>> I guess there should be a PETSC_HAVE_MPI_EXSCAN test in configure.<br>
>>>> <br>
>>>> Correct, whoever used that MPI 2 function in PETSc is obligated to protect it.<br>
>>>> <br>
>>>> Barry<br>
>>>> <br>
>>>> <br>
>>>>> <br>
>>>>> Jose<br>
>>>>> <br>
>>>> <br>
>>>> <br>
>>> <br>
>> <br>
>> <br>
> <br>
<br>
</div>
</span></font></div>
</div>
</blockquote>
</body>
</html>