Closed pchong90 closed 10 years ago
also: does the test pass if the shell environment variable MAD_NUM_THREADS is set to 1?
Yes, I am running the program in one thread and the problem still exists.
MADNESS runtime initialized with 0 threads in the pool and affinity -1 -1 -1
This is related to the changeset 67fe92423dcbefe7562df629c4a496d27135a7ce ... basically this is related to the finite pool of locks available to lock smart pointers in mpqc.
The solution is to introduce atomic accesses to the smart pointers, a la std::shared_ptr. This is a loaded issue, still thinking about how to best go about this.
Switch to shared_ptr? On May 28, 2014 10:55 PM, "Eduard Valeyev" notifications@github.com wrote:
This is related to the changeset 67fe924https://github.com/ValeevGroup/mpqc/commit/67fe92423dcbefe7562df629c4a496d27135a7ce... basically this is related to the finite pool of locks available to lock smart pointers in mpqc.
The solution is to introduce atomic accesses to the smart pointers, a la std::shared_ptr. This is a loaded issue, still thinking about how to best go about this.
— Reply to this email directly or view it on GitHubhttps://github.com/ValeevGroup/mpqc/issues/24#issuecomment-44489360 .
There is an implementation of shared pointer in MADNESS that you could use as a basis. It is a port of Boost’s shared pointer. Then you can add the ref specific functionality on top. Or, you could inherit from std::shared_ptr directly and likewise add mpqc functionality (though I suspect this is discouraged).
Justus
On May 29, 2014, at 12:20 AM, Drew Lewis notifications@github.com wrote:
Switch to shared_ptr? On May 28, 2014 10:55 PM, "Eduard Valeyev" notifications@github.com wrote:
This is related to the changeset 67fe924https://github.com/ValeevGroup/mpqc/commit/67fe92423dcbefe7562df629c4a496d27135a7ce... basically this is related to the finite pool of locks available to lock smart pointers in mpqc.
The solution is to introduce atomic accesses to the smart pointers, a la std::shared_ptr. This is a loaded issue, still thinking about how to best go about this.
— Reply to this email directly or view it on GitHubhttps://github.com/ValeevGroup/mpqc/issues/24#issuecomment-44489360 .
— Reply to this email directly or view it on GitHub.
fixed on taexp branch, please cherry-pick onto master.
this is just a workaround, with locking done explicitly outside the pointer.
switch to shared_ptr is a big jump.
When I use uncontracted ABS to do CABS_Single calculation, the pt2r12 program sometimes goes into a lock and stuck at computing integrals. This problem happens when specific input file and method was used. I will show one example I have here. The code is on my repository. The input file is available here Using the command
pt2r12 -prefix ethene.cc-pVTZ.1Ag -cabs cc-pVTZ-F12-CABS -dfbs cc-pVQZ-RI -r12 false -singles true -partitionH dyall_1 -cabs_contraction false
the program will stuck at a lock. Here is part of the backtrace informationThe program on this example works fine when I use contracted CABS
-cabs_contraction true
. Also, if I set macroNLOCKS
at src/lib/util/ref/ref.cc from 251 to 241, it works again on this example.I haven't tested this example on other computers. However, this problem happened to different input on Blueridge.