Closed James-Ilosta closed 6 months ago
Here is the rest of the error message that I could retrieve from the terminal, if it is of interest:
self._nonlinear_solver._solve_with_cache_check()
C:\Users\user1\anaconda3\envs\wisdem-venv\lib\site-packages\openmdao\solvers\nonlinear\nonlinear_runonce.py:26: in _solve_with_cache_check
self.solve() # don't use caching
C:\Users\user1\anaconda3\envs\wisdem-venv\lib\site-packages\openmdao\solvers\nonlinear\nonlinear_runonce.py:45: in solve
self._gs_iter()
C:\Users\user1\anaconda3\envs\wisdem-venv\lib\site-packages\openmdao\solvers\solver.py:800: in _gs_iter
subsys._solve_nonlinear()
C:\Users\user1\anaconda3\envs\wisdem-venv\lib\site-packages\openmdao\core\explicitcomponent.py:312: in _solve_nonlinear
self._compute_wrapper()
C:\Users\user1\anaconda3\envs\wisdem-venv\lib\site-packages\openmdao\core\explicitcomponent.py:266: in _compute_wrapper
with self._call_user_function('compute'):
C:\Users\user1\anaconda3\envs\wisdem-venv\lib\contextlib.py:153: in __exit__
self.gen.throw(typ, value, traceback)
C:\Users\user1\anaconda3\envs\wisdem-venv\lib\site-packages\openmdao\core\system.py:2626: in _call_user_function
raise err_type(
C:\Users\user1\anaconda3\envs\wisdem-venv\lib\site-packages\openmdao\core\system.py:2620: in _call_user_function
yield
C:\Users\user1\anaconda3\envs\wisdem-venv\lib\site-packages\openmdao\core\explicitcomponent.py:286: in _compute_wrapper
self.compute(self._inputs, self._outputs)
c:\Users\user1\Desktop\WISDEM\wisdem\fixed_bottomse\monopile.py:634: in compute
freq_x, freq_y, freq_z, mshapes_x, mshapes_y, mshapes_z = util.get_xyz_mode_shapes(
c:\Users\user1\Desktop\WISDEM\wisdem\commonse\utilities.py:71: in get_xyz_mode_shapes
polys = get_modal_coefficients(r, displacements, idx0=idx0, base_slope0=base_slope0)
c:\Users\user1\Desktop\WISDEM\wisdem\commonse\utilities.py:42: in get_modal_coefficients
p6 = np.polynomial.polynomial.polyfit(xn, y, deg)
C:\Users\user1\anaconda3\envs\wisdem-venv\lib\site-packages\numpy\polynomial\polynomial.py:1362: in polyfit
return pu._fit(polyvander, x, y, deg, rcond, full, w)
C:\Users\user1\anaconda3\envs\wisdem-venv\lib\site-packages\numpy\polynomial\polyutils.py:664: in _fit
c, resids, rank, s = np.linalg.lstsq(lhs.T/scl, rhs.T, rcond)
<__array_function__ internals>:200: in lstsq
???
C:\Users\user1\anaconda3\envs\wisdem-venv\lib\site-packages\numpy\linalg\linalg.py:2285: in lstsq
x, resids, rank, s = gufunc(a, b, rcond, signature=signature, extobj=extobj)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
err = 'invalid value', flag = 8
def _raise_linalgerror_lstsq(err, flag):
> raise LinAlgError("SVD did not converge in Linear Least Squares")
E numpy.linalg.LinAlgError: 'monopile' <class MonopileFrame>: Error calling compute(), SVD did not converge in Linear Least Squares
C:\Users\user1\anaconda3\envs\wisdem-venv\lib\site-packages\numpy\linalg\linalg.py:101: LinAlgError
________________________________________________________________________ TestRegression.test_cobyla ________________________________________________________________________
self = <wisdem.test.test_gluecode.test_drivers.TestRegression testMethod=test_cobyla>
def test_cobyla(self):
analysis_options = load_yaml(fname_analysis_options)
solver = "COBYLA"
analysis_options["driver"]["optimization"]["solver"] = solver
analysis_options["driver"]["optimization"]["rhobeg"] = 0.5
analysis_options["driver"]["optimization"]["max_iter"] = 1
new_fname_analysis_options = f"{fname_analysis_options.split('/')[-1].split('.')[0]}_{solver}.yaml"
write_yaml(analysis_options, new_fname_analysis_options)
> wt_opt, modeling_options, opt_options = run_wisdem(
fname_wt_input, fname_modeling_options, new_fname_analysis_options
)
c:\Users\user1\Desktop\WISDEM\wisdem\test\test_gluecode\test_drivers.py:62:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
c:\Users\user1\Desktop\WISDEM\wisdem\glue_code\runWISDEM.py:178: in run_wisdem
wt_opt.run_driver()
C:\Users\user1\anaconda3\envs\wisdem-venv\lib\site-packages\openmdao\core\problem.py:686: in run_driver
self.final_setup()
C:\Users\user1\anaconda3\envs\wisdem-venv\lib\site-packages\openmdao\core\problem.py:1063: in final_setup
driver._setup_recording()
C:\Users\user1\anaconda3\envs\wisdem-venv\lib\site-packages\openmdao\core\driver.py:548: in _setup_recording
self._rec_mgr.startup(self, self._problem().comm)
C:\Users\user1\anaconda3\envs\wisdem-venv\lib\site-packages\openmdao\recorders\recording_manager.py:75: in startup
recorder.startup(recording_requester, comm)
C:\Users\user1\anaconda3\envs\wisdem-venv\lib\site-packages\openmdao\recorders\sqlite_recorder.py:332: in startup
self._initialize_database(comm)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <openmdao.recorders.sqlite_recorder.SqliteRecorder object at 0x000002B1F4978790>, comm = <mpi4py.MPI.Intracomm object at 0x000002B1C9F8BD30>
def _initialize_database(self, comm):
"""
Initialize the database.
Parameters
----------
comm : MPI.Comm or <FakeComm> or None
The communicator for the recorder (should be the comm for the Problem).
"""
filepath = None
if MPI and comm and comm.size > 1:
if self._record_on_proc:
if not self._parallel:
# recording only on this proc
filepath = self._filepath
else:
# recording on multiple procs, so a separate file for each recording proc
# plus a file for the common metadata, written by the lowest recording rank
rank = comm.rank
filepath = f"{self._filepath}_{rank}"
print("Note: SqliteRecorder is running on multiple processors. "
f"Cases from rank {rank} are being written to {filepath}.")
if rank == min(self._recording_ranks):
metadata_filepath = f'{self._filepath}_meta'
print("Note: Metadata is being recorded separately as "
f"{metadata_filepath}.")
try:
rc = os.remove(metadata_filepath)
issue_warning("The existing case recorder metadata file, "
f"{metadata_filepath}, is being overwritten.",
category=UserWarning)
except OSError:
pass
self.metadata_connection = sqlite3.connect(metadata_filepath)
else:
self._record_metadata = False
else:
# no MPI or comm size == 1
filepath = self._filepath
if filepath:
try:
os.remove(filepath)
issue_warning(f'The existing case recorder file, {filepath},'
' is being overwritten.', category=UserWarning)
except OSError:
pass
self.connection = sqlite3.connect(filepath)
if self._record_metadata and self.metadata_connection is None:
self.metadata_connection = self.connection
with self.connection as c:
# used to keep track of the order of the case records across all case tables
> c.execute("CREATE TABLE global_iterations(id INTEGER PRIMARY KEY, "
"record_type TEXT, rowid INT, source TEXT)")
E sqlite3.OperationalError: table global_iterations already exists
C:\Users\user1\anaconda3\envs\wisdem-venv\lib\site-packages\openmdao\recorders\sqlite_recorder.py:238: OperationalError
---------------------------------------------------------------------------- Captured log call -----------------------------------------------------------------------------
INFO wisdem/weis:runWISDEM.py:98 Started
_______________________________________________________________________ TestRegression.test_ld_slsqp _______________________________________________________________________
self = <wisdem.test.test_gluecode.test_drivers.TestRegression testMethod=test_ld_slsqp>
def test_ld_slsqp(self):
analysis_options = load_yaml(fname_analysis_options)
solver = "LD_SLSQP"
analysis_options["driver"]["optimization"]["solver"] = solver
analysis_options["driver"]["optimization"]["max_iter"] = 1
new_fname_analysis_options = f"{fname_analysis_options.split('/')[-1].split('.')[0]}_{solver}.yaml"
write_yaml(analysis_options, new_fname_analysis_options)
> wt_opt, modeling_options, opt_options = run_wisdem(
fname_wt_input, fname_modeling_options, new_fname_analysis_options
)
c:\Users\user1\Desktop\WISDEM\wisdem\test\test_gluecode\test_drivers.py:76:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
c:\Users\user1\Desktop\WISDEM\wisdem\glue_code\runWISDEM.py:178: in run_wisdem
wt_opt.run_driver()
C:\Users\user1\anaconda3\envs\wisdem-venv\lib\site-packages\openmdao\core\problem.py:686: in run_driver
self.final_setup()
C:\Users\user1\anaconda3\envs\wisdem-venv\lib\site-packages\openmdao\core\problem.py:1063: in final_setup
driver._setup_recording()
C:\Users\user1\anaconda3\envs\wisdem-venv\lib\site-packages\openmdao\core\driver.py:548: in _setup_recording
self._rec_mgr.startup(self, self._problem().comm)
C:\Users\user1\anaconda3\envs\wisdem-venv\lib\site-packages\openmdao\recorders\recording_manager.py:75: in startup
recorder.startup(recording_requester, comm)
C:\Users\user1\anaconda3\envs\wisdem-venv\lib\site-packages\openmdao\recorders\sqlite_recorder.py:332: in startup
self._initialize_database(comm)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <openmdao.recorders.sqlite_recorder.SqliteRecorder object at 0x000002B1DD792EC0>, comm = <mpi4py.MPI.Intracomm object at 0x000002B1C9F8BD30>
def _initialize_database(self, comm):
"""
Initialize the database.
Parameters
----------
comm : MPI.Comm or <FakeComm> or None
The communicator for the recorder (should be the comm for the Problem).
"""
filepath = None
if MPI and comm and comm.size > 1:
if self._record_on_proc:
if not self._parallel:
# recording only on this proc
filepath = self._filepath
else:
# recording on multiple procs, so a separate file for each recording proc
# plus a file for the common metadata, written by the lowest recording rank
rank = comm.rank
filepath = f"{self._filepath}_{rank}"
print("Note: SqliteRecorder is running on multiple processors. "
f"Cases from rank {rank} are being written to {filepath}.")
if rank == min(self._recording_ranks):
metadata_filepath = f'{self._filepath}_meta'
print("Note: Metadata is being recorded separately as "
f"{metadata_filepath}.")
try:
rc = os.remove(metadata_filepath)
issue_warning("The existing case recorder metadata file, "
f"{metadata_filepath}, is being overwritten.",
category=UserWarning)
except OSError:
pass
self.metadata_connection = sqlite3.connect(metadata_filepath)
else:
self._record_metadata = False
else:
# no MPI or comm size == 1
filepath = self._filepath
if filepath:
try:
os.remove(filepath)
issue_warning(f'The existing case recorder file, {filepath},'
' is being overwritten.', category=UserWarning)
except OSError:
pass
self.connection = sqlite3.connect(filepath)
if self._record_metadata and self.metadata_connection is None:
self.metadata_connection = self.connection
with self.connection as c:
# used to keep track of the order of the case records across all case tables
> c.execute("CREATE TABLE global_iterations(id INTEGER PRIMARY KEY, "
"record_type TEXT, rowid INT, source TEXT)")
E sqlite3.OperationalError: table global_iterations already exists
C:\Users\user1\anaconda3\envs\wisdem-venv\lib\site-packages\openmdao\recorders\sqlite_recorder.py:238: OperationalError
---------------------------------------------------------------------------- Captured log call -----------------------------------------------------------------------------
INFO wisdem/weis:runWISDEM.py:98 Started
________________________________________________________________________ TestRegression.test_nelder ________________________________________________________________________
self = <wisdem.test.test_gluecode.test_drivers.TestRegression testMethod=test_nelder>
def test_nelder(self):
analysis_options = load_yaml(fname_analysis_options)
solver = "Nelder-Mead"
analysis_options["driver"]["optimization"]["solver"] = solver
analysis_options["driver"]["optimization"]["adaptive"] = True
analysis_options["driver"]["optimization"]["max_iter"] = 1
new_fname_analysis_options = f"{fname_analysis_options.split('/')[-1].split('.')[0]}_{solver}.yaml"
write_yaml(analysis_options, new_fname_analysis_options)
> wt_opt, modeling_options, opt_options = run_wisdem(
fname_wt_input, fname_modeling_options, new_fname_analysis_options
)
c:\Users\user1\Desktop\WISDEM\wisdem\test\test_gluecode\test_drivers.py:47:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
c:\Users\user1\Desktop\WISDEM\wisdem\glue_code\runWISDEM.py:178: in run_wisdem
wt_opt.run_driver()
C:\Users\user1\anaconda3\envs\wisdem-venv\lib\site-packages\openmdao\core\problem.py:686: in run_driver
self.final_setup()
C:\Users\user1\anaconda3\envs\wisdem-venv\lib\site-packages\openmdao\core\problem.py:1063: in final_setup
driver._setup_recording()
C:\Users\user1\anaconda3\envs\wisdem-venv\lib\site-packages\openmdao\core\driver.py:548: in _setup_recording
self._rec_mgr.startup(self, self._problem().comm)
C:\Users\user1\anaconda3\envs\wisdem-venv\lib\site-packages\openmdao\recorders\recording_manager.py:75: in startup
recorder.startup(recording_requester, comm)
C:\Users\user1\anaconda3\envs\wisdem-venv\lib\site-packages\openmdao\recorders\sqlite_recorder.py:332: in startup
self._initialize_database(comm)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <openmdao.recorders.sqlite_recorder.SqliteRecorder object at 0x000002B1DD134040>, comm = <mpi4py.MPI.Intracomm object at 0x000002B1C9F8BD30>
def _initialize_database(self, comm):
"""
Initialize the database.
Parameters
----------
comm : MPI.Comm or <FakeComm> or None
The communicator for the recorder (should be the comm for the Problem).
"""
filepath = None
if MPI and comm and comm.size > 1:
if self._record_on_proc:
if not self._parallel:
# recording only on this proc
filepath = self._filepath
else:
# recording on multiple procs, so a separate file for each recording proc
# plus a file for the common metadata, written by the lowest recording rank
rank = comm.rank
filepath = f"{self._filepath}_{rank}"
print("Note: SqliteRecorder is running on multiple processors. "
f"Cases from rank {rank} are being written to {filepath}.")
if rank == min(self._recording_ranks):
metadata_filepath = f'{self._filepath}_meta'
print("Note: Metadata is being recorded separately as "
f"{metadata_filepath}.")
try:
rc = os.remove(metadata_filepath)
issue_warning("The existing case recorder metadata file, "
f"{metadata_filepath}, is being overwritten.",
category=UserWarning)
except OSError:
pass
self.metadata_connection = sqlite3.connect(metadata_filepath)
else:
self._record_metadata = False
else:
# no MPI or comm size == 1
filepath = self._filepath
if filepath:
try:
os.remove(filepath)
issue_warning(f'The existing case recorder file, {filepath},'
' is being overwritten.', category=UserWarning)
except OSError:
pass
self.connection = sqlite3.connect(filepath)
if self._record_metadata and self.metadata_connection is None:
self.metadata_connection = self.connection
with self.connection as c:
# used to keep track of the order of the case records across all case tables
> c.execute("CREATE TABLE global_iterations(id INTEGER PRIMARY KEY, "
"record_type TEXT, rowid INT, source TEXT)")
E sqlite3.OperationalError: table global_iterations already exists
C:\Users\user1\anaconda3\envs\wisdem-venv\lib\site-packages\openmdao\recorders\sqlite_recorder.py:238: OperationalError
---------------------------------------------------------------------------- Captured log call -----------------------------------------------------------------------------
INFO wisdem/weis:runWISDEM.py:98 Started
_______________________________________________________________________ TestNLoptDriver.test_maxtime _______________________________________________________________________
self = <test_nlopt_driver.TestNLoptDriver testMethod=test_maxtime>
def test_maxtime(self):
prob = om.Problem(reports=False)
model = prob.model
model.add_subsystem("p1", om.IndepVarComp("x", 50.0), promotes=["*"])
model.add_subsystem("p2", om.IndepVarComp("y", 50.0), promotes=["*"])
model.add_subsystem("comp", Paraboloid(), promotes=["*"])
prob.set_solver_print(level=0)
prob.driver = NLoptDriver(optimizer="LD_SLSQP", tol=1e-9, maxtime=0.0001)
model.add_design_var("x", lower=-50.0, upper=50.0)
model.add_design_var("y", lower=-50.0, upper=50.0)
model.add_objective("f_xy")
prob.setup()
failed = prob.run_driver()
# It shouldn't have time to move from the initial point
> assert_near_equal(prob["x"], 50.0, 1e-6)
c:\Users\user1\Desktop\WISDEM\wisdem\test\test_optimization_drivers\test_nlopt_driver.py:1581:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
actual = array([6.66666667]), desired = array([50.]), tolerance = 1e-06
def assert_near_equal(actual, desired, tolerance=1e-15):
"""
Check relative error.
Determine that the relative error between `actual` and `desired`
is within `tolerance`. If `desired` is zero, then use absolute error.
Can handle some data structures. Generates warnings for data types it cannot handle.
Parameters
----------
actual : float, array-like, dict
The value from the test.
desired : float, array-like, dict
The value expected.
tolerance : float
Maximum relative error ``(actual - desired) / desired``.
Returns
-------
float
The error.
"""
# Try to make similar things of the same type so they can be compared
# make arrays out of scalars
if type(actual) in [int, float, np.int64, np.float64, np.int32, np.complex128]:
actual = np.atleast_1d(actual)
if type(desired) in [int, float, np.int64, np.float64, np.int32, np.complex128]:
desired = np.atleast_1d(desired)
# Handle jax arrays, if available
if ArrayImpl is not None:
if isinstance(actual, ArrayImpl):
actual = np.atleast_1d(actual)
if isinstance(desired, ArrayImpl):
desired = np.atleast_1d(desired)
# if desired is numeric list or tuple, make ndarray out of it
if isinstance(actual, (list, tuple)):
actual = np.asarray(actual)
if isinstance(desired, (list, tuple)):
desired = np.asarray(desired)
# In case they are PromAbsDict and other dict-like objects
if isinstance(actual, dict) and type(actual) != dict:
actual = dict(actual)
if isinstance(desired, dict) and type(desired) != dict:
desired = dict(desired)
if type(actual) != type(desired):
raise ValueError(f'actual {type(actual)}, desired {type(desired)} have different types')
if isinstance(actual, type) and isinstance(desired, type):
if actual != desired:
raise ValueError(
'actual type %s, and desired type %s are different' % (actual, desired))
return 0
# The code below can only handle these data types
_supported_types = [dict, set, str, bool, np.ndarray, type(None)]
if type(actual) not in _supported_types:
warnings.warn(
f"The function, assert_near_equal, does not support the actual value type: '"
f"{type(actual)}'.")
return 0
if type(desired) not in _supported_types:
warnings.warn(
f"The function, assert_near_equal, does not support the desired value type: '"
f"{type(actual)}'.")
return 0
if isinstance(actual, dict) and isinstance(desired, dict):
actual_keys = set(actual.keys())
desired_keys = set(desired.keys())
if actual_keys.symmetric_difference(desired_keys):
msg = 'Actual and desired keys differ. Actual extra keys: {}, Desired extra keys: {}'
actual_extra = actual_keys.difference(desired_keys)
desired_extra = desired_keys.difference(actual_keys)
raise KeyError(msg.format(actual_extra, desired_extra))
error = 0.
for key in actual_keys:
try:
new_error = assert_near_equal(
actual[key], desired[key], tolerance)
error = max(error, new_error)
except ValueError as exception:
msg = '{}: '.format(key) + str(exception)
raise ValueError(msg) from None
except KeyError as exception:
msg = '{}: '.format(key) + str(exception)
raise KeyError(msg) from None
elif isinstance(actual, set) and isinstance(desired, set):
if actual.symmetric_difference(desired):
actual_extra = actual.difference(desired)
desired = desired.difference(actual)
raise KeyError("Actual and desired sets differ. "
f"Actual extra values: {actual_extra}, "
f"Desired extra values: {desired_extra}")
error = 0.
elif isinstance(actual, str) and isinstance(desired, str):
if actual != desired:
raise ValueError(
'actual %s, desired %s strings have different values' % (actual, desired))
error = 0.0
elif isinstance(actual, bool) and isinstance(desired, bool):
if actual != desired:
raise ValueError(
'actual %s, desired %s booleans have different values' % (actual, desired))
error = 0.0
elif actual is None and desired is None:
error = 0.0
# array values
elif isinstance(actual, np.ndarray) and isinstance(desired, np.ndarray):
if actual.dtype == object or desired.dtype == object:
if actual.dtype == object:
warnings.warn(
f"The function, assert_near_equal, does not support the actual value ndarray "
f"type of: '"
f"{type(actual.dtype)}'.")
if desired.dtype == object:
warnings.warn(
f"The function, assert_near_equal, does not support the desired value ndarray "
f"type of: '"
f"{type(desired.dtype)}'.")
error = 0.0
else:
actual = np.atleast_1d(actual)
desired = np.atleast_1d(desired)
if actual.shape != desired.shape:
raise ValueError(
'actual and desired have differing shapes.'
' actual {}, desired {}'.format(actual.shape, desired.shape))
# check to see if the entire array is made of floats. If not, loop through all values
if not np.all(np.isnan(actual) == np.isnan(desired)):
if actual.size == 1 and desired.size == 1:
raise ValueError('actual %s, desired %s' % (actual, desired))
else:
raise ValueError('actual and desired values have non-matching nan'
' values')
if np.linalg.norm(desired) == 0:
error = np.linalg.norm(actual)
else:
error = np.linalg.norm(actual - desired) / np.linalg.norm(desired)
if abs(error) > tolerance:
if actual.size < 10 and desired.size < 10:
> raise ValueError('actual %s, desired %s, rel error %s, tolerance %s'
% (actual, desired, error, tolerance))
E ValueError: actual [6.66666667], desired [50.], rel error 0.8666666666666667, tolerance 1e-06
C:\Users\user1\anaconda3\envs\wisdem-venv\lib\site-packages\openmdao\utils\assert_utils.py:560: ValueError
_________________________________________________________________________ TestBreakdown.testModal __________________________________________________________________________
self = <wisdem.test.test_pyframe3dd.test_breakdown.TestBreakdown testMethod=testModal>
def testModal(self):
# nodes
nn = 11
node = np.arange(1, nn + 1, dtype=np.int_)
x = y = r = np.zeros(nn)
z = np.linspace(0, 100, nn)
nodes = NodeData(node, x, y, z, r)
# reactions
rnode = np.array([1], dtype=np.int_)
Kx = Ky = Kz = Ktx = Kty = Ktz = np.ones(1)
rigid = 1
reactions = ReactionData(rnode, Kx, Ky, Kz, Ktx, Kty, Ktz, rigid)
# elements
ne = nn - 1
EL = np.arange(1, ne + 1, dtype=np.int_)
N1 = np.arange(1, nn, dtype=np.int_)
N2 = np.arange(2, nn + 1, dtype=np.int_)
Ax = Jx = Iy = Iz = 10 * np.ones(ne)
Asy = Asz = 8 * np.ones(ne)
E = 2e6 * np.ones(ne)
G = 1e6 * np.ones(ne)
roll = np.zeros(ne)
rho = 1e-5 * np.ones(ne)
elements = ElementData(EL, N1, N2, Ax, Asy, Asz, Jx, Iy, Iz, E, G, roll, rho)
# parameters
shear = False # 1: include shear deformation
geom = True # 1: include geometric stiffness
dx = -1.0 # x-axis increment for internal forces
options = Options(shear, geom, dx)
#### Fixed-free
frame_mass = Frame(nodes, reactions, elements, options)
frame_force = Frame(nodes, reactions, elements, options)
# dynamics
nM = 15 # number of desired dynamic modes of vibration
Mmethod = 1 # 1: subspace Jacobi 2: Stodola
lump = 0 # 0: consistent mass ... 1: lumped mass matrix
tol = 1e-7 # mode shape tolerance
shift = -1e2 # shift value ... for unrestrained structures
frame_mass.enableDynamics(nM, Mmethod, lump, tol, shift)
frame_force.enableDynamics(nM, Mmethod, lump, tol, shift)
# load cases 1
gx = 0.0
gy = 0.0
gz = -980.6
load_mass = StaticLoadCase(gx, gy, gz)
load_force = StaticLoadCase(gx, gy, gz)
mymass = 4.0
# pseudo-mass loads
nadd = [node[-2]]
F = mymass * gz
load_force.changePointLoads(nadd, [0], [0], [F], [0], [0], [0])
frame_force.addLoadCase(load_force)
# Added mass
frame_mass.addLoadCase(load_mass)
EMs = [mymass]
EMxx = EMyy = EMzz = EMxy = EMxz = EMyz = np.array([0.0])
rhox = rhoy = rhoz = np.array([0.0])
addGravityLoad = True
frame_mass.changeExtraNodeMass(nadd, EMs, EMxx, EMyy, EMzz, EMxy, EMxz, EMyz, rhox, rhoy, rhoz, addGravityLoad)
frame_force.changeExtraNodeMass(nadd, EMs, EMxx, EMyy, EMzz, EMxy, EMxz, EMyz, rhox, rhoy, rhoz, False)
_, _, rxns_mass, _, _, modal_mass = frame_mass.run()
_, _, rxns_force, _, _, modal_force = frame_force.run()
npt.assert_almost_equal(modal_mass.freq, modal_force.freq)
> npt.assert_almost_equal(rxns_mass.Fx, rxns_force.Fx)
c:\Users\user1\Desktop\WISDEM\wisdem\test\test_pyframe3dd\test_breakdown.py:434:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
C:\Users\user1\anaconda3\envs\wisdem-venv\lib\contextlib.py:79: in inner
return func(*args, **kwds)
C:\Users\user1\anaconda3\envs\wisdem-venv\lib\contextlib.py:79: in inner
return func(*args, **kwds)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_array_almost_equal.<locals>.compare at 0x000002B1DB945B40>, array([[0.]]), array([[1.]]))
kwds = {'err_msg': '', 'header': 'Arrays are not almost equal to 7 decimals', 'precision': 7, 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Arrays are not almost equal to 7 decimals
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 1.
E Max relative difference: 1.
E x: array([[0.]])
E y: array([[1.]])
C:\Users\user1\anaconda3\envs\wisdem-venv\lib\contextlib.py:79: AssertionError
============================================================================= warnings summary =============================================================================
..\..\anaconda3\envs\wisdem-venv\lib\site-packages\pyDOE2\doe_factorial.py:16
DeprecationWarning: C:\Users\user1\anaconda3\envs\wisdem-venv\lib\site-packages\pyDOE2\doe_factorial.py:16
the imp module is deprecated in favour of importlib and slated for removal in Python 3.12; see the module's documentation for alternative uses
wisdem\moorpy\system.py:14
DeprecationWarning: c:\Users\user1\Desktop\WISDEM\wisdem\moorpy\system.py:14
Please use `MatrixRankWarning` from the `scipy.sparse.linalg` namespace, the `scipy.sparse.linalg.eigen` namespace is deprecated.
..\..\anaconda3\envs\wisdem-venv\lib\site-packages\simpy\__init__.py:11
DeprecationWarning: C:\Users\user1\anaconda3\envs\wisdem-venv\lib\site-packages\simpy\__init__.py:11
pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
..\..\anaconda3\envs\wisdem-venv\lib\site-packages\pkg_resources\__init__.py:2871
..\..\anaconda3\envs\wisdem-venv\lib\site-packages\pkg_resources\__init__.py:2871
DeprecationWarning: C:\Users\user1\anaconda3\envs\wisdem-venv\lib\site-packages\pkg_resources\__init__.py:2871
Deprecated call to `pkg_resources.declare_namespace('sphinxcontrib')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
wisdem\test\test_orbit\data\__init__.py:12
UserWarning: c:\Users\user1\Desktop\WISDEM\wisdem\test\test_orbit\data\__init__.py:12
Could not infer format, so each element will be parsed individually, falling back to `dateutil`. To ensure parsing is consistent and as-expected, please specify a format.
..\..\anaconda3\envs\wisdem-venv\lib\site-packages\openmdao\test_suite\components\expl_comp_array.py:29
PytestCollectionWarning: C:\Users\user1\anaconda3\envs\wisdem-venv\lib\site-packages\openmdao\test_suite\components\expl_comp_array.py:29
cannot collect test class 'TestExplCompArrayDense' because it has a __init__ constructor (from: wisdem/test/test_optimization_drivers/test_nlopt_driver.py)
wisdem/test/test_commonse/test_distribution.py::Test::test_distributions
OMInvalidCheckDerivativesOptionsWarning: C:\Users\user1\anaconda3\envs\wisdem-venv\lib\site-packages\openmdao\core\problem.py:1249
Problem test_all4: Checking partials with respect to variable 'k' in component 'comp2' using the same method and options as are used to compute the component's derivatives will not provide any relevant information on the accuracy.
To correct this, change the options to do the
check_partials using either:
- arguments to Problem.check_partials.
- arguments to Component.set_check_partial_options
wisdem/test/test_commonse/test_wind_wave.py::TestDrag::test_wave_derivs
OMInvalidCheckDerivativesOptionsWarning: C:\Users\user1\anaconda3\envs\wisdem-venv\lib\site-packages\openmdao\core\problem.py:1249
Problem test_all11: Checking partials with respect to variable 'rho_water' in component 'comp' using the same method and options as are used to compute the component's derivatives will not provide any relevant information on the accuracy.
To correct this, change the options to do the
check_partials using either:
- arguments to Problem.check_partials.
- arguments to Component.set_check_partial_options
wisdem/test/test_commonse/test_wind_wave.py::TestDrag::test_wave_derivs
OMInvalidCheckDerivativesOptionsWarning: C:\Users\user1\anaconda3\envs\wisdem-venv\lib\site-packages\openmdao\core\problem.py:1249
Problem test_all11: Checking partials with respect to variable 'U' in component 'comp' using the same method and options as are used to compute the component's derivatives will not provide any relevant information on the accuracy.
To correct this, change the options to do the
check_partials using either:
- arguments to Problem.check_partials.
- arguments to Component.set_check_partial_options
wisdem/test/test_commonse/test_wind_wave.py::TestDrag::test_wave_derivs
OMInvalidCheckDerivativesOptionsWarning: C:\Users\user1\anaconda3\envs\wisdem-venv\lib\site-packages\openmdao\core\problem.py:1249
Problem test_all11: Checking partials with respect to variable 'd' in component 'comp' using the same method and options as are used to compute the component's derivatives will not provide any relevant information on the accuracy.
To correct this, change the options to do the
check_partials using either:
- arguments to Problem.check_partials.
- arguments to Component.set_check_partial_options
wisdem/test/test_commonse/test_wind_wave.py::TestDrag::test_wave_derivs
OMInvalidCheckDerivativesOptionsWarning: C:\Users\user1\anaconda3\envs\wisdem-venv\lib\site-packages\openmdao\core\problem.py:1249
Problem test_all11: Checking partials with respect to variable 'cm' in component 'comp' using the same method and options as are used to compute the component's derivatives will not provide any relevant information on the accuracy.
To correct this, change the options to do the
check_partials using either:
- arguments to Problem.check_partials.
- arguments to Component.set_check_partial_options
wisdem/test/test_commonse/test_wind_wave.py::TestDrag::test_wave_derivs
OMInvalidCheckDerivativesOptionsWarning: C:\Users\user1\anaconda3\envs\wisdem-venv\lib\site-packages\openmdao\core\problem.py:1249
Problem test_all11: Checking partials with respect to variable 'cd_usr' in component 'comp' using the same method and options as are used to compute the component's derivatives will not provide any relevant information on the accuracy.
To correct this, change the options to do the
check_partials using either:
- arguments to Problem.check_partials.
- arguments to Component.set_check_partial_options
wisdem/test/test_commonse/test_wind_wave.py::TestDrag::test_wave_derivs
OMInvalidCheckDerivativesOptionsWarning: C:\Users\user1\anaconda3\envs\wisdem-venv\lib\site-packages\openmdao\core\problem.py:1249
Problem test_all11: Checking partials with respect to variable 'beta_wave' in component 'comp' using the same method and options as are used to compute the component's derivatives will not provide any relevant information on the accuracy.
To correct this, change the options to do the
check_partials using either:
- arguments to Problem.check_partials.
- arguments to Component.set_check_partial_options
wisdem/test/test_commonse/test_wind_wave.py::TestDrag::test_wind_derivs
OMInvalidCheckDerivativesOptionsWarning: C:\Users\user1\anaconda3\envs\wisdem-venv\lib\site-packages\openmdao\core\problem.py:1249
Problem test_all12: Checking partials with respect to variable 'cd_usr' in component 'comp' using the same method and options as are used to compute the component's derivatives will not provide any relevant information on the accuracy.
To correct this, change the options to do the
check_partials using either:
- arguments to Problem.check_partials.
- arguments to Component.set_check_partial_options
wisdem/test/test_commonse/test_wind_wave.py::TestDrag::test_wind_derivs
OMInvalidCheckDerivativesOptionsWarning: C:\Users\user1\anaconda3\envs\wisdem-venv\lib\site-packages\openmdao\core\problem.py:1249
Problem test_all12: Checking partials with respect to variable 'rho_air' in component 'comp' using the same method and options as are used to compute the component's derivatives will not provide any relevant information on the accuracy.
To correct this, change the options to do the
check_partials using either:
- arguments to Problem.check_partials.
- arguments to Component.set_check_partial_options
wisdem/test/test_examples/test_examples.py: 113 warnings
wisdem/test/test_fixed_bottomse/test_jacket.py: 1 warning
wisdem/test/test_floatingse/test_floating.py: 1 warning
wisdem/test/test_gluecode/test_gc_yaml_floating.py: 2 warnings
wisdem/test/test_gluecode/test_gluecode.py: 4 warnings
RuntimeWarning: C:\Users\user1\anaconda3\envs\wisdem-venv\lib\site-packages\scipy\optimize\_minpack_py.py:177
The number of calls to function has reached maxfev = 50.
wisdem/test/test_examples/test_examples.py: 169 warnings
wisdem/test/test_gluecode/test_gluecode.py: 2 warnings
wisdem/test/test_landbosse/test_landbosse.py: 1 warning
wisdem/test/test_rotorse/test_BladeJointSizing.py: 1 warning
FutureWarning: c:\Users\user1\Desktop\WISDEM\wisdem\landbosse\model\FoundationCost.py:663
The behavior of DataFrame concatenation with empty or all-NA entries is deprecated. In a future version, this will no longer exclude empty or all-NA columns when determining the result dtypes. To retain the old behavior, exclude the relevant entries before the concat operation.
wisdem/test/test_examples/test_examples.py: 338 warnings
wisdem/test/test_gluecode/test_gluecode.py: 4 warnings
wisdem/test/test_landbosse/test_landbosse.py: 2 warnings
wisdem/test/test_rotorse/test_BladeJointSizing.py: 2 warnings
FutureWarning: c:\Users\user1\Desktop\WISDEM\wisdem\landbosse\model\SitePreparationCost.py:362
The behavior of DataFrame concatenation with empty or all-NA entries is deprecated. In a future version, this will no longer exclude empty or all-NA columns when determining the result dtypes. To retain the old behavior, exclude the relevant entries before the concat operation.
wisdem/test/test_examples/test_examples.py: 169 warnings
wisdem/test/test_gluecode/test_gluecode.py: 2 warnings
wisdem/test/test_landbosse/test_landbosse.py: 1 warning
wisdem/test/test_rotorse/test_BladeJointSizing.py: 1 warning
FutureWarning: c:\Users\user1\Desktop\WISDEM\wisdem\landbosse\model\SitePreparationCost.py:657
The behavior of DataFrame concatenation with empty or all-NA entries is deprecated. In a future version, this will no longer exclude empty or all-NA columns when determining the result dtypes. To retain the old behavior, exclude the relevant entries before the concat operation.
wisdem/test/test_examples/test_examples.py: 169 warnings
wisdem/test/test_gluecode/test_gluecode.py: 2 warnings
wisdem/test/test_landbosse/test_landbosse.py: 1 warning
wisdem/test/test_rotorse/test_BladeJointSizing.py: 1 warning
FutureWarning: c:\Users\user1\Desktop\WISDEM\wisdem\landbosse\model\CollectionCost.py:847
The behavior of DataFrame concatenation with empty or all-NA entries is deprecated. In a future version, this will no longer exclude empty or all-NA columns when determining the result dtypes. To retain the old behavior, exclude the relevant entries before the concat operation.
wisdem/test/test_examples/test_examples.py: 169 warnings
wisdem/test/test_gluecode/test_gluecode.py: 2 warnings
wisdem/test/test_landbosse/test_landbosse.py: 1 warning
wisdem/test/test_rotorse/test_BladeJointSizing.py: 1 warning
FutureWarning: c:\Users\user1\Desktop\WISDEM\wisdem\landbosse\model\DevelopmentCost.py:76
Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
wisdem/test/test_examples/test_examples.py: 169 warnings
wisdem/test/test_gluecode/test_gluecode.py: 2 warnings
wisdem/test/test_landbosse/test_landbosse.py: 1 warning
wisdem/test/test_rotorse/test_BladeJointSizing.py: 1 warning
FutureWarning: c:\Users\user1\Desktop\WISDEM\wisdem\landbosse\model\ErectionCost.py:695
The behavior of DataFrame concatenation with empty or all-NA entries is deprecated. In a future version, this will no longer exclude empty or all-NA columns when determining the result dtypes. To retain the old behavior, exclude the relevant entries before the concat operation.
wisdem/test/test_examples/test_examples.py: 169 warnings
wisdem/test/test_gluecode/test_gluecode.py: 2 warnings
wisdem/test/test_landbosse/test_landbosse.py: 1 warning
wisdem/test/test_rotorse/test_BladeJointSizing.py: 1 warning
FutureWarning: c:\Users\user1\Desktop\WISDEM\wisdem\landbosse\model\ErectionCost.py:1224
Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
wisdem/test/test_examples/test_examples.py: 169 warnings
wisdem/test/test_gluecode/test_gluecode.py: 2 warnings
wisdem/test/test_landbosse/test_landbosse.py: 1 warning
wisdem/test/test_rotorse/test_BladeJointSizing.py: 1 warning
FutureWarning: c:\Users\user1\Desktop\WISDEM\wisdem\landbosse\model\ErectionCost.py:256
Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
wisdem/test/test_examples/test_examples.py: 169 warnings
wisdem/test/test_gluecode/test_gluecode.py: 2 warnings
wisdem/test/test_landbosse/test_landbosse.py: 1 warning
wisdem/test/test_rotorse/test_BladeJointSizing.py: 1 warning
FutureWarning: c:\Users\user1\Desktop\WISDEM\wisdem\landbosse\model\ErectionCost.py:262
Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
wisdem/test/test_examples/test_examples.py: 169 warnings
wisdem/test/test_gluecode/test_gluecode.py: 2 warnings
wisdem/test/test_landbosse/test_landbosse.py: 1 warning
wisdem/test/test_rotorse/test_BladeJointSizing.py: 1 warning
FutureWarning: c:\Users\user1\Desktop\WISDEM\wisdem\landbosse\model\ErectionCost.py:266
Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
wisdem/test/test_examples/test_examples.py: 169 warnings
wisdem/test/test_gluecode/test_gluecode.py: 2 warnings
wisdem/test/test_landbosse/test_landbosse.py: 1 warning
wisdem/test/test_rotorse/test_BladeJointSizing.py: 1 warning
FutureWarning: c:\Users\user1\Desktop\WISDEM\wisdem\landbosse\model\ErectionCost.py:272
Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
wisdem/test/test_examples/test_examples.py: 169 warnings
wisdem/test/test_gluecode/test_gluecode.py: 2 warnings
wisdem/test/test_landbosse/test_landbosse.py: 1 warning
wisdem/test/test_rotorse/test_BladeJointSizing.py: 1 warning
FutureWarning: c:\Users\user1\Desktop\WISDEM\wisdem\landbosse\model\ErectionCost.py:276
Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
wisdem/test/test_examples/test_examples.py: 169 warnings
wisdem/test/test_gluecode/test_gluecode.py: 2 warnings
wisdem/test/test_landbosse/test_landbosse.py: 1 warning
wisdem/test/test_rotorse/test_BladeJointSizing.py: 1 warning
FutureWarning: c:\Users\user1\Desktop\WISDEM\wisdem\landbosse\model\ErectionCost.py:282
Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
wisdem/test/test_examples/test_examples.py: 169 warnings
wisdem/test/test_gluecode/test_gluecode.py: 2 warnings
wisdem/test/test_landbosse/test_landbosse.py: 1 warning
wisdem/test/test_rotorse/test_BladeJointSizing.py: 1 warning
FutureWarning: c:\Users\user1\Desktop\WISDEM\wisdem\landbosse\model\ManagementCost.py:370
Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead
wisdem/test/test_examples/test_examples.py::TestExamples::test_all_scripts
DerivativesWarning: C:\Users\user1\anaconda3\envs\wisdem-venv\lib\site-packages\openmdao\core\total_jac.py:1782
Constraints or objectives [('wt.rotorse.stall_check.no_stall_constraint', inds=[0, 1, 2, 3, 4, 5, 6])] cannot be impacted by the design variables of the problem.
wisdem/test/test_examples/test_examples.py::TestExamples::test_all_scripts
DriverWarning: C:\Users\user1\anaconda3\envs\wisdem-venv\lib\site-packages\openmdao\core\driver.py:470
The following design variable initial conditions are out of their specified bounds:
indeps.Area
val: [10.]
lower: 0.0
upper: 1.0
Set the initial value of the design variable to a valid value or set the driver option['invalid_desvar_behavior'] to 'ignore'.
wisdem/test/test_examples/test_examples.py::TestExamples::test_all_scripts
DerivativesWarning: C:\Users\user1\anaconda3\envs\wisdem-venv\lib\site-packages\openmdao\core\total_jac.py:1811
Design variables [('indeps.Area', inds=[0])] have no impact on the constraints or objective.
wisdem/test/test_examples/test_examples.py::TestExamples::test_all_scripts
wisdem/test/test_examples/test_examples.py::TestExamples::test_all_scripts
wisdem/test/test_examples/test_examples.py::TestExamples::test_all_scripts
wisdem/test/test_examples/test_examples.py::TestExamples::test_all_scripts
wisdem/test/test_examples/test_examples.py::TestExamples::test_all_scripts
MatplotlibDeprecationWarning: C:\Users\user1\anaconda3\envs\wisdem-venv\lib\site-packages\openmdao\visualization\opt_report\opt_report.py:717
Auto-close()ing of figures upon backend switching is deprecated since 3.8 and will be removed two minor releases later. To suppress this warning, explicitly call plt.close('all') first.
wisdem/test/test_examples/test_examples.py::TestExamples::test_all_scripts
MatplotlibDeprecationWarning: C:\Users\user1\anaconda3\envs\wisdem-venv\lib\site-packages\openmdao\visualization\opt_report\opt_report.py:503
Auto-close()ing of figures upon backend switching is deprecated since 3.8 and will be removed two minor releases later. To suppress this warning, explicitly call plt.close('all') first.
wisdem/test/test_examples/test_examples.py::TestExamples::test_all_scripts
RuntimeWarning: c:\Users\user1\Desktop\WISDEM\wisdem\fixed_bottomse\monopile.py:82
invalid value encountered in divide
wisdem/test/test_examples/test_examples.py::TestExamples::test_all_scripts
wisdem/test/test_fixed_bottomse/test_monopile.py::TestMonopileSE::testExampleRegression
RuntimeWarning: C:\Users\user1\anaconda3\envs\wisdem-venv\lib\site-packages\scipy\optimize\_minpack_py.py:177
The iteration is not making good progress, as measured by the
improvement from the last ten iterations.
wisdem/test/test_examples/test_examples.py::TestExamples::test_all_scripts
DerivativesWarning: C:\Users\user1\anaconda3\envs\wisdem-venv\lib\site-packages\openmdao\core\total_jac.py:1782
Constraints or objectives [('predis.suctionpile_depth', inds=[0])] cannot be impacted by the design variables of the problem.
wisdem/test/test_examples/test_examples.py::TestExamples::test_all_scripts
RuntimeWarning: C:\Users\user1\anaconda3\envs\wisdem-venv\lib\site-packages\scipy\optimize\_optimize.py:404
Values in x were outside bounds during a minimize step, clipping to bounds
wisdem/test/test_examples/test_examples.py::TestExamples::test_all_scripts
DerivativesWarning: C:\Users\user1\anaconda3\envs\wisdem-venv\lib\site-packages\openmdao\core\total_jac.py:1782
Constraints or objectives [('wt.fixedse.post_monopile_tower.constr_global_buckling', inds=[(0, 0), (0, 1), (1, 0), (1, 1), (2, 0), (2, 1)]), ('wt.fixedse.post_monopile_tower.constr_shell_buckling', inds=[(0, 0), (0, 1), (1, 0), (1, 1)]), ('wt.fixedse.predis.suctionpile_depth', inds=[0])] cannot be impacted by the design variables of the problem.
wisdem/test/test_examples/test_examples.py::TestExamples::test_all_scripts
wisdem/test/test_gluecode/test_drivers.py::TestRegression::test_GA
UserWarning: C:\Users\user1\anaconda3\envs\wisdem-venv\lib\site-packages\openmdao\recorders\sqlite_recorder.py:227
The existing case recorder file, outputs\log_opt.sql, is being overwritten.
wisdem/test/test_examples/test_examples.py::TestExamples::test_all_scripts
wisdem/test/test_examples/test_examples.py::TestExamples::test_all_scripts
wisdem/test/test_gluecode/test_drivers.py::TestRegression::test_GA
OpenMDAOWarning: C:\Users\user1\anaconda3\envs\wisdem-venv\lib\site-packages\openmdao\visualization\n2_viewer\n2_viewer.py:169
All-NaN slice encountered
wisdem/test/test_examples/test_examples.py::TestExamples::test_all_scripts
DerivativesWarning: C:\Users\user1\anaconda3\envs\wisdem-venv\lib\site-packages\openmdao\core\total_jac.py:1782
Constraints or objectives [('wt.floatingse.sys.mux.variable_ballast_mass', inds=[0]), ('wt.floatingse.cons.constr_fixed_margin', inds=[0, 1]), ('wt.floatingse.sys.mux.constr_variable_margin', inds=[0])] cannot be impacted by the design variables of the problem.
wisdem/test/test_examples/test_examples.py::TestExamples::test_all_scripts
DerivativesWarning: C:\Users\user1\anaconda3\envs\wisdem-venv\lib\site-packages\openmdao\core\total_jac.py:1782
Constraints or objectives [('wt.floatingse.cons.constr_fixed_margin', inds=[1])] cannot be impacted by the design variables of the problem.
wisdem/test/test_examples/test_examples.py::TestExamples::test_all_scripts
DriverWarning: C:\Users\user1\anaconda3\envs\wisdem-venv\lib\site-packages\openmdao\core\driver.py:470
The following design variable initial conditions are out of their specified bounds:
wt.wt_init.floating.joints.jointdv_0
val: [-120.]
lower: -40.0
upper: -15.0
wt.wt_init.floating.joints.jointdv_1
val: [10.]
lower: -40.0
upper: -15.0
Set the initial value of the design variable to a valid value or set the driver option['invalid_desvar_behavior'] to 'ignore'.
wisdem/test/test_examples/test_examples.py::TestExamples::test_all_scripts
RuntimeWarning: c:\Users\user1\Desktop\WISDEM\wisdem\floatingse\constraints.py:190
invalid value encountered in sqrt
wisdem/test/test_examples/test_examples.py::TestExamples::test_all_scripts
UserWarning: C:\Users\user1\anaconda3\envs\wisdem-venv\lib\site-packages\openmdao\recorders\sqlite_recorder.py:227
The existing case recorder file, 20MW_opt\log_opt.sql, is being overwritten.
wisdem/test/test_examples/test_examples.py::TestExamples::test_all_scripts
DerivativesWarning: C:\Users\user1\anaconda3\envs\wisdem-venv\lib\site-packages\openmdao\core\total_jac.py:1782
Constraints or objectives [('wt.rotorse.stall_check.no_stall_constraint', inds=[0, 1, 2, 3, 4, 5, 6]), ('wt.fixedse.post_monopile_tower.constr_global_buckling', inds=[(0, 0), (1, 0), (2, 0)]), ('wt.fixedse.post_monopile_tower.constr_shell_buckling', inds=[(0, 0), (1, 0)]), ('wt.fixedse.predis.suctionpile_depth', inds=[0])] cannot be impacted by the design variables of the problem.
wisdem/test/test_fixed_bottomse/test_jacket.py::Test::testAll
RuntimeWarning: c:\Users\user1\Desktop\WISDEM\wisdem\commonse\utilization_dnvgl.py:145
invalid value encountered in sqrt
wisdem/test/test_optimization_drivers/test_intermittent_component.py::TestIntermittentComponent::test_run
OptimizeWarning: C:\Users\user1\anaconda3\envs\wisdem-venv\lib\site-packages\openmdao\drivers\scipy_optimizer.py:462
Unknown solver options: tol
wisdem/test/test_optimization_drivers/test_nlopt_driver.py::TestNLoptDriver::test_compute_totals_basic_return_array
DerivativesWarning: C:\Users\user1\anaconda3\envs\wisdem-venv\lib\site-packages\openmdao\core\problem.py:1052
Inefficient choice of derivative mode. You chose 'fwd' for a problem with 2 design variables and 1 response variables (objectives and nonlinear constraints).
wisdem/test/test_orbit/phases/design/test_array_system_design.py::test_duplicate_turbine_coordinates
wisdem/test/test_orbit/phases/design/test_array_system_design.py::test_correct_turbines
UserWarning: c:\Users\user1\Desktop\WISDEM\wisdem\orbit\phases\design\array_system_design.py:800
Missing data in columns ['cable_length', 'bury_speed']; all values will be calculated.
wisdem/test/test_pyframe3dd/test_beam_theory.py::FrameTestEXA::test_mpfs
RuntimeWarning: c:\Users\user1\Desktop\WISDEM\wisdem\test\test_pyframe3dd\test_beam_theory.py:240
divide by zero encountered in divide
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
Thank you for passing these along. I am in the process of figuring out what is going on with the tests after changes to upstream libraries.
In general, we do not expect the tests to fully pass on Windows as the regression and precisions were tuned to Mac/Linux machines.
Hi, I created a new conda environment using the conda build instructions. Everything seems to have built okay. I then tried running the test_all.py script in python and I get the following failures in the test.
========================================================================= short test summary info ========================================================================== FAILED wisdem/test/test_fixed_bottomse/test_monopile.py::TestMonopileSE::testAddedMassForces - numpy.linalg.LinAlgError: 'monopile': Error calling compute(), SVD did not converge in Linear Least Squares
FAILED wisdem/test/test_gluecode/test_drivers.py::TestRegression::test_cobyla - sqlite3.OperationalError: table global_iterations already exists
FAILED wisdem/test/test_gluecode/test_drivers.py::TestRegression::test_ld_slsqp - sqlite3.OperationalError: table global_iterations already exists
FAILED wisdem/test/test_gluecode/test_drivers.py::TestRegression::test_nelder - sqlite3.OperationalError: table global_iterations already exists
FAILED wisdem/test/test_optimization_drivers/test_nlopt_driver.py::TestNLoptDriver::test_maxtime - ValueError: actual [6.66666667], desired [50.], rel error 0.8666666666666667, tolerance 1e-06
FAILED wisdem/test/test_pyframe3dd/test_breakdown.py::TestBreakdown::testModal - AssertionError:
================================================= 6 failed, 1322 passed, 6 skipped, 2764 warnings in 62389.45s (17:19:49) ==================================================
Python version 3.10.12
For reference I modified openmdao to 3.27 (as indicated in one other post on here) and numpy to 1.24 (as indicated on the environment.yml).
My question is, do these failed tests actually matter? Could this be due to the input yaml files used for the tests and not with the functions themselves?