Skip to content

Gen2024 removing int8 casts#4

Merged
brittonsmith merged 3 commits into
brittonsmith:gen2024from
mabruzzo:gen2024-removing-int8-casts
Oct 22, 2024
Merged

Gen2024 removing int8 casts#4
brittonsmith merged 3 commits into
brittonsmith:gen2024from
mabruzzo:gen2024-removing-int8-casts

Conversation

@mabruzzo

Copy link
Copy Markdown

This is VERY simple PR that replaces the gfortran-extension routine, int8(arg), with the equivalent standard routine int(arg,8). This was creating problems for some of the scripts that I had written to help transcribe from fortran

Inside of lookup_cool_rates1d_g, I was able to eliminate a number of casts. Previously, we repeatedly cast 2 local variables d_N and d_Size. Now we just declare the local d_N and d_Size variables to have the correct type.

I locally tested and confirmed that all tests pass after these changes.

Maybe we should make the gen2024 branch a branch on the grackle repository so that we can properly run CI on PRs?

Note

The test_models.py suite of tests seem flaky. Usually they pass, but a handful of them fail (usually, they'll pass after I relaunch them). This is an issue I observed in the gen2024 branch even without these changes. Thus, I'm extremely confident that these changes NOT are causing that issue. (I suspect we are allocating memory somewhere and not properly initializing it -- hopefully this becomes more apparent as we go along)

…tes1d_g from integer (presumably it defaults to integer*4) to integer*8.

- This removed the need for every int8 cast during calls to
  interpolate_2D_g (within lookup_cool_rates1d_g)
- these 2 are local variables
@brittonsmith brittonsmith merged commit 6c7564a into brittonsmith:gen2024 Oct 22, 2024
@mabruzzo mabruzzo deleted the gen2024-removing-int8-casts branch October 22, 2024 12:18
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