Skip to content

Commit 1724a4f

Browse files
committed
Merge branch 'master' into hashmap_int32_key
2 parents 35ed826 + 19f84ce commit 1724a4f

File tree

113 files changed

+563084
-374
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+563084
-374
lines changed

.github/workflows/CI.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ jobs:
169169
cxx: [icpc]
170170
env:
171171
MACOS_HPCKIT_URL: >-
172-
https://registrationcenter-download.intel.com/akdlm/irc_nas/18242/m_HPCKit_p_2021.4.0.3389_offline.dmg
172+
https://registrationcenter-download.intel.com/akdlm/IRC_NAS/a99cb1c5-5af6-4824-9811-ae172d24e594/m_HPCKit_p_2023.1.0.44543.dmg
173173
MACOS_FORTRAN_COMPONENTS: all
174174
FC: ${{ matrix.fc }}
175175
CC: ${{ matrix.cc }}

.github/workflows/doc-deployment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222

2323
- name: Install dependencies
2424
run: |
25-
pip install -v ford==6.1.10
25+
pip install -v ford==7.0.5
2626
pip install fypp
2727
python --version
2828
ford --version

.github/workflows/fpm-deployment.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ jobs:
3131
--slave /usr/bin/gcov gcov /usr/bin/gcov-${{ env.GCC_V }}
3232
3333
- name: Install fpm latest release
34-
uses: fortran-lang/setup-fpm@v3
34+
uses: fortran-lang/setup-fpm@v5
3535
with:
36-
fpm-version: 'v0.4.0'
36+
fpm-version: 'v0.10.0'
3737

3838
- name: Run fpm test ⚙
3939
run: |

API-doc-FORD-file.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ exclude_dir: src/tests
88
output_dir: API-doc
99
page_dir: doc
1010
media_dir: doc/media
11+
exclude: src/stdlib_linalg_lapack.fypp
12+
src/stdlib_linalg_lapack_aux.fypp
13+
src/stdlib_linalg_lapack_c.fypp
14+
src/stdlib_linalg_lapack_d.fypp
15+
src/stdlib_linalg_lapack_q.fypp
16+
src/stdlib_linalg_lapack_s.fypp
17+
src/stdlib_linalg_lapack_w.fypp
18+
src/stdlib_linalg_lapack_z.fypp
1119
fpp_extensions: fypp
1220
preprocess: true
1321
macro: MAXRANK=3
@@ -36,7 +44,7 @@ favicon: doc/media/favicon.ico
3644
license: by-sa
3745
author: fortran-lang/stdlib contributors
3846
author_pic: https://fortran-lang.org/assets/img/fortran_logo_512x512.png
39-
author_email: fortran-lang@groups.io
47+
email: fortran-lang@groups.io
4048
github: https://github.com/fortran-lang
4149
twitter: https://twitter.com/fortranlang
4250
website: https://fortran-lang.org

CHANGELOG.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,38 @@
1+
# Version 0.5.0
2+
3+
Full release notes available at [v0.5.0] tag.
4+
5+
[v0.5.0]: https://github.com/fortran-lang/stdlib/releases/tag/v0.5.0
6+
7+
- new module `stdlib_linalg_state`
8+
[#774](https://github.com/fortran-lang/stdlib/pull/774)
9+
- new derived type: `linalg_state_type`
10+
- new procedure: `linalg_error_handling`
11+
12+
Changes to existing scripts and modules
13+
- addition of `implicit none` to all example programs
14+
[#780](https://github.com/fortran-lang/stdlib/pull/780)
15+
- change in module `stdlib_hashmaps`
16+
- fix the procedure `remove_chaining_entry`
17+
[#788](https://github.com/fortran-lang/stdlib/pull/788)
18+
- change in module `stdlib_linalg`
19+
- addition of the BLAS/LAPACK backends and interfaces
20+
[#772](https://github.com/fortran-lang/stdlib/pull/772)
21+
- change in module `stdlib_str2num`
22+
- fix the procedure `to_${k1}$_from_stream`
23+
[#789](https://github.com/fortran-lang/stdlib/pull/789)
24+
- upgrade of the Intel-classic compiler in macOS CI
25+
[#777](https://github.com/fortran-lang/stdlib/pull/777)
26+
27+
Changes to existing documentation
28+
- Improvement of the documentation
29+
[#784](https://github.com/fortran-lang/stdlib/pull/784)
30+
[#781](https://github.com/fortran-lang/stdlib/pull/781)
31+
[#786](https://github.com/fortran-lang/stdlib/pull/786)
32+
- Improvement of the support of `fpm`
33+
[#787](https://github.com/fortran-lang/stdlib/pull/787)
34+
[#790](https://github.com/fortran-lang/stdlib/pull/790)
35+
136
# Version 0.4.0
237

338
Full release notes available at [v0.4.0] tag.

README.md

Lines changed: 64 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ GCC Fortran | 10, 11, 12, 13 | macOS 12.6.3 (21G419) | x86_64
9292
GCC Fortran (MSYS) | 13 | Windows Server 2022 (10.0.20348 Build 1547) | x86_64
9393
GCC Fortran (MinGW) | 13 | Windows Server 2022 (10.0.20348 Build 1547) | x86_64, i686
9494
Intel oneAPI LLVM | 2024.0 | Ubuntu 22.04.2 LTS | x86_64
95-
Intel oneAPI classic | 2021.1 | macOS 12.6.3 (21G419) | x86_64
95+
Intel oneAPI classic | 2023.1 | macOS 12.6.3 (21G419) | x86_64
9696

9797
The following combinations are known to work, but they are not tested in the CI:
9898

@@ -201,6 +201,30 @@ fpm run --example prog
201201
with `prog` being the name of the example program (e.g., `example_sort`).
202202

203203

204+
## Using stdlib in your project
205+
206+
### Using stdlib with CMake
207+
208+
The stdlib project exports CMake package files and pkg-config files to make stdlib usable for other projects.
209+
The package files are located in the library directory in the installation prefix.
210+
211+
For CMake builds of stdlib you can find a local installation with
212+
213+
```cmake
214+
find_package(fortran_stdlib REQUIRED)
215+
...
216+
target_link_libraries(
217+
${PROJECT_NAME}
218+
PRIVATE
219+
fortran_stdlib::fortran_stdlib
220+
)
221+
```
222+
223+
To make the installed stdlib project discoverable add the stdlib directory to the ``CMAKE_PREFIX_PATH``.
224+
The usual install location of the package files is ``$PREFIX/lib/cmake/fortran_stdlib``.
225+
226+
### Using stdlib with fpm
227+
204228
To use `stdlib` within your `fpm` project, add the following lines to your `fpm.toml` file:
205229
```toml
206230
[dependencies]
@@ -215,25 +239,51 @@ stdlib = { git="https://github.com/fortran-lang/stdlib", branch="stdlib-fpm" }
215239
>
216240
> [see also](https://fpm.fortran-lang.org/spec/metapackages.html)
217241
218-
## Using stdlib in your project
242+
### Using stdlib with a regular Makefile
219243

220-
The stdlib project exports CMake package files and pkg-config files to make stdlib usable for other projects.
221-
The package files are located in the library directory in the installation prefix.
244+
After the library has been built, it can be included in a regular Makefile.
245+
The recommended way to do this is using the [pkg-config](https://www.freedesktop.org/wiki/Software/pkg-config/) tool, for which an example is shown below.
246+
```make
247+
# Necessary if the installation directory is not in PKG_CONFIG_PATH
248+
install_dir := path/to/install_dir
249+
export PKG_CONFIG_PATH := $(install_dir)/lib/pkgconfig:$(PKG_CONFIG_PATH)
222250

223-
For CMake builds of stdlib you can find a local installation with
251+
STDLIB_CFLAGS := `pkg-config --cflags fortran_stdlib`
252+
STDLIB_LIBS := `pkg-config --libs fortran_stdlib`
224253

225-
```cmake
226-
find_package(fortran_stdlib REQUIRED)
254+
# Example definition of Fortran compiler and flags
255+
FC := gfortran
256+
FFLAGS := -O2 -Wall -g
257+
258+
# Definition of targets etc.
227259
...
228-
target_link_libraries(
229-
${PROJECT_NAME}
230-
PRIVATE
231-
fortran_stdlib::fortran_stdlib
232-
)
260+
261+
# Example rule to compile object files from .f90 files
262+
%.o: %.f90
263+
$(FC) -c -o $@ $< $(FFLAGS) $(STDLIB_CFLAGS)
264+
265+
# Example rule to link an executable from object files
266+
%: %.o
267+
$(FC) -o $@ $^ $(FFLAGS) $(STDLIB_LIBS)
268+
233269
```
234270

235-
To make the installed stdlib project discoverable add the stdlib directory to the ``CMAKE_PREFIX_PATH``.
236-
The usual install location of the package files is ``$PREFIX/lib/cmake/fortran_stdlib``.
271+
The same can also be achieved without pkg-config.
272+
If the library has been installed in a directory inside the compiler's search path,
273+
only a flag `-lfortran_stdlib` is required.
274+
If the installation directory is not in the compiler's search path, one can add for example
275+
```make
276+
install_dir := path/to/install_dir
277+
libdir := $(install_dir)/lib
278+
moduledir := $(install_dir)/include/fortran_stdlib/<compiler name and version>
279+
```
280+
The linker should then look for libraries in `libdir` (using e.g.`-L$(libdir)`) and the compiler should look for module files in `moduledir` (using e.g. `-I$(moduledir)`).
281+
Alternatively, the library can also be included from a build directory without installation with
282+
```make
283+
build_dir := path/to/build_dir
284+
libdir := $(build_dir)/src
285+
moduledir := $(build_dir)/src/mod_files
286+
```
237287

238288
## Documentation
239289

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.4.0
1+
0.5.0

ci/fpm-deployment.sh

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,27 @@ prune=(
3535
"$destdir/src/f18estop.f90"
3636
)
3737

38+
# Files that need preprocessed Fortran extension -> .F90
39+
preprocessed=(
40+
"$destdir/src/stdlib_linalg_constants"
41+
"$destdir/src/stdlib_linalg_blas"
42+
"$destdir/src/stdlib_linalg_blas_aux"
43+
"$destdir/src/stdlib_linalg_blas_s"
44+
"$destdir/src/stdlib_linalg_blas_d"
45+
"$destdir/src/stdlib_linalg_blas_q"
46+
"$destdir/src/stdlib_linalg_blas_c"
47+
"$destdir/src/stdlib_linalg_blas_z"
48+
"$destdir/src/stdlib_linalg_blas_w"
49+
"$destdir/src/stdlib_linalg_lapack"
50+
"$destdir/src/stdlib_linalg_lapack_aux"
51+
"$destdir/src/stdlib_linalg_lapack_s"
52+
"$destdir/src/stdlib_linalg_lapack_d"
53+
"$destdir/src/stdlib_linalg_lapack_q"
54+
"$destdir/src/stdlib_linalg_lapack_c"
55+
"$destdir/src/stdlib_linalg_lapack_z"
56+
"$destdir/src/stdlib_linalg_lapack_w"
57+
)
58+
3859
major=$(cut -d. -f1 VERSION)
3960
minor=$(cut -d. -f2 VERSION)
4061
patch=$(cut -d. -f3 VERSION)
@@ -66,5 +87,13 @@ cp "${include[@]}" "$destdir/"
6687
# Source file workarounds for fpm; ignore missing files
6788
rm "${prune[@]}"
6889

90+
# Capitalize .f90 -> .F90 for preprocessed files
91+
for pp_source in "${preprocessed[@]}"
92+
do
93+
# workaround for case-insensitive fs
94+
mv "$pp_source.f90" "$pp_source.rename"
95+
mv "$pp_source.rename" "$pp_source.F90"
96+
done
97+
6998
# List stdlib-fpm package contents
7099
ls -R "$destdir"

ci/fpm.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ copyright = "2019-2021 stdlib contributors"
88
[dev-dependencies]
99
test-drive.git = "https://github.com/fortran-lang/test-drive"
1010
test-drive.tag = "v0.4.0"
11+
12+
[preprocess]
13+
[preprocess.cpp]

cmake/stdlib.cmake

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,10 @@ function (fypp_f90 fyppopts fyppfiles f90files)
4040
preprocess("${FYPP}" "${fyppopts}" "fypp" "f90" "${fyppfiles}" _f90files)
4141
set(${f90files} ${_f90files} PARENT_SCOPE)
4242
endfunction()
43+
44+
# For fortran sources that contain C preprocessor flags: create ".F90" files
45+
function (fypp_f90pp fyppopts fyppfiles F90files)
46+
preprocess("${FYPP}" "${fyppopts}" "fypp" "F90" "${fyppfiles}" _F90files)
47+
set(${F90files} ${_F90files} PARENT_SCOPE)
48+
endfunction()
49+

0 commit comments

Comments
 (0)