some more small changes, including bug fix in configure + relative linking in Makefile for spectral solver
This commit is contained in:
parent
4850e5987d
commit
656e3cc6ca
|
@ -6,6 +6,7 @@ if [ "$OSTYPE" == "linux-gnu" ] || [ "$OSTYPE" == 'linux' ]
|
||||||
else
|
else
|
||||||
STAT=$(stat "`dirname $BASH_SOURCE`")
|
STAT=$(stat "`dirname $BASH_SOURCE`")
|
||||||
DAMASK_ROOT=${STAT##* }
|
DAMASK_ROOT=${STAT##* }
|
||||||
|
unset STAT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f $HOME/.damask/damask.conf ]; then
|
if [ -f $HOME/.damask/damask.conf ]; then
|
||||||
|
@ -14,14 +15,6 @@ else
|
||||||
source /etc/damask.conf
|
source /etc/damask.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "x$DAMASK_NUM_THREADS" != "x" ]
|
|
||||||
then export DAMASK_NUM_THREADS=$DAMASK_NUM_THREADS
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "x$F90" != "x" ]
|
|
||||||
then export F90=$F90
|
|
||||||
fi
|
|
||||||
|
|
||||||
# disable output in case of scp
|
# disable output in case of scp
|
||||||
if [ ! -z "$PS1" ]; then
|
if [ ! -z "$PS1" ]; then
|
||||||
echo
|
echo
|
||||||
|
@ -29,13 +22,27 @@ if [ ! -z "$PS1" ]; then
|
||||||
echo Max-Planck-Institut für Eisenforschung, Düsseldorf
|
echo Max-Planck-Institut für Eisenforschung, Düsseldorf
|
||||||
echo http://damask.mpie.de
|
echo http://damask.mpie.de
|
||||||
echo
|
echo
|
||||||
echo Preparing environment ...
|
echo Using environment with ...
|
||||||
echo "DAMASK installation in $DAMASK_ROOT"
|
echo "DAMASK installation in $DAMASK_ROOT"
|
||||||
echo "DAMASK_NUM_THREADS=$DAMASK_NUM_THREADS"
|
echo "DAMASK_NUM_THREADS=$DAMASK_NUM_THREADS"
|
||||||
echo "F90=$F90"
|
echo "F90=$F90"
|
||||||
|
echo "FFTW_ROOT=$FFTW_ROOT"
|
||||||
|
if [ "x$LAPACK_ROOT" != "x" ]; then
|
||||||
|
echo "LAPACK_ROOT=$LAPACK_ROOT"
|
||||||
|
fi
|
||||||
|
if [ "x$ACML_ROOT" != "x" ]; then
|
||||||
|
echo "ACML_ROOT=$ACML_ROOT"
|
||||||
|
fi
|
||||||
|
if [ "x$IMKL_ROOT" != "x" ]; then
|
||||||
|
echo "IMKL_ROOT=$IMKL_ROOT"
|
||||||
|
fi
|
||||||
|
echo "MARC_ROOT=$MARC_ROOT"
|
||||||
|
echo "HDF5_ROOT=$HDF5_ROOT (future use)"
|
||||||
fi
|
fi
|
||||||
ulimit -s unlimited
|
ulimit -s unlimited
|
||||||
ulimit -c 0
|
ulimit -c 0
|
||||||
ulimit -v unlimited
|
ulimit -v unlimited
|
||||||
ulimit -m unlimited
|
ulimit -m unlimited
|
||||||
export PYTHONPATH=$PYTHONPATH:$DAMASK_ROOT/lib
|
export PYTHONPATH=$PYTHONPATH:$DAMASK_ROOT/lib
|
||||||
|
unset DAMASK_ROOT
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@ COMPILERNAME ?= $(F90)
|
||||||
|
|
||||||
INCLUDE_DIRS :=-I../lib
|
INCLUDE_DIRS :=-I../lib
|
||||||
LIBRARIES :=-lfftw3
|
LIBRARIES :=-lfftw3
|
||||||
LIB_DIRS :=-L$(FFTW_ROOT)/lib
|
LIB_DIRS :=-L$$FFTW_ROOT/lib
|
||||||
|
|
||||||
ifeq "$(FASTBUILD)" "YES"
|
ifeq "$(FASTBUILD)" "YES"
|
||||||
OPENMP := OFF
|
OPENMP := OFF
|
||||||
|
@ -94,16 +94,16 @@ IMKL_ARCH =_sequential
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq "x$(IMKL_ROOT)" "x"
|
ifneq "x$(IMKL_ROOT)" "x"
|
||||||
LIB_DIRS :=-L$(IMKL_ROOT)/lib/intel64
|
LIB_DIRS :=-L$$IMKL_ROOT/lib/intel64
|
||||||
INCLUDE_DIRS +=-I$(IMKL_ROOT)/include
|
INCLUDE_DIRS +=-I$(IMKL_ROOT)/include
|
||||||
LIBRARIES +=-lmkl_intel_lp64 -lmkl_core -lmkl$(ACML_ARCH) -lm -lpthread -liomp5
|
LIBRARIES +=-lmkl_intel_lp64 -lmkl_core -lmkl$(ACML_ARCH) -lm -lpthread -liomp5
|
||||||
else
|
else
|
||||||
ifneq "x$(ACML_ROOT)" "x"
|
ifneq "x$(ACML_ROOT)" "x"
|
||||||
LIB_DIRS +=-L$(ACML_ROOT)/$(F90)64$(ACML_ARCH)/lib
|
LIB_DIRS +=-L$$ACML_ROOT/$(F90)64$(ACML_ARCH)/lib
|
||||||
LIBRARIES +=-lacml$(ACML_ARCH)
|
LIBRARIES +=-lacml$(ACML_ARCH)
|
||||||
else
|
else
|
||||||
ifneq "x$(LAPACK_ROOT)" "x"
|
ifneq "x$(LAPACK_ROOT)" "x"
|
||||||
LIB_DIRS +=-L$(LAPACK_ROOT)/lib64 -L$(LAPACK_ROOT)/lib
|
LIB_DIRS +=-L$$LAPACK_ROOT/lib64 -L$$LAPACK_ROOT/lib
|
||||||
LIBRARIES +=-llapack
|
LIBRARIES +=-llapack
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
@ -115,7 +115,7 @@ endif
|
||||||
#hdf5
|
#hdf5
|
||||||
ifeq "$(HDF5)" "ON"
|
ifeq "$(HDF5)" "ON"
|
||||||
LIBRARIES +=-lhdf5hl_fortran -lhdf5_hl -lhdf5_fortran -lhdf5
|
LIBRARIES +=-lhdf5hl_fortran -lhdf5_hl -lhdf5_fortran -lhdf5
|
||||||
LIB_DIRS +=-L$(HDF5ROOT)/lib
|
LIB_DIRS +=-L$$HDF5ROOT/lib
|
||||||
INCLUDE_DIRS +=-I$(HDF5ROOT)/include -DHDF
|
INCLUDE_DIRS +=-I$(HDF5ROOT)/include -DHDF
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
@ -232,7 +232,7 @@ for opt, value in options.__dict__.items():
|
||||||
if opt == 'threads' and value !='':
|
if opt == 'threads' and value !='':
|
||||||
output.append('DAMASK_NUM_THREADS=%s\n'%value)
|
output.append('DAMASK_NUM_THREADS=%s\n'%value)
|
||||||
if opt == 'blasType' and value !='':
|
if opt == 'blasType' and value !='':
|
||||||
output.append('%s_ROOT=%s\n'%(blasType,options.blasRoot))
|
output.append('%s_ROOT=%s\n'%(options.blasType,options.blasRoot))
|
||||||
|
|
||||||
for spectralOption in options.spectraloptions:
|
for spectralOption in options.spectraloptions:
|
||||||
output.append(spectralOption+'\n')
|
output.append(spectralOption+'\n')
|
||||||
|
|
|
@ -32,11 +32,11 @@ compileCommand = {
|
||||||
|
|
||||||
# see http://cens.ioc.ee/pipermail/f2py-users/2003-December/000621.html
|
# see http://cens.ioc.ee/pipermail/f2py-users/2003-December/000621.html
|
||||||
if options['IMKL_ROOT'] != '' and options['F90'] != 'gfortran':
|
if options['IMKL_ROOT'] != '' and options['F90'] != 'gfortran':
|
||||||
lib_lapack = '-L%s/lib/intel64 -I%s/include -lmkl_intel_lp64 -lmkl_core -lmkl_sequential -lpthread -lm -liomp5'%(options['IMKL_ROOT'],options['IMKL_ROOT'])
|
lib_lapack = '-L$IMKL_ROOT/lib/intel64 -I%s/include -lmkl_intel_lp64 -lmkl_core -lmkl_sequential -lpthread -lm -liomp5'%options['IMKL_ROOT']
|
||||||
elif options['ACML_ROOT'] != '':
|
elif options['ACML_ROOT'] != '':
|
||||||
lib_lapack = '-L%s/%s64/lib -lacml'%(options['ACML_ROOT'],options['F90'])
|
lib_lapack = '-L$ACML/%s64/lib -lacml'%options['F90']
|
||||||
elif options['LAPACK_ROOT'] != '':
|
elif options['LAPACK_ROOT'] != '':
|
||||||
lib_lapack = '-L%s/lib -L%s/lib64 -llapack'%(options['LAPACK_ROOT'],options['LAPACK_ROOT'])
|
lib_lapack = '-L$LAPACK_ROOT/lib -L$LAPACK_ROOT/lib64 -llapack'
|
||||||
|
|
||||||
os.chdir(codeDir) # needed for compilation with gfortran and f2py
|
os.chdir(codeDir) # needed for compilation with gfortran and f2py
|
||||||
try:
|
try:
|
||||||
|
@ -66,7 +66,7 @@ cmd = 'f2py damask.core.pyf' +\
|
||||||
' FEsolving.f90'+\
|
' FEsolving.f90'+\
|
||||||
' mesh.f90'+\
|
' mesh.f90'+\
|
||||||
' core_quit.f90'+\
|
' core_quit.f90'+\
|
||||||
' -L%s/lib -lfftw3'%(options['FFTW_ROOT'])+\
|
' -L$FFTW_ROOT/lib -lfftw3'+\
|
||||||
' %s'%lib_lapack
|
' %s'%lib_lapack
|
||||||
|
|
||||||
print('Executing: '+cmd)
|
print('Executing: '+cmd)
|
||||||
|
|
Loading…
Reference in New Issue