[cig-commits] [commit] python-removal: Completed the implementation of the print_all_config_parameters function. All parameters used in the simulation are output to a file whose name begins with letters pid and is followed by the process id of MPI process 0 (0777e0d)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Wed Apr 9 03:00:57 PDT 2014
Repository : ssh://geoshell/citcoms
On branch : python-removal
Link : https://github.com/geodynamics/citcoms/compare/3ebabdc12f5b4e8d7db6edbc2cc578201d4477bf...fb1839e7e93bc56eb542afd64b3db70f2df6a5d8
>---------------------------------------------------------------
commit 0777e0d21e7d0eb4128135c1d957a74d50108ee0
Author: Rajesh Kommu <rajesh.kommu at gmail.com>
Date: Tue Apr 8 14:47:16 2014 -0700
Completed the implementation of the print_all_config_parameters function. All
parameters used in the simulation are output to a file whose name begins with
letters pid and is followed by the process id of MPI process 0
>---------------------------------------------------------------
0777e0d21e7d0eb4128135c1d957a74d50108ee0
Py2C/Py2C.cpp | 1 -
bin/Citcom.c | 3 +
configure.ac | 275 +++++++++++++++++++++++++++
lib/Instructions.c | 443 +++++++++++++++++++++++++++++++++++++++++++-
lib/prototypes.h | 1 +
visual/OpenDXMacro/Makefile | 10 +-
6 files changed, 725 insertions(+), 8 deletions(-)
diff --git a/Py2C/Py2C.cpp b/Py2C/Py2C.cpp
index 0fb10cd..48f7b41 100644
--- a/Py2C/Py2C.cpp
+++ b/Py2C/Py2C.cpp
@@ -104,7 +104,6 @@ void Py2CConverter::initialize_parameters()
parameters["monitor_max_T"] = {"1","CitcomS.solver.tsolver"};
parameters["finetunedt"] = {"0.9","CitcomS.solver.tsolver"};
parameters["fixed_timestep"] = {"0.0","CitcomS.solver.tsolver"};
- parameters["input_diffusivity"] = {"1","CitcomS.solver.tsolver"};
parameters["adv_gamma"] = {"0.5","CitcomS.solver.tsolver"};
parameters["adv_sub_iterations"] = {"2","CitcomS.solver.tsolver"};
parameters["inputdiffusivity"] = {"1","CitcomS.solver.tsolver"};
diff --git a/bin/Citcom.c b/bin/Citcom.c
index 1f1d4a1..7144d98 100644
--- a/bin/Citcom.c
+++ b/bin/Citcom.c
@@ -112,6 +112,9 @@ int main(argc,argv)
fflush(E->fp);
}
+ /* write all config parameters to a file named pidXXXXXXXXX */
+ print_all_config_parameters(E);
+
/* this section sets the initial condition;
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..4193fb5
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,275 @@
+dnl -*- Autoconf -*-
+dnl Process this file with autoconf to produce a configure script.
+dnl
+dnl<LicenseText>
+dnl
+dnl CitcomS.py by Eh Tan, Eun-seo Choi, and Pururav Thoutireddy.
+dnl Copyright (C) 2002-2005, California Institute of Technology.
+dnl
+dnl This program is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 2 of the License, or
+dnl (at your option) any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+dnl GNU General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program; if not, write to the Free Software
+dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+dnl
+dnl</LicenseText>
+
+# $Id$
+
+AC_PREREQ(2.59)
+AC_INIT([CitcomS], [3.2.0], [cig-mc at geodynamics.org], [CitcomS])
+AC_CONFIG_AUX_DIR([./aux-config])
+AC_CONFIG_SRCDIR([bin/Citcom.c])
+AC_CONFIG_HEADER([config.h])
+AC_CONFIG_MACRO_DIR([m4])
+AM_INIT_AUTOMAKE([foreign])
+
+# 'configure' options
+AC_ARG_VAR(PYTHON, [Python interpreter])
+AC_ARG_VAR(PYTHONPATH, [Python module search path])
+AC_ARG_WITH([pyre],
+ [AC_HELP_STRING([--with-pyre],
+ [build Pyre modules @<:@default=no@:>@])],
+ [want_pyre="$withval"],
+ [want_pyre=no])
+AM_CONDITIONAL([COND_PYRE], [test "$want_pyre" = yes])
+AC_ARG_ENABLE([embedding],
+ [AC_HELP_STRING([--enable-embedding],
+ [embed Python with CitcomS in a single executable @<:@default=yes@:>@])],
+ [want_embedding="$enableval"],
+ [want_embedding=yes])
+AM_CONDITIONAL([COND_EMBEDDING], [test "$want_embedding" = yes])
+CIT_ARG_HDF5([auto])
+AC_ARG_WITH([exchanger],
+ [AC_HELP_STRING([--with-exchanger],
+ [use Exchanger @<:@default=auto@:>@])],
+ [want_exchanger="$withval"],
+ [want_exchanger=auto])
+AC_ARG_VAR(HC_HOME, [home path to HC program, used by --with-ggrd])
+AC_ARG_WITH([ggrd],
+ [AC_HELP_STRING([--with-ggrd],
+ [use GGRD file support @<:@default=no@:>@])],
+ [want_ggrd="$withval"],
+ [want_ggrd=no])
+AM_CONDITIONAL([COND_GGRD], [test "$want_ggrd" = yes])
+AC_ARG_WITH([cuda],
+ [AC_HELP_STRING([--with-cuda],
+ [use CUDA @<:@default=no@:>@])],
+ [want_cuda="$withval"],
+ [want_cuda=no])
+AM_CONDITIONAL([COND_CUDA], [test "$want_cuda" = yes])
+
+# Checks for programs.
+AC_PROG_CC([mpicc hcc mpcc mpcc_r mpxlc cmpicc gcc cc cl icc ecc pgcc xlc xlc_r])
+AC_PROG_CXX([mpicxx mpic++ mpiCC hcp mpCC mpxlC mpxlC_r cmpic++ g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlc++_r xlC_r xlC icpc ecpc pgCC])
+
+# Checking a system header here so that CPP is always defined
+AC_CHECK_HEADERS([malloc.h])
+
+if test "$want_pyre" = yes; then
+ # Check for Python.
+ AM_PATH_PYTHON([2.3])
+ CIT_PYTHON_SYSCONFIG
+
+ CIT_CHECK_PYTHON_HEADER
+
+ # Check for Python modules and packages.
+ export want_exchanger
+
+ # merlin is incompatible with python 2.7
+ if test "$PYTHON_VERSION" = 2.7; then
+ echo -e "Pyre support is incompatible with python 2.7."
+ echo -e "Please either disable pyre or use python 2.4-python2.6."
+ AC_MSG_ERROR([Python 2.7 not supported])
+ else
+ cit_builddir=`pwd`
+ AC_MSG_NOTICE([downloading missing Python dependencies])
+ AS_IF([AC_TRY_COMMAND([$PYTHON setup.py install_deps -f $cit_builddir/deps -zmxd $cit_builddir/deps >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD])],
+ [],
+ [AC_MSG_FAILURE([cannot download missing Python dependencies])])
+
+ AC_MSG_NOTICE([building Python dependencies])
+ AS_IF([AC_TRY_COMMAND([$PYTHON setup.py develop -H None -f $cit_builddir/deps -x -d $cit_builddir/python >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD])],
+ [],
+ [AC_MSG_FAILURE([building Python dependencies])])
+
+ CIT_PYTHON_EGG_SETUP
+ fi
+
+
+ CIT_PROG_PYCONFIG
+ AC_SUBST([pkgsysconfdir], [\${sysconfdir}/$PACKAGE])
+ # Compile C as C++.
+ dnl CC="$CXX"
+ dnl CFLAGS="$CXXFLAGS"
+else
+ if test "$want_exchanger" = yes; then
+ AC_MSG_ERROR([Exchanger requires Pyre])
+ fi
+ want_exchanger=no
+fi
+
+# We don't need Fortran.
+AC_PROVIDE([AC_PROG_F77])
+AC_PROG_LIBTOOL
+
+# Checks for libraries.
+AC_SEARCH_LIBS([MPI_Init], [mpi mpich], [], [AC_MSG_ERROR([MPI library not found])])
+
+
+CIT_CHECK_LIB_HDF5
+CIT_CHECK_LIB_HDF5_PARALLEL
+
+if test "$want_exchanger" != no; then
+ save_CC="$CC"
+ save_CFLAGS="$CFLAGS"
+ save_LIBS="$LIBS"
+ CC="$CXX"
+ CFLAGS="$CXXFLAGS"
+ LIBS="$PYTHON_EGG_LDFLAGS $PYTHON_BLDLIBRARY $PYTHON_LIBS $PYTHON_MODLIBS $PYTHON_SYSLIBS $LIBS"
+ AC_CHECK_FUNC([PyExchanger_exchangeBoundedBox], [], [
+ if test "$want_exchanger" = auto; then
+ want_exchanger=no
+ AC_MSG_WARN([Exchanger library not found; disabling Exchanger support])
+ else
+ AC_MSG_ERROR([Exchanger library not found])
+ fi
+ ])
+ CC="$save_CC"
+ CFLAGS="$save_CFLAGS"
+ LIBS="$save_LIBS"
+fi
+
+# Checks for header files.
+AC_CHECK_HEADER([mpi.h], [], [AC_MSG_ERROR([header 'mpi.h' not found])])
+CIT_CHECK_HEADER_HDF5
+
+if test "$want_exchanger" != no; then
+ AC_LANG_PUSH(C++)
+ CIT_HEADER_MPI
+ save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$PYTHON_EGG_CPPFLAGS $CPPFLAGS"
+ AC_CHECK_HEADERS([Exchanger/DIM.h], [], [
+ if test "$want_exchanger" = auto; then
+ want_exchanger=no
+ AC_MSG_WARN([header 'Exchanger/DIM.h' not found; disabling Exchanger support])
+ else
+ AC_MSG_ERROR([header 'Exchanger/DIM.h' not found])
+ fi
+ ])
+ CPPFLAGS="$save_CPPFLAGS"
+ AC_LANG_POP()
+fi
+
+# Checks for typedefs, structures, and compiler characteristics.
+
+# Checks for library functions.
+
+if test "$want_hdf5" != no; then
+ want_hdf5=yes
+fi
+if test "$want_exchanger" != no; then
+ want_exchanger=yes
+fi
+AM_CONDITIONAL([COND_HDF5], [test "$want_hdf5" = yes])
+AM_CONDITIONAL([COND_EXCHANGER], [test "$want_exchanger" = yes])
+AC_SEARCH_LIBS([gzopen], [z], [
+ CPPFLAGS="-DUSE_GZDIR $CPPFLAGS"
+ ], [
+ AC_MSG_WARN([GZip library not found; disabling gzip support; try setting LDFLAGS to enable it])
+])
+
+# Check for ggrd support
+if test "$want_ggrd" != no; then
+ # Checking netcdf.h, which is included by gmt_grd.h -> gmt.h
+ if test -n "$NETCDFHOME"; then
+ CPPFLAGS="$CPPFLAGS -I$NETCDFHOME/include"
+ fi
+ AC_CHECK_HEADER([netcdf.h],[],[AC_MSG_ERROR([header 'netcdf.h' not found, required by ggrd. Try setting environment variable NETCDEHOME.])])
+
+ # Checking gmt.h, which is included by hc.h
+ if test -n "$GMTHOME"; then
+ CPPFLAGS="$CPPFLAGS -I$GMTHOME/include"
+ fi
+ # Avoid including gmt_math.h when checking gmt.h
+ AC_CHECK_HEADER([gmt.h],[],[AC_MSG_ERROR([header 'gmt.h' not found, required by ggrd. Try setting environment variable GMTHOME.])],[
+ #define _GMT_MATH_H
+ ])
+
+ # Checking hc.h
+ if test -n "$HC_HOME"; then
+ CPPFLAGS="$CPPFLAGS -I$HC_HOME -DUSE_GGRD"
+ fi
+ AC_CHECK_HEADER([hc.h], [], [AC_MSG_ERROR([header 'hc.h' not found, required by ggrd. Try setting environment variable HC_HOME.])])
+
+ # Checking NETCDF library
+ if test -n "$NETCDFHOME"; then
+ LDFLAGS="$LDFLAGS -L$NETCDFHOME/lib"
+ fi
+ AC_SEARCH_LIBS([nc_open], [netcdf], [], [AC_MSG_ERROR([NETCDF library not found, required by ggrd. Try setting environment variable NETCDEHOME.])])
+
+ # Checking GMT library
+ if test -n "$GMTHOME"; then
+ LDFLAGS="$LDFLAGS -L$GMTHOME/lib"
+ fi
+ AC_SEARCH_LIBS([GMT_grd_init], [gmt], [], [AC_MSG_ERROR([GMT library not found, required by ggrd. Try setting environment variable GMTHOME.])], [-lm])
+
+
+ # Checking HC ggrd library
+ if test -n "$HC_HOME"; then
+ if test -n "$ARCH"; then
+ LDFLAGS="$LDFLAGS -L$HC_HOME/objects/$ARCH"
+ else
+ LDFLAGS="$LDFLAGS -L$HC_HOME/objects"
+ fi
+ fi
+ AC_SEARCH_LIBS([ggrd_init_master], [ggrd], [], [AC_MSG_ERROR([HC ggrd library not found. Try setting environment variable HC_HOME.])],[-lm])
+fi
+
+AC_SEARCH_LIBS([sqrt], [m])
+
+AC_CONFIG_FILES([Makefile
+ bin/Makefile
+ CitcomS/Makefile
+ etc/Makefile
+ examples/Makefile
+ lib/Makefile
+ module/Makefile
+ module/Exchanger/Makefile
+ tests/Makefile
+ visual/Makefile
+ visual/OpenDXMacro/Makefile])
+
+AC_OUTPUT
+
+# report configuration summary
+echo -e "\n\n"
+echo "================ Configuration Summary ================"
+if test "$want_pyre" = yes; then
+ echo -e "\t PYTHON: " $PYTHON
+ echo -e "\t PYTHONPATH: " $PYTHONPATH
+fi
+echo -e "\t CC: " $CC
+echo -e "\t CFLAGS: " $CFLAGS
+echo -e "\t CPPFLAGS: " $CPPFLAGS
+if test "$want_exchanger" != no; then
+ echo -e "\t CXX: " $CXX
+ echo -e "\t CXXFLAGS: " $CXXFLAGS
+fi
+echo -e "\t LDFLAGS: " $LDFLAGS
+echo -e "\t LIBS: " $LIBS
+echo -e "\t with-pyre: " $want_pyre
+echo -e "\t with-exchanger: " $want_exchanger
+echo -e "\t with-hdf5: " $want_hdf5
+echo -e "\t with-ggrd: " $want_ggrd
+echo
+
+dnl end of configure.ac
diff --git a/lib/Instructions.c b/lib/Instructions.c
index 3278394..180d7cd 100644
--- a/lib/Instructions.c
+++ b/lib/Instructions.c
@@ -1882,10 +1882,12 @@ char* strip(char *input)
return str;
}
-void print_all_config_parame(struct All_variables *E)
+void print_all_config_parameters(struct All_variables *E)
{
char filename[16];
FILE *fp;
+ int i,j,k;
+ float tmp = 0.0f;
if(E->parallel.me == 0) {
sprintf(filename, "pid%09d", E->control.PID);
@@ -1897,8 +1899,445 @@ void print_all_config_parame(struct All_variables *E)
fprintf(fp, "maxstep=%d\n", E->advection.max_timesteps);
fprintf(fp, "maxtotstep=%d\n", E->advection.max_total_timesteps);
fprintf(fp, "cpu_limits_in_seconds=%d\n", E->control.record_all_until);
- fprintf(fp, "solver=%d\n", E->advection.min_timesteps);
+ fprintf(fp, "\n\n");
+
+ /* CitcomS.controller */
+ fprintf(fp, "# CitcomS.controller\n");
+ fprintf(fp, "storage_spacing=%d\n", E->control.record_every);
+ fprintf(fp, "checkpointFrequency=%d\n", E->control.checkpoint_frequency);
+ fprintf(fp, "\n\n");
+
+ /* CitcomS.solver */
+ fprintf(fp, "# CitcomS.solver\n");
+ fprintf(fp, "datadir=%s\n", E->control.data_dir);
+ fprintf(fp, "datafile=%s\n", E->control.data_prefix);
+ fprintf(fp, "datadir_old=%s\n", E->control.data_dir_old);
+ fprintf(fp, "datafile_old=%s\n", E->control.data_prefix_old);
+ fprintf(fp, "rayleigh=%g\n", E->control.Atemp);
+ fprintf(fp, "dissipation_number=%g\n", E->control.disptn_number);
+ if(E->control.inv_gruneisen != 0)
+ tmp = 1.0/E->control.inv_gruneisen;
+ fprintf(fp, "gruneisen=%g\n", tmp);
+ fprintf(fp, "surfaceT=%g\n", E->control.surface_temp);
+ fprintf(fp, "Q0=%g\n", E->control.Q0);
+ fprintf(fp, "stokes_flow_only=%d\n", E->control.stokes);
+ fprintf(fp, "verbose=%d\n", E->control.verbose);
+ fprintf(fp, "see_convergence=%d\n", E->control.print_convergence);
+ fprintf(fp, "\n\n");
+
+ /* CitcomS.solver.mesher */
+ fprintf(fp, "# CitcomS.solver.mesher\n");
+ fprintf(fp, "nproc_surf=%d\n", E->parallel.nprocxy);
+ fprintf(fp, "nprocx=%d\n", E->parallel.nprocx);
+ fprintf(fp, "nprocy=%d\n", E->parallel.nprocy);
+ fprintf(fp, "nprocz=%d\n", E->parallel.nprocz);
+ fprintf(fp, "coor=%d\n", E->control.coor);
+ fprintf(fp, "coor_file=%s\n", E->control.coor_file);
+ fprintf(fp, "coor_refine=");
+ for(i=0; i<3; i++)
+ fprintf(fp, "%g,", E->control.coor_refine[i]);
+ fprintf(fp, "%g\n", E->control.coor_refine[3]);
+ fprintf(fp, "nodex=%d\n", E->mesh.nox);
+ fprintf(fp, "nodey=%d\n", E->mesh.noy);
+ fprintf(fp, "nodez=%d\n", E->mesh.noz);
+ fprintf(fp, "levels=%d\n", E->mesh.levels);
+ fprintf(fp, "mgunitx=%d\n", E->mesh.mgunitx);
+ fprintf(fp, "mgunity=%d\n", E->mesh.mgunity);
+ fprintf(fp, "mgunitz=%d\n", E->mesh.mgunitz);
+ fprintf(fp, "radius_outer=%g\n", E->sphere.ro);
+ fprintf(fp, "radius_inner=%g\n", E->sphere.ri);
+ fprintf(fp, "theta_min=%g\n", E->control.theta_min);
+ fprintf(fp, "theta_max=%g\n", E->control.theta_max);
+ fprintf(fp, "fi_min=%g\n", E->control.fi_min);
+ fprintf(fp, "fi_max=%g\n", E->control.fi_max);
+ fprintf(fp, "r_grid_layers=%d\n", E->control.rlayers);
+ fprintf(fp, "rr=");
+ if(E->control.rlayers > 0)
+ {
+ for(i=0; i<E->control.rlayers-1;i++)
+ fprintf(fp, "%g,", E->control.rrlayer[i]);
+ fprintf(fp, "%g\n", E->control.rrlayer[E->control.rlayers-1]);
+ }
+ else
+ {
+ fprintf(fp, "\n");
+ }
+ fprintf(fp, "nr=");
+ if(E->control.rlayers > 0)
+ {
+ for(i=0; i<E->control.rlayers-1;i++)
+ fprintf(fp, "%d,", E->control.nrlayer[i]);
+ fprintf(fp, "%d\n", E->control.nrlayer[E->control.rlayers-1]);
+ }
+ else
+ {
+ fprintf(fp, "\n");
+ }
+ fprintf(fp, "\n\n");
+
+ fprintf(fp, "# CitcomS.solver.tsolver\n");
+ fprintf(fp, "ADV=%d\n", E->advection.ADVECTION);
+ fprintf(fp, "filter_temp=%d\n", E->advection.filter_temperature);
+ fprintf(fp, "monitor_max_T=%d\n", E->advection.monitor_max_T);
+ fprintf(fp, "finetunedt=%f\n", E->advection.fine_tune_dt);
+ fprintf(fp, "fixed_timestep=%f\n", E->advection.fixed_timestep);
+ fprintf(fp, "adv_gamma=%f\n", E->advection.gamma);
+ fprintf(fp, "adv_sub_iterations=%d\n", E->advection.temp_iterations);
+ fprintf(fp, "inputdiffusivity=%f\n", E->control.inputdiff);
+ fprintf(fp, "\n\n");
+
+ fprintf(fp, "# CitcomS.solver.vsolver\n");
+ fprintf(fp, "Solver=%s\n", E->control.SOLVER_TYPE);
+ fprintf(fp, "node_assemble=%d\n", E->control.NASSEMBLE);
+ fprintf(fp, "precond=%d\n", E->control.precondition);
+ fprintf(fp, "accuracy=%g\n", E->control.accuracy);
+ fprintf(fp, "uzawa=%s\n", E->control.uzawa);
+ fprintf(fp, "compress_iter_maxstep=%d\n", E->control.compress_iter_maxstep);
+ fprintf(fp, "mg_cycle=%d\n", E->control.mg_cycle);
+ fprintf(fp, "down_heavy=%d\n", E->control.down_heavy);
+ fprintf(fp, "up_heavy=%d\n", E->control.up_heavy);
+ fprintf(fp, "vlowstep=%d\n", E->control.v_steps_low);
+ fprintf(fp, "vhighstep=%d\n", E->control.v_steps_high);
+ fprintf(fp, "max_mg_cycles=%d\n", E->control.max_mg_cycles);
+ fprintf(fp, "piterations=%d\n", E->control.p_iterations);
+ fprintf(fp, "aug_lagr=%d\n", E->control.augmented_Lagr);
+ fprintf(fp, "aug_number=%g\n", E->control.augmented);
+ fprintf(fp, "remove_rigid_rotation=%d\n", E->control.remove_rigid_rotation);
+ fprintf(fp, "remove_angular_momentum=%d\n",
+ E->control.remove_angular_momentum);
+ fprintf(fp, "inner_accuracy_scale=%g\n",
+ E->control.inner_accuracy_scale);
+ fprintf(fp, "check_continuity_convergence=%d\n",
+ E->control.check_continuity_convergence);
+ fprintf(fp, "check_pressure_convergence=%d\n",
+ E->control.check_pressure_convergence);
+ fprintf(fp, "inner_remove_rigid_rotation=%d\n",
+ E->control.inner_remove_rigid_rotation);
+ fprintf(fp, "\n\n");
+
+ fprintf(fp, "# CitcomS.solver.bc\n");
+ fprintf(fp, "side_sbcs=%d\n", E->control.side_sbcs);
+ fprintf(fp, "pseudo_free_surf=%d\n", E->control.pseudo_free_surf);
+ fprintf(fp, "topvbc=%d\n", E->mesh.topvbc);
+ fprintf(fp, "topvbxval=%g\n", E->control.VBXtopval);
+ fprintf(fp, "topvbyval=%g\n", E->control.VBYtopval);
+ fprintf(fp, "botvbc=%d\n", E->mesh.botvbc);
+ fprintf(fp, "botvbxval=%g\n", E->control.VBXbotval);
+ fprintf(fp, "botvbyval=%g\n", E->control.VBYbotval);
+ fprintf(fp, "toptbc=%d\n", E->mesh.toptbc);
+ fprintf(fp, "toptbcval=%g\n", E->control.TBCtopval);
+ fprintf(fp, "bottbc=%d\n", E->mesh.bottbc);
+ fprintf(fp, "bottbcval=%g\n", E->control.TBCbotval);
+ fprintf(fp, "temperature_bound_adj=%d\n", E->control.temperature_bound_adj);
+ fprintf(fp, "depth_bound_adj=%g\n", E->control.depth_bound_adj);
+ fprintf(fp, "width_bound_adj=%g\n", E->control.width_bound_adj);
+ fprintf(fp, "\n\n");
+
+ fprintf(fp, "# CitcomS.solver.const\n");
+ fprintf(fp, "radius=%g\n", E->data.radius_km*1000.0);
+ fprintf(fp, "density=%g\n", E->data.density);
+ fprintf(fp, "thermdiff=%g\n", E->data.therm_diff);
+ fprintf(fp, "gravacc=%g\n", E->data.grav_acc);
+ fprintf(fp, "thermexp=%g\n", E->data.therm_exp);
+ fprintf(fp, "refvisc=%g\n", E->data.ref_viscosity);
+ fprintf(fp, "cp=%g\n", E->data.Cp);
+ fprintf(fp, "density_above=%g\n", E->data.density_above);
+ fprintf(fp, "density_below=%g\n", E->data.density_below);
+ fprintf(fp, "z_lith=%g\n", E->viscosity.zlith);
+ fprintf(fp, "z_410=%g\n", E->viscosity.z410);
+ fprintf(fp, "z_lmantle=%g\n", E->viscosity.zlm);
+ fprintf(fp, "z_cmb=%g\n", E->viscosity.zcmb);
+ fprintf(fp, "\n\n");
+
+ fprintf(fp, "# CitcomS.solver.ic\n");
+ fprintf(fp, "restart=%d\n", E->control.restart);
+ fprintf(fp, "post_p=%d\n", E->control.post_p);
+ fprintf(fp, "solution_cycles_init=%d\n", E->monitor.solution_cycles_init);
+ fprintf(fp, "zero_elapsed_time=%d\n", E->control.zero_elapsed_time);
+ fprintf(fp, "tic_method=%d\n", E->convection.tic_method);
+ fprintf(fp, "num_perturbations=%d\n", E->convection.number_of_perturbations);
+ if(E->convection.number_of_perturbations > 1)
+ {
+ fprintf(fp, "perturbl=");
+ for(i=0; i<E->convection.number_of_perturbations-1; i++)
+ fprintf(fp, "%d,", E->convection.perturb_ll[i]);
+ fprintf(fp, "%d\n", E->convection.perturb_ll[E->convection.number_of_perturbations-1]);
+ fprintf(fp, "perturbm=");
+ for(i=0; i<E->convection.number_of_perturbations-1; i++)
+ fprintf(fp, "%d,", E->convection.perturb_mm[i]);
+ fprintf(fp, "%d\n", E->convection.perturb_mm[E->convection.number_of_perturbations-1]);
+ fprintf(fp, "perturblayer=");
+ for(i=0; i<E->convection.number_of_perturbations-1; i++)
+ fprintf(fp, "%d,", E->convection.load_depth[i]);
+ fprintf(fp, "%d\n", E->convection.load_depth[E->convection.number_of_perturbations-1]);
+ fprintf(fp, "perturbmag=");
+ for(i=0; i<E->convection.number_of_perturbations-1; i++)
+ fprintf(fp, "%g,", E->convection.perturb_mag[i]);
+ fprintf(fp, "%g\n", E->convection.perturb_mag[E->convection.number_of_perturbations-1]);
+ }
+ else
+ {
+ fprintf(fp, "perturbl=%d\n", E->convection.perturb_ll[0]);
+ fprintf(fp, "perturbm=%d\n", E->convection.perturb_mm[0]);
+ fprintf(fp, "perturblayer=%d\n", E->convection.load_depth[0]);
+ fprintf(fp, "perturbmag=%g\n", E->convection.perturb_mag[0]);
+ }
+ fprintf(fp, "half_space_age=%g\n", E->convection.half_space_age);
+ fprintf(fp, "mantle_temp=%g\n", E->control.mantle_temp);
+ fprintf(fp, "blob_center=[%g,%g,%g]\n",
+ E->convection.blob_center[0],
+ E->convection.blob_center[1],
+ E->convection.blob_center[2]);
+ fprintf(fp, "blob_radius=%g\n", E->convection.blob_radius);
+ fprintf(fp, "blob_dT=%g\n", E->convection.blob_dT);
+ fprintf(fp, "blob_bc_persist=%d\n", E->convection.blob_bc_persist);
+ fprintf(fp, "\n\n");
+
+ fprintf(fp, "# CitcomS.solver.output\n");
+ fprintf(fp, "output_format=%s\n", E->output.format);
+ fprintf(fp, "output_optional=%s\n", E->output.optional);
+ fprintf(fp, "output_ll_max=%d\n", E->output.llmax);
+ fprintf(fp, "self_gravitation=%d\n", E->control.self_gravitation);
+ fprintf(fp, "use_cbf_topo=%d\n", E->control.use_cbf_topo);
+ fprintf(fp, "cb_block_size=%d\n", E->output.cb_block_size);
+ fprintf(fp, "cb_buffer_size=%d\n", E->output.cb_buffer_size);
+ fprintf(fp, "sieve_buf_size=%d\n", E->output.sieve_buf_size);
+ fprintf(fp, "output_alignment=%d\n", E->output.alignment);
+ fprintf(fp, "output_alignment_threshold=%d\n", E->output.alignment_threshold);
+ fprintf(fp, "cache_mdc_nelmts=%d\n", E->output.cache_mdc_nelmts);
+ fprintf(fp, "cache_rdcc_nelmts=%d\n", E->output.cache_rdcc_nelmts);
+ fprintf(fp, "cache_rdcc_nbytes=%d\n", E->output.cache_rdcc_nbytes);
+ fprintf(fp, "write_q_files=%d\n", E->output.write_q_files);
+ fprintf(fp, "vtk_format=%s\n", E->output.vtk_format);
+ fprintf(fp, "gzdir_vtkio=%d\n", E->output.gzdir.vtk_io);
+ fprintf(fp, "gzdir_rnr=%d\n", E->output.gzdir.rnr);
+ fprintf(fp, "\n\n");
+
+ fprintf(fp, "# CitcomS.solver.param\n");
+ fprintf(fp, "reference_state=%d\n", E->refstate.choice);
+ fprintf(fp, "refstate_file=%s\n", E->refstate.filename);
+ fprintf(fp, "mineral_physics_model=%d\n", E->control.mineral_physics_model);
+ fprintf(fp, "file_vbcs=%d\n", E->control.vbcs_file);
+ fprintf(fp, "vel_bound_file=%s\n", E->control.velocity_boundary_file);
+ fprintf(fp, "mat_control=%d\n", E->control.mat_control);
+ fprintf(fp, "mat_file=%s\n", E->control.mat_file);
+ fprintf(fp, "lith_age=%d\n", E->control.lith_age);
+ fprintf(fp, "lith_age_file=%s\n", E->control.lith_age_file);
+ fprintf(fp, "lith_age_time=%d\n", E->control.lith_age_time);
+ fprintf(fp, "lith_age_depth=%g\n", E->control.lith_age_depth);
+ fprintf(fp, "start_age=%g\n", E->control.start_age);
+ fprintf(fp, "reset_startage=%d\n", E->control.reset_startage);
+ fprintf(fp, "file_tbcs=%d\n", E->control.tbcs_file);
+ fprintf(fp, "temp_bound_file=%s\n", E->control.temperature_boundary_file);
+ fprintf(fp, "\n\n");
+
+ fprintf(fp, "# CitcomS.solver.phase\n");
+ fprintf(fp, "Ra_410=%g\n", E->control.Ra_410);
+ fprintf(fp, "clapeyron410=%g\n", E->control.clapeyron410);
+ fprintf(fp, "transT410=%g\n", E->control.transT410);
+ tmp = 0.0f;
+ if(E->control.inv_width410 != 0.0)
+ tmp = 1.0/E->control.inv_width410;
+ fprintf(fp, "width410=%g\n", tmp);
+ fprintf(fp, "Ra_670=%g\n", E->control.Ra_670);
+ fprintf(fp, "clapeyron670=%g\n", E->control.clapeyron670);
+ fprintf(fp, "transT670=%g\n", E->control.transT670);
+ tmp = 0.0f;
+ if(E->control.inv_width670 != 0.0)
+ tmp = 1.0/E->control.inv_width670;
+ fprintf(fp, "width670=%g\n", tmp);
+ fprintf(fp, "Ra_cmb=%g\n", E->control.Ra_cmb);
+ fprintf(fp, "clapeyroncmb=%g\n", E->control.clapeyroncmb);
+ fprintf(fp, "transTcmb=%g\n", E->control.transTcmb);
+ tmp = 0.0f;
+ if(E->control.inv_widthcmb != 0.0)
+ tmp = 1.0/E->control.inv_widthcmb;
+ fprintf(fp, "widthcmb=%g\n", tmp);
+ fprintf(fp, "\n\n");
+
+ fprintf(fp, "# CitcomS.solver.tracer\n");
+ fprintf(fp, "tracer=%d\n", E->control.tracer);
+ fprintf(fp, "tracer_ic_method=%d\n", E->trace.ic_method);
+ fprintf(fp, "tracers_per_element=%d\n", E->trace.itperel);
+ fprintf(fp, "tracer_file=%s\n", E->trace.tracer_file);
+ fprintf(fp, "tracer_flavors=%d\n", E->trace.nflavors);
+ fprintf(fp, "ic_method_for_flavors=%d\n", E->trace.ic_method_for_flavors);
+ fprintf(fp, "z_interface=");
+ if(E->trace.nflavors > 0)
+ {
+ for(i=0; i<E->trace.nflavors-1;i++)
+ fprintf(fp, "%g,", E->trace.z_interface[i]);
+ fprintf(fp, "%g\n", E->trace.z_interface[E->trace.nflavors-1]);
+ }
+ else
+ {
+ fprintf(fp, "\n");
+ }
+ fprintf(fp, "itracer_warnings=%d\n", E->trace.itracer_warnings);
+ fprintf(fp, "regular_grid_deltheta=%g\n", E->trace.deltheta[0]);
+ fprintf(fp, "regular_grid_delphi=%g\n", E->trace.delphi[0]);
+ fprintf(fp, "chemical_buoyancy=%d\n", E->composition.ichemical_buoyancy);
+ fprintf(fp, "buoy_type=%d\n", E->composition.ibuoy_type);
+ fprintf(fp, "buoyancy_ratio=");
+ if(E->composition.ncomp > 0)
+ {
+ for(i=0; i<E->composition.ncomp-1;i++)
+ fprintf(fp, "%g,", E->composition.buoyancy_ratio[i]);
+ fprintf(fp, "%g\n", E->composition.buoyancy_ratio[E->composition.ncomp-1]);
+ }
+ else
+ {
+ fprintf(fp, "\n");
+ }
+ fprintf(fp, "tracer_enriched=%d\n", E->control.tracer_enriched);
+ fprintf(fp, "Q0_enriched=%g\n", E->control.Q0ER);
+ fprintf(fp, "\n\n");
+
+ fprintf(fp, "# CitcomS.solver.visc\n");
+ fprintf(fp, "Viscosity=%s\n", E->viscosity.STRUCTURE);
+ fprintf(fp, "visc_smooth_method=%d\n", E->viscosity.smooth_cycles);
+ fprintf(fp, "VISC_UPDATE=%d\n", E->viscosity.update_allowed);
+ fprintf(fp, "num_mat=%d\n", E->viscosity.num_mat);
+ fprintf(fp, "visc0=");
+ if(E->viscosity.num_mat > 0)
+ {
+ for(i=0; i<E->viscosity.num_mat-1;i++)
+ fprintf(fp, "%g,", E->viscosity.N0[i]);
+ fprintf(fp, "%g\n", E->viscosity.N0[E->viscosity.num_mat-1]);
+ }
+ else
+ {
+ fprintf(fp, "\n");
+ }
+ fprintf(fp, "TDEPV=%d\n", E->viscosity.TDEPV);
+ fprintf(fp, "rheol=%d\n", E->viscosity.RHEOL);
+ fprintf(fp, "viscE=");
+ if(E->viscosity.num_mat > 0)
+ {
+ for(i=0; i<E->viscosity.num_mat-1;i++)
+ fprintf(fp, "%g,", E->viscosity.E[i]);
+ fprintf(fp, "%g\n", E->viscosity.E[E->viscosity.num_mat-1]);
+ }
+ else
+ {
+ fprintf(fp, "\n");
+ }
+ fprintf(fp, "viscT=");
+ if(E->viscosity.num_mat > 0)
+ {
+ for(i=0; i<E->viscosity.num_mat-1;i++)
+ fprintf(fp, "%g,", E->viscosity.T[i]);
+ fprintf(fp, "%g\n", E->viscosity.T[E->viscosity.num_mat-1]);
+ }
+ else
+ {
+ fprintf(fp, "\n");
+ }
+ fprintf(fp, "viscZ=");
+ if(E->viscosity.num_mat > 0)
+ {
+ for(i=0; i<E->viscosity.num_mat-1;i++)
+ fprintf(fp, "%g,", E->viscosity.Z[i]);
+ fprintf(fp, "%g\n", E->viscosity.Z[E->viscosity.num_mat-1]);
+ }
+ else
+ {
+ fprintf(fp, "\n");
+ }
+ fprintf(fp, "SDEPV=%d\n", E->viscosity.SDEPV);
+ fprintf(fp, "sdepv_expt=");
+ if(E->viscosity.num_mat > 0)
+ {
+ for(i=0; i<E->viscosity.num_mat-1;i++)
+ fprintf(fp, "%g,", (E->viscosity.SDEPV == 0 ?
+ 1.0 : E->viscosity.sdepv_expt[i]));
+ fprintf(fp, "%g\n", (E->viscosity.SDEPV == 0 ?
+ 1.0 : E->viscosity.sdepv_expt[E->viscosity.num_mat-1]));
+ }
+ else
+ {
+ fprintf(fp, "\n");
+ }
+ fprintf(fp, "sdepv_misfit=%g\n", E->viscosity.sdepv_misfit);
+ fprintf(fp, "PDEPV=%d\n", E->viscosity.PDEPV);
+ fprintf(fp, "pdepv_a=");
+ if(E->viscosity.num_mat > 0)
+ {
+ for(i=0; i<E->viscosity.num_mat-1;i++)
+ fprintf(fp, "%g,", (E->viscosity.PDEPV == 0 ?
+ 1e20 : E->viscosity.pdepv_a[i]));
+ fprintf(fp, "%g\n", (E->viscosity.PDEPV == 0 ?
+ 1e20 : E->viscosity.pdepv_a[E->viscosity.num_mat-1]));
+ }
+ else
+ {
+ fprintf(fp, "\n");
+ }
+ fprintf(fp, "pdepv_b=");
+ if(E->viscosity.num_mat > 0)
+ {
+ for(i=0; i<E->viscosity.num_mat-1;i++)
+ fprintf(fp, "%g,", (E->viscosity.PDEPV == 0 ?
+ 0.0 : E->viscosity.pdepv_b[i]));
+ fprintf(fp, "%g\n", (E->viscosity.PDEPV == 0 ?
+ 0.0 : E->viscosity.pdepv_b[E->viscosity.num_mat-1]));
+ }
+ else
+ {
+ fprintf(fp, "\n");
+ }
+ fprintf(fp, "pdepv_y=");
+ if(E->viscosity.num_mat > 0)
+ {
+ for(i=0; i<E->viscosity.num_mat-1;i++)
+ fprintf(fp, "%g,", (E->viscosity.PDEPV == 0 ?
+ 1e20 : E->viscosity.pdepv_y[i]));
+ fprintf(fp, "%g\n", (E->viscosity.PDEPV == 0 ?
+ 1e20 : E->viscosity.pdepv_y[E->viscosity.num_mat-1]));
+ }
+ else
+ {
+ fprintf(fp, "\n");
+ }
+ fprintf(fp, "pdepv_eff=%d\n", E->viscosity.pdepv_eff);
+ fprintf(fp, "pdepv_offset=%g\n", E->viscosity.pdepv_offset);
+ fprintf(fp, "CDEPV=%d\n", E->viscosity.CDEPV);
+ fprintf(fp, "cdepv_ff=");
+ if(E->trace.nflavors > 0)
+ {
+ for(i=0; i<E->trace.nflavors-1;i++)
+ fprintf(fp, "%g,", E->viscosity.cdepv_ff[i]);
+ fprintf(fp, "%g\n", E->viscosity.cdepv_ff[E->trace.nflavors-1]);
+ }
+ else
+ {
+ fprintf(fp, "\n");
+ }
+ fprintf(fp, "low_visc_channel=%d\n", E->viscosity.channel);
+ fprintf(fp, "low_visc_wedge=%d\n", E->viscosity.wedge);
+ fprintf(fp, "lv_min_radius=%g\n", E->viscosity.lv_min_radius);
+ fprintf(fp, "lv_max_radius=%g\n", E->viscosity.lv_max_radius);
+ fprintf(fp, "lv_channel_thickness=%g\n", E->viscosity.lv_channel_thickness);
+ fprintf(fp, "lv_reduction=%g\n", E->viscosity.lv_reduction);
+ fprintf(fp, "VMIN=%d\n", E->viscosity.MIN);
+ fprintf(fp, "visc_min=%g\n", E->viscosity.min_value);
+ fprintf(fp, "VMAX=%d\n", E->viscosity.MAX);
+ fprintf(fp, "visc_max=%g\n", E->viscosity.max_value);
+ fprintf(fp, "z_layer=");
+ if(E->viscosity.num_mat > 0)
+ {
+ for(i=0; i<E->viscosity.num_mat-1;i++)
+ fprintf(fp, "%g,", E->viscosity.zbase_layer[i]);
+ fprintf(fp, "%g\n", E->viscosity.zbase_layer[E->viscosity.num_mat-1]);
+ }
+ else
+ {
+ fprintf(fp, "\n");
+ }
+ fprintf(fp, "visc_layer_control=%d\n", E->viscosity.layer_control);
+ fprintf(fp, "visc_layer_file=%s\n", E->viscosity.layer_file);
/* close the file after we are done writing all parameters */
+ fclose(fp);
}
}
diff --git a/lib/prototypes.h b/lib/prototypes.h
index edb3518..96e9cf2 100644
--- a/lib/prototypes.h
+++ b/lib/prototypes.h
@@ -224,6 +224,7 @@ void convection_initial_temperature(struct All_variables *);
void print_all_config_params(struct All_variables *);
void initial_mesh_solver_setup(struct All_variables *);
void read_instructions(struct All_variables *, char *);
+void print_all_config_parameters(struct All_variables *E);
void initial_setup(struct All_variables *);
void initialize_material(struct All_variables *);
void initial_conditions(struct All_variables *);
diff --git a/visual/OpenDXMacro/Makefile b/visual/OpenDXMacro/Makefile
index 9fcf260..7e72e2b 100644
--- a/visual/OpenDXMacro/Makefile
+++ b/visual/OpenDXMacro/Makefile
@@ -155,9 +155,9 @@ AUTOMAKE = ${SHELL} /home/rakuko/CitcomS-GitHub-python_removal/aux-config/missin
AWK = gawk
CC = mpicc
CCDEPMODE = depmode=gcc3
-CFLAGS = -DH5_USE_16_API
+CFLAGS = -g -O2 -DH5_USE_16_API
CPP = mpicc -E
-CPPFLAGS = -DUSE_GZDIR
+CPPFLAGS = -DUSE_GZDIR -I/home/rakuko/hdf5-1.8.12/include
CXX = mpicxx
CXXCPP = mpicxx -E
CXXDEPMODE = depmode=gcc3
@@ -182,7 +182,7 @@ INSTALL_PROGRAM = ${INSTALL}
INSTALL_SCRIPT = ${INSTALL}
INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
LD = /usr/bin/ld -m elf_x86_64
-LDFLAGS =
+LDFLAGS = -L/home/rakuko/hdf5-1.8.12/lib
LIBOBJS =
LIBS = -lm -lz -lhdf5
LIBTOOL = $(SHELL) $(top_builddir)/libtool
@@ -206,10 +206,10 @@ PACKAGE_TARNAME = CitcomS
PACKAGE_URL =
PACKAGE_VERSION = 3.2.0
PATH_SEPARATOR = :
-PHDF5_HOME =
+PHDF5_HOME = /home/rakuko/hdf5-1.8.12
PYCONFIG =
PYTHON =
-PYTHONPATH = /home/rakuko/91code/lib/python2.7/site-packages
+PYTHONPATH = /home/rakuko/vtk-6.0.0/lib/python2.7/site-packages:/home/rakuko/91code/lib/python2.7/site-packages
PYTHON_BLDLIBRARY =
PYTHON_EGG_CFLAGS =
PYTHON_EGG_CPPFLAGS =
More information about the CIG-COMMITS
mailing list