Restart work. Set compiler to gcc.

This commit is contained in:
J.-S. Caux 2018-09-07 12:09:46 +02:00
parent f035415b1b
commit c4eef6325e
5 changed files with 50 additions and 2 deletions

View File

@ -25,9 +25,21 @@ BINDIR = $(BASEDIR)bin/
# Set the compiler choice
#CXX = g++
CXX = /usr/local/bin/g++
# 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
CXXFLAGS = -fopenmp
LDFLAGS = -L$(LIBDIR)
LDLIBS = -l$(VERSION)
INC = -I$(HEADDIR)
MPICXX = mpicxx
#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
@ -37,6 +49,9 @@ COMPILE = $(CXX) -I$(BASEDIR)include/ -L$(LIBDIR) -O3 -w -fopenmp
COMPILE_MPI = mpicxx -I$(BASEDIR)include/ -L$(LIBDIR) -O3 -w -fopenmp
#COMPILE_OMP = g++ -I$(BASEDIR)include/ -L$(LIBDIR) -O3 -w -fopenmp
#COMPILE = $(CXX) $(CXXFLAGS) $(INC) $(LDFLAGS)
#COMPILE = $(CXX)
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
vpath %.h $(HEADDIR)

View File

@ -17,7 +17,7 @@ Purpose: Core header file, includes all descendents.
// This core header file includes all the others
const char ABACUS_VERSION[20] = "ABACUS++G_8";
const char ABACUS_VERSION[20] = "ABACUS_0a";
// Standard includes
#include <cmath>

View File

@ -556,8 +556,23 @@ namespace ABACUS {
}
Ix2_min[j] = -Ix2_max[j];
Ix2_max[j] += 4;
Ix2_min[j] -= 4;
}
// New attempt
// for (int j = 0; j < RefChain.Nstrings; ++j) {
// sum1 = 0;
// for (int k = 0; k < RefChain.Nstrings; ++k) {
// sum1 += (j == k ? 0 : Nrap[k] * 2 * ABACUS::min(RefChain.Str_L[j], RefChain.Str_L[k]));
// }
// Ix2_max[j] = RefChain.Nsites - (2 * RefChain.Str_L[j] - 1) * (Nrap[j] - 1) - sum1;
// Ix2_min[j] = -Ix2_max[j] + 2;
// Ix2_max[j] += 2;
// Ix2_min[j] -= 2;
//}
} // if XXZ_gpd
}

View File

@ -192,6 +192,25 @@ namespace ABACUS {
for (int alpha = 0; alpha < base[j]; ++alpha)
if ((Ix2[j][alpha] < -chain.Nsites) || (Ix2[j][alpha] >= chain.Nsites)) answer = false;
// Check that sum over quantum numbers fits in fundamental interval
int sumI = 0;
for (int j = 0; j < chain.Nstrings; ++j)
for (int alpha = 0; alpha < base[j]; ++alpha)
sumI += Ix2[j][alpha];
if (sumI < -chain.Nsites + 2 || sumI > chain.Nsites) answer = false;
// Check max distance between min and max quantum numbers at each level:
for (int j = 0; j < chain.Nstrings; ++j) {
int sum1 = 0;
for (int k = 0; k < chain.Nstrings; ++k) {
sum1 += (j == k) ? 0 : 2 * base[k] * ABACUS::min(chain.Str_L[j], chain.Str_L[k]);
if (base[j] > 0 &&
(Ix2[j][base[j] - 1] - Ix2[j][0]
>= 2*(chain.Nsites - (2*chain.Str_L[j] - 1) * base[j] - sum1)))
answer = false;
}
}
if (!answer) {
E = 0.0;
K = 0.0;

View File

@ -213,7 +213,6 @@ namespace ABACUS {
// A paralevel == 2 branching's files have a suffix of the form "_3_8_2_8", meaning that this
// is the rank 2 out of 8 subscan of the _3_8 scan.
bool in_parallel = (paralevel > 0);
if (in_parallel && (rank.size() != paralevel || nr_processors.size() != paralevel)) {
cout << "paralevel = " << paralevel << "\trank.size() = " << rank.size()