Skip to content

Commit bf0c949

Browse files
committed
Merge branch 'main' into double-precision
2 parents a3bf638 + 604b461 commit bf0c949

File tree

6 files changed

+18
-33
lines changed

6 files changed

+18
-33
lines changed

.github/workflows/CI.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ on: [push, pull_request]
55

66
jobs:
77
Build:
8-
runs-on: [ubuntu-latest]
8+
runs-on: [ubuntu-22.04]
99

1010
env:
1111
FC: gfortran
12-
GCC_V: 11
12+
GCC_V: 12
1313

1414
steps:
1515
- name: Checkout code

.github/workflows/deploy-docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on: [push, pull_request]
55

66
jobs:
77
Build:
8-
runs-on: ubuntu-latest
8+
runs-on: ubuntu-22.04
99

1010
steps:
1111
- name: Checkout code
@@ -14,7 +14,7 @@ jobs:
1414
- name: Install Dependencies Ubuntu
1515
run: |
1616
sudo apt-get update
17-
sudo apt install -y python-dev python build-essential graphviz
17+
sudo apt install -y python3-dev python3 build-essential graphviz gfortran-12
1818
sudo pip install ford
1919
2020
- name: Build Developer Documenation

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ Downloading, Building, and Running Examples
5757
2. The [Fortran Package Manager].
5858
3. _Optional_: [OpenCoarrays] for parallel execution with the GNU Fortran compiler.
5959

60-
Recent versions of the Cray, Intel, GNU, and NAG compilers suffice. Assert was developed primarily with `gfortran` 11.1.0 and `nagfor` 7.0 Build 7044.
60+
Assert was developed primarily with `gfortran` 11.2.0 and `nagfor` 7.1.
61+
Recent versions of the Cray and Intel compilers should also suffice.
6162

6263
### Downloading, building, and testing
6364

@@ -81,8 +82,12 @@ fpm test --compiler nagfor --flag -fpp
8182
#### Building and testing: multi-image (parallel) execution
8283
With `gfortran` and OpenCoarrays installed,
8384
```
84-
fpm test --compiler caf --runner "cafrun -n 2" designed-to-terminate-normally
85-
fpm test --compiler caf --runner "cafrun -n 2" designed-to-error-terminate
85+
fpm test --compiler caf --runner "cafrun -n 2"
86+
```
87+
To build and test with the Numerical Algorithms Group (NAG) Fortran compiler version
88+
7.1 or later, use
89+
```
90+
fpm test --compiler=nagfor --flag="-coarray=cosmp -fpp -f2018"
8691
```
8792

8893
For documentation on using Assert with other compilers, please submit an issue or pull request.

fpm.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ version = "1.0.0"
33
license = "BSD"
44
author = ["Damian Rouson"]
55
maintainer = "[email protected]"
6-
copyright = "2021 Sourcery Institute"
6+
copyright = "2021-2022 Sourcery Institute"

src/assert_s.F90 renamed to src/assert_s.f90

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,7 @@
5656

5757
end if toggle_assertions
5858

59-
#ifndef FORD
6059
contains
61-
#else
62-
end procedure
63-
#endif
6460

6561
pure function string(numeric) result(number_as_string)
6662
!! Result is a string represention of the numeric argument
@@ -86,8 +82,6 @@ pure function string(numeric) result(number_as_string)
8682

8783
end function string
8884

89-
#ifndef FORD
9085
end procedure
91-
#endif
9286

9387
end submodule

test/unit-tests/designed-to-error-terminate.f90

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -32,32 +32,18 @@ program designed_to_error_terminate
3232

3333
contains
3434

35-
pure function both(lhs,rhs) result(lhs_or_rhs)
36-
logical, intent(in) :: lhs,rhs
37-
logical lhs_or_rhs
35+
pure function and(lhs,rhs) result(lhs_and_rhs)
36+
logical, intent(in) :: lhs, rhs
37+
logical lhs_and_rhs
3838

39-
lhs_or_rhs = lhs .and. rhs
39+
lhs_and_rhs = lhs .and. rhs
4040

4141
end function
4242

4343
subroutine co_all(boolean)
4444
logical, intent(inout) :: boolean
4545

46-
#ifndef NAGFOR
47-
call co_reduce(boolean, both)
48-
#else
49-
! Because parallel NAG runs happen in shared memory and because this function is called only once in
50-
! one test, a simplistic, non-scalable reduction algorithm suffices until co_reduce is supported.
51-
block
52-
logical, save :: my_boolean[*]
53-
integer i
54-
55-
my_boolean = boolean
56-
do i=1,num_images()
57-
my_boolean = my_boolean .and. my_boolean[i]
58-
end do
59-
end block
60-
#endif
46+
call co_reduce(boolean, and)
6147

6248
end subroutine
6349

0 commit comments

Comments
 (0)