<p><b>duda</b> 2010-12-28 13:48:48 -0700 (Tue, 28 Dec 2010)</p><p>1) Add namelist option config_decomp_file_prefix, which is a character<br>
string specifying the prefix of mesh decomposition files (to be suffixed <br>
with the task count); this option is in the &io record with a default<br>
value of "graph.info.part."<br>
<br>
2) Add compiler flags in top-level Makefile to use big-endian format for all<br>
unformatted reads and writes.<br>
<br>
<br>
M src/core_hyd_atmos/Registry<br>
M src/core_sw/Registry<br>
M src/core_ocean/Registry<br>
M src/framework/module_block_decomp.F<br>
M src/framework/Makefile<br>
M Makefile<br>
</p><hr noshade><pre><font color="gray">Modified: trunk/mpas/Makefile
===================================================================
--- trunk/mpas/Makefile        2010-12-23 18:21:31 UTC (rev 665)
+++ trunk/mpas/Makefile        2010-12-28 20:48:48 UTC (rev 666)
@@ -38,7 +38,7 @@
        "CC = cc" \
        "SFC = ftn" \
        "SCC = cc" \
-        "FFLAGS = -i4 -r8 -gopt -O2 -Mvect=nosse -Kieee" \
+        "FFLAGS = -i4 -r8 -gopt -O2 -Mvect=nosse -Kieee -convert big_endian" \
        "CFLAGS = -fast" \
        "LDFLAGS = " \
        "CORE = $(CORE)" \
@@ -50,7 +50,7 @@
        "CC = mpicc" \
        "SFC = pgf90" \
        "SCC = pgcc" \
-        "FFLAGS = -r8 -O3" \
+        "FFLAGS = -r8 -O3 -byteswapio" \
        "CFLAGS = -O3" \
        "LDFLAGS = -O3" \
        "CORE = $(CORE)" \
@@ -62,7 +62,7 @@
        "CC = pgcc" \
        "SFC = pgf90" \
        "SCC = pgcc" \
-        "FFLAGS = -i4 -r8 -g -O2" \
+        "FFLAGS = -i4 -r8 -g -O2 -byteswapio" \
        "CFLAGS = -fast" \
        "LDFLAGS = " \
        "CORE = $(CORE)" \
@@ -74,7 +74,7 @@
        "CC = pgcc" \
        "SFC = pgf90" \
        "SCC = pgcc" \
-        "FFLAGS = -r8 -O0 -g -Mbounds -Mchkptr" \
+        "FFLAGS = -r8 -O0 -g -Mbounds -Mchkptr -byteswapio" \
        "CFLAGS = -O0 -g" \
        "LDFLAGS = -O0 -g -Mbounds -Mchkptr" \
        "CORE = $(CORE)" \
@@ -86,7 +86,7 @@
        "CC = gcc" \
        "SFC = ifort" \
        "SCC = gcc" \
-        "FFLAGS = -real-size 64 -O3" \
+        "FFLAGS = -real-size 64 -O3 -convert big_endian" \
        "CFLAGS = -O3 -m64" \
        "LDFLAGS = -O3" \
        "CORE = $(CORE)" \
@@ -98,7 +98,7 @@
        "CC = mpicc" \
        "SFC = gfortran" \
        "SCC = gcc" \
-        "FFLAGS = -O3 -m64 -ffree-line-length-none -fdefault-real-8" \
+        "FFLAGS = -O3 -m64 -ffree-line-length-none -fdefault-real-8 -fconvert=big-endian" \
        "CFLAGS = -O3 -m64" \
        "LDFLAGS = -O3 -m64" \
        "CORE = $(CORE)" \
@@ -110,7 +110,7 @@
        "CC = gcc" \
        "SFC = gfortran" \
        "SCC = gcc" \
-        "FFLAGS = -O3 -m64 -ffree-line-length-none -fdefault-real-8" \
+        "FFLAGS = -O3 -m64 -ffree-line-length-none -fdefault-real-8 -fconvert=big-endian" \
        "CFLAGS = -O3 -m64" \
        "LDFLAGS = -O3 -m64" \
        "CORE = $(CORE)" \
@@ -122,7 +122,7 @@
        "CC = mpicc" \
        "SFC = g95" \
        "SCC = gcc" \
-        "FFLAGS = -O3 -ffree-line-length-huge -r8" \
+        "FFLAGS = -O3 -ffree-line-length-huge -r8 -fendian=big" \
        "CFLAGS = -O3" \
        "LDFLAGS = -O3" \
        "CORE = $(CORE)" \
@@ -134,7 +134,7 @@
        "CC = gcc" \
        "SFC = g95" \
        "SCC = gcc" \
-        "FFLAGS = -O3 -ffree-line-length-huge -r8" \
+        "FFLAGS = -O3 -ffree-line-length-huge -r8 -fendian=big" \
        "CFLAGS = -O3" \
        "LDFLAGS = -O3" \
        "CORE = $(CORE)" \
