-
Notifications
You must be signed in to change notification settings - Fork 47
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 and unify Makefile build system #219
Conversation
@reguly any comment on this ? |
I never really used the source files committed to these repos, they were always hardcoded to your setup :) so I am fine without having those committed in as @bozbez suggests |
@reguly actually I was more considering whether its useful to a user to see one of these source files. Of course the hard coded setup in the profiles also has the same issue. |
I don't think that is particularly relevant, as all the environment variables a properly documented. |
@reguly ok. great. Lets leave it at that. I am happy with this. |
30382a6
to
d2d6d41
Compare
@bozbez Thanks, your most recent push fixed the build issue and Hydra is subsequently running the basic Rotor 37 problem correctly. Continuing testing with the coupler now. |
So the reason the I think its also worth noting the difference between hardcoding paths to shared resources on known clusters and hardcoding paths into a user folder which others can't access. The intention of the profiles, and the reason they are there instead of source files, is that they allow the user to set make variables after the "configuration" of the compilers and the libraries. This allows you to easily override or the append to e.g. Source files still have a place, but rather than using them for cluster common setup like |
a0da4d1
to
043b44c
Compare
d950e7a
to
0cf9f36
Compare
I have tested OP2-Hydra and OP2-Hydra with the coupler with this new OP2 branch. All tests passes. We should get Arun to switch to this version, when we are ready to merge this pull request. |
So unfortunately I haven't been able to actually get an OpenMP 4.0 offloading build to offload - on Cirrus with the NVHPC SDK compilers the binaries fail to find the GPU, and on my new work machine with GCC built for offloading the same happens but perhaps this time it might be that the GCC offloading doesn't support Ampere. The offload compilers are being invoked however, and the PTX is generated, but no luck at runtime. Since the builds complete and compiler flags seem fine and are equivalent to the old build system I am going to mark this task as complete despite not being able to actually run the binaries. In general I think this is pretty much ready to merge now, there are perhaps a few things that might need tweaking over time (and perhaps for Spack) but that should not pose a significant problem given the level of flexibility in the unified system. |
Which software stack did you use on Cirrus? The 21.2 had problems with not fining the GPU, but the latest works. Also, I just got an email from Cirrus support earlier today, that 21.2 should be fixed too.
… On 2021. Dec 1., at 13:04, Joe Kaushal ***@***.***> wrote:
So unfortunately I haven't been able to actually get an OpenMP 4.0 offloading build to offload - on Cirrus with the NVHPC SDK compilers the binaries fail to find the GPU, and on my new work machine with GCC built for offloading the same happens but perhaps this time it might be that the GCC offloading doesn't support Ampere. The offload compilers are being invoked however, and the PTX is generated, but no luck at runtime.
Since the builds complete and compiler flags seem fine and are equivalent to the old build system I am going to mark this task as complete despite not being able to actually run the binaries.
In general I think this is pretty much ready to merge now, there are perhaps a few things that might need tweaking over time (and perhaps for Spack) but that should not pose a significant problem given the level of flexibility in the unified system.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#219 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAJWVVP6CBCKL22RDNAQHG3UOYFNNANCNFSM5IAA5ZAQ>.
Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
I was using the default loaded by |
@bozbez looks good. @reguly and @bozbez we should now move the current master to a release/2020 branch and merge this branch to master. Assuming this naming convention is ok. This PR is working with Hydra as I noted above, but I will need to push some minor modifications to Hydra which I can do soon. Additionally, I was thinking of making a default develop branch (as we do in OPS). Did we have an agreement on if this is ok ? I would rather like to keep both OP2 and OPS similar as possible. |
Thanks for setting this up! I agree with the separate branch for development!
… On 2021. Dec 1., at 14:15, Gihan R. Mudalige ***@***.***> wrote:
@gihanmudalige approved this pull request.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#219 (review)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAJWVVMPXYBS5IIZ4WDJTLTUOYNYFANCNFSM5IAA5ZAQ>.
Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
I have created the release/2020 branch and pushed it in. I also created a v1.0 tag at the same commit.
… On 2021. Dec 1., at 14:26, István Reguly ***@***.***> wrote:
Thanks for setting this up! I agree with the separate branch for development!
> On 2021. Dec 1., at 14:15, Gihan R. Mudalige ***@***.*** ***@***.***>> wrote:
>
>
> @gihanmudalige approved this pull request.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub <#219 (review)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAJWVVMPXYBS5IIZ4WDJTLTUOYNYFANCNFSM5IAA5ZAQ>.
> Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
>
|
Personally I don't think we gain anything from having a develop branch and a master branch; the feature development is already done in separate feature branches and the stable versions are now in release branches. I agree that we should try and align with OPS though, so there's that. |
@reguly thanks for creating the relevant branches. So we are going with the convention of v1.0 etc. (no problem). I suppose this PR and also the completion of the other tasks will soon get us to v2.0 ? Particularly the new code gen should take us to 2.0 I think. W.R.T develop branch, I think it will help external developers PR on to the develop branch and then us being able to test it and merge to develop. This way we are sure that the master branch is always working and we periodically merge in develop branch as major features are added. So in affect we have a leading edge branch and a "stable" branch. |
What we are not used to doing (but we probably should!) is doing releases, which would also help address this master/develop branch difference (well, it would obviate it)
… On 2021. Dec 1., at 15:14, Gihan R. Mudalige ***@***.***> wrote:
@reguly thanks for creating the relevant branches. So we are going with the convention of v1.0 etc. (no problem). I suppose this PR and also the completion of the other tasks will soon get us to v2.0 ? Particularly the new code gen should take us to 2.0 I think.
W.R.T develop branch, I think it will help external developers PR on to the develop branch and then us being able to test it and merge to develop. This way we are sure that the master branch is always working and we periodically merge in develop branch as major features are added. So in affect we have a leading edge branch and a "stable" branch.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
|
Changes
op2/c
andop2/fortran
source folders, withop2/fortran
moving toop2/include/fortran
andop2/src/fortran
.apps/
, with a newmake generate
rule to build.New build system
The old build system was entirely removed and a new one with the following structure implemented:
makefiles/common.mk
- This sets variables common to both the OP2 and app builds, such as the OP2 include and library directories as well as the compilers and flags (by includingmakefiles/compilers/*
) and the include/link flags of the dependencies.makefiles/compilers/{c, c_cuda, fortran}/*.mk
- These are Makefiles follow a common structure and define the compiler executables, flags, and features for each compiler. The selection of these is controlled byOP2_COMPILER
and/orOP2_{C, C_CUDA, FORTRAN}_COMPILER
makefiles/profiles/*.mk
- These follow a custom structure that splits the Makefiles into a "pre" and "post" section, where the "pre" section is included at the start ofcommon.mk
and the "post" section at the end. The intention here is to allow for machine specific configuration of compilers, libraries and flags without needing to change the generic compiler makefiles. Variables set in the "pre" section override the defaults set bycommon.mk
and the compiler makefiles, while variables set in the "post" section can append to them.makefiles/{c, f}_app.mk
- These are generic makefiles that define rules to build all of the possible app variants (e.g.[mpi_]{seq, genseq, openmp, openmp4, cuda}
), and are included by each of the makefiles in the app directories with a selection of input variables such asAPP_NAME
andVARIANT_FILTER
.op2/Makefile
- This defines the build for the OP2 libraries inop2/lib
(by default). Object lists for each of the static libraries are first defined, and then the object builds are handled by pattern rules.apps/*/Makefile
- These simply defineAPP_NAME
and sometimesVARIANT_FILTER[_OUT]
and then includecommon.mk
and{f, c}_app.mk
.As well as reducing duplication and inconsistency, the new system also allows for parallel builds of the OP2 libraries as well as the apps. In addition, incremental builds with automatically generated header dependencies (via
-MMD -MP
) now work.Building
The process is kept as similar as possible to the previous system, but with more configurability. For a simple build:
export OP2_COMPILER={gnu, cray, intel, ...}
export {PARMETIS, PTSCOTCH, HDF5}_INSTALL_PATH=<path>
cd op2; make -j
.cd apps/c/airfoil_hdf5; make generate; make -j
.TODO
nvfortran
.#include
s in headers that occasionally break incremental compilation._openmp4
app builds with an offloading-enabled compiler.