mir-group / pair_nequip Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
I am trying to install lammps to use a trained network.
I follow the same process described in READ.md and the lammps configuration goes without any errors.
But when I am building, I am getting this error:
"# error "This Intel is for use only with the Intel C++ compilers!""
I am loading intel compilers (intel, intel-mpi, intel-mkl)
Hi! This is Steven
When I try to run lmp -in water_minimize.in
it will show this error:
LAMMPS (17 Feb 2022)
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98)
using 1 OpenMP thread(s) per MPI task
units real
atom_style atomic
newton off
thermo 1
read_data water.lmp
Reading data file ...
triclinic box = (0 0 0) to (12.4447 12.4447 12.4447) with tilt (0 0 0)
1 by 1 by 1 MPI processor grid
reading atoms ...
192 atoms
read_data CPU = 0.006 seconds
pair_style nequip
ERROR: Unrecognized pair style 'nequip' (src/force.cpp:279)
Last command: pair_style nequip
My pytorch version is 1.10.2
Can anyone help?
Thanks!
Sincerely,
Steven
I have a trained potential and want to run it with lammps directly. With these files, I run lmp -in /path/to/in.script
and the error Segmentation fault (core dumped)
occur as following:
LAMMPS (29 Sep 2021 - Update 2)
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98)
using 1 OpenMP thread(s) per MPI task
Reading data file ...
triclinic box = (-0.14836035 -0.15282334 -1.1304143) to (15.113032 15.567664 115.15197) with tilt (0.0000000 -6.9293962 0.0000000)
1 by 1 by 1 MPI processor grid
reading atoms ...
2400 atoms
reading velocities ...
2400 velocities
read_data CPU = 0.004 seconds
NEQUIP is using device cuda
NequIP Coeff: type 1 is element Ga
NequIP Coeff: type 2 is element O
Loading model from GaOx_deployed_model.pth
Freezing TorchScript model...
51 atoms in group freeze1
77 atoms in group freeze2
128 atoms in group freeze
2272 atoms in group free
108 atoms in group hot
110 atoms in group cold
Neighbor list info ...
update every 1 steps, delay 10 steps, check yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 8
ghost atom cutoff = 8
binsize = 4, bins = 6 4 30
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair nequip, perpetual
attributes: full, newton off
pair build: full/bin/atomonly
stencil: full/bin/3d
bin: standard
Setting up Verlet run ...
Unit style : metal
Current step : 0
Time step : 0.001
Segmentation fault (core dumped)
the .in file of lammps is as below. If I block the final segment from "# set up langevin" to the last line, the error won't occur.
units metal
boundary p p p
atom_style atomic
newton off
read_data restart.data
pair_style nequip
pair_coeff * * GaOx_deployed_model.pth Ga O
mass 1 69.723
mass 2 15.999
# temperature
variable T equal 300
variable T_diff equal 80
variable T_lo equal ${T}-${T_diff}/2
variable T_hi equal ${T}+${T_diff}/2
# number of layers
variable Nlayer equal 40
# box dimensions
variable Lz equal zhi-zlo
variable Lx equal xhi-xlo
variable Ly equal yhi-ylo
# width of each layer
variable dz equal ${Lz}/${Nlayer}
variable reduced_dz equal 1/${Nlayer}
# group set
variable freeze1_low equal zlo
variable freeze1_high equal zlo+${dz}-0.01*${Nlayer}
variable freeze2_low equal zhi-${dz}-0.01*${Nlayer}
variable freeze2_high equal zhi
region freeze1 block INF INF INF INF ${freeze1_low} ${freeze1_high}
region freeze2 block INF INF INF INF ${freeze2_low} ${freeze2_high}
group freeze1 region freeze1
group freeze2 region freeze2
group freeze union freeze1 freeze2
group free subtract all freeze
variable cold_low equal ${freeze1_high}
variable cold_high equal ${cold_low}+2*${dz}
variable hot_high equal ${freeze2_low}
variable hot_low equal ${hot_high}-2*${dz}
region cold block INF INF INF INF ${cold_low} ${cold_high}
region hot block INF INF INF INF ${hot_low} ${hot_high}
group hot region hot
group cold region cold
velocity freeze set 0 0 0
fix 2 freeze setforce 0.0 0.0 0.0
reset_timestep 0
dump 1 all atom 100 dump.lammpstrj
# set up langevin
fix cold cold langevin ${T_lo} ${T_lo} 0.05 888888 tally yes
fix hot hot langevin ${T_hi} ${T_hi} 0.05 888888 tally yes
variable heat_lo equal f_cold*16/(${Lx}*${Lz})
variable heat_hi equal f_hot*16/(${Ly}*${Lz})
variable heat_flux equal (v_heat_lo-v_heat_hi)/2/((step+0.001)*dt*10^-3)
variable heat_lo equal 1000
variable heat_hi equal 1000
variable heat_flux equal 1000
fix nve free nve
compute ke all ke/atom
variable temp atom c_ke*16000/1.38/1.5
compute layers all chunk/atom bin/1d z lower ${reduced_dz} units reduced
fix temp all ave/chunk 10 100 1000 layers v_temp file Temp.profile
thermo 100
thermo_style custom time etotal temp press f_cold f_hot v_heat_flux
run 100000
write_data restart.data
Hello,
I am getting an error during compilation, apparently with a source file:
/home/akbarshs/lammps/src/pair_nequip.cpp: In member function \u2018virtual void LAMMPS_NS::PairNEQUIP::coeff(int, char**)\u2019:
/home/akbarshs/lammps/src/pair_nequip.cpp:216:35: error: lvalue required as left operand of assignment
torch::jit::getBailoutDepth() = jit_bailout_depth;
^~~~~~~~~~~~~~~~~
I am trying to install on an HPC cluster running centos 7, using gcc 7.3. I used the following recipe to install:
pip install nequip
wget "https://github.com/lammps/lammps/archive/stable.zip"
unzip -q stable.zip
rm stable.zip
mv lammps-stable lammps
wget "https://github.com/mir-group/pair_nequip/archive/main.zip"
unzip -q main.zip
rm main.zip
mv pair_nequip-main pair_nequip
cd pair_nequip && ./patch_lammps.sh ../lammps
pip install mkl mkl-include
cd lammps && mkdir -p build && cd build && cmake ../cmake -DCMAKE_PREFIX_PATH=python -c 'import torch;print(torch.utils.cmake_prefix_path)'
&& make -j4
Thanks
I have done the cmake part successfully in our cluster.
while doing make -j 32 i got the following error.
/data/home/reddy/softwares/lammps-29Sep2021/src/pair_nequip.cpp: In member function ‘virtual void LAMMPS_NS::PairNEQUIP::coeff(int, char**)’:
/data/home/reddy/softwares/lammps-29Sep2021/src/pair_nequip.cpp:209:30: error: lvalue required as left operand of assignment
209 | torch::jit::getBailoutDepth() = jit_bailout_depth;
I was able to install in my own laptop but got the above error in all of our clusters.
please help me to resolve this issue.
thank you.
Describe the bug
I have successfully trained my water model with 64-water system and it works fine when I run LAMMPS upto 1728 H2O, but when I went to 4096 H2O, it gave "Segmentation fault (core dumped)". Is there a limitation on how many atoms NequIP can handle?
To Reproduce
units metal
atom_style atomic
boundary p p p
newton off
neighbor 1.0 bin
neigh_modify every 1 delay 0 check yes
read_data water-64.data
pair_style nequip
pair_coeff * * base-float32.pth H O
replicate 4 4 4
timestep 0.001
thermos 1
dump dump1 all custom 10 traj.lammpstrj id type element x y z
dump_modify dump1 sort id element H O
velocity all create 300.0 24829580
thermo_style custom step temp press density pe
fix nvt all nvt temp 300.0 300.0 $(100.0*dt)
run 100
Environment (please complete the following information):
Additional context
I can sent my deployed model if anyone can help address this issue.
Some important information about my config.yaml:
default_dtype: float32
r_max: 4.0
num_layers: 3
l_max: 1
parity: false
num_features: 16
nonlinearity_type: gate
resnet: false
nonlinearity_scalars:
e: silu
o: tanh
nonlinearity_gates:
e: silu
o: tanh
num_basis: 16
BesselBasis_trainable: true
PolynomialCutoff_p: 6
invariant_layers: 2
invariant_neurons: 64
avg_num_neighbors: auto
use_sc: true
dataset: npz
key_mapping:
z: atomic_numbers
E: total_energy
F: forces
R: pos
cell: cell
pbc: pbc
npz_fixed_field_keys:
Hi there,
I am on Mac OS 10.15.6. When I was trying to compile LAMMPS with NequIP patched with the following command:
cmake -D BUILD_LIB=yes -D BUILD_SHARED_LIBS=yes -D BUILD_MPI=ON -D BUILD_OMP=yes -D PKG_MPIIO=ON -D LAMMPS_EXCEPTIONS=yes -D PKG_MANYBODY=ON -D PKG_MISC=ON -D PKG_MISC=ON -D PKG_EXTRA-COMPUTE=ON -D PKG_EXTRA-DUMP=ON -D PKG_EXTRA-FIX=ON -D PKG_EXTRA-PAIR=ON -DCMAKE_PREFIX_PATH=
python -c 'import torch;print(torch.utils.cmake_prefix_path)' -DMKL_INCLUDE_DIR="$CONDA_PREFIX/include" ../cmake
I encountered the following error when compiling force.cpp:
In file included from /Users/Michael_wang/Documents/venkat/lammps-develop/src/force.cpp:21:
In file included from /Users/Michael_wang/Documents/venkat/lammps-develop/m/styles/style_pair.h:71:
In file included from /Users/Michael_wang/Documents/venkat/lammps-develop/src/pair_nequip.h:25:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/torch.h:3:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/all.h:8:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/ATen/ATen.h:9:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/ATen/Context.h:4:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/ATen/Tensor.h:3:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/ATen/core/TensorBody.h:3:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/ATen/Operators.h:13:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/c10/core/Scalar.h:11:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/c10/core/ScalarType.h:6:
/Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/c10/util/Optional.h:717:12: error: use of undeclared identifier 'assert'
return TR2_OPTIONAL_ASSERTED_EXPRESSION(initialized(), dataptr());
^
/Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/c10/util/Optional.h:81:29: note: expanded from macro 'TR2_OPTIONAL_ASSERTED_EXPRESSION'
((CHECK) ? (EXPR) : ([] { assert(!#CHECK); }(), (EXPR)))
^
/Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/c10/util/Optional.h:726:12: error: use of undeclared identifier 'assert'
return TR2_OPTIONAL_ASSERTED_EXPRESSION(initialized(), contained_val());
^
/Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/c10/util/Optional.h:81:29: note: expanded from macro 'TR2_OPTIONAL_ASSERTED_EXPRESSION'
((CHECK) ? (EXPR) : ([] { assert(!#CHECK); }(), (EXPR)))
^
/Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/c10/util/Optional.h:880:12: error: use of undeclared identifier 'assert'
return TR2_OPTIONAL_ASSERTED_EXPRESSION(ref, ref);
^
/Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/c10/util/Optional.h:81:29: note: expanded from macro 'TR2_OPTIONAL_ASSERTED_EXPRESSION'
((CHECK) ? (EXPR) : ([] { assert(!#CHECK); }(), (EXPR)))
^
/Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/c10/util/Optional.h:884:12: error: use of undeclared identifier 'assert'
return TR2_OPTIONAL_ASSERTED_EXPRESSION(ref, *ref);
^
/Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/c10/util/Optional.h:81:29: note: expanded from macro 'TR2_OPTIONAL_ASSERTED_EXPRESSION'
((CHECK) ? (EXPR) : ([] { assert(!#CHECK); }(), (EXPR)))
^
In file included from /Users/Michael_wang/Documents/venkat/lammps-develop/src/force.cpp:21:
In file included from /Users/Michael_wang/Documents/venkat/lammps-develop/m/styles/style_pair.h:71:
In file included from /Users/Michael_wang/Documents/venkat/lammps-develop/src/pair_nequip.h:25:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/torch.h:3:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/all.h:8:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/ATen/ATen.h:9:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/ATen/Context.h:4:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/ATen/Tensor.h:3:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/ATen/core/TensorBody.h:3:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/ATen/Operators.h:14:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/c10/core/TensorOptions.h:3:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/c10/core/Backend.h:5:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/c10/core/DispatchKeySet.h:6:
/Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/c10/util/llvmMathExtras.h:239:3: error: use of undeclared identifier 'assert'
assert(N <= Bits && "Invalid bit index");
^
/Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/c10/util/llvmMathExtras.h:406:3: error: use of undeclared identifier 'assert'
assert(N > 0 && N <= 64 && "integer width out of range");
^
/Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/c10/util/llvmMathExtras.h:423:3: error: use of undeclared identifier 'assert'
assert(N > 0 && N <= 64 && "integer width out of range");
^
/Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/c10/util/llvmMathExtras.h:434:3: error: use of undeclared identifier 'assert'
assert(N > 0 && N <= 64 && "integer width out of range");
^
/Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/c10/util/llvmMathExtras.h:661:3: error: use of undeclared identifier 'assert'
assert(
^
/Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/c10/util/llvmMathExtras.h:665:3: error: use of undeclared identifier 'assert'
assert((uintptr_t)Addr + Alignment - 1 >= (uintptr_t)Addr);
^
/Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/c10/util/llvmMathExtras.h:725:3: error: use of undeclared identifier 'assert'
assert(Align != 0u && "Align can't be 0.");
^
/Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/c10/util/llvmMathExtras.h:759:3: error: use of undeclared identifier 'assert'
assert(Align != 0u && "Align can't be 0.");
^
/Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/c10/util/llvmMathExtras.h:783:3: error: use of undeclared identifier 'assert'
assert(B > 0 && "Bit width can't be 0.");
^
/Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/c10/util/llvmMathExtras.h:784:3: error: use of undeclared identifier 'assert'
assert(B <= 32 && "Bit width out of range.");
^
/Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/c10/util/llvmMathExtras.h:800:3: error: use of undeclared identifier 'assert'
assert(B > 0 && "Bit width can't be 0.");
^
/Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/c10/util/llvmMathExtras.h:801:3: error: use of undeclared identifier 'assert'
assert(B <= 64 && "Bit width out of range.");
^
In file included from /Users/Michael_wang/Documents/venkat/lammps-develop/src/force.cpp:21:
In file included from /Users/Michael_wang/Documents/venkat/lammps-develop/m/styles/style_pair.h:71:
In file included from /Users/Michael_wang/Documents/venkat/lammps-develop/src/pair_nequip.h:25:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/torch.h:3:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/all.h:8:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/ATen/ATen.h:9:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/ATen/Context.h:4:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/ATen/Tensor.h:3:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/ATen/core/TensorBody.h:3:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/ATen/Operators.h:13:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/c10/core/Scalar.h:11:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/c10/core/ScalarType.h:6:
/Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/c10/util/Optional.h:721:5: error: use of undeclared identifier 'assert'
assert(initialized());
^
/Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/c10/core/ScalarTypeToTypeMeta.h:34:19: note: in instantiation of member function
'c10::optional<caffe2::TypeMeta>::operator->' requested here
return type_meta->toScalarType();
^
In file included from /Users/Michael_wang/Documents/venkat/lammps-develop/src/force.cpp:21:
In file included from /Users/Michael_wang/Documents/venkat/lammps-develop/m/styles/style_pair.h:71:
In file included from /Users/Michael_wang/Documents/venkat/lammps-develop/src/pair_nequip.h:25:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/torch.h:3:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/all.h:8:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/ATen/ATen.h:9:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/ATen/Context.h:4:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/ATen/Tensor.h:3:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/ATen/core/TensorBody.h:3:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/ATen/Operators.h:13:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/c10/core/Scalar.h:11:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/c10/core/ScalarType.h:6:
/Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/c10/util/Optional.h:730:5: error: use of undeclared identifier 'assert'
assert(initialized());
^
/Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/c10/core/TensorOptions.h:430:32: note: in instantiation of member function
'c10::optional<c10::MemoryFormat>::operator*' requested here
merged.set_memory_format(*optional_memory_format);
^
In file included from /Users/Michael_wang/Documents/venkat/lammps-develop/src/force.cpp:21:
In file included from /Users/Michael_wang/Documents/venkat/lammps-develop/m/styles/style_pair.h:71:
In file included from /Users/Michael_wang/Documents/venkat/lammps-develop/src/pair_nequip.h:25:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/torch.h:3:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/all.h:8:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/ATen/ATen.h:9:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/ATen/Context.h:4:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/ATen/Tensor.h:3:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/ATen/core/TensorBody.h:3:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/ATen/Operators.h:13:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/c10/core/Scalar.h:11:
In file included from /Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/c10/core/ScalarType.h:6:
/Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/c10/util/Optional.h:730:5: error: use of undeclared identifier 'assert'
assert(initialized());
^
/Users/Michael_wang/anaconda3/envs/wtf4/lib/python3.8/site-packages/torch/include/c10/core/TensorOptions.h:460:17: note: in instantiation of member function
'c10::optional<c10::Device>::operator*' requested here
device_ = *device;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [CMakeFiles/lammps.dir/Users/Michael_wang/Documents/venkat/lammps-develop/src/force.cpp.o] Error 1
make[1]: *** [CMakeFiles/lammps.dir/all] Error 2
make: *** [all] Error 2
At first, I thought it might be a compiler problem. I tried different versions of Xcode compiler, brew installed llvm compiler, brew installed gcc. None of them works.
Any suggestions on what might be the problem? (It works on a Linux machine)
Hi! all
When I am doing the last command make -j8, it generates the following error:
(NequIP) steven604011@steven:/mnt/c/Users/Steven Fang/lammps/build$ make -j8
[ 2%] Built target comm.h
[ 2%] Built target region.h
[ 2%] Built target improper.h
[ 2%] Built target update.h
[ 2%] Built target library.h
[ 2%] Built target pointers.h
[ 2%] Built target timer.h
[ 2%] Built target lammps.h
[ 3%] Built target force.h
[ 3%] Built target error.h
[ 4%] Built target citeme.h
[ 4%] Built target fix.h
[ 4%] Built target group.h
[ 4%] Built target utils.h
[ 4%] Built target angle.h
[ 4%] Built target variable.h
[ 6%] Built target memory.h
[ 6%] Built target info.h
[ 6%] Built target lmppython.h
[ 6%] Built target neighbor.h
[ 6%] Built target pair.h
[ 6%] Built target kspace.h
[ 7%] Built target lattice.h
[ 7%] Built target output.h
[ 7%] Built target modify.h
[ 7%] Built target bond.h
[ 7%] Built target input.h
-- Git Directory: /mnt/c/Users/Steven\ Fang/lammps/.git
-- Generating lmpgitversion.h...
[ 8%] Built target atom.h
CMake Error at /mnt/c/Users/Steven Fang/lammps/cmake/Modules/generate_lmpgitversion.cmake:34 (file):
file failed to open for writing (No such file or directory):
/mnt/c/Users/Steven\ Fang/lammps/build/styles/lmpgitversion.h.tmp
[ 8%] Built target compute.h
make[2]: *** [CMakeFiles/gitversion.dir/build.make:57: CMakeFiles/gitversion] Error 1
make[1]: *** [CMakeFiles/Makefile2:768: CMakeFiles/gitversion.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 8%] Built target universe.h
[ 8%] Built target domain.h
[ 8%] Built target lmptype.h
[ 8%] Built target neigh_list.h
[ 8%] Built target dihedral.h
make: *** [Makefile:130: all] Error 2
My system is Linux and my pytorch version is 1.10.0
Thanks for the help!!
Steven
hello,
I created a new conda environment with cuda11.8, pytorch version is 1.10.1 with py3.7_cuda11.3_cudnn8.2.0_0.
But when I build lammps "make -j12", I meet the error as below:
I found that the file "lammps/cmake/CMakeLists.txt" did not need to change. I am unsure how to resolve this error. Could you please provide me with some guidance or suggestions?
Thank you!
Thank you for distributing such an exciting project to the society.
I have been trying using nequip and came up with the trained potentials.
Now I wanted to run the multi-scale simulation with pair_nequip potential in lammps.
I compiled according to the instruction, but keep getting an error like below:
Total # of neighbors = 27926
Ave neighs/atom = 57.108384
Neighbor list builds = 2
Dangerous builds = 0
Setting up Verlet run ...
Unit style : metal
Current step : 76
Time step : 0.001
Per MPI rank memory allocation (min/avg/max) = 3.059 | 3.059 | 3.059 Mbytes
Step PotEng KinEng TotEng Temp Volume
76 -2010460 48.760029 -2010411.2 773 42875
corrupted double-linked list
[1] 112200 abort (core dumped) lmp_nequip -in system.in
Like shown above, the error is raised right after the minimization step. The full log and input LAMMPS script can be found here.
Thank you for reading.
When I run pair nequip with compiled LAMMPS, I have this error:
symbol lookup error: libtorch_cpu.so: undefined symbol: _ZNK3c1010TensorImpl22is_strides_like_customENS_12MemoryFormatE
However, I can run the LAMMPS/example/melt successfully. Do you know how to solve it? Thank you very much!
I have pytorch==1.11.0+cu113 and cuda 11.3 on my system.
After I complied Lammps with Nequip, I want to link Lammps to python. but when I input
make serial mode=shlib
in terminal in the path/to/src, the following error accurred:
g++ -g -O3 -std=c++11 -fPIC -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -I../STUBS -c ../lammps.cpp
In file included from ../style_pair.h:16,
from ../lammps.cpp:29:
../pair_nequip.h:25:10: fatal error: torch/torch.h: No such file or directory
25 | #include <torch/torch.h>;
| ^~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [Makefile:109: lammps.o] Error 1
make[2]: Leaving directory '/home/ubuntu/software/lammps/lammps/src/Obj_shared_serial'
make[1]: *** [Makefile:390: serial] Error 2
make[1]: Leaving directory '/home/ubuntu/software/lammps/lammps/src'
make: *** [Makefile:390: serial] Error 2
I can easily link a new Lammps with nothing complied to python by:
make serial mode=shlib
make install-python
but I can't make it when Nequip is complied. I wonder if it is possible to link Lammps with Nequip implied to python or does someone manage it?
In lammps/lammps#3199 a change was made to neighbor list request API, making full, half, and ghost not directly accessible to third-party code. This is used here
Lines 97 to 101 in b3680ef
Hence pair_nequip will not compile with LAMMPS after 2Jun2022. A simple fix is by replacing the 3 lines cited by the new API:
neighbor->add_request(this, NeighConst::REQ_FULL);
On macOS, or another BSD system, patching does not succeed:
$ ./patch_lammps.sh $HOME/lammps
Copying files...
Updating CMakeLists.txt...
sed: 1: "/Users/fx/lammps/cmake/ ...": invalid command code f
Done!
Note the sed error, that's because BSD sed expects an argument after -i
:
NAME
sed – stream editor
SYNOPSIS
sed [-Ealnru] command [-I extension] [-i extension] [file ...]
sed [-Ealnru] [-e command] [-f command_file] [-I extension] [-i extension] [file ...]
Specifying a suffix is the only way to make the command work for both BSD and GNU sed.
# Update CMakeLists.txt
sed -i.bak "s/set(CMAKE_CXX_STANDARD 11)/set(CMAKE_CXX_STANDARD 14)/" $lammps_dir/cmake/CMakeLists.txt
Problem:
The current implementation of nequip's LAMMPS plugin does not appropriately adjust the cutoff
parameter based on the number of interaction layers. It directly inherits the default r_max
from the nequip model without considering the multiplication with the number of layers. This oversight could lead to inaccuracies in simulations due to the message passing mechanism. Is that right?
Thank you for your attention to this matter.
Hi, I am just trying to compile the nequip package with lammps. But ran into the following issue, could you give me any ideas about this issue?
[100%] Linking CXX executable lmp
ld.lld: error: /u/envs/lammps/lib/python3.10/site-packages/torch/lib/libc10.so: undefined reference to pthread_setname_np [--no-allow-shlib-undefined]
clang-13: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [CMakeFiles/lmp.dir/build.make:111: lmp] Error 1
make[1]: *** [CMakeFiles/Makefile2:190: CMakeFiles/lmp.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
Im trying to install in one of our cluster but got the following error.
Make Warning at /home/reddy/anaconda3/lib/python3.8/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:22 (message):
static library kineto_LIBRARY-NOTFOUND not found.
Call Stack (most recent call first):
/home/reddy/anaconda3/lib/python3.8/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:127 (append_torchlib_if_found)
CMakeLists.txt:922 (find_package)
-- Configuring done
CMake Warning at CMakeLists.txt:142 (add_executable):
Cannot generate a safe runtime search path for target lmp because files in
some directories may conflict with libraries in implicit directories:
**runtime library [libgomp.so.1] in /usr/lib64/gcc/x86_64-suse-linux/7 may be hidden by files in:
/home/reddy/anaconda3/lib
runtime library [libz.so.1] in /usr/lib64 may be hidden by files in:
/home/reddy/anaconda3/lib**
Some of these libraries may not be found correctly.
-- Generating done
-- Build files have been written to: /home/reddy/softwares/lammps-29Sep2021/build
Im able to install the lammps without pair nequip.
Hi, thank you very much for developing NequIP.
Though I can do training without problem (with GPU), I got error when running the model in LAMMPS.
The error said terminate called after throwing an instance of 'c10::Error' what(): expected scalar type Float but found Byte
which probably related to #25 (comment).
I have used Pytorch 1.11 and LAMMPS 29 Sep as suggested.
I've tried to use libtorch 1.11
instead of pytorch but the same error occured.
I installed NequIP 0.5.5
with Pytorch 1.11
I put the output below.
LAMMPS (29 Sep 2021 - Update 2)
using 1 OpenMP thread(s) per MPI task
Reading data file ...
orthogonal box = (0.0000000 0.0000000 0.0000000) to (30.000000 30.000000 30.000000)
1 by 1 by 1 MPI processor grid
reading atoms ...
21 atoms
read_data CPU = 0.001 seconds
NEQUIP is using device cuda
NequIP Coeff: type 1 is element H
NequIP Coeff: type 2 is element O
NequIP Coeff: type 3 is element C
Loading model from aspirin.pth
Freezing TorchScript model...
WARNING: Using 'neigh_modify every 1 delay 0 check yes' setting during minimization (src/min.cpp:188)
Neighbor list info ...
update every 1 steps, delay 0 steps, check yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 5
ghost atom cutoff = 5
binsize = 2.5, bins = 12 12 12
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair nequip, perpetual
attributes: full, newton off
pair build: full/bin/atomonly
stencil: full/bin/3d
bin: standard
Setting up cg style minimization ...
Unit style : real
Current step : 0
terminate called after throwing an instance of 'c10::Error'
what(): expected scalar type Float but found Byte
Exception raised from data_ptr<float> at /opt/conda/conda-bld/pytorch_1646755903507/work/build/aten/src/ATen/core/TensorMethods.cpp:18 (most recent call first):
frame #0: c10::Error::Error(c10::SourceLocation, std::string) + 0x4d (0x14d0984b31bd in /home/k0107/k010716/miniconda3/envs/lammps_nequip_rev3/lib/python3.8/site-packages/torch/lib/libc10.so)
frame #1: c10::detail::torchCheckFail(char const*, char const*, unsigned int, std::string const&) + 0x68 (0x14d0984af838 in /home/k0107/k010716/miniconda3/envs/lammps_nequip_rev3/lib/python3.8/site-packages/torch/lib/libc10.so)
frame #2: float* at::TensorBase::data_ptr<float>() const + 0xde (0x14d09a3abc3e in /home/k0107/k010716/miniconda3/envs/lammps_nequip_rev3/lib/python3.8/site-packages/torch/lib/libtorch_cpu.so)
frame #3: at::TensorAccessor<float, 2ul, at::DefaultPtrTraits, long> at::TensorBase::accessor<float, 2ul>() const & + 0xcb (0x8bea4b in ./lmp)
frame #4: ./lmp() [0x8b66b2]
frame #5: ./lmp() [0x477689]
frame #6: ./lmp() [0x47be8e]
frame #7: ./lmp() [0x439995]
frame #8: ./lmp() [0x43799b]
frame #9: ./lmp() [0x41a416]
frame #10: __libc_start_main + 0xf3 (0x14d063f84493 in /usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/libc.so.6)
frame #11: ./lmp() [0x41a2ee]
[acc008:691367] *** Process received signal ***
[acc008:691367] Signal: Aborted (6)
[acc008:691367] Signal code: (-6)
[acc008:691367] [ 0] /usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/libpthread.so.0(+0x12c20)[0x14d0649dac20]
[acc008:691367] [ 1] /usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/libc.so.6(gsignal+0x10f)[0x14d063f9837f]
[acc008:691367] [ 2] /usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/libc.so.6(abort+0x127)[0x14d063f82db5]
[acc008:691367] [ 3] /usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/libstdc++.so.6(+0x9009b)[0x14d06597a09b]
[acc008:691367] [ 4] /usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/libstdc++.so.6(+0x9653c)[0x14d06598053c]
[acc008:691367] [ 5] /usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/libstdc++.so.6(+0x96597)[0x14d065980597]
[acc008:691367] [ 6] /usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/libstdc++.so.6(+0x967f8)[0x14d0659807f8]
[acc008:691367] [ 7] /home/k0107/k010716/miniconda3/envs/lammps_nequip_rev3/lib/python3.8/site-packages/torch/lib/libc10.so(_ZN3c106detail14torchCheckFailEPKcS2_jRKSs+0x93)[0x14d0984af863]
[acc008:691367] [ 8] /home/k0107/k010716/miniconda3/envs/lammps_nequip_rev3/lib/python3.8/site-packages/torch/lib/libtorch_cpu.so(_ZNK2at10TensorBase8data_ptrIfEEPT_v+0xde)[0x14d09a3abc3e]
[acc008:691367] [ 9] ./lmp(_ZNKR2at10TensorBase8accessorIfLm2EEENS_14TensorAccessorIT_XT0_ENS_16DefaultPtrTraitsElEEv+0xcb)[0x8bea4b]
[acc008:691367] [10] ./lmp[0x8b66b2]
[acc008:691367] [11] ./lmp[0x477689]
[acc008:691367] [12] ./lmp[0x47be8e]
[acc008:691367] [13] ./lmp[0x439995]
[acc008:691367] [14] ./lmp[0x43799b]
[acc008:691367] [15] ./lmp[0x41a416]
[acc008:691367] [16] /usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/libc.so.6(__libc_start_main+0xf3)[0x14d063f84493]
[acc008:691367] [17] ./lmp[0x41a2ee]
[acc008:691367] *** End of error message ***
Aborted (core dumped)
Curiously, when I compile LAMMPS with Pytorch 1.12 (CPU only) the MD can run successfully.
I'd appreciate it if you have any suggestion to solve this problem.
Below are more details on the system that I experiment with. I'm sorry for the lengthy message.
minimal.yaml
as NequIP input which can be found in NequIP source directory. Then I deploy the model using nequip-deploy
to get .pth
file which then I use in LAMMPS.CUDA 11.6
loadedconda install pytorch==1.11.0 cudatoolkit=11.3 -c pytorch
conda list
for the environment that I use:# Name Version Build Channel
_libgcc_mutex 0.1 main
_openmp_mutex 5.1 1_gnu
asttokens 2.0.5 pyhd3eb1b0_0
backcall 0.2.0 pyhd3eb1b0_0
blas 1.0 mkl
ca-certificates 2022.07.19 h06a4308_0
certifi 2022.6.15 py38h06a4308_0
cudatoolkit 11.3.1 h2bc3f7f_2
decorator 5.1.1 pyhd3eb1b0_0
executing 0.8.3 pyhd3eb1b0_0
intel-openmp 2022.0.1 h06a4308_3633
ipython 8.4.0 py38h06a4308_0
jedi 0.18.1 py38h06a4308_1
ld_impl_linux-64 2.38 h1181459_1
libffi 3.3 he6710b0_2
libgcc-ng 11.2.0 h1234567_1
libgomp 11.2.0 h1234567_1
libstdcxx-ng 11.2.0 h1234567_1
libuv 1.40.0 h7b6447c_0
matplotlib-inline 0.1.2 pyhd3eb1b0_2
mkl 2022.0.1 h06a4308_117
mkl-include 2022.0.1 h06a4308_117
ncurses 6.3 h5eee18b_3
numpy 1.23.2 pypi_0 pypi
openssl 1.1.1q h7f8727e_0
parso 0.8.3 pyhd3eb1b0_0
pexpect 4.8.0 pyhd3eb1b0_3
pickleshare 0.7.5 pyhd3eb1b0_1003
pip 22.1.2 py38h06a4308_0
prompt-toolkit 3.0.20 pyhd3eb1b0_0
ptyprocess 0.7.0 pyhd3eb1b0_2
pure_eval 0.2.2 pyhd3eb1b0_0
pygments 2.11.2 pyhd3eb1b0_0
python 3.8.13 h12debd9_0
pytorch 1.11.0 py3.8_cuda11.3_cudnn8.2.0_0 pytorch
pytorch-mutex 1.0 cuda pytorch
readline 8.1.2 h7f8727e_1
setuptools 63.4.1 py38h06a4308_0
six 1.16.0 pyhd3eb1b0_1
sqlite 3.39.2 h5082296_0
stack_data 0.2.0 pyhd3eb1b0_0
tk 8.6.12 h1ccaba5_0
traitlets 5.1.1 pyhd3eb1b0_0
typing_extensions 4.3.0 py38h06a4308_0
wcwidth 0.2.5 pyhd3eb1b0_0
wheel 0.37.1 pyhd3eb1b0_0
xz 5.2.5 h7f8727e_1
zlib 1.2.12 h7f8727e_2
-- The CXX compiler identification is NVHPC 22.2.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /home/app/hpc_sdk/Linux_x86_64/22.2/compilers/bin/nvc++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Git: /home/k0107/k010716/bin/git (found version "2.27.0")
-- Appending /home/app/openmpi/4.1.2/lib to CMAKE_LIBRARY_PATH: /home/app/openmpi/4.1.2/lib
-- Running check for auto-generated files from make-based build system
-- Found MPI_CXX: /home/app/openmpi/4.1.2/lib/libmpi.so (found version "3.1")
-- Found MPI: TRUE (found version "3.1")
-- Looking for C++ include omp.h
-- Looking for C++ include omp.h - found
-- Found OpenMP_CXX: -mp
-- Found OpenMP: TRUE
-- Found JPEG: /usr/lib64/libjpeg.so (found version "62")
-- Found PNG: /usr/lib64/libpng.so (found version "1.6.34")
-- Found ZLIB: /usr/lib64/libz.so (found version "1.2.11")
-- Found GZIP: /bin/gzip
-- Could NOT find FFMPEG (missing: FFMPEG_EXECUTABLE)
-- Looking for C++ include cmath
-- Looking for C++ include cmath - found
-- Generating style headers...
-- Generating package headers...
-- Generating lmpinstalledpkgs.h...
-- Could NOT find ClangFormat (missing: ClangFormat_EXECUTABLE) (Required is at least version "8.0")
-- The following tools and libraries have been found and configured:
* Git
* MPI
* OpenMP
* JPEG
* PNG
* ZLIB
-- <<< Build configuration >>>
Operating System: Linux Red Hat Enterprise Linux 8.5
Build type: RelWithDebInfo
Install path: /home/k0107/k010716/.local
Generator: Unix Makefiles using /bin/gmake
-- Enabled packages: <None>
-- <<< Compilers and Flags: >>>
-- C++ Compiler: /home/app/hpc_sdk/Linux_x86_64/22.2/compilers/bin/nvc++
Type: NVHPC
Version: 22.2.0
C++ Flags: -O2 -gopt
Defines: LAMMPS_SMALLBIG;LAMMPS_MEMALIGN=64;LAMMPS_OMP_COMPAT=4;LAMMPS_JPEG;LAMMPS_PNG;LAMMPS_GZIP
-- <<< Linker flags: >>>
-- Executable name: lmp
-- Static library flags:
-- <<< MPI flags >>>
-- MPI_defines: MPICH_SKIP_MPICXX;OMPI_SKIP_MPICXX;_MPICC_H
-- MPI includes: /home/app/openmpi/4.1.2/include
-- MPI libraries: /home/app/openmpi/4.1.2/lib/libmpi.so;
-- Looking for C++ include pthread.h
-- Looking for C++ include pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Found CUDA: /home/k0107/k010716/GPU/cuda/ (found version "11.6")
-- The CUDA compiler identification is NVIDIA 11.6.55
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - done
-- Check for working CUDA compiler: /home/app/hpc_sdk/Linux_x86_64/22.2/compilers/bin/nvcc - skipped
-- Detecting CUDA compile features
-- Detecting CUDA compile features - done
-- Caffe2: CUDA detected: 11.6
-- Caffe2: CUDA nvcc is: /home/k0107/k010716/GPU/cuda/bin/nvcc
-- Caffe2: CUDA toolkit directory: /home/k0107/k010716/GPU/cuda/
-- Caffe2: Header version is: 11.6
-- Found CUDNN: /home/k0107/k010716/GPU/cudnn/lib/libcudnn.so
-- Found cuDNN: v8.5.0 (include: /home/k0107/k010716/GPU/cudnn/include, library: /home/k0107/k010716/GPU/cudnn/lib/libcudnn.so)
-- /home/k0107/k010716/GPU/cuda/lib64/libnvrtc.so shorthash is 280a23f6
-- Autodetected CUDA architecture(s): 8.0 8.0 8.0 8.0
-- Added CUDA NVCC flags for: -gencode;arch=compute_80,code=sm_80
CMake Warning at /home/k0107/k010716/miniconda3/envs/lammps_nequip_rev3/lib/python3.8/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:22 (message):
static library kineto_LIBRARY-NOTFOUND not found.
Call Stack (most recent call first):
/home/k0107/k010716/miniconda3/envs/lammps_nequip_rev3/lib/python3.8/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:127 (append_torchlib_if_found)
CMakeLists.txt:922 (find_package)
-- Found Torch: /home/k0107/k010716/miniconda3/envs/lammps_nequip_rev3/lib/python3.8/site-packages/torch/lib/libtorch.so
-- Configuring done
-- Generating done
-- Build files have been written to: /home/k0107/k010716/LAMMPS/lammps-nequip4/build
cmake
then I do make
and get executable though some warnings are printed:"/home/k0107/k010716/LAMMPS/lammps-nequip4/src/fmt/format.h", line 1156: warning: statement is unreachable
return;
^
detected during:
instantiation of "void fmt::v7_lmp::detail::specs_setter<Char>::on_fill(fmt::v7_lmp::basic_string_view<Char>) [with Char=char]" at line 2823
instantiation of "const Char *fmt::v7_lmp::detail::parse_align(const Char *, const Char *, Handler &&) [with Char=char, Handler=fmt::v7_lmp::detail::specs_checker<fmt::v7_lmp::detail::specs_handler<fmt::v7_lmp::basic_format_parse_context<char, fmt::v7_lmp::detail::error_handler>, fmt::v7_lmp::buffer_context<char>>> &]" at line 2883
instantiation of "const Char *fmt::v7_lmp::detail::parse_format_specs(const Char *, const Char *, SpecHandler &&) [with Char=char, SpecHandler=fmt::v7_lmp::detail::specs_checker<fmt::v7_lmp::detail::specs_handler<fmt::v7_lmp::basic_format_parse_context<char, fmt::v7_lmp::detail::error_handler>, fmt::v7_lmp::buffer_context<char>>> &]" at line 3099
instantiation of "const Char *fmt::v7_lmp::detail::format_handler<OutputIt, Char, Context>::on_format_specs(int, const Char *, const Char *) [with OutputIt=fmt::v7_lmp::detail::buffer_appender<char>, Char=char, Context=fmt::v7_lmp::buffer_context<char>]" at line 2975
instantiation of "const Char *fmt::v7_lmp::detail::parse_replacement_field(const Char *, const Char *, Handler &&) [with Char=char, Handler=fmt::v7_lmp::detail::format_handler<fmt::v7_lmp::detail::buffer_appender<char>, char, fmt::v7_lmp::buffer_context<char>> &]" at line 2997
instantiation of "void fmt::v7_lmp::detail::parse_format_string<IS_CONSTEXPR,Char,Handler>(fmt::v7_lmp::basic_string_view<Char>, Handler &&) [with IS_CONSTEXPR=false, Char=char, Handler=fmt::v7_lmp::detail::format_handler<fmt::v7_lmp::detail::buffer_appender<char>, char, fmt::v7_lmp::buffer_context<char>> &]" at line 3776
instantiation of "void fmt::v7_lmp::detail::vformat_to(fmt::v7_lmp::detail::buffer<Char> &, fmt::v7_lmp::basic_string_view<Char>, fmt::v7_lmp::basic_format_args<fmt::v7_lmp::basic_format_context<fmt::v7_lmp::detail::buffer_appender<fmt::v7_lmp::type_identity_t<Char>>, fmt::v7_lmp::type_identity_t<Char>>>, fmt::v7_lmp::detail::locale_ref) [with Char=char]" at line 2752 of "/home/k0107/k010716/LAMMPS/lammps-nequip4/src/fmt/format-inl.h"
"/home/k0107/k010716/miniconda3/envs/lammps_nequip_rev3/lib/python3.8/site-packages/torch/include/c10/core/TensorImpl.h", line 1669: warning: unknown attribute "fallthrough"
C10_FALLTHROUGH;
^
"/home/k0107/k010716/miniconda3/envs/lammps_nequip_rev3/lib/python3.8/site-packages/torch/include/c10/core/TensorImpl.h", line 1669: warning: unknown attribute "fallthrough"
C10_FALLTHROUGH;
^
"/home/k0107/k010716/miniconda3/envs/lammps_nequip_rev3/lib/python3.8/site-packages/torch/include/ATen/core/ivalue_inl.h", line 296: warning: unknown attribute "fallthrough"
C10_FALLTHROUGH;
^
"/home/k0107/k010716/miniconda3/envs/lammps_nequip_rev3/lib/python3.8/site-packages/torch/include/ATen/core/ivalue_inl.h", line 299: warning: unknown attribute "fallthrough"
C10_FALLTHROUGH;
^
"/home/k0107/k010716/miniconda3/envs/lammps_nequip_rev3/lib/python3.8/site-packages/torch/include/ATen/core/ivalue_inl.h", line 296: warning: unknown attribute "fallthrough"
C10_FALLTHROUGH;
^
"/home/k0107/k010716/miniconda3/envs/lammps_nequip_rev3/lib/python3.8/site-packages/torch/include/ATen/core/ivalue_inl.h", line 299: warning: unknown attribute "fallthrough"
C10_FALLTHROUGH;
^
"/home/k0107/k010716/miniconda3/envs/lammps_nequip_rev3/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/ordered_dict.h", line 360: warning: missing return statement at end of non-void function "torch::OrderedDict<Key, Value>::operator[](const Key &)"
}
^
"/home/k0107/k010716/miniconda3/envs/lammps_nequip_rev3/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/ordered_dict.h", line 368: warning: missing return statement at end of non-void function "torch::OrderedDict<Key, Value>::operator[](const Key &) const"
}
^
"/home/k0107/k010716/miniconda3/envs/lammps_nequip_rev3/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/ordered_dict.h", line 360: warning: missing return statement at end of non-void function "torch::OrderedDict<Key, Value>::operator[](const Key &)"
}
^
"/home/k0107/k010716/miniconda3/envs/lammps_nequip_rev3/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/ordered_dict.h", line 368: warning: missing return statement at end of non-void function "torch::OrderedDict<Key, Value>::operator[](const Key &) const"
}
^
"/home/k0107/k010716/miniconda3/envs/lammps_nequip_rev3/lib/python3.8/site-packages/torch/include/c10/core/TensorImpl.h", line 1669: warning: unknown attribute "fallthrough"
C10_FALLTHROUGH;
^
"/home/k0107/k010716/miniconda3/envs/lammps_nequip_rev3/lib/python3.8/site-packages/torch/include/ATen/core/ivalue_inl.h", line 296: warning: unknown attribute "fallthrough"
C10_FALLTHROUGH;
^
"/home/k0107/k010716/miniconda3/envs/lammps_nequip_rev3/lib/python3.8/site-packages/torch/include/ATen/core/ivalue_inl.h", line 299: warning: unknown attribute "fallthrough"
C10_FALLTHROUGH;
^
"/home/k0107/k010716/LAMMPS/lammps-nequip4/src/pair_nequip.cpp", line 390: warning: variable "jtype" was declared but never referenced
int jtype = type[j];
^
"/home/k0107/k010716/LAMMPS/lammps-nequip4/src/pair_nequip.cpp", line 382: warning: variable "itype" was declared but never referenced
int itype = type[i];
^
"/home/k0107/k010716/miniconda3/envs/lammps_nequip_rev3/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/ordered_dict.h", line 360: warning: missing return statement at end of non-void function "torch::OrderedDict<Key, Value>::operator[](const Key &)"
}
^
"/home/k0107/k010716/miniconda3/envs/lammps_nequip_rev3/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/ordered_dict.h", line 368: warning: missing return statement at end of non-void function "torch::OrderedDict<Key, Value>::operator[](const Key &) const"
}
^
Best regards,
I have pytorch==1.10.1 with cuda 10.2 support
I have cuda 11.2 on my system.
I compiled LAMMPS without any additional package, only Nequip support. There was no error during compilation.
I trained a nequip model and have a model.pth file.
LAMMPS terminates with the following output:
LAMMPS (29 Sep 2021 - Update 3)
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98)
using 1 OpenMP thread(s) per MPI task
Reading data file ...
orthogonal box = (0.0000000 0.0000000 0.0000000) to (11.408130 11.408130 19.495504)
1 by 1 by 1 MPI processor grid
reading atoms ...
215 atoms
read_data CPU = 0.001 seconds
Replicating atoms ...
orthogonal box = (0.0000000 0.0000000 0.0000000) to (34.224390 34.224390 58.486512)
1 by 1 by 1 MPI processor grid
5805 atoms
replicate CPU = 0.001 seconds
NEQUIP is using device cuda
NequIP Coeff: type 1 is element Ti
NequIP Coeff: type 2 is element O
Loading model from model.pth
terminate called after throwing an instance of 'torch::jit::ErrorReport'
terminate called recursively
My input file is as follow:
units metal
boundary p p p
atom_style atomic
read_data data.meam
replicate 3 3 3
pair_style nequip
pair_coeff * * model.pth Ti O
minimize 1.0e-8 1.0e-8 1000 100000
min_style cg
timestep 0.005
velocity all create 1000.0 454883 mom yes rot yes dist gaussian
thermo_style custom step pe ke etotal temp press density
thermo 100
fix 2 all npt temp 1000.00 2400.00 0.1 iso 1.0 1.0 1000.0
dump 1 all atom 10000 dump.meam
run 10000000
Could I get some help into troubleshooting this?
/data/home/reddy/softwares/lammps-29Sep2021/src/pair_nequip.cpp:209:30: error: lvalue required as left operand of assignment
209 | torch::jit::getBailoutDepth() = jit_bailout_depth;
see #8
Hello Developers,
I installed LAMMPS (latest version) with pair_nequip as instructed on the site. The installation finished without any error or warning message. But when I am trying to run a NVT/NVE MD with the deployed nequip model LAMMPS is crashing. The error log is beyond my comprehension so I an attaching the file here. Any help will be greatly appreciated. Let me know if further information is needed from my side.
Sincerely,
Krish
Lammps runs and terminate after sometim
terminate called after throwing an instance of 'std::runtime_error'
what(): The following operation failed in the TorchScript interpreter.
Traceback of TorchScript, serialized code (most recent call last):
File "code/__torch__/nequip/nn/_grad_output.py", line 34, in forward
_6 = [torch.sum(data0[of])]
training = self.training
grads = torch.autograd.grad(_6, wrt_tensors, None, None, training)
~~~~~~~~~~~~~~~~~~~ <--- HERE
out_field = self.out_field
_7 = [torch.len(out_field), torch.len(grads)]
Traceback of TorchScript, original code (most recent call last):
File "/Users/qpiai/Volta_comp/nequip/nequip/nn/_grad_output.py", line 84, in forward
data = self.func(data)
# Get grads
grads = torch.autograd.grad(
~~~~~~~~~~~~~~~~~~~ <--- HERE
# TODO:
# This makes sense for scalar batch-level or batch-wise outputs, specifically because d(sum(batches))/d wrt = sum(d batch / d wrt) = d my_batch / d wrt
RuntimeError: element 0 of tensors does not require grad and does not have a grad_fn
I am using pytorch==1.11.0+cu102 and cuda 11.4.
I am following the installation guide on the Colad page 'nequip-tutorial'
The following error occurred during the 'make' process:
/home/lammps-nequip/src/pair_nequip.cpp: In member function ‘virtual void LAMMPS_NS::PairNEQUIP::init_style()’:
/home/lammps-nequip/src/pair_nequip.cpp:97:33: error: ‘int LAMMPS_NS::NeighRequest::half’ is protected within this context
neighbor->requests[irequest]->half = 0;
^~~~
In file included from /home/lammps-nequip/src/pair_nequip.cpp:26:
/home/lammps-nequip/src/neigh_request.h:55:7: note: declared protected here
int half; // half neigh list (set by default)
^~~~
/home/lammps-nequip/src/pair_nequip.cpp:98:33: error: ‘int LAMMPS_NS::NeighRequest::full’ is protected within this context
neighbor->requests[irequest]->full = 1;
^~~~
In file included from /home/lammps-nequip/src/pair_nequip.cpp:26:
/home/lammps-nequip/src/neigh_request.h:56:7: note: declared protected here
int full; // full neigh list
^~~~
/home/lammps-nequip/src/pair_nequip.cpp:101:33: error: ‘int LAMMPS_NS::NeighRequest::ghost’ is protected within this context
neighbor->requests[irequest]->ghost = 0;
^~~~~
In file included from /home/lammps-nequip/src/pair_nequip.cpp:26:
/home/lammps-nequip/src/neigh_request.h:69:7: note: declared protected here
int ghost; // 1 if includes ghost atom neighbors
^~~~~
make[2]: *** [CMakeFiles/lammps.dir/build.make:4808: CMakeFiles/lammps.dir/home/lammps-nequip/src/pair_nequip.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:733: CMakeFiles/lammps.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
I was wondering if there is a potential solution to this error?
Hi,
I developed a machine-learning potential with nequip for a system made of Zn, C, H and O atoms.
I am now adding methane to the system and trying to run MD simulations with LAMMPS. I use the hybrid pair style in LAMMPS, using nequip potential for the sub-part of the system on which the MLP was trained and using Lennard-Jones potential for interactions involving methane.
However, pair_nequip
is written so that pair_coeff
expects * *
as argument (src/pair_nequip.cpp:146
), thus preventing the selection of particular atomic types.
How can we apply nequip potential only to a sub-part of a system and not on all atoms?
Thanks,
Dune
LAMMPS has plugin functionality that allows new functionality to be added without the need to recompile and link everything - https://docs.lammps.org/plugin.html
Have the authors investigated whether or not Nequip can be interfaced as a plugin and if so were there any reasons that you avoided this approach? For example, would there be any expected issues if I ran a serial calculation with a nequip plugin on a build of LAMMPS compiled to allow MPI calculations?
Hi all,
I have been trying to install nequip with lammps but running into an error. I am running macOS system with Mojave 10.14.4
I am able to run the cmake command but when I run the last step make -j6
, I get the following error:
[100%] Linking CXX static library liblammps.a
[100%] Built target lammps
[100%] Building CXX object CMakeFiles/lmp.dir/Users/nisarg/Desktop/nequip/nequip/lammps/src/main.cpp.o
[100%] Linking CXX executable lmp
Undefined symbols for architecture x86_64:
"long* at::TensorBase::data_ptr<long>() const", referenced from:
at::TensorAccessor<long, 1ul, at::DefaultPtrTraits, long long> at::TensorBase::accessor<long, 1ul>() const & in liblammps.a(pair_nequip.cpp.o)
at::TensorAccessor<long, 2ul, at::DefaultPtrTraits, long long> at::TensorBase::accessor<long, 2ul>() const & in liblammps.a(pair_nequip.cpp.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [lmp] Error 1
make[1]: *** [CMakeFiles/lmp.dir/all] Error 2
make: *** [all] Error 2
Thanks for the help!
Nisarg
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.