-
Notifications
You must be signed in to change notification settings - Fork 67
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
Added default_nonlinear_solver and default_linear_solver options to Trajectory. #1016
Conversation
…rajectory.\nRemoved automatic recording of inputs in run_problem and under simulation.\nSimulationPhases now automatically set state option `input_initial` to False.
…lity. Fix for parallel phases when MPI is not available or comm.size <= 1.
# Verify that the second case has the same inputs and outputs | ||
assert_cases_equal(case1, p, tol=1.0E-9, require_same_vars=False) | ||
assert_cases_equal(sim_case1, sim_case2, tol=1.0E-8) | ||
if MPI: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this conditional appears to be redundant with the test decorator...
@@ -75,8 +75,7 @@ def run_problem(problem, refine_method='hp', refine_iteration_limit=0, run_drive | |||
if solution_record_file not in [rec._filepath for rec in iter(problem._rec_mgr)]: | |||
recorder = om.SqliteRecorder(solution_record_file) | |||
problem.add_recorder(recorder) | |||
# record_inputs is needed to capture potential input parameters that aren't connected |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you remove the inputs from the case recorder?
I mostly ask this because today, I read in a case db from an Aviary run and did a list_inputs on it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be unnecessary now since everything is ultimately an output. This was also a fast way around an openmdao bug in set val when it attempts to set a remote input. There is an issue up for that, but I thought it made sense to stop recording redundant data
@@ -831,12 +831,6 @@ def test_simulate_array_param(self): | |||
|
|||
assert_near_equal(sol - sim, np.zeros_like(sol)) | |||
|
|||
# Test that the parameter is available in the solution and simulation files |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was removed because we don't record inputs anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep
These solvers can be changed through the | ||
'default_nonlinear_solver' and 'default_linear_solver' options. | ||
""" | ||
if self._has_connected_phases and MPI and self.comm.size > 1: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just for clarification, why are the solvers only needed under MPI for the connected phases?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Phases are run simultaneously under MPI. If one is directly connected to another, then NLBlockJac is necessary to make sure the inputs and outputs are all in agreement
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait, there is an actual data connection between subsystems in a parallel group? I guess I would have to think about that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a less used capability to link phases by connection instead of constraint. If you do that under MPI then a solver is necessary
Summary
Trajectories require some form of nonlinear solver and linear solver when running connected phases in parallel (under MPI).
Trajectory will now automatically assign
NonlinearBlocJac
andPETScKrylov
if the default "run once" solvers are in place.Option
record_inputs
is now set to the defaultFalse
value for the dymos solution and simulation recorders.Related Issues
Backwards incompatibilities
Inputs will no longer be recorded by default. This can be changed by setting
problem.recording_options['record_inputs'] = True
.New Dependencies
None