[petsc-users] petsc4py & GPU
Damian Kaliszan
damian at man.poznan.pl
Thu Apr 20 11:26:56 CDT 2017
Hi,
There might be the problem because I'm using ArgumentParser class to catch complex command line arguments. In this case is there any chance to make both to cooperate or the only solution is to pass everything through argument to init method of petsc4py?
Best,
Damian
W dniu 20 kwi 2017, 17:37, o 17:37, użytkownik Lisandro Dalcin <dalcinl at gmail.com> napisał:
>On 20 April 2017 at 17:09, Damian Kaliszan <damian at man.poznan.pl>
>wrote:
>
>> Thank you for reply:) Sorry for maybe stupid question in the scope of
>> setting petsc(4py) options.
>> Should the following calls (somewhere before creating matrix &
>vectors):
>>
>> PETSc.Options().setValue("ksp_view", "")
>> PETSc.Options().setValue("log_view", "")
>>
>
>Unfortunately, no. There are a few options (-log_view ?) that you
>should
>set before calling PetscInitialize() (which happens automatically at
>import
>time), otherwise things do not work as expected. To pass things from
>the
>command line and set them before PetscInitialize() the usual idiom is:
>
>import sys, petsc4py
>petsc4py.init(sys.argv)
>from petsc4py import PETSc
>
>
>
>--
>Lisandro Dalcin
>============
>Research Scientist
>Computer, Electrical and Mathematical Sciences & Engineering (CEMSE)
>Extreme Computing Research Center (ECRC)
>King Abdullah University of Science and Technology (KAUST)
>http://ecrc.kaust.edu.sa/
>
>4700 King Abdullah University of Science and Technology
>al-Khawarizmi Bldg (Bldg 1), Office # 0109
>Thuwal 23955-6900, Kingdom of Saudi Arabia
>http://www.kaust.edu.sa
>
>Office Phone: +966 12 808-0459
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170420/a103e2da/attachment-0001.html>
More information about the petsc-users
mailing list