Modified: trunk/mpas/src/core_hyd_atmos/Registry
===================================================================
--- trunk/mpas/src/core_hyd_atmos/Registry        2010-12-23 18:21:31 UTC (rev 665)
+++ trunk/mpas/src/core_hyd_atmos/Registry        2010-12-28 20:48:48 UTC (rev 666)
@@ -23,6 +23,7 @@
namelist character io config_input_name grid.nc
namelist character io config_output_name output.nc
namelist character io config_restart_name restart.nc
+namelist character io config_decomp_file_prefix graph.info.part.
namelist integer restart config_restart_interval 0
namelist logical restart config_do_restart false
namelist real restart config_restart_time 172800.0
Modified: trunk/mpas/src/core_ocean/Registry
===================================================================
--- trunk/mpas/src/core_ocean/Registry        2010-12-23 18:21:31 UTC (rev 665)
+++ trunk/mpas/src/core_ocean/Registry        2010-12-28 20:48:48 UTC (rev 666)
@@ -7,9 +7,10 @@
namelist integer sw_model config_ntimesteps 7500
namelist integer sw_model config_output_interval 500
namelist integer sw_model config_stats_interval 100
-namelist character io config_input_name grid.nc
-namelist character io config_output_name output.nc
-namelist character io config_restart_name restart.nc
+namelist character io config_input_name grid.nc
+namelist character io config_output_name output.nc
+namelist character io config_restart_name restart.nc
+namelist character io config_decomp_file_prefix graph.info.part.
namelist integer restart config_restart_interval 0
namelist logical restart config_do_restart false
namelist real restart config_restart_time 172800.0
Modified: trunk/mpas/src/core_sw/Registry
===================================================================
--- trunk/mpas/src/core_sw/Registry        2010-12-23 18:21:31 UTC (rev 665)
+++ trunk/mpas/src/core_sw/Registry        2010-12-28 20:48:48 UTC (rev 666)
@@ -16,9 +16,10 @@
namelist logical sw_model config_positive_definite false
namelist logical sw_model config_monotonic false
namelist real sw_model config_apvm_upwinding 0.5
-namelist character io config_input_name grid.nc
-namelist character io config_output_name output.nc
-namelist character io config_restart_name restart.nc
+namelist character io config_input_name grid.nc
+namelist character io config_output_name output.nc
+namelist character io config_restart_name restart.nc
+namelist character io config_decomp_file_prefix graph.info.part.
namelist integer restart config_restart_interval 0
namelist logical restart config_do_restart false
namelist real restart config_restart_time 172800.0
Modified: trunk/mpas/src/framework/Makefile
===================================================================
--- trunk/mpas/src/framework/Makefile        2010-12-23 18:21:31 UTC (rev 665)
+++ trunk/mpas/src/framework/Makefile        2010-12-28 20:48:48 UTC (rev 666)
@@ -31,7 +31,7 @@
module_dmpar.o: module_sort.o streams.o
-module_block_decomp.o: module_grid_types.o module_hash.o
+module_block_decomp.o: module_grid_types.o module_hash.o module_configure.o
module_io_input.o: module_grid_types.o module_dmpar.o module_block_decomp.o module_sort.o module_configure.o $(ZOLTANOBJ)
Modified: trunk/mpas/src/framework/module_block_decomp.F
===================================================================
--- trunk/mpas/src/framework/module_block_decomp.F        2010-12-23 18:21:31 UTC (rev 665)
+++ trunk/mpas/src/framework/module_block_decomp.F        2010-12-28 20:48:48 UTC (rev 666)
@@ -18,6 +18,8 @@
subroutine block_decomp_cells_for_proc(dminfo, partial_global_graph_info, local_cell_list)
+ use configure
+
implicit none
type (dm_info), intent(in) :: dminfo
@@ -41,15 +43,15 @@
iunit = 50 + dminfo % my_proc_id
if (dminfo % nprocs < 10) then
- write(filename,'(a,i1)') 'graph.info.part.', dminfo % nprocs
+ write(filename,'(a,i1)') trim(config_decomp_file_prefix), dminfo % nprocs
else if (dminfo % nprocs < 100) then
- write(filename,'(a,i2)') 'graph.info.part.', dminfo % nprocs
+ write(filename,'(a,i2)') trim(config_decomp_file_prefix), dminfo % nprocs
else if (dminfo % nprocs < 1000) then
- write(filename,'(a,i3)') 'graph.info.part.', dminfo % nprocs
+ write(filename,'(a,i3)') trim(config_decomp_file_prefix), dminfo % nprocs
else if (dminfo % nprocs < 10000) then
- write(filename,'(a,i4)') 'graph.info.part.', dminfo % nprocs
+ write(filename,'(a,i4)') trim(config_decomp_file_prefix), dminfo % nprocs
else if (dminfo % nprocs < 100000) then
- write(filename,'(a,i5)') 'graph.info.part.', dminfo % nprocs
+ write(filename,'(a,i5)') trim(config_decomp_file_prefix), dminfo % nprocs
end if
open(unit=iunit, file=trim(filename), form='formatted', status='old', iostat=istatus)
</font>
</pre>