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 @@ ...@@ -7,6 +7,8 @@
*-opt *-opt
*-dbg *-dbg
*-oprof *-oprof
*-prof
*-devel
*.e *.e
*.nav *.nav
*.log *.log
...@@ -16,7 +18,7 @@ ...@@ -16,7 +18,7 @@
*.csv *.csv
*.dylib *.dylib
*.so *.so
*.gitignore* *.so.*
*.vrb *.vrb
*.jou *.jou
*.pyc *.pyc
...@@ -35,6 +37,7 @@ ...@@ -35,6 +37,7 @@
*.spl *.spl
*.idx *.idx
traceout*.txt traceout*.txt
temp_print_trace.*
*.xda *.xda
*.xda.* *.xda.*
*.xdr *.xdr
...@@ -64,8 +67,25 @@ traceout*.txt ...@@ -64,8 +67,25 @@ traceout*.txt
*.out *.out
*.vtk *.vtk
*.vtu *.vtu
*.pvtu
.depend .depend
*.png
*.gif
*.tif
*.jpg
*.tiff
*.ps
*.bmp
*.html
*.xyz
*Revision.h
*.json
*.bak
*.processor.*
.clang_complete .clang_complete
.failed_tests
compile_commands.json
build
# Allow certain files in gold directories # Allow certain files in gold directories
!**/gold/*.e !**/gold/*.e
...@@ -73,9 +93,17 @@ traceout*.txt ...@@ -73,9 +93,17 @@ traceout*.txt
!**/gold/*.csv !**/gold/*.csv
!**/gold/*.vtk !**/gold/*.vtk
!**/gold/*.vtu !**/gold/*.vtu
!**/gold/*.pvtu
peacock_run_tmp.i peacock_run_tmp.i
yaml_dump* yaml_dump*
test/tests/outputs/format/dump.i
# Generated header file
MooseRevision.h
# Precompiled headers
moose/include/base/Precompiled.h.gch
# test garbagge # test garbagge
*.FAILED.txt *.FAILED.txt
...@@ -92,12 +120,14 @@ yaml_dump* ...@@ -92,12 +120,14 @@ yaml_dump*
.*.swp .*.swp
.*.swo .*.swo
framework/contrib/exodiff/exodiff
# Mac garbage # Mac garbage
.DS_Store .DS_Store
*.dSYM *.dSYM
# Unit testing stuff # Unit testing stuffbmoose_unit/test_results.xml
moose_unit/test_results.xml !unit/data/csv/*.csv
# gcov code coverage files # gcov code coverage files
*.gcno *.gcno
...@@ -136,20 +166,53 @@ framework/contrib/asio/ ...@@ -136,20 +166,53 @@ framework/contrib/asio/
*.cpa-* *.cpa-*
*.cpr-* *.cpr-*
# Revision files
include/base/*Revision.h
# phase_field/tests/solution_rasterizer # phase_field/tests/solution_rasterizer
out.xyz out.xyz
# Nek5000 run files # JIT and automatic differentiation cache files
*.sch .jitcache/
SESSION.NAME .jitdir/
nek5000 tmp_jit_*
# Autconf artifacts # Do not store ipython notebook checkpoints
aclocal.m4 *-checkpoint.ipynb*
autom4te.cache/**
config.log # MooseDocs
config.status 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 install-sh
config.status
giraffe.mk
...@@ -29,8 +29,7 @@ configure_giraffe_job: ...@@ -29,8 +29,7 @@ configure_giraffe_job:
MOOSE_JOBS: 32 MOOSE_JOBS: 32
script: script:
- ./bootstrap || echo - ./bootstrap || echo
- cd examples/integration_example/ - ./configure
- ../../configure
build_giraffe_job: build_giraffe_job:
stage: build_giraffe stage: build_giraffe
...@@ -42,7 +41,6 @@ build_giraffe_job: ...@@ -42,7 +41,6 @@ build_giraffe_job:
LIBMESH_DIR: "$CI_PROJECT_DIR/moose/libmesh/installed" LIBMESH_DIR: "$CI_PROJECT_DIR/moose/libmesh/installed"
MOOSE_JOBS: 32 MOOSE_JOBS: 32
script: script:
- cd examples/integration_example/
- make -j8 - make -j8
run_giraffe_serial_job: run_giraffe_serial_job:
......
############################################################################### ###############################################################################
# GIRAFFE MAKEFILE ################### MOOSE Application Standard Makefile #######################
############################################################################### ###############################################################################
# #
# Optional Environment variables # Optional Environment variables
# MOOSE_DIR - Root directory of the MOOSE project # MOOSE_DIR - Root directory of the MOOSE project
# FRAMEWORK_DIR - Location of the MOOSE framework
# #
############################################################################### ###############################################################################
GIRAFFE_DIR := @abs_srcdir@ # Use the MOOSE submodule if it exists and MOOSE_DIR is not set
MOOSE_DIR := @MOOSE_DIR@ MOOSE_SUBMODULE := $(CURDIR)/moose
FRAMEWORK_DIR := @MOOSE_DIR@/framework ifneq ($(wildcard $(MOOSE_SUBMODULE)/framework/Makefile),)
############################################################################### MOOSE_DIR ?= $(MOOSE_SUBMODULE)
else
MOOSE_DIR ?= $(shell dirname `pwd`)/moose
endif
# framework # framework
FRAMEWORK_DIR := $(MOOSE_DIR)/framework
include $(FRAMEWORK_DIR)/build.mk include $(FRAMEWORK_DIR)/build.mk
include $(FRAMEWORK_DIR)/moose.mk include $(FRAMEWORK_DIR)/moose.mk
################################## MODULES #################################### ################################## MODULES ####################################
SOLID_MECHANICS := no # To use certain physics included with MOOSE, set variables below to
CONTACT := no # yes as needed. Or set ALL_MODULES to yes to turn on everything (overrides
HEAT_CONDUCTION := yes # other set variables).
WATER_STEAM_EOS := no
MISC := no ALL_MODULES := no
PHASE_FIELD := no
XFEM := no
include $(MOOSE_DIR)/modules/modules.mk
################################## 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 # dep apps
include giraffe.mk APPLICATION_DIR := $(CURDIR)
APPLICATION_DIR := $(GIRAFFE_DIR)
APPLICATION_NAME := giraffe APPLICATION_NAME := giraffe
MAIN_DIR := $(APPLICATION_DIR)/src
BUILD_EXEC := yes BUILD_EXEC := yes
DEP_APPS := $(shell $(FRAMEWORK_DIR)/scripts/find_dep_apps.py integration_example) GEN_REVISION := no
include $(FRAMEWORK_DIR)/app.mk include $(FRAMEWORK_DIR)/app.mk
############################################################################### ###############################################################################
......
...@@ -27,29 +27,28 @@ Building Example Problems ...@@ -27,29 +27,28 @@ Building Example Problems
### Basic compilation ### 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: 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. 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. 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 subdirctory for the example problem, run `make`. 3. In the top-level Giraffe directory, run `make`.
The complete steps for the `integration_example` problem are: The complete steps for the `integration_example` problem are:
``` Shell ``` Shell
$ cd giraffe $ cd giraffe
$ ./bootstrap $ ./bootstrap
$ cd examples/integration_example $ ./configure GIRAFFE_EXAMPLE=path/to/example
$ ../../configure
$ make $ 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 ### 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: 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. * `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. * `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 ### Running Example Problems
...@@ -65,11 +64,11 @@ $ cd examples/integration example/ ...@@ -65,11 +64,11 @@ $ cd examples/integration example/
$ ../../giraffe-opt -i coefficient_integration.i $ ../../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 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. 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@ @CASENAME@
@abs_builddir@ @GIRAFFE_EXAMPLE_ABS@
# == Source and destination directories ============================================================ # == Source and destination directories ============================================================
VPATH := @srcdir@/Nek5000/core:@srcdir@/Nek5000/core/cmt:@srcdir@/Nek5000/core/3rd_party:@srcdir@/Nek5000/jl:@srcdir@/src_nek 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 := @srcdir@ srcdir := @abs_srcdir@
builddir := @builddir@ GIRAFFE_EXAMPLE ?= @abs_srcdir@/examples/integration_example
nek_objdir := @builddir@/nek_obj builddir := $(GIRAFFE_EXAMPLE)
nek_includedir := @builddir@/include nek_objdir := $(GIRAFFE_EXAMPLE)/nek_obj
nek_includedir := $(GIRAFFE_EXAMPLE)/include
# == Discovered by autoconf script # == Discovered by autoconf script
CASENAME := @CASENAME@ CASENAME ?= $(shell basename $(GIRAFFE_EXAMPLE))
nek_CFLAGS := @CFLAGS@ 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_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_LDFLAGS := @LDFLAGS@
nek_LIBS := @LIBS@ nek_LIBS := $(libmesh_LIBS)
nek_FFLAGS := @FFLAGS@ @FCFLAGS_f@ $(subst -D, @FC_DEFINE@, @DEFS@ @nek_DEFS@) $(nek_INCLUDES) nek_FFLAGS := @FFLAGS@ @FCFLAGS_f@ $(subst -D, @FC_DEFINE@, @DEFS@ @nek_DEFS@) $(nek_INCLUDES)
nek_FLIBS := @FLIBS@ nek_FLIBS := @FLIBS@
...@@ -32,7 +33,9 @@ nek_core_f_obj := $(addprefix $(nek_objdir)/, $(addsuffix .$(obj-suffix), \ ...@@ -32,7 +33,9 @@ nek_core_f_obj := $(addprefix $(nek_objdir)/, $(addsuffix .$(obj-suffix), \
subs1 subs2 genbox gmres hsmg convect induct perturb navier5 \ subs1 subs2 genbox gmres hsmg convect induct perturb navier5 \
navier6 navier7 navier8 fast3d fasts calcz postpro \ navier6 navier7 navier8 fast3d fasts calcz postpro \
cvode_driver vprops qthermal cvode_aux makeq_aux papi nek_in_situ \ 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_math_obj := $(addprefix $(nek_objdir)/, $(addsuffix .$(obj-suffix), math))
nek_blas_obj := $(addprefix $(nek_objdir)/, $(addsuffix .$(obj-suffix), @nek_blas_obj@)) # blas.o | null 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 ...@@ -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_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_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 ===================================================================================== # == C objects =====================================================================================
nek_core_c_obj := $(addprefix $(nek_objdir)/, $(addsuffix .$(obj-suffix), \ nek_core_c_obj := $(addprefix $(nek_objdir)/, $(addsuffix .$(obj-suffix), \
...@@ -58,39 +62,41 @@ jl_cgs_obj := $(addprefix $(nek_objdir)/, $(patsubst %, $(jl_prefix)%.$(obj- ...@@ -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) nek_clib_obj := $(nek_core_c_obj) $(jl_core_obj) $(jl_interp_obj) $(jl_cgs_obj)
# == MOOSE app flags and objects ================================================================== # == MOOSE app flags and objects ==================================================================
# Recursive definition (= rather than :=) is probably the right usage, since they're probably ADDITIONAL_CPPFLAGS := $(ADDITIONAL_CPPFLAGS) $(libmesh_CPPFLAGS) @DEFS@ # Used by pattern rules in moose/framework/build.mk
# defined here after they're referenced by MOOSE makefile 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_CPPFLAGS = @CPPFLAGS@ @DEFS@ # Used by pattern rules in moose/framework/build.mk ADDITIONAL_APP_OBJECTS := $(ADDITIONAL_APP_OBJECTS) $(nek_flib_obj) $(nek_clib_obj) # Added to dependencies in moose/framework/app.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
# == Rules ========================================================================================= # == Rules =========================================================================================
nek5000: $(nek_drive_obj) $(nek_flib_obj) $(nek_clib_obj) nek5000: $(nek_drive_obj) $(nek_flib_obj) $(nek_clib_obj)
@echo "Linking Executable "$@"..." @echo "Linking Executable "$@"..."
@$(libmesh_LIBTOOL) --tag=F77 $(LIBTOOLFLAGS) --mode=link \ @$(libmesh_LIBTOOL) --tag=F77 $(LIBTOOLFLAGS) --mode=link --quiet \
$(libmesh_F77) $(libmesh_FFLAGS) -o $@ $^ $(libmesh_LIBS) $(libmesh_LDFLAGS) $(nek_LIBS) $(nek_LDFLAGS) $(nek_FLIBS) $(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) "$<"..." @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 $@ $(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) "$<"..." @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 $@ $(libmesh_F77) $(nek_FFLAGS) $(nek_real8_flags) -c $< -o $@
$(nek_core_c_obj): $(nek_objdir)/%.$(obj-suffix): %.c | $(nek_objdir) $(nek_core_c_obj): $(nek_objdir)/%.$(obj-suffix): %.c | $(nek_objdir)
@echo "Nek5000 Compiling C (in "$(METHOD)" mode) "$<"..." @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 $@ $(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) $(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) "$<"..." @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 $@ $(libmesh_CC) $(nek_CPPFLAGS) $(nek_CFLAGS) -MMD -MP -MF $@.d -MT $@ -c $< -o $@
mpiheader: | $(nek_includedir) mpiheader: | $(nek_includedir)
......
This diff is collapsed.
# This file contains common MOOSE application settings
# Note: MOOSE applications are assumed to reside in peer directories relative to MOOSE and its modules.
# This can be overridden by using the MOOSE_DIR environment variable
# list of application-wide excluded source files
excluded_srcfiles :=
#
# Save off parameters for possible app.mk recursion
#
STACK ?= stack
STACK := $(STACK).X
$APPLICATION_DIR$(STACK) := $(APPLICATION_DIR)
$APPLICATION_NAME$(STACK) := $(APPLICATION_NAME)
$DEPEND_MODULES$(STACK) := $(DEPEND_MODULES)
$BUILD_EXEC$(STACK) := $(BUILD_EXEC)
$DEP_APPS$(STACK) := $(DEP_APPS)
-include $(APPLICATION_DIR)/$(APPLICATION_NAME).mk
#
# Restore parameters
#
APPLICATION_DIR := $($APPLICATION_DIR$(STACK))
APPLICATION_NAME := $($APPLICATION_NAME$(STACK))
DEPEND_MODULES := $($DEPEND_MODULES$(STACK))
BUILD_EXEC := $($BUILD_EXEC$(STACK))
DEP_APPS := $($DEP_APPS$(STACK))
STACK := $(basename $(STACK))
##############################################################################
######################### Application Variables ##############################
##############################################################################
#
# source files
SRC_DIRS := $(APPLICATION_DIR)/src
PLUGIN_DIR := $(APPLICATION_DIR)/plugins
excluded_srcfiles += main.C
find_excludes := $(foreach i, $(excluded_srcfiles), -not -name $(i))
srcfiles := $(shell find $(SRC_DIRS) -name "*.C" $(find_excludes))
csrcfiles := $(shell find $(SRC_DIRS) -name "*.c")
fsrcfiles := $(shell find $(SRC_DIRS) -name "*.f")
f90srcfiles := $(shell find $(SRC_DIRS) -name "*.f90")
# object files
objects := $(patsubst %.C, %.$(obj-suffix), $(srcfiles))
cobjects := $(patsubst %.c, %.$(obj-suffix), $(csrcfiles))
fobjects := $(patsubst %.f, %.$(obj-suffix), $(fsrcfiles))
f90objects := $(patsubst %.f90, %.$(obj-suffix), $(f90srcfiles))
app_objects := $(objects) $(cobjects) $(fobjects) $(f90objects) $(ADDITIONAL_APP_OBJECTS)
# plugin files
plugfiles := $(shell find $(PLUGIN_DIR) -name "*.C" 2>/dev/null)
cplugfiles := $(shell find $(PLUGIN_DIR) -name "*.c" 2>/dev/null)
fplugfiles := $(shell find $(PLUGIN_DIR) -name "*.f" 2>/dev/null)
f90plugfiles:= $(shell find $(PLUGIN_DIR) -name "*.f90" 2>/dev/null)
# plugins
plugins := $(patsubst %.C, %-$(METHOD).plugin, $(plugfiles))
plugins += $(patsubst %.c, %-$(METHOD).plugin, $(cplugfiles))
plugins += $(patsubst %.f, %-$(METHOD).plugin, $(fplugfiles))
plugins += $(patsubst %.f90, %-$(METHOD).plugin, $(f90plugfiles))
# main
main_src := $(APPLICATION_DIR)/src/main.C # Main must be located here!
main_object := $(patsubst %.C, %.$(obj-suffix), $(main_src))
# dependency files
app_deps := $(patsubst %.C, %.$(obj-suffix).d, $(srcfiles)) \
$(patsubst %.c, %.$(obj-suffix).d, $(csrcfiles)) \
$(patsubst %.C, %.$(obj-suffix).d, $(main_src)) \
$(ADDITIONAL_APP_DEPS)
depend_dirs := $(foreach i, $(DEPEND_MODULES), $(MOOSE_DIR)/modules/$(i)/include)
depend_dirs += $(APPLICATION_DIR)/include
# header files
include_dirs := $(shell find $(depend_dirs) -type d | grep -v "\.svn")
app_INCLUDE := $(foreach i, $(include_dirs), -I$(i)) $(ADDITIONAL_INCLUDES)
# clang static analyzer files
app_analyzer := $(patsubst %.C, %.plist.$(obj-suffix), $(srcfiles))
# library
app_LIB := $(APPLICATION_DIR)/lib/lib$(APPLICATION_NAME)-$(METHOD).la
# application
app_EXEC := $(APPLICATION_DIR)/$(APPLICATION_NAME)-$(METHOD)
# revision header
CAMEL_CASE_NAME := $(shell echo $(APPLICATION_NAME) | perl -pe 's/(?:^|_)([a-z])/\u$$1/g')
app_BASE_DIR ?= base/
app_HEADER := $(APPLICATION_DIR)/include/$(app_BASE_DIR)$(CAMEL_CASE_NAME)Revision.h
# depend modules
depend_libs := $(foreach i, $(DEPEND_MODULES), $(MOOSE_DIR)/modules/$(i)/lib/lib$(i)-$(METHOD).la)
##################################################################################################
# If we are NOT building a module, then make sure the dependency libs are updated to reflect
# all real dependencies
##################################################################################################
ifeq (,$(findstring $(APPLICATION_NAME), $(MODULE_NAMES)))
depend_libs := $(depend_libs) $(app_LIBS)
endif
# Here we'll filter out MOOSE libs since we'll assume our application already has MOOSE compiled in
depend_libs := $(filter-out $(moose_LIBS),$(depend_libs))
# Create -L/-l versions of the depend libs
depend_libs_flags := $(foreach i, $(depend_libs), -L$(dir $(i)) -l$(shell echo $(notdir $(i)) | perl -pe 's/^lib(.*?)\.la/$$1/'))
# If building shared libs, make the plugins a dependency, otherwise don't.
ifeq ($(libmesh_shared),yes)
app_plugin_deps := $(plugins)
else
app_plugin_deps :=
endif
app_LIBS := $(app_LIB) $(app_LIBS)
app_LIBS_other := $(filter-out $(app_LIB),$(app_LIBS))
app_HEADERS := $(app_HEADER) $(app_HEADERS)
app_INCLUDES += $(app_INCLUDE)
app_DIRS += $(APPLICATION_DIR)
# WARNING: the += operator does NOT work here!
ADDITIONAL_CPPFLAGS := $(ADDITIONAL_CPPFLAGS) -D$(shell echo $(APPLICATION_NAME) | perl -pe 'y/a-z/A-Z/' | perl -pe 's/-//g')_ENABLED
# dependencies
-include $(app_deps)
# Rest the DEPEND_MODULES variable in case this file is sourced again
DEPEND_MODULES :=
###############################################################################
# Build Rules: