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

Fix parallel make builds #1446

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .github/workflows/github_autotools_gnu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ jobs:
if: ${{ matrix.conf-flag == '--disable-setting-flags' }}
run: ./configure ${DISTCHECK_CONFIGURE_FLAGS} FCFLAGS="-fdefault-real-8 -fdefault-double-8 -fcray-pointer -ffree-line-length-none -I/usr/include $FCFLAGS" || cat config.log
- name: Build the library
run: make distcheck
run: make -j distcheck
if: ${{ matrix.conf-flag != '--with-mpi=no' }}
- name: Build the library (without test suite for serial build)
run: make
run: make -j
if: ${{ matrix.conf-flag == '--with-mpi=no' }}
2 changes: 1 addition & 1 deletion .github/workflows/github_autotools_intel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,6 @@ jobs:
- name: Configure
run: autoreconf -if ./configure.ac && ./configure --with-yaml
- name: Compile
run: make -j || make
run: make -j
- name: Run test suite
run: make check LD_LIBRARY_PATH="/libs/lib:$LD_LIBRARY_PATH" TEST_VERBOSE=1
15 changes: 1 addition & 14 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ SUBDIRS = \
tracer_manager \
sat_vapor_pres \
random_numbers \
. \
global \
libFMS \
test_fms \
${DOCS}
Expand All @@ -78,19 +78,6 @@ include_HEADERS = include/file_version.h include/fms_platform.h
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = FMS.pc

## Build libFMS module
AM_CPPFLAGS = -I${top_srcdir}/include
AM_FCFLAGS = $(FC_MODINC). $(FC_MODOUT)$(MODDIR)

noinst_LTLIBRARIES = libFMS_mod.la
libFMS_mod_la_SOURCES = libFMS.F90

