Commit e069bb37 authored by Ron Rahaman's avatar Ron Rahaman

Fixes for building Nek from clean install

parent a9afd578
......@@ -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
......
......@@ -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