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

Dev/2decomp gitsub #4

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

pbartholomew08
Copy link
Member

Adds 2decomp as a submodule

This tracks our (Xcompact3d) fork of the upstream (NAG) 2decomp&fft
- however we have clearly diverged somewhat from 2decomp&fft so
currently does not build
Add instructions to initialise and update the 2decomp&fft submodule.
@rfj82982
Copy link
Member

HI guys I need to check how to do the CMake with submodules. As i can see in the Make you just update the path where the source is. In CMake I have files to add under decomp2d. I don’t know how practical this will be.

@pbartholomew08
Copy link
Member Author

@rfj82982 is it not possible to just call Make within cmake?

In the new branch 2decomp is no longer built by x3div - it simply calls make on the 2decomp library which builds itself

@rfj82982
Copy link
Member

rfj82982 commented Jan 28, 2022

If you check the branch hack_doconcurrent in the CMakeLists line 192. I am downloading and building a library to find fftw. I think we can execure a make, but if we do the same I did with this there is no need for a submodule and we can download, build and link decomp2d only during build time. I have to test and see what is the best option.

@mathrack
Copy link
Collaborator

Right now, I suspect 2decomp in x3div/hack_doconcurrent differs from the 2decomp in xcompact3d, which probably also differs from nag/2decomp

@pbartholomew08
Copy link
Member Author

Whether it's a submodule or something else, we should move onto the "community" code - we get benefits from anyone else using it and vice-versa.

Xcompact3d's 2decomp definitely diverges, we have an opportunity here to correct that I think.

P.S. - what if I have a system FFTW (such as cray-fftw which should be optimised for the hardware) and don't want to download and build FFTW?

@pbartholomew08
Copy link
Member Author

For instance - one option would be to push cmake upstream into 2decomp&fft

@rfj82982
Copy link
Member

The package just look for the fft available in the system. If you have fftw from cray will just find it based on the module loaded and check all the bits of fftw available and five you the right bits that you can link to your build.
https://github.com/egpbos/findfftw
In this case it is just a link to a long CMake, but this feature of download a repo build and link to your exex is something that we should us.
I agree that x3... should decouple from decomp2d and this becoming a dependancy when you build, don’t know the best way to do this. I think i can simply add a make into the CMake build

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.

3 participants