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

Simplify f95 compile flags? #85

Open
wehimwich opened this issue Jan 8, 2021 · 1 comment
Open

Simplify f95 compile flags? #85

wehimwich opened this issue Jan 8, 2021 · 1 comment

Comments

@wehimwich
Copy link
Member

Currently in include.mk we have:

FFLAGS  += -ff2c -I$(ROOT)/include -fno-range-check -finit-local-zero -fno-automatic -fbackslash

Perhaps the -finit-local-zero and/or the -fno-automatic flags can be removed.

Both of these flags emulate behavior from fort77. Without extensive testing, it may be hard to know if removing them is safe.
These two flags are not used by drudg and its libraries.

The -fno-automatic flag may not be needed now since save has been added to all the subroutines in clib/novas.f. That change helps support FSL8 where that flag does not seem to work. It is not clear if that has implications for the rest of the FS on FSL8 yet. If there is an issue, another option is to continue to use fort77 on FSL8

OTOH, does using these two flags cause any potential problems?

@dehorsley
Copy link
Member

I think I needed to add these to get something to work correctly, but I can't recall what exactly. It might have been drudg now that I think of it, but I think John has since removed the need for them.

You could probably track down places where it might be an issue by compiling without the flags and using Valgrind to look for access to uninitialised memory.

Then again, I don't imagine we're losing very much by including them (perhaps a couple of cycles to zero out some memory but that might even be optimised out)

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

No branches or pull requests

2 participants