README.md 5.23 KB
Newer Older
Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
1
# Quick Start
Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
2

Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
3
## Licensing
Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
4

Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
5

Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
6
 The full software license for DMRG++ version 3 
Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
7
 can be found in file LICENSE in the root directory of the code.
Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
8
9
10
11
 DMRG++ is a free and open source implementation of the
 DMRG algorithm. You are welcomed to use it and publish data
 obtained with DMRG++. If you do,
<b>please cite this work</b> (see next subsection).
Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
12

Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
13
## DISCLAIMER
Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
14

Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
15
<pre>
Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
 THE SOFTWARE IS SUPPLIED BY THE COPYRIGHT HOLDERS AND
 CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
 WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
 PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
 COPYRIGHT OWNER, CONTRIBUTORS, UNITED STATES GOVERNMENT,
 OR THE UNITED STATES DEPARTMENT OF ENERGY BE LIABLE FOR
 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
 OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
 DAMAGE.
Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
32

Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
33
34
35
36
37
 NEITHER THE UNITED STATES GOVERNMENT, NOR THE UNITED
 STATES DEPARTMENT OF ENERGY, NOR THE COPYRIGHT OWNER, NOR
 ANY OF THEIR EMPLOYEES, REPRESENTS THAT THE USE OF ANY
 INFORMATION, DATA, APPARATUS, PRODUCT, OR PROCESS
 DISCLOSED WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS.
Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
38
39
</pre>

Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
40
## How To Cite This Work
Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
41
42
43
44
45
46
47
48
49
50
51
52
53

<pre>
\@article{re:alvarez0209,
author="G. Alvarez",
title="The Density Matrix Renormalization Group for
Strongly Correlated Electron Systems: A Generic Implementation",
journal="Computer Physics Communications",
volume="180",
pages="1572-1578",
year="2009"}

\@article{re:alvarez0310,
author="G. Alvarez",
Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
54
55
title="Implementation of the SU(2) Hamiltonian
Symmetry for the DMRG Algorithm",
Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
56
57
58
59
60
61
62
63
64
journal="Computer Physics Communications",
volume="183",
pages="2226-2232",
year="2012"}


\@article{re:alvarez0311,
author="G. Alvarez and  L. G. G. V. Dias da Silva and
E. Ponce and  E. Dagotto",
Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
65
66
title="Time Evolution with the DMRG Algorithm:
A Generic Implementation
Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
for Strongly Correlated Electronic Systems",
journal="Phys. Rev. E",
volume="84",
pages="056706",
year="2011"}

\@article{re:alvarez0713,
author="G. Alvarez",
title="Production of minimally entangled typical thermal states
with the Krylov-space approach",
journal="Phys. Rev. B",
volume="87",
pages="245130",
year="2013"}

And also:
\@article{re:alvarez08,
Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
84
85
86
 re:webDmrgPlusPlus,
 Author = {G. Alvarez},
 Title = {DMRG++ Website},
Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
87
 Publisher = {\\url{https://g1257.github.com/dmrgPlusPlus}} }
Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
88
89
</pre>

Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
90
## Code Integrity
Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
91

Alvarez, Gonzalo's avatar
README    
Alvarez, Gonzalo committed
92
Hash of the latest commit is also posted at
93

Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
94
https://g1257.github.com/hashes.html
95

Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
96
Latest commit should always be signed.
Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
97
Keys at https://g1257.github.com/keys.html
Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
98

Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
99
## Building and Running DMRG++
Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
100

Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
101
### Required Software
Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
102

Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
103
\begin{enumerate}
Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
104

Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
105
\item GNU C++ or LLVM CLANG++ (C++11 is used)
Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
106

Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
107
\item (required) The BLAS and LAPACK library.
Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
108

Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
109
\item (required) HDF5
Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
110

Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
111
\item (required) PsimagLite. See below for details.
Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
112

Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
113
114
\item (required) boost-devel (boost-spirit) for Ainur
Only headers files are used; boost runtime is not used.
Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
115
116
117
118

\item (optional) GSL (GNU Scientific library)

\item (optional) make or gmake
Alvarez, Gonzalo's avatar
README    
Alvarez, Gonzalo committed
119
(only needed to use the Makefile)
Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
120

Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
121
\item (optional) perl
Alvarez, Gonzalo's avatar
README    
Alvarez, Gonzalo committed
122
(only needed to run the configure.pl script)
Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
123

Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
\end{enumerate}

### Downloading DMRG++
Create a directory somewhere and cd to it.

<pre>
git clone https://code.ornl.gov/gonzalo_3/PsimagLite
cd PsimagLite/
git checkout features
git pull origin features 

cd ../
git clone https://code.ornl.gov/gonzalo_3/dmrgpp
cd dmrgpp/
git checkout features
git pull origin features
</pre>
Please also read https://g1257.github.io/availabilityOfSoftware.html

### Preparing your Makefile

Create a file anywhere
called /path/to/somewhere/myconfig.psiTag

Now have a look at dmrgpp/TestSuite/inputs/ConfigBase.psiTag
DO NOT Edit this file. You may override items in that file using
your myconfig.psiTag.
For example, to use openblas instead of regular blas, you may
write in your myconfig.psiTag
<pre>
	dependency BLAS = LDFLAGS += -lopenblas
	dependency LAPACK= ()
</pre>
For the psiTag syntax see the beginning of PsimagLite/scripts/PsiTag.pm

### Compiling and Linking DMRG++
Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
160
<pre>
Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
161
 cd PsimagLite/lib
Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
162
163
 ./configure.pl -c /path/to/somewhere/myconfig.psiTag
 make -j something
Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
164
165
 cd ../../
 cd dmrgpp/src
Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
166
167
 ./configure.pl -c /path/to/somewhere/myconfig.psiTag
 make -j something
Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
168
</pre>
Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
169

Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
170
171
172
Above <code>something</code> refers to the number of cores you want
to use for parallelizing the make run.

Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
173
### Running DMRG++
Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
174

Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
175
176
177
178
179
180
Assuming you are in dmrgpp/src,
copy input2.inp to dmrgpp/src with

<code>cp ../TestSuite/inputs/input2.inp .</code>

and then you may run with
Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
181

Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
182
<code>./dmrg -f ../TestSuite/inputs/input2.inp</code>
Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
183

Alvarez, Gonzalo's avatar
Alvarez, Gonzalo committed
184
185
186
187
188
189
190
191
192
You will now have two files a data2.hdf5 and an ASCII file runForinput2.cout.
The name data2 is obtained from the corresponding label in the input file,
in this case input2.inp. Normally the code writes stdout to
runForinput2.cout for an input called input2.inp, and stderr to the
terminal. If you would like to override the default inferred
name runForinput2.cout you may use 
<code>./dmrg -f ../TestSuite/inputs/input2.inp -l myoutputfile</code>
If you would like stdout be written to the terminal say -l -