Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:GlobalArrays/ga into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Bruce J Palmer committed Aug 26, 2024
2 parents 1210eee + b9c55c7 commit 60a567d
Show file tree
Hide file tree
Showing 512 changed files with 831 additions and 166,062 deletions.
44 changes: 28 additions & 16 deletions .github/workflows/github_actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, macos-11]
os: [ubuntu-latest, macos-latest]
experimental: [false]
mpi_impl:
- openmpi
Expand All @@ -28,7 +28,7 @@ jobs:
- armci
- mpi-pr
f77:
- gfortran
- gfortran-12
cc:
- clang
- gcc
Expand All @@ -52,7 +52,7 @@ jobs:
armci_network: sockets
config_opts: --enable-i4
f77: ifort
cc: icc
cc: icx
oneapi: /opt/intel/oneapi
- os: ubuntu-latest
experimental: true
Expand All @@ -61,7 +61,7 @@ jobs:
config_opts: --enable-i4 --without-blas --enable-cxx --disable-f77
f77: gfortran
cc: gcc
- os: macos-11
- os: macos-13
experimental: true
mpi_impl: mpich
armci_network: mpi-pr
Expand All @@ -83,19 +83,19 @@ jobs:
config_opts: "--disable-f77 --enable-cxx"
f77: gfortran-10
cc: gcc-10
- os: macos-12
- os: macos-13
experimental: true
mpi_impl: mpich
armci_network: mpi-ts
config_opts: "--disable-static --enable-shared"
f77: gfortran
f77: gfortran-13
cc: clang
- os: macos-12
- os: macos-13
experimental: true
use_cmake: "Y"
mpi_impl: mpich
armci_network: mpi-pr
f77: gfortran
f77: gfortran-13
cc: clang
- os: ubuntu-20.04
experimental: true
Expand All @@ -119,6 +119,8 @@ jobs:
cc: gcc
oneapi: /opt/intel/oneapi
exclude:
- armci_network: ofi
os: macos-latest
- armci_network: mpi-pr
mpi_impl: openmpi
- armci_network: mpi3
Expand All @@ -138,12 +140,12 @@ jobs:
continue-on-error: ${{ matrix.experimental }}
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 40
- name: Cache install steps
id: ga-cache-install
uses: actions/cache@v3
uses: actions/cache@v4
env:
cache-name: cache-install-steps
with:
Expand All @@ -157,15 +159,24 @@ jobs:
case "${{ matrix.os }}" in
ubuntu*|jessie|stretch|buster)
sudo apt-get update -q -y
if [[ "$F77" == "gfortran-11" ]] || [[ "$CC" == "gcc-11" ]]; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test && sudo apt-get -y install gcc-11 gfortran-11 g++-11; fi
echo F77 is "$F77"
if [[ "$F77" =~ gfortran-[0-9][0-9] ]] || [[ "$CC" =~ gcc-[0-9][0-9] ]]; then
if [[ "$CC" =~ gcc-[0-9][0-9] ]]; then
version=$(echo "$CC" | cut -d - -f 2 )
fi
if [[ "$F77" =~ gfortran-[0-9][0-9] ]]; then
version=$(echo "$F77" | cut -d - -f 2 )
fi
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test && sudo apt-get -y install gcc-$version gfortran-$version g++-$version
fi
sudo apt-get install -q -y gfortran
;;
macos*)
brew update
brew install gcc coreutils automake || true
;;
esac
if [[ "$F77" == "ifort" ]] || [[ "$CC" == "icc" ]] ; then ./travis/install-intel.sh; source ${{ matrix.oneapi }}/setvars.sh --force; fi
if [[ "$F77" == "ifort" ]] || [[ "$CC" == "icc" ]] || [[ "$CC" == "icx" ]]; then ./travis/install-intel.sh; source ${{ matrix.oneapi }}/setvars.sh --force; fi
echo F77 is `which "$F77"`
echo F77 compiler version `"$F77" -v`
- name: before_install
Expand All @@ -174,20 +185,21 @@ jobs:
pwd
ls -lart
mkdir -p $GITHUB_WORKSPACE/apps
if [[ "$F77" == "ifort" ]] || [[ "$CC" == "icc" ]] ; then source ${{ matrix.oneapi }}/setvars.sh --force; fi
sh ./travis/install-autotools.sh $GITHUB_WORKSPACE/apps
AUTO_CC="$CC"
if [[ "$F77" == "ifort" ]] || [[ "$CC" == "icc" ]] || [[ "$CC" == "icx" ]]; then source ${{ matrix.oneapi }}/setvars.sh --force; AUTO_CC=cc; fi
CC="$AUTO_CC" sh ./travis/install-autotools.sh $GITHUB_WORKSPACE/apps
- name: install
run: |
export CI_ROOT=$GITHUB_WORKSPACE/apps
if [[ "$F77" == "ifort" ]] || [[ "$CC" == "icc" ]] ; then source ${{ matrix.oneapi }}/setvars.sh --force; fi
if [[ "$F77" == "ifort" ]] || [[ "$CC" == "icc" ]] || [[ "$CC" == "icx" ]]; then source ${{ matrix.oneapi }}/setvars.sh --force; fi
./travis/install-mpi.sh $CI_ROOT $MPI_IMPL
if [[ "$PORT" == "ofi" ]]; then ./travis/install-libfabric.sh $CI_ROOT; else true; fi
if [[ "$PORT" == "armci" ]]; then ./travis/install-armci-mpi.sh $CI_ROOT; else true; fi
if [[ "$USE_SICM" == "Y" ]]; then ./travis/install-sicm.sh $HOME/no_cache; else true; fi
- name: compile and test global arrays
if: ${{ success() }}
run: |
if [[ "$F77" == "ifort" ]] || [[ "$CC" == "icc" ]] ; then source ${{ matrix.oneapi }}/setvars.sh --force; fi
if [[ "$F77" == "ifort" ]] || [[ "$CC" == "icc" ]] || [[ "$CC" == "icx" ]] ; then source ${{ matrix.oneapi }}/setvars.sh --force; fi
./travis/build-run.sh $GITHUB_WORKSPACE/apps $PORT $MPI_IMPL $USE_CMAKE $F77
- name: after_failure
if: ${{ failure() }}
Expand Down
57 changes: 44 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,15 @@ if(ENABLE_BLAS)
endif()
endif()

