Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nowarn #18

Closed
wants to merge 141 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
141 commits
Select commit Hold shift + click to select a range
3bcfbbe
Merge pull request #134 from jiandewang/feature/update-to-main-20240508
jiandewang May 13, 2024
b32aea7
Add end of run restart functionality to MOM6 (#133)
dpsarmie May 21, 2024
bfe3e4f
fix line length too long issue in mom_cap.F90
jiandewang May 22, 2024
83fb3f0
Merge pull request #1630 from jiandewang/DEV-EMC-endofrun-restart-can…
jiandewang May 22, 2024
7384dba
Autoconf: Detect FMS IO implementation
marshallward May 23, 2024
c7d3268
.testing: Target build uses its own Makefile
marshallward May 24, 2024
8ecb260
CI: Fix FMS_COMMIT, remove FRAMEWORK
marshallward May 28, 2024
59e3a8f
Merge branch 'main' into dev/gfdl
marshallward May 29, 2024
f21ec03
*Fix ALE_remap_scalar call with h_in_Z_units
Hallberg-NOAA May 24, 2024
705a384
Add diag send complete calls to MOM
Apr 1, 2024
7305528
Add diag_manager_set_time_end calls to the solo drivers
May 14, 2024
d90ff6b
(*)Refactor and document soliton_initialization
Hallberg-NOAA Apr 19, 2024
3c87d98
(*)Correct rescaling of KPP pseudo-salt flux
Hallberg-NOAA May 11, 2024
506d186
+Eliminate fluxes%KPP_salt_flux
Hallberg-NOAA May 11, 2024
c121215
Fix TEOS10 argument descriptions
Hallberg-NOAA May 24, 2024
836e696
+Add convert_MLD_to_ML_thickness
Hallberg-NOAA Apr 23, 2024
2035af3
+*Use thickness in ideal_age_tracer_column_physics
Hallberg-NOAA Apr 23, 2024
912c568
+Pass h_MLD to mixedlayer_restrat
Hallberg-NOAA Apr 23, 2024
c300208
+*Convert MLD to ML_thickness in diabatic
Hallberg-NOAA Apr 24, 2024
d3cb7ee
+*Use visc%h_ML in tracer diffusion routines
Hallberg-NOAA Apr 24, 2024
d66adff
+*Pass visc%h_ML to call_tracer_column_fns
Hallberg-NOAA Apr 25, 2024
70bfe8f
Spatially variable fields for MLE%Bodner (#617)
kshedstrom Jun 2, 2024
b610226
Flux through static ice-shelf to icebergs/new diagnostics (#622)
alex-huth Jun 2, 2024
d8e714e
+(*)Refactor Idealize_Hurricane
Hallberg-NOAA Apr 5, 2024
9059671
Add rescaling parameter to kappa shear (#643)
theresa-cordero Jun 3, 2024
f0badc6
Prestore axes_data in set_up_ALE_sponge_field
yichengt900 May 29, 2024
08a6106
+Add ROBUST_STOKES_PGF and LA_MISALIGNMENT_BUG
Hallberg-NOAA May 29, 2024
e58b95f
Ice-shelf dynamics updates
alex-huth Jan 18, 2024
7ccea2a
Add units to the descriptions of 79 variables
Hallberg-NOAA Apr 28, 2024
b389a89
+(*)Fix sign of neutral_slope_x diag with no EOS
Hallberg-NOAA May 15, 2024
d6500bc
+Add DETERMINE_TEMP_CONVERGENCE_BUG parameter
Hallberg-NOAA May 27, 2024
9ab5f34
(*)Fix Kd_interface diag in newer diabatic_ALE
Hallberg-NOAA May 16, 2024
270ba59
+(*)Fix rotation of coupler_type variables
Hallberg-NOAA May 17, 2024
b56a640
Deallocate eta_av_bc in MOM_end()
herrwang0 May 6, 2024
8521222
Fix warning message indices in MOM_barotropic
herrwang0 May 16, 2024
a296080
Normalize wt_[uv] in MOM_barotropic
herrwang0 May 16, 2024
66e8891
Use dt for vertvisc_remnant() in predictor
herrwang0 May 16, 2024
337ee73
Fix a typo in USE_CONT_THICKNESS description
herrwang0 May 17, 2024
1d2911f
Remove visc_rem from h_[uv] in continuity solver
herrwang0 May 22, 2024
09774d4
Use Adcroft_reciprocal for Iwt_[uv]_tot
herrwang0 Jun 3, 2024
215b960
Refactor PressureForce_FV before ice shelf fixes
Hallberg-NOAA May 12, 2024
0578393
Remove diag_send_complete from disable_averaging
marshallward Jun 8, 2024
31afce0
(*)Avoid diagnostic seg fault in a 10km deep ocean
Hallberg-NOAA May 16, 2024
36dda7e
+Add BACKSCATTER_UNDERBOUND
Hallberg-NOAA May 29, 2024
b4ae2b7
Disable nonrepro FMAs in convex BBL solver
marshallward Jun 17, 2024
f798796
Correct the computation of FrictWork in MOM_hor_visc
Wendazhang33 Jun 20, 2024
9351353
CI: parse_perf.py bugfix
marshallward Jun 3, 2024
10f4312
Cleaned up MOM_remapping to reduce compiler warnings
adcroft Mar 12, 2024
b4e3c64
Add timings_tests/time_MOM_remapping
adcroft Mar 22, 2024
a8105af
Added drivers/unit_tests/test_MOM_remapping.F90
adcroft Mar 26, 2024
622651b
Re-factored remapping_unit_tests()
adcroft Mar 27, 2024
b262955
Refactor/split remap_via_sub_cells() adding intersect_src_tgt_grids()
adcroft Mar 12, 2024
11c50db
Refactor/split remap_via_sub_cells() adding remap_src_to_sub_grid()
adcroft Mar 12, 2024
99363e4
Removed debugging from remap_via_sub_cells() in MOM_remapping.F90
adcroft Apr 2, 2024
40e6d6d
Last refactor of remap_via_sub_cells() adding remap_sub_to_tgt_grid()
adcroft Apr 11, 2024
88d9eb7
Fix remapping of last layer for mismatched ocean depths
adcroft May 22, 2024
7cea6dd
Replace kind=8 with iso_fortran_env kinds
marshallward Jun 4, 2024
ac2b642
Re-initialize fields within KPP
marshallward Jul 2, 2024
3fac1c5
Allow incorrect PPM:H3 tracer advection stencil
marshallward Jul 3, 2024
f596c81
+(*)Fix problems with generic_tracer_min_max
Hallberg-NOAA Apr 30, 2024
ac9d6a4
Autoconf: Disable LDFLAGS for C testing (#674)
marshallward Jul 9, 2024
659d19b
(*)Fix bug in rotate_ALE_sponge for fixed sponges
Hallberg-NOAA Jun 6, 2024
f8f127c
+Renamed myStats scale argument to unscale
Hallberg-NOAA Jun 7, 2024
c4a72df
+Add a better variant of add_LOTW_BBL_diffusivity
Hallberg-NOAA Jun 9, 2024
e9f59c2
+Add optional unscale arguments to checksums
Hallberg-NOAA Jun 5, 2024
2f2b790
+Add optional unscale arguments to MOM_write_field
Hallberg-NOAA Jun 6, 2024
c5e5e30
Better error messages in interp_for_nondim_pos
Hallberg-NOAA May 29, 2024
b4c91e3
Correct 10 do-loop index cases
Hallberg-NOAA Jul 6, 2024
12af900
Use unscale arguments in 384 checksum calls
Hallberg-NOAA Jun 5, 2024
2c1a9d3
+Add and use query_debugging_checks
Hallberg-NOAA Jul 12, 2024
00f7d23
(*)+Restore USE_WRIGHT_2ND_DERIV_BUG functionality
Hallberg-NOAA Jul 14, 2024
40f4721
*Possibly initialize h_ML from MLD in restart file
Hallberg-NOAA Jul 19, 2024
ee686c8
Improve MOM_surface_chksum
Hallberg-NOAA Jul 18, 2024
85c72b8
Inline harmonic analysis
c2xu Jun 12, 2024
caae653
Inline harmonic analysis
c2xu Jul 23, 2024
0440ed4
Perform unit conversion for internal heat only when it is applicable
yichengt900 Jul 19, 2024
a8d43f7
Adding Bodner reference
kshedstrom Jul 23, 2024
d76926c
Failing attempt to link to mle docs.
kshedstrom Jul 23, 2024
780d931
Two more references
kshedstrom Jul 23, 2024
ec40a7c
Working on documentation links
kshedstrom Jul 24, 2024
0e17b73
Added Young reference
kshedstrom Jul 24, 2024
369d716
Fix line length in comment
kshedstrom Jul 24, 2024
86b4c85
Delete duplicate entry
kshedstrom Jul 24, 2024
fb40a4a
Another duplicate bib entry
kshedstrom Jul 24, 2024
4fa86fd
Another duplicate ref
kshedstrom Jul 25, 2024
d93f8bf
Clean out another duplicate ref.
kshedstrom Jul 25, 2024
078ec30
Fix the Accad ref.
kshedstrom Jul 25, 2024
da3ec99
still cleaning the docs
kshedstrom Jul 25, 2024
b7fee4d
Fix case
kshedstrom Jul 26, 2024
4f1ecf4
Cleaning up tides section
kshedstrom Jul 26, 2024
1b39d07
*+Fix non-Boussinesq MASS_WEIGHT_IN_PGF bug
Hallberg-NOAA Jul 23, 2024
aacb909
Merge pull request #1631 from NOAA-GFDL/gfdl-to-main-2024-05-31
marshallward Jul 29, 2024
6628dbf
(*)Parenthesize squares of wind stresses for FMAs
Hallberg-NOAA Mar 1, 2024
f0e61f3
(*)Parenthesize continuity_PPM curv_3 expressions
Hallberg-NOAA Feb 29, 2024
4f710ef
(*)Add parentheses for oblique OBCs with FMAs
Hallberg-NOAA Mar 1, 2024
9172cd5
(*)Add parentheses for density_integrals with FMAs
Hallberg-NOAA Mar 1, 2024
24091cc
(*)Add parentheses to 4 EOS int_density routines
Hallberg-NOAA Mar 1, 2024
8066a3d
(*)Simplify density integral parentheses
Hallberg-NOAA Mar 4, 2024
99fd957
(*)Parenthesize PressureForce_Montgomery for FMAs
Hallberg-NOAA Mar 1, 2024
307a4e2
(*)Parenthesize calc_isoneutral_slopes for FMAs
Hallberg-NOAA Mar 1, 2024
ce559ce
(*)Parenthesize MOM_calc_varT for FMAs
Hallberg-NOAA Mar 1, 2024
c344a11
(*)Parenthesize tracer_hordiff for FMAs
Hallberg-NOAA Mar 1, 2024
b2beab2
(*)Parenthesize iceberg_forces for FMAs
Hallberg-NOAA Mar 1, 2024
5398e6f
(*)Parenthesize CoriolisStokes and LA_Stk for FMAs
Hallberg-NOAA Mar 1, 2024
56d053a
+(*)Add and use G%Coriolis2Bu
Hallberg-NOAA Mar 1, 2024
49419f7
(*)Parenthesize thickness_diffuse for FMAs
Hallberg-NOAA Mar 1, 2024
03dc6f9
(*)Parenthesize Zanna_Bolton for FMAs
Hallberg-NOAA Mar 1, 2024
654cd4a
(*)Parenthesize MOM_internal_tides for FMAs
Hallberg-NOAA Mar 1, 2024
ebf02a9
(*)Parenthesize find_uv_at_h for FMAs
Hallberg-NOAA Mar 1, 2024
c0bef18
(*)Parenthesize set_viscous_ML for FMAs
Hallberg-NOAA Mar 1, 2024
0b50a15
(*)Rearrange calc_kappa_shear_vertex for FMAs
Hallberg-NOAA Mar 1, 2024
f0c52dd
(*)Parenthesize MOM_set_diffusivity for FMAs
Hallberg-NOAA Mar 1, 2024
64b851c
(*)Parenthesize CorAdCalc for FMAs
Hallberg-NOAA Mar 1, 2024
46e8b66
(*)Parenthesize MOM_barotropic for FMAs
Hallberg-NOAA Mar 1, 2024
6216fa1
(*)Parenthesize MOM_lateral_mixing_coeffs for FMAs
Hallberg-NOAA Mar 2, 2024
ffef92f
(*)Parenthesize MOM_hor_visc for FMAs
Hallberg-NOAA Apr 18, 2024
fc2af28
(*)Parenthesize initialization squares for FMAs
Hallberg-NOAA Mar 3, 2024
44f1130
(*)Parenthesize parameterization squares for FMAs
Hallberg-NOAA Mar 3, 2024
182223c
(*)Parenthesize diagnostics for FMAs
Hallberg-NOAA Apr 30, 2024
e810ac5
(*)Parenthesize tracer_advect PPM edge values
Hallberg-NOAA May 5, 2024
c3349ab
Merge branch 'main' into main-to-gfdl_2024-05-31
adcroft Jul 30, 2024
90749f3
Fix logic for reading parameter in MOM_tracer_advect.F90
adcroft Jul 31, 2024
ffa766b
(*)More parentheses in density_integrals for FMAs
Hallberg-NOAA Jul 31, 2024
87a0c61
Removes remap_via_sub_cells(), after copying code into remapping_core…
adcroft Jul 25, 2024
0344a76
Add gustless Tau to fluxes extracted from IOB by FMS cap.
Aug 1, 2024
fd82861
(*)Add parentheses in end_value_h4 for FMAs
Hallberg-NOAA Aug 2, 2024
da59eb0
Adds new pre-defined coordinate WOA09INT
adcroft Jul 25, 2024
fee3281
Adds new pre-defined coordinate WOA23INT
adcroft Jul 25, 2024
e30a6e7
Fix bugs in setting GxSpV_u and GxSpV_v in MOM_isopycnal_slopes (#701)
Wendazhang33 Aug 2, 2024
906d96a
Add option to use non-surface density in MLD_003
Aug 2, 2024
f1ba822
Move MLD Diagnostics out of MOM_diabatic_aux.F90
Aug 2, 2024
22c9cbc
+Move array_global_min_max to MOM_spatial_means
Hallberg-NOAA Jul 10, 2024
9b45087
+Add runtime parameter WRITE_TRACER_MIN_MAX
Hallberg-NOAA Jul 10, 2024
a78aa57
* Fix for spatially varying Bodner fields.
kshedstrom Aug 16, 2024
42c1a32
Fix USE_CONT_THICKNESS bug
awallcraft Jul 29, 2024
2024f6f
Directional linear wave drag (#703)
c2xu Aug 21, 2024
d234bce
Restore computation of vorticity in MOM_hor_visc.F90
Pperezhogin Aug 19, 2024
ce58a32
Merge pull request #1634 from Hallberg-NOAA/FMA_rotational_symmetry_main
Hallberg-NOAA Aug 24, 2024
a6dd0fd
Makedep output cleanup and PEP8 fixes
marshallward Aug 6, 2024
1eccd28
Merge branch 'main' into dev/gfdl
Hallberg-NOAA Sep 4, 2024
23ab873
Dummy code to suppress errors in posix.F90
marshallward Sep 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/macos-regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ jobs:
CC: gcc
FC: gfortran
FMS_COMMIT: 2019.01.03
FRAMEWORK: fms1

defaults:
run:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/macos-stencil.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ jobs:
CC: gcc
FC: gfortran
FMS_COMMIT: 2019.01.03
FRAMEWORK: fms1

defaults:
run:
Expand Down
73 changes: 20 additions & 53 deletions .testing/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#
# General test configuration:
# MPIRUN MPI job launcher (mpirun, srun, etc)
# FRAMEWORK Model framework (fms1 or fms2)
# DO_REPRO_TESTS Enable production ("repro") testing equivalence
# DO_REGRESSION_TESTS Enable regression tests (usually dev/gfdl)
# DO_COVERAGE Enable code coverage and generate .gcov reports
Expand Down Expand Up @@ -74,8 +73,11 @@ AC_SRCDIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))../ac
# User-defined configuration
-include config.mk

# Set the infra framework
FRAMEWORK ?= fms2
# Set the FMS library
FMS_COMMIT ?= 2023.03
FMS_URL ?= https://github.com/NOAA-GFDL/FMS.git
export FMS_COMMIT
export FMS_URL

# Set the MPI launcher here
# TODO: This needs more automated configuration
Expand Down Expand Up @@ -133,9 +135,6 @@ TIME ?= time
WORKSPACE ?= .

# Set directories for build/ and work/
#BUILD ?= $(WORKSPACE)build
#DEPS ?= $(BUILD)/deps
#WORK ?= $(WORKSPACE)work
BUILD ?= $(WORKSPACE)/build
DEPS ?= $(BUILD)/deps
WORK ?= $(WORKSPACE)/work
Expand Down Expand Up @@ -207,34 +206,6 @@ else
endif


# List of source files to link this Makefile's dependencies to model Makefiles
# Assumes a depth of two, and the following extensions: F90 inc c h
# (1): Root directory
# NOTE: extensions could be a second variable
SOURCE = \
$(foreach ext,F90 inc c h,$(wildcard $(1)/*/*.$(ext) $(1)/*/*/*.$(ext)))

MOM_SOURCE = \
$(call SOURCE,../src) \
$(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/drivers/solo_driver/*.F90) \
$(wildcard $(BUILD)target_codebase/config_src/ext*/*.F90)

ifeq ($(FRAMEWORK), fms1)
MOM_SOURCE += $(wildcard ../config_src/infra/FMS1/*.F90)
TARGET_SOURCE += $(wildcard $(BUILD)/target_codebase/config_src/infra/FMS1/*.F90)
else
MOM_SOURCE +=$(wildcard ../config_src/infra/FMS2/*.F90)
TARGET_SOURCE += $(wildcard $(BUILD)/target_codebase/config_src/infra/FMS2/*.F90)
endif

FMS_SOURCE = $(call SOURCE,$(DEPS)/fms/src)


## Rules

.PHONY: all build.regressions build.prof
Expand Down Expand Up @@ -286,7 +257,6 @@ $(BUILD)/unit/Makefile: MOM_ENV += $(COV_FCFLAGS) $(COV_LDFLAGS)
$(BUILD)/timing/Makefile: MOM_ENV += $(OPT_FCFLAGS) $(MOM_LDFLAGS)

# Configure script flags
MOM_ACFLAGS := --with-framework=$(FRAMEWORK)
$(BUILD)/openmp/Makefile: MOM_ACFLAGS += --enable-openmp
$(BUILD)/coupled/Makefile: MOM_ACFLAGS += --with-driver=FMS_cap
$(BUILD)/nuopc/Makefile: MOM_ACFLAGS += --with-driver=nuopc_cap
Expand All @@ -295,14 +265,26 @@ $(BUILD)/timing/Makefile: MOM_ACFLAGS += --with-driver=timing_tests


# Build executables
.NOTPARALLEL:$(foreach e,$(UNIT_EXECS),$(BUILD)/unit/$(e))
$(BUILD)/unit/test_%: $(BUILD)/unit/Makefile FORCE
cd $(@D) && $(TIME) $(MAKE) $(@F) -j
$(BUILD)/unit/Makefile: $(foreach e,$(UNIT_EXECS),../config_src/drivers/unit_tests/$(e).F90)

.NOTPARALLEL:$(foreach e,$(TIMING_EXECS),$(BUILD)/timing/$(e))
$(BUILD)/timing/time_%: $(BUILD)/timing/Makefile FORCE
cd $(@D) && $(TIME) $(MAKE) $(@F) -j
$(BUILD)/timing/Makefile: $(foreach e,$(TIMING_EXECS),../config_src/drivers/timing_tests/$(e).F90)

$(BUILD)/%/MOM6: $(BUILD)/%/Makefile FORCE
cd $(@D) && $(TIME) $(MAKE) $(@F) -j

# Target codebase should use its own build system
$(BUILD)/target/MOM6: $(BUILD)/target FORCE | $(TARGET_CODEBASE)
$(MAKE) -C $(TARGET_CODEBASE)/.testing build/symmetric/MOM6

$(BUILD)/target: | $(TARGET_CODEBASE)
ln -s $(abspath $(TARGET_CODEBASE))/.testing/build/symmetric $@

FORCE:


Expand Down Expand Up @@ -334,27 +316,12 @@ $(BUILD)/%/configure.ac: ../ac/configure.ac | $(BUILD)/%/
$(BUILD)/%/m4/: ../ac/m4/ | $(BUILD)/%/
cp -r ../ac/m4 $(@D)

ALL_EXECS = symmetric asymmetric repro openmp target opt opt_target coupled \
nuopc cov unit timing
ALL_EXECS = symmetric asymmetric repro openmp opt opt_target coupled nuopc \
cov unit timing
$(foreach b,$(ALL_EXECS),$(BUILD)/$(b)/):
mkdir -p $@

# Fetch the regression target codebase

$(BUILD)/target/config.status: $(BUILD)/target/configure $(DEPS)/lib/libFMS.a
cd $(@D) && $(MOM_ENV) ./configure -n \
--srcdir=$(abspath $(BUILD))/target_codebase/ac $(MOM_ACFLAGS) \
|| (cat config.log && false)

$(BUILD)/target/Makefile.in: | $(TARGET_CODEBASE) $(BUILD)/target/
cp $(TARGET_CODEBASE)/ac/Makefile.in $(@D)

$(BUILD)/target/configure.ac: | $(TARGET_CODEBASE) $(BUILD)/target/
cp $(TARGET_CODEBASE)/ac/configure.ac $(@D)

$(BUILD)/target/m4/: | $(TARGET_CODEBASE) $(BUILD)/target/
cp -r $(TARGET_CODEBASE)/ac/m4 $(@D)

$(TARGET_CODEBASE):
git clone --recursive $(MOM_TARGET_URL) $@
cd $@ && git checkout --recurse-submodules $(MOM_TARGET_BRANCH)
Expand Down Expand Up @@ -684,7 +651,7 @@ $(WORK)/%/restart/ocean.stats: $(BUILD)/symmetric/MOM6 | preproc
# Not a true rule; only call this after `make test` to summarize test results.
.PHONY: test.summary
test.summary:
@./tools/report_test_results.sh $(WORK)/results
./tools/report_test_results.sh $(WORK)/results


#---
Expand Down
8 changes: 5 additions & 3 deletions .testing/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,11 @@ Several of the following may require configuration for particular systems.
Name of the MPI launcher. Often this is ``mpirun`` or ``mpiexec`` but may
all need to run through a scheduler, e.g. ``srun`` if using Slurm.

``FRAMEWORK`` (*default:* ``fms1``)
Select either the legacy FMS framework (``fms1``) or an FMS2 I/O compatible
version (``fms2``).
``FMS_COMMIT`` (*default:* ``2023.03``)
Set the FMS version, either by tag or commit (as defined in ``FMS_URL``).

``FMS_URL`` (*default*: ``https://github.com/NOAA-GFDL/FMS.git``)
Set the URL of the FMS repository.

``DO_REPRO_TESTS`` (*default:* *none*)
Set to ``true`` to test the REPRO build and confirm equivalence of DEBUG and
Expand Down
2 changes: 1 addition & 1 deletion .testing/tools/parse_perf.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def parse_perf_report(perf_data_path):

if tok == '>':
bracks -= 1
if tok == '(':
if tok == ')':
parens -= 1

# Strip any whitespace tokens
Expand Down
25 changes: 10 additions & 15 deletions ac/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -79,22 +79,10 @@ AS_IF([test "x$with_driver" != "x"],
# used to configure a header based on a template.
#AC_CONFIG_HEADERS(["$MEM_LAYOUT/MOM_memory.h"])

# Select the model framework (default: FMS1)
# NOTE: We can phase this out after the FMS1 I/O has been removed from FMS and
# replace with a detection test. For now, it is a user-defined switch.
MODEL_FRAMEWORK=${srcdir}/config_src/infra/FMS2
AC_ARG_WITH([framework],
AS_HELP_STRING([--with-framework=fms1|fms2], [Select the model framework]))
AS_CASE(["$with_framework"],
[fms1], [MODEL_FRAMEWORK=${srcdir}/config_src/infra/FMS1],
[fms2], [MODEL_FRAMEWORK=${srcdir}/config_src/infra/FMS2],
[MODEL_FRAMEWORK=${srcdir}/config_src/infra/FMS2]
)


# Explicitly assume free-form Fortran
AC_LANG(Fortran)
AC_FC_SRCEXT(f90)
AC_LANG([Fortran])
AC_FC_SRCEXT([f90])


# Determine MPI compiler wrappers
Expand Down Expand Up @@ -220,7 +208,6 @@ AX_FC_CHECK_LIB([FMS], [fms_init], [fms_mod],
]
)


# Verify that FMS is at least 2019.01.02
# NOTE: 2019.01.02 introduced two changes:
# - diag_axis_init supports an optional domain_position argument
Expand All @@ -236,6 +223,14 @@ AC_COMPILE_IFELSE(
]
)

# Determine the FMS IO implementation.
AX_FC_CHECK_MODULE([fms2_io_mod], [
MODEL_FRAMEWORK=${srcdir}/config_src/infra/FMS2
],[
MODEL_FRAMEWORK=${srcdir}/config_src/infra/FMS1
])


# Python interpreter test

# Declare the Python interpreter variable
Expand Down
16 changes: 14 additions & 2 deletions ac/deps/configure.fms.ac
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,16 @@ AC_INIT(
AC_CONFIG_SRCDIR([fms/fms.F90])
AC_CONFIG_MACRO_DIR([m4])


# C configuration

# Autoconf assumes that LDFLAGS can be passed to CFLAGS, even though this is
# not valid in some compilers. This can cause basic CC tests to fail.
# Since we do not link with CC, we can safely disable LDFLAGS for AC_PROG_CC.
FC_LDFLAGS="$LDFLAGS"
LDFLAGS=""

# C compiler verification
AC_PROG_CC
AX_MPI
CC=$MPICC
Expand Down Expand Up @@ -55,10 +64,13 @@ AC_CHECK_FUNCS([gettid], [], [
# FMS 2019.01.03 uses __APPLE__ to disable Linux CPU affinity calls.
AC_CHECK_FUNCS([sched_getaffinity], [], [AC_DEFINE([__APPLE__])])

# Restore LDFLAGS
LDFLAGS="$FC_LDFLAGS"


# Standard Fortran configuration
AC_LANG(Fortran)
AC_FC_SRCEXT(f90)
AC_LANG([Fortran])
AC_FC_SRCEXT([f90])
AC_PROG_FC


Expand Down
Loading
Loading