From: John Stone (johns_at_ks.uiuc.edu)
Date: Wed May 20 2020 - 02:36:33 CDT

Dallas,

On Wed, May 20, 2020 at 03:29:08PM +1000, Dallas Warren wrote:
> Thank you┬ for the response John.
> We are after the┬ MSVC version so that we can compile from source for
> Win32, nothing specifically to do with this issue. Have tried quite a few
> different compilers and┬ each compiler┬ has been failing at linking.

The precise compiler version typically isn't important at all (I've even linked
VMD Windows binaries built using a mix of two different C++ compiler
versions, though I wouldn't normally recommend it). What is absolutely
critical however is that VMD and all of the libraries it links with are
compiled using the same linkage model. Microsoft's compilers have
always offered 4 or more linkage modes, and with more modern toolchains,
there are even more. If even one .obj file is compiled with a mismatched
linkage model, it's game over. In the Microsoft build options, these
flags are associated with both the linkage mode and C/C++ runtime linkage
mode (static vs. dynamic, optimized vs. debug, and in newer compilers
there are other flags for CPU arch types, etc, all of which must be
matched for all .obj, .lib, and .dll files you're working with!!

> I'll be adjusting the representations of all molecules to minimise the
> chance that a user will encounter this error, on the list of things to
> get to already ( I'd hate to see your todo list ;) ). Plus will be
> adding an error catch for it if it does happen. So that will sort things
> out as best we can currently and shouldn't encounter it again.
> To start with we have been using defaults for each of the
> representations. This error has been arising with systems with
> DynamicBonds, resolution 12, for a large number (100,000) of water
> molecules.

DynamicBonds uses geometry / display command memory linearly proporotional
to the resolution parameter. There's also a bunch of memory used for a
grid search for connected atoms. If I were to guess, it's the grid search
data structure that's killing you in this particular case.
You can test my theory here by changing your code to use the "Bonds" rep
instead of "DynamicBonds", and see if your memory issue is resolved or not.
If the memory problem is either gone, or reduced, then it's probably the
grid search data structure presenting the big challenge here.

> Yes, well aware not a reasonable representation for water, it
> was something simply added randomly to get things going.┬ Thing that
> threw us some was the fact that this error doesn't occur with Linux
> installs, including with significantly larger numbers of waters. Plus
> the fact that it was failing and only asking for hundreds of MB of memory.

The error messages are only telling you about the final allocation that's
failing, they aren't telling you about all of the other ones that
succeeded.

> Anyway, have a way forward now. Thanks for your assistance John

Sure, try that simple rep experiment and see if it makes a difference or not.

Best,
  John

> Catch ya,
>
> Dr. Dallas Warren
> Drug Delivery, Disposition and Dynamics
> Monash Institute of Pharmaceutical Sciences, Monash University
> 381 Royal Parade, Parkville VIC 3052
> [1]dallas.warren_at_monash.edu
> ---------------------------------
> When the only tool you own is a hammer, every problem begins to resemble a
> nail.
> On Wed, 20 May 2020 at 12:50, John Stone <[2]johns_at_ks.uiuc.edu> wrote:
>
> Dallas,
>
> On Wed, May 20, 2020 at 09:30:17AM +1000, Dallas Warren wrote:
> >┬ ┬ John,
> >┬ ┬ Thank you for the suggestion.─*┬ I am aware of ways that can
> tweak
> >┬ ┬ representations to alter the number of faces, resolution etc.─*┬
> And that
> >┬ ┬ definitely works for a given system.
> >┬ ┬ However, that isn't going to help us here because we are looking
> for a
> >┬ ┬ more generalised solution.─*┬ You may recall we have VMD wrapped
> inside
> >┬ ┬ other software (in-house) and the number of particles and
> representation
> >┬ ┬ for things displayed within the VMD window will be highly
> variable.
>
> Just because it is wrapped doesn't mean that you can make better choices
> in the representations that you generate!┬
>
> I have seen many people choose unwise graphical representation
> parameters
> when they generate them via their own code.┬
>
> As I warn, some of the reps have quadratic or cubic behavior in terms of
> generated geometry wrt/ resolution or grid spacing parameters.
> Whoever is developing the code to emit the graphical representation
> commands
> needs to be wary of going too far with these parameters.
>
> Also, VMD enforces some sanity checks when you create graphical
> representations in the VMD GUI, but if you do it via Tcl, VMD assumes
> you
> know what you're doing and it does not enforce the same limits.
> This freedom can allow an expert VMD user to go beyond what the
> GUI would normally allow, but it will also allow you to hang yourself.
> :-)
>
> >┬ ┬ This
> >┬ ┬ error has been freezing the software and we're looking for a way
> to handle
> >┬ ┬ that.┬ First option was to see if we can resolve the issue.┬
>
> As I said, the first question is to find out what you're doing with the
> graphical rep parameters, as that is likely the genesis of the problem.
>
> >┬ ┬ I take it
> >┬ ┬ this is a hard ceiling on the memory usage with 32 bit Windows?
>
> 32-bit Windows apps can typically use up to 2GB of memory unless
> specially compiled, which creates other incompatibilities usually.
>
> >┬ ┬ If that
> >┬ ┬ is the case, then we will move to the second option, which is an
> error
> >┬ ┬ capture so that when this is thrown up it doesn't freeze things
> (because
> >┬ ┬ it constantly outputs the error, over and over and over, rather
> than just
> >┬ ┬ a single write).─*┬ And we will couple that with optimising
> representations
> >┬ ┬ so that it is harder to reach the limit as well.
> >┬ ┬ Can you also tell us what compiler you use with the Windows
> versions?
>
> It depends on which version you're running (CUDA vs. non-CUDA),
> but it's not relevant to anything going forward.
> I have to setup a totally new Windows x64 build machine now due to the
> coronavirus lockdown and a combination of the inaccessibility
> of the old build machines and network security issues with
> Windows revs prior to Windows 10 as of earlier this spring.
>
> At present, we've likely just got a couple weeks or so until the
> final CUDA 11.0 is released, and when CUDA 11 comes out, I will
> setup the new build machine's compiler stack, and being compiling
> the library dependencies that work with that.┬ We need CUDA 11 to be
> able to support the upcoming NVIDIA Ampere GPUs.┬ I'm setting up the
> Windows build system for x64 compilations of VMD 1.9.4, but I
> need to test compatibility between CUDA 11 and the various MS compilers,
> FLTK, Tcl/Tk, and a bunch of other VMD library dependencies, almost
> exactly the same thing I've just had to do to get VMD compiling on
> MacOS X Catalina.┬
>
> Stay tuned a bit longer here and I hope to have news about x64
> compilations of VMD on Windows...
>
> Best,
> ┬ John
>
> >┬ ┬ Catch ya,
> >
> >┬ ┬ Dr. Dallas Warren
> >┬ ┬ Drug Delivery, Disposition and Dynamics
> >┬ ┬ Monash Institute of Pharmaceutical Sciences, Monash University
> >┬ ┬ 381 Royal Parade, Parkville VIC 3052
> >┬ ┬ [1][3]dallas.warren_at_monash.edu
> >┬ ┬ ---------------------------------
> >┬ ┬ When the only tool you own is a hammer, every problem begins to
> resemble a
> >┬ ┬ nail.
> >┬ ┬ On Wed, 20 May 2020 at 06:18, John Stone
> <[2][4]johns_at_ks.uiuc.edu> wrote:
> >
> >┬ ┬ ┬ Dallas,
> >┬ ┬ ┬ ─*┬ Can you be more specific about what graphical
> representations
> >┬ ┬ ┬ you're using that are causing the memory exhaustion
> problem?─*┬ There
> >┬ ┬ ┬ may be a simple adjustment to your display parameters that can
> >┬ ┬ ┬ dramatically reduce memory usage.─*┬ This is particularly
> true for
> >┬ ┬ ┬ the surface representations, isosurface, and the various
> ribbon/cartoon
> >┬ ┬ ┬ representations which have either quadratic or cubic memory
> consumption
> >┬ ┬ ┬ vs. their respective "resolution" parameters of various kinds.
> >
> >┬ ┬ ┬ If you share more about what representations and parameters
> you're
> >┬ ┬ ┬ using,
> >┬ ┬ ┬ I may be able to give you advice to overcome the issue.
> >
> >┬ ┬ ┬ Going forward I'm working on a 64-bit Windows build of VMD,
> but
> >┬ ┬ ┬ this has been complicated by the fact that I don't have
> effective remote
> >┬ ┬ ┬ access to my normal Windows VMD build systems, and I'm having
> to setup
> >┬ ┬ ┬ a new one that I can use here at home.─*┬ That would
> ultimately increase
> >┬ ┬ ┬ the amount of memory available to VMD, at least on modern
> machines
> >┬ ┬ ┬ with say 8GB or more of memory, but I've got probably a week
> or two
> >┬ ┬ ┬ of work to do there and I'm waiting on the next rev of the
> Windows
> >┬ ┬ ┬ CUDA tools to be released (a matter of days now) so that I can
> ensure
> >┬ ┬ ┬ compiler version compatiblity etc.
> >
> >┬ ┬ ┬ Best,
> >┬ ┬ ┬ ─*┬ John Stone
> >
> >┬ ┬ ┬ On Mon, May 18, 2020 at 05:39:32PM +1000, Dallas Warren wrote:
> >┬ ┬ ┬ >─*┬ ─*┬ Works fine with Linux installation.
> >┬ ┬ ┬ >─*┬ ─*┬ Works fine for Windows installation (WIN32 1.9.3
> Nov 30 2016)
> >┬ ┬ ┬ with less
> >┬ ┬ ┬ >─*┬ ─*┬ graphically intensive molecule representations.
> >┬ ┬ ┬ >─*┬ ─*┬ Fails for Windows installation for more graphically
> intensive
> >┬ ┬ ┬ molecule
> >┬ ┬ ┬ >─*┬ ─*┬ representations with the following error message:
> >┬ ┬ ┬ >─*┬ ─*┬ ################
> >┬ ┬ ┬ >─*┬ ─*┬ Failed to increase display list memory pool size,
> system out of
> >┬ ┬ ┬ memory
> >┬ ┬ ┬ >─*┬ ─*┬ ─**─*┬ ─** Previous pool size: 200MB
> >┬ ┬ ┬ >─*┬ ─*┬ ─**─*┬ ─** Requested pool size: 240MB
> >┬ ┬ ┬ >─*┬ ─*┬ ################
> >┬ ┬ ┬ >─*┬ ─*┬ How do I resolve this─** issue?
> >┬ ┬ ┬ >─*┬ ─*┬ Start up message:
> >┬ ┬ ┬ >─*┬ ─*
> >┬ ┬ ┬
> [1][3][5]https://pbs.twimg.com/media/EYSJJIbVAAEp7gz?format=png&name=900x900
> >┬ ┬ ┬ >─*┬ ─*┬ Error message:
> >┬ ┬ ┬ >─*┬ ─*
> >┬ ┬ ┬
> [2][4][6]https://pbs.twimg.com/media/EYSJK97U4AEACm5?format=png&name=900x900
> >┬ ┬ ┬ >─*┬ ─*┬ And another question, exactly which MS compilers
> are being used
> >┬ ┬ ┬ to build
> >┬ ┬ ┬ >─*┬ ─*┬ the Windows version of VMD?
> >┬ ┬ ┬ >─*┬ ─*┬ Thank you for any assistance.
> >┬ ┬ ┬ >─*┬ ─*┬ Catch ya,
> >┬ ┬ ┬ >
> >┬ ┬ ┬ >─*┬ ─*┬ Dr. Dallas Warren
> >┬ ┬ ┬ >─*┬ ─*┬ Drug Delivery, Disposition and Dynamics
> >┬ ┬ ┬ >─*┬ ─*┬ Monash Institute of Pharmaceutical Sciences, Monash
> University
> >┬ ┬ ┬ >─*┬ ─*┬ 381 Royal Parade, Parkville VIC 3052
> >┬ ┬ ┬ >─*┬ ─*┬ [3][5][7]dallas.warren_at_monash.edu
> >┬ ┬ ┬ >─*┬ ─*┬ ---------------------------------
> >┬ ┬ ┬ >─*┬ ─*┬ When the only tool you own is a hammer, every
> problem begins to
> >┬ ┬ ┬ resemble a
> >┬ ┬ ┬ >─*┬ ─*┬ nail.
> >┬ ┬ ┬ >
> >┬ ┬ ┬ > References
> >┬ ┬ ┬ >
> >┬ ┬ ┬ >─*┬ ─*┬ Visible links
> >┬ ┬ ┬ >─*┬ ─*┬ 1.
> >┬ ┬ ┬
> [6][8]https://pbs.twimg.com/media/EYSJJIbVAAEp7gz?format=png&name=900x900
> >┬ ┬ ┬ >─*┬ ─*┬ 2.
> >┬ ┬ ┬
> [7][9]https://pbs.twimg.com/media/EYSJK97U4AEACm5?format=png&name=900x900
> >┬ ┬ ┬ >─*┬ ─*┬ 3. mailto:[8][10]dallas.warren_at_monash.edu
> >
> >┬ ┬ ┬ --
> >┬ ┬ ┬ NIH Center for Macromolecular Modeling and Bioinformatics
> >┬ ┬ ┬ Beckman Institute for Advanced Science and Technology
> >┬ ┬ ┬ University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
> >┬ ┬ ┬ [9][11]http://www.ks.uiuc.edu/~johns/─*┬ ─*┬ ─*┬ ─*┬ ─*┬
> ─* Phone: 217-244-3349
> >┬ ┬ ┬ [10][12]http://www.ks.uiuc.edu/Research/vmd/─*┬ ─*┬ ─*
> >
> > References
> >
> >┬ ┬ Visible links
> >┬ ┬ 1. mailto:[13]dallas.warren_at_monash.edu
> >┬ ┬ 2. mailto:[14]johns_at_ks.uiuc.edu
> >┬ ┬ 3.
> [15]https://pbs.twimg.com/media/EYSJJIbVAAEp7gz?format=png&name=900x900
> >┬ ┬ 4.
> [16]https://pbs.twimg.com/media/EYSJK97U4AEACm5?format=png&name=900x900
> >┬ ┬ 5. mailto:[17]dallas.warren_at_monash.edu
> >┬ ┬ 6.
> [18]https://pbs.twimg.com/media/EYSJJIbVAAEp7gz?format=png&name=900x900
> >┬ ┬ 7.
> [19]https://pbs.twimg.com/media/EYSJK97U4AEACm5?format=png&name=900x900
> >┬ ┬ 8. mailto:[20]dallas.warren_at_monash.edu
> >┬ ┬ 9. [21]http://www.ks.uiuc.edu/~johns/
> >┬ ┬ 10. [22]http://www.ks.uiuc.edu/Research/vmd/
>
> --
> NIH Center for Macromolecular Modeling and Bioinformatics
> Beckman Institute for Advanced Science and Technology
> University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
> [23]http://www.ks.uiuc.edu/~johns/┬ ┬ ┬ ┬ ┬ ┬ Phone: 217-244-3349
> [24]http://www.ks.uiuc.edu/Research/vmd/┬ ┬ ┬
>
> References
>
> Visible links
> 1. mailto:dallas.warren_at_monash.edu
> 2. mailto:johns_at_ks.uiuc.edu
> 3. mailto:dallas.warren_at_monash.edu
> 4. mailto:johns_at_ks.uiuc.edu
> 5. https://pbs.twimg.com/media/EYSJJIbVAAEp7gz?format=png&name=900x900
> 6. https://pbs.twimg.com/media/EYSJK97U4AEACm5?format=png&name=900x900
> 7. mailto:dallas.warren_at_monash.edu
> 8. https://pbs.twimg.com/media/EYSJJIbVAAEp7gz?format=png&name=900x900
> 9. https://pbs.twimg.com/media/EYSJK97U4AEACm5?format=png&name=900x900
> 10. mailto:dallas.warren_at_monash.edu
> 11. http://www.ks.uiuc.edu/~johns/%C4%80
> 12. http://www.ks.uiuc.edu/Research/vmd/%C4%80
> 13. mailto:dallas.warren_at_monash.edu
> 14. mailto:johns_at_ks.uiuc.edu
> 15. https://pbs.twimg.com/media/EYSJJIbVAAEp7gz?format=png&name=900x900
> 16. https://pbs.twimg.com/media/EYSJK97U4AEACm5?format=png&name=900x900
> 17. mailto:dallas.warren_at_monash.edu
> 18. https://pbs.twimg.com/media/EYSJJIbVAAEp7gz?format=png&name=900x900
> 19. https://pbs.twimg.com/media/EYSJK97U4AEACm5?format=png&name=900x900
> 20. mailto:dallas.warren_at_monash.edu
> 21. http://www.ks.uiuc.edu/~johns/
> 22. http://www.ks.uiuc.edu/Research/vmd/
> 23. http://www.ks.uiuc.edu/~johns/
> 24. http://www.ks.uiuc.edu/Research/vmd/

-- 
NIH Center for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
http://www.ks.uiuc.edu/~johns/           Phone: 217-244-3349
http://www.ks.uiuc.edu/Research/vmd/