[petsc-users] Libraries destination directory is non-standard

Juan Luis Cano juanlu001 at gmail.com
Sat Jan 10 04:36:28 CST 2015


On 2015-01-10 06:45, Barry Smith wrote:
>    Juan Luis,
>
>      The intention of the setup.py is so that people can do things like
>
> $ sudo pip install https://bitbucket.org/petsc/petsc/get/master.tar.gz#egg=petsc-master
>
> [...]
> That is the setup is so that users can easily install PETSc for use from petsc4py and then easily install petsc4py without ever needing to directly worry about configure, make, etc etc .... themselves.
>
>    Make sense?

Hello Barry, thanks for your remarks. It totally makes sense! I lost 
sight of this fact for a moment. I agree pip installing PETSc must be 
very useful for the major bulk of users.

Regards,

Juan Luis

>    (Also I think it should be fine to use --download-suitesparse options etc with the setup.py though I have not tested it.)
>
>     Barry
>
> I'll check with Lisandro about eliminating the need for that PETSC_DIR=/Library/Python/2.7/site-packages/petsc PETSC_ARCH=""
> since petsc4py should automatically check if PETSc libs are install for python and use them;
>
>
>
>> On Jan 9, 2015, at 11:51 AM, Juan Luis Cano <juanlu001 at gmail.com> wrote:
>>
>> Hello Satish, I reply you inline:
>>
>> On 2015-01-08 21:46, Satish Balay wrote:
>>> For one - I think each external package should be packaged separately
>>> - and packagers should not rely on --download-package functionality.
>> Fair point. Doing it this way was just easy, but you are right I should decouple the external packages. That is unrelated to my problem though.
>>
>>> Secondly - petsc/umfpack etc libs will get installed in
>>> $PREFIX/lib/python2.7/site-packages/petsc/lib only if petsc is
>>> configured with the option:
>>>
>>> --prefix=$PREFIX/lib/python2.7/site-packages/petsc/lib
>>>
>>> Perhaps there is an error here? You can check [or send us]
>>> configure.log created by PETSc.
>> Actually this is unsurprising to me, because all Python modules (i.e. those installed via 'python setup.py install') go to $PREFIX/lib/python2.7/site-packages, and I didn't expect petsc to be an exception.
>>
>> After reading your reply I inspected the resulting files and probably PETSc is not meant to be there, which makes me wonder if I should use the Python installer in the first place. The 'setup.py' way is mentioned nowhere in the docs...
>>
>> I just switched to traditional './configure && make' and now the libraries are where I wanted. I had to specify PETSC_DIR though when building petsc4py but that is fine. I should probably take the same path with slepc.
>>
>> Problem solved! But what is the status of the setup.py installation procedure then?
>>
>> Answering Barry too:
>>
>> On 2015-01-09 00:58, Barry Smith wrote:
>>>   2) For the longer term we'd like to make it trivial for  things work as you desire. We've revamped our installation process in the developer version of PETSc http://www.mcs.anl.gov/petsc/developers/index.html (git branch barry/namespace-install) and would be happy to work with you to get that version to to have the support you require. I'm guessing that we could add an optional argument to our setup.py that allows you to bypass the extra 'petsc' in the installation directory and we'd be happy to add that.
>> Thanks for your support. Perhaps this is not needed anymore given the above, but what are the changes that you introduced specifically? As there is no readme it is difficult to me to figure it out, as I am not familiarized with PETSc source code...
>>
>> Juan Luis



More information about the petsc-users mailing list