if(MSVC AND ENABLE_FORTRAN)
message(FATAL_ERROR "MSVC build needs ENABLE_FORTRAN=OFF")
if(ENABLE_FORTRAN)
if(MSVC)
message(FATAL_ERROR "MSVC build needs ENABLE_FORTRAN=OFF")
endif()

find_program(ga_m4_cmd NAMES gm4 m4)
if(NOT ga_m4_cmd)
message(FATAL_ERROR "m4 command not found. GNU M4 is required.")
endif()
endif()

if(ENABLE_PROFILING)
Expand Down Expand Up @@ -141,7 +148,20 @@ include(${PROJECT_SOURCE_DIR}/cmake/ga-checks.cmake)

if (ENABLE_FORTRAN)
include( FortranCInterface )
FortranCInterface_HEADER(${CMAKE_CURRENT_BINARY_DIR}/f2c_cmake.h MACRO_NAMESPACE F77_FUNC_)
FortranCInterface_HEADER(${CMAKE_CURRENT_BINARY_DIR}/f2c_cmake.ignore MACRO_NAMESPACE F77_FUNC_)
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/f2c_cmake.h
COMMAND ${CMAKE_COMMAND} -D INPUT:PATH="${CMAKE_CURRENT_BINARY_DIR}/f2c_cmake.ignore" -D OUTPUT:PATH="${CMAKE_CURRENT_BINARY_DIR}/f2c_cmake.h" -P ${PROJECT_SOURCE_DIR}/tools/config_fh_from_h.cmake
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/f2c_cmake.ignore
)
add_custom_target(
GenerateF2C_CH ALL
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/f2c_cmake.h
)
set_source_files_properties(
${CMAKE_CURRENT_BINARY_DIR}/f2c_cmake.h
PROPERTIES GENERATED TRUE
)
else()
CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/cmake/f2c_dummy.h.in
${CMAKE_CURRENT_BINARY_DIR}/f2c_cmake.h )
Expand All @@ -155,7 +175,6 @@ endif()
# hardwire various GA configuration parameters. Use convention that parameters
# are defined and set to 0 if not used
set (CYGWIN 0)
set (DECOSF 0)

if (CMAKE_SYSTEM_NAME STREQUAL Linux)
set(LINUX 1)
Expand Down Expand Up @@ -186,10 +205,6 @@ set (USE_MALLOC 0)
if(ENABLE_PROFILING)
set (GA_PROFILING 1)
endif()
if(USE_CRAYSHASTA)
set(__CRAYXE 1)
# list(APPEND GA_EXTRA_LIBS pmi2)
endif()

# hardwire ARMCI configuration options
set (HAVE_ARMCI_GROUP_COMM 1)
Expand Down Expand Up @@ -217,7 +232,7 @@ if (ENABLE_FORTRAN)
set (FORTRAN_I8_FLAG -fdefault-integer-8)
set (FORTRAN_I4_FLAG "")
elseif (CMAKE_Fortran_COMPILER_ID MATCHES "Flang")
message(STATUS "Using Flang compiler settings")
message(STATUS "Using Flang compiler settings for flang, flang-new, armflang")
set (F77_GETARG_DECLS "external GETARG")
set (FORTRAN_I8_FLAG -fdefault-integer-8)
set (FORTRAN_I4_FLAG "")
Expand Down Expand Up @@ -362,6 +377,15 @@ if(ENABLE_BLAS)
#include_directories(${BLAS_INCLUDE_DIRS})
endif()

if(ENABLE_FORTRAN)
set(_CHK_FORTRAN_COMPILERS "GNU" "Intel" "LLVMFlang" "Flang")
list(FIND _CHK_FORTRAN_COMPILERS ${CMAKE_Fortran_COMPILER_ID} index)
if(index GREATER -1)
find_package( StandardFortran )
list(APPEND GA_EXTRA_LIBS ${STANDARDFORTRAN_LIBRARIES})
endif()
endif()

if(ENABLE_PROFILING)
set(ga_profiler $<TARGET_OBJECTS:ga_tools>)
endif()
Expand Down Expand Up @@ -393,6 +417,7 @@ target_include_directories(ga
$<INSTALL_INTERFACE:include>
$<INSTALL_INTERFACE:include/ga>
)

if(ENABLE_BLAS)
target_include_directories(ga
INTERFACE
Expand Down Expand Up @@ -441,6 +466,12 @@ if(ENABLE_TESTS)
add_subdirectory(global/examples)
endif()

foreach (bip ${GA_HEADER_PATHS})
target_include_directories(ga
INTERFACE
$<BUILD_INTERFACE:${bip}>
)
endforeach()

# --------------------------------------
# Global Arrays installation
Expand Down Expand Up @@ -506,7 +537,7 @@ endif()
list(REMOVE_AT CMAKE_MODULE_PATH 0)
list(REMOVE_AT CMAKE_MODULE_PATH 0)

# export(EXPORT globalarrays-targets
# FILE ${CMAKE_CURRENT_BINARY_DIR}/globalarrays-targets.cmake
# NAMESPACE GlobalArrays::)

# Export build tree
export(EXPORT globalarrays-targets
NAMESPACE GlobalArrays::
FILE "${PROJECT_BINARY_DIR}/globalarrays-targets.cmake")
47 changes: 0 additions & 47 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -412,9 +412,6 @@ libga_la_SOURCES += global/src/ga_diag_seq.F
if ENABLE_EISPACK
libga_la_SOURCES += global/src/rsg.F
endif
if CRAY_XT_NETWORKS
libga_la_SOURCES += global/src/ga_dgemmf.F
endif # CRAY_XT_NETWORKS
if ENABLE_PEIGS
libga_la_SOURCES += global/src/ga_diag.F
endif # ENABLE_PEIGS
Expand Down Expand Up @@ -1607,19 +1604,6 @@ endif # MSG_COMMS_MPI

EXTRA_DIST += tcgmsg/tcgmsg-mpi/README

##############################################################################
# armci
# if TCGMSG is coming from ARMCI
if ARMCI_NETWORK_ARMCI
else
if MSG_COMMS_TCGMSG4
AM_CPPFLAGS += -I$(top_srcdir)/armci/tcgmsg
endif
if MSG_COMMS_TCGMSG5
AM_CPPFLAGS += -I$(top_srcdir)/armci/tcgmsg
endif
endif

##############################################################################
# armci
if ARMCI_NETWORK_ARMCI
Expand Down Expand Up @@ -1650,18 +1634,7 @@ else

if ARMCI_NETWORK_ARMCI
else
if ARMCI_NETWORK_PORTALS
AM_CPPFLAGS += -I$(top_srcdir)/armci/src-portals
AM_CPPFLAGS += -I$(top_srcdir)/armci/tcgmsg
else
if ARMCI_NETWORK_GEMINI
AM_CPPFLAGS += -I$(top_srcdir)/armci/src-gemini
AM_CPPFLAGS += -I$(top_srcdir)/armci/tcgmsg
else
AM_CPPFLAGS += -I$(top_srcdir)/armci/src/include
AM_CPPFLAGS += -I$(top_srcdir)/armci/tcgmsg
endif
endif
endif
endif

Expand Down Expand Up @@ -1750,17 +1723,6 @@ CP__v_ = $(CP__v_$(AM_DEFAULT_VERBOSITY))
CP__v_0 = @echo " CP " $@;

.PHONY: pfiles clean-pfiles
if MSG_COMMS_TCGMSG4
pfiles: $(check_PROGRAMS)
for p in $(check_PROGRAMS); do \
echo "`whoami` `hostname` $(NPROCS) `pwd`/$$p /tmp" > $$p.p; \
done
check: pfiles
clean-pfiles:
find . -name '*.p' -exec rm {} \; ;
clean-local: clean-pfiles
MAYBE_PFILES = pfiles
endif # MSG_COMMS_TCGMSG4

##############################################################################
# test suite
Expand Down Expand Up @@ -1805,13 +1767,6 @@ XFAIL_TESTS =
XFAIL_TESTS += $(SERIAL_TESTS_XFAIL)
XFAIL_TESTS += $(PARALLEL_TESTS_XFAIL)

if MSG_COMMS_TCGMSG4
LOG_COMPILER = \
maybe_tcgexec=`if echo "$(SERIAL_TESTS)" | $(GREP) "$$p" > /dev/null; then echo ""; else echo "$(TCGEXEC)"; fi`; eval $$maybe_tcgexec
else
if MSG_COMMS_TCGMSG5
LOG_COMPILER = tst="$$dir$$f -np $(NPROCS)"; eval
else
if CROSS_COMPILING
LOG_COMPILER = \
maybe_mpiexec=`if echo "$(SERIAL_TESTS)" | $(GREP) "$$p" > /dev/null; then echo "$(MPIEXEC)" | $(SED) 's/%NP%/1/'; else echo "$(MPIEXEC)" | $(SED) 's/%NP%/$(NPROCS)/'; fi`; eval $$maybe_mpiexec
Expand All @@ -1825,8 +1780,6 @@ LOG_COMPILER = \
maybe_mpiexec=`if echo "$(SERIAL_TESTS)" | $(GREP) "$$p" > /dev/null; then echo ""; else if echo "$(MPIEXEC)" | $(GREP) "%NP%" > /dev/null; then echo "$(MPIEXEC)" | $(SED) 's/%NP%/$(NPROCS)/'; else echo "$(MPIEXEC)"; fi; fi`; eval $$maybe_mpiexec
endif # COMEX_NETWORK_MPI_PR
endif # CROSS_COMPILING
endif # MSG_COMMS_TCGMSG5
endif # MSG_COMMS_TCGMSG4

.PHONY: check-travis
check-travis: $(all-am) $(check_LTLIBRARIES) $(TRAVIS_TESTS) $(MAYBE_PFILES)
Expand Down
Loading

0 comments on commit 60a567d

Please sign in to comment.