MACE interface, vol. 2 - #242
Conversation
modified: sample_inputs/input.in.mace modified: src/mace_mpi_api.F90
new file: interfaces/MACE/README.md
|
Okay, I think this is mostly ready now for merging! We'll do some internal testing. @FelyCZ would be great if you could have a look. I summarized the changes I made in the PR description. @JanosJiri up to you how much you want to review this. Perhaps at least the README files and |
JanosJiri
left a comment
There was a problem hiding this comment.
Hi @danielhollas, I'm sorry but I struggle with time now and I can't make a useful review in a short time. I checked README.md though and it looks clean and understandable to me. Sorry.
|
Hello, thanks for revising the MACE interface! |
|
|
||
| energy, forces = mace_model.evaluate(atom_types, coords) | ||
|
|
||
| end = perf_counter() |
There was a problem hiding this comment.
I think we need to include torch.cuda.synchnronize() when the computation is running on CUDA. Otherwise is won't be measuring the time correctly.
if config.device == "cuda":
import torch
torch.cuda.synchronize()
end = perf_counter()There was a problem hiding this comment.
Is it really needed? Surely mace_model.evaluate cannot return the final result until CUDA kernels finished?
| ! ---------------------------------------------------------------- | ||
| use mod_const, only: DP | ||
| use mod_error, only: fatal_error | ||
| use mod_files, only: stdout, stderr |
There was a problem hiding this comment.
Move natqm to global scope (as it is used in both subroutines)?
use mod_qmmm, only: natqmThere was a problem hiding this comment.
Yeah, we could, but it also is nice to have it imported locally as it's closer to its use. I'll leave it like that for now.
|
@FelyCZ thanks for taking a look! Let's merge this, and we can continue with tweaks in #257. We've tested this locally with our own MACE model. We might need to do further testing with various foundational model but that can be a follow-up as well. Thanks for your original work on this @FelyCZ! I think this is going to be super-useful going forward. |
This is a continuation from #224, with the following changes
&macesection from the abin input file, instead the path to the model and other configuration is passed via command line parameter tomace_server.py. This is specified at the top ofutils/run.mace_abin.shinstall_mace.shand the MACE-OFF model filemace_server.pyin MACE test directlyTODO: