abacus-develop
abacus-develop copied to clipboard
Feature: set OpenMP thread num to a proper default value
Reminder
- [ ] Have you linked an issue with this pull request?
- [ ] Have you added adequate unit tests and/or case tests for your pull request?
- [ ] Have you noticed possible changes of behavior below or in the linked issue?
- [ ] Have you explained the changes of codes in core modules of ESolver, HSolver, ElecState, Hamilt, Operator or Psi? (ignore if not applicable)
Linked Issue
Fix #3701
Unit Tests and/or Case Tests for my changes
- A unit test is added for each new feature or bug fix.
What's changed?
ABACUS will try to set a proper OpenMP threading value if OMP_NUM_THREADS
is not set, and exit with error if the value set is beyond hardware availability (which should not happen since the value has been automatically set).
Could someone please help me on this error building tests?
@caic99 I have some test by using this repo. It worked well , but if the machine has hyper-thread (like WSL or bohrium image), the product of OMP number and MPI number will include hyper-thread and lead to lower parallel efficiency than the hardware-core (hyper-thread / 2) situation.
@caic99 I have some test by using this repo. It worked well , but if the machine has hyper-thread (like WSL or bohrium image), the product of OMP number and MPI number will include hyper-thread and lead to lower parallel efficiency than the hardware-core (hyper-thread / 2) situation.
It's hard to determine with standard c++ API whether hyperthreading is used.
Any updates?