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

vt-tv fails on vt-tv/config/conf.yaml #141

Open
lifflander opened this issue Feb 25, 2025 · 6 comments
Open

vt-tv fails on vt-tv/config/conf.yaml #141

lifflander opened this issue Feb 25, 2025 · 6 comments
Assignees

Comments

@lifflander
Copy link
Contributor

lifflander commented Feb 25, 2025

The basic provided configuration doesn't pass right now. We need testing to cover this.

Here is the patch to fix the first bug:

diff --git a/src/vt-tv/utility/json_reader.cc b/src/vt-tv/utility/json_reader.cc
index cd08434..4396420 100644
--- a/src/vt-tv/utility/json_reader.cc
+++ b/src/vt-tv/utility/json_reader.cc
@@ -134,7 +134,13 @@ std::unique_ptr<WorkDistribution> JSONReader::parsePhaseIter(
       assert(node.is_number() && "task node must be a number");

       if (etype == "object") {
-        auto object = task["entity"].value("id", task["entity"]["seq_id"]);
+        nlohmann::json object;
+        if (task["entity"].find("id") != task["entity"].end()) {
+          object = task["entity"]["id"];
+        } else {
+          object = task["entity"]["seq_id"];
+        }
         auto home = task["entity"]["home"];
         bool migratable = task["entity"]["migratable"];

The second bug I'm looking at now:

----- Creating object mesh for (phase,lb_iter) (0,<none>) -----
  Number of objects in phase: 76
Process 7045 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
    frame #0: 0x000000010005383c vt-tv_standalone`vtkPoints::SetNumberOfPoints(this=0x00006000004742d0, numPoints=76) at vtkPoints.h:264:36
   261
   262  inline void vtkPoints::SetNumberOfPoints(vtkIdType numPoints)
   263  {
-> 264    this->Data->SetNumberOfComponents(3);
   265    this->Data->SetNumberOfTuples(numPoints);
   266    this->Modified();
   267  }
Target 0: (vt-tv_standalone) stopped.
@lifflander
Copy link
Contributor Author

Maybe this is an issue with my vtk version? I'm running v9.3.1 and just rebuilt for Mac OS X Sequoia.

@pierrepebay
Copy link
Contributor

I just built and ran master on MacOS Sonoma, with VTK 9.3.1, and didn't encounter either issue; what compiler are you using?

@lifflander
Copy link
Contributor Author

I just built and ran master on MacOS Sonoma, with VTK 9.3.1, and didn't encounter either issue; what compiler are you using?

I'm using GNU 14.

@lifflander
Copy link
Contributor Author

Once I switch to AppleClang this problem goes away. Unsure what the issue is with GNU.

@pierrepebay
Copy link
Contributor

I'll try to replicate this and check what's going on. Should we add MacOS CI that uses GNU?

@pierrepebay
Copy link
Contributor

When building vt-tv with GNU 14 I do get a segfault, this looks like the second issue you were describing right?

$ build/apps/vt-tv_standalone --conf config/conf.yaml
Input configuration file=/Users/pierrepebay/Develop/NGA/DARMA-tasking/vt-tv/config/conf.yaml
vt-tv: Using 2 threads
Reading file for rank 2
Reading file for rank 0
INFO - json_datafile_validator.py:400 - Validating file: /Users/pierrepebay/Develop/NGA/DARMA-tasking/vt-tv/data/lb_test_data/data.2.json
INFO - json_datafile_validator.py:414 - Valid JSON schema in /Users/pierrepebay/Develop/NGA/DARMA-tasking/vt-tv/data/lb_test_data/data.2.json
Warning: Communication 0 -> 1: neither sender nor recipient was found in objects.
Reading file for rank 3
INFO - json_datafile_validator.py:400 - Validating file: /Users/pierrepebay/Develop/NGA/DARMA-tasking/vt-tv/data/lb_test_data/data.0.json
INFO - json_datafile_validator.py:414 - Valid JSON schema in /Users/pierrepebay/Develop/NGA/DARMA-tasking/vt-tv/data/lb_test_data/data.0.json
Warning: Communication 0 -> 5: neither sender nor recipient was found in objects.
Warning: Communication 0 -> 9: neither sender nor recipient was found in objects.
Object 1 sending communication to myself
Reading file for rank 1
INFO - json_datafile_validator.py:400 - Validating file: /Users/pierrepebay/Develop/NGA/DARMA-tasking/vt-tv/data/lb_test_data/data.3.json
INFO - json_datafile_validator.py:414 - Valid JSON schema in /Users/pierrepebay/Develop/NGA/DARMA-tasking/vt-tv/data/lb_test_data/data.3.json
Warning: Communication 0 -> 5: neither sender nor recipient was found in objects.
INFO - json_datafile_validator.py:400 - Validating file: /Users/pierrepebay/Develop/NGA/DARMA-tasking/vt-tv/data/lb_test_data/data.1.json
INFO - json_datafile_validator.py:414 - Valid JSON schema in /Users/pierrepebay/Develop/NGA/DARMA-tasking/vt-tv/data/lb_test_data/data.1.json
Warning: Communication 0 -> 1: neither sender nor recipient was found in objects.
Warning: Communication 0 -> 13: neither sender nor recipient was found in objects.
Num ranks=4

---- Normalizing Edges for phase 0 ----
Object 1 receiving communication from myself

---- Normalizing Edges for phase 1 ----

---- Normalizing Edges for phase 2 ----

---- Normalizing Edges for phase 3 ----

---- Normalizing Edges for phase 4 ----

---- Normalizing Edges for phase 5 ----

---- Normalizing Edges for phase 6 ----

---- Normalizing Edges for phase 7 ----
Size of all objects: 76
Rank load range: 0.0007696189995840541, 0.325914985000054
Object load range: 0, 0.0455910099999528
selected phase=18446744073709551615


----- Creating object mesh for (phase,lb_iter) (0,<none>) -----
  Number of objects in phase: 76
zsh: segmentation fault  build/apps/vt-tv_standalone --conf config/conf.yaml

VTK fails to build with GNU 14, so vt-tv is using an Apple clang-compiled VTK, which might be related.

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

No branches or pull requests

2 participants