Skip to content

fix: allocate lam_tmp before passing to solve_dirac_eigenproblem#25

Merged
certik merged 1 commit into
atomic-solvers:mainfrom
Jatinagarwal24:patch-1
Apr 10, 2026
Merged

fix: allocate lam_tmp before passing to solve_dirac_eigenproblem#25
certik merged 1 commit into
atomic-solvers:mainfrom
Jatinagarwal24:patch-1

Conversation

@Jatinagarwal24
Copy link
Copy Markdown
Contributor

The crash was caused by passing an unallocated array (lam_tmp) to solve_dirac_eigenproblem in src/schroed_dirac_solver.f90 (around line 155).

LFortran correctly detects this and raises a runtime error: “argument is unallocated”.

This fix ensures lam_tmp is properly allocated before the call, preventing the runtime failure. The issue is in featom code and is not a bug in LFortran.

The crash was caused by passing an unallocated array (lam_tmp) to
solve_dirac_eigenproblem in src/schroed_dirac_solver.f90 (around line 155).

LFortran correctly detects this and raises a runtime error:
“argument is unallocated”.

This fix ensures lam_tmp is properly allocated before the call,
preventing the runtime failure. The issue is in featom code and is
not a bug in LFortran.
Copy link
Copy Markdown
Contributor

@certik certik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was a bug in featom. CC @HaoZeke

@certik certik merged commit 87872a3 into atomic-solvers:main Apr 10, 2026
4 checks passed
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.

2 participants