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

new user #165

Closed
stonecoldhughes opened this issue Jun 18, 2024 · 5 comments
Closed

new user #165

stonecoldhughes opened this issue Jun 18, 2024 · 5 comments
Assignees
Labels
documentation Improvements or additions to documentation question Further information is requested

Comments

@stonecoldhughes
Copy link
Collaborator

we are looking at using ReSolve for our HPC application, and I think this example code illustrates a lot of what we are trying to do. I had a question about this particular line in this test:

I see that the main loop here iterates over "numSystems" and that the input is coming from a family of matrices named this way:

matrixFileNameFull = matrixFileName + fileId + ".mtx";

At a high level, what is this test doing? How do the indices of "numSystems" determine when a matrix is updated and refactorized? Thank you!

@stonecoldhughes
Copy link
Collaborator Author

also, I see that the matrix is being read in from files:

A_coo = ReSolve::io::readMatrixFromFile(mat_file);

are there some examples of constructing the matrix at runtime and then feeding it into this workflow the same way? Thank you!

@pelesh pelesh added documentation Improvements or additions to documentation question Further information is requested labels Jun 18, 2024
@pelesh
Copy link
Collaborator

pelesh commented Jun 18, 2024

Thanks for your questions, @stonecoldhughes. The examples are designed so they emulate a nonlinear solver (dynamic, steady state, optimization, etc.). You can feed any series of linear systems generated during nonlinear solver operation and then test Re::Solve's performance on those systems before actually interfacing Re::Solve with the nonlinear solver.

In our tests, we use linear systems generated during alternating current optimal power flow analysis (ACOPF) for different power grid models available from here: https://github.com/NREL/opf_matrices

You would need to write a script that generates inputs (file names of matrices and right-hand-side vectors) for your test case. An example script runResolve is in the repository.

@pelesh
Copy link
Collaborator

pelesh commented Jun 18, 2024

are there some examples of constructing the matrix at runtime and then feeding it into this workflow the same way? Thank you!

You would need to instrument an existing nonlinear solver and dump linear systems to files as it runs. Some explanations how to do that are available at https://github.com/NREL/opf_matrices

@pelesh
Copy link
Collaborator

pelesh commented Jun 18, 2024

You may want to take a look at functionality tests first because they come with their own matrices.

@pelesh
Copy link
Collaborator

pelesh commented Sep 18, 2024

Closing it as there is no follow up action defined. Feel free to reopen, if needed.

@pelesh pelesh closed this as completed Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants