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

Runtime error when evaluating the averaging by body workflow on a gRPC server #773

Open
3 tasks done
FedericoNegri opened this issue Dec 4, 2024 · 0 comments
Open
3 tasks done
Assignees
Labels
bug Something isn't working

Comments

@FedericoNegri
Copy link
Contributor

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

--

@FedericoNegri FedericoNegri added the bug Something isn't working label Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants