diff --git a/Makefile b/Makefile deleted file mode 100644 index 4aa24d00..00000000 --- a/Makefile +++ /dev/null @@ -1,49 +0,0 @@ -BLUE= -BLACK=(B - - -.PHONY: doc src ocaml build binary - -default: - @echo ----------------------------------------------- - @echo To set up the environment, run - @echo ./setup_environment.sh - @echo - @echo To compile everything, run - @echo make build - @echo - @echo To compile a binary distribution for export, run - @echo make binary - @echo ----------------------------------------------- - -ifndef QPACKAGE_ROOT -build: - @echo -------------------- Error -------------------- - @echo QPACKAGE_ROOT undefined. - @echo Run - @echo ./setup_environment.sh - @echo or - @echo source quantum_package.rc - @echo ----------------------------------------------- -else -build: - $(MAKE) -C src - $(MAKE) -C ocaml -endif - -binary: - $(QPACKAGE_ROOT)/scripts/make_binary.sh - -doc: - $(MAKE) -C doc - -src: - $(MAKE) -C src - -ocaml: - $(MAKE) ocaml/Qptypes.ml - -veryclean: - rm -rf EZFIO - rm -rf resultsFile - $(MAKE) -C src veryclean diff --git a/scripts/compilation/create_ninja_build.py b/scripts/compilation/create_ninja_build.py index 093312fc..f48c49c4 100755 --- a/scripts/compilation/create_ninja_build.py +++ b/scripts/compilation/create_ninja_build.py @@ -9,9 +9,9 @@ import sys import glob from os.path import join from collections import namedtuple +from collections import defaultdict try: - from module_handler import file_dependency from module_handler import get_dict_module_boss, get_dict_genealogy_desc from read_compilation_cfg import get_compilation_option from docopt import docopt @@ -296,32 +296,55 @@ def ninja_symlink_build(path_module, l_symlink): # o ._ ._ _|_ (_| / \ ._ _ _. | _ # | | |_) | | \_/ o | | | (_| |< (/_ # | -def get_l_irp_for_module(path_module_abs): +def get_l_file_for_module(path_module_abs): ''' return the list of irp.f in a module ''' - dump = [] + l_irp = [] + l_src = [] + l_obj = [] + + l_template = [] for f in os.listdir(path_module_abs): - if f.endswith(".irp.f"): - dump.append(join(path_module_abs, f)) - if f == "EZFIO.cfg": - dump.append(join(path_module_abs, "ezfio_interface.irp.f")) - return dump + if f.endswith(".template.f"): + l_template.append(join(path_module_abs, f)) + elif f.endswith(".irp.f"): + l_irp.append(join(path_module_abs, f)) + elif any(f.endswith("{0}".format(i)) for i in [".f", + ".f90", + ".c", + ".cpp", + ".cxx"]): + l_src.append(join(path_module_abs, f)) + obj = '{0}.o'.format(os.path.splitext(f)[0]) + l_obj.append(join(path_module_abs, obj)) + elif f == "EZFIO.cfg": + l_irp.append(join(path_module_abs, "ezfio_interface.irp.f")) + + d = dict() + d["l_irp"] = l_irp + d["l_src"] = l_src + d["l_obj"] = l_obj + d["l_template"] = l_template + + return d -def get_irp_dependency(d_info_module): +def get_file_dependency(d_info_module): """ For a module return all the irp.f90 file who depend """ - d_irp = dict() + d_irp = defaultdict(dict) + for module, l_children in d_info_module.iteritems(): - dump = get_l_irp_for_module(module.abs) - for children in l_children: - dump.extend(get_l_irp_for_module(children.abs)) + for key, values in get_l_file_for_module(module.abs).iteritems(): + d_irp[module][key] = values - d_irp[module] = dump + for children in l_children: + for key, values in get_l_file_for_module(children.abs).iteritems(): + d_irp[module][key].extend(values) return d_irp @@ -377,20 +400,22 @@ def ninja_irpf90_make_build(path_module, l_needed_molule, d_irp): # D e p e n d a n c y # # ~#~#~#~#~#~#~#~#~#~ # - l_irp_need = d_irp[path_module] + l_irp_need = d_irp[path_module]["l_irp"] + l_src = d_irp[path_module]["l_src"] + l_obj = d_irp[path_module]["l_obj"] + l_template = d_irp[path_module]["l_template"] if l_needed_molule: l_destination = ["l_symlink_{0}".format(path_module.rel)] else: l_destination = [] - str_depend = " ".join(l_irp_need + l_destination) + str_depend = " ".join(l_irp_need + l_destination + l_src + l_template) # ~#~#~#~#~#~#~#~#~#~#~ # # N i n j a _ b u i l d # # ~#~#~#~#~#~#~#~#~#~#~ # - l_src, l_obj = file_dependency(path_module.rel) l_include_dir = ["-I {0}".format(m.rel) for m in l_needed_molule] l_string = [ @@ -467,9 +492,6 @@ def get_dict_binaries(mode="development"): Example : The module Full_CI can produce the binary SCF so you dont need to use at all the module Hartree-Fock """ - - from collections import defaultdict - d_binaries = defaultdict(list) # Create d_binaries @@ -628,7 +650,7 @@ if __name__ == "__main__": d_genealogy = get_dict_genealogy_desc() d_genealogy_path = dict_module_genelogy_path(d_genealogy) - d_irp = get_irp_dependency(d_genealogy_path) + d_irp = get_file_dependency(d_genealogy_path) d_binaries_production = get_dict_binaries("production") d_binaries_development = get_dict_binaries("development") @@ -673,5 +695,5 @@ if __name__ == "__main__": d_binaries_production) l_string += ninja_readme_build(module_to_compile) - with open(join(QPACKAGE_ROOT, "build.ninja"), "w+") as f: - f.write("\n".join(l_string)) + with open(join(QPACKAGE_ROOT, "build.ninja"), "w+") as f: + f.write("\n".join(l_string)) diff --git a/src/AOs/Makefile b/src/AOs/Makefile deleted file mode 100644 index 06dc50ff..00000000 --- a/src/AOs/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -# Define here all new external source files and objects.Don't forget to prefix the -# object files with IRPF90_temp/ -SRC= -OBJ= - -include $(QPACKAGE_ROOT)/src/Makefile.common diff --git a/src/Bitmask/Makefile b/src/Bitmask/Makefile deleted file mode 100644 index d230cb0c..00000000 --- a/src/Bitmask/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -# Define here all new external source files and objects.Don't forget to prefix the -# object files with IRPF90_temp/ -SRC=bitmasks_module.f90 -OBJ=IRPF90_temp/bitmasks_module.o - -include $(QPACKAGE_ROOT)/src/Makefile.common diff --git a/src/CAS_SD/Makefile b/src/CAS_SD/Makefile index 06dc50ff..bfcd2493 100644 --- a/src/CAS_SD/Makefile +++ b/src/CAS_SD/Makefile @@ -1,6 +1,16 @@ -# Define here all new external source files and objects.Don't forget to prefix the -# object files with IRPF90_temp/ +IRPF90 = irpf90 #-a -d +FC = gfortran +FCFLAGS= -O2 -ffree-line-length-none -I . +NINJA = ninja +AR = ar +RANLIB = ranlib + SRC= OBJ= +LIB= -include $(QPACKAGE_ROOT)/src/Makefile.common +include irpf90.make +export + +irpf90.make: $(filter-out IRPF90_temp/%, $(wildcard */*.irp.f)) $(wildcard *.irp.f) $(wildcard *.inc.f) Makefile + $(IRPF90) diff --git a/src/CID/Makefile b/src/CID/Makefile index 06dc50ff..bfcd2493 100644 --- a/src/CID/Makefile +++ b/src/CID/Makefile @@ -1,6 +1,16 @@ -# Define here all new external source files and objects.Don't forget to prefix the -# object files with IRPF90_temp/ +IRPF90 = irpf90 #-a -d +FC = gfortran +FCFLAGS= -O2 -ffree-line-length-none -I . +NINJA = ninja +AR = ar +RANLIB = ranlib + SRC= OBJ= +LIB= -include $(QPACKAGE_ROOT)/src/Makefile.common +include irpf90.make +export + +irpf90.make: $(filter-out IRPF90_temp/%, $(wildcard */*.irp.f)) $(wildcard *.irp.f) $(wildcard *.inc.f) Makefile + $(IRPF90) diff --git a/src/CID/tree_dependency.png b/src/CID/tree_dependency.png index 5dd95797..90c80d49 100644 Binary files a/src/CID/tree_dependency.png and b/src/CID/tree_dependency.png differ diff --git a/src/CID_SC2_selected/Makefile b/src/CID_SC2_selected/Makefile index 06dc50ff..bfcd2493 100644 --- a/src/CID_SC2_selected/Makefile +++ b/src/CID_SC2_selected/Makefile @@ -1,6 +1,16 @@ -# Define here all new external source files and objects.Don't forget to prefix the -# object files with IRPF90_temp/ +IRPF90 = irpf90 #-a -d +FC = gfortran +FCFLAGS= -O2 -ffree-line-length-none -I . +NINJA = ninja +AR = ar +RANLIB = ranlib + SRC= OBJ= +LIB= -include $(QPACKAGE_ROOT)/src/Makefile.common +include irpf90.make +export + +irpf90.make: $(filter-out IRPF90_temp/%, $(wildcard */*.irp.f)) $(wildcard *.irp.f) $(wildcard *.inc.f) Makefile + $(IRPF90) diff --git a/src/CID_selected/Makefile b/src/CID_selected/Makefile index 06dc50ff..bfcd2493 100644 --- a/src/CID_selected/Makefile +++ b/src/CID_selected/Makefile @@ -1,6 +1,16 @@ -# Define here all new external source files and objects.Don't forget to prefix the -# object files with IRPF90_temp/ +IRPF90 = irpf90 #-a -d +FC = gfortran +FCFLAGS= -O2 -ffree-line-length-none -I . +NINJA = ninja +AR = ar +RANLIB = ranlib + SRC= OBJ= +LIB= -include $(QPACKAGE_ROOT)/src/Makefile.common +include irpf90.make +export + +irpf90.make: $(filter-out IRPF90_temp/%, $(wildcard */*.irp.f)) $(wildcard *.irp.f) $(wildcard *.inc.f) Makefile + $(IRPF90) diff --git a/src/CID_selected/tree_dependency.png b/src/CID_selected/tree_dependency.png index 96668fb0..656584c7 100644 Binary files a/src/CID_selected/tree_dependency.png and b/src/CID_selected/tree_dependency.png differ diff --git a/src/CIS/Makefile b/src/CIS/Makefile index 06dc50ff..bfcd2493 100644 --- a/src/CIS/Makefile +++ b/src/CIS/Makefile @@ -1,6 +1,16 @@ -# Define here all new external source files and objects.Don't forget to prefix the -# object files with IRPF90_temp/ +IRPF90 = irpf90 #-a -d +FC = gfortran +FCFLAGS= -O2 -ffree-line-length-none -I . +NINJA = ninja +AR = ar +RANLIB = ranlib + SRC= OBJ= +LIB= -include $(QPACKAGE_ROOT)/src/Makefile.common +include irpf90.make +export + +irpf90.make: $(filter-out IRPF90_temp/%, $(wildcard */*.irp.f)) $(wildcard *.irp.f) $(wildcard *.inc.f) Makefile + $(IRPF90) diff --git a/src/CISD/Makefile b/src/CISD/Makefile index 06dc50ff..bfcd2493 100644 --- a/src/CISD/Makefile +++ b/src/CISD/Makefile @@ -1,6 +1,16 @@ -# Define here all new external source files and objects.Don't forget to prefix the -# object files with IRPF90_temp/ +IRPF90 = irpf90 #-a -d +FC = gfortran +FCFLAGS= -O2 -ffree-line-length-none -I . +NINJA = ninja +AR = ar +RANLIB = ranlib + SRC= OBJ= +LIB= -include $(QPACKAGE_ROOT)/src/Makefile.common +include irpf90.make +export + +irpf90.make: $(filter-out IRPF90_temp/%, $(wildcard */*.irp.f)) $(wildcard *.irp.f) $(wildcard *.inc.f) Makefile + $(IRPF90) diff --git a/src/CISD/tree_dependency.png b/src/CISD/tree_dependency.png index 6424faba..552a4152 100644 Binary files a/src/CISD/tree_dependency.png and b/src/CISD/tree_dependency.png differ diff --git a/src/CISD_SC2_selected/Makefile b/src/CISD_SC2_selected/Makefile index 06dc50ff..bfcd2493 100644 --- a/src/CISD_SC2_selected/Makefile +++ b/src/CISD_SC2_selected/Makefile @@ -1,6 +1,16 @@ -# Define here all new external source files and objects.Don't forget to prefix the -# object files with IRPF90_temp/ +IRPF90 = irpf90 #-a -d +FC = gfortran +FCFLAGS= -O2 -ffree-line-length-none -I . +NINJA = ninja +AR = ar +RANLIB = ranlib + SRC= OBJ= +LIB= -include $(QPACKAGE_ROOT)/src/Makefile.common +include irpf90.make +export + +irpf90.make: $(filter-out IRPF90_temp/%, $(wildcard */*.irp.f)) $(wildcard *.irp.f) $(wildcard *.inc.f) Makefile + $(IRPF90) diff --git a/src/CISD_selected/Makefile b/src/CISD_selected/Makefile index 06dc50ff..bfcd2493 100644 --- a/src/CISD_selected/Makefile +++ b/src/CISD_selected/Makefile @@ -1,6 +1,16 @@ -# Define here all new external source files and objects.Don't forget to prefix the -# object files with IRPF90_temp/ +IRPF90 = irpf90 #-a -d +FC = gfortran +FCFLAGS= -O2 -ffree-line-length-none -I . +NINJA = ninja +AR = ar +RANLIB = ranlib + SRC= OBJ= +LIB= -include $(QPACKAGE_ROOT)/src/Makefile.common +include irpf90.make +export + +irpf90.make: $(filter-out IRPF90_temp/%, $(wildcard */*.irp.f)) $(wildcard *.irp.f) $(wildcard *.inc.f) Makefile + $(IRPF90) diff --git a/src/CISD_selected/tree_dependency.png b/src/CISD_selected/tree_dependency.png index e9dce5b5..6074420d 100644 Binary files a/src/CISD_selected/tree_dependency.png and b/src/CISD_selected/tree_dependency.png differ diff --git a/src/DDCI_selected/Makefile b/src/DDCI_selected/Makefile index 06dc50ff..bfcd2493 100644 --- a/src/DDCI_selected/Makefile +++ b/src/DDCI_selected/Makefile @@ -1,6 +1,16 @@ -# Define here all new external source files and objects.Don't forget to prefix the -# object files with IRPF90_temp/ +IRPF90 = irpf90 #-a -d +FC = gfortran +FCFLAGS= -O2 -ffree-line-length-none -I . +NINJA = ninja +AR = ar +RANLIB = ranlib + SRC= OBJ= +LIB= -include $(QPACKAGE_ROOT)/src/Makefile.common +include irpf90.make +export + +irpf90.make: $(filter-out IRPF90_temp/%, $(wildcard */*.irp.f)) $(wildcard *.irp.f) $(wildcard *.inc.f) Makefile + $(IRPF90) diff --git a/src/DensityFit/Makefile b/src/DensityFit/Makefile deleted file mode 100644 index 06dc50ff..00000000 --- a/src/DensityFit/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -# Define here all new external source files and objects.Don't forget to prefix the -# object files with IRPF90_temp/ -SRC= -OBJ= - -include $(QPACKAGE_ROOT)/src/Makefile.common diff --git a/src/Determinants/Makefile b/src/Determinants/Makefile index 06dc50ff..bfcd2493 100644 --- a/src/Determinants/Makefile +++ b/src/Determinants/Makefile @@ -1,6 +1,16 @@ -# Define here all new external source files and objects.Don't forget to prefix the -# object files with IRPF90_temp/ +IRPF90 = irpf90 #-a -d +FC = gfortran +FCFLAGS= -O2 -ffree-line-length-none -I . +NINJA = ninja +AR = ar +RANLIB = ranlib + SRC= OBJ= +LIB= -include $(QPACKAGE_ROOT)/src/Makefile.common +include irpf90.make +export + +irpf90.make: $(filter-out IRPF90_temp/%, $(wildcard */*.irp.f)) $(wildcard *.irp.f) $(wildcard *.inc.f) Makefile + $(IRPF90) diff --git a/src/Determinants/tree_dependency.png b/src/Determinants/tree_dependency.png index a800adad..189eb10c 100644 Binary files a/src/Determinants/tree_dependency.png and b/src/Determinants/tree_dependency.png differ diff --git a/src/Electrons/Makefile b/src/Electrons/Makefile deleted file mode 100644 index 06dc50ff..00000000 --- a/src/Electrons/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -# Define here all new external source files and objects.Don't forget to prefix the -# object files with IRPF90_temp/ -SRC= -OBJ= - -include $(QPACKAGE_ROOT)/src/Makefile.common diff --git a/src/Ezfio_files/Makefile b/src/Ezfio_files/Makefile deleted file mode 100644 index 06dc50ff..00000000 --- a/src/Ezfio_files/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -# Define here all new external source files and objects.Don't forget to prefix the -# object files with IRPF90_temp/ -SRC= -OBJ= - -include $(QPACKAGE_ROOT)/src/Makefile.common diff --git a/src/FCIdump/Makefile b/src/FCIdump/Makefile index 06dc50ff..bfcd2493 100644 --- a/src/FCIdump/Makefile +++ b/src/FCIdump/Makefile @@ -1,6 +1,16 @@ -# Define here all new external source files and objects.Don't forget to prefix the -# object files with IRPF90_temp/ +IRPF90 = irpf90 #-a -d +FC = gfortran +FCFLAGS= -O2 -ffree-line-length-none -I . +NINJA = ninja +AR = ar +RANLIB = ranlib + SRC= OBJ= +LIB= -include $(QPACKAGE_ROOT)/src/Makefile.common +include irpf90.make +export + +irpf90.make: $(filter-out IRPF90_temp/%, $(wildcard */*.irp.f)) $(wildcard *.irp.f) $(wildcard *.inc.f) Makefile + $(IRPF90) diff --git a/src/Full_CI/Makefile b/src/Full_CI/Makefile index 06dc50ff..bfcd2493 100644 --- a/src/Full_CI/Makefile +++ b/src/Full_CI/Makefile @@ -1,6 +1,16 @@ -# Define here all new external source files and objects.Don't forget to prefix the -# object files with IRPF90_temp/ +IRPF90 = irpf90 #-a -d +FC = gfortran +FCFLAGS= -O2 -ffree-line-length-none -I . +NINJA = ninja +AR = ar +RANLIB = ranlib + SRC= OBJ= +LIB= -include $(QPACKAGE_ROOT)/src/Makefile.common +include irpf90.make +export + +irpf90.make: $(filter-out IRPF90_temp/%, $(wildcard */*.irp.f)) $(wildcard *.irp.f) $(wildcard *.inc.f) Makefile + $(IRPF90) diff --git a/src/Generators_CAS/Makefile b/src/Generators_CAS/Makefile deleted file mode 100644 index 06dc50ff..00000000 --- a/src/Generators_CAS/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -# Define here all new external source files and objects.Don't forget to prefix the -# object files with IRPF90_temp/ -SRC= -OBJ= - -include $(QPACKAGE_ROOT)/src/Makefile.common diff --git a/src/Generators_full/Makefile b/src/Generators_full/Makefile deleted file mode 100644 index 06dc50ff..00000000 --- a/src/Generators_full/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -# Define here all new external source files and objects.Don't forget to prefix the -# object files with IRPF90_temp/ -SRC= -OBJ= - -include $(QPACKAGE_ROOT)/src/Makefile.common diff --git a/src/Generators_restart/Makefile b/src/Generators_restart/Makefile deleted file mode 100644 index 06dc50ff..00000000 --- a/src/Generators_restart/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -# Define here all new external source files and objects.Don't forget to prefix the -# object files with IRPF90_temp/ -SRC= -OBJ= - -include $(QPACKAGE_ROOT)/src/Makefile.common diff --git a/src/Hartree_Fock/Makefile b/src/Hartree_Fock/Makefile index 06dc50ff..bfcd2493 100644 --- a/src/Hartree_Fock/Makefile +++ b/src/Hartree_Fock/Makefile @@ -1,6 +1,16 @@ -# Define here all new external source files and objects.Don't forget to prefix the -# object files with IRPF90_temp/ +IRPF90 = irpf90 #-a -d +FC = gfortran +FCFLAGS= -O2 -ffree-line-length-none -I . +NINJA = ninja +AR = ar +RANLIB = ranlib + SRC= OBJ= +LIB= -include $(QPACKAGE_ROOT)/src/Makefile.common +include irpf90.make +export + +irpf90.make: $(filter-out IRPF90_temp/%, $(wildcard */*.irp.f)) $(wildcard *.irp.f) $(wildcard *.inc.f) Makefile + $(IRPF90) diff --git a/src/Hartree_Fock/tree_dependency.png b/src/Hartree_Fock/tree_dependency.png index 76dae958..82a2ac8e 100644 Binary files a/src/Hartree_Fock/tree_dependency.png and b/src/Hartree_Fock/tree_dependency.png differ diff --git a/src/Integrals_Bielec/Makefile b/src/Integrals_Bielec/Makefile deleted file mode 100644 index 06dc50ff..00000000 --- a/src/Integrals_Bielec/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -# Define here all new external source files and objects.Don't forget to prefix the -# object files with IRPF90_temp/ -SRC= -OBJ= - -include $(QPACKAGE_ROOT)/src/Makefile.common diff --git a/src/Integrals_Monoelec/Makefile b/src/Integrals_Monoelec/Makefile index abe31fed..bfcd2493 100644 --- a/src/Integrals_Monoelec/Makefile +++ b/src/Integrals_Monoelec/Makefile @@ -1,6 +1,16 @@ -# Define here all new external source files and objects.Don't forget to prefix the -# object files with IRPF90_temp/ -SRC=pseudopot.f90 -OBJ=IRPF90_temp/pseudopot.o +IRPF90 = irpf90 #-a -d +FC = gfortran +FCFLAGS= -O2 -ffree-line-length-none -I . +NINJA = ninja +AR = ar +RANLIB = ranlib -include $(QPACKAGE_ROOT)/src/Makefile.common +SRC= +OBJ= +LIB= + +include irpf90.make +export + +irpf90.make: $(filter-out IRPF90_temp/%, $(wildcard */*.irp.f)) $(wildcard *.irp.f) $(wildcard *.inc.f) Makefile + $(IRPF90) diff --git a/src/Integrals_Monoelec/tree_dependency.png b/src/Integrals_Monoelec/tree_dependency.png index 525b918e..aff3f7bf 100644 Binary files a/src/Integrals_Monoelec/tree_dependency.png and b/src/Integrals_Monoelec/tree_dependency.png differ diff --git a/src/MOGuess/Makefile b/src/MOGuess/Makefile index 06dc50ff..bfcd2493 100644 --- a/src/MOGuess/Makefile +++ b/src/MOGuess/Makefile @@ -1,6 +1,16 @@ -# Define here all new external source files and objects.Don't forget to prefix the -# object files with IRPF90_temp/ +IRPF90 = irpf90 #-a -d +FC = gfortran +FCFLAGS= -O2 -ffree-line-length-none -I . +NINJA = ninja +AR = ar +RANLIB = ranlib + SRC= OBJ= +LIB= -include $(QPACKAGE_ROOT)/src/Makefile.common +include irpf90.make +export + +irpf90.make: $(filter-out IRPF90_temp/%, $(wildcard */*.irp.f)) $(wildcard *.irp.f) $(wildcard *.inc.f) Makefile + $(IRPF90) diff --git a/src/MOGuess/tree_dependency.png b/src/MOGuess/tree_dependency.png index 2ab9746b..6ed2260d 100644 Binary files a/src/MOGuess/tree_dependency.png and b/src/MOGuess/tree_dependency.png differ diff --git a/src/MOs/Makefile b/src/MOs/Makefile deleted file mode 100644 index 06dc50ff..00000000 --- a/src/MOs/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -# Define here all new external source files and objects.Don't forget to prefix the -# object files with IRPF90_temp/ -SRC= -OBJ= - -include $(QPACKAGE_ROOT)/src/Makefile.common diff --git a/src/MP2/Makefile b/src/MP2/Makefile index 06dc50ff..bfcd2493 100644 --- a/src/MP2/Makefile +++ b/src/MP2/Makefile @@ -1,6 +1,16 @@ -# Define here all new external source files and objects.Don't forget to prefix the -# object files with IRPF90_temp/ +IRPF90 = irpf90 #-a -d +FC = gfortran +FCFLAGS= -O2 -ffree-line-length-none -I . +NINJA = ninja +AR = ar +RANLIB = ranlib + SRC= OBJ= +LIB= -include $(QPACKAGE_ROOT)/src/Makefile.common +include irpf90.make +export + +irpf90.make: $(filter-out IRPF90_temp/%, $(wildcard */*.irp.f)) $(wildcard *.irp.f) $(wildcard *.inc.f) Makefile + $(IRPF90) diff --git a/src/MRCC/Makefile b/src/MRCC/Makefile index 06dc50ff..bfcd2493 100644 --- a/src/MRCC/Makefile +++ b/src/MRCC/Makefile @@ -1,6 +1,16 @@ -# Define here all new external source files and objects.Don't forget to prefix the -# object files with IRPF90_temp/ +IRPF90 = irpf90 #-a -d +FC = gfortran +FCFLAGS= -O2 -ffree-line-length-none -I . +NINJA = ninja +AR = ar +RANLIB = ranlib + SRC= OBJ= +LIB= -include $(QPACKAGE_ROOT)/src/Makefile.common +include irpf90.make +export + +irpf90.make: $(filter-out IRPF90_temp/%, $(wildcard */*.irp.f)) $(wildcard *.irp.f) $(wildcard *.inc.f) Makefile + $(IRPF90) diff --git a/src/Makefile.common b/src/Makefile.common deleted file mode 100644 index d6c9dd90..00000000 --- a/src/Makefile.common +++ /dev/null @@ -1,53 +0,0 @@ -.PHONY: default silent -export -ifneq ($(IN_MAKE),1) - -default: - @$(MAKE) -C $(QPACKAGE_ROOT)/src $$(basename $(PWD)) - -veryclean: - clean_modules.sh - -clean: - IN_MAKE=1 make clean - -else # Called by scripts/build_module.sh - -default: all .gitignore - -# Include the user's config -include $(QPACKAGE_ROOT)/src/Makefile.config - -# Create the NEEDED_CHILDREN_MODULES variable, needed for IRPF90 -NEEDED_CHILDREN_MODULES=$(shell module_handler.py print_genealogy) - -# Check and update dependencies -include Makefile.depend - - -# Define the Makefile common variables -EZFIO_DIR=$(QPACKAGE_ROOT)/EZFIO -EZFIO=$(EZFIO_DIR)/lib/libezfio_irp.a -INCLUDE_DIRS=$(NEEDED_CHILDREN_MODULES) include - -clean_links: - rm -f $(INCLUDE_DIRS) $$(basename $$PWD) - -LIB+=$(EZFIO) $(MKL) -IRPF90+=$(patsubst %, -I %, $(INCLUDE_DIRS)) $(IRPF90_FLAGS) - -irpf90.make: $(filter-out IRPF90_temp/%, $(wildcard */*.irp.f)) $(wildcard *.irp.f) $(wildcard *.inc.f) Makefile $(EZFIO) NEEDED_CHILDREN_MODULES $(wildcard *.py) - - $(IRPF90) - - update_README.py - -include irpf90.make - -endif - -.gitignore: - $(QPACKAGE_ROOT)/scripts/create/create_gitignore.sh - -# Frequent typos -clena: clean -veryclena: veryclean -vercylean: veryclean diff --git a/src/Makefile.config.example b/src/Makefile.config.example deleted file mode 100644 index 14272070..00000000 --- a/src/Makefile.config.example +++ /dev/null @@ -1,34 +0,0 @@ -OPENMP =1 -PROFILE =0 -DEBUG = 0 - -IRPF90_FLAGS+= --align=32 -FC = ifort -g -#FC = cache_compile.py ifort -g # Accelerates compilation -FCFLAGS= -FCFLAGS+= -xHost -#FCFLAGS+= -xAVX -FCFLAGS+= -O2 -FCFLAGS+= -ip -FCFLAGS+= -opt-prefetch -FCFLAGS+= -ftz -MKL=-mkl=parallel -NINJA=ninja - -ifeq ($(PROFILE),1) -FC += -p -g -CXX += -pg -endif - -ifeq ($(OPENMP),1) -FC += -openmp -IRPF90_FLAGS += --openmp -CXX += -fopenmp -endif - -ifeq ($(DEBUG),1) -FC += -C -traceback -fpe0 -FCFLAGS+= -axSSE2 -IRPF90_FLAGS += -a -#FCFLAGS =-O0 -endif diff --git a/src/Molden/Makefile b/src/Molden/Makefile index 06dc50ff..bfcd2493 100644 --- a/src/Molden/Makefile +++ b/src/Molden/Makefile @@ -1,6 +1,16 @@ -# Define here all new external source files and objects.Don't forget to prefix the -# object files with IRPF90_temp/ +IRPF90 = irpf90 #-a -d +FC = gfortran +FCFLAGS= -O2 -ffree-line-length-none -I . +NINJA = ninja +AR = ar +RANLIB = ranlib + SRC= OBJ= +LIB= -include $(QPACKAGE_ROOT)/src/Makefile.common +include irpf90.make +export + +irpf90.make: $(filter-out IRPF90_temp/%, $(wildcard */*.irp.f)) $(wildcard *.irp.f) $(wildcard *.inc.f) Makefile + $(IRPF90) diff --git a/src/Nuclei/Makefile b/src/Nuclei/Makefile deleted file mode 100644 index 06dc50ff..00000000 --- a/src/Nuclei/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -# Define here all new external source files and objects.Don't forget to prefix the -# object files with IRPF90_temp/ -SRC= -OBJ= - -include $(QPACKAGE_ROOT)/src/Makefile.common diff --git a/src/Perturbation/Makefile b/src/Perturbation/Makefile deleted file mode 100644 index 06dc50ff..00000000 --- a/src/Perturbation/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -# Define here all new external source files and objects.Don't forget to prefix the -# object files with IRPF90_temp/ -SRC= -OBJ= - -include $(QPACKAGE_ROOT)/src/Makefile.common diff --git a/src/Properties/Makefile b/src/Properties/Makefile deleted file mode 100644 index 06dc50ff..00000000 --- a/src/Properties/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -# Define here all new external source files and objects.Don't forget to prefix the -# object files with IRPF90_temp/ -SRC= -OBJ= - -include $(QPACKAGE_ROOT)/src/Makefile.common diff --git a/src/Pseudo/Makefile b/src/Pseudo/Makefile deleted file mode 100644 index 06dc50ff..00000000 --- a/src/Pseudo/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -# Define here all new external source files and objects.Don't forget to prefix the -# object files with IRPF90_temp/ -SRC= -OBJ= - -include $(QPACKAGE_ROOT)/src/Makefile.common diff --git a/src/QmcChem/.gitignore b/src/QmcChem/.gitignore new file mode 100644 index 00000000..47d97b7d --- /dev/null +++ b/src/QmcChem/.gitignore @@ -0,0 +1,26 @@ +# +# Do not modify this file. Add your ignored files to the gitignore +# (without the dot at the beginning) file. +# +IRPF90_temp +IRPF90_man +irpf90.make +tags +Makefile.depend +irpf90_entities +build.ninja +.ninja_log +.ninja_deps +Pseudo +Integrals_Monoelec +Bitmask +Integrals_Bielec +AOs +MOs +Determinants +Electrons +DensityFit +Utils +Nuclei +Ezfio_files +save_for_qmcchem diff --git a/src/QmcChem/Makefile b/src/QmcChem/Makefile index 06dc50ff..bfcd2493 100644 --- a/src/QmcChem/Makefile +++ b/src/QmcChem/Makefile @@ -1,6 +1,16 @@ -# Define here all new external source files and objects.Don't forget to prefix the -# object files with IRPF90_temp/ +IRPF90 = irpf90 #-a -d +FC = gfortran +FCFLAGS= -O2 -ffree-line-length-none -I . +NINJA = ninja +AR = ar +RANLIB = ranlib + SRC= OBJ= +LIB= -include $(QPACKAGE_ROOT)/src/Makefile.common +include irpf90.make +export + +irpf90.make: $(filter-out IRPF90_temp/%, $(wildcard */*.irp.f)) $(wildcard *.irp.f) $(wildcard *.inc.f) Makefile + $(IRPF90) diff --git a/src/QmcChem/tree_dependency.png b/src/QmcChem/tree_dependency.png new file mode 100644 index 00000000..c546d455 Binary files /dev/null and b/src/QmcChem/tree_dependency.png differ diff --git a/src/Selectors_full/Makefile b/src/Selectors_full/Makefile deleted file mode 100644 index 06dc50ff..00000000 --- a/src/Selectors_full/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -# Define here all new external source files and objects.Don't forget to prefix the -# object files with IRPF90_temp/ -SRC= -OBJ= - -include $(QPACKAGE_ROOT)/src/Makefile.common diff --git a/src/Selectors_no_sorted/Makefile b/src/Selectors_no_sorted/Makefile deleted file mode 100644 index 06dc50ff..00000000 --- a/src/Selectors_no_sorted/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -# Define here all new external source files and objects.Don't forget to prefix the -# object files with IRPF90_temp/ -SRC= -OBJ= - -include $(QPACKAGE_ROOT)/src/Makefile.common diff --git a/src/SingleRefMethod/Makefile b/src/SingleRefMethod/Makefile deleted file mode 100644 index 06dc50ff..00000000 --- a/src/SingleRefMethod/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -# Define here all new external source files and objects.Don't forget to prefix the -# object files with IRPF90_temp/ -SRC= -OBJ= - -include $(QPACKAGE_ROOT)/src/Makefile.common diff --git a/src/Utils/Makefile b/src/Utils/Makefile deleted file mode 100644 index 9a46f455..00000000 --- a/src/Utils/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -# Define here all new external source files and objects.Don't forget to prefix the -# object files with IRPF90_temp/constants.F -SRC=map_module.f90 -OBJ=IRPF90_temp/map_module.o - -include $(QPACKAGE_ROOT)/src/Makefile.common