[petsc-dev] buildsystem questions

Barry Smith bsmith at mcs.anl.gov
Mon Sep 20 21:53:58 CDT 2010


On Sep 20, 2010, at 9:12 PM, Kai Germaschewski wrote:

> 
> So the below actually occurs with petsc-3.1, but I believe not much has changed in petsc-dev.
> 
> This is a config crash, which I guess is my own fault, so that's not the real issue:
> 
> TESTING: configureDefaultArch from PETSc.Configure(config/PETSc/Configure.py:461)
> *******************************************************************************
>         CONFIGURATION CRASH  (Please send configure.log to petsc-maint at mcs.anl.gov)
> *******************************************************************************
> [Errno 13] Permission denied: 'conf/petscvariables'  File "./config/configure.py", line 250, in petsc_configure
>     framework.configure(out = sys.stdout)
>   File "/home/kai/src/petsc-3.1/config/BuildSystem/config/framework.py", line 930, in configure
>     child.configure()
>   File "/home/kai/src/petsc-3.1/config/PETSc/Configure.py", line 562, in configure
>     self.executeTest(self.configureDefaultArch)
>   File "/home/kai/src/petsc-3.1/config/BuildSystem/config/base.py", line 97, in executeTest
>     ret = apply(test, args,kargs)
>   File "/home/kai/src/petsc-3.1/config/PETSc/Configure.py", line 464, in configureDefaultArch
>     fd = file(conffile, 'w')
> 
> The reason for the "permission denied" is that I cannot easily install a petsc that I built as a user, as I normally do with all kinds of other software. If I do "sudo make install", it fails with "mpicc not found" (actually, it doesn't fail, it says install complete, but the install then doesn't work). I can work around that by making sure I put the right mpicc into my path as root before I "make install", but it's not as convenient as it could be. autoconf/automake software normally builds libraries as user that can be directly installed without having to be relinked, so I know it's possible to make do without relinking (unless using --disable-fast-install). Another side effect is that apparently I ended up with files owned by root in my home directory, which gave the problem above later.

   This is in theory fixed in petsc-dev. The mpicc was being used to remake the shared libraries, but I think we've removed that need so with petsc-dev 

./configure ; make ; sudo make install should work please report any problems.

> 
> A second, not really related issue:
> 
> In my application's build, I use "make getincludedirs / getlinklibs" to figure out how to build with / link with petsc, I suppose this is how it should be done? Unfortunately it doesn't work so well with an installed version of petsc, since the makefile doesn't get installed with the rest of things. Should the makefile get installed, or should I be using another way of figuring out this info?

   Installing a makefile is kind of weird so it is not installed in $PETSC_DIR. You can get the values by making a makefile with the two lines 
include ${PETSC_DIR}/conf/variables
include ${PETSC_DIR}/conf/rules
then do make geincludedirs but I admit that is cumbersome.  I guess we could copy over the makefile to something like conf/makefile and then you could do make getincludedirs -f ${PETSC_DIR}/conf/makefile  Is that a reasonable fix? The drawback is that it is not in the same place as in a non-prefix build. 

  Barry







> 
> --Kai
> 
> 
> 
> 
> -- 
> Kai Germaschewski
> Assistant Professor, Dept of Physics / Space Science Center
> University of New Hampshire, Durham, NH 03824
> office: Morse Hall 245E
> phone:  +1-603-862-2912
> fax: +1-603-862-2771
> 




More information about the petsc-dev mailing list