[mpas-developers] COMMIT CHECK: Updated Makefile

Doug Jacobsen jacobsen.douglas at gmail.com
Mon Feb 27 11:34:11 MST 2012


Hi Michael,

Thanks for the comments. I have implemented all of the changes you
described, and attached a new version.

Also, the list of available cores is auto populated by grabbing any
directory with core_ in it's name from the src/ directory. So if new cores
are added (or removed) the makefile doesn't need to be modified to show
them.

Let me know if there are any other comments. Otherwise I'll commit it
probably by the end of the day today.

Doug

On Mon, Feb 27, 2012 at 11:18 AM, Michael Duda <duda at ucar.edu> wrote:

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


More information about the mpas-developers mailing list