Skip to content

WEIS for parallel computing on Windows #455

@fangjianju

Description

@fangjianju

Hello WEIS researchers,

I have recently been using WEIS for parallel computing with the command
mpiexec -np 20 python weis_driver.py.

I am working on a Windows system and have installed mpi4py. However, when I run
mpiexec -np 20 python iea22_ptfm_opt_driver.py, I encounter the following error.

However, based on the error message, I was prompted to install petsc4py. It appears that on a Windows system this library cannot be installed (or is not supported).

In this case, how should I modify my setup or configuration to proceed?

In addition, for a given case, if I only want to use parallel computing to run OpenFAST simulations in order to reduce the total simulation time, while keeping the optimization process itself sequential, how should I configure or implement this workflow?

error:
mpiexec -np 8 python iea22_ptfm_opt_driver.py
DeprecationWarning: C:\Users\fangj\Desktop\PINN_RAFT\WEIS-2.0\WEIS_2.0-env\Lib\site-packages\jsonmerge_init_.py:27
Accessing Draft4Validator.resolver is deprecated as of v4.18.0, in favor of the https://github.com/python-jsonschema/referencing library, which provides more compliant referencing behavior as well as more flexible APIs for customization.DeprecationWarning: C:\Users\fangj\Desktop\PINN_RAFT\WEIS-2.0\WEIS_2.0-env\Lib\site-packages\jsonmerge_init_.py:27
Accessing Draft4Validator.resolver is deprecated as of v4.18.0, in favor of the https://github.com/python-jsonschema/referencing library, which provides more compliant referencing behavior as well as more flexible APIs for customization.DeprecationWarning: C:\Users\fangj\Desktop\PINN_RAFT\WEIS-2.0\WEIS_2.0-env\Lib\site-packages\jsonmerge_init_.py:27
Accessing Draft4Validator.resolver is deprecated as of v4.18.0, in favor of the https://github.com/python-jsonschema/referencing library, which provides more compliant referencing behavior as well as more flexible APIs for customization.DeprecationWarning: C:\Users\fangj\Desktop\PINN_RAFT\WEIS-2.0\WEIS_2.0-env\Lib\site-packages\jsonmerge_init_.py:27
Accessing Draft4Validator.resolver is deprecated as of v4.18.0, in favor of the https://github.com/python-jsonschema/referencing library, which provides more compliant referencing behavior as well as more flexible APIs for customization.DeprecationWarning: C:\Users\fangj\Desktop\PINN_RAFT\WEIS-2.0\WEIS_2.0-env\Lib\site-packages\jsonmerge_init_.py:27
Accessing Draft4Validator.resolver is deprecated as of v4.18.0, in favor of the https://github.com/python-jsonschema/referencing library, which provides more compliant referencing behavior as well as more flexible APIs for customization.DeprecationWarning: C:\Users\fangj\Desktop\PINN_RAFT\WEIS-2.0\WEIS_2.0-env\Lib\site-packages\jsonmerge_init_.py:27
Accessing Draft4Validator.resolver is deprecated as of v4.18.0, in favor of the https://github.com/python-jsonschema/referencing library, which provides more compliant referencing behavior as well as more flexible APIs for customization.DeprecationWarning: C:\Users\fangj\Desktop\PINN_RAFT\WEIS-2.0\WEIS_2.0-env\Lib\site-packages\jsonmerge_init_.py:27
Accessing Draft4Validator.resolver is deprecated as of v4.18.0, in favor of the https://github.com/python-jsonschema/referencing library, which provides more compliant referencing behavior as well as more flexible APIs for customization.DeprecationWarning: C:\Users\fangj\Desktop\PINN_RAFT\WEIS-2.0\WEIS_2.0-env\Lib\site-packages\jsonmerge_init_.py:27
Accessing Draft4Validator.resolver is deprecated as of v4.18.0, in favor of the https://github.com/python-jsonschema/referencing library, which provides more compliant referencing behavior as well as more flexible APIs for customization.PendingDeprecationWarning: C:\Users\fangj\Desktop\PINN_RAFT\WEIS-2.0\weis\dtqpy\classes\DTQPy_CLASS_INTERNAL.py:10
Importing from numpy.matlib is deprecated since 1.19.0. The matrix subclass is not the recommended way to represent matrices or deal with linear algebra (see https://docs.scipy.org/doc/numpy/user/numpy-for-matlab-users.html). Please adjust your code to use regular ndarray. PendingDeprecationWarning: C:\Users\fangj\Desktop\PINN_RAFT\WEIS-2.0\weis\dtqpy\classes\DTQPy_CLASS_INTERNAL.py:10
Importing from numpy.matlib is deprecated since 1.19.0. The matrix subclass is not the recommended way to represent matrices or deal with linear algebra (see https://docs.scipy.org/doc/numpy/user/numpy-for-matlab-users.html). Please adjust your code to use regular ndarray. PendingDeprecationWarning: C:\Users\fangj\Desktop\PINN_RAFT\WEIS-2.0\weis\dtqpy\classes\DTQPy_CLASS_INTERNAL.py:10
Importing from numpy.matlib is deprecated since 1.19.0. The matrix subclass is not the recommended way to represent matrices or deal with linear algebra (see https://docs.scipy.org/doc/numpy/user/numpy-for-matlab-users.html). Please adjust your code to use regular ndarray. PendingDeprecationWarning: C:\Users\fangj\Desktop\PINN_RAFT\WEIS-2.0\weis\dtqpy\classes\DTQPy_CLASS_INTERNAL.py:10
Importing from numpy.matlib is deprecated since 1.19.0. The matrix subclass is not the recommended way to represent matrices or deal with linear algebra (see https://docs.scipy.org/doc/numpy/user/numpy-for-matlab-users.html). Please adjust your code to use regular ndarray. PendingDeprecationWarning: C:\Users\fangj\Desktop\PINN_RAFT\WEIS-2.0\weis\dtqpy\classes\DTQPy_CLASS_INTERNAL.py:10
Importing from numpy.matlib is deprecated since 1.19.0. The matrix subclass is not the recommended way to represent matrices or deal with linear algebra (see https://docs.scipy.org/doc/numpy/user/numpy-for-matlab-users.html). Please adjust your code to use regular ndarray. PendingDeprecationWarning: C:\Users\fangj\Desktop\PINN_RAFT\WEIS-2.0\weis\dtqpy\classes\DTQPy_CLASS_INTERNAL.py:10
Importing from numpy.matlib is deprecated since 1.19.0. The matrix subclass is not the recommended way to represent matrices or deal with linear algebra (see https://docs.scipy.org/doc/numpy/user/numpy-for-matlab-users.html). Please adjust your code to use regular ndarray. PendingDeprecationWarning: C:\Users\fangj\Desktop\PINN_RAFT\WEIS-2.0\weis\dtqpy\classes\DTQPy_CLASS_INTERNAL.py:10
Importing from numpy.matlib is deprecated since 1.19.0. The matrix subclass is not the recommended way to represent matrices or deal with linear algebra (see https://docs.scipy.org/doc/numpy/user/numpy-for-matlab-users.html). Please adjust your code to use regular ndarray. PendingDeprecationWarning: C:\Users\fangj\Desktop\PINN_RAFT\WEIS-2.0\weis\dtqpy\classes\DTQPy_CLASS_INTERNAL.py:10
Importing from numpy.matlib is deprecated since 1.19.0. The matrix subclass is not the recommended way to represent matrices or deal with linear algebra (see https://docs.scipy.org/doc/numpy/user/numpy-for-matlab-users.html). Please adjust your code to use regular ndarray. DeprecationWarning: C:\Users\fangj\Desktop\PINN_RAFT\WEIS-2.0\WEIS_2.0-env\Lib\site-packages\jsonmerge_init_.py:27
Accessing Draft4Validator.resolver is deprecated as of v4.18.0, in favor of the https://github.com/python-jsonschema/referencing library, which provides more compliant referencing behavior as well as more flexible APIs for customization.DeprecationWarning: C:\Users\fangj\Desktop\PINN_RAFT\WEIS-2.0\WEIS_2.0-env\Lib\site-packages\jsonmerge_init_.py:27
Accessing Draft4Validator.resolver is deprecated as of v4.18.0, in favor of the https://github.com/python-jsonschema/referencing library, which provides more compliant referencing behavior as well as more flexible APIs for customization.DeprecationWarning: C:\Users\fangj\Desktop\PINN_RAFT\WEIS-2.0\WEIS_2.0-env\Lib\site-packages\jsonmerge_init_.py:27
Accessing Draft4Validator.resolver is deprecated as of v4.18.0, in favor of the https://github.com/python-jsonschema/referencing library, which provides more compliant referencing behavior as well as more flexible APIs for customization.DeprecationWarning: C:\Users\fangj\Desktop\PINN_RAFT\WEIS-2.0\WEIS_2.0-env\Lib\site-packages\jsonmerge_init_.py:27
Accessing Draft4Validator.resolver is deprecated as of v4.18.0, in favor of the https://github.com/python-jsonschema/referencing library, which provides more compliant referencing behavior as well as more flexible APIs for customization.DeprecationWarning: C:\Users\fangj\Desktop\PINN_RAFT\WEIS-2.0\WEIS_2.0-env\Lib\site-packages\jsonmerge_init_.py:27
Accessing Draft4Validator.resolver is deprecated as of v4.18.0, in favor of the https://github.com/python-jsonschema/referencing library, which provides more compliant referencing behavior as well as more flexible APIs for customization.DeprecationWarning: C:\Users\fangj\Desktop\PINN_RAFT\WEIS-2.0\WEIS_2.0-env\Lib\site-packages\jsonmerge_init_.py:27
Accessing Draft4Validator.resolver is deprecated as of v4.18.0, in favor of the https://github.com/python-jsonschema/referencing library, which provides more compliant referencing behavior as well as more flexible APIs for customization.DeprecationWarning: C:\Users\fangj\Desktop\PINN_RAFT\WEIS-2.0\WEIS_2.0-env\Lib\site-packages\jsonmerge_init_.py:27
Accessing Draft4Validator.resolver is deprecated as of v4.18.0, in favor of the https://github.com/python-jsonschema/referencing library, which provides more compliant referencing behavior as well as more flexible APIs for customization.DeprecationWarning: C:\Users\fangj\Desktop\PINN_RAFT\WEIS-2.0\WEIS_2.0-env\Lib\site-packages\jsonmerge_init_.py:27
Accessing Draft4Validator.resolver is deprecated as of v4.18.0, in favor of the https://github.com/python-jsonschema/referencing library, which provides more compliant referencing behavior as well as more flexible APIs for customization.All MPI subranks closed.
All MPI subranks closed.
All MPI subranks closed.
All MPI subranks closed.
All MPI subranks closed.
All MPI subranks closed.
All MPI subranks closed.
The following changes should be made to the modeling options:
All MPI subranks closed.
Applying the modeling option updates as additional overrides.
Applying the modeling option updates as additional overrides.
Applying the modeling option updates as additional overrides.
Applying the modeling option updates as additional overrides.
Applying the modeling option updates as additional overrides.
Applying the modeling option updates as additional overrides.
Applying the modeling option updates as additional overrides.
Applying the modeling option updates as additional overrides.
All MPI subranks closed.
All MPI subranks closed.
All MPI subranks closed.
All MPI subranks closed.
All MPI subranks closed.
All MPI subranks closed.
Traceback (most recent call last):
File "C:\Users\fangj\Desktop\MDOPlatform\WEIS-main\examples\03_design_with_openfast\iea22_ptfm_opt_driver.py", line 14, in
wt_opt, modeling_options, opt_options = weis_main(fname_wt_input,
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\fangj\Desktop\PINN_RAFT\WEIS-2.0\weis\main.py", line 110, in weis_main
wt_opt, modeling_options, opt_options = run_weis(fname_wt_input,
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\fangj\Desktop\PINN_RAFT\WEIS-2.0\weis\glue_code\runWEIS.py", line 117, in run_weis
wt_opt.setup()
File "C:\Users\fangj\Desktop\PINN_RAFT\WEIS-2.0\WEIS_2.0-env\Lib\site-packages\openmdao\core\problem.py", line 1058, in setup
raise ValueError(f"{self.msginfo}: Attempting to run in parallel under MPI but "
ValueError: Problem iea22_ptfm_opt_driver2: Attempting to run in parallel under MPI but PETScVector could not be imported.
Traceback (most recent call last):
File "C:\Users\fangj\Desktop\MDOPlatform\WEIS-main\examples\03_design_with_openfast\iea22_ptfm_opt_driver.py", line 14, in
wt_opt, modeling_options, opt_options = weis_main(fname_wt_input,
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\fangj\Desktop\PINN_RAFT\WEIS-2.0\weis\main.py", line 110, in weis_main
wt_opt, modeling_options, opt_options = run_weis(fname_wt_input,
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\fangj\Desktop\PINN_RAFT\WEIS-2.0\weis\glue_code\runWEIS.py", line 117, in run_weis
wt_opt.setup()
File "C:\Users\fangj\Desktop\PINN_RAFT\WEIS-2.0\WEIS_2.0-env\Lib\site-packages\openmdao\core\problem.py", line 1058, in setup
raise ValueError(f"{self.msginfo}: Attempting to run in parallel under MPI but "
ValueError: Problem iea22_ptfm_opt_driver2: Attempting to run in parallel under MPI but PETScVector could not be imported.
Traceback (most recent call last):
File "C:\Users\fangj\Desktop\MDOPlatform\WEIS-main\examples\03_design_with_openfast\iea22_ptfm_opt_driver.py", line 14, in
wt_opt, modeling_options, opt_options = weis_main(fname_wt_input,
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\fangj\Desktop\PINN_RAFT\WEIS-2.0\weis\main.py", line 110, in weis_main
wt_opt, modeling_options, opt_options = run_weis(fname_wt_input,
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\fangj\Desktop\PINN_RAFT\WEIS-2.0\weis\glue_code\runWEIS.py", line 117, in run_weis
wt_opt.setup()
File "C:\Users\fangj\Desktop\PINN_RAFT\WEIS-2.0\WEIS_2.0-env\Lib\site-packages\openmdao\core\problem.py", line 1058, in setup
raise ValueError(f"{self.msginfo}: Attempting to run in parallel under MPI but "
ValueError: Problem iea22_ptfm_opt_driver2: Attempting to run in parallel under MPI but PETScVector could not be imported.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions