Segmentation Fault - tcsmoltensalt.from_existing()

  • arished
  • Topic Author
More
05 Jan 2023 07:05 #11807 by arished
Hello,

When importing from an existing module

import PySAM.TcsmoltenSalt as tcs

# When I try either:
tcs.from_existing('output_from_sam/untitled_tcsmolten_salt.json')
tcs.from_existing('output_from_sam/untitled_tcsmolten_salt.json',"MSPTSingleOwner")

The kernel restarts in jupyter lab. My SAM and PySAM are on Windows 10. When I try it outside of jupyter, it fails as well (quits Python).

I have PySAM on WSL. The command fails with 
[1]    106 segmentation fault (core dumped)  python3

and quits Python. I tried it on a separate Linux and I am still getting a segmentation fault. Is it a dependency issue or a am I doing it wrong?

Thank you for your help.

Please Log in or Create an account to join the conversation.

  • Paul Gilman
More
10 Jan 2023 18:25 #11823 by Paul Gilman
Replied by Paul Gilman on topic Segmentation Fault - tcsmoltensalt.from_existing()
Hi Arished,

The from_existing() function requires that you create an instance of a module before you call it as described in Example 2 of the Getting Started section of the PySAM documentation:

nrel-pysam.readthedocs.io/en/master/getting-started.html#example-2-build-a-model-from-defaults

If you are reading inputs that you exported from SAM to JSON, you should use the code sample in Example 1 as a model:

nrel-pysam.readthedocs.io/en/master/getting-started.html#example-1-build-a-model-from-sam

Best regards,
Paul.
 

Please Log in or Create an account to join the conversation.

Moderators: Paul Gilman
Powered by Kunena Forum