Description
Before submitting the issue
- I have checked for Compatibility issues
- I have searched among the existing issues
- I am using a Python virtual environment
Description of the bug
When evaluating the new averaging by body workflow on a non-global gRPC server I get this error
ansys.dpf.gate.errors.DPFServerException: grpc::remote_workflow_expose_pin:6<-error code 4:DPF error - runtime error: dpf core function call; a 'data processing core error' error occurred: remote_operator_instantiate:56<-grpc::remote_operator_instantiate:57<-error code 4:DPF error - runtime error: dpf core function call; a 'service is currently unavailable' error occurred: failed to connect to all addresses
The error originates from _create_split_scope_by_body_workflow
. From the logs, it looks a second server is being started, probably because the existing one is not passed around correctly.
Steps To Reproduce
It's enough to run this script against an RST file containing stress results.
from ansys.dpf import post
from ansys.dpf import core as dpf
from ansys.dpf.core.server_types import GrpcServer
from ansys.dpf.post.result_workflows._component_helper import (
ResultCategory,
)
from ansys.dpf.post.result_workflows._utils import AveragingConfig
rst_path = r"/path/to/your/rst/here"
print("Starting server")
server: GrpcServer = dpf.start_local_server(
context=dpf.AvailableServerContexts.premium,
config=dpf.AvailableServerConfigs.GrpcServer,
as_global=False,
)
print(f"Server started at {server.address}")
print(f"Creating simulation object for {rst_path}")
simulation = post.StaticMechanicalSimulation(rst_path, server)
print(simulation)
print(f"Query results by body")
fields_container = simulation._get_result(
base_name="S",
location="Nodal",
category=ResultCategory.equivalent,
components=None,
norm=False,
selection=None,
node_ids=None,
element_ids=None,
skin=True,
averaging_config=AveragingConfig(
body_defining_properties=["mat"],
average_per_body=True
),
)._fc
print(fields_container)
fields_container[0].plot()
Which Operating System are you using?
Windows
Which DPF/Ansys version are you using?
DPF Server 2025.1.pre0
Which Python version are you using?
3.10
Installed packages
--