Skip to content

Commit 96c921b

Browse files
Merge pull request #4 from Jim-215-Fisher/master
Merge
2 parents deb318a + 91c1ad4 commit 96c921b

27 files changed

+10169
-593
lines changed

.github/workflows/CI.yml

+62-4
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
fail-fast: false
2222
matrix:
2323
os: [ubuntu-latest, macos-latest]
24-
gcc_v: [7, 8, 9] # Version of GFortran we want to use.
24+
gcc_v: [7, 8, 9, 10] # Version of GFortran we want to use.
2525
env:
2626
FC: gfortran-${{ matrix.gcc_v }}
2727
GCC_V: ${{ matrix.gcc_v }}
@@ -54,7 +54,9 @@ jobs:
5454
5555
- name: Install GFortran macOS
5656
if: contains( matrix.os, 'macos')
57-
run: brew install gcc@${GCC_V} || brew upgrade gcc@${GCC_V} || true
57+
run: |
58+
brew install gcc@${GCC_V} || brew upgrade gcc@${GCC_V} || true
59+
brew link gcc@${GCC_V}
5860
5961
- name: Configure with CMake
6062
run: cmake -Wdev -DCMAKE_BUILD_TYPE=Release -DCMAKE_MAXIMUM_RANK=4 -S . -B build
@@ -71,15 +73,71 @@ jobs:
7173
working-directory: build
7274

7375
- name: Test in-tree builds
74-
if: contains( matrix.gcc_v, '9') # Only test one compiler on each platform
76+
if: contains( matrix.gcc_v, '10') # Only test one compiler on each platform
7577
run: |
7678
cmake -DCMAKE_MAXIMUM_RANK=4 .
7779
cmake --build .
7880
cmake --build . --target test
7981
8082
- name: Test manual makefiles
81-
if: contains(matrix.os, 'ubuntu') && contains(matrix.gcc_v, '9')
83+
if: contains(matrix.os, 'ubuntu') && contains(matrix.gcc_v, '10')
8284
run: |
8385
make -f Makefile.manual FYPPFLAGS="-DMAXRANK=4"
8486
make -f Makefile.manual test
8587
make -f Makefile.manual clean
88+
89+
intel-build:
90+
runs-on: ${{ matrix.os }}
91+
strategy:
92+
fail-fast: false
93+
matrix:
94+
os: [ubuntu-20.04]
95+
fc: [ifort]
96+
env:
97+
FC: ${{ matrix.fc }}
98+
99+
steps:
100+
- name: Checkout code
101+
uses: actions/checkout@v1
102+
103+
- name: Set up Python 3.x
104+
uses: actions/setup-python@v1
105+
with:
106+
python-version: 3.x
107+
108+
- name: Install CMake Linux
109+
if: contains(matrix.os, 'ubuntu')
110+
run: ci/install_cmake.sh
111+
112+
- name: Add Intel repository
113+
if: contains(matrix.os, 'ubuntu')
114+
run: |
115+
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
116+
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
117+
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
118+
echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
119+
sudo apt-get update
120+
121+
- name: Install Intel oneAPI compiler
122+
if: contains(matrix.os, 'ubuntu')
123+
run: |
124+
sudo apt-get install intel-oneapi-compiler-fortran
125+
source /opt/intel/oneapi/setvars.sh
126+
printenv >> $GITHUB_ENV
127+
128+
- name: Install fypp
129+
run: pip install --upgrade fypp
130+
131+
- name: Configure with CMake
132+
run: cmake -Wdev -DCMAKE_BUILD_TYPE=Release -DCMAKE_MAXIMUM_RANK=4 -S . -B build
133+
134+
- name: Build and compile
135+
run: cmake --build build
136+
137+
- name: catch build fail
138+
run: cmake --build build --verbose --parallel 1
139+
if: failure()
140+
141+
- name: test
142+
run: ctest --parallel --output-on-failure
143+
working-directory: build

.github/workflows/ci_windows.yml

+79
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,82 @@ jobs:
4141
with:
4242
name: WindowsCMakeTestlog
4343
path: build/Testing/Temporary/LastTest.log
44+
45+
msys2-build:
46+
runs-on: windows-latest
47+
strategy:
48+
fail-fast: false
49+
matrix:
50+
include: [
51+
{ msystem: MSYS, arch: x86_64 },
52+
{ msystem: MINGW64, arch: x86_64 },
53+
{ msystem: MINGW32, arch: i686 }
54+
]
55+
defaults:
56+
run:
57+
shell: msys2 {0}
58+
steps:
59+
- uses: actions/checkout@v2
60+
61+
- name: Setup MinGW native environment
62+
uses: msys2/setup-msys2@v2
63+
if: contains(matrix.msystem, 'MINGW')
64+
with:
65+
msystem: ${{ matrix.msystem }}
66+
update: false
67+
install: >-
68+
git
69+
mingw-w64-${{ matrix.arch }}-gcc
70+
mingw-w64-${{ matrix.arch }}-gcc-fortran
71+
mingw-w64-${{ matrix.arch }}-python
72+
mingw-w64-${{ matrix.arch }}-python-pip
73+
mingw-w64-${{ matrix.arch }}-cmake
74+
mingw-w64-${{ matrix.arch }}-ninja
75+
76+
- name: Setup msys POSIX environment
77+
uses: msys2/setup-msys2@v2
78+
if: contains(matrix.msystem, 'MSYS')
79+
with:
80+
msystem: MSYS
81+
update: false
82+
install: >-
83+
git
84+
gcc
85+
gcc-fortran
86+
python
87+
python-pip
88+
cmake
89+
ninja
90+
91+
- name: Install fypp
92+
run: pip install fypp
93+
94+
- run: >-
95+
cmake -G Ninja
96+
-DCMAKE_SH="CMAKE_SH-NOTFOUND"
97+
-Wdev
98+
-B build
99+
-DCMAKE_BUILD_TYPE=Debug
100+
-DCMAKE_Fortran_FLAGS_DEBUG="-Wall -Wextra -Wimplicit-interface -fPIC -g -fcheck=all -fbacktrace"
101+
-DCMAKE_MAXIMUM_RANK=4
102+
env:
103+
FC: gfortran
104+
CC: gcc
105+
CXX: g++
106+
107+
- name: CMake build
108+
run: cmake --build build --parallel
109+
110+
- name: catch build fail
111+
run: cmake --build build --verbose --parallel 1
112+
if: failure()
113+
114+
- name: CTest
115+
run: ctest --output-on-failure --parallel -V -LE quadruple_precision
116+
working-directory: build
117+
118+
- uses: actions/upload-artifact@v1
119+
if: failure()
120+
with:
121+
name: WindowsCMakeTestlog
122+
path: build/Testing/Temporary/LastTest.log

.github/workflows/doc-deployment.yml

+8-3
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,29 @@ env:
2020
jobs:
2121
Build-API-Docs:
2222
runs-on: macos-latest
23+
env:
24+
GCC_V: 10
2325
steps:
2426
- uses: actions/checkout@v2
2527
with:
2628
fetch-depth: 0 # Full history to get tag and commit info
2729
- name: Install GFortran macOS
28-
run: brew install gcc || brew upgrade gcc || true
30+
run: |
31+
brew install gcc@${GCC_V} || brew upgrade gcc@${GCC_V} || true
32+
brew link gcc@${GCC_V}
33+
gfortran-${GCC_V} --version
2934
- name: Install Dependencies
3035
run: |
3136
pip3 install --prefer-binary --no-clean --disable-pip-version-check --progress-bar off lxml fypp
3237
brew install -f --force-bottle --keep-tmp ford
3338
type -a ford
3439
ford --version
35-
gfortran --version
40+
gfortran-${GCC_V} --version
3641
- name: Skip graph and search unless deploying
3742
if: github.ref != 'refs/heads/master' && ! startsWith( github.ref, 'refs/tags/' )
3843
run: |
3944
sed -i .bak 's/^[[:blank:]]*graph: *[Tt]rue/graph: false/' "${FORD_FILE}"
40-
echo "::set-env name=MAYBE_SKIP_SEARCH::--no-search"
45+
echo "MAYBE_SKIP_SEARCH=--no-search" >> $GITHUB_ENV
4146
- name: Build Docs
4247
run: |
4348
git fetch --all --tags

CMakeLists.txt

+4-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ if(CMAKE_Fortran_COMPILER_ID STREQUAL GNU)
2222
endif()
2323
elseif(CMAKE_Fortran_COMPILER_ID STREQUAL Intel)
2424
add_compile_options(-warn declarations,general,usage,interfaces,unused)
25-
add_compile_options(-standard-semantics)
25+
if(NOT CMAKE_Fortran_COMPILER_VERSION VERSION_EQUAL 20.2.1.20200827)
26+
add_compile_options(-standard-semantics)
27+
endif()
2628
if(CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 18.0)
2729
add_compile_options(-stand f15)
2830
else()
@@ -35,7 +37,7 @@ endif()
3537
# --- compiler feature checks
3638
include(CheckFortranSourceCompiles)
3739
include(CheckFortranSourceRuns)
38-
check_fortran_source_compiles("error stop i; end" f18errorstop SRC_EXT f90)
40+
check_fortran_source_runs("i=0; error stop i; end" f18errorstop SRC_EXT f90)
3941
check_fortran_source_compiles("real, allocatable :: array(:, :, :, :, :, :, :, :, :, :); end" f03rank SRC_EXT f90)
4042
check_fortran_source_runs("use, intrinsic :: iso_fortran_env, only : real128; real(real128) :: x; x = x+1; end" f03real128)
4143

README.md

+19
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,25 @@ Alternatively, you can build using provided Makefiles:
6666
make -f Makefile.manual
6767
```
6868

69+
## Limiting the maximum rank of generated procedures
70+
71+
Stdlib's preprocessor (fypp) by default generates specific procedures for arrays of all ranks, up to rank 15.
72+
This can result in long compilation times and, on some computers, exceeding available memory.
73+
If you know that you won't need all 15 ranks, you can specify the maximum rank for which the specific procedures will be generated.
74+
For example, with CMake:
75+
76+
```sh
77+
cmake -B build -DCMAKE_MAXIMUM_RANK=4
78+
cmake --build build
79+
cmake --build build --target test
80+
```
81+
or as follows with `make`:
82+
83+
```sh
84+
make -f Makefile.manual FYPPFLAGS=-DMAXRANK=4
85+
```
86+
Note that currently the minimum value for maximum rank is 4.
87+
6988
## Documentation
7089

7190
Documentation is a work in progress (see issue #4) but is currently available at https://stdlib.fortran-lang.org.

doc/specs/index.md

+2
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@ This is and index/directory of the specifications (specs) for each new module/fe
1111

1212
## Experimental Features & Modules
1313

14+
- [bitsets](./stdlib_bitsets.html) - Bitset data types and procedures
1415
- [error](./stdlib_error.html) - Catching and handling errors
1516
- [IO](./stdlib_io.html) - Input/output helper & convenience
1617
- [linalg](./stdlib_linalg.html) - Linear Algebra
18+
- [logger](./stdlib_logger.html) - Runtime logging system
1719
- [optval](./stdlib_optval.html) - Fallback value for optional arguments
1820
- [quadrature](./stdlib_quadrature.html) - Numerical integration
1921
- [stats](./stdlib_stats.html) - Descriptive Statistics

0 commit comments

Comments
 (0)