-
Notifications
You must be signed in to change notification settings - Fork 1
Working Library Build and Installation #6
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
Open
AlexBuccheri
wants to merge
31
commits into
master
Choose a base branch
from
fix_proposed_structure
base: master
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
Changes from 7 commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
23d2af4
Move towards working compilation
f9ddde4
Ignore IntelliJ project and cmake-build directories
423ed5d
correct .f90 -> .F90
5e5f7dd
Removed compiler warnings - no way to avoid them, and added preproces…
AlexBuccheri bfd9e94
Deal with compiler warnings in release mode
AlexBuccheri f6fbf45
return prior to evaluating - minimises overhead
AlexBuccheri 2f3dbf3
Preprocessor settings (missing from last 2 commits)
AlexBuccheri 54585d8
Fully fleshed out CMake
AlexBuccheri 8135e4c
Changed DEBUG back to USE_ASSERT
AlexBuccheri 346df90
Started writing first test - note issues with initialising the MPI en…
AlexBuccheri ae8da13
Add unit tests once library compilation is tested
AlexBuccheri 992d778
Fixed bug in choice of library name
AlexBuccheri d488e97
Add getter
AlexBuccheri eaa7f17
Fixed bugs
AlexBuccheri 4c22536
Project description
AlexBuccheri 181e558
More project description
AlexBuccheri 7452b24
Update
AlexBuccheri 3dc4d20
init-finalise and corresponding tests (note, the tests require more s…
AlexBuccheri 78acdb0
Changed strategy for testing. program is not finding the subroutine i…
AlexBuccheri 623d728
Test builds and runs a dummy assert, however it is not correctly set …
AlexBuccheri 4c11c37
Refactored to use setup, teardown and autogenerate test drivers for o…
AlexBuccheri d7c5f80
Cleaned up init test
AlexBuccheri 29a0052
Started making init and finalise work for both f08 and f90 mpi bindin…
AlexBuccheri 172a5df
Added important TODO that indicates how to clean things up
AlexBuccheri 6139c9d
Really fleshed out wrapped get_comm and duplicate_comm routines. Beha…
AlexBuccheri 568ac25
Complete overhaul of routines to use setters and getters, and to hide…
AlexBuccheri dc655ba
Cleaned up docs. Not tested build
AlexBuccheri 6af5ffb
Remove non-existent file from src/CMakeLists.txt
a7d1cba
Add CMake arguments to README for testing (Zofu) and documentation
a2b6b51
Added files missing from version control
AlexBuccheri 44142a8
Merge branch 'fix_proposed_structure' of https://github.com/AlexBucch…
AlexBuccheri File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,6 @@ | ||
| # Mac custom attributes file | ||
| .DS_Store | ||
| .DS_Store | ||
|
|
||
| # IntelliJ | ||
| .idea/ | ||
| cmake-build-*/ |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| # Set pre-processing variables for shared and static libs | ||
|
|
||
| if(CMAKE_BUILD_TYPE MATCHES Debug) | ||
| # Preprocessor variable "DEBUG" in the code | ||
| set_property(TARGET ${TARGET} APPEND PROPERTY | ||
| COMPILE_DEFINITIONS "DEBUG") | ||
|
|
||
| set_property(TARGET ${TARGET}-static APPEND PROPERTY | ||
| COMPILE_DEFINITIONS "DEBUG") | ||
| endif() | ||
|
|
||
| # Provides an option for the user to select as ON or OFF. | ||
| #If <variable> is already set as a normal or cache variable, then the command does nothing | ||
| option(MPI08 "Use mpi_f08 bindings" ON) | ||
|
|
||
| if(MPI08) | ||
| # Preprocessor variable "MPI08" in the code | ||
| set_property(TARGET ${TARGET} APPEND PROPERTY | ||
| COMPILE_DEFINITIONS "MPI08") | ||
|
|
||
| set_property(TARGET ${TARGET}-static APPEND PROPERTY | ||
| COMPILE_DEFINITIONS "MPI08") | ||
| endif() | ||
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,6 +17,7 @@ module asserts | |
|
|
||
| contains | ||
|
|
||
| #ifdef DEBUG | ||
| !> Terminate following a failed assertion | ||
| !> | ||
| !> @todo Note, this kills ALL mpi processes. One may not want to do this | ||
|
|
@@ -29,6 +30,7 @@ subroutine terminate() | |
| call MPI_ABORT(MPI_COMM_WORLD, error_code_logical, ierr) | ||
| !stop error_code_logical | ||
| end subroutine terminate | ||
| #endif | ||
|
|
||
| !> Assert if a logical condition is true | ||
| !> | ||
|
|
@@ -38,16 +40,25 @@ end subroutine terminate | |
| subroutine assert_true(logical_condition, message) | ||
| !> Condition to test | ||
| logical, intent(in) :: logical_condition | ||
| #ifdef DEBUG | ||
|
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Probs change back to USE_ASSRT |
||
| !> Optional message for termination | ||
| character(len=*), intent(in), optional :: message | ||
| #ifdef USE_ASSERT | ||
| if (.not. logical_condition) then | ||
| if (present(message)) then | ||
| write (error_unit, '(/,1x,a)') trim(adjustl(message)) | ||
| endif | ||
| call terminate() | ||
| end if | ||
| #else | ||
| !> Optional message for termination | ||
| character(len=*), intent(inout), optional :: message | ||
| ! Return prior to evaluating anything | ||
| return | ||
| ! Peform a 'nothing' operation after return so Wunused-dummy-argument doesn't | ||
| ! complain in release mode. Fortran needs C++17's [[maybe_unused]] attribute. | ||
| message = merge(message, message, logical_condition) | ||
| #endif | ||
|
|
||
| end subroutine assert_true | ||
|
|
||
| end module asserts | ||
This file contains hidden or 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probs change back to USE_ASSERT. More descriptive