Skip to content

[bug] Permission Error 13 when using quickbb-2 or quickbb-10 to find path #57

@zrq1706

Description

@zrq1706

This is my code"

import cotengra as ctg

inputs = ["abc", "def", "eab", "had"]
size = 10**4
path = ctg.array_contract_path(
    inputs, shapes=[(size,) * 3] * 4, optimize="quickbb-10", cache=False
)

print(f"Inputs: {inputs}")
print(f"Path: {path}")

The error appear when writing temp file, more detailed
File "C:\Users$USER\miniconda3\envs\U-stats\Lib\site-packages\cotengra\pathfinders\path_quickbb.py", line 88, in build_tree
self.lg.to_cnf_file(file.name)
File "C:\Users$USER\miniconda3\envs\U-stats\Lib\site-packages\cotengra\hypergraph.py", line 870, in to_cnf_file
with open(fname, "w") as f:
PermissionError: [Errno 13] Permission denied: 'C:\Users\dho13\temp\tmpof0kiq8p.cnf'

Addition:
There also a bug when constructing line graph but is easty to fix by myself
it is in init method of LineGraph class
self.nodes =... require elements of Inputs is are set but they are always tuple or list

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions