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. |
|
@matt-pharr is this ready for review? Is the top comment summary still accurate and complete? |
|
@logan-nc Yes, this should be ready. The top comment summary is still accurate. |
|
I would also like to review this PR on our side. Maybe it is useful if @matt-pharr debriefs it to @gwanggeunseo or @satelite2517 so that we can take benefits right away in the cluster and macbook. |
|
@parkjk I'd be happy to. Is anyone available to meet this evening US time / tomorrow morning Korea time? |
|
Thanks. Yes there should be. We will come back to you soon. |
|
@matt-pharr Would 7 pm EST work for you? Thanks! |
|
Matt, please arrange your convenient time of your evening today and invite @satelite2517 and @gwanggeunseo. At least Sunjae will join and follow up. Thanks! |
|
Yes, that works great. To what email should I send a zoom invite? @satelite2517 |
|
I’ve just sent the Zoom link with your email(matthew.pharr@columbia.edu). Just let me know if it does not works. Thanks |
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: