Skip to content

Commit

Permalink
Merge pull request #244 from ExtremeFLOW/release/0.2.1
Browse files Browse the repository at this point in the history
NEKO v0.2.1
  • Loading branch information
njansson authored Oct 25, 2021
2 parents 22ca3af + 7a1d3f9 commit 933c019
Show file tree
Hide file tree
Showing 50 changed files with 2,346 additions and 1,275 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Linting
# Controls when the action will run.
on:
pull_request:
branches: [develop,release/*]
branches: [develop,release/*,master]
workflow_dispatch:

jobs:
Expand All @@ -19,9 +19,9 @@ jobs:
- name: Setup env.
#if: steps.cache-flinter.outputs.cache-hit != 'true'
run: |
sudo apt-get update && sudo apt-get install python3-tk
sudo apt-get update && sudo apt-get install python-dev python3-tk
pip install flinter
pip install anybadge
# pip install anybadge
- name: Checkout
uses: actions/checkout@v2
with:
Expand All @@ -30,16 +30,16 @@ jobs:
run: |
flint score src/ -d 5 -r flinter_rc.yml | tee flint.txt
score=$(awk '$1==0{print $3}' flint.txt)
if (( $(echo "$score < 7.32" |bc -l) )) ; then
if (( $(echo "$score < 7.91" |bc -l) )) ; then
exit 1
fi
anybadge -l flint -o --file=flint.svg -v $score 2=red 4=orange 8=yellow 10=green
- name: Archive linter badge
uses: actions/upload-artifact@v2
with:
name: flint-badge
path: flint.svg
retention-days: 5
# anybadge -l flint -o --file=flint.svg -v $score 2=red 4=orange 8=yellow 10=green
# - name: Archive linter badge
# uses: actions/upload-artifact@v2
# with:
# name: flint-badge
# path: flint.svg
# retention-days: 5
- name: Archive linter report
uses: actions/upload-artifact@v2
with:
Expand Down
31 changes: 25 additions & 6 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
AC_INIT([neko],[0.2.0])
AC_INIT([neko],[0.2.1])
AM_INIT_AUTOMAKE([foreign subdir-objects])
AM_MAINTAINER_MODE
AC_CONFIG_MACRO_DIR([m4])
Expand Down Expand Up @@ -44,6 +44,8 @@ if test "x${have_mpi}" != xno; then
else
AC_MSG_ERROR([Can't find a suitable MPI compiler])
fi
AX_MPIF08
AX_MPI_DTYPE

AC_FC_PP_SRCEXT([F90])
AX_COMPILER_VENDOR
Expand All @@ -67,17 +69,34 @@ AM_CONDITIONAL([ENABLE_MAKEDEPF90], [test -n "$MAKEDEPF90"])
AC_CHECK_PROGS([FLINT], [flint])
AM_CONDITIONAL([ENABLE_FLINT], [test -n "$FLINT"])

# Checks for various platforms
AX_CRAY
AX_HPE_CRAY
AX_SX

# Checks for pFUnit
AX_PFUNIT

# Check for blas and lapack
AX_LAPACK
if test "x${ax_lapack_ok}" != xno; then
LIBS="$LAPACK_LIBS $BLAS_LIBS $LIBS"
else
AS_IF([test "x${is_cray}" = xyes || test "x${is_hpe_cray}" = xyes],
AX_CRAY_LIBSCI
if test "x${have_cray_libsci}" = xyes; then
have_blas_lapack="yes"
else
have_blas_lapack="no"
fi, have_blas_lapack="no")

if test "x${have_blas_lapack}" != xyes; then
AX_LAPACK
if test "x${ax_lapack_ok}" != xno; then
LIBS="$LAPACK_LIBS $BLAS_LIBS $LIBS"
have_blas_lapack=yes
else
have_blas_lapack=no
fi
fi

if test "x${have_blas_lapack}" != xyes; then
AC_MSG_ERROR([Can't find a suitable BLAS/LAPACK library])
fi

Expand Down Expand Up @@ -129,7 +148,7 @@ AM_CONDITIONAL([ENABLE_PARMETIS], [test "x$found_domain_decomp" = xyes])
AC_CONFIG_FILES([Makefile\
src/Makefile\
tests/Makefile\
src/comm/comm.f90\
src/comm/comm.F90\
src/config/neko_config.f90\
src/config/num_types.f90\
makeneko\
Expand Down
1 change: 1 addition & 0 deletions examples/poisson/ax_poisson.f90
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
module ax_poisson
use ax_product
use mxm_wrapper
implicit none

type, public, extends(ax_t) :: ax_poisson_t
Expand Down
15 changes: 15 additions & 0 deletions m4/ax_cray.m4
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,21 @@ AC_DEFUN([AX_CRAY],[
AC_LANG_POP([C])
AC_SUBST(is_cray)])

AC_DEFUN([AX_HPE_CRAY],[
AC_MSG_CHECKING([for a HPE Cray system])
AC_LANG_PUSH([C])
AC_EGREP_CPP(yes,
[#if defined(__CRAYXT_COMPUTE_LINUX_TARGET) && (!defined(__CRAYXT) && !defined(__CRAYXE) && !defined(__CRAYXC))
yes
#endif
],
[AC_MSG_RESULT([yes])
is_hpe_cray="yes"],
[is_hpe_cray="no"
AC_MSG_RESULT([no])])
AC_LANG_POP([C])
AC_SUBST(is_hpe_cray)])

AC_DEFUN([AX_CRAY_PETSC],[
AC_MSG_CHECKING([Cray PETSc])
if test "${CRAY_PETSC_VERSION}"; then
Expand Down
68 changes: 68 additions & 0 deletions m4/ax_metis.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
#
# ----------------------------------------------------------------------------
# "THE BEER-WARE LICENSE" (Revision 42):
# <njansson@kth.se> wrote this file. As long as you retain this notice you
# can do whatever you want with this stuff. If we meet some day, and you think
# this stuff is worth it, you can buy me a beer in return Niclas Jansson
# ----------------------------------------------------------------------------
#

AC_DEFUN([AX_METIS],[
AC_ARG_WITH([metis],
AS_HELP_STRING([--with-metis=DIR],
[Directory for metis]),
[
if test -d "$withval"; then
ac_metis_path="$withval";
METIS_LDFLAGS="-L$ac_metis_path/lib"
METIS_CPPFLAGS="-I$ac_metis_path/include"
fi
],)
AC_ARG_WITH([metis-libdir],
AS_HELP_STRING([--with-metis-libdir=LIBDIR],
[Directory for metis library]),
[
if test -d "$withval"; then
ac_metis_libdir="$withval"
fi
],)
if test -d "$ac_metis_libdir"; then
METIS_LDFLAGS="-L$ac_metis_libdir"
fi
if test -d "$ac_metis_path"; then
CPPFLAGS_SAVED="$CPPFLAGS"
LDFLAGS_SAVED="$LDFLAGS"
CPPFLAGS="$METIS_CPPFLAGS $CPPFLAGS"
LDFLAGS="$METIS_LDFLAGS $LDFLAGS"
export CPPFLAGS
export LDFLAGS
fi
AC_LANG(C)
AC_CHECK_HEADER([metis.h],[have_metis_h=yes],[have_metis_h=no])
if test x"${have_metis_h}" = xno; then
if test -d "$ac_metis_path"; then
CPPFLAGS="$CPPFLAGS_SAVED"
fi
fi
AC_LANG(Fortran)
AC_CHECK_LIB(metis, METIS_PartGraphKway,
[have_metis=yes;METIS_LIBS="-lmetis"],
[have_metis=no],[-lmetis])
AC_SUBST(METIS_LIBS)
if test x"${have_metis}" = xyes; then
AC_DEFINE(HAVE_METIS,1,[Define if you have the Metis library.])
else
if test -d "$ac_metis_path"; then
LDFLAGS="$LDFLAGS_SAVED"
fi
fi
])



34 changes: 34 additions & 0 deletions m4/ax_mpi_dtype.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#
# ----------------------------------------------------------------------------
# "THE BEER-WARE LICENSE" (Revision 42):
# <njansson@kth.se> wrote this file. As long as you retain
# this notice you can do whatever you want with this stuff. If we meet
# some day, and you think this stuff is worth it, you can buy me a
# beer in return Niclas Jansson
# ----------------------------------------------------------------------------
#
AC_DEFUN([AX_MPI_DTYPE], [
AC_REQUIRE([AC_PROG_FC])
AC_LANG_PUSH([Fortran])
AC_MSG_CHECKING([if MPI datatypes can be parameters])
AC_COMPILE_IFELSE([
program conftest
use mpi_f08
type(MPI_Datatype), parameter :: MPI_DTYPE = MPI_REAL
end program conftest],
[ax_mpi_const_dtype=yes], [ax_mpi_const_dtype=no])
AC_LANG_POP([Fortran])
if test "x$ax_mpi_const_dtype" = "xyes"; then
AC_MSG_RESULT([yes])
AC_DEFINE([HAVE_MPI_PARAM_DTYPE], [1], [MPI supports datatypes as parameters])
else
AC_MSG_RESULT([no])
fi
])


34 changes: 34 additions & 0 deletions m4/ax_mpif08.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#
# ----------------------------------------------------------------------------
# "THE BEER-WARE LICENSE" (Revision 42):
# <njansson@kth.se> wrote this file. As long as you retain
# this notice you can do whatever you want with this stuff. If we meet
# some day, and you think this stuff is worth it, you can buy me a
# beer in return Niclas Jansson
# ----------------------------------------------------------------------------
#
AC_DEFUN([AX_MPIF08], [
AC_REQUIRE([AC_PROG_FC])
AC_LANG_PUSH([Fortran])
AC_MSG_CHECKING([for Fortran 2008 MPI support])
AC_COMPILE_IFELSE([
program conftest
use mpi_f08
end program conftest],
[ax_mpif08=yes], [ax_mpif08=no])
AC_LANG_POP([Fortran])
if test "x$ax_mpif08" = "xyes"; then
AC_MSG_RESULT([yes])
AC_DEFINE([HAVE_MPI_F08], [1], [Fortran 2008 MPI support])
else
AC_MSG_RESULT([no])
AC_MSG_ERROR([MPI compiler doesn't have a Fortran 2008 module])
fi
])


3 changes: 3 additions & 0 deletions m4/ax_parmetis.m4
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#

AC_DEFUN([AX_PARMETIS],[
AC_REQUIRE([AX_METIS])
AC_ARG_WITH([parmetis],
AS_HELP_STRING([--with-parmetis=DIR],
[Directory for parmetis]),
Expand All @@ -19,6 +20,8 @@ AC_DEFUN([AX_PARMETIS],[
fi
],)
AC_ARG_WITH([parmetis-libdir],
AS_HELP_STRING([--with-parmetis-libdir=LIBDIR],
[Directory for parmetis library]),
Expand Down
11 changes: 6 additions & 5 deletions src/.depends
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ io/format/nmsh.o : io/format/nmsh.f90 config/num_types.o
io/format/re2.o : io/format/re2.f90 config/num_types.o
io/format/map.o : io/format/map.f90 mesh/mesh.o
common/log.o : common/log.f90 config/num_types.o comm/comm.o
comm/comm.o : comm/comm.f90
comm/comm.o : comm/comm.F90
mesh/curve.o : mesh/curve.f90 mesh/hex.o mesh/point.o common/structs.o common/utils.o adt/stack.o
comm/mpi_types.o : comm/mpi_types.f90 common/parameters.o io/format/nmsh.o io/format/re2.o comm/comm.o
common/datadist.o : common/datadist.f90
Expand Down Expand Up @@ -91,6 +91,7 @@ bc/symmetry.o : bc/symmetry.f90 adt/htable.o adt/stack.o common/utils.o math/mat
krylov/precon.o : krylov/precon.f90 config/num_types.o
krylov/krylov.o : krylov/krylov.f90 krylov/pc_identity.o bc/bc.o common/utils.o field/field.o mesh/mesh.o sem/coef.o krylov/precon.o config/num_types.o math/ax.o gs/gather_scatter.o
krylov/pc_identity.o : krylov/pc_identity.f90 config/num_types.o math/ax.o krylov/precon.o common/utils.o math/math.o
krylov/precon_fctry.o : krylov/precon_fctry.f90 config/neko_config.o common/utils.o krylov/pc_hsmg.o krylov/bcknd/sx/pc_jacobi_sx.o krylov/bcknd/cpu/pc_jacobi.o krylov/precon.o
krylov/krylov_fctry.o : krylov/krylov_fctry.f90 config/neko_config.o krylov/krylov.o krylov/bcknd/sx/gmres_sx.o krylov/bcknd/cpu/gmres.o krylov/bcknd/cpu/bicgstab.o krylov/bcknd/sx/pipecg_sx.o krylov/bcknd/cpu/pipecg.o krylov/bcknd/cpu/cacg.o krylov/bcknd/sx/cg_sx.o krylov/bcknd/cpu/cg.o
krylov/bcknd/cpu/cg.o : krylov/bcknd/cpu/cg.f90 config/num_types.o math/math.o krylov/krylov.o
krylov/bcknd/cpu/cacg.o : krylov/bcknd/cpu/cacg.f90 config/num_types.o math/mxm_wrapper.o math/math.o krylov/krylov.o
Expand All @@ -107,12 +108,12 @@ common/abbdf.o : common/abbdf.f90 common/utils.o math/math.o config/num_types.o
common/stats_quant.o : common/stats_quant.f90 config/num_types.o
common/statistics.o : common/statistics.f90 common/stats_quant.o config/num_types.o
config/neko_config.o : config/neko_config.f90
case.o : case.f90 common/user_intf.o common/jobctrl.o common/log.o common/abbdf.o comm/comm.o mesh/mesh.o common/utils.o io/file.o common/statistics.o common/sampler.o comm/redist.o comm/parmetis.o field/mesh_field.o comm/mpi_types.o common/parameters.o io/mean_flow_output.o io/mean_sqr_flow_output.o io/chkp_output.o io/fluid_output.o fluid/fluid_schemes.o config/num_types.o
case.o : case.f90 common/user_intf.o common/jobctrl.o common/log.o common/abbdf.o comm/comm.o mesh/mesh.o common/utils.o io/file.o common/statistics.o common/sampler.o comm/redist.o comm/parmetis.o field/mesh_field.o comm/mpi_types.o common/parameters.o io/mean_flow_output.o io/mean_sqr_flow_output.o io/chkp_output.o io/fluid_output.o fluid/fluid_fctry.o config/num_types.o
common/user_intf.o : common/user_intf.f90 config/num_types.o common/parameters.o bc/usr_inflow.o sem/coef.o common/source.o field/field.o
fluid/fluid_method.o : fluid/fluid_method.f90 common/log.o krylov/pc_hsmg.o math/operators.o math/mathops.o common/abbdf.o math/math.o mesh/mesh.o krylov/bcknd/sx/pc_jacobi_sx.o krylov/bcknd/cpu/pc_jacobi.o bc/bc.o krylov/krylov_fctry.o bc/symmetry.o bc/dirichlet.o bc/usr_inflow.o bc/inflow.o bc/wall.o sem/coef.o krylov/krylov.o sem/dofmap.o sem/space.o field/field.o common/source.o config/num_types.o fluid/mean_flow.o common/checkpoint.o common/parameters.o config/neko_config.o fluid/mean_sqr_flow.o gs/gather_scatter.o
fluid/fluid_method.o : fluid/fluid_method.f90 common/log.o math/operators.o math/mathops.o common/abbdf.o math/math.o mesh/mesh.o bc/bc.o krylov/precon_fctry.o krylov/krylov_fctry.o bc/symmetry.o bc/dirichlet.o bc/usr_inflow.o bc/inflow.o bc/wall.o sem/coef.o krylov/krylov.o sem/dofmap.o sem/space.o field/field.o common/source.o config/num_types.o fluid/mean_flow.o common/checkpoint.o common/parameters.o config/neko_config.o fluid/mean_sqr_flow.o gs/gather_scatter.o
fluid/fluid_plan4.o : fluid/fluid_plan4.f90 common/log.o common/projection.o common/abbdf.o config/neko_config.o bc/facet_normal.o fluid/fluid_method.o math/ax_helm_fctry.o
fluid/fluid_plan1.o : fluid/fluid_plan1.f90 fluid/fluid_method.o
fluid/fluid_schemes.o : fluid/fluid_schemes.f90 fluid/fluid_plan4.o fluid/fluid_plan1.o fluid/fluid_method.o
fluid/fluid_fctry.o : fluid/fluid_fctry.f90 common/utils.o config/neko_config.o fluid/fluid_method.o fluid/fluid_plan4.o fluid/fluid_plan1.o
fluid/mean_flow.o : fluid/mean_flow.f90 field/mean_field.o
fluid/mean_sqr_flow.o : fluid/mean_sqr_flow.f90 field/mean_sqr_field.o
simulation.o : simulation.f90 common/jobctrl.o common/log.o io/file.o common/abbdf.o case.o
Expand All @@ -127,6 +128,6 @@ krylov/pc_hsmg.o : krylov/pc_hsmg.f90 krylov/bcknd/sx/pc_jacobi_sx.o krylov/bckn
common/signal.o : common/signal.f90 common/utils.o
common/sighdl.o : common/sighdl.c
common/jobctrl.o : common/jobctrl.f90 common/log.o comm/comm.o common/utils.o common/signal.o config/num_types.o
neko.o : neko.f90 common/jobctrl.o common/signal.o comm/parmetis.o common/user_intf.o common/projection.o math/mathops.o math/operators.o simulation.o io/output.o common/sampler.o case.o config/neko_config.o krylov/bcknd/cpu/pc_jacobi.o math/ax.o krylov/precon.o math/ax_helm_fctry.o krylov/krylov_fctry.o bc/dirichlet.o bc/wall.o bc/bc.o sem/coef.o gs/gather_scatter.o comm/mpi_types.o field/field.o io/file.o math/mxm_wrapper.o io/format/map.o field/mesh_field.o mesh/mesh.o adt/tuple.o adt/stack.o adt/uset.o adt/htable.o sem/space.o sem/dofmap.o sem/speclib.o math/math.o common/log.o common/utils.o comm/comm.o common/parameters.o config/num_types.o
neko.o : neko.f90 common/jobctrl.o common/signal.o comm/parmetis.o common/user_intf.o common/projection.o math/mathops.o math/operators.o simulation.o io/output.o common/sampler.o case.o config/neko_config.o math/ax.o krylov/precon.o math/ax_helm_fctry.o krylov/precon_fctry.o krylov/krylov_fctry.o bc/dirichlet.o bc/wall.o bc/bc.o sem/coef.o gs/gather_scatter.o comm/mpi_types.o field/field.o io/file.o math/mxm_wrapper.o io/format/map.o field/mesh_field.o mesh/mesh.o adt/tuple.o adt/stack.o adt/uset.o adt/htable.o sem/space.o sem/dofmap.o sem/speclib.o math/math.o common/log.o common/utils.o comm/comm.o common/parameters.o config/num_types.o
comm/parmetis_wrapper.o : comm/parmetis_wrapper.c
driver.o : driver.f90 neko.o
5 changes: 3 additions & 2 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ libneko_a_SOURCES = \
io/format/re2.f90\
io/format/map.f90\
common/log.f90\
comm/comm.f90\
comm/comm.F90\
mesh/curve.f90\
comm/mpi_types.f90\
common/datadist.f90\
Expand Down Expand Up @@ -93,6 +93,7 @@ libneko_a_SOURCES = \
krylov/precon.f90\
krylov/krylov.f90\
krylov/pc_identity.f90\
krylov/precon_fctry.f90\
krylov/krylov_fctry.f90\
krylov/bcknd/cpu/cg.f90\
krylov/bcknd/cpu/cacg.f90\
Expand All @@ -114,7 +115,7 @@ libneko_a_SOURCES = \
fluid/fluid_method.f90\
fluid/fluid_plan4.f90\
fluid/fluid_plan1.f90\
fluid/fluid_schemes.f90\
fluid/fluid_fctry.f90\
fluid/mean_flow.f90\
fluid/mean_sqr_flow.f90\
simulation.f90\
Expand Down
1 change: 0 additions & 1 deletion src/adt/htable.f90
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,6 @@ end subroutine htable_set_key
function htable_iter_next(this) result(valid)
class(htable_iter_t), intent(inout) :: this
logical :: valid
integer index, i

this%n = this%n + 1
do while ((.not. this%t%t(this%n)%valid) .and. (this%n .lt. this%t%size))
Expand Down
Loading

0 comments on commit 933c019

Please sign in to comment.