[Dart-dev] [9606] DART/trunk/mkmf: add a comment about buffering i/o by default, and add

nancy at ucar.edu nancy at ucar.edu
Tue Jan 26 13:17:50 MST 2016


Revision: 9606
Author:   nancy
Date:     2016-01-26 13:17:49 -0700 (Tue, 26 Jan 2016)
Log Message:
-----------
add a comment about buffering i/o by default, and add
that flag to the optimized FFLAGS option.  not recommended
for debugging since it might prevent the last writes
from showing up either on standard output or the dart log.

Modified Paths:
--------------
    DART/trunk/mkmf/mkmf.template.intel.linux
    DART/trunk/mkmf/mkmf.template.intel.osx
    DART/trunk/mkmf/mkmf.template.sgi.altix

-------------- next part --------------
Modified: DART/trunk/mkmf/mkmf.template.intel.linux
===================================================================
--- DART/trunk/mkmf/mkmf.template.intel.linux	2016-01-26 18:22:12 UTC (rev 9605)
+++ DART/trunk/mkmf/mkmf.template.intel.linux	2016-01-26 20:17:49 UTC (rev 9606)
@@ -73,6 +73,16 @@
 #                which have priority over the others.
 #                (for those running on yellowstone, -axavx will enable the advanced
 #                vector instructions available on the sandy bridge processors.)
+#     -assume buffered_io  allows the runtime library to buffer up individual
+#                writes before calling the operating system.  in particular, we
+#                write our observation sequence files as a series of many individual
+#                calls to the write() routine.  when debugging you do not want to
+#                buffer so you can see the last output before the program dies.
+#                for production, however, you want to batch up writes into larger
+#                blocks before stopping to do i/o to disk.  an alternative at
+#                runtime is to set FORT_BUFFERED to 'true' in your environment.
+#                (e.g. csh family: setenv FORT_BUFFERED true    or
+#                ksh family: export FORT_BUFFERED=true).  
 #
 # FFLAGS   possibly useful, not normally used by DART
 #     -fpp     run Fortran preprocessor on source files prior to compilation
@@ -124,7 +134,7 @@
 
 INCS = -I$(NETCDF)/include
 LIBS = -L$(NETCDF)/lib -lnetcdff -lnetcdf
-FFLAGS  = -O -vec-report0 $(INCS)
+FFLAGS  = -O -vec-report0 -assume buffered_io $(INCS)
 LDFLAGS = $(FFLAGS) $(LIBS)
 
 # for development or debugging, use this instead:

Modified: DART/trunk/mkmf/mkmf.template.intel.osx
===================================================================
--- DART/trunk/mkmf/mkmf.template.intel.osx	2016-01-26 18:22:12 UTC (rev 9605)
+++ DART/trunk/mkmf/mkmf.template.intel.osx	2016-01-26 20:17:49 UTC (rev 9606)
@@ -73,7 +73,18 @@
 #                which have priority over the others.
 #                (for those running on yellowstone, -axavx will enable the advanced
 #                vector instructions available on the sandy bridge processors.)
+#     -assume buffered_io  allows the runtime library to buffer up individual
+#                writes before calling the operating system.  in particular, we
+#                write our observation sequence files as a series of many individual
+#                calls to the write() routine.  when debugging you do not want to
+#                buffer so you can see the last output before the program dies.
+#                for production, however, you want to batch up writes into larger
+#                blocks before stopping to do i/o to disk.  an alternative at
+#                runtime is to set FORT_BUFFERED to 'true' in your environment.
+#                (e.g. csh family: setenv FORT_BUFFERED true    or
+#                ksh family: export FORT_BUFFERED=true).  
 #
+#
 # FFLAGS   possibly useful, not normally used by DART
 #     -fpp     run Fortran preprocessor on source files prior to compilation
 #     -free    interpret source as free-format, regardless of file extension
@@ -130,7 +141,7 @@
 #LDFLAGS = $(INCS) -Wl,-stack_size,10000000 $(LIBS)
 
 # for Intel 10.x and beyond:
-FFLAGS  = $(INCS) -O2 -m64 -heap-arrays -vec-report0 
+FFLAGS  = $(INCS) -O2 -m64 -heap-arrays -vec-report0  -assume buffered_io
 LDFLAGS = $(INCS) $(LIBS)
 
 # for development or debugging, use this instead:

Modified: DART/trunk/mkmf/mkmf.template.sgi.altix
===================================================================
--- DART/trunk/mkmf/mkmf.template.sgi.altix	2016-01-26 18:22:12 UTC (rev 9605)
+++ DART/trunk/mkmf/mkmf.template.sgi.altix	2016-01-26 20:17:49 UTC (rev 9606)
@@ -87,7 +87,18 @@
 #                which have priority over the others.
 #                (for those running on yellowstone, -axavx will enable the advanced
 #                vector instructions available on the sandy bridge processors.)
+#     -assume buffered_io  allows the runtime library to buffer up individual
+#                writes before calling the operating system.  in particular, we
+#                write our observation sequence files as a series of many individual
+#                calls to the write() routine.  when debugging you do not want to
+#                buffer so you can see the last output before the program dies.
+#                for production, however, you want to batch up writes into larger
+#                blocks before stopping to do i/o to disk.  an alternative at
+#                runtime is to set FORT_BUFFERED to 'true' in your environment.
+#                (e.g. csh family: setenv FORT_BUFFERED true    or
+#                ksh family: export FORT_BUFFERED=true).  
 #
+#
 # FFLAGS   possibly useful, not normally used by DART
 #     -fpp     run Fortran preprocessor on source files prior to compilation
 #     -free    interpret source as free-format, regardless of file extension
@@ -138,7 +149,7 @@
 
 INCS = -I$(NETCDF)/include
 LIBS = -L$(NETCDF)/lib -lnetcdff -lnetcdf
-FFLAGS  = -O $(INCS)
+FFLAGS  = -O -assume buffered_io $(INCS)
 LDFLAGS = $(FFLAGS) $(LIBS)
 
 # for development or debugging, use this instead:


More information about the Dart-dev mailing list