Hi Michael,<br><br>Thanks for the comments. I have implemented all of the changes you described, and attached a new version.<br><br>Also, the list of available cores is auto populated by grabbing any directory with core_ in it&#39;s name from the src/ directory. So if new cores are added (or removed) the makefile doesn&#39;t need to be modified to show them.<br>


<br>Let me know if there are any other comments. Otherwise I&#39;ll commit it probably by the end of the day today.<br><br>Doug<br><br><div class="gmail_quote">On Mon, Feb 27, 2012 at 11:18 AM, Michael Duda <span dir="ltr">&lt;<a href="mailto:duda@ucar.edu" target="_blank">duda@ucar.edu</a>&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi, Doug.<br>
<br>
This looks really good. I have just a couple of minor comments.<br>
<br>
In the usage text, I&#39;m not sure if the term &quot;compile groups&quot; will be<br>
familiar to most people; perhaps something like &quot;target&quot; instead, like:<br>
<br>
   Example targets:<br>
       ifort<br>
       gfortran<br>
       xlf<br>
       pgi<br>
<br>
It might be simpler if we omit the &quot;core_&quot; text altogether in<br>
<br>
   Availabe Cores: (without core_)<br>
       core_atmos_physics<br>
       core_hyd_atmos<br>
       core_init_nhyd_atmos<br>
       core_nhyd_atmos<br>
       core_ocean<br>
       core_sw<br>
<br>
so that it just reads<br>
<br>
   Availabe Cores:<br>
       atmos_physics<br>
       hyd_atmos<br>
       init_nhyd_atmos<br>
       nhyd_atmos<br>
       ocean<br>
       sw<br>
<br>
Also, I think it would be better to use absolute paths for libraries, rather<br>
than relative paths, so the last bit of text would read<br>
<br>
   Ensure that NETCDF (and PAPI if USE_PAPI=true) are environment variables<br>
   that point to the absolute paths for the libraries.<br>
<br>
<br>
For error checking, would it also be possible to catch the case where no<br>
make target is specified? I typically just set the environment variable CORE<br>
and usually run something like &quot;make pgi&quot;, but if I type just &quot;make&quot;, the<br>
build fails quickly with no clear error message; could we add something to<br>
catch this?<br>
<br>
Overall, I think these changes will make our lives much easier!<br>
<span><font color="#888888"><br>
Michael<br>
</font></span><div><div><br>
<br>
On Mon, Feb 27, 2012 at 09:29:04AM -0700, Doug Jacobsen wrote:<br>
&gt; The only two compiler groups that are &quot;set up&quot; are ifort and gfortran, at<br>
&gt; least for debug options. But we would need to come up with debug flags for<br>
&gt; each of the compilers so the DEBUG=true would work.<br>
&gt;<br>
&gt; SERIAL=true and USE_PAPI=true are not related to the compiler groups<br>
&gt; though, as long as the FC_SERIAL and CC_SERIAL compilers are set properly.<br>
&gt;<br>
&gt; Doug<br>
&gt;<br>
&gt; On Mon, Feb 27, 2012 at 8:11 AM, Mark Petersen &lt;<a href="mailto:mpetersen@lanl.gov" target="_blank">mpetersen@lanl.gov</a>&gt; wrote:<br>
&gt;<br>
&gt; &gt;  Doug,<br>
&gt; &gt;<br>
&gt; &gt; This looks great.  I appreciate the general formulation, so that flag<br>
&gt; &gt; preferences for each compiler type can be kept in the makefile.<br>
&gt; &gt;<br>
&gt; &gt; Mark<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; On 02/25/12 12:06, Doug Jacobsen wrote:<br>
&gt; &gt;<br>
&gt; &gt; Hi All,<br>
&gt; &gt;<br>
&gt; &gt; In the ocean development group, we have been discussing making options in<br>
&gt; &gt; the makefile for debug builds. So, I have attached a proposed revision to<br>
&gt; &gt; the current makefile structure, in order to make debug, and other modified<br>
&gt; &gt; builds, easier to maintain.<br>
&gt; &gt;<br>
&gt; &gt; If you call make incorrectly (without CORE= or a compiler set) you will<br>
&gt; &gt; get a usage statement now. I collapsed all of the compiler sets<br>
&gt; &gt; (ifort-serial ifort-serial-papi ifort-papi ifort) into one master set<br>
&gt; &gt; (ifort). My thoughts here were that it would be easier to maintain a single<br>
&gt; &gt; set of flags for a compiler than one for each potential version of the<br>
&gt; &gt; compiler. I also added three &quot;options&quot; to the make process. Which are as<br>
&gt; &gt; follows.<br>
&gt; &gt;<br>
&gt; &gt; DEBUG=true - Builds a debug version of the code, the default is the<br>
&gt; &gt; optimized build.<br>
&gt; &gt; SERIAL=true - Builds a serial (non-MPI) version of the code, the default<br>
&gt; &gt; is to build the parallel (MPI) version of the code.<br>
&gt; &gt; USE_PAPI=true - Builds a version of MPAS using the PAPI library for timers<br>
&gt; &gt; and hardware counters. The default is to not use this.<br>
&gt; &gt;<br>
&gt; &gt; These can all be appended to make along with the CORE=core option. So, an<br>
&gt; &gt; example to build a serial debug version of MPAS that uses PAPI libraries<br>
&gt; &gt; would be<br>
&gt; &gt; &quot;make gfortran CORE=ocean DEBUG=true SERIAL=true USE_PAPI=true&quot;<br>
&gt; &gt;<br>
&gt; &gt; Any values for DEBUG, SERIAL, and USE_PAPI that are not &quot;true&quot; invoke the<br>
&gt; &gt; default options for those.<br>
&gt; &gt;<br>
&gt; &gt; Please take a look at the attached makefile, and let me know if anyone has<br>
&gt; &gt; any comments or questions about it. I would like to push this onto the<br>
&gt; &gt; trunk early next week if possible.<br>
&gt; &gt;<br>
&gt; &gt; Thanks,<br>
&gt; &gt; Doug<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; _______________________________________________<br>
&gt; &gt; mpas-developers mailing listmpas-developers@mailman.ucar.eduhttp://<a href="http://mailman.ucar.edu/mailman/listinfo/mpas-developers" target="_blank">mailman.ucar.edu/mailman/listinfo/mpas-developers</a><br>
&gt; &gt;<br>
&gt; &gt;<br>
<br>
&gt; _______________________________________________<br>
&gt; mpas-developers mailing list<br>
&gt; <a href="mailto:mpas-developers@mailman.ucar.edu" target="_blank">mpas-developers@mailman.ucar.edu</a><br>
&gt; <a href="http://mailman.ucar.edu/mailman/listinfo/mpas-developers" target="_blank">http://mailman.ucar.edu/mailman/listinfo/mpas-developers</a><br>
<br>
</div></div></blockquote></div><br>