-
Notifications
You must be signed in to change notification settings - Fork 1
Make improvements #230
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
base: develop
Are you sure you want to change the base?
Make improvements #230
Conversation
…d dependencies, enables parallel building with `make -j (# threads)`
…s on github actions
|
I've talked through this with @matt-pharr and am happy with the changes. The speedup is a clear benefit, a number of the automations should help clarity. The additional elements we agreed to include are
For the last one, please indicate in a comment here whether this PR should wait for that or not |
|
@matt-pharr, I pulled, cleaned and attempted a make. Here are some observations:
|
|
Interestingly, I compiled without |
|
I also got a number of, which led me to find that the |
…oid re-compiling unnecessarily
|
@logan-nc I have successfully added netcdf and openblas as git submodules. The xdraw libs do indeed need better logic... I also added an option to clone and install netcdf/openblas to an external directory, which should make setting up gpec on a new cluster/machine quick and easy. You can test this by doing I am flushing out the documentation by adding summaries at the top of each makefile .inc, and will add some bullets to the documentation webpage. After that, this should be ready for a merge. |
@matt-pharr I am still waiting for your "all done" on this one since it still says "draft". It would be good to not let it hang too long |
|
@logan-nc noted. I am experimenting with one other option that would lessen the speed improvements but would improve the output clarity and keep the original makefile structure, let's discuss next Monday once I have had some free time to fiddle with it. |
|
I also believe it should be relatively straightforward to tackle #208 in this PR. |
Improvements made to the make workflow. All makefile infrastructure now consolidated in GPEC/install. The new make system is set up to:
make -j (number of threads)On my machine, it compiles the entire project with FFLAGS=-O0 and
make -j 8in under 3 seconds, not including harvest download time. With -O3, it takes ~12 seconds. This is a significant speed up from the single-threaded build system before.The new build system is broken down into several .inc files to keep it bite-sized with all of the makefiles in one place -- we have DEFAULTS.inc, which remains unchanged. There is RULES.inc which sets the compiler flags for each sub-module. There is SOURCES.inc (which should seldom ever need to be edited), which gets lists of all the fortran/c sources in each sub-module directory. There is TARGETS.inc which contains the actual build targets. Finally, there is dependencies.inc, where there is an entry for every source file that lists the dependencies of that file (i.e. what needs to be completely compiled before it).
Here is an example old makefile, the one for gpec, broken down into where each of these parts live now: