[mpas-developers] keeping around .f90 files

Mark Petersen mpetersen at lanl.gov
Wed May 5 11:21:08 MDT 2010


Michael,

I like the idea of keeping the .f90 files around.  It is often nice to 
look at the post-parsed code to debug or understand how the registry 
works.

Mark


On Wed, 5 May 2010, Michael Duda wrote:

> Hi, Developers.
>
> I have in mind a change to the makefiles that would keep
> the pre-processed Fortran source files (i.e., the .f90
> files) when building the MPAS code, and only remove them
> when 'make clean' is run. The major benefit that I see
> would be in debugging code, where compile-time errors are
> reported with respect to line numbers in .f90 files and
> debuggers generally need the .f90 files when displaying
> source. What opinions do you all have on making this change
> to the repository trunk? The changes are essentially those
> made in revision 250 to a branch, and are summarized below.
> Is this something that we'd like to do in the trunk as well?
>
> Cheers,
> Michael
>
>
> Change all Makefiles to keep the pre-processed Fortran<br>
> source files (i.e., the .f90 files), and to remove these <br>
> files under the 'clean' target.<br>
> <br>
> <br>
> M    src/core_hyd_atmos/Makefile<br>
> M    src/core_sw/Makefile<br>
> M    src/driver/Makefile<br>
> M    src/driver_cam_interface/Makefile<br>
> M    src/core_ocean/Makefile<br>
> M    src/framework/Makefile<br>
> M    src/operators/Makefile<br>
> </p><hr noshade><pre><font color="gray">Modified: branches/mpas_cam_coupling/src/core_hyd_atmos/Makefile
> ===================================================================
> --- branches/mpas_cam_coupling/src/core_hyd_atmos/Makefile      2010-05-05 09:41:20 UTC (rev 249)
> +++ branches/mpas_cam_coupling/src/core_hyd_atmos/Makefile      2010-05-05 16:59:19 UTC (rev 250)
> @@ -19,10 +19,9 @@
> mpas_interface.o: module_advection.o module_test_cases.o module_time_integration.o
>
> clean:
> -       $(RM) *.o *.mod libdycore.a
> +       $(RM) *.o *.mod *.f90 libdycore.a
>
> .F.o:
>        $(RM) $@ $*.mod
>        $(CPP) $(CPPFLAGS) $(CPPINCLUDES) $&lt; &gt; $*.f90
>        $(FC) $(FFLAGS) -c $*.f90 $(FCINCLUDES) -I../framework -I../operators
> -       $(RM) $*.f90
>
> Modified: branches/mpas_cam_coupling/src/core_ocean/Makefile
> ===================================================================
> --- branches/mpas_cam_coupling/src/core_ocean/Makefile  2010-05-05 09:41:20 UTC (rev 249)
> +++ branches/mpas_cam_coupling/src/core_ocean/Makefile  2010-05-05 16:59:19 UTC (rev 250)
> @@ -19,10 +19,9 @@
> mpas_interface.o: module_global_diagnostics.o module_test_cases.o module_time_integration.o
>
> clean:
> -       $(RM) *.o *.mod libdycore.a
> +       $(RM) *.o *.mod *.f90 libdycore.a
>
> .F.o:
>        $(RM) $@ $*.mod
>        $(CPP) $(CPPFLAGS) $(CPPINCLUDES) $&lt; &gt; $*.f90
>        $(FC) $(FFLAGS) -c $*.f90 $(FCINCLUDES) -I../framework -I../operators
> -       $(RM) $*.f90
>
> Modified: branches/mpas_cam_coupling/src/core_sw/Makefile
> ===================================================================
> --- branches/mpas_cam_coupling/src/core_sw/Makefile     2010-05-05 09:41:20 UTC (rev 249)
> +++ branches/mpas_cam_coupling/src/core_sw/Makefile     2010-05-05 16:59:19 UTC (rev 250)
> @@ -16,10 +16,9 @@
> mpas_interface.o: module_test_cases.o module_time_integration.o
>
> clean:
> -       $(RM) *.o *.mod libdycore.a
> +       $(RM) *.o *.mod *.f90 libdycore.a
>
> .F.o:
>        $(RM) $@ $*.mod
>        $(CPP) $(CPPFLAGS) $(CPPINCLUDES) $&lt; &gt; $*.f90
>        $(FC) $(FFLAGS) -c $*.f90 $(FCINCLUDES) -I../framework -I../operators
> -       $(RM) $*.f90
>
> Modified: branches/mpas_cam_coupling/src/driver/Makefile
> ===================================================================
> --- branches/mpas_cam_coupling/src/driver/Makefile      2010-05-05 09:41:20 UTC (rev 249)
> +++ branches/mpas_cam_coupling/src/driver/Makefile      2010-05-05 16:59:19 UTC (rev 250)
> @@ -10,10 +10,9 @@
> mpas.o: module_subdriver.o
>
> clean:
> -       $(RM) *.o *.mod
> +       $(RM) *.o *.mod *.f90
>
> .F.o:
>        $(RM) $@ $*.mod
>        $(CPP) $(CPPFLAGS) $(CPPINCLUDES) $&lt; &gt; $*.f90
>        $(FC) $(FFLAGS) -c $*.f90 $(FCINCLUDES) -I../framework -I../core_$(CORE)
> -       $(RM) $*.f90
>
> Modified: branches/mpas_cam_coupling/src/driver_cam_interface/Makefile
> ===================================================================
> --- branches/mpas_cam_coupling/src/driver_cam_interface/Makefile        2010-05-05 09:41:20 UTC (rev 249)
> +++ branches/mpas_cam_coupling/src/driver_cam_interface/Makefile        2010-05-05 16:59:19 UTC (rev 250)
> @@ -13,10 +13,9 @@
> test_driver.o: module_mpas_cam_interface.o
>
> clean:
> -       $(RM) *.o *.mod
> +       $(RM) *.o *.mod *.f90
>
> .F.o:
>        $(RM) $@ $*.mod
>        $(CPP) $(CPPFLAGS) $(CPPINCLUDES) $&lt; &gt; $*.f90
>        $(FC) $(FFLAGS) -c $*.f90 $(FCINCLUDES) -I../framework -I../core_$(CORE)
> -       $(RM) $*.f90
>
> Modified: branches/mpas_cam_coupling/src/framework/Makefile
> ===================================================================
> --- branches/mpas_cam_coupling/src/framework/Makefile   2010-05-05 09:41:20 UTC (rev 249)
> +++ branches/mpas_cam_coupling/src/framework/Makefile   2010-05-05 16:59:19 UTC (rev 250)
> @@ -35,13 +35,12 @@
> module_io_output.o: module_grid_types.o module_dmpar.o module_sort.o module_configure.o
>
> clean:
> -       $(RM) *.o *.mod libframework.a
> +       $(RM) *.o *.mod *.f90 libframework.a
>
> .F.o:
>        $(RM) $@ $*.mod
>        $(CPP) $(CPPFLAGS) $(CPPINCLUDES) $&lt; &gt; $*.f90
>        $(FC) $(FFLAGS) -c $*.f90 $(FCINCLUDES)
> -       $(RM) $*.f90
>
> .c.o:
>        $(CC) $(CFLAGS) $(CPPFLAGS) $(CPPINCLUDES) -c $&lt;
>
> Modified: branches/mpas_cam_coupling/src/operators/Makefile
> ===================================================================
> --- branches/mpas_cam_coupling/src/operators/Makefile   2010-05-05 09:41:20 UTC (rev 249)
> +++ branches/mpas_cam_coupling/src/operators/Makefile   2010-05-05 16:59:19 UTC (rev 250)
> @@ -10,10 +10,9 @@
> module_vector_reconstruction.o:
>
> clean:
> -       $(RM) *.o *.mod libops.a
> +       $(RM) *.o *.mod *.f90 libops.a
>
> .F.o:
>        $(RM) $@ $*.mod
>        $(CPP) $(CPPFLAGS) $(CPPINCLUDES) $&lt; &gt; $*.f90
>        $(FC) $(FFLAGS) -c $*.f90 $(FCINCLUDES) -I../framework
> -       $(RM) $*.f90
>
> _______________________________________________
> mpas-developers mailing list
> mpas-developers at mailman.ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/mpas-developers
>


More information about the mpas-developers mailing list