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

[f2dace/dev, fortran] Necessary changes for solve_nh graph. #1969

Draft
wants to merge 3 commits into
base: f2dace/dev
Choose a base branch
from

Conversation

pratyai
Copy link
Collaborator

@pratyai pratyai commented Mar 10, 2025

No description provided.

@pratyai pratyai force-pushed the solve_nh branch 9 times, most recently from 0333e34 to 0f2fd68 Compare March 14, 2025 17:40
pratyai added 3 commits March 18, 2025 09:59
diff --git c/dace/frontend/fortran/ast_transforms.py i/dace/frontend/fortran/ast_transforms.py
index f50d1fe44..7bdaf013f 100644
--- c/dace/frontend/fortran/ast_transforms.py
+++ i/dace/frontend/fortran/ast_transforms.py
@@ -1180,7 +1180,7 @@ class ScopeVarsDeclarations(NodeVisitor):
             return self.module_declarations[variable_name]
         else:
             raise RuntimeError(
-                f"Couldn't find the declaration of variable {variable_name} in function {self._scope_name(scope)}!")
+                f"Couldn't find the declaration of variable {variable_name} in function {self._scope_name(scope) if scope else scope}!")

     def contains_var(self, scope: ast_internal_classes.FNode, variable_name: str) -> bool:
         return (self._scope_name(scope), variable_name) in self.scope_vars
@@ -1199,7 +1199,7 @@ class ScopeVarsDeclarations(NodeVisitor):

     def _scope_name(self, scope: ast_internal_classes.FNode) -> str:
         if isinstance(scope, ast_internal_classes.Main_Program_Node):
-            return scope.name.name.name
+            return scope.name.name
         elif isinstance(scope, str):
             return scope
         else:
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

Successfully merging this pull request may close these issues.

1 participant