Commit 7365c202 authored by Ron Rahaman's avatar Ron Rahaman

Merge branch 'updatedApp' into 'develop'

Updated app

See merge request !9
parents 51647a0e a8dad671
Pipeline #3424 passed with stages
in 19 minutes and 34 seconds
BasedOnStyle: LLVM
TabWidth: 2
ColumnLimit: 100
UseTab: Never
CommentPragmas: '^/'
ReflowComments: true
AlignTrailingComments: true
SpacesBeforeTrailingComments: 1
SpaceBeforeParens: ControlStatements
SpacesInSquareBrackets: false
BreakBeforeBraces: Allman
PointerAlignment: Middle
BinPackParameters: false
BinPackArguments: false
ConstructorInitializerAllOnOneLineOrOnePerLine: true
AllowShortBlocksOnASingleLine: false
AllowShortFunctionsOnASingleLine: true
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
SortIncludes: false
IndentCaseLabels: true
ConstructorInitializerIndentWidth: 2
AlwaysBreakAfterDefinitionReturnType: TopLevel
AlwaysBreakTemplateDeclarations: true
......@@ -7,6 +7,8 @@
*-opt
*-dbg
*-oprof
*-prof
*-devel
*.e
*.nav
*.log
......@@ -16,7 +18,7 @@
*.csv
*.dylib
*.so
*.gitignore*
*.so.*
*.vrb
*.jou
*.pyc
......@@ -35,6 +37,7 @@
*.spl
*.idx
traceout*.txt
temp_print_trace.*
*.xda
*.xda.*
*.xdr
......@@ -64,8 +67,25 @@ traceout*.txt
*.out
*.vtk
*.vtu
*.pvtu
.depend
*.png
*.gif
*.tif
*.jpg
*.tiff
*.ps
*.bmp
*.html
*.xyz
*Revision.h
*.json
*.bak
*.processor.*
.clang_complete
.failed_tests
compile_commands.json
build
# Allow certain files in gold directories
!**/gold/*.e
......@@ -73,9 +93,17 @@ traceout*.txt
!**/gold/*.csv
!**/gold/*.vtk
!**/gold/*.vtu
!**/gold/*.pvtu
peacock_run_tmp.i
yaml_dump*
test/tests/outputs/format/dump.i
# Generated header file
MooseRevision.h
# Precompiled headers
moose/include/base/Precompiled.h.gch
# test garbagge
*.FAILED.txt
......@@ -92,12 +120,14 @@ yaml_dump*
.*.swp
.*.swo
framework/contrib/exodiff/exodiff
# Mac garbage
.DS_Store
*.dSYM
# Unit testing stuff
moose_unit/test_results.xml
# Unit testing stuffbmoose_unit/test_results.xml
!unit/data/csv/*.csv
# gcov code coverage files
*.gcno
......@@ -136,20 +166,53 @@ framework/contrib/asio/
*.cpa-*
*.cpr-*
# Revision files
include/base/*Revision.h
# phase_field/tests/solution_rasterizer
out.xyz
# Nek5000 run files
*.sch
SESSION.NAME
nek5000
# Autconf artifacts
aclocal.m4
autom4te.cache/**
config.log
config.status
# JIT and automatic differentiation cache files
.jitcache/
.jitdir/
tmp_jit_*
# Do not store ipython notebook checkpoints
*-checkpoint.ipynb*
# MooseDocs
site
!**/doc/content/**/*.md
!**/doc/content/**/*.jpg
!**/doc/content/**/*.jpeg
!**/doc/content/**/*.gif
!**/doc/content/**/*.png
!**/doc/content/**/*.svg
!**/doc/content/**/*.ogg
!**/doc/content/**/*.webm
!**/doc/content/**/*.mp4
!**/doc/content/**/*.css
!**/doc/content/**/*.js
!**/doc/content/**/*.bib
!**/doc/content/**/*.woff
!**/doc/content/**/*.woff2
# Chigger
!python/chigger/tests/**/gold/*.png
!python/chigger/tests/input/*.e*
!python/chigger/logos/*.png
!python/chigger/contrib/*.xml
# Peacock
python/peacock/tests/exodus_tab/TestOutputPlugin_repr.py
python/peacock/tests/input_tab/InputFileEditor/fsp_test.i
python/peacock/tests/postprocessor_tab/TestPostprocessorPluginManager_test_script.py
!python/peacock/tests/**/gold/*.png
!python/peacock/icons/**/*.*
!python/peacock/tests/**/input/*.*
# Giraffe/Nek5000
autom4te.cache/
config.guess
config.sub
configure
install-sh
config.status
giraffe.mk
......@@ -29,8 +29,7 @@ configure_giraffe_job:
MOOSE_JOBS: 32
script:
- ./bootstrap || echo
- cd examples/integration_example/
- ../../configure
- ./configure
build_giraffe_job:
stage: build_giraffe
......@@ -42,7 +41,6 @@ build_giraffe_job:
LIBMESH_DIR: "$CI_PROJECT_DIR/moose/libmesh/installed"
MOOSE_JOBS: 32
script:
- cd examples/integration_example/
- make -j8
run_giraffe_serial_job:
......
###############################################################################
# GIRAFFE MAKEFILE
################### MOOSE Application Standard Makefile #######################
###############################################################################
#
# Optional Environment variables
# MOOSE_DIR - Root directory of the MOOSE project
# FRAMEWORK_DIR - Location of the MOOSE framework
# MOOSE_DIR - Root directory of the MOOSE project
#
###############################################################################
GIRAFFE_DIR := @abs_srcdir@
MOOSE_DIR := @MOOSE_DIR@
FRAMEWORK_DIR := @MOOSE_DIR@/framework
###############################################################################
# Use the MOOSE submodule if it exists and MOOSE_DIR is not set
MOOSE_SUBMODULE := $(CURDIR)/moose
ifneq ($(wildcard $(MOOSE_SUBMODULE)/framework/Makefile),)
MOOSE_DIR ?= $(MOOSE_SUBMODULE)
else
MOOSE_DIR ?= $(shell dirname `pwd`)/moose
endif
# framework
FRAMEWORK_DIR := $(MOOSE_DIR)/framework
include $(FRAMEWORK_DIR)/build.mk
include $(FRAMEWORK_DIR)/moose.mk
################################## MODULES ####################################
SOLID_MECHANICS := no
CONTACT := no
HEAT_CONDUCTION := yes
WATER_STEAM_EOS := no
MISC := no
PHASE_FIELD := no
XFEM := no
include $(MOOSE_DIR)/modules/modules.mk
# To use certain physics included with MOOSE, set variables below to
# yes as needed. Or set ALL_MODULES to yes to turn on everything (overrides
# other set variables).
ALL_MODULES := no
################################## GIRAFFE ####################################
CHEMICAL_REACTIONS := no
CONTACT := no
FLUID_PROPERTIES := no
HEAT_CONDUCTION := yes
MISC := no
NAVIER_STOKES := no
PHASE_FIELD := no
RDG := no
RICHARDS := no
SOLID_MECHANICS := no
STOCHASTIC_TOOLS := no
TENSOR_MECHANICS := no
WATER_STEAM_EOS := no
XFEM := no
POROUS_FLOW := no
include $(MOOSE_DIR)/modules/modules.mk
###############################################################################
# nek
include giraffe.mk
APPLICATION_DIR := $(GIRAFFE_DIR)
# dep apps
APPLICATION_DIR := $(CURDIR)
APPLICATION_NAME := giraffe
MAIN_DIR := $(APPLICATION_DIR)/src
BUILD_EXEC := yes
DEP_APPS := $(shell $(FRAMEWORK_DIR)/scripts/find_dep_apps.py integration_example)
GEN_REVISION := no
include $(FRAMEWORK_DIR)/app.mk
###############################################################################
......
......@@ -27,29 +27,28 @@ Building Example Problems
### Basic compilation
Giraffe must be separately compiled for each specific problem, since Nek5000 uses static memory allocations that are specific to the problem setup. To build an example problem:
1. In the top-level Giraffe, directory use the `bootstrap` script to generate a `configure` script.
2. In the subdirectory for the example problem, run the `configure` script.
3. In the subdirctory for the example problem, run `make`.
1. In the top-level Giraffe directory, use the `bootstrap` script to generate a `configure` script.
2. In the top-level Giraffe directory, run the `configure` script to generate Makefiles. **Note: specify the problem by setting GIRAFFE_EXAMPLE. If unspecified by user, GIRAFFE_EXAMPLE points to** `<GiraffeRoot>/examples/integration_example`.
3. In the top-level Giraffe directory, run `make`.
The complete steps for the `integration_example` problem are:
``` Shell
$ cd giraffe
$ ./bootstrap
$ cd examples/integration_example
$ ../../configure
$ ./configure GIRAFFE_EXAMPLE=path/to/example
$ make
```
A successful compilation will create libraries and executables in the top-level Giraffe directory (in this case, `giraffe/lib/lib-giraffe-opt.so` and `giraffe/giraffe-opt`). **Note that, even though the libraries and executables are problem specific, they are not output to the problem's director.**
The user may also specify the `METHOD` variable to build different versions of Giraffe, i.e. `opt`, `dbg`, or `oprof`. A successful compilation will create libraries and executables in the top-level Giraffe directory (in this case, `giraffe/lib/lib-giraffe-opt.so` and `giraffe/giraffe-opt`). **Note that, even though the libraries and executables are problem specific, they are not output to the problem's directory.**
### Additional compilation options
To perform custom compilations, the `configure` script may be run with additional options. Run `./configure --help` to see a complete list of the available options and variables. Some of the most useful are:
* `CASENAME`: Specfies the basename of the Nek5000 `.usr` file. For example, if you were compiling with `integration_example.usr`, then you would specify `CASENAME="integration_example"`. The default value of `CASENAME` is the name of the example subdirectory.
* `CASENAME`: Specfies the basename of the Nek5000 `.usr` file. For example, if you were compiling with `integration_example.usr`, then you would specify `CASENAME="integration_example"`. The default value of `CASENAME` is the name of the example subdirectory.
* `MOOSE_DIR`: Inherited from the environment. If it is specified here, it will override the environment's value.
* `LIBMESH_DIR`: Inherited from the environment. If it is specified here, it will override the environment's value.
For the majority of situations, it is not recommended to directly specify compilers and compiler/linker flags to configure script (`CC`, `CFLAGS`, `LDFLAGS`, etc). This is because, by default, the compilers and flags are detected from the libmesh installation, which ensures a consistent compilation of Giraffe.
For the majority of situations, it is not recommended to directly specify compilers and compiler/linker flags to configure script (`CC`, `CFLAGS`, `LDFLAGS`, etc). This is because, by default, the compilers and flags are detected from the libmesh installation, which ensures a consistent compilation of Giraffe.
### Running Example Problems
......@@ -65,11 +64,11 @@ $ cd examples/integration example/
$ ../../giraffe-opt -i coefficient_integration.i
```
Upon repeated runs, Nek5000 may raise an error if an output `.sch` file is present. If so, delete the `.sch` file and rerun Giraffe.
Upon repeated runs, Nek5000 may raise an error if an output `.sch` file is present. If so, delete the `.sch` file and rerun Giraffe.
Developing Giraffe
------------------
Giraffe is ensured to be compatable with the current [MOOSE master branch](https://github.com/idaholab/moose/tree/master). However, Giraffee is **not** necessarily compatable with a current or previous version [Nek5000 master branc](https://github.com/Nek5000/Nek5000/tree/master). Hence, Giraffe includes Nek5000 as a Git **subtree** rather than a submodule.
Giraffe is ensured to be compatable with the current [MOOSE master branch](https://github.com/idaholab/moose/tree/master). However, Giraffee is **not** necessarily compatable with a current or previous version [Nek5000 master branc](https://github.com/Nek5000/Nek5000/tree/master). Hence, Giraffe includes Nek5000 as a Git **subtree** rather than a submodule.
The use of a subtree means that developers may freely modify Nek5000 as if it were a normal part of the Giraffe repo. For routine commits, pushes, and pulls to the Giraffe repository, no extra Git commands are necessary for changing `giraffe/Nek5000`. With some additional Git commands, developers may also merge upstream changes from [https://github.com/Nek5000/Nek5000](https://github.com/Nek5000/Nek5000) into `giraffe/Nek5000`. Finally, developers may also request to merge changes from `giraffe/Nek5000` to [https://github.com/Nek5000/Nek5000](https://github.com/Nek5000/Nek5000). This [blog post](http://blogs.atlassian.com/2013/05/alternatives-to-git-submodule-git-subtree/) from Atlassian gives a brief rundown of these operations.
@CASENAME@
@abs_builddir@
@GIRAFFE_EXAMPLE_ABS@
# == Source and destination directories ============================================================
VPATH := @srcdir@/Nek5000/core:@srcdir@/Nek5000/core/cmt:@srcdir@/Nek5000/core/3rd_party:@srcdir@/Nek5000/jl:@srcdir@/src_nek
srcdir := @srcdir@
builddir := @builddir@
nek_objdir := @builddir@/nek_obj
nek_includedir := @builddir@/include
VPATH := @abs_srcdir@/Nek5000/core:@abs_srcdir@/Nek5000/core/cmt:@abs_srcdir@/Nek5000/core/3rd_party:@abs_srcdir@/Nek5000/jl:@abs_srcdir@/src_nek
srcdir := @abs_srcdir@
GIRAFFE_EXAMPLE ?= @abs_srcdir@/examples/integration_example
builddir := $(GIRAFFE_EXAMPLE)
nek_objdir := $(GIRAFFE_EXAMPLE)/nek_obj
nek_includedir := $(GIRAFFE_EXAMPLE)/include
# == Discovered by autoconf script
CASENAME := @CASENAME@
nek_CFLAGS := @CFLAGS@
CASENAME ?= $(shell basename $(GIRAFFE_EXAMPLE))
nek_CFLAGS := $(libmesh_CFLAGS)
nek_INCLUDES := -I$(builddir) -I$(nek_includedir) -I$(srcdir)/Nek5000/core -I$(srcdir)/Nek5000/core/cmt -I$(srcdir)/Nek5000/core/3rd_party -I$(srcdir)/Nek5000/jl -I$(srcdir)/src_nek
nek_CPPFLAGS := @CPPFLAGS@ @DEFS@ @nek_DEFS@ $(nek_INCLUDES)
nek_CPPFLAGS := $(libmesh_CPPFLAGS) @DEFS@ @nek_DEFS@ $(nek_INCLUDES)
nek_LDFLAGS := @LDFLAGS@
nek_LIBS := @LIBS@
nek_LIBS := $(libmesh_LIBS)
nek_FFLAGS := @FFLAGS@ @FCFLAGS_f@ $(subst -D, @FC_DEFINE@, @DEFS@ @nek_DEFS@) $(nek_INCLUDES)
nek_FLIBS := @FLIBS@
......@@ -32,7 +33,9 @@ nek_core_f_obj := $(addprefix $(nek_objdir)/, $(addsuffix .$(obj-suffix), \
subs1 subs2 genbox gmres hsmg convect induct perturb navier5 \
navier6 navier7 navier8 fast3d fasts calcz postpro \
cvode_driver vprops qthermal cvode_aux makeq_aux papi nek_in_situ \
readat_new nek_moose @CASENAME@))
readat_new nek_moose))
nek_case_f_obj := $(addprefix $(nek_objdir)/, $(addsuffix .$(obj-suffix), $(CASENAME)))
nek_math_obj := $(addprefix $(nek_objdir)/, $(addsuffix .$(obj-suffix), math))
nek_blas_obj := $(addprefix $(nek_objdir)/, $(addsuffix .$(obj-suffix), @nek_blas_obj@)) # blas.o | null
......@@ -43,7 +46,8 @@ nek_mxm_obj := $(addprefix $(nek_objdir)/, $(addsuffix .$(obj-suffix), @nek_m
nek_neknek_obj := $(addprefix $(nek_objdir)/, $(addsuffix .$(obj-suffix), @nek_neknek_obj@)) # singlmesh.o | multimesh.o
nek_flib_obj := $(nek_core_f_obj) $(nek_math_obj) $(nek_blas_obj) $(nek_cmt_obj) \
$(nek_lapack_obj) $(nek_mpi_obj) $(nek_mxm_obj) $(nek_neknek_obj)
$(nek_lapack_obj) $(nek_mpi_obj) $(nek_mxm_obj) $(nek_neknek_obj) \
$(nek_case_f_obj)
# == C objects =====================================================================================
nek_core_c_obj := $(addprefix $(nek_objdir)/, $(addsuffix .$(obj-suffix), \
......@@ -58,39 +62,41 @@ jl_cgs_obj := $(addprefix $(nek_objdir)/, $(patsubst %, $(jl_prefix)%.$(obj-
nek_clib_obj := $(nek_core_c_obj) $(jl_core_obj) $(jl_interp_obj) $(jl_cgs_obj)
# == MOOSE app flags and objects ==================================================================
# Recursive definition (= rather than :=) is probably the right usage, since they're probably
# defined here after they're referenced by MOOSE makefile
ADDITIONAL_CPPFLAGS = @CPPFLAGS@ @DEFS@ # Used by pattern rules in moose/framework/build.mk
ADDITIONAL_INCLUDES = $(nek_INCLUDES) # Used by pattern rules in moose/framework/build.mk (through app_INCLUDES)
ADDITIONAL_LIBS = $(nek_LIBS) $(nek_FLIBS) # Used during linking in moose/framework/app.mk
ADDITIONAL_APP_OBJECTS = $(nek_flib_obj) $(nek_clib_obj) # Added to dependencies in moose/framework/app.mk
ADDITIONAL_CPPFLAGS := $(ADDITIONAL_CPPFLAGS) $(libmesh_CPPFLAGS) @DEFS@ # Used by pattern rules in moose/framework/build.mk
ADDITIONAL_INCLUDES := $(ADDITIONAL_INCLUDES) $(nek_INCLUDES) # Used by pattern rules in moose/framework/build.mk (through app_INCLUDES)
ADDITIONAL_LIBS := $(ADDITIONAL_LIBS) $(nek_LIBS) $(nek_FLIBS) # Used during linking in moose/framework/app.mk
ADDITIONAL_APP_OBJECTS := $(ADDITIONAL_APP_OBJECTS) $(nek_flib_obj) $(nek_clib_obj) # Added to dependencies in moose/framework/app.mk
# == Rules =========================================================================================
nek5000: $(nek_drive_obj) $(nek_flib_obj) $(nek_clib_obj)
@echo "Linking Executable "$@"..."
@$(libmesh_LIBTOOL) --tag=F77 $(LIBTOOLFLAGS) --mode=link \
$(libmesh_F77) $(libmesh_FFLAGS) -o $@ $^ $(libmesh_LIBS) $(libmesh_LDFLAGS) $(nek_LIBS) $(nek_LDFLAGS) $(nek_FLIBS)
@$(libmesh_LIBTOOL) --tag=F77 $(LIBTOOLFLAGS) --mode=link --quiet \
$(libmesh_F77) $(libmesh_FFLAGS) -o $@ $^ $(libmesh_LIBS) $(libmesh_LDFLAGS) $(nek_LIBS) $(nek_LDFLAGS) $(nek_FLIBS)
$(nek_case_f_obj): $(nek_objdir)/%.$(obj-suffix): $(GIRAFFE_EXAMPLE)/%.f $(GIRAFFE_EXAMPLE)/SIZE | $(nek_objdir)
@echo "Nek5000 Compiling Fortran (in "$(METHOD)" mode) "$<"..."
@$(libmesh_LIBTOOL) --tag=F77 $(LIBTOOLFLAGS) --mode=compile --quiet \
$(libmesh_F77) $(nek_FFLAGS) $(nek_real8_flags) -c $< -o $@
$(nek_drive_obj) $(nek_core_f_obj) $(nek_cmt_obj) $(nek_math_obj) $(nek_mxm_obj): $(nek_objdir)/%.$(obj-suffix): %.f SIZE | $(nek_objdir)
$(nek_drive_obj) $(nek_core_f_obj) $(nek_cmt_obj) $(nek_math_obj) $(nek_mxm_obj): $(nek_objdir)/%.$(obj-suffix): %.f $(GIRAFFE_EXAMPLE)/SIZE | $(nek_objdir)
@echo "Nek5000 Compiling Fortran (in "$(METHOD)" mode) "$<"..."
@$(libmesh_LIBTOOL) --tag=F77 $(LIBTOOLFLAGS) --mode=compile \
@$(libmesh_LIBTOOL) --tag=F77 $(LIBTOOLFLAGS) --mode=compile --quiet \
$(libmesh_F77) $(nek_FFLAGS) $(nek_real8_flags) -c $< -o $@
$(nek_mpi_obj) $(nek_neknek_obj): $(nek_objdir)/%.$(obj-suffix): %.f SIZE mpiheader | $(nek_objdir)
$(nek_mpi_obj) $(nek_neknek_obj): $(nek_objdir)/%.$(obj-suffix): %.f $(GIRAFFE_EXAMPLE)/SIZE mpiheader | $(nek_objdir)
@echo "Nek5000 Compiling Fortran (in "$(METHOD)" mode) "$<"..."
@$(libmesh_LIBTOOL) --tag=F77 $(LIBTOOLFLAGS) --mode=compile \
@$(libmesh_LIBTOOL) --tag=F77 $(LIBTOOLFLAGS) --mode=compile --quiet \
$(libmesh_F77) $(nek_FFLAGS) $(nek_real8_flags) -c $< -o $@
$(nek_core_c_obj): $(nek_objdir)/%.$(obj-suffix): %.c | $(nek_objdir)
@echo "Nek5000 Compiling C (in "$(METHOD)" mode) "$<"..."
@$(libmesh_LIBTOOL) --tag=CC $(LIBTOOLFLAGS) --mode=compile \
@$(libmesh_LIBTOOL) --tag=CC $(LIBTOOLFLAGS) --mode=compile --quiet \
$(libmesh_CC) $(nek_CPPFLAGS) $(nek_CFLAGS) -MMD -MP -MF $@.d -MT $@ -c $< -o $@
$(jl_core_obj) $(jl_interp_obj) $(jl_cgs_obj): $(nek_objdir)/$(jl_prefix)%.$(obj-suffix): %.c | $(nek_objdir)
@echo "Nek5000 Compiling C (in "$(METHOD)" mode) "$<"..."
@$(libmesh_LIBTOOL) --tag=CC $(LIBTOOLFLAGS) --mode=compile \
@$(libmesh_LIBTOOL) --tag=CC $(LIBTOOLFLAGS) --mode=compile --quiet \
$(libmesh_CC) $(nek_CPPFLAGS) $(nek_CFLAGS) -MMD -MP -MF $@.d -MT $@ -c $< -o $@
mpiheader: | $(nek_includedir)
......
......@@ -86,8 +86,9 @@ AC_ARG_ENABLE([libmesh],
[AS_HELP_STRING([--enable-libmesh], [configure with compilers and flags from an existing libmesh installation @<:@default: enabled@:>@])],
[libmesh=${enableval}], [libmesh=yes])
AC_ARG_VAR([MOOSE_DIR], [directory of moose installation @<:@default: giraffe/moose/@:>@])
AC_ARG_VAR([LIBMESH_DIR], [directory of libmesh installation @<:@default: \$MOOSE_DIR/libmesh/installed/@:>@])
AC_ARG_VAR([MOOSE_DIR], [directory of moose installation @<:@default: giraffe/moose@:>@])
AC_ARG_VAR([LIBMESH_DIR], [directory of libmesh installation @<:@default: $MOOSE_DIR/libmesh/installed@:>@])
AC_ARG_VAR([GIRAFFE_EXAMPLE], [directory containing Nek5000 input files @<:@default: giraffe/examples/integration_example@:>@])
###############################################################################
# GET COMPILERS AND FLAGS FROM LIBMESH
......@@ -96,12 +97,15 @@ AC_ARG_VAR([LIBMESH_DIR], [directory of libmesh installation @<:@default: \$MOOS
# Default values for $MOOSE_DIR and $LIBMESH_DIR
: "${MOOSE_DIR=$srcdir/moose}"
: "${LIBMESH_DIR=$MOOSE_DIR/libmesh/installed}"
: "${GIRAFFE_EXAMPLE=$srcdir/examples/integration_example}"
GIRAFFE_EXAMPLE_ABS="$(readlink -f $GIRAFFE_EXAMPLE)"
AC_SUBST([GIRAFFE_EXAMPLE_ABS])
# If libmesh is enabled, get compilers and flags from libmesh-config
# Adapted from moose/framework/build.mk
if test "x$libmesh" = "xyes"; then
# First, see if installed libmesh-config exists
libmesh_config="$LIBMESH_DIR/bin/libmesh-config"
libmesh_config="$LIBMESH_DIR/bin/libmesh-config"
AC_MSG_CHECKING([if $libmesh_config exists])
if test -x $libmesh_config; then
AC_MSG_RESULT([yes])
......@@ -135,7 +139,7 @@ fi
###############################################################################
if test "x$CASENAME" = "x"; then
CASENAME="$(basename $(pwd))"
CASENAME="$(basename $GIRAFFE_EXAMPLE)"
fi
###############################################################################
......@@ -179,7 +183,7 @@ for flag in dnl
do
FFLAGS="$flag"
AC_MSG_CHECKING([if Fortran 77 compiler accepts $flag])
AC_COMPILE_IFELSE(
AC_COMPILE_IFELSE(
AC_LANG_PROGRAM(, [[ real foo]],),
AC_MSG_RESULT([yes]) && nek_real8_flags="$flag" && break,
AC_MSG_RESULT([no])
......@@ -219,8 +223,8 @@ if test "$ac_cv_sizeof_int_p" -eq 8; then
nek_DEFS="-DPTRSIZE8 $nek_DEFS"
fi
# See if 'underscore' is in mangling scheme.
if echo "$ac_cv_f77_mangling"| tr -d @<:@:blank:@:>@ | grep '\<underscore\>' > /dev/null ; then
# See if 'underscore' is in mangling scheme.
if echo "$ac_cv_f77_mangling"| tr -d @<:@:blank:@:>@ | grep '\<underscore\>' > /dev/null ; then
nek_DEFS="-DUNDERSCORE $nek_DEFS"
fi
......@@ -291,21 +295,21 @@ AC_SUBST([nek_neknek_obj])
# TODO: Set defs for BLAS_MXM
# == BLAS and MXM handling =====================================================
# TODO:
# TODO:
# * Set -O3 flag if $bgq = yes
# * Consistency check between options
# * If automake, AM_CONDITIONAL([BGQ], [test "x$bgq" = "xyes"]), etc.
if test "x$bgq" = "xyes"; then
if test "x$bgq" = "xyes"; then
nek_DEFS="-DBGQ $nek_DEFS"
nek_blas_obj=""
nek_mxm_obj="mxm_std mxm_bgq"
else
if test "x$xsmm" = "xyes"; then
if test "x$xsmm" = "xyes"; then
nek_DEFS="-DXSMM $nek_DEFS"
nek_blas_obj="blas"
nek_mxm_obj="mxm_std"
else
if test "x$nek_blas" = "xyes"; then
if test "x$nek_blas" = "xyes"; then
nek_blas_obj="blas"
nek_mxm_obj="mxm_std"
else
......@@ -314,12 +318,12 @@ else
nek_mxm_obj="mxm_std"
fi
fi
fi
fi
AC_SUBST([nek_blas_obj])
AC_SUBST([nek_mxm_obj])
# == LAPACK handling ==========================================================
# TODO:
# TODO:
# * if automake, AM_CONDITIONAL([NO_LAPACK], [test "x$nek_lapack" = "xno"])
if test "x$nek_lapack" = "xyes"; then
nek_lapack_obj="dsygv ssygv"
......@@ -335,106 +339,106 @@ AC_SUBST([nek_DEFS])
# SIZE FILE HANDLING
###############################################################################
AC_CHECK_FILE([SIZE], , AC_MSG_ERROR([could not find SIZE file in current directory]))
AC_CHECK_FILE([$GIRAFFE_EXAMPLE/SIZE], , AC_MSG_ERROR([could not find SIZE file in $GIRAFFE_EXAMPLE]))
AC_MSG_NOTICE([tweaking SIZE file])
# == General subroutines ======================================================
cat SIZE | grep -i 'lxo' >/dev/null
cat $GIRAFFE_EXAMPLE/SIZE | grep -i 'lxo' >/dev/null
if test $? -ne 0; then
echo >>SIZE
echo 'c automatically added by makenek' >>SIZE
echo ' parameter(lxo = lx1) ! max output grid size (lxo>=lx1)' >>SIZE
echo >>$GIRAFFE_EXAMPLE/SIZE
echo 'c automatically added by makenek' >>$GIRAFFE_EXAMPLE/SIZE
echo ' parameter(lxo = lx1) ! max output grid size (lxo>=lx1)' >>$GIRAFFE_EXAMPLE/SIZE
fi
cat SIZE | grep -i 'lpart' >/dev/null
cat $GIRAFFE_EXAMPLE/SIZE | grep -i 'lpart' >/dev/null
if test $? -ne 0; then
echo >>SIZE
echo 'c automatically added by makenek' >>SIZE
echo ' parameter(lpart = 1 ) ! max number of particles/proc' >>SIZE
echo >>$GIRAFFE_EXAMPLE/SIZE
echo 'c automatically added by makenek' >>$GIRAFFE_EXAMPLE/SIZE
echo ' parameter(lpart = 1 ) ! max number of particles/proc' >>$GIRAFFE_EXAMPLE/SIZE
fi
cat SIZE | grep -i 'ax1' >/dev/null
cat $GIRAFFE_EXAMPLE/SIZE | grep -i 'ax1' >/dev/null
if test $? -ne 0; then
echo >>SIZE
echo 'c automatically added by makenek' >>SIZE
echo ' integer ax1,ay1,az1,ax2,ay2,az2' >> SIZE
echo ' parameter (ax1=lx1,ay1=ly1,az1=lz1,ax2=lx2,ay2=ly2,az2=lz2) ! running averages' >> SIZE
echo >>$GIRAFFE_EXAMPLE/SIZE
echo 'c automatically added by makenek' >>$GIRAFFE_EXAMPLE/SIZE
echo ' integer ax1,ay1,az1,ax2,ay2,az2' >> $GIRAFFE_EXAMPLE/SIZE
echo ' parameter (ax1=lx1,ay1=ly1,az1=lz1,ax2=lx2,ay2=ly2,az2=lz2) ! running averages' >> $GIRAFFE_EXAMPLE/SIZE
fi
cat SIZE | grep -i 'lys=lxs' >/dev/null
cat $GIRAFFE_EXAMPLE/SIZE | grep -i 'lys=lxs' >/dev/null
if test $? -ne 0; then
cat SIZE | grep -iv lxs > SIZE.x; mv SIZE.x SIZE # Clean existing SIZE file of old version
echo >>SIZE
echo 'c automatically added by makenek' >>SIZE
echo ' parameter (lxs=1,lys=lxs,lzs=(lxs-1)*(ldim-2)+1) !New Pressure Preconditioner' >> SIZE
cat $GIRAFFE_EXAMPLE/SIZE | grep -iv lxs > $GIRAFFE_EXAMPLE/SIZE.x; mv $GIRAFFE_EXAMPLE/SIZE.x $GIRAFFE_EXAMPLE/SIZE # Clean existing SIZE file of old version
echo >>$GIRAFFE_EXAMPLE/SIZE
echo 'c automatically added by makenek' >>$GIRAFFE_EXAMPLE/SIZE
echo ' parameter (lxs=1,lys=lxs,lzs=(lxs-1)*(ldim-2)+1) !New Pressure Preconditioner' >> $GIRAFFE_EXAMPLE/SIZE
fi
cat SIZE | grep -i 'lfdm' >/dev/null
cat $GIRAFFE_EXAMPLE/SIZE | grep -i 'lfdm' >/dev/null
if test $? -ne 0; then
echo >>SIZE
echo 'c automatically added by makenek' >>SIZE
echo ' parameter (lfdm=0) ! == 1 for fast diagonalization method' >> SIZE
echo >>$GIRAFFE_EXAMPLE/SIZE
echo 'c automatically added by makenek' >>$GIRAFFE_EXAMPLE/SIZE
echo ' parameter (lfdm=0) ! == 1 for fast diagonalization method' >> $GIRAFFE_EXAMPLE/SIZE
fi
cat SIZE | grep -i 'nio' >/dev/null
cat $GIRAFFE_EXAMPLE/SIZE | grep -i 'nio' >/dev/null
if test $? -ne 0; then
echo >>SIZE
echo 'c automatically added by makenek' >>SIZE
echo ' common/IOFLAG/nio ! for logfile verbosity control' >> SIZE
echo >>$GIRAFFE_EXAMPLE/SIZE
echo 'c automatically added by makenek' >>$GIRAFFE_EXAMPLE/SIZE
echo ' common/IOFLAG/nio ! for logfile verbosity control' >> $GIRAFFE_EXAMPLE/SIZE
fi
# == CVODE subroutines ========================================================
if test "x$cvode" = "xyes"; then
cat SIZE | grep -i 'cv_maxl' >/dev/null
cat $GIRAFFE_EXAMPLE/SIZE | grep -i 'cv_maxl' >/dev/null
if test $? -ne 0; then
echo >>SIZE
echo 'c automatically added by makenek' >>SIZE
echo ' integer cv_maxl' >> SIZE
echo ' parameter(cv_maxl = 20 ) ! Size of Krylov Space' >>SIZE
echo >>$GIRAFFE_EXAMPLE/SIZE
echo 'c automatically added by makenek' >>$GIRAFFE_EXAMPLE/SIZE
echo ' integer cv_maxl' >> $GIRAFFE_EXAMPLE/SIZE
echo ' parameter(cv_maxl = 20 ) ! Size of Krylov Space' >>$GIRAFFE_EXAMPLE/SIZE
fi
cat SIZE | grep -i 'cv_delt' >/dev/null
cat $GIRAFFE_EXAMPLE/SIZE | grep -i 'cv_delt' >/dev/null
if test $? -ne 0; then
echo >>SIZE
echo 'c automatically added by makenek' >>SIZE
echo ' real cv_delt' >> SIZE
echo ' parameter(cv_delt = 0.1 ) ! linear convergence factor ' >>SIZE
echo >>$GIRAFFE_EXAMPLE/SIZE
echo 'c automatically added by makenek' >>$GIRAFFE_EXAMPLE/SIZE
echo ' real cv_delt' >> $GIRAFFE_EXAMPLE/SIZE
echo ' parameter(cv_delt = 0.1 ) ! linear convergence factor ' >>$GIRAFFE_EXAMPLE/SIZE
fi
cat SIZE | grep -i 'cv_sigs' >/dev/null
cat $GIRAFFE_EXAMPLE/SIZE | grep -i 'cv_sigs' >/dev/null
if test $? -ne 0; then
echo >>SIZE
echo 'c automatically added by makenek' >>SIZE
echo ' real cv_sigs' >> SIZE
echo ' parameter(cv_sigs = 0.01) ! Jacobian DQ perturbation scaling factor' >>SIZE
echo >>$GIRAFFE_EXAMPLE/SIZE
echo 'c automatically added by makenek' >>$GIRAFFE_EXAMPLE/SIZE
echo ' real cv_sigs' >> $GIRAFFE_EXAMPLE/SIZE
echo ' parameter(cv_sigs = 0.01) ! Jacobian DQ perturbation scaling factor' >>$GIRAFFE_EXAMPLE/SIZE
fi
fi
# == CMT subroutines ==========================================================
cat SIZE | grep -i 'toteq' >/dev/null
cat $GIRAFFE_EXAMPLE/SIZE | grep -i 'toteq' >/dev/null
if test $? -ne 0; then
if test "x$cmt" = "xyes"; then
echo >>SIZE
echo 'c automatically added by makenek' >>SIZE
echo ' integer toteq' >> SIZE
echo ' parameter(toteq = 5 ) ! Number of conserved variables ' >>SIZE
echo 'c IFCMT=TRUE then toteq=5' >>SIZE
echo >>$GIRAFFE_EXAMPLE/SIZE
echo 'c automatically added by makenek' >>$GIRAFFE_EXAMPLE/SIZE
echo ' integer toteq' >> $GIRAFFE_EXAMPLE/SIZE
echo ' parameter(toteq = 5 ) ! Number of conserved variables ' >>$GIRAFFE_EXAMPLE/SIZE
echo 'c IFCMT=TRUE then toteq=5' >>$GIRAFFE_EXAMPLE/SIZE
else
echo >>SIZE
echo 'c automatically added by makenek' >>SIZE
echo ' integer toteq' >> SIZE
echo ' parameter(toteq = 1 ) ! Number of conserved variables ' >>SIZE
echo 'c IFCMT=FALSE then toteq=1' >>SIZE
echo >>$GIRAFFE_EXAMPLE/SIZE
echo 'c automatically added by makenek' >>$GIRAFFE_EXAMPLE/SIZE
echo ' integer toteq' >> $GIRAFFE_EXAMPLE/SIZE
echo ' parameter(toteq = 1 ) ! Number of conserved variables ' >>$GIRAFFE_EXAMPLE/SIZE
echo 'c IFCMT=FALSE then toteq=1' >>$GIRAFFE_EXAMPLE/SIZE
fi
fi
cat SIZE | grep -i 'lelcmt' >/dev/null
cat $GIRAFFE_EXAMPLE/SIZE | grep -i 'lelcmt' >/dev/null
if test $? -ne 0; then
if test "x$cmt" = "xyes"; then
echo >>SIZE
echo 'c automatically added by makenek' >>SIZE
echo ' integer lelcmt' >> SIZE
echo ' parameter(lelcmt = lelt ) ! # of cmt elements ' >>SIZE
echo 'c IFCMT=TRUE then lelcmt=lelt' >>SIZE
echo >>$GIRAFFE_EXAMPLE/SIZE
echo 'c automatically added by makenek' >>$GIRAFFE_EXAMPLE/SIZE
echo ' integer lelcmt' >> $GIRAFFE_EXAMPLE/SIZE
echo ' parameter(lelcmt = lelt ) ! # of cmt elements ' >>$GIRAFFE_EXAMPLE/SIZE
echo 'c IFCMT=TRUE then lelcmt=lelt' >>$GIRAFFE_EXAMPLE/SIZE
else