Skip to content
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

Exceptions thrown when getting/setting MAXIMUM_TABLE_DIRECTORY_SIZE_IN_GB configuration setting #837

Closed
mapipolo opened this issue Oct 12, 2015 · 8 comments
Milestone

Comments

@mapipolo
Copy link

I'm implementing the tabular interpolation features of CoolProp and quickly blew past the 1.5 GB table directory size limit, so I'm trying to raise the limit. However, either of the following lines of code throws an ApplicationException with message "invalid item":

double dirSize = CoolProp.get_config_double(configuration_keys.MAXIMUM_TABLE_DIRECTORY_SIZE_IN_GB);
CoolProp.set_config_double(configuration_keys.MAXIMUM_TABLE_DIRECTORY_SIZE_IN_GB, 2.0);

As a point of reference, running either of the following two lines works as expected:

string path = CoolProp.get_config_string(configuration_keys.ALTERNATIVE_REFPROP_PATH);
CoolProp.set_config_string(configuration_keys.ALTERNATIVE_REFPROP_PATH, @"C:\REFPROP\");
@ibell
Copy link
Contributor

ibell commented Oct 12, 2015

interesting, I'll investigate. Nice issue report. C#, right? Shouldn't matter, but ....

@ibell ibell added this to the v5.1.2 milestone Oct 12, 2015
@mapipolo
Copy link
Author

C#, correct. Nightly build of CoolProp with REFPROP 9.12.

@ibell
Copy link
Contributor

ibell commented Oct 12, 2015

Smells like a bug. I'll see.

On Tue, Oct 13, 2015 at 12:24 AM, mapipolo notifications@github.com wrote:

C#, correct. Nightly build of CoolProp with REFPROP 9.12.


Reply to this email directly or view it on GitHub
#837 (comment).

@mapipolo
Copy link
Author

By the way, Ian, is it possible to change the directory where CoolProp stores the tabular data it generates? I assume it must be, but haven't encountered any way to do so.

@jowr
Copy link
Member

jowr commented Oct 13, 2015

Nope, it is hard coded in the TabularDataLibrary::path_to_tables function, which internally calls
the get_home_dir function, see http://www.coolprop.dreamhosters.com/binaries/sphinx/_static/doxygen/html/class_cool_prop_1_1_tabular_data_library.html#aedd1aff69c7bd0510f7f2be3c52fa468

@ibell
Copy link
Contributor

ibell commented Oct 13, 2015

Wild stab - do you have an older copy of the platform independent files?

In my configuration_keys.cs file, I see:

public enum configuration_keys {
  NORMALIZE_GAS_CONSTANTS,
  CRITICAL_WITHIN_1UK,
  CRITICAL_SPLINES_ENABLED,
  SAVE_RAW_TABLES,
  ALTERNATIVE_REFPROP_PATH,
  ALTERNATIVE_REFPROP_HMX_BNC_PATH,
  REFPROP_DONT_ESTIMATE_INTERACTION_PARAMETERS,
  MAXIMUM_TABLE_DIRECTORY_SIZE_IN_GB,
  DONT_CHECK_PROPERTY_LIMITS
}

which line exactly is causing the exception?

With regards to the path, it is hardcoded as @jowr says, but we could add a configuration variable. Can you file a separate issue please and I'll implement it?

@mapipolo
Copy link
Author

My platform independent files are a few days behind my copy of CoolProp.dll, but yes, my configuration_keys.cs file matches that.

I don't know if you made any related changes in the most recent nightly build of CoolProp.dll, but I downloaded Tuesday's build yesterday, and the problem has disappeared.

@ibell
Copy link
Contributor

ibell commented Oct 14, 2015

So we can close this issue? If so, go-ahead and do that. Maybe somehow
you got 5.1.1 instead
On Oct 14, 2015 5:55 PM, "mapipolo" notifications@github.com wrote:

My platform independent files are a few days behind my copy of
CoolProp.dll, but yes, my configuration_keys.cs file matches that.

I don't know if you made any related changes in the most recent nightly
build of CoolProp.dll, but I downloaded Tuesday's build yesterday, and the
problem has disappeared.


Reply to this email directly or view it on GitHub
#837 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants