mirror of
https://github.com/LCPQ/quantum_package
synced 2025-01-03 10:05:57 +01:00
Lots of cleaning in scripts and Makefiles
This commit is contained in:
parent
c8258a48bd
commit
6b2496d0ed
3
.gitignore
vendored
3
.gitignore
vendored
@ -5,4 +5,5 @@ EMSL_Basis
|
||||
bin/
|
||||
*.log
|
||||
quantum_package_static.tar.gz
|
||||
|
||||
resultsFile
|
||||
opam_installer.sh
|
||||
|
@ -1,78 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Computes the MD5 digest of an EZFIO file, and creates a tar.
|
||||
# Thu Apr 3 16:55:50 CEST 2014
|
||||
|
||||
if [[ -z ${QPACKAGE_ROOT} ]]
|
||||
then
|
||||
print "The QPACKAGE_ROOT environment variable is not set."
|
||||
print "Please reload the quantum_package.rc file."
|
||||
fi
|
||||
|
||||
function archive()
|
||||
{
|
||||
FILE="$1"
|
||||
MD5="$2"
|
||||
ARCHIVE="${QPACKAGE_ROOT}/data/cache/$MD5"
|
||||
if [[ -f "$ARCHIVE" ]]
|
||||
then
|
||||
if ! diff "$FILE" "${QPACKAGE_ROOT}/data/cache/$MD5" &> /dev/null
|
||||
then
|
||||
echo "Something went wrong. The file"
|
||||
echo "${QPACKAGE_ROOT}/data/cache/$MD5"
|
||||
echo "is different from $FILE"
|
||||
echo "Aborting"
|
||||
return 1
|
||||
fi
|
||||
else
|
||||
cp "$FILE" "${QPACKAGE_ROOT}/data/cache/$MD5"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
EZFIO_FILE=$(basename ${1})
|
||||
|
||||
if [[ -z ${EZFIO_FILE} ]]
|
||||
then
|
||||
echo "Usage: $(basename $0) <EZFIO_FILE>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
cd "${QPACKAGE_ROOT}/EZFIO/src"
|
||||
FILES=($(python << EOF | sort
|
||||
from read_config import *
|
||||
for group in groups:
|
||||
if group == "ezfio":
|
||||
continue
|
||||
for d in groups[group]:
|
||||
if d[2] == ():
|
||||
suffix = ""
|
||||
else:
|
||||
suffix = ".gz"
|
||||
print group+'/'+d[0]+suffix
|
||||
print "ezfio/creation"
|
||||
print "ezfio/library"
|
||||
EOF
|
||||
))
|
||||
cd $OLDPWD
|
||||
|
||||
MD5_FILE=$(basename "${EZFIO_FILE}" .ezfio).md5
|
||||
rm -f -- "${MD5_FILE}"
|
||||
for FILE in ${FILES[@]}
|
||||
do
|
||||
FILE="${EZFIO_FILE}/${FILE}"
|
||||
MD5=$(md5sum "${FILE}" 2>/dev/null | cut -d ' ' -f 1)
|
||||
if [[ ! -z $MD5 ]]
|
||||
then
|
||||
if ! archive "$FILE" "$MD5"
|
||||
then
|
||||
rm -- "${MD5_FILE}"
|
||||
exit 1
|
||||
fi
|
||||
echo "$MD5" "$FILE" >> "${MD5_FILE}"
|
||||
fi
|
||||
done
|
||||
|
34
scripts/build_modules.sh
Executable file
34
scripts/build_modules.sh
Executable file
@ -0,0 +1,34 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# This script should run from the directory $QPACKAGE_ROOT/src
|
||||
|
||||
source ${QPACKAGE_ROOT}/scripts/run_Makefile_global.sh
|
||||
|
||||
NPROC=$(cat /proc/cpuinfo | grep MHz | wc -l)
|
||||
|
||||
export IN_MAKE=1
|
||||
|
||||
for MODULE in $@
|
||||
do
|
||||
if [[ ! -d ${MODULE} ]]
|
||||
then
|
||||
error "Module ${MODULE} doesn't exist"
|
||||
fi
|
||||
cd ${MODULE}
|
||||
echo ${MODULE}
|
||||
${QPACKAGE_ROOT}/scripts/run_Makefile_common.sh
|
||||
if [[ $# -eq 1 ]]
|
||||
then
|
||||
env make -j ${NPROC} all
|
||||
else
|
||||
env make -j ${NPROC} all &> make.log
|
||||
if [[ $? -ne 0 ]]
|
||||
then
|
||||
cat make.log
|
||||
error "
|
||||
Build failed for module $MODULE
|
||||
"
|
||||
fi
|
||||
fi
|
||||
cd ${OLDPWD}
|
||||
done
|
@ -10,13 +10,13 @@
|
||||
# read in the Makefile.
|
||||
# Thu Apr 3 01:44:23 CEST 2014
|
||||
|
||||
function unique_list()
|
||||
{
|
||||
for d in $@
|
||||
do
|
||||
echo $d
|
||||
done | sort | uniq
|
||||
}
|
||||
if [[ -z ${QPACKAGE_ROOT} ]]
|
||||
then
|
||||
print "The QPACKAGE_ROOT environment variable is not set."
|
||||
print "Please reload the quantum_package.rc file."
|
||||
exit -1
|
||||
fi
|
||||
source ${QPACKAGE_ROOT}/scripts/qp_include.sh
|
||||
|
||||
if [[ -z $1 ]]
|
||||
then
|
||||
|
36
scripts/clean_modules.sh
Executable file
36
scripts/clean_modules.sh
Executable file
@ -0,0 +1,36 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Cleans a module directory
|
||||
|
||||
if [[ -z ${QPACKAGE_ROOT} ]]
|
||||
then
|
||||
print "The QPACKAGE_ROOT environment variable is not set."
|
||||
print "Please reload the quantum_package.rc file."
|
||||
exit -1
|
||||
fi
|
||||
source ${QPACKAGE_ROOT}/scripts/qp_include.sh
|
||||
|
||||
function do_clean()
|
||||
{
|
||||
rm -rf -- \
|
||||
IRPF90_temp IRPF90_man Makefile.depend $(cat NEEDED_MODULES) include \
|
||||
ezfio_interface.irp.f irpf90.make irpf90_entities tags $(ls_exe)
|
||||
}
|
||||
|
||||
if [[ -z $1 ]]
|
||||
then
|
||||
check_current_dir_is_module
|
||||
do_clean
|
||||
else
|
||||
check_current_dir_is_src
|
||||
for i in $@
|
||||
do
|
||||
if [[ -d $i ]]
|
||||
then
|
||||
cd $i
|
||||
do_clean
|
||||
cd $OLDPWD
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
@ -6,17 +6,17 @@
|
||||
# module directory.
|
||||
# Thu Apr 3 01:44:41 CEST 2014
|
||||
|
||||
MODULE=$(basename "$PWD")
|
||||
|
||||
if [[ "$MODULE" == "src" ]]
|
||||
if [[ -z ${QPACKAGE_ROOT} ]]
|
||||
then
|
||||
echo "Error: This script should not be run in the src directory."
|
||||
exit 1
|
||||
print "The QPACKAGE_ROOT environment variable is not set."
|
||||
print "Please reload the quantum_package.rc file."
|
||||
exit -1
|
||||
fi
|
||||
source ${QPACKAGE_ROOT}/scripts/qp_include.sh
|
||||
|
||||
check_current_dir_is_module
|
||||
|
||||
cat << EOF > Makefile
|
||||
default: all
|
||||
|
||||
# Define here all new external source files and objects.Don't forget to prefix the
|
||||
# object files with IRPF90_temp/
|
||||
SRC=
|
||||
|
@ -6,9 +6,19 @@
|
||||
# files included by including other modules.
|
||||
# Thu Apr 3 01:44:09 CEST 2014
|
||||
|
||||
if [[ -z ${QPACKAGE_ROOT} ]]
|
||||
then
|
||||
print "The QPACKAGE_ROOT environment variable is not set."
|
||||
print "Please reload the quantum_package.rc file."
|
||||
exit -1
|
||||
fi
|
||||
source ${QPACKAGE_ROOT}/scripts/qp_include.sh
|
||||
|
||||
check_current_dir_is_module
|
||||
|
||||
SRC=""
|
||||
OBJ=""
|
||||
DEPS="$(cat NEEDED_MODULES)"
|
||||
DEPS="$NEEDED_MODULES"
|
||||
|
||||
for M in ${DEPS}
|
||||
do
|
||||
|
@ -4,13 +4,15 @@
|
||||
# This script is supposed to run in a module directory.
|
||||
# Thu Apr 3 13:38:38 CEST 2014
|
||||
|
||||
MODULE=$(basename $PWD)
|
||||
|
||||
if [[ $MODULE == "src" ]]
|
||||
if [[ -z ${QPACKAGE_ROOT} ]]
|
||||
then
|
||||
echo "Error: This script should not be run in the src directory."
|
||||
exit 1
|
||||
print "The QPACKAGE_ROOT environment variable is not set."
|
||||
print "Please reload the quantum_package.rc file."
|
||||
exit -1
|
||||
fi
|
||||
source ${QPACKAGE_ROOT}/scripts/qp_include.sh
|
||||
|
||||
check_current_dir_is_module
|
||||
|
||||
OUTPUT=$(${QPACKAGE_ROOT}/scripts/check_dependencies.sh $@)
|
||||
echo ${OUTPUT} > NEEDED_MODULES
|
||||
|
@ -5,6 +5,16 @@
|
||||
# Tue Jan 13 14:18:05 CET 2015
|
||||
#
|
||||
|
||||
if [[ -z ${QPACKAGE_ROOT} ]]
|
||||
then
|
||||
print "The QPACKAGE_ROOT environment variable is not set."
|
||||
print "Please reload the quantum_package.rc file."
|
||||
exit -1
|
||||
fi
|
||||
source ${QPACKAGE_ROOT}/scripts/qp_include.sh
|
||||
|
||||
check_current_dir_is_module
|
||||
|
||||
cat << EOF > .gitignore
|
||||
#
|
||||
# Do not modify this file. Add your ignored files to the gitignore
|
||||
|
@ -7,7 +7,17 @@
|
||||
# All remaining aruments are dependencies.
|
||||
# Thu Apr 3 01:44:58 CEST 2014
|
||||
|
||||
DEBUG=1
|
||||
if [[ -z ${QPACKAGE_ROOT} ]]
|
||||
then
|
||||
print "The QPACKAGE_ROOT environment variable is not set."
|
||||
print "Please reload the quantum_package.rc file."
|
||||
exit -1
|
||||
fi
|
||||
source ${QPACKAGE_ROOT}/scripts/qp_include.sh
|
||||
|
||||
check_current_dir_is_src
|
||||
|
||||
DEBUG=0
|
||||
|
||||
# If DEBUG=1, the print debug info.
|
||||
function debug()
|
||||
@ -36,13 +46,6 @@ function fail()
|
||||
}
|
||||
|
||||
|
||||
if [[ -z $QPACKAGE_ROOT ]]
|
||||
then
|
||||
echo "Error:"
|
||||
echo "QPACKAGE_ROOT environment variable is not set."
|
||||
echo "source quantum_package.rc"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
MODULE=$1
|
||||
|
||||
@ -68,7 +71,7 @@ debug "Module does not already exist: OK"
|
||||
|
||||
|
||||
# Set up dependencies
|
||||
ALL_MODULES="$(cat NEEDED_MODULES)"
|
||||
ALL_MODULES="${NEEDED_MODULES}"
|
||||
echo "Select which modules you are sure you will need: (press q to quit)"
|
||||
NEEDED_MODULES=""
|
||||
select M in ${ALL_MODULES}
|
||||
|
@ -3,24 +3,15 @@
|
||||
# Creates the rst files when creating a new module.
|
||||
# Thu Apr 3 11:54:16 CEST 2014
|
||||
|
||||
MODULE=$(basename $PWD)
|
||||
|
||||
if [[ $MODULE == "src" ]]
|
||||
if [[ -z ${QPACKAGE_ROOT} ]]
|
||||
then
|
||||
echo "Error: This script should not be run in the src directory."
|
||||
exit 1
|
||||
print "The QPACKAGE_ROOT environment variable is not set."
|
||||
print "Please reload the quantum_package.rc file."
|
||||
exit -1
|
||||
fi
|
||||
source ${QPACKAGE_ROOT}/scripts/qp_include.sh
|
||||
|
||||
function asksure() {
|
||||
echo -n $@ "(Y/N) "
|
||||
answer=w
|
||||
while [[ $answer != [YyNn] ]]
|
||||
do
|
||||
read answer
|
||||
[[ $answer = [Yy] ]] && retval=0 || retval=1
|
||||
done
|
||||
return $retval
|
||||
}
|
||||
check_current_dir_is_module
|
||||
|
||||
README="True"
|
||||
if [[ -f README.rst ]]
|
||||
|
@ -184,15 +184,26 @@ def save_ezfio_provider(path_head, dict_code_provider):
|
||||
|
||||
path = "{0}/ezfio_interface.irp.f".format(path_head)
|
||||
|
||||
print "Path = {}".format(path)
|
||||
# print "Path = {}".format(path)
|
||||
|
||||
with open(path, "w") as f:
|
||||
f.write("!DO NOT MODIFY BY HAND \n")
|
||||
f.write("!Created by $QPACKAGE_ROOT/scripts/ezfio_interface.py \n")
|
||||
f.write("!from file {0}/EZFIO.cfg\n".format(path_head))
|
||||
f.write("\n")
|
||||
try:
|
||||
f = open(path, "r")
|
||||
except IOError:
|
||||
old_output = ""
|
||||
else:
|
||||
old_output = f.read()
|
||||
f.close()
|
||||
|
||||
output = "! DO NOT MODIFY BY HAND\n" + \
|
||||
"! Created by $QPACKAGE_ROOT/scripts/ezfio_interface.py\n" + \
|
||||
"! from file {0}/EZFIO.cfg\n".format(path_head) + \
|
||||
"\n"
|
||||
for provider_name, code in dict_code_provider.iteritems():
|
||||
f.write(code + "\n")
|
||||
output += code + "\n"
|
||||
|
||||
if output != old_output:
|
||||
with open(path, "w") as f:
|
||||
f.write(output)
|
||||
|
||||
|
||||
def create_ezfio_config(dict_ezfio_cfg, opt, folder):
|
||||
@ -220,8 +231,17 @@ def save_ezfio_config(folder, str_ezfio_config):
|
||||
path = "{0}/config/{1}.ezfio_interface_config".format(ezfio_dir,
|
||||
folder)
|
||||
|
||||
print "Path = {}".format(path)
|
||||
# print "Path = {}".format(path)
|
||||
|
||||
try:
|
||||
f = open(path, "r")
|
||||
except IOError:
|
||||
old_output = ""
|
||||
else:
|
||||
old_output = f.read()
|
||||
f.close()
|
||||
|
||||
if str_ezfio_config != old_output:
|
||||
with open(path, "w") as f:
|
||||
f.write(str_ezfio_config)
|
||||
|
||||
@ -238,28 +258,25 @@ def main():
|
||||
path = os.path.expanduser(path)
|
||||
path = os.path.expandvars(path)
|
||||
path = os.path.abspath(path)
|
||||
print path
|
||||
# print path
|
||||
|
||||
path_dirname = os.path.dirname(path)
|
||||
folder = [i for i in path_dirname.split("/") if i][-1]
|
||||
folder = folder.lower()
|
||||
|
||||
print "Find a EZFIO.cfg in {}".format(path)
|
||||
# print "Found a EZFIO.cfg in {}".format(path)
|
||||
dict_info_provider = get_dict_config_file(path,folder)
|
||||
|
||||
print "Generating the ezfio_interface.irp.f: \n"
|
||||
# print "Generating the ezfio_interface.irp.f: \n"
|
||||
d_config = create_ezfio_provider(dict_info_provider)
|
||||
# for provider, code in d_config.iteritems():
|
||||
# print code
|
||||
|
||||
print "Saving the ezfio_interface.irp.f"
|
||||
# print "Saving the ezfio_interface.irp.f"
|
||||
save_ezfio_provider(path_dirname, d_config)
|
||||
|
||||
print "Generating the ezfio_config"
|
||||
# print "Generating the ezfio_config"
|
||||
config_ezfio = create_ezfio_config(dict_info_provider, "config", folder)
|
||||
# print config_ezfio
|
||||
|
||||
print "Saving ezfio_config"
|
||||
# print "Saving ezfio_config"
|
||||
save_ezfio_config(folder, config_ezfio)
|
||||
|
||||
|
||||
|
@ -8,6 +8,13 @@
|
||||
# Prints in stdout the name of a temporary file containing the basis set.
|
||||
#
|
||||
|
||||
if [[ -z ${QPACKAGE_ROOT} ]]
|
||||
then
|
||||
print "The QPACKAGE_ROOT environment variable is not set."
|
||||
print "Please reload the quantum_package.rc file."
|
||||
exit -1
|
||||
fi
|
||||
|
||||
export EMSL_API_ROOT="${QPACKAGE_ROOT}"/EMSL_Basis/
|
||||
export PYTHONPATH="${EMSL_API_ROOT}":${PYTHONPATH}
|
||||
|
||||
@ -15,8 +22,11 @@ tmpfile="$1"
|
||||
shift
|
||||
|
||||
# Case insensitive basis in input
|
||||
basis=$( ${EMSL_API_ROOT}/EMSL_api.py list_basis | cut -d "'" -f 2 | grep -i "^${1}\$")
|
||||
#basis=$( ${EMSL_API_ROOT}/EMSL_api.py list_basis | cut -d "'" -f 2 | grep -i "^${1}\$")
|
||||
|
||||
basis="$1"
|
||||
shift
|
||||
|
||||
atoms=""
|
||||
|
||||
for atom in $@
|
||||
|
@ -6,12 +6,11 @@
|
||||
CURL="curl-7.30.0.ermine"
|
||||
CURL_URL="http://qmcchem.ups-tlse.fr/files/scemama/${CURL}.tar.bz2"
|
||||
|
||||
# Check the QPACKAGE_ROOT directory
|
||||
if [[ -z ${QPACKAGE_ROOT} ]]
|
||||
then
|
||||
echo "The QPACKAGE_ROOT environment variable is not set."
|
||||
echo "Please reload the quantum_package.rc file."
|
||||
exit 1
|
||||
print "The QPACKAGE_ROOT environment variable is not set."
|
||||
print "Please reload the quantum_package.rc file."
|
||||
exit -1
|
||||
fi
|
||||
|
||||
cd ${QPACKAGE_ROOT}
|
||||
|
@ -6,18 +6,18 @@
|
||||
BASE="EMSL_Basis_Set_Exchange_Local"
|
||||
URL="https://github.com/LCPQ/${BASE}/archive/master.tar.gz"
|
||||
|
||||
# Check the QPACKAGE_ROOT directory
|
||||
if [[ -z ${QPACKAGE_ROOT} ]]
|
||||
then
|
||||
echo "The QPACKAGE_ROOT environment variable is not set."
|
||||
echo "Please reload the quantum_package.rc file."
|
||||
exit 1
|
||||
print "The QPACKAGE_ROOT environment variable is not set."
|
||||
print "Please reload the quantum_package.rc file."
|
||||
exit -1
|
||||
fi
|
||||
|
||||
cd ${QPACKAGE_ROOT}
|
||||
|
||||
${QPACKAGE_ROOT}/scripts/fetch_from_web.py ${URL} ${QPACKAGE_ROOT}/${BASE}.tar.gz
|
||||
tar -zxf ${BASE}.tar.gz && rm ${BASE}.tar.gz ||exit 1
|
||||
rm -rf EMSL_Basis
|
||||
mv ${BASE}-master EMSL_Basis
|
||||
|
||||
|
||||
|
@ -6,17 +6,15 @@
|
||||
BASE="ezfio"
|
||||
URL="https://github.com/LCPQ/${BASE}/archive/master.tar.gz"
|
||||
|
||||
# Check the QPACKAGE_ROOT directory
|
||||
if [[ -z ${QPACKAGE_ROOT} ]]
|
||||
then
|
||||
echo "The QPACKAGE_ROOT environment variable is not set."
|
||||
echo "Please reload the quantum_package.rc file."
|
||||
exit 1
|
||||
print "The QPACKAGE_ROOT environment variable is not set."
|
||||
print "Please reload the quantum_package.rc file."
|
||||
exit -1
|
||||
fi
|
||||
|
||||
cd ${QPACKAGE_ROOT}
|
||||
|
||||
|
||||
rm -rf -- EZFIO
|
||||
${QPACKAGE_ROOT}/scripts/fetch_from_web.py ${URL} ${QPACKAGE_ROOT}/${BASE}.tar.gz
|
||||
tar -zxf ${BASE}.tar.gz && rm ${BASE}.tar.gz ||exit 1
|
||||
|
@ -45,7 +45,8 @@ then
|
||||
done
|
||||
fi
|
||||
fi
|
||||
scripts/fetch_from_web.py "https://raw.github.com/ocaml/opam/master/shell/opam_installer.sh" opam_installer.sh
|
||||
${QPACKAGE_ROOT}/scripts/fetch_from_web.py \
|
||||
"https://raw.github.com/ocaml/opam/master/shell/opam_installer.sh" opam_installer.sh
|
||||
chmod +x opam_installer.sh
|
||||
echo N | ./opam_installer.sh ${QPACKAGE_ROOT}/bin
|
||||
|
||||
@ -53,6 +54,7 @@ if [[ ! -f ${QPACKAGE_ROOT}/bin/opam ]]; then
|
||||
echo "Installation of OPAM failed"
|
||||
exit 2
|
||||
fi
|
||||
rm opam_installer.sh
|
||||
${QPACKAGE_ROOT}/bin/opam config setup -a --dot-profile ${QPACKAGE_ROOT}/quantum_package.rc
|
||||
|
||||
source ${QPACKAGE_ROOT}/quantum_package.rc
|
||||
|
18
scripts/prepare_ezfio.sh
Executable file
18
scripts/prepare_ezfio.sh
Executable file
@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
# Prepares the EZFIO library before running make
|
||||
# Wed Mar 25 21:25:11 CET 2015
|
||||
|
||||
echo "Building EZFIO library"
|
||||
echo "=-=-=-=-=-=-=-=-=-=-=-"
|
||||
|
||||
# Interpret all the EZFIO.cfg files
|
||||
for dir in ${QPACKAGE_ROOT}/src/*/
|
||||
do
|
||||
cd $dir || exit -1
|
||||
${QPACKAGE_ROOT}/scripts/ezfio_interface.py
|
||||
done
|
||||
|
||||
# For old-style directories. Will be removed some day...
|
||||
cp ${QPACKAGE_ROOT}/src{/*,}/*.ezfio_config ${QPACKAGE_ROOT}/EZFIO/config
|
||||
|
||||
|
@ -1,15 +0,0 @@
|
||||
#!/bin/bash
|
||||
# This script is used by module Makefiles, and should not be used by users.
|
||||
# Checks if all the other module directories are properly linked in the
|
||||
# current directory. If not, the links are created.
|
||||
# Wed Apr 2 14:35:42 CEST 2014
|
||||
|
||||
for dir in $@
|
||||
do
|
||||
if [[ ! -h $dir ]] ;
|
||||
then
|
||||
ln -s ../$dir $dir
|
||||
fi
|
||||
done
|
||||
|
||||
|
80
scripts/qp_include.sh
Normal file
80
scripts/qp_include.sh
Normal file
@ -0,0 +1,80 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Useful functions in all scripts
|
||||
|
||||
# Make a list unique
|
||||
function unique_list()
|
||||
{
|
||||
for d in $@
|
||||
do
|
||||
echo $d
|
||||
done | sort | uniq
|
||||
}
|
||||
|
||||
function check_current_dir_is_src()
|
||||
{
|
||||
if [[ "${PWD}" == "${QPACKAGE_ROOT}/src" ]]
|
||||
then
|
||||
return 0
|
||||
else
|
||||
echo "Current directory should be \$QPACKAGE_ROOT/src"
|
||||
exit -1
|
||||
fi
|
||||
}
|
||||
|
||||
function check_current_dir_is_module()
|
||||
{
|
||||
cd ..
|
||||
if [[ "${PWD}" == "${QPACKAGE_ROOT}/src" ]]
|
||||
then
|
||||
cd $OLDPWD
|
||||
return 0
|
||||
else
|
||||
cd $OLDPWD
|
||||
echo "Current directory should be \$QPACKAGE_ROOT/src"
|
||||
exit -1
|
||||
fi
|
||||
}
|
||||
if [[ -f NEEDED_MODULES ]]
|
||||
then
|
||||
NEEDED_MODULES=$(cat NEEDED_MODULES)
|
||||
fi
|
||||
|
||||
# List of executables in the current directory
|
||||
function ls_exe()
|
||||
{
|
||||
find . -perm /u+x -type f
|
||||
}
|
||||
|
||||
function asksure() {
|
||||
echo -n $@ "(Y/N) "
|
||||
answer=w
|
||||
while [[ $answer != [YyNn] ]]
|
||||
do
|
||||
read answer
|
||||
[[ $answer = [Yy] ]] && retval=0 || retval=1
|
||||
done
|
||||
return $retval
|
||||
}
|
||||
|
||||
function error()
|
||||
{
|
||||
echo "-------------------- Error --------------------"
|
||||
printf "$@\n"
|
||||
echo "-----------------------------------------------"
|
||||
exit -1
|
||||
}
|
||||
|
||||
if [[ -z ${DEBUG} ]]
|
||||
then
|
||||
function info ()
|
||||
{
|
||||
:
|
||||
}
|
||||
else
|
||||
function info ()
|
||||
{
|
||||
echo "$@"
|
||||
}
|
||||
fi
|
||||
|
69
scripts/run_Makefile_common.sh
Executable file
69
scripts/run_Makefile_common.sh
Executable file
@ -0,0 +1,69 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Checks to run in every Module directory before building
|
||||
|
||||
if [[ -z ${QPACKAGE_ROOT} ]]
|
||||
then
|
||||
print "The QPACKAGE_ROOT environment variable is not set."
|
||||
print "Please reload the quantum_package.rc file."
|
||||
exit -1
|
||||
fi
|
||||
source ${QPACKAGE_ROOT}/scripts/qp_include.sh
|
||||
|
||||
check_current_dir_is_module
|
||||
|
||||
# Check if the NEEDED_MODULES file is consistent
|
||||
INCLUDE_DIRS="${NEEDED_MODULES} include"
|
||||
NEEDED_MODULES_OK=$( ${QPACKAGE_ROOT}/scripts/check_dependencies.sh ${NEEDED_MODULES} )
|
||||
if [[ $? -ne 0 ]]
|
||||
then
|
||||
error "
|
||||
Your NEEDED_MODULES file is inconsistent. It should be
|
||||
${NEEDED_MODULES_OK}
|
||||
"
|
||||
else
|
||||
info "NEEDED_MODULES files is consistent"
|
||||
fi
|
||||
|
||||
# Check if README.rst exists
|
||||
if [[ ! -f README.rst ]]
|
||||
then
|
||||
${QPACKAGE_ROOT}/scripts/create_rst_templates.sh
|
||||
error "
|
||||
README.rst was not present, so I created a
|
||||
default one for you.
|
||||
You should document it before you compile, as
|
||||
well as the ASSUMPTIONS.rst file.
|
||||
"
|
||||
else
|
||||
info "README.rst is present"
|
||||
fi
|
||||
|
||||
|
||||
# Check if ASSUMPTIONS.rst exists
|
||||
if [[ ! -f ASSUMPTIONS.rst ]]
|
||||
then
|
||||
error "This is a Bug. At that point, the ASSUMPTIONS.rst) file should exist."
|
||||
else
|
||||
info "ASSUMPTIONS.rst is present."
|
||||
fi
|
||||
|
||||
|
||||
# Create symbolic links of other modules
|
||||
if [[ $PWD != ${QPACKAGE_ROOT}/src ]]
|
||||
then
|
||||
for dir in ${INCLUDE_DIRS}
|
||||
do
|
||||
if [[ ! -h $dir ]] ;
|
||||
then
|
||||
ln -s ../$dir $dir
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# Update Makefile.depend
|
||||
${QPACKAGE_ROOT}/scripts/create_Makefile_depend.sh
|
||||
|
||||
# Update EZFIO interface
|
||||
${QPACKAGE_ROOT}/scripts/ezfio_interface.py
|
||||
|
81
scripts/run_Makefile_global.sh
Executable file
81
scripts/run_Makefile_global.sh
Executable file
@ -0,0 +1,81 @@
|
||||
#!/bin/bash
|
||||
# Makes several checks before compiling.
|
||||
# Wed Mar 25 21:22:18 CET 2015
|
||||
|
||||
# Required EZFIO version
|
||||
EZFIO_REQUIRED_VERSION=1.1
|
||||
|
||||
# Required IRPF90 version
|
||||
IRPF90_REQUIRED_VERSION=1.5
|
||||
|
||||
if [[ -z ${QPACKAGE_ROOT} ]]
|
||||
then
|
||||
print "The QPACKAGE_ROOT environment variable is not set."
|
||||
print "Please reload the quantum_package.rc file."
|
||||
exit -1
|
||||
fi
|
||||
source ${QPACKAGE_ROOT}/scripts/qp_include.sh
|
||||
|
||||
check_current_dir_is_src
|
||||
|
||||
|
||||
# Check if the user's config exists
|
||||
if [[ ! -f ${QPACKAGE_ROOT}/src/Makefile.config ]]
|
||||
then
|
||||
error "
|
||||
Makefile.config is not present.
|
||||
You can create Makefile.config
|
||||
by modifying Makefile.config.example
|
||||
"
|
||||
else
|
||||
info "Makefile.config is present"
|
||||
fi
|
||||
|
||||
|
||||
IRPF90_VERSION=$( ${IRPF90} -v )
|
||||
python << EOF
|
||||
import sys
|
||||
irp_version = float("${IRPF90_VERSION}".rsplit('.',1)[0])
|
||||
irp_required_version = float($IRPF90_REQUIRED_VERSION)
|
||||
if irp_version < irp_required_version:
|
||||
sys.exit(-1)
|
||||
EOF
|
||||
|
||||
if [[ $? -ne 0 ]]
|
||||
then
|
||||
error "
|
||||
Current IRPF90 version :
|
||||
\$ ${IRPF90} -v
|
||||
${IRPF90_VERSION}.
|
||||
|
||||
IRPF90 version >= ${IRPF90_REQUIRED_VERSION} is required.
|
||||
To upgrade IRPF90, run :
|
||||
${QPACKAGE_ROOT}/scripts/upgrade_irpf90.sh
|
||||
"
|
||||
else
|
||||
info "irpf90 version is OK"
|
||||
fi
|
||||
|
||||
|
||||
# Check EZFIO version
|
||||
EZFIO_VERSION=$(cat ${QPACKAGE_ROOT}/EZFIO/version | cut -d '=' -f 2)
|
||||
python << EOF
|
||||
import sys
|
||||
ezfio_version = float("${EZFIO_VERSION}".rsplit('.',1)[0])
|
||||
ezfio_required_version = float($EZFIO_REQUIRED_VERSION)
|
||||
if ezfio_version < ezfio_required_version:
|
||||
sys.exit(-1)
|
||||
EOF
|
||||
|
||||
if [[ $? -ne 0 ]]
|
||||
then
|
||||
error "
|
||||
Current EZFIO version : ${EZFIO_VERSION}
|
||||
EZFIO version >= ${EZFIO_REQUIRED_VERSION} is required.
|
||||
To upgrade EZFIO, run :
|
||||
${QPACKAGE_ROOT}/scripts/upgrade_ezfio.sh
|
||||
"
|
||||
else
|
||||
info "EZFIO version is OK"
|
||||
fi
|
||||
|
@ -4,6 +4,13 @@
|
||||
# directory, where xxx is the corresponding mo_label.
|
||||
# Wed Apr 2 14:35:15 CEST 2014
|
||||
|
||||
if [[ -z ${QPACKAGE_ROOT} ]]
|
||||
then
|
||||
print "The QPACKAGE_ROOT environment variable is not set."
|
||||
print "Please reload the quantum_package.rc file."
|
||||
exit -1
|
||||
fi
|
||||
|
||||
EZFIO=$1
|
||||
|
||||
if [[ -z ${EZFIO} ]]
|
||||
|
@ -1,54 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Reads a *.md5 file, then fetches the proper data in the
|
||||
# cache and re-creates the EZFIO database.
|
||||
# If the cache data is not present, download it from
|
||||
# $QPACKAGE_CACHE_URL
|
||||
# Fri Apr 4 01:02:53 CEST 2014
|
||||
|
||||
if [[ -z ${QPACKAGE_ROOT} ]]
|
||||
then
|
||||
print "The QPACKAGE_ROOT environment variable is not set."
|
||||
print "Please reload the quantum_package.rc file."
|
||||
fi
|
||||
|
||||
EZFIO_FILE=$(basename $(basename ${1} .md5))
|
||||
|
||||
if [[ -z $1 ]]
|
||||
then
|
||||
echo "Usage: $(basename $0) <EZFIO_FILE.md5>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ ! -f ${EZFIO_FILE}.md5 ]]
|
||||
then
|
||||
echo "Error: ${EZFIO_FILE}.md5 does not exist."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
key=($(cut -d ' ' -f 1 ${EZFIO_FILE}.md5))
|
||||
filename=($(cut -d ' ' -f 2 ${EZFIO_FILE}.md5))
|
||||
|
||||
if [[ -z ${QPACKAGE_CACHE_URL} ]]
|
||||
then
|
||||
echo "Error: The QPACKAGE_CACHE_URL environment variable is not set."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
VERSION=$( cut -d '=' -f 2 < ${QPACKAGE_ROOT}/EZFIO/version)
|
||||
for i in ${!key[@]}
|
||||
do
|
||||
MD5=${key[$i]}
|
||||
file=${filename[$i]}
|
||||
if [[ ! -d $file ]]
|
||||
then
|
||||
mkdir -p $(dirname $file)
|
||||
echo ${VERSION} > $(dirname $file)/.version
|
||||
fi
|
||||
if [[ ! -f ${QPACKAGE_ROOT}/data/cache/${MD5} ]]
|
||||
then
|
||||
${QPACKAGE_ROOT}/scripts/fetch_from_web.py ${QPACKAGE_CACHE_URL}/${MD5} ${QPACKAGE_ROOT}/data/cache/${MD5}
|
||||
fi
|
||||
cp ${QPACKAGE_ROOT}/data/cache/${MD5} ${file}
|
||||
done
|
||||
echo ${VERSION} > ${EZFIO_FILE}.ezfio/.version
|
@ -12,7 +12,7 @@ fi
|
||||
cd -- ${QPACKAGE_ROOT}
|
||||
mv -- ${QPACKAGE_ROOT}/EZFIO ${QPACKAGE_ROOT}/EZFIO.old
|
||||
|
||||
make EZFIO
|
||||
${QPACKAGE_ROOT}/scripts/install_ezfio.sh
|
||||
|
||||
if [[ $? -eq 0 ]]
|
||||
then
|
||||
|
@ -75,6 +75,9 @@ source ${QPACKAGE_ROOT}/quantum_package.rc
|
||||
" $BLACK
|
||||
|
||||
|
||||
mkdir -f install_logs
|
||||
mv *.log install_logs/
|
||||
|
||||
if [[ $1 == "--robot" ]] ;
|
||||
then
|
||||
exit 0
|
||||
|
@ -1,5 +1,3 @@
|
||||
default: all
|
||||
|
||||
# Define here all new external source files and objects.Don't forget to prefix the
|
||||
# object files with IRPF90_temp/
|
||||
SRC=
|
||||
|
@ -1,5 +1,3 @@
|
||||
default: all
|
||||
|
||||
# Define here all new external source files and objects.Don't forget to prefix the
|
||||
# object files with IRPF90_temp/
|
||||
SRC=
|
||||
|
@ -1,5 +1,3 @@
|
||||
default: all
|
||||
|
||||
# Define here all new external source files and objects.Don't forget to prefix the
|
||||
# object files with IRPF90_temp/
|
||||
SRC=bitmasks_module.f90
|
||||
|
@ -1,5 +1,3 @@
|
||||
default: all
|
||||
|
||||
# Define here all new external source files and objects.Don't forget to prefix the
|
||||
# object files with IRPF90_temp/
|
||||
SRC=
|
||||
|
@ -1,5 +1,3 @@
|
||||
default: all
|
||||
|
||||
# Define here all new external source files and objects.Don't forget to prefix the
|
||||
# object files with IRPF90_temp/
|
||||
SRC=
|
||||
|
@ -1,5 +1,3 @@
|
||||
default: all
|
||||
|
||||
# Define here all new external source files and objects.Don't forget to prefix the
|
||||
# object files with IRPF90_temp/
|
||||
SRC=
|
||||
|
@ -1,5 +1,3 @@
|
||||
default: all
|
||||
|
||||
# Define here all new external source files and objects.Don't forget to prefix the
|
||||
# object files with IRPF90_temp/
|
||||
SRC=
|
||||
|
@ -1,5 +1,3 @@
|
||||
default: all
|
||||
|
||||
# Define here all new external source files and objects.Don't forget to prefix the
|
||||
# object files with IRPF90_temp/
|
||||
SRC=
|
||||
|
@ -1,5 +1,3 @@
|
||||
default: all
|
||||
|
||||
# Define here all new external source files and objects.Don't forget to prefix the
|
||||
# object files with IRPF90_temp/
|
||||
SRC=
|
||||
|
@ -1,5 +1,3 @@
|
||||
default: all
|
||||
|
||||
# Define here all new external source files and objects.Don't forget to prefix the
|
||||
# object files with IRPF90_temp/
|
||||
SRC=
|
||||
|
@ -1,5 +1,3 @@
|
||||
default: all
|
||||
|
||||
# Define here all new external source files and objects.Don't forget to prefix the
|
||||
# object files with IRPF90_temp/
|
||||
SRC=
|
||||
|
@ -1,5 +1,3 @@
|
||||
default: all
|
||||
|
||||
# Define here all new external source files and objects.Don't forget to prefix the
|
||||
# object files with IRPF90_temp/
|
||||
SRC=
|
||||
|
@ -1,5 +1,3 @@
|
||||
default: all
|
||||
|
||||
# Define here all new external source files and objects.Don't forget to prefix the
|
||||
# object files with IRPF90_temp/
|
||||
SRC=H_apply_template.f
|
||||
|
@ -1,5 +1,3 @@
|
||||
default: all
|
||||
|
||||
# Define here all new external source files and objects.Don't forget to prefix the
|
||||
# object files with IRPF90_temp/
|
||||
SRC=
|
||||
|
@ -1,5 +1,3 @@
|
||||
default: all
|
||||
|
||||
# Define here all new external source files and objects.Don't forget to prefix the
|
||||
# object files with IRPF90_temp/
|
||||
SRC=
|
||||
|
@ -1,5 +1,3 @@
|
||||
default: all
|
||||
|
||||
# Define here all new external source files and objects.Don't forget to prefix the
|
||||
# object files with IRPF90_temp/
|
||||
SRC=
|
||||
|
@ -1,5 +1,3 @@
|
||||
default: all
|
||||
|
||||
# Define here all new external source files and objects.Don't forget to prefix the
|
||||
# object files with IRPF90_temp/
|
||||
SRC=
|
||||
|
@ -1,5 +1,3 @@
|
||||
default: all
|
||||
|
||||
# Define here all new external source files and objects.Don't forget to prefix the
|
||||
# object files with IRPF90_temp/
|
||||
SRC=
|
||||
|
@ -1,5 +1,3 @@
|
||||
default: all
|
||||
|
||||
# Define here all new external source files and objects.Don't forget to prefix the
|
||||
# object files with IRPF90_temp/
|
||||
SRC=
|
||||
|
@ -1,5 +1,3 @@
|
||||
default: all
|
||||
|
||||
# Define here all new external source files and objects.Don't forget to prefix the
|
||||
# object files with IRPF90_temp/
|
||||
SRC=
|
||||
|
@ -1,5 +1,3 @@
|
||||
default: all
|
||||
|
||||
# Define here all new external source files and objects.Don't forget to prefix the
|
||||
# object files with IRPF90_temp/
|
||||
SRC=
|
||||
|
@ -1,5 +1,3 @@
|
||||
default: all
|
||||
|
||||
# Define here all new external source files and objects.Don't forget to prefix the
|
||||
# object files with IRPF90_temp/
|
||||
SRC=
|
||||
|
@ -1,5 +1,3 @@
|
||||
default: all
|
||||
|
||||
# Define here all new external source files and objects.Don't forget to prefix the
|
||||
# object files with IRPF90_temp/
|
||||
SRC=
|
||||
|
@ -1,5 +1,3 @@
|
||||
default: all
|
||||
|
||||
# Define here all new external source files and objects.Don't forget to prefix the
|
||||
# object files with IRPF90_temp/
|
||||
SRC=
|
||||
|
37
src/Makefile
37
src/Makefile
@ -1,19 +1,24 @@
|
||||
default: all
|
||||
ifndef QPACKAGE_ROOT
|
||||
$(error "QPACKAGE_ROOT is not defined. Please source quantum_package.rc")
|
||||
endif
|
||||
|
||||
SRC=
|
||||
OBJ=
|
||||
include Makefile.config
|
||||
|
||||
ALL_MODULES=$(shell cat NEEDED_MODULES)
|
||||
EZFIO_DIR=$(QPACKAGE_ROOT)/EZFIO
|
||||
EZFIO=$(EZFIO_DIR)/lib/libezfio_irp.a
|
||||
|
||||
.PHONY: executables all all_clean $(ALL_MODULES)
|
||||
.PHONY: $(ALL_MODULES)
|
||||
|
||||
all: $(ALL_MODULES)
|
||||
|
||||
all_clean:
|
||||
@for i in $(ALL_MODULES) ; do cd $$i ; make veryclean ; make clean_links ; cd .. ; done
|
||||
default: $(EZFIO)
|
||||
$(QPACKAGE_ROOT)/scripts/build_modules.sh $(ALL_MODULES)
|
||||
|
||||
$(ALL_MODULES): FORCE
|
||||
cd $@ ; make -j $$(cat /proc/cpuinfo | grep MHz | wc -l)
|
||||
veryclean:
|
||||
$(QPACKAGE_ROOT)/scripts/clean_modules.sh $(ALL_MODULES)
|
||||
|
||||
$(ALL_MODULES): $(EZFIO)
|
||||
$(QPACKAGE_ROOT)/scripts/build_modules.sh $@
|
||||
|
||||
executables: $(ALL_MODULES)
|
||||
rm -f executables ; \
|
||||
@ -21,7 +26,15 @@ executables: $(ALL_MODULES)
|
||||
do printf "%-30s %s\n" $$(basename $$EXE) $$EXE | sed "s|$(QPACKAGE_ROOT)|\$$QPACKAGE_ROOT|g" >> executables ;\
|
||||
done
|
||||
|
||||
# Dummy rule to enable to force recompilation
|
||||
FORCE:
|
||||
# Define the EZFIO rules
|
||||
$(EZFIO): $(wildcard $(QPACKAGE_ROOT)/src/*.ezfio_config) $(wildcard $(QPACKAGE_ROOT)/src/*/EZFIO.cfg)
|
||||
$(QPACKAGE_ROOT)/scripts/prepare_ezfio.sh
|
||||
cd $(EZFIO_DIR);\
|
||||
export FC="$(FC)" ; export FCFLAGS="$(FCFLAGS)" ; export IRPF90="$(IRPF90)" ;\
|
||||
$(MAKE) ;\
|
||||
$(MAKE) Python
|
||||
|
||||
# Frequent typos
|
||||
clena: clean
|
||||
veryclena: veryclean
|
||||
|
||||
veryclean: all_clean
|
||||
|
@ -1,160 +1,34 @@
|
||||
.PHONY: default
|
||||
.PHONY: default silent
|
||||
|
||||
ifneq ($(IN_MAKE),1)
|
||||
|
||||
default:
|
||||
@$(MAKE) -C $(QPACKAGE_ROOT)/src $$(basename $(PWD))
|
||||
|
||||
veryclean:
|
||||
clean_modules.sh
|
||||
|
||||
else # Called by scripts/build_module.sh
|
||||
|
||||
default: all .gitignore
|
||||
|
||||
# Required EZFIO version
|
||||
EZFIO_VERSION=1.1
|
||||
|
||||
# Required IRPF90 version
|
||||
IRPF90_VERSION=1.4
|
||||
|
||||
# Check if QPACKAGE_ROOT is defined
|
||||
|
||||
ifndef QPACKAGE_ROOT
|
||||
$(info -------------------- Error --------------------)
|
||||
$(info QPACKAGE_ROOT undefined. Run the setup_environment.sh script)
|
||||
$(info -----------------------------------------------)
|
||||
$(error )
|
||||
#else
|
||||
#$(info QPACKAGE_ROOT is defined.)
|
||||
endif
|
||||
|
||||
|
||||
# Check if the user's config exists
|
||||
|
||||
MAKEFILE_OK=$(shell ls $(QPACKAGE_ROOT)/src/Makefile.config 2> /dev/null && echo True || echo False)
|
||||
ifeq ($(MAKEFILE_OK),False)
|
||||
$(info -------------------- Error --------------------)
|
||||
$(info Makefile.config is not present.)
|
||||
$(info You can create Makefile.config)
|
||||
$(info by modifying Makefile.config.example)
|
||||
$(info -----------------------------------------------)
|
||||
$(error )
|
||||
#else
|
||||
#$(info Makefile.config is present.)
|
||||
endif
|
||||
|
||||
|
||||
# Include the user's config
|
||||
|
||||
include $(QPACKAGE_ROOT)/src/Makefile.config
|
||||
|
||||
|
||||
# Check the version of IRPF90
|
||||
|
||||
IRP_VERSION_OK=$(shell $(IRPF90) -v | python -c "import sys ; print float(sys.stdin.readline().rsplit('.',1)[0]) >= $(IRPF90_VERSION)")
|
||||
ifeq ($(IRP_VERSION_OK),False)
|
||||
$(info -------------------- Error --------------------)
|
||||
$(info IRPF90 version >= $(IRPF90_VERSION) is required)
|
||||
$(info To upgrade IRPF90, run : )
|
||||
$(info $(QPACKAGE_ROOT)/scripts/upgrade_irpf90.sh )
|
||||
$(info -----------------------------------------------)
|
||||
$(error )
|
||||
#else
|
||||
#$(info irpf90 version is OK.)
|
||||
endif
|
||||
|
||||
|
||||
# Create the NEEDED_MODULES variable, needed for IRPF90
|
||||
|
||||
NEEDED_MODULES=$(shell cat NEEDED_MODULES)
|
||||
|
||||
|
||||
# Check if the NEEDED_MODULES file is consistent
|
||||
|
||||
NEEDED_MODULES_OK=$(shell X=`$(QPACKAGE_ROOT)/scripts/check_dependencies.sh $(NEEDED_MODULES)` && echo OK || echo $$X)
|
||||
ifneq ($(NEEDED_MODULES_OK),OK)
|
||||
$(info -------------------- Error --------------------)
|
||||
$(info Your NEEDED_MODULES file is inconsistent. It should be)
|
||||
$(info $(NEEDED_MODULES_OK))
|
||||
$(info -----------------------------------------------)
|
||||
$(error )
|
||||
#else
|
||||
#$(info NEEDED_MODULES files is consistent.)
|
||||
endif
|
||||
|
||||
|
||||
# Check and update dependencies
|
||||
|
||||
include Makefile.depend
|
||||
|
||||
|
||||
# Check if README.rst exists
|
||||
|
||||
README_RST_OK=$(shell ls README.rst 2>/dev/null || echo False)
|
||||
ifeq ($(README_RST_OK), False)
|
||||
$(shell $(QPACKAGE_ROOT)/scripts/create_rst_templates.sh)
|
||||
$(info -------------------- Error --------------------)
|
||||
$(info README.rst was not present, so I created a)
|
||||
$(info default one for you.)
|
||||
$(info You should document it before you compile, as)
|
||||
$(info well as the ASSUMPTIONS.rst file.)
|
||||
$(info -----------------------------------------------)
|
||||
$(error )
|
||||
#else
|
||||
#$(info README.rst is present.)
|
||||
endif
|
||||
|
||||
|
||||
# Check if ASSUMPTIONS.rst exists
|
||||
|
||||
ASSUMPTIONS_RST_OK=$(shell ls ASSUMPTIONS.rst || echo False)
|
||||
ifeq ($(ASSUMPTIONS_RST_OK), False)
|
||||
$(info -------------------- Error --------------------)
|
||||
$(info This is a Bug. At that point, the ASSUMPTIONS.rst)
|
||||
$(info file should exist.)
|
||||
$(info -----------------------------------------------)
|
||||
#else
|
||||
#$(info ASSUMPTIONS.rst is present.)
|
||||
endif
|
||||
|
||||
|
||||
# Define the Makefile common variables
|
||||
|
||||
EZFIO_DIR=$(QPACKAGE_ROOT)/EZFIO
|
||||
EZFIO=$(EZFIO_DIR)/lib/libezfio_irp.a
|
||||
INCLUDE_DIRS=$(NEEDED_MODULES) include
|
||||
|
||||
# Check EZFIO version
|
||||
|
||||
EZFIO_VERSION_OK=$(shell cat $(EZFIO_DIR)/version | cut -d '=' -f 2 | python -c "import sys ; print float(sys.stdin.readline().rsplit('.',1)[0]) >= $(EZFIO_VERSION)")
|
||||
ifeq ($(EZFIO_VERSION_OK),False)
|
||||
$(info -------------------- Error --------------------)
|
||||
$(info EZFIO version >= $(EZFIO_VERSION) is required )
|
||||
$(info To upgrade EZFIO, run : )
|
||||
$(info $(QPACKAGE_ROOT)/scripts/upgrade_ezfio.sh )
|
||||
$(info -----------------------------------------------)
|
||||
$(error )
|
||||
#else
|
||||
#$(info EZFIO version is OK.)
|
||||
endif
|
||||
|
||||
# Define the EZFIO rules
|
||||
|
||||
$(EZFIO): $(wildcard $(QPACKAGE_ROOT)/src/*.ezfio_config) $(wildcard $(QPACKAGE_ROOT)/src/*/*.ezfio_config) $(wildcard $(QPACKAGE_ROOT)/src/*/EZFIO.cfg)
|
||||
@echo Building EZFIO library
|
||||
@echo =-=-=-=-=-=-=-=-=-=-=-
|
||||
for dir in $(QPACKAGE_ROOT)/src/*/ ;\
|
||||
do \
|
||||
cd $$dir && \
|
||||
$(QPACKAGE_ROOT)/scripts/ezfio_interface.py && \
|
||||
cd .. ;\
|
||||
done
|
||||
cp $(wildcard $(QPACKAGE_ROOT)/src/*.ezfio_config) $(wildcard $(QPACKAGE_ROOT)/src/*/*.ezfio_config) $(EZFIO_DIR)/config
|
||||
cd $(EZFIO_DIR) ; export FC="$(FC)" ; export FCFLAGS="$(FCFLAGS)" ; export IRPF90="$(IRPF90)" ; $(MAKE) ; $(MAKE) Python
|
||||
|
||||
ezfio: $(EZFIO)
|
||||
|
||||
|
||||
# Create symbolic links of other modules
|
||||
|
||||
ifneq ($(PWD),$(QPACKAGE_ROOT)/src)
|
||||
$(shell $(QPACKAGE_ROOT)/scripts/prepare_module.sh $(INCLUDE_DIRS))
|
||||
clean_links:
|
||||
rm -f $(INCLUDE_DIRS) $$(basename $$PWD)
|
||||
else
|
||||
clean_links:
|
||||
endif
|
||||
|
||||
LIB+=$(EZFIO) $(MKL)
|
||||
IRPF90+=$(patsubst %, -I %, $(INCLUDE_DIRS)) $(IRPF90_FLAGS)
|
||||
@ -163,22 +37,14 @@ irpf90.make: $(filter-out IRPF90_temp/%, $(wildcard */*.irp.f)) $(wildcard *.irp
|
||||
- $(IRPF90)
|
||||
- update_README.py
|
||||
|
||||
Makefile.depend: Makefile
|
||||
$(QPACKAGE_ROOT)/scripts/create_Makefile_depend.sh
|
||||
|
||||
ifneq ( $(PWD), $($(QPACKAGE_ROOT)/src))
|
||||
include irpf90.make
|
||||
|
||||
endif
|
||||
|
||||
# Dummy rule to enable to force recompilation
|
||||
FORCE:
|
||||
|
||||
vercylean: veryclean
|
||||
|
||||
.gitignore:
|
||||
$(QPACKAGE_ROOT)/scripts/create_gitignore.sh
|
||||
|
||||
|
||||
# Frequent typos
|
||||
clena: clean
|
||||
veryclena: veryclean
|
||||
vercylean: veryclean
|
||||
|
@ -1,5 +1,3 @@
|
||||
default: all
|
||||
|
||||
# Define here all new external source files and objects.Don't forget to prefix the
|
||||
# object files with IRPF90_temp/
|
||||
SRC=
|
||||
|
@ -1,5 +1,3 @@
|
||||
default: all
|
||||
|
||||
# Define here all new external source files and objects.Don't forget to prefix the
|
||||
# object files with IRPF90_temp/
|
||||
SRC=
|
||||
|
@ -1 +1 @@
|
||||
AOs BiInts Bitmask Dets Electrons Ezfio_files Full_CI Generators_full Hartree_Fock MOGuess MonoInts MOs Nuclei Output Selectors_full Utils Molden FCIdump Generators_CAS CAS_SD_selected DDCI_selected
|
||||
AOs BiInts Bitmask CID CID_SC2_selected CID_selected CIS CISD CISD_selected CISD_SC2_selected Dets Electrons Ezfio_files Full_CI Generators_full Hartree_Fock MOGuess MonoInts MOs MP2 Nuclei Output Selectors_full Utils Molden FCIdump Generators_CAS CAS_SD_selected DDCI_selected
|
||||
|
@ -1,5 +1,3 @@
|
||||
default: all
|
||||
|
||||
# Define here all new external source files and objects.Don't forget to prefix the
|
||||
# object files with IRPF90_temp/
|
||||
SRC=
|
||||
|
@ -1,5 +1,3 @@
|
||||
default: all
|
||||
|
||||
# Define here all new external source files and objects.Don't forget to prefix the
|
||||
# object files with IRPF90_temp/
|
||||
SRC=
|
||||
|
@ -1,5 +1,3 @@
|
||||
default: all
|
||||
|
||||
# Define here all new external source files and objects.Don't forget to prefix the
|
||||
# object files with IRPF90_temp/
|
||||
SRC=perturbation_template.f
|
||||
|
@ -1,5 +1,3 @@
|
||||
default: all
|
||||
|
||||
# Define here all new external source files and objects.Don't forget to prefix the
|
||||
# object files with IRPF90_temp/
|
||||
SRC=
|
||||
|
@ -1,5 +1,3 @@
|
||||
default: all
|
||||
|
||||
# Define here all new external source files and objects.Don't forget to prefix the
|
||||
# object files with IRPF90_temp/
|
||||
SRC=
|
||||
|
@ -1,5 +1,3 @@
|
||||
default: all
|
||||
|
||||
# Define here all new external source files and objects.Don't forget to prefix the
|
||||
# object files with IRPF90_temp/
|
||||
SRC=
|
||||
|
@ -1,5 +1,3 @@
|
||||
default: all
|
||||
|
||||
# Define here all new external source files and objects.Don't forget to prefix the
|
||||
# object files with IRPF90_temp/
|
||||
SRC=
|
||||
|
@ -1,5 +1,3 @@
|
||||
default: all
|
||||
|
||||
# Define here all new external source files and objects.Don't forget to prefix the
|
||||
# object files with IRPF90_temp/
|
||||
SRC=map_module.f90
|
||||
|
Loading…
Reference in New Issue
Block a user