<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">The default value determined by the configure sometimes makes the compiling process fail. I have experienced a couple of times before. The solution is to use "MAKE_NP=1".</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Fande,<br>
</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> petsc-dev <petsc-dev-bounces@mcs.anl.gov> on behalf of Satish Balay <balay@mcs.anl.gov><br>
<b>Sent:</b> Tuesday, July 24, 2018 5:57:55 PM<br>
<b>To:</b> Fande Kong<br>
<b>Cc:</b> petsc-dev<br>
<b>Subject:</b> Re: [petsc-dev] could we let "make -j N" work for PETSc and external packages?</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Another alternative: use gmakefile directly - and ignore our<br>
'makefile' wrapper.<br>
<br>
[with makefile wrapper - we try to control a few things - and print<br>
some extra debug info like the MAKEFLAGS].<br>
<br>
But if you use 'gmakefile' directly - you would be using PETSc like<br>
any other package - it supports 'V=1' for some debug info [which is<br>
similar to info provided by most packages]<br>
<br>
<br>
BTW: Any particular why MAKE_NP determined by configure [i.e the default value] is not useful?<br>
<br>
Satish<br>
<br>
On Tue, 24 Jul 2018, Fande Kong wrote:<br>
<br>
> Thanks, Satish,<br>
> <br>
> I’m going to use MAKE_NP <br>
> <br>
> Fande <br>
> <br>
> Sent from my iPhone<br>
> <br>
> > On Jul 24, 2018, at 4:26 PM, Satish Balay <balay@mcs.anl.gov> wrote:<br>
> > <br>
> > I hate html e-mail which doesn't add reply markers - can't figure out easily what you saying :(<br>
> > <br>
> >>> However some older make version might not display this info properly. [it should use the user specified '-j' value though]<br>
> >> <br>
> >> This confused me, and now I understood. But it is misleading. Could we do something at the PETSc side regardless the make version? At least display the user-specified value not the default value. I thought my "-j" did not change anything.<br>
> > <br>
> > Thats a 'make' issue. you are specifying options to make. So we have no control on it [unless make tells us - and this mode is buggy on the OSX default make version].<br>
> > <br>
> > The only option we have is : not print anything. I think thats a bad option.<br>
> > <br>
> > You have alternatives:<br>
> > <br>
> > - use a newer make with --download-make<br>
> > <br>
> > - or use MAKE_NP<br>
> > <br>
> > Satish<br>
> > <br>
> >> On Tue, 24 Jul 2018, Fande Kong wrote:<br>
> >> <br>
> >> <br>
> >> <br>
> >> <br>
> >> ________________________________<br>
> >> From: Satish Balay <balay@mcs.anl.gov><br>
> >> Sent: Tuesday, July 24, 2018 4:06 PM<br>
> >> To: Fande Kong<br>
> >> Cc: Jed Brown; For users of the development version of PETSc<br>
> >> Subject: Re: [petsc-dev] could we let "make -j N" work for PETSc and external packages?<br>
> >> <br>
> >> PETSc configure sets up a default value that always gets used.<br>
> >> <br>
> >>>>>>>>> <br>
> >> balay@asterix /home/balay/tmp/petsc (maint=)<br>
> >> $ make<br>
> >> <snip><br>
> >> Using MAKEFLAGS: -j4 -l6.0 w -- PETSC_DIR=/home/balay/tmp/petsc PETSC_ARCH=arch-linux2-c-debug<br>
> >> <<<<br>
> >> <br>
> >> You can always override this default by adding a -j option. [since the<br>
> >> user specified -j value comes at the end - it overrides the one that<br>
> >> is specified at the begining of make command]<br>
> >> <br>
> >>>>>>>>>>>> <br>
> >> balay@asterix /home/balay/tmp/petsc (maint=)<br>
> >> $ make -j20<br>
> >> <snip><br>
> >> Using MAKEFLAGS: -j4 -l6.0 w -j20 --jobserver-auth=3,4 -- PETSC_DIR=/home/balay/tmp/petsc PETSC_ARCH=arch-linux2-c-debug<br>
> >> <<<<<<<<<<<br>
> >> <br>
> >> <br>
> >> However some older make version might not display this info properly. [it should use the user specified '-j' value though]<br>
> >> <br>
> >> This confused me, and now I understood. But it is misleading. Could we do something at the PETSc side regardless the make version? At least display the user-specified value not the default value. I thought my "-j" did not change anything.<br>
> >> <br>
> >> Fande,<br>
> >> <br>
> >>>>>>>>> <br>
> >> [petsc@ipro petsc.maint ((879a78556f...))]$ make -j2<br>
> >> Using MAKEFLAGS: -j7 -l12.0 w --jobserver-fds=3,4 -j -- PETSC_DIR=/Users/petsc/petsc.maint PETSC_ARCH=arch-osx-10.6<br>
> >> <<<<<<<<br>
> >> <br>
> >> You can use the alternate mode - just modify the default '-j' value used MAKE_NP<br>
> >> <br>
> >>>>>>>>>> <br>
> >> [petsc@ipro petsc.maint ((879a78556f...))]$ make MAKE_NP=2<br>
> >> Using MAKEFLAGS: -j2 -l12.0 w -- PETSC_DIR=/Users/petsc/petsc.maint PETSC_ARCH=arch-osx-10.6 MAKE_NP=2<br>
> >> <<<<<<<<br>
> >> <br>
> >> Or you can control this default value at configure time [this affects externalpackage builds]<br>
> >> <br>
> >> ./configure --with-make-np=2<br>
> >> <br>
> >> Satish<br>
> >> <br>
> >> <br>
> >>> On Tue, 24 Jul 2018, Fande Kong wrote:<br>
> >>> <br>
> >>> Thanks, Jed and Satish,<br>
> >>> <br>
> >>> <br>
> >>> But "make -j N" does not change anything when compiling petsc.<br>
> >>> <br>
> >>> <br>
> >>> <br>
> >>> If I do something like: "make -j whatever". Then I always get:<br>
> >>> <br>
> >>> <br>
> >>> Using MAKEFLAGS: -j8 -l36.0 w<br>
> >>> <br>
> >>> <br>
> >>> It looks like PETSc always uses "-j something" that we can not change using the command-line.<br>
> >>> <br>
> >>> <br>
> >>> Is it a bug?<br>
> >>> <br>
> >>> <br>
> >>> <br>
> >>> Fande,<br>
> >>> <br>
> >>> <br>
> >>> <br>
> >>> ________________________________<br>
> >>> From: Jed Brown <jed@jedbrown.org><br>
> >>> Sent: Tuesday, July 24, 2018 3:44 PM<br>
> >>> To: Fande Kong; For users of the development version of PETSc<br>
> >>> Subject: Re: [petsc-dev] could we let "make -j N" work for PETSc and external packages?<br>
> >>> <br>
> >>> Fande Kong <Fande.Kong@inl.gov> writes:<br>
> >>> <br>
> >>>> Hi Developers,<br>
> >>>> <br>
> >>>> <br>
> >>>> Could we somehow let "make -j N" to take multiple threads for compiling PETSc. Do we use multiple threads when compiling the external packages such as hypre, parmetis etc.?<br>
> >>> <br>
> >>> Yes, see self.parallelMake=0 for the few packages that don't support parallel make.<br>
> >>> <br>
> >> <br>
> >> <br>
> > <br>
> <br>
</div>
</span></font></div>
</body>
</html>