Group Abstract Group Abstract

Message Boards Message Boards

1
|
13.7K Views
|
16 Replies
|
9 Total Likes
View groups...
Share
Share this post:

Exceeding the "memory pool" in WSM

POSTED BY: Eric Smith
16 Replies
POSTED BY: Patrik Ekenberg

Interesting Patrik, nice work finding that. SimpleAir would be fine if you want to send a patched medium file.

If there is a good regex expression I could use, please send that as well. I’ll make copies of the other media I want to use and do a regex find-replace in a text editor.

Please keep me in the loop on a more permanent fix.

POSTED BY: Eric Smith

Eric, try this Custom Media package and see if it works for you. It at least works with my PipeVolumeSystem model. I replaced all the references in the PipeVolumeSystem model from Modelica.Media to CustomMedia (I set the Medium to CustomMedia.Air.SimpleAir and changed the components to CustomMedia.Examples.Tests.Components.[...]).

The test simulation will produce an assert message, which is expected since the temperature in the model is set to high. I left it there because it was the assert message that was giving troubles previously.

I'll follow up with you on a more permanent fix.

Attachments:
POSTED BY: Patrik Ekenberg

Patrik, I didn't get around to testing this today. I'm trying to figure out the media library – creating a custom medium – and I'm running into trouble. It's saying

state.p not found in scope Modelica.Media.Examples.Tests.Components.FixedAmbient$fixedAmbient.Medium.BaseProperties.

I think I just need to call setState_pTX in my component. I'll try to wrap this up and test for you tomorrow.

POSTED BY: Eric Smith
Posted 8 years ago

Patrik, to update you on the progress. I did install the CustomMedia package and it's working. I was also able to duplicate other libraries from the Media package (like the ideal gas package) without any issue. Thanks for the workaround!

POSTED BY: Updating Name

Thanks for confirming, Neil. Patrik, would you be able to send me a build with the patch? What's a rough timeframe to get this fixed?

Thanks, Eric

POSTED BY: Eric Smith

Patrik,

It appears that there is a bug in the Mac version of WSM. I get the same error as Eric running your posted code (PipeVolumeSystem). It appears that a hard path is burned into the code because there is no user "Jenkins" on my machine (nor presumably on Eric's). I am even running it on the WSM version (the number of which I emailed you yesterday) and it crashes.

/Users/jenkins/workspace/Kernel-ci/label/OSX/SystemModeler/Kernel/cruntime/memorypool.c, line 181.

If I manually build the program it builds but does not run -- it throws the error at runtime. My guess is that there is an error in one of the Library files that overflows on such a large _init.sim file. Using 200 runs but 300 fails. The file reference must be embedded inside the library. I hope that helps.

Regards

POSTED BY: Neil Singer

I tried to run it on my mac but you are missing some models:

Pipe

OnePipe.Medium

Can you post the entire package zipped?

Regards

POSTED BY: Neil Singer

Neil, the site wouldn't let me upload a zip file. I added the two files (not sure why "OnePipe" was needed).

Alternatively, run Patrik's code. I hit the same problem with it, but his doesn't rely on my custom components.

Attachments:
POSTED BY: Eric Smith

Like Patrick, I am also interested in more information. Thank you.

Hi Eric,

I realize you might not want to share the full model, but could you tell me if the attached model is roughly similar to what you are trying to model? I tried to reconstruct it from your description and I am not able to reproduce the error even with 300 pipes.

Attachments:
POSTED BY: Patrik Ekenberg

Patrik, there's nothing proprietary here. Just some simple test cases at this point. I've attached the two files you'd need. The file that I'm talking about is "MultipleSectionNetwork.mo" the only non-Media library file that it relies on is "DryGasPipeline.TwoPort"

Attachments:
POSTED BY: Eric Smith

I ran your code and got the same error from my code. Something must be strange with my install. I'm running on a Mac. Since I have a network license and Parallels, let me try on Windows. I'll report back soon.

POSTED BY: Eric Smith
POSTED BY: Eric Smith
POSTED BY: Neil Singer

Neil, 20,000,000 is in the header file and I definitely don't have that many outputs. Thanks for finding the header file. It doesn't look like the c file is in the directory though, so I can't see what line 181 is in "memory_pool.c"

POSTED BY: Eric Smith
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard