-
Notifications
You must be signed in to change notification settings - Fork 12
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
Add CMake functionality #12
Open
zbeekman
wants to merge
48
commits into
sfilippone:development
Choose a base branch
from
zbeekman:add-cmake-scripts
base: development
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Also remove psb_sxdot.f90 from CMakeLists.txt to be consistent with the file removal in the previous commit.
CMakeLists.txt files have been created for krylov/ prec/ util/ Skipping cbind/ for now and skipping serial build for now.
- Use canonical -DBUILD_SHARED_LIBS=TRUE (CMake)
- I think there is some special stuff that needs to happen to get the others working
- Delete trainling white space - Use native line endings (hopefully)
(cherry picked from commit e695cab)
- Try adding headers back to fakempi.c
- -DLittleEndian was being defined before pulling in windows.h causing compiler errors
- PSBLAS is setting LowerUnderscore on windows without this
The conflicts in |
@sfilippone I think it's just as much work to merge into |
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi Salvatore and Fabio,
Here is a pull request to upstream the CMake build system that I/we added. The initial cut at this was somewhat sloppy, but the end product is not so bad.
There are some things that can stand to be updated/changed, but it has worked for us on Linux and macOS with GCC/GFortran 8, Windows with MSVC C compiler and Intel Fortran 2018 compiler, and Linux with Intel 18 for Fortran & C.
There were some concerns about the license of ParMetis which is NOT free to use, and is not a normal, OSI approved license, so the build system finds and links with Metis, NOT ParMetis. To get Metis to build on windows and all platforms, I wrote a CMake build system for that as well:
https://github.com/nrc-fuels/metis
One focus/requirement of the project was to be able to make binaries as redistributable as possible, so I think things are setup to statically link by default.
Another issue we encountered was that GFortran was generating ABI incompatible code when using
-fcoarray=lib
to build and link code against OpenCoarrays. While PSBLAS does not use OpenCoarrays (as far as I know) we other parts of the project were using it, so we had to add a flag to allow all the libraries to be ABI compatible by building everything with-fcoarray=lib
and linking to OpenCoarrays. This is an option in the CMake build, and should be OFF by default, if my memory is correct.There are some utility functions and modules in the top level
cmake
directory.IMO, most of the introspection stuff surrounding name mangling and other issues should be obviated (become unnecessary) through the use of
ISO_C_BINDING
. CMake provides some intrinsic support for name mangling introspection but it wasn't 100% compatible with the way PSBLAS was doing things, from what I recall.