Skip to content

enable build and run on FreeBSD#11

Open
tenomoto wants to merge 8 commits intosamhatfield:masterfrom
tenomoto:master
Open

enable build and run on FreeBSD#11
tenomoto wants to merge 8 commits intosamhatfield:masterfrom
tenomoto:master

Conversation

@tenomoto
Copy link
Copy Markdown

@tenomoto tenomoto commented Oct 1, 2022

I made small changes to make the shell scripts run on FreeBSD and hopefully other BSD flaours.

  • build.sh and run.sh do not use bash features. Replace /bin/bash with /bin/sh.
  • MAKE is commonly used for make binary. Replace it with MAKEFILE.
  • source/gfortran.makefile uses GNU extension of Make. Detect BSD and prepend g and set to MAKE.

@tenomoto
Copy link
Copy Markdown
Author

tenomoto commented Oct 2, 2022

I was able to hide a number of warning by setting -fmax-stack-var-size=524280. This is merely an ad hoc solution. It is better to allocate arrays in heap with allocate().

@tenomoto
Copy link
Copy Markdown
Author

tenomoto commented Oct 3, 2022

It turned out that setting -fmax-stack-var-size or -frecursive cause a runtime problem on macOS.

@samhatfield
Copy link
Copy Markdown
Owner

Hi Enomoto-san, thanks for your interest in speedy.f90. I welcome any and all suggestions for improvements. I have tried your branch on a Linux system and it builds and runs as expected.

I note your point on floating-point literals (#12). Indeed there are many implicit Float32 literals in the code which will be implicitly casted to Float64 when that is the working precision. For now though I would prefer not to implicitly convert untyped variables and literals to Float64 with -fdefault-real-8. In my opinion it's better to unambiguously specify the type when the variable is defined/literal is used, rather than rely on compiler behaviour. Could you revert that commit, and I can at some point go through the code and add _p to all literals?

@samhatfield
Copy link
Copy Markdown
Owner

Otherwise it looks like you've also implemented restart functionality (42b8171) which is great! Could you extract that commit and put it in a separate PR?

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