Hi Michael,<div><br></div><div>Thanks for putting these together. I don't have any issues with using this setup.</div><div><br></div><div>If no one else has any input on this topic I'll commit these two Makefiles before the merge.</div>
<div><br></div><div>Thanks!</div><div>Doug</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Dec 4, 2012 at 3:03 PM, Michael Duda <span dir="ltr"><<a href="mailto:duda@ucar.edu" target="_blank">duda@ucar.edu</a>></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>
Attached is an example of what I had in mind. The Makefile and<br>
Makefile.in.CESM_OCN files contain very little overlap, which should<br>
relieve most of the burden of applying changes in multiple places.<br>
In general, I'm not sure we can ever escape the need for updating other<br>
files when one changes; for example, when changing the interfaces in a<br>
module, one necessarily has to update all other code that depends on<br>
that module interface. However, I do appreciate that it would be much<br>
more difficult for developers to ensure that changes to the Makefile<br>
won't break the CESM build of MPAS-O. We can also hope that at least<br>
one person will catch such problems at the time the changes are proposed<br>
for inclusion in the trunk.<br>
<br>
I think having Makefiles that are as transparent as possible (without<br>
multiple layers of "ifeq" statements to mentally apply) should reduce<br>
the chances of mistakes overall, especially when adding in changes for<br>
MPAS-A and CAM.<br>
<br>
Sticking with CESM, rather than COUPLED, would be fine for us,<br>
especially with include files used as in the attached makefiles.<br>
<br>
Of course, I'm open to other suggestions for dealing with different<br>
builds of MPAS-O and MPAS-A (stand-alone and coupled) from the same<br>
source.<br>
<br>
Regards,<br>
Michael<br>
<div><div><br>
<br>
On Tue, Dec 04, 2012 at 12:23:41PM -0700, Doug Jacobsen wrote:<br>
> Hey Michael,<br>
><br>
> Just to clarify. Do you want to have a copy of the entire makefile in<br>
> Makefile.in.CESM_OCN, just without the ifeq's for CESM?<br>
><br>
> The only problem I would have with this is the amount of effort to maintain<br>
> all of the makefile we would need. Even with two, I think it's going to be<br>
> difficult for developers to remember to updated both Makefile and<br>
> Makefile.in.CESM_OCN when they make some change to Makefile.<br>
><br>
> Other than that issue, I don't see a reason that it couldn't happen like<br>
> that. I don't really have a strong preference either way.<br>
><br>
> With regards to working with CAM, would you guys prefer to have the flag be<br>
> COUPLED rather than CESM?<br>
><br>
> Thanks for the comments,<br>
> Doug<br>
><br>
><br>
> On Tue, Dec 4, 2012 at 12:04 PM, Michael Duda <<a href="mailto:duda@ucar.edu" target="_blank">duda@ucar.edu</a>> wrote:<br>
><br>
> > Hi, Doug.<br>
> ><br>
> > Since this will affect everyone, including our work here to implement<br>
> > MPAS-A as a dynamical core in CAM, I thought I'd bring this up with the<br>
> > larger group. The Makefile in the src directory (i.e., src/Makefile) of<br>
> > the branch is looking a bit tangled to me with all of the "ifeq"<br>
> > statements. As a potential solution, I'm wondering whether we could<br>
> > make use of include files, so src/Makefile looks something like:<br>
> ><br>
> ><br>
> > ifeq "$(CESM)" "true"<br>
> ><br>
> > include Makefile.in.CESM_OCN<br>
> ><br>
> > else<br>
> ><br>
> > #<br>
> > # Current contents of the Makefile<br>
> > #<br>
> ><br>
> > endif<br>
> ><br>
> ><br>
> > This would allow us the flexibility to do whatever we need to for MPAS-O<br>
> > and MPAS-A, while still keeping the Makefile for a stand-alone build<br>
> > looking clean. I'd imagined that, when building the MPAS-A dycore within<br>
> > CAM, we could add a little extra logic:<br>
> ><br>
> ><br>
> > ifeq "$(CESM)" "true"<br>
> ><br>
> > ifeq "$(CORE)" "ocean"<br>
> > include Makefile.in.CESM_OCN<br>
> > endif<br>
> ><br>
> > ifeq "$(CORE)" "nhyd_atmos"<br>
> > include Makefile.in.CESM_ATM<br>
> > endif<br>
> ><br>
> > else<br>
> ><br>
> > #<br>
> > # Current contents of the Makefile<br>
> > #<br>
> ><br>
> > endif<br>
> ><br>
> ><br>
> > Does this sound like a potentially viable approach? I think that<br>
> > splitting out the specifics for CESM and CAM builds could make it easier<br>
> > for other developers (and future users, potentially) to follow the build<br>
> > sequence and dependencies.<br>
> ><br>
> > Regards,<br>
> > Michael<br>
> ><br>
> ><br>
> > On Mon, Dec 03, 2012 at 01:25:19PM -0700, Doug Jacobsen wrote:<br>
> > > Hello All,<br>
> > ><br>
> > > I have been working recently on coupling MPAS-O to CESM. I currently have<br>
> > > it setup to where MPAS build's in a suitable method for CESM, and the<br>
> > Ocean<br>
> > > model can run within CESM (without being forced).<br>
> > ><br>
> > > Several changes were made that were needed to be able to have MPAS build<br>
> > > properly for inclusion in to CESM. I want to merge the branch I have been<br>
> > > working under to the trunk before putting more work on the forcing side.<br>
> > > This way, we have a checkpoint on the trunk of a working version of MPAS<br>
> > > with the CESM.<br>
> > ><br>
> > > Also, I think I won't need to make any more changes to the shared areas<br>
> > of<br>
> > > MPAS after this commit.<br>
> > ><br>
> > > The branch in question is branches/ocean_projects/cesm_coupling. I'll<br>
> > > commit it on Wednesday if I don't hear anything about it, but any<br>
> > questions<br>
> > > or comments are welcome.<br>
> > ><br>
> > > Thanks!<br>
> > > Doug<br>
> ><br>
> > > _______________________________________________<br>
> > > mpas-developers mailing list<br>
> > > <a href="mailto:mpas-developers@mailman.ucar.edu" target="_blank">mpas-developers@mailman.ucar.edu</a><br>
> > > <a href="http://mailman.ucar.edu/mailman/listinfo/mpas-developers" target="_blank">http://mailman.ucar.edu/mailman/listinfo/mpas-developers</a><br>
> ><br>
> ><br>
</div></div></blockquote></div><br></div>