[petsc-dev] tao and complex numbers

Barry Smith bsmith at mcs.anl.gov
Sun Feb 8 11:25:14 CST 2015


> On Feb 8, 2015, at 11:19 AM, Lisandro Dalcin <dalcinl at gmail.com> wrote:
> 
> On 8 February 2015 at 20:14, Barry Smith <bsmith at mcs.anl.gov> wrote:
>> 
>>> On Feb 8, 2015, at 11:11 AM, Lisandro Dalcin <dalcinl at gmail.com> wrote:
>>> 
>>> On 8 February 2015 at 19:39, Barry Smith <bsmith at mcs.anl.gov> wrote:
>>>> 
>>>> Since all the TAO implementations seem to have
>>>> 
>>>> #requiresscalar    real
>>>> 
>>>> in the makefile why don't we just move that up to the tao directory level and put an error generator in tao.h if included with complex so users see immediately and clearly they cannot us tao with complex instead of having to send us email?
>>>> 
>>> 
>>> I'm afraid this will break petsc4py in a hard-to-fix way.
>> 
>>   How? Do you do two builds with petsc4py once with real and once with complex?
>> 
> 
> No, what I meant is that if you make tao.h to generate an error, then
> petsc4py will not build in the complex scalar case.

   Hmm, can't you just not build the tao directory in that case? Hence petsc4py would not see tao.h at all?

   Currently we have this weird situation where when you build PETSc with complex it compiles in the tao/interface directory but not in any of the impls directories (like unconstrained etc) which petsc4py already handles somehow. I am just proposing not building in the tao/interface directory either (and putting in the error generator in tao.h in case users try to include it while using complex).

  Barry



> 
> 
> 
> -- 
> Lisandro Dalcin
> ============
> Research Scientist
> Computer, Electrical and Mathematical Sciences & Engineering (CEMSE)
> Numerical Porous Media Center (NumPor)
> King Abdullah University of Science and Technology (KAUST)
> http://numpor.kaust.edu.sa/
> 
> 4700 King Abdullah University of Science and Technology
> al-Khawarizmi Bldg (Bldg 1), Office # 4332
> Thuwal 23955-6900, Kingdom of Saudi Arabia
> http://www.kaust.edu.sa
> 
> Office Phone: +966 12 808-0459




More information about the petsc-dev mailing list