-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exception: expected scalar type Double but found Float #48
Comments
If your model is older, you may need to use I recommend upgrading to the most recent |
Hello, I want to comment because I am noticing similar issues. I tried upgrading nequip (0.6.1) and retraining the model, however, I still need to use pair_style allegro3232 in the lammps script to not get the error reported above. To be clear I have trained the allegro model with nequip (0.6.1) with StressForceOutput. When i run NPT with pair_style allegro3232 the simulation runs and the pressure outputs are reasonable. Not sure why I need to use pair_style allegro3232 with an updated model. |
Please ensure that you have |
Hi,
I used the latest The configuration file looks like this: ...
training_module:
...
model:
...
model_dtype: float32
default_dtype: float64
...
global_options:
allow_tf32: true I tried setting |
With those versions, you'll need to use |
Hi,
I was trying to use pair_allegro to run a simulation on LAMMPS. I have trained a model with 256 water molecules (trained with forces and energy). After I compiled my LAMMPS, I got this error and not able to run. I had an older version of pair_allegro and that works (seems like a file about a year ago). Do you know if there is any output type from my torch that is incorrect? (I am using CUDA 11.6 and torch 1.12.0.)
Here's the full error I got from LAMMPS:
Exception: expected scalar type Double but found Float
Exception raised from data_ptr at aten/src/ATen/core/TensorMethods.cpp:20 (most recent call first):
frame #0: c10::Error::Error(c10::SourceLocation, std::string) + 0x42 (0x2ab7c7d06612 in /scratch/user/peterchao1/.conda/envs/allegro/lib/python3.7/site-packages/torch/lib/libc10.so)
frame #1: c10::detail::torchCheckFail(char const*, char const*, unsigned int, std::string const&) + 0x5b (0x2ab7c7d02cab in /scratch/user/peterchao1/.conda/envs/allegro/lib/python3.7/site-packages/torch/lib/libc10.so)
frame #2: double* at::TensorBase::data_ptr() const + 0x108 (0x2ab7815981c8 in /scratch/user/peterchao1/.conda/envs/allegro/lib/python3.7/site-packages/torch/lib/libtorch_cpu.so)
frame #3: at::TensorAccessor<double, 2ul, at::DefaultPtrTraits, long> at::TensorBase::accessor<double, 2ul>() const & + 0x7d (0x6ab8ad in ../../lammps/build/lmp)
frame #4: ../../lammps/build/lmp() [0x925095]
frame #5: ../../lammps/build/lmp() [0x4ec0f6]
frame #6: ../../lammps/build/lmp() [0x4ee627]
frame #7: ../../lammps/build/lmp() [0x48b4f0]
frame #8: ../../lammps/build/lmp() [0x48b886]
frame #9: ../../lammps/build/lmp() [0x47acbd]
frame #10: __libc_start_main + 0xf5 (0x2ab7c819a555 in /lib64/libc.so.6)
frame #11: ../../lammps/build/lmp() [0x47c8d0]
If you need any further information, please let me know.
Thank you!
The text was updated successfully, but these errors were encountered: