Skip to content

Commit 6d75c73

Browse files
committed
Moved the compilation lines of erkale its own configure file in utilities. It checks the existence of a precompiled Erkale to save compiling time. Removed the optional compilation flag for erkale. Solving #133
1 parent 0a85037 commit 6d75c73

File tree

3 files changed

+27
-29
lines changed

3 files changed

+27
-29
lines changed

configure

+1-28
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ EXENAME="openlowdin"
4949
PREFIX="/usr/local"
5050
SCRATCH='/scratch'
5151
CUDAFLAGS="no"
52-
COMP_ERKALE="yes"
5352
DEFAULTS='F'
5453
SED=sed
5554
if [[ $(uname -s) == Darwin ]]; then
@@ -124,8 +123,6 @@ else
124123
LIBINT_LIBS=`awk '{if($1 == "LIBINT_LIBS" ) {for(i=3;i<=NF;i++) printf "%s ", $i}}' CONFIG`
125124
LIBXC_LIBS=`awk '{if($1 == "LIBXC_LIBS" ) {for(i=3;i<=NF;i++) printf "%s ", $i}}' CONFIG`
126125
CUDA_LIBS=`awk '{if($1 == "CUDA_LIBS" ) {for(i=3;i<=NF;i++) printf "%s ", $i}}' CONFIG`
127-
COMP_ERKALE=`awk '{if($1 == "COMP_ERKALE" ) {for(i=3;i<=NF;i++) printf "%s ", $i}}' CONFIG`
128-
129126
# ALL_LIBS=`awk '{if($1 == "ALL_LIBS" ) {for(i=3;i<=NF;i++) printf "%s ", $i}}' CONFIG`
130127
fi
131128
fi
@@ -277,14 +274,6 @@ PREFIX=$BINDIR
277274
###############################################################################
278275
# ADDITIONAL UTILITIES
279276
###############################################################################
280-
if [[ $DEFAULTS == 'F' ]]; then
281-
echo "Compile erkale? (for orbital localization and embedding): yes(default)/no [$COMP_ERKALE]"
282-
read ERKALE
283-
fi
284-
285-
if [ "$ERKALE" != "no" ] ; then
286-
COMP_ERKALE="yes"
287-
fi
288277

289278
###############################################################################
290279
# SAVING OPTIONS
@@ -311,29 +300,13 @@ echo "LIBXC_LIBS = $LIBXC_LIBS" >> CONFIG
311300
echo "CUDA_LIBS = $CUDA_LIBS" >> CONFIG
312301
echo "ALL_LIBS = $ALL_LIBS" >> CONFIG
313302
echo "SED = $SED" >> CONFIG
314-
echo "COMP_ERKALE = $COMP_ERKALE" >> CONFIG
315-
316-
317-
###############################################################################
318-
# Compile Erkale
319-
###############################################################################
320-
if [ "$COMP_ERKALE" = "yes" ] ; then
321-
if [ -e utilities/erkale/erkale/bin/erkale_loc ]; then
322-
echo "I found the folliowing erkale binaries, skipping erkale compilation"
323-
ls utilities/erkale/erkale/bin/*
324-
else
325-
cd $TOPDIR/utilities/erkale
326-
./compileForLowdin.sh $FC
327-
cd $TOPDIR
328-
fi
329-
fi
330303

331304
###############################################################################
332305
# Generate makefiles
333306
###############################################################################
334307

335308
SRCDIR="src utilities"
336-
SUBDIRS="core ints DFT scf integralsTransformation MBPT PT CalcProp aduw gepol cosmo output CI NOCI MM molden2aim jadamilu"
309+
SUBDIRS="core ints DFT scf integralsTransformation MBPT PT CalcProp aduw gepol cosmo output CI NOCI MM molden2aim jadamilu erkale"
337310

338311
for DIR in $SRCDIR ; do
339312
cd $DIR

utilities/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ TOPDIR=..
22

33
include $(TOPDIR)/CONFIG
44

5-
SUBDIRS = aduw gepol molden2aim jadamilu
5+
SUBDIRS = aduw gepol molden2aim jadamilu erkale
66
ALLDIRS = $(SUBDIRS)
77

88
default::

utilities/erkale/configure

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/bash
2+
#
3+
rm -f makefile
4+
#rm -f *.o
5+
#rm -f *.mod
6+
rm -f *~
7+
#
8+
cat > makefile << EOF
9+
TOPDIR=../../
10+
include \$(TOPDIR)/CONFIG
11+
12+
FOUND_ERKALE=\$(shell if [ -e ./erkale/bin/erkale_loc ] ; then echo 1 ; fi)
13+
14+
ifeq (\$(FOUND_ERKALE),1)
15+
all::
16+
echo "I found the following erkale binaries, skipping erkale compilation" \\
17+
ls ./erkale/bin/*
18+
else
19+
all::
20+
bash ./compileForLowdin.sh \$(FC)
21+
endif
22+
clean::
23+
rm makefile
24+
EOF
25+
#

0 commit comments

Comments
 (0)