Commit 8757f401 authored by Elia Merzari's avatar Elia Merzari

Merge remote-tracking branch 'origin' into develop

parents 8ed0ceba e069bb37
...@@ -150,8 +150,7 @@ all : nek5000 ...@@ -150,8 +150,7 @@ all : nek5000
objdir: objdir:
@mkdir $(OBJDIR) 2>/dev/null; cat /dev/null @mkdir $(OBJDIR) 2>/dev/null; cat /dev/null
nek5000: objdir $(NOBJS) nek5000: objdir $(CASEDIR)/${CASENAME}.o $(NOBJS)
$(F77) -c $(FL2) $(CASEDIR)/${CASENAME}.f $(MOABNEK_INCLUDES) $(VISITNEK_INCLUDES) $(IMESH_INCLUDES) -o ${OBJDIR}/${CASENAME}.o
$(F77) -o ${BINNAME} $G ${OBJDIR}/${CASENAME}.o $(NOBJS) $(lFLAGS) $(F77) -o ${BINNAME} $G ${OBJDIR}/${CASENAME}.o $(NOBJS) $(lFLAGS)
@if test -f ${BINNAME}; then \ @if test -f ${BINNAME}; then \
echo "#############################################################"; \ echo "#############################################################"; \
...@@ -168,6 +167,9 @@ ifeq ($(IFMPI),false) ...@@ -168,6 +167,9 @@ ifeq ($(IFMPI),false)
@rm -rf $S/mpif.h @rm -rf $S/mpif.h
endif endif
${OBJDIR}/${CASENAME}.o: objdir $(CASEDIR)/${CASENAME}.f
$(F77) -c $(FL2) $(CASEDIR)/${CASENAME}.f $(MOABNEK_INCLUDES) $(VISITNEK_INCLUDES) $(IMESH_INCLUDES) -o ${OBJDIR}/${CASENAME}.o
lib: objdir $(NOBJS) lib: objdir $(NOBJS)
$(F77) -shared -o ${LIBNAME}.so $(NOBJS) $(F77) -shared -o ${LIBNAME}.so $(NOBJS)
......
#!/bin/bash #!/bin/bash
# Nek5000 build config file # Nek5000 build config file
# (c) 2008,2009,2010 UCHICAGO ARGONNE, LLC # (c) 2008,2009,2010 UCHICAGO ARGONNE, LLC
set -o pipefail
# source path # source path
SOURCE_ROOT=$(dirname $(dirname $(pwd)))/Nek5000 SOURCE_ROOT=$(dirname $(dirname $(pwd)))/Nek5000
...@@ -88,5 +89,5 @@ fi ...@@ -88,5 +89,5 @@ fi
# do some checks and create makefile # do some checks and create makefile
source $SOURCE_ROOT_CORE/makenek.inc source $SOURCE_ROOT_CORE/makenek.inc
# compile # compile
make -j4 -f makefile.nek nek5000 lib 2>&1 | tee compiler.out # make -j4 -f makefile.nek nek5000 lib 2>&1 | tee compiler.out
exit 0 exit $?
...@@ -494,8 +494,8 @@ fi ...@@ -494,8 +494,8 @@ fi
if [ -f .makefile ]; then if [ -f .makefile ]; then
sed -e "1i\\ sed -e "1i\\
### makefile automatically created by makenek `date +"%m/%d/%Y %T"` ###" \ ### makefile automatically created by makenek `date +"%m/%d/%Y %T"` ###" \
-e "s:^CASEDIR[ ]*=.*:CASEDIR\:=${CASEDIR}:" \ -e "s:^CASEDIR[ ]*=.*:CASEDIR\=${CASEDIR}:" \
-e "s:^CASENAME[ ]*=.*:CASENAME\:=${CASENAME}:" .makefile > makefile.nek -e "s:^CASENAME[ ]*=.*:CASENAME\=${CASENAME}:" .makefile > makefile.nek
else else
echo "ERROR: Nek Makefile could not be created!" echo "ERROR: Nek Makefile could not be created!"
exit 1 exit 1
......
...@@ -13,6 +13,32 @@ git clone --recursive https://xgitlab.cels.anl.gov/nek5000/moon.git ...@@ -13,6 +13,32 @@ git clone --recursive https://xgitlab.cels.anl.gov/nek5000/moon.git
This will download and populate the src/moose and src/moose/libmesh. This will download and populate the src/moose and src/moose/libmesh.
Building PETSc
--------------
MOON requires PETSc, as described in the [MOOSE installation instructions](http://mooseframework.com/getting-started/). PETSc is not distributed with MOON. PETSc must either be compiled from source or installed as part of the MOOSE Environment package. After installing PETSc, you must define the `$PETSC_DIR` variable in your environment.
Building libmesh
----------------
MOON also requires libmesh, as described in the [MOOSE installation instructions](http://mooseframework.com/getting-started/). The libmesh source code is distributed with MOOSE. It should be compiled using the following scripts:
```
$ cd moose/
$ scripts/update\_and\_rebuild\_libmesh.sh.
```
After installing libmesh, you must define the `$LIBMESH_DIR` in your environment.
Building and Running the Example Problems
-----------------------------------------
MOON is distributed with scripts for building and runninhg coupled example problems. To build and run a given example (e.g.: "integration\_example"), use the following commands:
```
$ cd examples/integration_example/
$ ../../scripts/build_coupled_nek.sh
$ ../../scripts/run_coupled_nek.sh
```
Note that the build and run scripts must be executed from the example subdiretory.
Developing Nek5000 in MOON Developing Nek5000 in MOON
-------------------------- --------------------------
Developers may freely modify src/Nek5000 as if it were a normal part of the MOON repo. This is because Nek5000 is included as a Git subtree (rather than a submodule). For routine commits, pushes, and pulls to the MOON repository, no extra Git commands are necessary. Developers may freely modify src/Nek5000 as if it were a normal part of the MOON repo. This is because Nek5000 is included as a Git subtree (rather than a submodule). For routine commits, pushes, and pulls to the MOON repository, no extra Git commands are necessary.
......
...@@ -3,12 +3,12 @@ ...@@ -3,12 +3,12 @@
NEK_CASENAME="$(basename $(pwd))" NEK_CASENAME="$(basename $(pwd))"
NEK_SOURCE_DIR="$(dirname $(dirname $(pwd)))/Nek5000" NEK_SOURCE_DIR="$(dirname $(dirname $(pwd)))/Nek5000"
JOBS=4 # JOBS=4
while getopts ":j:" opt; do # while getopts ":j:" opt; do
case $opt in # case $opt in
j ) JOBS=$OPTARG ;; # j ) JOBS=$OPTARG ;;
esac # esac
done # done
# MOOSE issues a warning if these directories do not exist. # MOOSE issues a warning if these directories do not exist.
# Creating these dirs will suppress that warning # Creating these dirs will suppress that warning
...@@ -21,14 +21,17 @@ if [ -e $SCH_FILE ]; then ...@@ -21,14 +21,17 @@ if [ -e $SCH_FILE ]; then
rm -f $SCH_FILE rm -f $SCH_FILE
fi fi
echo "Creating SESSON.NAME..." echo "Creating SESSON.NAME ..."
echo "$NEK_CASENAME" > SESSION.NAME && pwd >> SESSION.NAME echo "$NEK_CASENAME" > SESSION.NAME && pwd >> SESSION.NAME
echo "Building Nek5000 objects..." echo "Configuring makefile.nek..."
$NEK_SOURCE_DIR/core/makenek $NEK_CASENAME $NEK_SOURCE_DIR $NEK_SOURCE_DIR/core/makenek $NEK_CASENAME $NEK_SOURCE_DIR
echo "Building libNek5000.so..." echo "Building $NEK_CASENAME.o ..."
make -j $JOBS -f makefile.nek lib make -j 4 -f makefile.nek obj/$NEK_CASENAME.o
echo "Building MOON driver..." echo "Building libNek5000.so ..."
make -j $JOBS make -j 4 -f makefile.nek lib
echo "Building MOON driver ..."
make -j 4
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment