From 4e4e414b3b433cb62e9b850cd4d5051b0cb1278e Mon Sep 17 00:00:00 2001 From: "J.-S. Caux" Date: Tue, 24 Aug 2021 10:40:19 +0200 Subject: [PATCH] Rework Makefile; adopt semver, starting with 1.0.0 --- Makefile | 522 ++---------------- {src => dev}/BETHE/Base.cc | 0 {src => dev}/BETHE/Bethe_State.cc | 0 {src => dev}/BETHE/Offsets.cc | 0 {src => dev}/ODSLF/ODSLF.cc | 0 {src => dev}/ODSLF/ODSLF_Chem_Pot.cc | 0 {src/EXECS => dev/ODSLF}/ODSLF_DSF.cc | 0 .../ODSLF/ODSLF_Matrix_Element_Contrib.cc | 0 {src => dev}/ODSLF/ODSLF_Sumrules.cc | 0 {src => dev}/ODSLF/ODSLF_XXZ_Bethe_State.cc | 0 .../EXECS => dev/ODSLF}/Smoothen_ODSLF_DSF.cc | 0 {src => dev}/ODSLF/ln_Smin_ME_ODSLF_XXZ.cc | 0 {src => dev}/ODSLF/ln_Sz_ME_ODSLF_XXZ.cc | 0 src/EXECS/2CBG_ThLim.cc | 0 src/EXECS/LiebLin_TBA.cc | 0 src/EXECS/LiebLin_TBA_fixed_nbar.cc | 0 src/EXECS/LiebLin_TBA_fixed_nbar_ebar.cc | 0 src/XXX_VOA/XXX_h0_v2.cc | 4 +- 18 files changed, 55 insertions(+), 471 deletions(-) rename {src => dev}/BETHE/Base.cc (100%) rename {src => dev}/BETHE/Bethe_State.cc (100%) rename {src => dev}/BETHE/Offsets.cc (100%) rename {src => dev}/ODSLF/ODSLF.cc (100%) rename {src => dev}/ODSLF/ODSLF_Chem_Pot.cc (100%) rename {src/EXECS => dev/ODSLF}/ODSLF_DSF.cc (100%) rename {src => dev}/ODSLF/ODSLF_Matrix_Element_Contrib.cc (100%) rename {src => dev}/ODSLF/ODSLF_Sumrules.cc (100%) rename {src => dev}/ODSLF/ODSLF_XXZ_Bethe_State.cc (100%) rename {src/EXECS => dev/ODSLF}/Smoothen_ODSLF_DSF.cc (100%) rename {src => dev}/ODSLF/ln_Smin_ME_ODSLF_XXZ.cc (100%) rename {src => dev}/ODSLF/ln_Sz_ME_ODSLF_XXZ.cc (100%) mode change 100755 => 100644 src/EXECS/2CBG_ThLim.cc mode change 100755 => 100644 src/EXECS/LiebLin_TBA.cc mode change 100755 => 100644 src/EXECS/LiebLin_TBA_fixed_nbar.cc mode change 100755 => 100644 src/EXECS/LiebLin_TBA_fixed_nbar_ebar.cc diff --git a/Makefile b/Makefile index 2555e07..f7162b9 100644 --- a/Makefile +++ b/Makefile @@ -11,489 +11,73 @@ # #***********************************************************/ -VERSION = ABACUS_0a +# Semver +VERSION = ABACUS_1.0.0 -# Base directory, tree of all source files, headers -BASEDIR = #/Users/jcaux/WORK/ABACUS++/ -OBJDIR = $(BASEDIR)obj/ -HEADDIR = $(BASEDIR)include/ -LIBDIR = $(BASEDIR)lib/ -SRCDIR = $(BASEDIR)src/ -EXECSDIR = $(BASEDIR)src/EXECS/ -BINDIR = $(BASEDIR)bin/ +# Directories +BASE_DIR = . +OBJ_DIR = $(BASE_DIR)/obj +HEAD_DIR = $(BASE_DIR)/include +LIB_DIR = $(BASE_DIR)/lib +SRC_DIR = $(BASE_DIR)/src +BIN_DIR = $(BASE_DIR)/bin -# Set the compiler choice -#CXX = g++ -#CXX = /usr/local/bin/g++ -CXX = /usr/local/Cellar/gcc@7/7.5.0/bin/g++-7 -# On OS X, using a separate installation of llvm tools: -# CXX = /usr/local/opt/llvm/bin/clang++ -Xpreprocessor -fopenmp -lomp -L/usr/local/opt/llvm/lib:lib/ -I/usr/local/opt/llvm/include -# CXX = clang++ -Weverything -ferror-limit=1 -# CXX += -Wno-padded -Wno-c++98-compat-pedantic -Wno-exit-time-destructors -# CXX += -Wno-unused-parameter -Wno-global-constructors -Wno-sign-conversion -Wno-documentation -Wno-weak-vtables -Wno-unused-variable -Wno-shadow -Wno-float-conversion -Wno-float-equal -Wno-shorten-64-to-32 -Wno-conditional-uninitialized -Wno-unreachable-code -Wno-missing-prototypes -Wno-missing-variable-declarations -Wno-deprecated -Wno-documentation-unknown-command -Wno-zero-as-null-pointer-constant -#CXXFLAGS = -std=c++14 -fopenmp +# Source file extension +SRC_EXT = cc + +# Compiler choice +CXX = g++ CXXFLAGS = -fopenmp -LDFLAGS = -L$(LIBDIR) -LDLIBS = -l$(VERSION) -INC = -I$(HEADDIR) +LDFLAGS = -O3 -w -fopenmp +# Compilation command +COMPILE = $(CXX) -I$(BASE_DIR)/include/ -L$(LIB_DIR)/ $(LDFLAGS) +# Compiler choice and command (parallel case) MPICXX = mpicxx +COMPILE_MPI = mpicxx -I$(BASE_DIR)/include/ -L$(LIB_DIR)/ $(LDFLAGS) +# Enable finding all sources +vpath %.$(SRC_EXT) $(wildcard $(SRC_DIR)/*) +vpath %.h -#COMPILE = g++ -Wall -I$(BASEDIR)include/ -L$(LIBDIR) -O3 -stdlib=libstdc++ -#COMPILE = g++ -Wall -I$(BASEDIR)include/ -L$(LIBDIR) -O3 -#COMPILE = g++ -I$(BASEDIR)include/ -L$(LIBDIR) -O3 -w -fopenmp -COMPILE = $(CXX) -I$(BASEDIR)include/ -L$(LIBDIR) -O3 -w -fopenmp -#COMPILE = clang++ -std=c++17 -Weverything -I$(BASEDIR)include/ -L$(LIBDIR) -O3 -w -fopenmp -#COMPILE_MPI = mpicxx -I$(BASEDIR)include/ -L$(LIBDIR) -O3 -stdlib=libstdc++ -COMPILE_MPI = mpicxx -I$(BASEDIR)include/ -L$(LIBDIR) -O3 -w -fopenmp -#COMPILE_OMP = g++ -I$(BASEDIR)include/ -L$(LIBDIR) -O3 -w -fopenmp +# List of all source files +SOURCES_ALL = $(shell find $(SRC_DIR) -name '*.$(SRC_EXT)') +# Those involving parallelism +SOURCES_PAR = $(filter %_par.$(SRC_EXT) %_par_Prepare.$(SRC_EXT) %_par_Run.$(SRC_EXT) %_par_Wrapup.$(SRC_EXT) %_server.$(SRC_EXT) %_client.$(SRC_EXT), $(SOURCES_ALL)) +# Executables +SOURCES_EXECS_ALL = $(shell find $(SRC_DIR)/EXECS -name '*.$(SRC_EXT)') +# Executables (parallel) +SOURCES_EXECS_PAR = $(filter %_par.$(SRC_EXT) %_par_Prepare.$(SRC_EXT) %_par_Run.$(SRC_EXT) %_par_Wrapup.$(SRC_EXT) %_server.$(SRC_EXT) %_client.$(SRC_EXT), $(SOURCES_EXECS_ALL)) +SOURCES_EXECS = $(filter-out $(SOURCES_EXECS_PAR), $(SOURCES_EXECS_ALL)) +# ... leaving the basic sources +SOURCES = $(filter-out $(SOURCES_PAR) $(SOURCES_EXECS), $(SOURCES_ALL)) -#COMPILE = $(CXX) $(CXXFLAGS) $(INC) $(LDFLAGS) -#COMPILE = $(CXX) +# List of all header files +HEADERS = $(notdir $(shell find $(HEAD_DIR) -name '*.h')) -VPATH = $(SRCDIR)BETHE:$(SRCDIR)LIEBLIN:$(SRCDIR)COMBI:$(SRCDIR)EXECS:$(SRCDIR)FITTING:$(SRCDIR)HEIS:$(SRCDIR)INTEG:$(SRCDIR)MATRIX:$(SRCDIR)NRG:$(SRCDIR)ODSLF:$(SRCDIR)SCAN:$(SRCDIR)TBA:$(SRCDIR)UTILS:$(SRCDIR)XXX_VOA:$(SRCDIR)XXZ_VOA:$(SRCDIR)YOUNG +# Objects to go into library +OBJECTS = $(patsubst %.$(SRC_EXT), $(OBJ_DIR)/%.o, $(notdir $(SOURCES))) -vpath %.h $(HEADDIR) +# Executables +EXECUTABLES = $(patsubst %.$(SRC_EXT), $(BIN_DIR)/%, $(notdir $(SOURCES_EXECS))) -Headers_ABACUS = ABACUS.h ABACUS_Utils.h ABACUS_Combi.h ABACUS_Integ.h ABACUS_Matrix.h ABACUS_NRG.h ABACUS_Spec_Fns.h ABACUS_Vect.h ABACUS_Young.h -Headers_all = $(Headers_ABACUS) ABACUS_LiebLin.h ABACUS_Heis.h ABACUS_Scan.h ABACUS_State_Ensemble.h ABACUS_XXX_VOA.h ABACUS_XXZ_VOA.h -Objects_LIEBLIN = $(OBJDIR)LiebLin_Bethe_State.o $(OBJDIR)LiebLin_Chem_Pot.o \ - $(OBJDIR)LiebLin_Matrix_Element_Contrib.o $(OBJDIR)LiebLin_ln_Overlap.o \ - $(OBJDIR)LiebLin_Sumrules.o $(OBJDIR)LiebLin_State_Ensemble.o \ - $(OBJDIR)LiebLin_Tgt0.o $(OBJDIR)LiebLin_Twisted_lnnorm.o $(OBJDIR)LiebLin_Twisted_ln_Overlap.o \ - $(OBJDIR)LiebLin_Utils.o $(OBJDIR)ln_Density_ME.o $(OBJDIR)ln_Psi_ME.o $(OBJDIR)ln_g2_ME.o +# Main target: all executables (and thus the library, and thus all objects) +all: $(EXECUTABLES) -Objects_HEIS = $(OBJDIR)Heis.o $(OBJDIR)Heis_Chem_Pot.o $(OBJDIR)Heis_Sumrules.o \ - $(OBJDIR)Heis_Matrix_Element_Contrib.o $(OBJDIR)ln_Overlap_XXX.o \ - $(OBJDIR)ln_Sz_ME_XXX.o $(OBJDIR)ln_Sz_ME_XXZ.o $(OBJDIR)ln_Sz_ME_XXZ_gpd.o \ - $(OBJDIR)ln_Smin_ME_XXX.o $(OBJDIR)ln_Smin_ME_XXZ.o $(OBJDIR)ln_Smin_ME_XXZ_gpd.o \ - $(OBJDIR)ln_Szz_ME_XXX.o $(OBJDIR)ln_Smm_ME_XXX.o $(OBJDIR)ln_Szm_p_Smz_ME_XXX.o \ - $(OBJDIR)M_vs_H.o \ - $(OBJDIR)XXX_Bethe_State.o $(OBJDIR)XXZ_Bethe_State.o $(OBJDIR)XXZ_gpd_Bethe_State.o +# Build executables +$(EXECUTABLES): $(BIN_DIR)/%: $(SRC_DIR)/EXECS/%.$(SRC_EXT) lib$(VERSION).a + $(COMPILE) $< -o $@ -l$(VERSION) -Objects_ODSLF = $(OBJDIR)ODSLF.o $(OBJDIR)ODSLF_Chem_Pot.o $(OBJDIR)ODSLF_Sumrules.o \ - $(OBJDIR)ODSLF_XXZ_Bethe_State.o $(OBJDIR)ODSLF_Matrix_Element_Contrib.o \ - $(OBJDIR)ln_Sz_ME_ODSLF_XXZ.o $(OBJDIR)ln_Smin_ME_ODSLF_XXZ.o - -Objects_COMBI = $(OBJDIR)Combinatorics.o - -Objects_FITTING = $(OBJDIR)covsrt.o $(OBJDIR)lin_reg.o $(OBJDIR)mrq.o $(OBJDIR)polint.o $(OBJDIR)polint_cx.o - -Objects_INTEG = $(OBJDIR)Integration.o - -Objects_MATRIX = $(OBJDIR)balanc.o $(OBJDIR)det_LU.o $(OBJDIR)det_LU_CX.o $(OBJDIR)eigsrt.o \ - $(OBJDIR)elmhes.o $(OBJDIR)gaussj.o $(OBJDIR)hqr.o \ - $(OBJDIR)jacobi.o $(OBJDIR)lndet_LU.o $(OBJDIR)lndet_LU_dstry.o $(OBJDIR)lndet_LU_CX.o \ - $(OBJDIR)lndet_LU_CX_dstry.o $(OBJDIR)lubksb.o \ - $(OBJDIR)lubksb_CX.o $(OBJDIR)ludcmp.o $(OBJDIR)ludcmp_CX.o $(OBJDIR)pythag.o $(OBJDIR)tqli.o $(OBJDIR)tred2.o - -Objects_NRG = $(OBJDIR)NRG_State_Selector.o $(OBJDIR)NRG_DME_Matrix_Block_builder.o $(OBJDIR)NRG_K_Weight_integrand.o - -Objects_SCAN = $(OBJDIR)Descendents.o $(OBJDIR)General_Scan.o $(OBJDIR)General_Scan_Parallel.o \ - $(OBJDIR)Particle_Hole_Excitation_Cost.o $(OBJDIR)Scan_Info.o $(OBJDIR)Scan_Thread_Data.o - -Objects_TBA = $(OBJDIR)Root_Density.o $(OBJDIR)TBA_LiebLin.o $(OBJDIR)TBA_XXZ.o $(OBJDIR)TBA_2CBG.o - -Objects_UTILS = $(OBJDIR)Data_File_Name.o $(OBJDIR)K_and_Omega_Files.o $(OBJDIR)Smoothen_RAW_into_SF.o \ - $(OBJDIR)Smoothen_RAW_into_SF_LiebLin_Scaled.o $(OBJDIR)Sort_RAW_File.o $(OBJDIR)State_Label.o \ - $(OBJDIR)Filter_RAW_File_for_iK.o - -Objects_XXX_VOA = $(OBJDIR)XXX_VOA.o - -Objects_XXZ_VOA = $(OBJDIR)XXZ_VOA.o - -Objects_YOUNG = $(OBJDIR)Young_Tableau.o - -Objects_ALL = $(Objects_LIEBLIN) $(Objects_HEIS) $(Objects_COMBI) $(Objects_FITTING) \ - $(Objects_INTEG) $(Objects_MATRIX) $(Objects_NRG) $(Objects_SCAN) $(Objects_TBA) \ - $(Objects_UTILS) $(Objects_XXX_VOA) $(Objects_XXZ_VOA) $(Objects_YOUNG) - -EXECS = $(BINDIR)LiebLin_DSF $(BINDIR)LiebLin_Data_Daemon $(BINDIR)LiebLin_RAW_File_Stats \ - $(BINDIR)LiebLin_DSF_tester $(BINDIR)LiebLin_DSF_tester_Ix2 $(BINDIR)LiebLin_DSF_MosesState \ - $(BINDIR)LiebLin_DSF_over_Ensemble $(BINDIR)Smoothen_LiebLin_DSF $(BINDIR)Heis_DSF \ - $(BINDIR)Heis_DSF_GeneralState $(BINDIR)Smoothen_Heis_DSF $(BINDIR)Check_RAW_File - - -########################################## -# The library and the set of executables in bin/ are the ultimate targets - -lib$(VERSION).a : $(Objects_ALL) - ar -cru lib$(VERSION).a $(Objects_ALL) - mv lib$(VERSION).a $(BASEDIR)lib/ - $(COMPILE) $(EXECSDIR)Histogram_RAW_File.cc -o $(BINDIR)Histogram_RAW_File -l$(VERSION) - $(COMPILE) $(EXECSDIR)LiebLin_DSF.cc -o $(BINDIR)LiebLin_DSF -l$(VERSION) - $(COMPILE) $(EXECSDIR)LiebLin_Data_Daemon.cc -o $(BINDIR)LiebLin_Data_Daemon -l$(VERSION) - $(COMPILE) $(EXECSDIR)LiebLin_Data_Daemon_Nscaling.cc -o $(BINDIR)LiebLin_Data_Daemon_Nscaling -l$(VERSION) - $(COMPILE) $(EXECSDIR)LiebLin_Catalogue_Fixed_c_k_Nscaling.cc -o $(BINDIR)LiebLin_Catalogue_Fixed_c_k_Nscaling -l$(VERSION) - $(COMPILE) $(EXECSDIR)LiebLin_RAW_File_Stats.cc -o $(BINDIR)LiebLin_RAW_File_Stats -l$(VERSION) - $(COMPILE) $(EXECSDIR)LiebLin_DSF_GeneralState.cc -o $(BINDIR)LiebLin_DSF_GeneralState -l$(VERSION) - $(COMPILE) $(EXECSDIR)LiebLin_DSF_MosesState.cc -o $(BINDIR)LiebLin_DSF_MosesState -l$(VERSION) - $(COMPILE) $(EXECSDIR)LiebLin_DSF_over_Ensemble.cc -o $(BINDIR)LiebLin_DSF_over_Ensemble -l$(VERSION) - $(COMPILE) $(EXECSDIR)LiebLin_DSF_tester.cc -o $(BINDIR)LiebLin_DSF_tester -l$(VERSION) - $(COMPILE) $(EXECSDIR)LiebLin_DSF_tester_Ix2.cc -o $(BINDIR)LiebLin_DSF_tester_Ix2 -l$(VERSION) - $(COMPILE) $(EXECSDIR)Smoothen_LiebLin_DSF.cc -o $(BINDIR)Smoothen_LiebLin_DSF -l$(VERSION) - $(COMPILE) $(EXECSDIR)Smoothen_LiebLin_DSF_Scaled.cc -o $(BINDIR)Smoothen_LiebLin_DSF_Scaled -l$(VERSION) - $(COMPILE) $(EXECSDIR)Smoothen_LiebLin_DSF_over_Ensemble.cc -o $(BINDIR)Smoothen_LiebLin_DSF_over_Ensemble -l$(VERSION) - $(COMPILE) $(EXECSDIR)Smoothen_LiebLin_DSF_GeneralState.cc -o $(BINDIR)Smoothen_LiebLin_DSF_GeneralState -l$(VERSION) - $(COMPILE) $(EXECSDIR)Smoothen_LiebLin_DSF_MosesState.cc -o $(BINDIR)Smoothen_LiebLin_DSF_MosesState -l$(VERSION) - $(COMPILE) $(EXECSDIR)LiebLin_TBA.cc -o $(BINDIR)LiebLin_TBA -l$(VERSION) - $(COMPILE) $(EXECSDIR)LiebLin_TBA_fixed_nbar.cc -o $(BINDIR)LiebLin_TBA_fixed_nbar -l$(VERSION) - $(COMPILE) $(EXECSDIR)LiebLin_TBA_fixed_nbar_ebar.cc -o $(BINDIR)LiebLin_TBA_fixed_nbar_ebar -l$(VERSION) - $(COMPILE) $(EXECSDIR)Heis_DSF.cc -o $(BINDIR)Heis_DSF -l$(VERSION) - $(COMPILE) $(EXECSDIR)Heis_DSF_GeneralState.cc -o $(BINDIR)Heis_DSF_GeneralState -l$(VERSION) - $(COMPILE) $(EXECSDIR)Smoothen_Heis_DSF.cc -o $(BINDIR)Smoothen_Heis_DSF -l$(VERSION) - $(COMPILE) $(EXECSDIR)Heis_Fourier_to_Sqt.cc -o $(BINDIR)Heis_Fourier_to_Sqt -l$(VERSION) - $(COMPILE) $(EXECSDIR)XXZ_gpd_StagSz_h0.cc -o $(BINDIR)XXZ_gpd_StagSz_h0 -l$(VERSION) -# $(COMPILE) $(EXECSDIR)ODSLF_DSF.cc -o $(BINDIR)ODSLF_DSF -l$(VERSION) -# $(COMPILE) $(EXECSDIR)Smoothen_ODSLF_DSF.cc -o $(BINDIR)Smoothen_ODSLF_DSF -l$(VERSION) - $(COMPILE) $(EXECSDIR)Check_RAW_File.cc -o $(BINDIR)Check_RAW_File -l$(VERSION) - $(COMPILE) $(EXECSDIR)Analyze_RAW_File.cc -o $(BINDIR)Analyze_RAW_File -l$(VERSION) - $(COMPILE) $(EXECSDIR)RAW_File_Stats.cc -o $(BINDIR)RAW_File_Stats -l$(VERSION) - $(COMPILE) $(EXECSDIR)Produce_Sorted_RAW_File.cc -o $(BINDIR)Produce_Sorted_RAW_File -l$(VERSION) - $(COMPILE) $(EXECSDIR)Produce_Filtered_RAW_File_for_iK.cc -o $(BINDIR)Produce_Filtered_RAW_File_for_iK -l$(VERSION) - $(COMPILE) $(EXECSDIR)2CBG_ThLim.cc -o $(BINDIR)2CBG_ThLim -l$(VERSION) - $(COMPILE) $(EXECSDIR)LiebLin_Fourier_to_x_equal_t.cc -o $(BINDIR)LiebLin_Fourier_to_x_equal_t -l$(VERSION) - $(COMPILE) $(EXECSDIR)LiebLin_Fourier_to_t_equal_x.cc -o $(BINDIR)LiebLin_Fourier_to_t_equal_x -l$(VERSION) - $(COMPILE) $(EXECSDIR)LiebLin_Fourier_to_x_equal_t_from_RAW.cc -o $(BINDIR)LiebLin_Fourier_to_x_equal_t_from_RAW -l$(VERSION) - $(COMPILE) $(EXECSDIR)LiebLin_Fourier_to_t_equal_x_from_RAW.cc -o $(BINDIR)LiebLin_Fourier_to_t_equal_x_from_RAW -l$(VERSION) - $(COMPILE) $(EXECSDIR)LiebLin_Fourier_ssf_to_Qsqx.cc -o $(BINDIR)LiebLin_Fourier_ssf_to_Qsqx -l$(VERSION) - -########################################### -# Interacting LiebLin gas - -$(OBJDIR)LiebLin_Bethe_State.o : LiebLin_Bethe_State.cc $(Headers_ABACUS) ABACUS_LiebLin.h - $(COMPILE) -c $< -o $@ - -$(OBJDIR)LiebLin_Chem_Pot.o : LiebLin_Chem_Pot.cc $(Headers_ABACUS) ABACUS_LiebLin.h - $(COMPILE) -c $< -o $@ - -$(OBJDIR)LiebLin_Matrix_Element_Contrib.o : LiebLin_Matrix_Element_Contrib.cc $(Headers_ABACUS) ABACUS_LiebLin.h - $(COMPILE) -c $< -o $@ - -$(OBJDIR)LiebLin_ln_Overlap.o : LiebLin_ln_Overlap.cc $(Headers_ABACUS) ABACUS_LiebLin.h - $(COMPILE) -c $< -o $@ - -$(OBJDIR)LiebLin_Sumrules.o : LiebLin_Sumrules.cc $(Headers_ABACUS) ABACUS_LiebLin.h - $(COMPILE) -c $< -o $@ - -$(OBJDIR)LiebLin_State_Ensemble.o : LiebLin_State_Ensemble.cc $(Headers_ABACUS) ABACUS_LiebLin.h - $(COMPILE) -c $< -o $@ - -$(OBJDIR)LiebLin_Tgt0.o : LiebLin_Tgt0.cc $(Headers_ABACUS) ABACUS_LiebLin.h - $(COMPILE) -c $< -o $@ - -$(OBJDIR)LiebLin_Twisted_lnnorm.o : LiebLin_Twisted_lnnorm.cc $(Headers_ABACUS) ABACUS_LiebLin.h - $(COMPILE) -c $< -o $@ - -$(OBJDIR)LiebLin_Utils.o : LiebLin_Utils.cc $(Headers_ABACUS) ABACUS_LiebLin.h - $(COMPILE) -c $< -o $@ - -$(OBJDIR)ln_Density_ME.o : ln_Density_ME.cc $(Headers_ABACUS) ABACUS_LiebLin.h - $(COMPILE) -c $< -o $@ - -$(OBJDIR)LiebLin_Twisted_ln_Overlap.o : LiebLin_Twisted_ln_Overlap.cc $(Headers_ABACUS) ABACUS_LiebLin.h - $(COMPILE) -c $< -o $@ - -$(OBJDIR)ln_Psi_ME.o : ln_Psi_ME.cc $(Headers_ABACUS) ABACUS_LiebLin.h - $(COMPILE) -c $< -o $@ - -$(OBJDIR)ln_g2_ME.o : ln_g2_ME.cc $(Headers_ABACUS) ABACUS_LiebLin.h - $(COMPILE) -c $< -o $@ - - -########################################### -# Heisenberg chains - -$(OBJDIR)Heis.o : Heis.cc $(Headers_ABACUS) ABACUS_Heis.h - $(COMPILE) -c $< -o $@ - -$(OBJDIR)Heis_Chem_Pot.o : Heis_Chem_Pot.cc $(Headers_ABACUS) ABACUS_Heis.h - $(COMPILE) -c $< -o $@ - -$(OBJDIR)Heis_Sumrules.o : Heis_Sumrules.cc $(Headers_ABACUS) ABACUS_Heis.h - $(COMPILE) -c $< -o $@ - -$(OBJDIR)Heis_Matrix_Element_Contrib.o : Heis_Matrix_Element_Contrib.cc $(Headers_ABACUS) ABACUS_Heis.h - $(COMPILE) -c $< -o $@ - -$(OBJDIR)ln_Overlap_XXX.o : ln_Overlap_XXX.cc $(Headers_ABACUS) ABACUS_Heis.h - $(COMPILE) -c $< -o $@ - -$(OBJDIR)ln_Sz_ME_XXX.o : ln_Sz_ME_XXX.cc $(Headers_ABACUS) ABACUS_Heis.h - $(COMPILE) -c $< -o $@ - -$(OBJDIR)ln_Szz_ME_XXX.o : ln_Szz_ME_XXX.cc $(Headers_ABACUS) ABACUS_Heis.h - $(COMPILE) -c $< -o $@ - -$(OBJDIR)ln_Smm_ME_XXX.o : ln_Smm_ME_XXX.cc $(Headers_ABACUS) ABACUS_Heis.h - $(COMPILE) -c $< -o $@ - -$(OBJDIR)ln_Szm_p_Smz_ME_XXX.o : ln_Szm_p_Smz_ME_XXX.cc $(Headers_ABACUS) ABACUS_Heis.h - $(COMPILE) -c $< -o $@ - -$(OBJDIR)ln_Sz_ME_XXZ.o : ln_Sz_ME_XXZ.cc $(Headers_ABACUS) ABACUS_Heis.h - $(COMPILE) -c $< -o $@ - -$(OBJDIR)ln_Sz_ME_XXZ_gpd.o : ln_Sz_ME_XXZ_gpd.cc $(Headers_ABACUS) ABACUS_Heis.h - $(COMPILE) -c $< -o $@ - -$(OBJDIR)ln_Smin_ME_XXX.o : ln_Smin_ME_XXX.cc $(Headers_ABACUS) ABACUS_Heis.h - $(COMPILE) -c $< -o $@ - -$(OBJDIR)ln_Smin_ME_XXZ.o : ln_Smin_ME_XXZ.cc $(Headers_ABACUS) ABACUS_Heis.h - $(COMPILE) -c $< -o $@ - -$(OBJDIR)ln_Smin_ME_XXZ_gpd.o : ln_Smin_ME_XXZ_gpd.cc $(Headers_ABACUS) ABACUS_Heis.h - $(COMPILE) -c $< -o $@ - -$(OBJDIR)M_vs_H.o : M_vs_H.cc $(Headers_ABACUS) ABACUS_Heis.h - $(COMPILE) -c $< -o $@ - -$(OBJDIR)XXX_Bethe_State.o : XXX_Bethe_State.cc $(Headers_ABACUS) ABACUS_Heis.h - $(COMPILE) -c $< -o $@ - -$(OBJDIR)XXZ_Bethe_State.o : XXZ_Bethe_State.cc $(Headers_ABACUS) ABACUS_Heis.h - $(COMPILE) -c $< -o $@ - -$(OBJDIR)XXZ_gpd_Bethe_State.o : XXZ_gpd_Bethe_State.cc $(Headers_ABACUS) ABACUS_Heis.h - $(COMPILE) -c $< -o $@ - - -########################################### -# One-d spinless fermions - -$(OBJDIR)ODSLF.o : ODSLF.cc $(Headers_ABACUS) ABACUS_Heis.h ABACUS_ODSLF.h - $(COMPILE) -c $< -o $@ - -$(OBJDIR)ODSLF_Chem_Pot.o : ODSLF_Chem_Pot.cc $(Headers_ABACUS) ABACUS_ODSLF.h - $(COMPILE) -c $< -o $@ - -$(OBJDIR)ODSLF_Sumrules.o : ODSLF_Sumrules.cc $(Headers_ABACUS) ABACUS_ODSLF.h - $(COMPILE) -c $< -o $@ - -$(OBJDIR)ODSLF_XXZ_Bethe_State.o : ODSLF_XXZ_Bethe_State.cc $(Headers_ABACUS) ABACUS_Heis.h ABACUS_ODSLF.h - $(COMPILE) -c $< -o $@ - -$(OBJDIR)ln_Smin_ME_ODSLF_XXZ.o : ln_Smin_ME_ODSLF_XXZ.cc $(Headers_ABACUS) ABACUS_ODSLF.h - $(COMPILE) -c $< -o $@ - -$(OBJDIR)ln_Sz_ME_ODSLF_XXZ.o : ln_Sz_ME_ODSLF_XXZ.cc $(Headers_ABACUS) ABACUS_ODSLF.h - $(COMPILE) -c $< -o $@ - -$(OBJDIR)ODSLF_Matrix_Element_Contrib.o : ODSLF_Matrix_Element_Contrib.cc $(Headers_ABACUS) ABACUS_ODSLF.h - $(COMPILE) -c $< -o $@ - - -########################################### -# Combinatorics functions - -$(OBJDIR)Combinatorics.o : Combinatorics.cc $(Headers_ABACUS) - $(COMPILE) -c $< -o $@ - -########################################### -# Integ functions - -$(OBJDIR)Integration.o : Integration.cc $(Headers_ABACUS) - $(COMPILE) -c $< -o $@ - -########################################### -# Fitting functions - -$(OBJDIR)covsrt.o : covsrt.cc $(Headers_ABACUS) +# Compile all object files +$(OBJ_DIR)/%.o: %.$(SRC_EXT) $(COMPILE) -c $< -o $@ -$(OBJDIR)lin_reg.o : lin_reg.cc $(Headers_ABACUS) - $(COMPILE) -c $< -o $@ - -$(OBJDIR)mrq.o : mrq.cc $(Headers_ABACUS) - $(COMPILE) -c $< -o $@ - -$(OBJDIR)polint.o : polint.cc $(Headers_ABACUS) - $(COMPILE) -c $< -o $@ - -$(OBJDIR)polint_cx.o : polint_cx.cc $(Headers_ABACUS) - $(COMPILE) -c $< -o $@ - - -########################################### -# Matrix functions - -$(OBJDIR)balanc.o : balanc.cc $(Headers_ABACUS) - $(COMPILE) -c $< -o $@ - -$(OBJDIR)det_LU.o : det_LU.cc $(Headers_ABACUS) - $(COMPILE) -c $< -o $@ - -$(OBJDIR)det_LU_CX.o : det_LU_CX.cc $(Headers_ABACUS) - $(COMPILE) -c $< -o $@ - -$(OBJDIR)eigsrt.o : eigsrt.cc $(Headers_ABACUS) - $(COMPILE) -c $< -o $@ - -$(OBJDIR)elmhes.o : elmhes.cc $(Headers_ABACUS) - $(COMPILE) -c $< -o $@ - -$(OBJDIR)gaussj.o : gaussj.cc $(Headers_ABACUS) - $(COMPILE) -c $< -o $@ - -$(OBJDIR)hqr.o : hqr.cc $(Headers_ABACUS) - $(COMPILE) -c $< -o $@ - -$(OBJDIR)jacobi.o : jacobi.cc $(Headers_ABACUS) - $(COMPILE) -c $< -o $@ - -$(OBJDIR)lndet_LU.o : lndet_LU.cc $(Headers_ABACUS) - $(COMPILE) -c $< -o $@ - -$(OBJDIR)lndet_LU_CX.o : lndet_LU_CX.cc $(Headers_ABACUS) - $(COMPILE) -c $< -o $@ - -$(OBJDIR)lndet_LU_dstry.o : lndet_LU_dstry.cc $(Headers_ABACUS) - $(COMPILE) -c $< -o $@ - -$(OBJDIR)lndet_LU_CX_dstry.o : lndet_LU_CX_dstry.cc $(Headers_ABACUS) - $(COMPILE) -c $< -o $@ - -$(OBJDIR)lubksb.o : lubksb.cc $(Headers_ABACUS) - $(COMPILE) -c $< -o $@ - -$(OBJDIR)lubksb_CX.o : lubksb_CX.cc $(Headers_ABACUS) - $(COMPILE) -c $< -o $@ - -$(OBJDIR)ludcmp.o : ludcmp.cc $(Headers_ABACUS) - $(COMPILE) -c $< -o $@ - -$(OBJDIR)ludcmp_CX.o : ludcmp_CX.cc $(Headers_ABACUS) - $(COMPILE) -c $< -o $@ - -$(OBJDIR)pythag.o : pythag.cc $(Headers_ABACUS) - $(COMPILE) -c $< -o $@ - -$(OBJDIR)tqli.o : tqli.cc $(Headers_ABACUS) - $(COMPILE) -c $< -o $@ - -$(OBJDIR)tred2.o : tred2.cc $(Headers_ABACUS) - $(COMPILE) -c $< -o $@ - - -########################################### -# NRG - -$(OBJDIR)NRG_K_Weight_integrand.o : NRG_K_Weight_integrand.cc $(Headers_all) - $(COMPILE) -c $< -o $@ - -$(OBJDIR)NRG_State_Selector.o : NRG_State_Selector.cc $(Headers_all) - $(COMPILE) -c $< -o $@ - -$(OBJDIR)NRG_DME_Matrix_Block_builder.o : NRG_DME_Matrix_Block_builder.cc $(Headers_all) - $(COMPILE) -c $< -o $@ - - -########################################### -# Scan - -#$(OBJDIR)Base.o : Base.cc $(Headers_all) -# $(COMPILE) -c $< -o $@ - -$(OBJDIR)Descendents.o : Descendents.cc $(Headers_all) - $(COMPILE) -c $< -o $@ - -$(OBJDIR)General_Scan.o : General_Scan.cc $(Headers_all) - $(COMPILE) -c $< -o $@ - -$(OBJDIR)General_Scan_Parallel.o : General_Scan_Parallel.cc $(Headers_all) - $(COMPILE) -c $< -o $@ - -$(OBJDIR)Particle_Hole_Excitation_Cost.o : Particle_Hole_Excitation_Cost.cc $(Headers_all) - $(COMPILE) -c $< -o $@ - -$(OBJDIR)Scan_Info.o : Scan_Info.cc $(Headers_all) - $(COMPILE) -c $< -o $@ - -$(OBJDIR)Scan_Thread_Data.o : Scan_Thread_Data.cc $(Headers_all) - $(COMPILE) -c $< -o $@ - -########################################### -# Thermodynamic Bethe Ansatz - -$(OBJDIR)Root_Density.o : Root_Density.cc $(Headers_ABACUS) ABACUS_TBA.h - $(COMPILE) -c $< -o $@ - -$(OBJDIR)TBA_LiebLin.o : TBA_LiebLin.cc $(Headers_ABACUS) ABACUS_TBA.h - $(COMPILE) -c $< -o $@ - -$(OBJDIR)TBA_XXZ.o : TBA_XXZ.cc $(Headers_ABACUS) ABACUS_TBA.h - $(COMPILE) -c $< -o $@ - -$(OBJDIR)TBA_2CBG.o : TBA_2CBG.cc $(Headers_ABACUS) ABACUS_TBA.h - $(COMPILE) -c $< -o $@ - -########################################### -# Utilities - -$(OBJDIR)Data_File_Name.o : Data_File_Name.cc $(Headers_all) - $(COMPILE) -c $< -o $@ - -$(OBJDIR)Filter_RAW_File_for_iK.o : Filter_RAW_File_for_iK.cc $(Headers_all) - $(COMPILE) -c $< -o $@ - -$(OBJDIR)K_and_Omega_Files.o : K_and_Omega_Files.cc $(Headers_all) - $(COMPILE) -c $< -o $@ - -$(OBJDIR)Smoothen_RAW_into_SF.o : Smoothen_RAW_into_SF.cc $(Headers_all) - $(COMPILE) -c $< -o $@ - -$(OBJDIR)Smoothen_RAW_into_SF_LiebLin_Scaled.o : Smoothen_RAW_into_SF_LiebLin_Scaled.cc $(Headers_all) - $(COMPILE) -c $< -o $@ - -$(OBJDIR)Sort_RAW_File.o : Sort_RAW_File.cc $(Headers_all) - $(COMPILE) -c $< -o $@ - -$(OBJDIR)State_Label.o : State_Label.cc $(Headers_all) - $(COMPILE) -c $< -o $@ - -########################################### -# XXX_VOA - -$(OBJDIR)XXX_VOA.o : XXX_VOA.cc $(Headers_all) ABACUS_XXX_VOA.h - $(COMPILE) -c $< -o $@ - -########################################### -# XXZ_VOA - -$(OBJDIR)XXZ_VOA.o : XXZ_VOA.cc $(Headers_all) ABACUS_XXZ_VOA.h - $(COMPILE) -c $< -o $@ - -########################################### -# Young Tableaux - -$(OBJDIR)Young_Tableau.o : Young_Tableau.cc $(Headers_all) - $(COMPILE) -c $< -o $@ - - -########################################### -# Executables (parallel versions) - -parallel : -# $(COMPILE_MPI) $(EXECSDIR)LiebLin_DSF_par.cc -o $(BINDIR)LiebLin_DSF_par -l$(VERSION) - $(COMPILE_MPI) $(EXECSDIR)LiebLin_DSF_par_Prepare.cc -o $(BINDIR)LiebLin_DSF_par_Prepare -l$(VERSION) - $(COMPILE_MPI) $(EXECSDIR)LiebLin_DSF_par_Run.cc -o $(BINDIR)LiebLin_DSF_par_Run -l$(VERSION) - $(COMPILE_MPI) $(EXECSDIR)LiebLin_DSF_par_Wrapup.cc -o $(BINDIR)LiebLin_DSF_par_Wrapup -l$(VERSION) - $(COMPILE_MPI) $(EXECSDIR)LiebLin_DSF_GeneralState_par_Prepare.cc -o $(BINDIR)LiebLin_DSF_GeneralState_par_Prepare -l$(VERSION) - $(COMPILE_MPI) $(EXECSDIR)LiebLin_DSF_GeneralState_par_Run.cc -o $(BINDIR)LiebLin_DSF_GeneralState_par_Run -l$(VERSION) - $(COMPILE_MPI) $(EXECSDIR)LiebLin_DSF_GeneralState_par_Wrapup.cc -o $(BINDIR)LiebLin_DSF_GeneralState_par_Wrapup -l$(VERSION) -# $(COMPILE_MPI) $(EXECSDIR)LiebLin_DSF_MosesState_par.cc -o $(BINDIR)LiebLin_DSF_MosesState_par -l$(VERSION) -# $(COMPILE_MPI) $(EXECSDIR)LiebLin_DSF_MosesState_par_Prepare.cc -o $(BINDIR)LiebLin_DSF_MosesState_par_Prepare -l$(VERSION) -# $(COMPILE_MPI) $(EXECSDIR)LiebLin_DSF_MosesState_par_Run.cc -o $(BINDIR)LiebLin_DSF_MosesState_par_Run -l$(VERSION) -# $(COMPILE_MPI) $(EXECSDIR)LiebLin_DSF_MosesState_par_Wrapup.cc -o $(BINDIR)LiebLin_DSF_MosesState_par_Wrapup -l$(VERSION) -# $(COMPILE_MPI) $(EXECSDIR)LiebLin_DSF_over_Ensemble_par.cc -o $(BINDIR)LiebLin_DSF_over_Ensemble_par -l$(VERSION) -# $(COMPILE_MPI) $(EXECSDIR)Heis_DSF_par.cc -o $(BINDIR)Heis_DSF_par -l$(VERSION) - $(COMPILE_MPI) $(EXECSDIR)Heis_DSF_par_Prepare.cc -o $(BINDIR)Heis_DSF_par_Prepare -l$(VERSION) - $(COMPILE_MPI) $(EXECSDIR)Heis_DSF_par_Run.cc -o $(BINDIR)Heis_DSF_par_Run -l$(VERSION) - $(COMPILE_MPI) $(EXECSDIR)Heis_DSF_par_Wrapup.cc -o $(BINDIR)Heis_DSF_par_Wrapup -l$(VERSION) +# Create the ABACUS library +lib$(VERSION).a : $(OBJECTS) + ar -cr lib$(VERSION).a $(OBJECTS) + mv lib$(VERSION).a $(LIB_DIR)/ ########################################### @@ -501,9 +85,9 @@ parallel : .PHONY: clean clean : - /bin/rm -f $(Objects_ALL) - /bin/rm -f $(LIBDIR)$(VERSION) - /bin/rm -f $(EXECS) + /bin/rm -f $(OBJECTS) + /bin/rm -f $(LIB_DIR)/lib$(VERSION).a + /bin/rm -f $(EXECUTABLES) ########################################### diff --git a/src/BETHE/Base.cc b/dev/BETHE/Base.cc similarity index 100% rename from src/BETHE/Base.cc rename to dev/BETHE/Base.cc diff --git a/src/BETHE/Bethe_State.cc b/dev/BETHE/Bethe_State.cc similarity index 100% rename from src/BETHE/Bethe_State.cc rename to dev/BETHE/Bethe_State.cc diff --git a/src/BETHE/Offsets.cc b/dev/BETHE/Offsets.cc similarity index 100% rename from src/BETHE/Offsets.cc rename to dev/BETHE/Offsets.cc diff --git a/src/ODSLF/ODSLF.cc b/dev/ODSLF/ODSLF.cc similarity index 100% rename from src/ODSLF/ODSLF.cc rename to dev/ODSLF/ODSLF.cc diff --git a/src/ODSLF/ODSLF_Chem_Pot.cc b/dev/ODSLF/ODSLF_Chem_Pot.cc similarity index 100% rename from src/ODSLF/ODSLF_Chem_Pot.cc rename to dev/ODSLF/ODSLF_Chem_Pot.cc diff --git a/src/EXECS/ODSLF_DSF.cc b/dev/ODSLF/ODSLF_DSF.cc similarity index 100% rename from src/EXECS/ODSLF_DSF.cc rename to dev/ODSLF/ODSLF_DSF.cc diff --git a/src/ODSLF/ODSLF_Matrix_Element_Contrib.cc b/dev/ODSLF/ODSLF_Matrix_Element_Contrib.cc similarity index 100% rename from src/ODSLF/ODSLF_Matrix_Element_Contrib.cc rename to dev/ODSLF/ODSLF_Matrix_Element_Contrib.cc diff --git a/src/ODSLF/ODSLF_Sumrules.cc b/dev/ODSLF/ODSLF_Sumrules.cc similarity index 100% rename from src/ODSLF/ODSLF_Sumrules.cc rename to dev/ODSLF/ODSLF_Sumrules.cc diff --git a/src/ODSLF/ODSLF_XXZ_Bethe_State.cc b/dev/ODSLF/ODSLF_XXZ_Bethe_State.cc similarity index 100% rename from src/ODSLF/ODSLF_XXZ_Bethe_State.cc rename to dev/ODSLF/ODSLF_XXZ_Bethe_State.cc diff --git a/src/EXECS/Smoothen_ODSLF_DSF.cc b/dev/ODSLF/Smoothen_ODSLF_DSF.cc similarity index 100% rename from src/EXECS/Smoothen_ODSLF_DSF.cc rename to dev/ODSLF/Smoothen_ODSLF_DSF.cc diff --git a/src/ODSLF/ln_Smin_ME_ODSLF_XXZ.cc b/dev/ODSLF/ln_Smin_ME_ODSLF_XXZ.cc similarity index 100% rename from src/ODSLF/ln_Smin_ME_ODSLF_XXZ.cc rename to dev/ODSLF/ln_Smin_ME_ODSLF_XXZ.cc diff --git a/src/ODSLF/ln_Sz_ME_ODSLF_XXZ.cc b/dev/ODSLF/ln_Sz_ME_ODSLF_XXZ.cc similarity index 100% rename from src/ODSLF/ln_Sz_ME_ODSLF_XXZ.cc rename to dev/ODSLF/ln_Sz_ME_ODSLF_XXZ.cc diff --git a/src/EXECS/2CBG_ThLim.cc b/src/EXECS/2CBG_ThLim.cc old mode 100755 new mode 100644 diff --git a/src/EXECS/LiebLin_TBA.cc b/src/EXECS/LiebLin_TBA.cc old mode 100755 new mode 100644 diff --git a/src/EXECS/LiebLin_TBA_fixed_nbar.cc b/src/EXECS/LiebLin_TBA_fixed_nbar.cc old mode 100755 new mode 100644 diff --git a/src/EXECS/LiebLin_TBA_fixed_nbar_ebar.cc b/src/EXECS/LiebLin_TBA_fixed_nbar_ebar.cc old mode 100755 new mode 100644 diff --git a/src/XXX_VOA/XXX_h0_v2.cc b/src/XXX_VOA/XXX_h0_v2.cc index 6c612f8..fd33824 100755 --- a/src/XXX_VOA/XXX_h0_v2.cc +++ b/src/XXX_VOA/XXX_h0_v2.cc @@ -170,8 +170,8 @@ namespace ABACUS { DP omegamax = 2.0 * PI; - Heis_Write_K_File (Npts_p); - Heis_Write_w_File (Npts_o, omegamax); + Write_K_File (Npts_p, 0, Npts_p); + Write_Omega_File (Npts_o, 0.0, omegamax); int ik; DP omega;