fms.$(FC_MODEXT): .mods/*_mod.$(FC_MODEXT)

nodist_include_HEADERS = .mods/fms.$(FC_MODEXT)

include $(top_srcdir)/mkmods.mk

# Prepare CMake files for installation. This is to help
# packages build using CMake to more easily use the libFMS
# library.
Expand Down
5 changes: 0 additions & 5 deletions astronomy/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@ libastronomy_la_SOURCES = \
include/astronomy_r8.fh \
include/astronomy.inc

astronomy.$(FC_MODEXT): \
include/astronomy_r4.fh \
include/astronomy_r8.fh \
include/astronomy.inc

BUILT_SOURCES = astronomy_mod.$(FC_MODEXT)
nodist_include_HEADERS = astronomy_mod.$(FC_MODEXT)

Expand Down
5 changes: 0 additions & 5 deletions axis_utils/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@ libaxis_utils_la_SOURCES = \
include/axis_utils2_r8.fh \
include/axis_utils2.inc

axis_utils2.$(FC_MODEXT) : \
include/axis_utils2_r4.fh \
include/axis_utils2_r8.fh \
include/axis_utils2.inc

# Mod file depends on its o file, is built and then installed.
nodist_include_HEADERS = axis_utils_mod.$(FC_MODEXT) axis_utils2_mod.$(FC_MODEXT)
BUILT_SOURCES = axis_utils_mod.$(FC_MODEXT) axis_utils2_mod.$(FC_MODEXT)
Expand Down
5 changes: 0 additions & 5 deletions column_diagnostics/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,6 @@ include/column_diagnostics.inc \
include/column_diagnostics_r4.fh \
include/column_diagnostics_r8.fh

column_diagnostics.$(FC_MOD_EXT):\
include/column_diagnostics.inc \
include/column_diagnostics_r4.fh \
include/column_diagnostics_r8.fh

BUILT_SOURCES = column_diagnostics_mod.$(FC_MODEXT)
nodist_include_HEADERS = column_diagnostics_mod.$(FC_MODEXT)

Expand Down
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,7 @@ AC_CONFIG_FILES([
docs/Makefile
parser/Makefile
string_utils/Makefile
global/Makefile
test_fms/test-lib.sh
test_fms/intel_coverage.sh
test_fms/Makefile
Expand Down
1 change: 0 additions & 1 deletion constants/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ libconstants_la_SOURCES = \
geos_constants.fh \
constants.F90

FMSconstants.$(FC_MODEXT): gfdl_constants.fh gfs_constants.fh geos_constants.fh
constants_mod.$(FC_MODEXT): fmsconstants.$(FC_MODEXT)

# Mod files are built and then installed as headers
Expand Down
1 change: 0 additions & 1 deletion constants4/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ libconstants4_la_SOURCES = \
geos_constantsR4.fh \
constantsr4.F90

fmsconstantsr4.$(FC_MODEXT): gfdl_constantsR4.fh gfs_constantsR4.fh geos_constantsR4.fh
constantsr4_mod.$(FC_MODEXT): fmsconstantsr4.$(FC_MODEXT)

# Mod files are built and then installed as headers
Expand Down
5 changes: 0 additions & 5 deletions diag_integral/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,6 @@ libdiag_integral_la_SOURCES = diag_integral.F90\
include/diag_integral_r4.fh\
include/diag_integral_r8.fh

diag_integral_mod.$(FC_MODEXT): include/diag_integral.inc\
include/diag_integral_r4.fh\
include/diag_integral_r8.fh


nodist_include_HEADERS = diag_integral_mod.$(FC_MODEXT)
BUILT_SOURCES = diag_integral_mod.$(FC_MODEXT)

Expand Down
20 changes: 7 additions & 13 deletions diag_manager/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -42,28 +42,22 @@ libdiag_manager_la_SOURCES = \
fms_diag_outfield.F90 \
fms_diag_elem_weight_procs.F90 \
fms_diag_fieldbuff_update.F90 \
fms_diag_bbox.F90 \
fms_diag_bbox.F90 \
include/fms_diag_fieldbuff_update.inc \
include/fms_diag_fieldbuff_update.fh

# Some mods are dependant on other mods in this dir.
diag_data_mod.$(FC_MODEXT): fms_diag_bbox_mod.$(FC_MODEXT)
diag_axis_mod.$(FC_MODEXT): diag_data_mod.$(FC_MODEXT)
diag_output_mod.$(FC_MODEXT): diag_axis_mod.$(FC_MODEXT) diag_data_mod.$(FC_MODEXT)
diag_util_mod.$(FC_MODEXT): diag_data_mod.$(FC_MODEXT) diag_axis_mod.$(FC_MODEXT) diag_output_mod.$(FC_MODEXT) \
diag_grid_mod.$(FC_MODEXT) fms_diag_bbox_mod.$(FC_MODEXT)
diag_table_mod.$(FC_MODEXT): diag_data_mod.$(FC_MODEXT) diag_util_mod.$(FC_MODEXT)
diag_output_mod.$(FC_MODEXT): diag_axis_mod.$(FC_MODEXT)
diag_util_mod.$(FC_MODEXT): diag_data_mod.$(FC_MODEXT) diag_output_mod.$(FC_MODEXT) diag_grid_mod.$(FC_MODEXT)
diag_table_mod.$(FC_MODEXT): diag_util_mod.$(FC_MODEXT)
fms_diag_axis_object_mod.$(FC_MODEXT): diag_data_mod.$(FC_MODEXT) fms_diag_time_utils_mod.$(FC_MODEXT)
fms_diag_time_reduction_mod.$(FC_MODEXT): diag_data_mod.$(FC_MODEXT)
fms_diag_elem_weight_procs_mod.$(FC_MODEXT): diag_data_mod.$(FC_MODEXT)
fms_diag_outfield_mod.$(FC_MODEXT): diag_data_mod.$(FC_MODEXT) fms_diag_elem_weight_procs_mod.$(FC_MODEXT)
fms_diag_fieldbuff_update_mod.$(FC_MODEXT): diag_data_mod.$(FC_MODEXT) diag_util_mod.$(FC_MODEXT) \
fms_diag_outfield_mod.$(FC_MODEXT) fms_diag_elem_weight_procs_mod.$(FC_MODEXT) \
fms_diag_bbox_mod.$(FC_MODEXT)
diag_manager_mod.$(FC_MODEXT): diag_axis_mod.$(FC_MODEXT) diag_data_mod.$(FC_MODEXT) diag_util_mod.$(FC_MODEXT) \
diag_output_mod.$(FC_MODEXT) diag_grid_mod.$(FC_MODEXT) diag_table_mod.$(FC_MODEXT) \
fms_diag_time_reduction_mod.$(FC_MODEXT) fms_diag_outfield_mod.$(FC_MODEXT) \
fms_diag_fieldbuff_update_mod.$(FC_MODEXT)
fms_diag_outfield_mod.$(FC_MODEXT): fms_diag_elem_weight_procs_mod.$(FC_MODEXT)
fms_diag_fieldbuff_update_mod.$(FC_MODEXT): diag_util_mod.$(FC_MODEXT) fms_diag_outfield_mod.$(FC_MODEXT) fms_diag_elem_weight_procs_mod.$(FC_MODEXT) fms_diag_bbox_mod.$(FC_MODEXT)
diag_manager_mod.$(FC_MODEXT): diag_axis_mod.$(FC_MODEXT) diag_table_mod.$(FC_MODEXT) fms_diag_time_reduction_mod.$(FC_MODEXT) fms_diag_fieldbuff_update_mod.$(FC_MODEXT)


# Mod files are built and then installed as headers.
Expand Down
3 changes: 1 addition & 2 deletions drifters/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ libdrifters_la_SOURCES = drifters.F90 \
drifters_set_field.fh \
fms_switches.h

drifters_mod.$(FC_MODEXT): drifters_core_mod.$(FC_MODEXT) drifters_input_mod.$(FC_MODEXT) drifters_io_mod.$(FC_MODEXT) \
drifters_comm_mod.$(FC_MODEXT) cloud_interpolator_mod.$(FC_MODEXT)
drifters_mod.$(FC_MODEXT): drifters_input_mod.$(FC_MODEXT) drifters_io_mod.$(FC_MODEXT) drifters_comm_mod.$(FC_MODEXT) cloud_interpolator_mod.$(FC_MODEXT)
drifters_comm_mod.$(FC_MODEXT): drifters_core_mod.$(FC_MODEXT)

# Mod files are built and then installed as headers.
Expand Down
7 changes: 3 additions & 4 deletions field_manager/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,9 @@ libfield_manager_la_SOURCES = \
include/fm_util_r4.fh \
include/fm_util_r8.fh

field_manager_mod.$(FC_MODEXT): parse.inc fm_yaml_mod.$(FC_MODEXT) \
include/field_manager.inc include/field_manager_r4.fh include/field_manager_r8.fh
fm_util_mod.$(FC_MODEXT): field_manager_mod.$(FC_MODEXT) \
include/fm_util.inc include/fm_util_r4.fh include/fm_util_r8.fh
field_manager_mod.$(FC_MODEXT): fm_yaml_mod.$(FC_MODEXT)

fm_util_mod.$(FC_MODEXT): field_manager_mod.$(FC_MODEXT)

# Mod files are built and then installed as headers.
MODFILES = \
Expand Down
19 changes: 1 addition & 18 deletions fms/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -51,25 +51,8 @@ libfms_la_SOURCES = \
fms_io_unstructured_save_restart.inc \
read_data_3d.inc

fms_mod.$(FC_MODEXT): fms_io_mod.$(FC_MODEXT) \
fms.F90 \
include/fms.inc \
include/fms_r4.fh \
include/fms_r8.fh
fms_mod.$(FC_MODEXT): fms_io_mod.$(FC_MODEXT)

fms_io_mod.$(FC_MODEXT): fms_io_unstructured_field_exist.inc \
fms_io_unstructured_get_file_name.inc \
fms_io_unstructured_register_restart_axis.inc \
fms_io_unstructured_setup_one_field.inc read_data_4d.inc \
fms_io_unstructured_file_unit.inc \
fms_io_unstructured_get_file_unit.inc \
fms_io_unstructured_register_restart_field.inc \
read_data_2d.inc \
write_data.inc \
fms_io_unstructured_get_field_size.inc \
fms_io_unstructured_read.inc \
fms_io_unstructured_save_restart.inc \
read_data_3d.inc

# Mod files are built and then installed as headers.
MODFILES = \
Expand Down
25 changes: 9 additions & 16 deletions fms2_io/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -58,22 +58,15 @@ libfms2_io_la_SOURCES = \
include/unpack_data.inc

# Some mods are dependant on other mods in this dir.
fms2_io_mod.$(FC_MODEXT): fms_io_utils_mod.$(FC_MODEXT) netcdf_io_mod.$(FC_MODEXT) fms_netcdf_domain_io_mod.$(FC_MODEXT) \
fms_netcdf_unstructured_domain_io_mod.$(FC_MODEXT) blackboxio.$(FC_MODEXT)
fms_io_utils_mod.$(FC_MODEXT): include/array_utils.inc include/array_utils_char.inc \
include/get_data_type_string.inc
netcdf_io_mod.$(FC_MODEXT): fms_io_utils_mod.$(FC_MODEXT) include/netcdf_add_restart_variable.inc include/netcdf_read_data.inc \
include/netcdf_write_data.inc include/register_global_attribute.inc \
include/register_variable_attribute.inc include/get_global_attribute.inc \
include/get_variable_attribute.inc include/compressed_write.inc include/compressed_read.inc \
include/gather_data_bc.inc include/scatter_data_bc.inc include/unpack_data.inc
fms_netcdf_domain_io_mod.$(FC_MODEXT): fms_io_utils_mod.$(FC_MODEXT) netcdf_io_mod.$(FC_MODEXT) include/register_domain_restart_variable.inc \
include/domain_read.inc include/domain_write.inc include/compute_global_checksum.inc
fms_netcdf_unstructured_domain_io_mod.$(FC_MODEXT): fms_io_utils_mod.$(FC_MODEXT) netcdf_io_mod.$(FC_MODEXT) \
include/register_unstructured_domain_restart_variable.inc \
include/unstructured_domain_read.inc include/unstructured_domain_write.inc
blackboxio.$(FC_MODEXT): fms_io_utils_mod.$(FC_MODEXT) netcdf_io_mod.$(FC_MODEXT) fms_netcdf_domain_io_mod.$(FC_MODEXT) \
fms_netcdf_unstructured_domain_io_mod.$(FC_MODEXT)
fms2_io_mod.$(FC_MODEXT): netcdf_io_mod.$(FC_MODEXT) fms_netcdf_domain_io_mod.$(FC_MODEXT) fms_netcdf_unstructured_domain_io_mod.$(FC_MODEXT) blackboxio.$(FC_MODEXT)

netcdf_io_mod.$(FC_MODEXT): fms_io_utils_mod.$(FC_MODEXT)

fms_netcdf_domain_io_mod.$(FC_MODEXT): netcdf_io_mod.$(FC_MODEXT)

fms_netcdf_unstructured_domain_io_mod.$(FC_MODEXT): netcdf_io_mod.$(FC_MODEXT)

blackboxio.$(FC_MODEXT): fms_netcdf_domain_io_mod.$(FC_MODEXT) fms_netcdf_unstructured_domain_io_mod.$(FC_MODEXT)

# Mod files are built and then installed as headers.
MODFILES = \
Expand Down
39 changes: 39 additions & 0 deletions global/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#***********************************************************************
#* GNU Lesser General Public License
#*
#* This file is part of the GFDL Flexible Modeling System (FMS).
#*
#* FMS is free software: you can redistribute it and/or modify it under
#* the terms of the GNU Lesser General Public License as published by
#* the Free Software Foundation, either version 3 of the License, or (at
#* your option) any later version.
#*
#* FMS is distributed in the hope that it will be useful, but WITHOUT
#* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
#* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
#* for more details.
#*
#* You should have received a copy of the GNU Lesser General Public
#* License along with FMS. If not, see <http://www.gnu.org/licenses/>.
#***********************************************************************

# This is an automake file for the global directory of the FMS
# package.
#
# This directory only holds the libFMS.F90 file, which gets compiled into
# a module just named 'fms'. It is meant to access all public routines/types/variables from
# the other modules in fms.

# Ryan Mulhall 1/19/24

AM_CPPFLAGS = -I${top_srcdir}/include
AM_FCFLAGS = $(FC_MODINC). $(FC_MODOUT)$(MODDIR)

noinst_LTLIBRARIES = libfms_global.la

libfms_global_la_SOURCES = fms_global.F90

BUILT_SOURCES = fms_global_mod.$(FC_MODEXT)
nodist_include_HEADERS = fms_global_mod.$(FC_MODEXT)

include $(top_srcdir)/mkmods.mk
4 changes: 2 additions & 2 deletions libFMS.F90 → global/fms_global.F90
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@

!> @addtogroup FMS
!> @{
module fms
module fms_global_mod

!> import each FMS module's public routines/functions, interfaces, and variables
!! done explicitly to avoid including any unwanted/depracated routines/modules
Expand Down Expand Up @@ -841,6 +841,6 @@ module fms
character(len=*), parameter, public :: version_FMS = version
private :: version

end module fms
end module fms_global_mod
!> @}
! close documentation grouping
5 changes: 2 additions & 3 deletions horiz_interp/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,8 @@ horiz_interp_bicubic_mod.$(FC_MODEXT): horiz_interp_type_mod.$(FC_MODEXT)
horiz_interp_bilinear_mod.$(FC_MODEXT): horiz_interp_type_mod.$(FC_MODEXT)
horiz_interp_conserve_mod.$(FC_MODEXT): horiz_interp_type_mod.$(FC_MODEXT)
horiz_interp_spherical_mod.$(FC_MODEXT): horiz_interp_type_mod.$(FC_MODEXT)
horiz_interp_mod.$(FC_MODEXT): horiz_interp_bicubic_mod.$(FC_MODEXT) horiz_interp_type_mod.$(FC_MODEXT) \
horiz_interp_bilinear_mod.$(FC_MODEXT) horiz_interp_conserve_mod.$(FC_MODEXT) \
horiz_interp_spherical_mod.$(FC_MODEXT)

horiz_interp_mod.$(FC_MODEXT): horiz_interp_conserve_mod.$(FC_MODEXT) horiz_interp_spherical_mod.$(FC_MODEXT) horiz_interp_bicubic_mod.$(FC_MODEXT) horiz_interp_bilinear_mod.$(FC_MODEXT)

# Mod files are built and then installed as headers.
MODFILES = \
Expand Down
2 changes: 1 addition & 1 deletion libFMS/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ libFMS_la_LIBADD += $(top_builddir)/diag_integral/libdiag_integral.la
libFMS_la_LIBADD += $(top_builddir)/sat_vapor_pres/libsat_vapor_pres.la
libFMS_la_LIBADD += $(top_builddir)/parser/libparser.la
libFMS_la_LIBADD += $(top_builddir)/string_utils/libstring_utils.la
libFMS_la_LIBADD += $(top_builddir)/libFMS_mod.la
libFMS_la_LIBADD += $(top_builddir)/global/libfms_global.la

libFMS_la_SOURCES =
nodist_EXTRA_libFMS_la_SOURCES = dummy.f90
2 changes: 1 addition & 1 deletion mkmods.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Ensure the $(MODDIR) exists

SUFFIXES = .$(FC_MODEXT) _mod.$(FC_MODEXT)
SUFFIXES = *.$(FC_MODEXT) _mod.$(FC_MODEXT)
.F90.$(FC_MODEXT) .F90_mod.$(FC_MODEXT) .f90.$(FC_MODEXT) .f90_mod.$(FC_MODEXT):
test -d $(MODDIR) || mkdir -p $(MODDIR)
$(PPFCCOMPILE) -c $<
Expand Down
11 changes: 1 addition & 10 deletions monin_obukhov/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,7 @@ libmonin_obukhov_la_SOURCES = \
include/monin_obukhov_inter_r8.fh \
include/monin_obukhov_inter.inc

monin_obukhov_inter.$(FC_MODEXT): \
include/monin_obukhov_inter_r4.fh \
include/monin_obukhov_inter_r8.fh \
include/monin_obukhov_inter.inc

monin_obukhov_mod.$(FC_MODEXT): \
monin_obukhov_inter.$(FC_MODEXT) \
include/monin_obukhov_r4.fh \
include/monin_obukhov_r8.fh \
include/monin_obukhov.inc
monin_obukhov_mod.$(FC_MODEXT): monin_obukhov_inter.$(FC_MODEXT)

# Mod files are built and then installed as headers.
MODFILES = \
Expand Down
3 changes: 1 addition & 2 deletions mosaic2/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ include/mosaic2_r4.fh include/mosaic2_r8.fh include/mosaic2.inc \
include/grid2_r4.fh include/grid2_r8.fh include/grid2.inc

# Some mods are dependant on other mods in this dir.
grid2_mod.$(FC_MODEXT): mosaic2_mod.$(FC_MODEXT) include/grid2_r4.fh include/grid2_r8.fh include/grid2.inc
mosaic2_mod.$(FC_MODEXT): include/mosaic2_r4.fh include/mosaic2_r8.fh include/mosaic2.inc
grid2_mod.$(FC_MODEXT): mosaic2_mod.$(FC_MODEXT)

MODFILES = \
mosaic2_mod.$(FC_MODEXT) \
Expand Down
Loading
Loading