Skip to content

Commit

Permalink
+New config_src directory structure
Browse files Browse the repository at this point in the history
  Created the new config_src directory tree structure, as agreed upon at
https://github.com/NOAA-GFDL/MOM6/discussions/1286, to eventually accomodate the
selection of different infrastructures.  No .F90 files are changed but there are
small changes to ac/configure.ac to accomodate the new structure while also
allowing for the old target to use the old structure.  All answers are bitwise
identical, and all MOM6-examples and TC tests are passing.
  • Loading branch information
Hallberg-NOAA committed Feb 25, 2021
1 parent d8733fe commit 6e49a91
Show file tree
Hide file tree
Showing 38 changed files with 9 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .testing/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,8 @@ SOURCE = \
$(foreach ext,F90 inc c h,$(wildcard $(1)/*/*.$(ext) $(1)/*/*/*.$(ext)))

MOM_SOURCE = $(call SOURCE,../src) \
$(wildcard ../config_src/solo_driver/*.F90) \
$(wildcard ../config_src/infra/FMS1/*.F90) \
$(wildcard ../config_src/drivers/solo_driver/*.F90) \
$(wildcard ../config_src/ext*/*/*.F90)
TARGET_SOURCE = $(call SOURCE,build/target_codebase/src) \
$(wildcard build/target_codebase/config_src/solo_driver/*.F90) \
Expand Down
11 changes: 7 additions & 4 deletions ac/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,20 @@ srcdir=$srcdir/..
# Default to symmetric grid
# NOTE: --enable is more properly used to add a feature, rather than to select
# a compile-time mode, so this is not exactly being used as intended.
MEM_LAYOUT=${srcdir}/config_src/dynamic_symmetric
MEM_LAYOUT=${srcdir}/config_src/memory/dynamic_symmetric
AC_CHECK_FILE($MEM_LAYOUT, [MEM_LAYOUT=$MEM_LAYOUT], [MEM_LAYOUT=${srcdir}/config_src/dynamic_symmetric])
AC_ARG_ENABLE([asymmetric],
AS_HELP_STRING([--enable-asymmetric], [Use the asymmetric grid]))
AS_IF([test "$enable_asymmetric" = yes],
[MEM_LAYOUT=${srcdir}/config_src/dynamic])
[MEM_LAYOUT=${srcdir}/config_src/memory/dynamic_nonsymmetric])

# Default to solo_driver
DRIVER_DIR=${srcdir}/config_src/solo_driver
DRIVER_DIR=${srcdir}/config_src/drivers/solo_driver
AC_CHECK_FILE($DRIVER_DIR, [DRIVER_DIR=$DRIVER_DIR], [DRIVER_DIR=${srcdir}/config_src/solo_driver])
AC_ARG_WITH([driver],
AS_HELP_STRING([--with-driver=coupled_driver|solo_driver], [Select directory for driver source code]))
AS_IF([test "x$with_driver" != "x"],
[DRIVER_DIR=${srcdir}/config_src/${with_driver}])
[DRIVER_DIR=${srcdir}/config_src/drivers/${with_driver}])

# TODO: Rather than point to a pre-configured header file, autoconf could be
# used to configure a header based on a template.
Expand Down Expand Up @@ -216,6 +218,7 @@ AS_IF([test -z "$MKMF"], [
AC_CONFIG_COMMANDS([path_names],
[list_paths -l \
${srcdir}/src \
${srcdir}/config_src/infra/FMS1 \
${srcdir}/config_src/ext* \
${DRIVER_DIR} \
${MEM_LAYOUT}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 6e49a91

Please sign in to comment.