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

error not forwarded as a exception #1406

Open
cyrush opened this issue Oct 22, 2024 · 4 comments
Open

error not forwarded as a exception #1406

cyrush opened this issue Oct 22, 2024 · 4 comments
Assignees

Comments

@cyrush
Copy link
Member

cyrush commented Oct 22, 2024

The following actions are malformed:

- 
  action: "add_pipelines"
  pipelines: 
    pl1: 
      f1:
- 
  action: "add_scenes"
  scenes: 
    s1: 
      plots: 
        p1: 
          type: "pseudocolor"
          field: "pl"
          pipeline: "pl1"
- 
  action: "save_info"

However the error will not trigger an exception when we try to forward:

Node opts;
opts["exceptions"]="forward";
ascent.open(opts)

This will:

Sounds like we need to check for empy pipeline

- 
  action: "add_pipelines"
  pipelines: 
    pl1: 
      f1:
         type: "garbage"
- 
  action: "add_scenes"
  scenes: 
    s1: 
      plots: 
        p1: 
          type: "pseudocolor"
          field: "pl"
          pipeline: "pl1"
- 
  action: "save_info"

@cyrush
Copy link
Member Author

cyrush commented Oct 22, 2024

@emily-howell -- this is the issue I mentioned in our last meeting.

@emily-howell
Copy link
Member

@cyrush Great. I will take a look at this!

@emily-howell
Copy link
Member

@cyrush I think I am miss-understanding the bug here.

If I run this:

    Ascent ascent;
    Node ascent_opts;
    ascent_opts["exceptions"] = "forward";
    ascent.open(ascent_opts);

    conduit::Node pipelines;
    pipelines["pl1/f1/type"] = "garbage";
    pipelines.remove("pl1/f1/type");

    conduit::Node scenes;
    scenes["s1/plots/p1/type"]  = "pseudocolor";
    scenes["s1/plots/p1/field"] = "pl";
    scenes["s1/plots/p1/pipeline"] = "pl1";

    conduit::Node actions;
    // add the pipeline
    conduit::Node &add_pipelines= actions.append();
    add_pipelines["action"] = "add_pipelines";
    add_pipelines["pipelines"] = pipelines;
    // add the scenes
    conduit::Node &add_scenes= actions.append();
    add_scenes["action"] = "add_scenes";
    add_scenes["scenes"] = scenes;
    // save info
    conduit::Node &save_info= actions.append();
    save_info["action"] = "save_info";

    std::cout << actions.to_yaml() << std::endl;

    ascent.execute(actions);
    ascent.close();

I get this out when I print out the actions:

  - 
    action: "add_pipelines"
    pipelines: 
      pl1: 
        f1: 
  
  - 
    action: "add_scenes"
    scenes: 
      s1: 
        plots: 
          p1: 
            type: "pseudocolor"
            field: "pl"
            pipeline: "pl1"
  - 
    action: "save_info"

which looks to me like it matches the malformed actions you posted above.

I get the following failure when I run that code:

unknown file: Failure
C++ exception with description "
file: /path/to/ascent/src/libs/ascent/runtimes/ascent_main_runtime.cpp
line: 882
message: 
Filter must declare a 'type'
" thrown in the test body.

@cyrush
Copy link
Member Author

cyrush commented Oct 23, 2024

Let try this one:

(w/o a filter specified)

- 
  action: "add_pipelines"
  pipelines: 
    pl1: 
- 
  action: "add_scenes"
  scenes: 
    s1: 
      plots: 
        p1: 
          type: "pseudocolor"
          field: "pl"
          pipeline: "pl1"
- 
  action: "save_info"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants