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
objdir:
@mkdir $(OBJDIR) 2>/dev/null; cat /dev/null
nek5000: objdir $(NOBJS)
$(F77) -c $(FL2) $(CASEDIR)/${CASENAME}.f $(MOABNEK_INCLUDES) $(VISITNEK_INCLUDES) $(IMESH_INCLUDES) -o ${OBJDIR}/${CASENAME}.o
nek5000: objdir $(CASEDIR)/${CASENAME}.o $(NOBJS)
$(F77) -o ${BINNAME} $G ${OBJDIR}/${CASENAME}.o $(NOBJS) $(lFLAGS)
@if test -f ${BINNAME}; then \
echo "#############################################################"; \
......@@ -168,6 +167,9 @@ ifeq ($(IFMPI),false)
@rm -rf $S/mpif.h
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)
$(F77) -shared -o ${LIBNAME}.so $(NOBJS)
......
#!/bin/bash
# Nek5000 build config file
# (c) 2008,2009,2010 UCHICAGO ARGONNE, LLC
set -o pipefail
# source path
SOURCE_ROOT=$(dirname $(dirname $(pwd)))/Nek5000
......@@ -88,5 +89,5 @@ fi
# do some checks and create makefile
source $SOURCE_ROOT_CORE/makenek.inc
# compile
make -j4 -f makefile.nek nek5000 lib 2>&1 | tee compiler.out
exit 0
# make -j4 -f makefile.nek nek5000 lib 2>&1 | tee compiler.out
exit $?
......@@ -494,8 +494,8 @@ fi
if [ -f .makefile ]; then
sed -e "1i\\
### makefile automatically created by makenek `date +"%m/%d/%Y %T"` ###" \
-e "s:^CASEDIR[ ]*=.*:CASEDIR\:=${CASEDIR}:" \
-e "s:^CASENAME[ ]*=.*:CASENAME\:=${CASENAME}:" .makefile > makefile.nek
-e "s:^CASEDIR[ ]*=.*:CASEDIR\=${CASEDIR}:" \
-e "s:^CASENAME[ ]*=.*:CASENAME\=${CASENAME}:" .makefile > makefile.nek
else
echo "ERROR: Nek Makefile could not be created!"
exit 1
......
......@@ -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.
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
--------------------------
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 @@
NEK_CASENAME="$(basename $(pwd))"
NEK_SOURCE_DIR="$(dirname $(dirname $(pwd)))/Nek5000"
JOBS=4
while getopts ":j:" opt; do
case $opt in
j ) JOBS=$OPTARG ;;
esac
done
# JOBS=4
# while getopts ":j:" opt; do
# case $opt in
# j ) JOBS=$OPTARG ;;
# esac
# done
# MOOSE issues a warning if these directories do not exist.
# Creating these dirs will suppress that warning
......@@ -21,14 +21,17 @@ if [ -e $SCH_FILE ]; then
rm -f $SCH_FILE
fi
echo "Creating SESSON.NAME..."
echo "Creating SESSON.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
echo "Building libNek5000.so..."
make -j $JOBS -f makefile.nek lib
echo "Building $NEK_CASENAME.o ..."
make -j 4 -f makefile.nek obj/$NEK_CASENAME.o
echo "Building MOON driver..."
make -j $JOBS
echo "Building libNek5000.so ..."
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