Open friedrixk opened 4 months ago
May be duplicate of / related to #1601, #1738 and #1776
The problem may be related to the dIct that is returned in graph.get_edges()
. I replaced
fn get_edges(inout self) raises -> Dict[Int, DynamicVector[Int]]:
return self.edges
with this:
fn get_edges(self) raises -> DynamicVector[DynamicVector[Int]]:
var es = DynamicVector[DynamicVector[Int]]()
for i in range(len(self.vertices)):
var v = self.vertices[i]
var neighbors = self.edges[v]
for j in range(len(neighbors)):
var u = neighbors[j]
var e = DynamicVector[Int]()
e.push_back(v)
e.push_back(u)
es.push_back(e)
return es
i.e., get_edges() returns a DynamicVector[DynamicVector[Int]] instead of the dict. Like this, there is no error whatsoever anymore. But I would like to return the dict of course.
Bug description
This may be related to Issues #1042, #1601, #1738, #1776 but the seemingly random occurrence is weird and there are no tensors involved in my code.
I am experiencing seemingly random
elf_dynamic_array_reader.h:64] tag not found
andscaling_cur_freq and scaling_max_freq, No such file or directory
-errors when executingmax_cut.mojo
since updating to Mojo v24.1.0:Steps to reproduce
You can reproduce the errors by executing
max_cut.mojo
This is
max_cut.mojo
:This is
graph.mojo
:Note:
There is at least four ways to get rid of the errors through commenting out code snippets in
max_cut.mojo
:var n = g.get_neighbors(1)
var es = g.get_edges()
Python.add_to_path("./ilp")
andvar ilp = Python.import_module("ilp")
test_graph_ds()
When solely commenting out line 17 (
var ilp = Python.import_module("ilp")
) theelf_dynamic_array_reader.h:64] tag not found
- errors disappear but thefile_io_posix
-errors remain:System information