[petsc-users] how to rebuild from updated repo
Shao-Ching Huang
huangsc at gmail.com
Mon Nov 7 18:33:05 CST 2011
It turns out that the machine I am using has CUDA (nvcc), so petsc
disables cmake build (apparently even with --with-cuda=0, as long as
nvcc is detected). Then I noticed this comment: "# Our CMake build
does not support CUDA at this time" in config/PETSc/Configure.py (line
468)
I tried the same configure options on a different machine that has no
cuda -- cmake build works as expected.
Shao-Ching
On Mon, Nov 7, 2011 at 2:11 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:
>
> With petsc-3.2 if you have a recent version of cmake installed on your machine then it does exactly that and if you, for example, change one file the rebuilding of the library is very fast.
>
> Barry
>
> On Nov 7, 2011, at 2:07 PM, Shao-Ching Huang wrote:
>
>> Thanks guys.
>>
>> I was thinking rebuilding in 5 seconds, if I could reuse most of the
>> already-built .o files. (Like in a typical makefile scenario -- only
>> the changed source files are re-compiled). It seems that the petsc
>> "make" command cleans up all the .o files automatically.
>>
>> I have no problem of rebuilding the whole thing afresh. Actually that
>> is what I have been doing.
>>
>> Thanks,
>>
>> Shao-Ching
>>
>> On Mon, Nov 7, 2011 at 1:56 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:
>>>
>>> If you find that ./configure or the make are taking a huge amount of time you might investigate where the files are stored. If, for example, they are stored on a separate file server it may be most of the time is due to the file server. For example configuring and compiling each take me about 5 minutes on my laptop; on a desktop using a file server might take 1/2 an hour.
>>>
>>> Barry
>>>
>>> On Nov 7, 2011, at 3:52 PM, Satish Balay wrote:
>>>
>>>> On Mon, 7 Nov 2011, Shao-Ching Huang wrote:
>>>>
>>>>> Hi
>>>>>
>>>>> I downloaded petsc using the "hg clone
>>>>> http://petsc.cs.iit.edu/petsc/releases/petsc-3.2" method. Now, after
>>>>> hg pull/update (some files are changed), do I always have to build
>>>>> from scratch (i.e. compiling everything, including the --download-xxx
>>>>> stuff)? Is there a short cut to rebuild libpetsc.{so,a} when I have no
>>>>> configuration change?
>>>>
>>>> This is a tricky thing. Generally updates to petsc-3.2 should not
>>>> require a rerun of configure or a rebuild of all library code - but
>>>> this is not always true. [sometimes you might have to pull/update
>>>> BuildSystem and rerun configure - or rebuild externalpackages - as the
>>>> tarballs for these packages get updated].
>>>>
>>>> For the generaly case - an update of the libraries can be done with:
>>>>
>>>> [for cmake build]
>>>> make
>>>>
>>>> [for non-cmake build]
>>>> make ACTION=lib tree
>>>>
>>>> And if a rerun of configure is needed - one can run
>>>> ./PETSC_ARCH/conf/reconfigure_PETSC_ARCH.py
>>>>
>>>> Satish
>>>
>>>
>
>
More information about the petsc-users
mailing list