Skip to content

Use ICOPY and IOTA to avoid stack overflow for larger models - #58

Merged
kmokstad merged 3 commits into
openfedem:mainfrom
kmokstad:main
Aug 21, 2026
Merged

Use ICOPY and IOTA to avoid stack overflow for larger models#58
kmokstad merged 3 commits into
openfedem:mainfrom
kmokstad:main

Conversation

@kmokstad

Copy link
Copy Markdown

On Windows in particular the M = (/ (i,i=1,n) /) assignment easily gives stack overflow when n is large. Therefore replacing with call to new Fortran-77 subroutine IOTA, which works much like xCOPY of BLAS with loop unrolling for efficiency. Also removing internal function find_loc which now is an intrinsic function (since gcc 9).

@kmokstad
kmokstad merged commit 72f9bfb into openfedem:main Aug 21, 2026
1 check 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.

1 participant