Browse Source

Restart work. Set compiler to gcc.

master
J.-S. Caux 5 years ago
parent
commit
c4eef6325e
5 changed files with 50 additions and 2 deletions
  1. 15
    0
      Makefile
  2. 1
    1
      include/ABACUS.h
  3. 15
    0
      src/HEIS/Heis.cc
  4. 19
    0
      src/HEIS/XXZ_gpd_Bethe_State.cc
  5. 0
    1
      src/SCAN/General_Scan.cc

+ 15
- 0
Makefile View File

@@ -25,9 +25,21 @@ BINDIR = $(BASEDIR)bin/
25 25
 # Set the compiler choice
26 26
 #CXX = g++
27 27
 CXX = /usr/local/bin/g++
28
+# On OS X, using a separate installation of llvm tools:
29
+# CXX = /usr/local/opt/llvm/bin/clang++ -Xpreprocessor -fopenmp -lomp -L/usr/local/opt/llvm/lib:lib/ -I/usr/local/opt/llvm/include
30
+# CXX = clang++ -Weverything -ferror-limit=1
31
+# CXX += -Wno-padded -Wno-c++98-compat-pedantic -Wno-exit-time-destructors
32
+# 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
33
+#CXXFLAGS = -std=c++14 -fopenmp
34
+CXXFLAGS = -fopenmp
35
+LDFLAGS = -L$(LIBDIR)
36
+LDLIBS = -l$(VERSION)
37
+INC = -I$(HEADDIR)
38
+
28 39
 MPICXX = mpicxx
29 40
 
30 41
 
42
+
31 43
 #COMPILE = g++ -Wall -I$(BASEDIR)include/ -L$(LIBDIR) -O3 -stdlib=libstdc++
32 44
 #COMPILE = g++ -Wall -I$(BASEDIR)include/ -L$(LIBDIR) -O3
33 45
 #COMPILE = g++ -I$(BASEDIR)include/ -L$(LIBDIR) -O3 -w -fopenmp
@@ -37,6 +49,9 @@ COMPILE = $(CXX) -I$(BASEDIR)include/ -L$(LIBDIR) -O3 -w -fopenmp
37 49
 COMPILE_MPI = mpicxx -I$(BASEDIR)include/ -L$(LIBDIR) -O3 -w -fopenmp
38 50
 #COMPILE_OMP = g++ -I$(BASEDIR)include/ -L$(LIBDIR) -O3 -w -fopenmp
39 51
 
52
+#COMPILE = $(CXX) $(CXXFLAGS) $(INC) $(LDFLAGS)
53
+#COMPILE = $(CXX)
54
+
40 55
 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
41 56
 
42 57
 vpath %.h $(HEADDIR)

+ 1
- 1
include/ABACUS.h View File

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

+ 15
- 0
src/HEIS/Heis.cc View File

@@ -556,8 +556,23 @@ namespace ABACUS {
556 556
 	}
557 557
 
558 558
 	Ix2_min[j] = -Ix2_max[j];
559
+
560
+	Ix2_max[j] += 4;
561
+	Ix2_min[j] -= 4;
559 562
       }
560 563
 
564
+      // New attempt
565
+      // for (int j = 0; j < RefChain.Nstrings; ++j) {
566
+      // 	sum1 = 0;
567
+      // 	for (int k = 0; k < RefChain.Nstrings; ++k) {
568
+      // 	  sum1 += (j == k ? 0 : Nrap[k] * 2 * ABACUS::min(RefChain.Str_L[j], RefChain.Str_L[k]));
569
+      // 	}
570
+      // 	Ix2_max[j] = RefChain.Nsites - (2 * RefChain.Str_L[j] - 1) * (Nrap[j] - 1) - sum1;
571
+      // 	Ix2_min[j] = -Ix2_max[j] + 2;
572
+      // Ix2_max[j] += 2;
573
+      // Ix2_min[j] -= 2;
574
+      //}
575
+
561 576
     } // if XXZ_gpd
562 577
 
563 578
   }

+ 19
- 0
src/HEIS/XXZ_gpd_Bethe_State.cc View File

@@ -192,6 +192,25 @@ namespace ABACUS {
192 192
       for (int alpha = 0; alpha < base[j]; ++alpha)
193 193
 	if ((Ix2[j][alpha] < -chain.Nsites) || (Ix2[j][alpha] >= chain.Nsites)) answer = false;
194 194
 
195
+    // Check that sum over quantum numbers fits in fundamental interval
196
+    int sumI = 0;
197
+    for (int j = 0; j < chain.Nstrings; ++j)
198
+      for (int alpha = 0; alpha < base[j]; ++alpha)
199
+	sumI += Ix2[j][alpha];
200
+    if (sumI < -chain.Nsites + 2 || sumI > chain.Nsites) answer = false;
201
+
202
+    // Check max distance between min and max quantum numbers at each level:
203
+    for (int j = 0; j < chain.Nstrings; ++j) {
204
+      int sum1 = 0;
205
+      for (int k = 0; k < chain.Nstrings; ++k) {
206
+	sum1 += (j == k) ? 0 : 2 * base[k] * ABACUS::min(chain.Str_L[j], chain.Str_L[k]);
207
+	if (base[j] > 0 &&
208
+	    (Ix2[j][base[j] - 1] - Ix2[j][0]
209
+	     >= 2*(chain.Nsites - (2*chain.Str_L[j] - 1) * base[j] - sum1)))
210
+	  answer = false;
211
+      }
212
+    }
213
+
195 214
     if (!answer) {
196 215
       E = 0.0;
197 216
       K = 0.0;

+ 0
- 1
src/SCAN/General_Scan.cc View File

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

Loading…
Cancel
Save