You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+26-34Lines changed: 26 additions & 34 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -111,18 +111,17 @@ Both CPU and GPU version offline package are avaiable in [the Releases page](htt
111
111
112
112
## Install the python interface
113
113
### Install the Tensorflow's python interface
114
-
First, check the python version and compiler version on your machine
114
+
First, check the python version on your machine
115
115
```bash
116
-
python --version; gcc --version
116
+
python --version
117
117
```
118
-
If your python version is 3.7.x, it is highly recommended that the GNU C/C++ compiler is higher than or equal to 5.0.
119
118
120
119
We follow the virtual environment approach to install the tensorflow's Python interface. The full instruction can be found on [the tensorflow's official website](https://www.tensorflow.org/install/pip). Now we assume that the Python interface will be installed to virtual environment directory `$tensorflow_venv`
121
120
```bash
122
121
virtualenv -p python3 $tensorflow_venv
123
122
source$tensorflow_venv/bin/activate
124
123
pip install --upgrade pip
125
-
pip install --upgrade tensorflow==1.14.0
124
+
pip install --upgrade tensorflow==2.1.0
126
125
```
127
126
It is notice that everytime a new shell is started and one wants to use `DeePMD-kit`, the virtual environment should be activated by
128
127
```bash
@@ -136,31 +135,17 @@ If one has multiple python interpreters named like python3.x, it can be specifie
136
135
```bash
137
136
virtualenv -p python3.7 $tensorflow_venv
138
137
```
139
-
If one needs the GPU support of deepmd-kit, the GPU version of tensorflow should be installed by
140
-
```bash
141
-
pip install --upgrade tensorflow-gpu==1.14.0
142
-
```
143
138
To verify the installation, run
144
139
```bash
145
-
python -c "import tensorflow as tf; sess=tf.Session(); print(sess.run(tf.reduce_sum(tf.random_normal([1000, 1000]))))"
140
+
python -c "import tensorflow as tf;print(tf.reduce_sum(tf.random.normal([1000, 1000])))"
146
141
```
147
142
One should remember to activate the virtual environment every time he/she uses deepmd-kit.
If one downloads the .zip file from the github, then the default folder of source code would be `deepmd-kit-master` rather than `deepmd-kit`. For convenience, you may want to record the location of source to a variable, saying `deepmd_source_dir` by
157
-
```bash
158
-
cd deepmd-kit
159
-
deepmd_source_dir=`pwd`
160
-
```
161
-
Then execute
146
+
Execute
162
147
```bash
163
-
pip install .
148
+
pip install deepmd-kit
164
149
```
165
150
To test the installation, one may execute
166
151
```bash
@@ -189,11 +174,30 @@ If one does not need to use DeePMD-kit with Lammps or I-Pi, then the python inte
189
174
190
175
### Install the Tensorflow's C++ interface
191
176
192
-
It is highly recommended that one keeps the same C/C++ compiler as the python interface. The C++ interface of DeePMD-kit was tested with compiler gcc >= 4.8. It is noticed that the I-Pi support is only compiled with gcc >= 4.9.
177
+
Check the compiler version on your machine
178
+
179
+
```
180
+
gcc --version
181
+
```
182
+
183
+
The C++ interface of DeePMD-kit was tested with compiler gcc >= 4.8. It is noticed that the I-Pi support is only compiled with gcc >= 4.9.
193
184
194
185
First the C++ interface of Tensorflow should be installed. It is noted that the version of Tensorflow should be in consistent with the python interface. We assume that you have followed our instruction and installed tensorflow python interface 1.14.0 with, then you may follow [the instruction for CPU](doc/install-tf.1.14.md) to install the corresponding C++ interface (CPU only). If one wants GPU supports, he/she should follow [the instruction for GPU](doc/install-tf.1.14-gpu.md) to install the C++ interface.
This may happen if you are using a gcc >= 5.0, and tensorflow was compiled with gcc < 5.0. You may set `-DOP_CXX_ABI=0` in the process of `cmake`.
618
-
619
-
Another possible reason might be the large gap between the python version of TensorFlow and the TensorFlow c++ interface.
620
-
621
613
## MD: cannot run LAMMPS after installing a new version of DeePMD-kit
622
614
This typically happens when you install a new version of DeePMD-kit and copy directly the generated `USER-DEEPMD` to a LAMMPS source code folder and re-install LAMMPS.
0 commit comments