-
Notifications
You must be signed in to change notification settings - Fork 436
Helium-Solute NNP for interaction [cschran/lduran/hforbert] #3043
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
Conversation
| TYPE(mp_comm_type) :: new_comm | ||
| TYPE(section_vals_type), POINTER :: helium_section, input_worm | ||
| TYPE(cp_logger_type), POINTER :: logger, tmplogger | ||
| TYPE(mp_para_env_type), POINTER :: new_comm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you make this communicator a pointer? In your case you know that all pointers point to the same object. The others are just mere copies. I also do not see when you deallocate the pointer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I make that a pointer, because cp_logger_create needs a pointer and I cannot make it a target since it's part of a structure which I didn't want to make a target. I didn't deallocate because I wrongly assumed %free is enough :)
But I agree the pointers are a mess here and also the parallization (helium assumes only one rank per environment
and doesn't use mpi, which clashes with the regular nnp (hence I had to create a logger with a single rank, so nnp is happy).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, thanks. No, %free just frees the data of the object but it cannot free the pointer (or the object itself). And I mixed up mp_para_env_type and mp_comm_type. Then, it is ok by design.
Helium-Solute NNP for interaction [cschran/lduran/hforbert]
No description provided.