-
Notifications
You must be signed in to change notification settings - Fork 873
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
Memory allocation error using Windows OS #2337
Comments
Could you please check if this happens with version 3.2.5 as well? (Both the RAM issue and the performance issue) |
Yes, with 3.2.5 I get the same behavior |
What happens if you reduce the allocation with As a side-note, I hope we will be able to soon improve and reduce the default allocation heuristic. That said, this does not explain the Windows discrepancy or the performance issue. Note that there is already an open issue regarding Windows 11. |
That's a very interesting test, something happens between allocating 4MB and 3MB: The test is consistent among different repetitions (of course with different exact values, but with the same order of magnitude, i.e., with >=4M I always still have a "huge" RAM availability when the code fails, while with <=3M the fail is more reasonable) |
Can you try 100k or something small like that? Tip: when you load a model in simulate, the F2 panel tells you how much of the memory you gave it is actually used. You'll also see this at the top of the file if you do print data. |
No failures with 100K. Memory usage of the model from simulate is 0.535K. |
Intro
Hi!
I am a PhD student at the Polytechnic University of Turin, I use MuJoCo for my research on muscle activity estimation.
I encountered a memory allocation error using Windows that is not present when running the same code with the same PC using WSL. Below is a minimal script to reproduce the error with the arm26.xml model.
CC involved collaborators: @vikashplus @vittorione94
My setup
Python: 3.11.7
Mujoco: 3.2.6
OS: Windows 10
PC: Dell XPS 13 9310 (16GB RAM)
What's happening? What did you expect?
When running the code attached below using Windows, I get
mujoco.FatalError: Could not allocate memory
at the i-th instance of MjData, despite the RAM being used by the process is lower than the available (<2GB used, >4GB available). When I run the same code using WSL on the same PC there are no errors if I have RAM available (I also report that the code is about 10 times faster in this case).I would expect not to have this error if I still have memory available.
Steps for reproduction
Run the code below using Windows OS.
Minimal model for reproduction
arm26.xml
minimal XML
Code required for reproduction
Confirmations
The text was updated successfully, but these errors were encountered: