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

Pb Run ORE examples on Linux Machine with ore.xml file (needs additional xml files) #236

Open
pasparis opened this issue May 15, 2024 · 2 comments

Comments

@pasparis
Copy link

Hello

I try to run both in python and C++ ORE examples on a linux Mint machine

I get for example 3 the same error message in python and c++
RuntimeError: Failed to open file Input/../../Input/conventions.xml (Python)
an error occurred: Failed to open file Input/../../Input/conventions.xml(C++)
for example 1:
an error occurred: Failed to open file Input/../../Input/calendaradjustment.xml

in the parameter loading only ore.xml is targeted, I don't understand this error
Thanks in advance for your help
Pascal

below the Python and c++ code

Execution in Python

from ORE import *
params = Parameters()
params.fromFile("******/Input_3/ore.xml")
ore = OREApp(params, True)
ore.run()

RuntimeError: Failed to open file Input/../../Input/conventions.xml

Execution in C++

ore::data::initBuilders();
// "usage: ORE path/to/ore.xml"
string inputFile("***********/Input_1/ore.xml");

try {
    auto params = boost::make_shared<Parameters>();
    params->fromFile(inputFile);
    OREApp ore(params, true);
    ore.run();
    return 0;
} catch (const exception& e) {
    cout << endl << "an error occurred: " << e.what() << endl;
    return -1;
}
@pcaspers
Copy link
Collaborator

Can you check the parameter setup / InputPath. This path has to point to the locations of the other config files like conventions.xml etc. It can either be an absolute path or a path relative to the current working directory

@pasparis
Copy link
Author

Hi Peter,
Thank you for the reply, I am going to see the parameter setup. I have just managed to make it run by putting this location

string inputFile("****/pOre1/cmake-build-debug/Input/ore.xml");
/
/pOre1/cmake-build-debug/Input
netting.xml
ore.xml
portfolio.xml
simulation.xml

/*******/pOre1/Input
calendaradjustment.xml
conventions.xml
currencies.xml
curveconfig.xml
pricingengine.xml
todaysmarket.xml

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

2 participants