Skip to content
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

Major update of LightKrylov #122

Merged
merged 370 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
370 commits
Select commit Hold shift + click to select a range
55aaa9f
Removed uneeded kind from stdlib imports.
loiseaujc Jun 13, 2024
6df6313
Merge pull request #94 from nekStab/stdlib_lstsq
Simkern Jun 13, 2024
2f4b248
Added default krylov_schur selector to eigs + private module by defau…
loiseaujc Jun 14, 2024
86ec306
Merge pull request #95 from nekStab/update_eigs
loiseaujc Jun 14, 2024
d69eedf
Switch to + minor typo corrections.
loiseaujc Jun 14, 2024
fd546e9
Got rid of one which is not needed.
loiseaujc Jun 14, 2024
fa755c6
Test new CI.
loiseaujc Jun 14, 2024
1c4b747
Remove explicit link to blas and lapack (included in stdlib).
loiseaujc Jun 14, 2024
702f009
Removed duplicated public declarations of opts objects.
loiseaujc Jun 14, 2024
f83dcdf
Removed duplicated declarations in LightKrylov.f90
loiseaujc Jun 14, 2024
eb8d6ce
Hopefully fixing tests for ifort.
loiseaujc Jun 14, 2024
3d7f40f
Change fmt in testdrive following the github readme.
loiseaujc Jun 14, 2024
a07b2f3
Removed overloaded = operator causing ifort failures.
loiseaujc Jun 14, 2024
18ff7dd
Removed consistently failing compilers + reduced optimization level f…
loiseaujc Jun 14, 2024
beffa01
Merge pull request #96 from nekStab/stdlib_svd
loiseaujc Jun 15, 2024
c0eaa1e
Turn single precision tests back on.
loiseaujc Jun 15, 2024
8bf79dc
Merge pull request #97 from nekStab/new_ci
loiseaujc Jun 15, 2024
e078e0f
Replace single by double orthogonalization in Lanczos bidiag.
loiseaujc Jun 17, 2024
223103b
Turn the single precision tests back on.
loiseaujc Jun 17, 2024
ee07ce7
Perform double GS orthogonalization for Lanczos tridiag.
loiseaujc Jun 17, 2024
caa8e41
Turned off ortho check in Lanczos bidiag and tridiag.
loiseaujc Jun 17, 2024
f330f6e
Init. info flag in Lanczos tridiag.
loiseaujc Jun 17, 2024
e820772
Fixed error when defining test for gmres + spd matrix.
loiseaujc Jun 17, 2024
83c99d4
Update stop_error and deploy
Simkern Jun 17, 2024
4e43809
Fixed tolerance for the Krylov-Schur (sp) test.
loiseaujc Jun 17, 2024
ad6711e
added check_test
Simkern Jun 17, 2024
8c127b6
Changed error norm from 2-norm to inf-norm wherever appropriate + tig…
loiseaujc Jun 17, 2024
d36dd4b
Changed error norm from 2-norm to inf-norm wherever appropriate + tig…
loiseaujc Jun 17, 2024
d8576f4
Merge branch 'dev' into update_logging
Simkern Jun 17, 2024
aadd575
Merge pull request #98 from nekStab/fixed_sp_tests
Simkern Jun 17, 2024
75c50b8
Removed features causing gfortran warnings during compilation.
loiseaujc Jun 18, 2024
24f9978
Fix gfortran warnings.
loiseaujc Jun 18, 2024
9ea0a91
Fix gfortran warnings (partially, complex svds and eigs tests not inc…
loiseaujc Jun 18, 2024
c84f97e
updated logger for checking tests
Simkern Jun 18, 2024
d0948fe
Fix gfortran warnings.
loiseaujc Jun 18, 2024
fbd73f5
Merge branch 'dev' into update_logging
Simkern Jun 18, 2024
1273afd
Removed unused variables.
loiseaujc Jun 18, 2024
ab937a8
Add utility script to run the tests.
loiseaujc Jun 18, 2024
0662625
Merge branch 'update_logging' into code_clean_up
Simkern Jun 18, 2024
bc6e41d
fixed small error
Simkern Jun 18, 2024
763fd8f
Fix gfortran warnings.
loiseaujc Jun 18, 2024
caaed1c
Changed the random generation from uniform to normal.
loiseaujc Jun 19, 2024
8bd2497
Increased the maximum number of cg steps.
loiseaujc Jun 19, 2024
62c8e00
Fix the generation of complex normal variables.
loiseaujc Jun 19, 2024
dba53b9
Removed on-screen junk.
loiseaujc Jun 19, 2024
cc1a2f1
restored previous spacing
Simkern Jun 19, 2024
a48b0bc
added string generation util
Simkern Jun 19, 2024
58fdcc8
point to fork of test-drive in nekStab instead of stdlib for nicer te…
Simkern Jun 19, 2024
ecfea6a
Improved test visualisation
Simkern Jun 19, 2024
e04f288
deployed new test visualisation
Simkern Jun 19, 2024
636eb8c
merged origin into local branch
Simkern Jun 19, 2024
bf764a1
Fixed warning from ifort.
loiseaujc Jun 19, 2024
ec88fac
added type bound procedure get_size to abstract vector and GL example
Simkern Jun 19, 2024
dd43429
Fixed most gfortran warnings.
loiseaujc Jun 20, 2024
8fd4aba
Updated run_tests with correct compilation options.
loiseaujc Jun 20, 2024
e95c9a4
Fix a large batch of gfortran warnings.
loiseaujc Jun 20, 2024
8862fcb
Fix gfortran warnings.
loiseaujc Jun 20, 2024
1b2e244
Made zero_basis public.
loiseaujc Jun 20, 2024
32e4de8
run deployment
Simkern Jun 20, 2024
820fd94
fixed typo in svd tests: singular values were not tested, factorizati…
Simkern Jun 20, 2024
424fc59
Fix gfortran warning.
loiseaujc Jun 20, 2024
32b5da2
Merge branch 'code_clean_up' of github.com:nekStab/LightKrylov into c…
loiseaujc Jun 20, 2024
9cdc5b4
Update svd following stdlib fix.
loiseaujc Jun 21, 2024
613fbb1
`get_size` added to TestVectors. fypp deployed and tests passed.
Simkern Jun 21, 2024
ee53789
Merge pull request #101 from nekStab/code_clean_up
Simkern Jun 21, 2024
d6d346f
Merge branch 'dev' into add_get_size
loiseaujc Jun 21, 2024
02c7d03
Merge pull request #100 from nekStab/add_get_size
loiseaujc Jun 21, 2024
9d516d7
Reverted to output style
Simkern Jun 21, 2024
1fccfb2
added test_size export
Simkern Jun 21, 2024
6fa1e5d
added test_size export
Simkern Jun 21, 2024
a7aaa9d
Moved definitions of vector and linop for testing together with the t…
Simkern Jun 21, 2024
dbbb0c7
Deployed LightKrylov_TestTypes
Simkern Jun 21, 2024
2a9426b
set logging to error_level to catch errors
Simkern Jun 21, 2024
391dcb8
removed unnecessary import
Simkern Jun 21, 2024
f5d01ee
Removed export of test_size to avoid circular dependency when loading…
Simkern Jun 21, 2024
9fa4342
Code cleanup, removed unnecessary allocation of X0 (except for block …
Simkern Jun 21, 2024
150e319
Fixed typo in error handling for DGS and orthogonalization that was l…
Simkern Jun 21, 2024
a091348
Merge pull request #103 from nekStab/separate_testtypes
loiseaujc Jun 24, 2024
3445092
Updated README.md
loiseaujc Jun 24, 2024
65f89f4
Updated FORD landing page.
loiseaujc Jun 24, 2024
27a9136
Migrated test/TestUtils --> src/TestTypes and renamed to src/TestUtil…
Simkern Jun 25, 2024
80e3d5b
Merge pull request #105 from nekStab/migrate_testutils
loiseaujc Jun 25, 2024
b516f37
Added documentation.
loiseaujc Jun 26, 2024
00ee8cf
added in-place orthonormalisation routine
Simkern Jun 28, 2024
49483ea
export orthonormalize_basis
Simkern Jun 28, 2024
dc841ad
export orthonormalize_basis and orthogonalize_against_basis
Simkern Jun 28, 2024
6482781
run deployment
Simkern Jul 1, 2024
52a7258
added copy_basis export
Simkern Jul 1, 2024
7d358b0
added innerprod, linear_combination and axpby_basis exports
Simkern Jul 1, 2024
b5e0dce
Added FACE as standard deps since used in Logger.f90
loiseaujc Jul 1, 2024
3e70b56
Fixed bug in eigs.
loiseaujc Jul 2, 2024
390473a
Initialize niter=0 in gmres.
loiseaujc Jul 2, 2024
3cdd27d
fixed bug of too short msg string
Simkern Jul 3, 2024
b654464
added generic interface for norml and log2
Simkern Jul 5, 2024
3c7c4e5
added logical function to check basis orthonormality
Simkern Jul 5, 2024
cfedea9
added mpi compatibility
Simkern Jul 9, 2024
12a9230
add mpi
Simkern Jul 9, 2024
7a6940f
added mpi_f08 as external library
Simkern Jul 17, 2024
7ae2c92
cleanup
Simkern Jul 17, 2024
5531c4b
ran deployment
Simkern Jul 17, 2024
68f3838
added mpi functions
Simkern Jul 17, 2024
caaf48e
moved io check to Logger module
Simkern Jul 17, 2024
c0433c9
deployment
Simkern Jul 17, 2024
4b9a318
added preprocessor directives for serial compilation
Simkern Jul 17, 2024
407e5bd
Merge branch 'add_mpi' into add_ortho
Simkern Jul 17, 2024
7de9308
removed preprocessor group; not necessary for our purposes
Simkern Jul 17, 2024
f72bba1
Reset defaults. Included logging and dummy routines for serial compil…
Simkern Jul 17, 2024
1cbdc03
cleanup
Simkern Jul 17, 2024
24cc533
Merge branch 'add_mpi' into add_ortho
Simkern Jul 17, 2024
dc9136b
renamed mpi -> comm for clarity in serial case
Simkern Jul 17, 2024
2181ffb
Merge branch 'add_mpi' into add_ortho
Simkern Jul 17, 2024
027ebbb
Exported communicators in LightKrylov
Simkern Jul 17, 2024
e183479
cosmetics and typos
Simkern Jul 17, 2024
23fa1a7
removed re-exports of comm_x in LightKrylov
Simkern Jul 17, 2024
c0b43c2
merge add_mpi into add_ortho
Simkern Jul 17, 2024
124080e
added check if MPI already initialized
Simkern Jul 18, 2024
dca9240
added check that mpi is not yet initialized
Simkern Jul 18, 2024
5c79b08
pushed communication setup msg to debug
Simkern Jul 18, 2024
7718473
pushed communication setup msg to debug
Simkern Jul 18, 2024
badfe62
typo
Simkern Jul 18, 2024
1dfb25f
Reorganisation: MPI constants + getter/setter stay in Constants.f90, …
Simkern Jul 18, 2024
aba85ed
cleanup done in branch add_mpi
Simkern Jul 18, 2024
7946dd7
add logger setup to example
Simkern Jul 18, 2024
8e0d638
fixed issue compiling with mpi
Simkern Jul 18, 2024
3b8ae9b
Merge branch 'add_mpi' into add_ortho
Simkern Jul 18, 2024
68565b7
Merge pull request #110 from nekStab/add_mpi
loiseaujc Jul 25, 2024
28a5eca
Changed standard sqrtm to svd based alg. Kept eig based as backup
Simkern Jul 28, 2024
89e8c7a
Removed is_hermitian/is_symmetric check (exact symmetry) from stdlib …
Simkern Jul 28, 2024
05c2097
added warning for close to symmetric matrices.
Simkern Jul 28, 2024
9e643ef
removed debug print
Simkern Jul 28, 2024
a503622
Better logging output for sqrtm errors
Simkern Aug 1, 2024
991721b
Merge pull request #111 from nekStab/add_ortho
loiseaujc Sep 26, 2024
9a98078
Merge pull request #112 from nekStab/dev
loiseaujc Sep 26, 2024
2ed835f
Classic Newton implementation attempt. Not functional yet.
Simkern Sep 27, 2024
734431e
experimental
Simkern Sep 27, 2024
b5b4fc9
Newton-Krylov implemented. Testing using Roessler system.
Simkern Sep 28, 2024
08d7906
Cleanup unnecessary routines
Simkern Sep 28, 2024
d5eecbf
Added bisection, added dynamic tolerances + scheduler interface, adde…
Simkern Sep 30, 2024
af28a77
Updated Newton step bisection and added test for it
Simkern Sep 30, 2024
386802b
deployment
Simkern Sep 30, 2024
c2128ec
Update systems removing explicit procedure for BF update
Simkern Oct 1, 2024
c0a8c4a
Updated bisection to golden ratio search
Simkern Oct 1, 2024
b298763
small updates
Simkern Oct 1, 2024
b8295fd
First attempt to generalize Newton to abstract_linear_solver. Does no…
Simkern Oct 1, 2024
16f1c39
Created Roessler example structure. Typos.
Simkern Oct 2, 2024
d08414d
Newton with abstract linear solver functional.
Simkern Oct 2, 2024
53a8ea9
Merge branch 'newton' into roessler_PO
Simkern Oct 2, 2024
227ac94
Nonlinear solver for roessler
Simkern Oct 2, 2024
dbb3c8f
remove old files, small fix
Simkern Oct 2, 2024
26cccab
Working nonlinear Roessler
Simkern Oct 2, 2024
ce2530e
Cosmetics
Simkern Oct 3, 2024
74822de
Add Newton-Krylov exports
Simkern Oct 3, 2024
284c88c
Added comment regarding info flag in abstract linear solvers
Simkern Oct 3, 2024
21561dd
Added single GMRES from Newton to test
Simkern Oct 3, 2024
1236a1d
Cleanup and cross-check with test suite
Simkern Oct 3, 2024
c095465
Moved to the fypp framework for Newton. Updated the documentation.
Simkern Oct 3, 2024
9b3f489
Improved documentation
Simkern Oct 4, 2024
ee8c012
Added newton_opts. Fixed variable shadowing.
Simkern Oct 7, 2024
bc93f55
Added info flag handling for abstract linear solvers
Simkern Oct 7, 2024
d67a0ad
Added iteration counter to eval inputs to adapt, e.g. tolerances base…
Simkern Oct 7, 2024
ce158b3
Updated Newton exports
Simkern Oct 7, 2024
7dba3ec
Fixed typo in augmented Jacobian. Updated eval to new interface. Fixe…
Simkern Oct 7, 2024
1fcb1a0
Updated example. Added tolerance schedulers.
Simkern Oct 7, 2024
a3a3ac7
Refactoring and updates. Moved opts type def to Utils. Updated to new…
Simkern Oct 7, 2024
225d19d
Added sp version of fixed point test. Small fixes.
Simkern Oct 7, 2024
ac24a5a
Added Floquet operator and monodromy map.
Simkern Oct 8, 2024
5133994
Cleanup. Added computation of Floquet multipliers for PO.
Simkern Oct 8, 2024
721918d
fixed typo in print descriptor.
Simkern Oct 8, 2024
ba63b7a
Update main.f90
Simkern Oct 8, 2024
e0375ac
Updated tests removing verbosity flags in favor of logger calls. Upda…
Simkern Oct 8, 2024
0253a63
Cleanup and Updates to new interfaces.
Simkern Oct 8, 2024
9f95c05
Update to the new interfaces, cleanup, removal of verbosity etc.
Simkern Oct 8, 2024
b6a5902
Cleanup and fine tuning of logging functionality.
Simkern Oct 8, 2024
805da60
Updated tolerance logic. Update to new linear operator and eval inter…
Simkern Oct 8, 2024
10a3ae8
Deployment
Simkern Oct 8, 2024
559ea5e
Shortened too long lines.
Simkern Oct 8, 2024
aa55d66
Fixed typo
Simkern Oct 8, 2024
4c6edee
Fixed long line in Newton.
Simkern Oct 8, 2024
a4402dc
Update NewtonKrylov.fypp
Simkern Oct 8, 2024
c8d595a
Update NewtonKrylov.f90
Simkern Oct 8, 2024
0346edd
Freed up information level in logging prio. Added module/procedure in…
Simkern Oct 12, 2024
709e7ba
Add rand_basis standard function.
Simkern Oct 15, 2024
4bda227
Export rand_basis standard function.
Simkern Oct 15, 2024
ac982f4
Added OTD capability for the Roessler system
Simkern Oct 15, 2024
cf989bd
Updated Newton example. Fixed bugs. Added OTD section to Roessler exa…
Simkern Oct 15, 2024
ba463e0
Cleanup output and main file.
Simkern Oct 15, 2024
cc688e2
removed outpost of trace of Lr
Simkern Oct 15, 2024
59d8e33
First version. Runs but there is a problem
Simkern Oct 15, 2024
5f0f35b
Included FTLE computation. Expanded example to include clean comparis…
Simkern Oct 16, 2024
9a4b3f2
output improvement
Simkern Oct 16, 2024
b9d1838
Added projected modes + route to chaos. Reduced output frq.
Simkern Oct 17, 2024
aae3ec8
add safeguard in qr that caused a runtime error in some cases
Simkern Oct 17, 2024
473132d
Updates requested for pull to dev.
Simkern Oct 21, 2024
ee5a912
Updates and cleanup during code review.
Simkern Oct 21, 2024
edf70bf
Added complex system + jacobian exports
Simkern Oct 21, 2024
46d4e01
Used optval for tolerances.
Simkern Oct 21, 2024
94f0472
Merge pull request #114 from nekStab/newton
loiseaujc Oct 21, 2024
4773a72
Merge branch 'update_docs' into dev
loiseaujc Oct 21, 2024
de6ed99
Merge pull request #115 from nekStab/dev
loiseaujc Oct 21, 2024
9bc5e3a
Minor code simplification in the .fyyp file + fixed typo in documenta…
loiseaujc Oct 21, 2024
93fd8c0
Updated doc for innerprod.
loiseaujc Oct 21, 2024
3a1c8c6
Updated doc for linear_combination.
loiseaujc Oct 21, 2024
a1bf0e4
Updated doc for axpby_basis.
loiseaujc Oct 21, 2024
2f2ad4d
Added doc for rand_basis, copy_basis and zero_basis.
loiseaujc Oct 21, 2024
8b35fc1
Updated doc for abstract_vectors.
loiseaujc Oct 21, 2024
fc36f0d
Updated doc for abstract linops type.
loiseaujc Oct 21, 2024
face73d
Updated doc for AbstractLinops module.
loiseaujc Oct 21, 2024
790c990
Added examples to all interfaces.
loiseaujc Oct 21, 2024
4df1d79
Updated docs for Constants
loiseaujc Oct 21, 2024
128c2e5
Made the functions pure.
loiseaujc Oct 21, 2024
5161018
Remove inv from Utils and replaced with stdlib_linalg implementation.
loiseaujc Oct 22, 2024
6762eb3
Remove commented inv.
loiseaujc Oct 22, 2024
3e92fdc
Removed unused/unecessary variables in expm.
loiseaujc Oct 22, 2024
a989291
Make use of zero_basis to reduce the code bloat a bit.
loiseaujc Oct 22, 2024
35ccb12
Remove import of getri and getrf no longer needed.
loiseaujc Oct 22, 2024
1055992
Removed eigh in favor of the stdlib_linalg implementation.
loiseaujc Oct 22, 2024
661876a
Updated docs for Utils.
loiseaujc Oct 22, 2024
020e9e4
Added module-level doc.
loiseaujc Oct 22, 2024
b9bcb2e
Updated doc for Arnoldi.
loiseaujc Oct 22, 2024
d80db19
Added docs for Lanczos methods.
loiseaujc Oct 22, 2024
9a5b7a7
Updated QR doc.
loiseaujc Oct 22, 2024
439cfb7
Added doc for apply_permutation_matrix and its inverse.
loiseaujc Oct 22, 2024
fe4b012
Updated docs + syntax highlighting in Markdown.
loiseaujc Oct 22, 2024
7c577e4
Small fix to make code style consistent
Simkern Oct 23, 2024
d6b5d90
Clarification in logging output for QR.
Simkern Oct 23, 2024
ba536fe
Update default tol in QR to atol. Added info message for breakdown. C…
Simkern Oct 23, 2024
5011629
Typo
Simkern Oct 23, 2024
7af0387
Merge pull request #118 from nekStab/QR_update
loiseaujc Oct 23, 2024
0457f04
Added doc for Gram-Schmidt.
loiseaujc Oct 23, 2024
8adcd09
Modified the CSS theme and a couple minor ford options.
loiseaujc Oct 23, 2024
0e1ab62
Merge branch 'update_docs' into dev
loiseaujc Oct 23, 2024
982c1b1
Merge pull request #119 from nekStab/dev
loiseaujc Oct 24, 2024
8eebd64
Added doc for orthonormalize_basis.
loiseaujc Oct 24, 2024
59935f9
Added docs for Krylov-Schur.
loiseaujc Oct 24, 2024
1273bfe
Added doc for eighs.
loiseaujc Oct 24, 2024
8bcc8e1
Added doc for eigs.
loiseaujc Oct 24, 2024
ef8f0a9
Added doc for svds.
loiseaujc Oct 24, 2024
813a4f8
Added doc for gmres and cg.
loiseaujc Oct 24, 2024
8ecc431
Added doc to expm.
loiseaujc Oct 24, 2024
bd1c219
Reformated slightly the newton doc.
loiseaujc Oct 24, 2024
0368939
Typo + Changed the default tolerance for the Krylov-based computation…
Simkern Oct 25, 2024
b03df82
Merge pull request #121 from nekStab/small_update
loiseaujc Oct 27, 2024
e74a8e9
Grouped copy_basis and copy_vector in same interface + changes in the…
loiseaujc Oct 28, 2024
d4c9cb6
Made expm a function.
loiseaujc Oct 28, 2024
1d7905d
Renamed lanczos_tridiag and lanczos_bidiag.
loiseaujc Oct 28, 2024
dbcdf99
Update .gitignore
loiseaujc Oct 28, 2024
d765dc1
Updated doc.
loiseaujc Oct 28, 2024
5497191
Linear solver no longer optional in Newton.
loiseaujc Oct 28, 2024
711c021
Minor FORD options changes.
loiseaujc Oct 28, 2024
ec3c9e8
Merge pull request #120 from nekStab/update_docs
loiseaujc Oct 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: ci

on: [push, pull_request]

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
toolchain: {compiler: gcc, version: 12, flags: ['-cpp -O3 -march=native -mtune=native']}
- os: ubuntu-latest
toolchain: {compiler: gcc, version: 13, flags: ['-cpp -O3 -march=native -mtune=native']}
- os: ubuntu-latest
toolchain: {compiler: intel-classic, version: '2021.10', flags: ['-fpp -O0 -g']}
- os: ubuntu-latest
toolchain: {compiler: intel, version: '2024.1', flags: ['-fpp -O0 -g']}
# - os: ubuntu-latest
# toolchain: {compiler: nvidia-hpc, version: '24.1', flags: ['-Mpreprocess -Ofast']}
- os: windows-latest
toolchain: {compiler: gcc, version: 13, flags: ['-cpp -O3 -march=native -mtune=native']}
# - os: windows-latest
# toolchain: {compiler: intel-classic, version: '2021.10', flags: ["/fpp /O3"]}
# - os: windows-latest
# toolchain: {compiler: intel, version: '2024.1', flags: ["/fpp /O3"]}
- os: macos-12
toolchain: {compiler: gcc, version: 13, flags: ['-cpp -O3 -march=native -mtune=native']}
# - os: macos-12
# toolchain: {compiler: intel-classic, version: '2021.10', flags: ['-fpp -O3 -xhost']}

steps:
- name: Checkout code
uses: actions/checkout@v1

- uses: fortran-lang/setup-fortran@main
id: setup-fortran
with:
compiler: ${{ matrix.toolchain.compiler }}
version: ${{ matrix.toolchain.version }}

- name: Setup Fortran Package Manager
uses: fortran-lang/setup-fpm@v5
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

- run: |
fpm test --flag "${{ join(matrix.toolchain.flags, ' ') }}"
35 changes: 0 additions & 35 deletions .github/workflows/gcc.yml

This file was deleted.

4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,6 @@
*~

# test/debug folder
debug/
debug/
*.css
doc/
39 changes: 20 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@



| **License** | **Build Status** | **Documentation** |
| :----------------------------------------------------------: | :----------------------------------------------------------: | :---------------: |
| [![License](https://img.shields.io/badge/License-BSD_3--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause) | [![Github actions](https://github.com/nekStab/LightKrylov/actions/workflows/gcc.yml/badge.svg?event=push)](https://github.com/nekStab/LightKrylov/actions) | [![Github actions](https://github.com/nekStab/LightKrylov/actions/workflows/docs.yml/badge.svg?event=push)](https://nekstab.github.io/LightKrylov) |
| **License** | **Build Status** | **Documentation** |
| :----------------------------------------------------------: | :----------------------------------------------------------: | :----------------------------------------------------------: |
| [![License](https://img.shields.io/badge/License-BSD_3--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause) | [![ci](https://github.com/nekStab/LightKrylov/actions/workflows/ci.yml/badge.svg)](https://github.com/nekStab/LightKrylov/actions/workflows/ci.yml) | [![Github actions](https://github.com/nekStab/LightKrylov/actions/workflows/docs.yml/badge.svg?event=push)](https://nekstab.github.io/LightKrylov) |

# LightKrylov

Targeting large-scale linear algebra applications where the matrix $\mathbf{A}$ is only defined implicitly (e.g. through a call to a `matvec` subroutine), this package provides lightweight Fortran implementations of certain of the most useful Krylov methods to solve a variety of problems, among which:
Targeting large-scale linear algebra applications where the matrix $\mathbf{A}$ is only defined implicitly (e.g. through a call to a `matvec` subroutine), this package provides lightweight Fortran implementations of the most useful Krylov methods to solve a variety of problems, among which:

1. Eigenvalue Decomposition
$$\mathbf{A} \mathbf{x} = \lambda \mathbf{x}$$
Expand All @@ -32,22 +32,17 @@ Krylov methods are *iterative methods*, i.e. they iteratively refine the solutio
`LightKrylov` leverages Fortran's `abstract type` feature to provide generic implementations of the various Krylov methods.
The only requirement from the user to benefit from the capabilities of `LightKrylov` is to extend the `abstract_vector` and `abstract_linop` types to define their notion of vectors and linear operators. `LightKrylov` then provides the following functionalities:

- Krylov factorizations : `arnoldi_factorization`, `lanczos_tridiagonalization`, `lanczos_bidiagonalization`.
- Krylov factorizations : `arnoldi`, `lanczos_tridiagonalization`, `lanczos_bidiagonalization`.
- Spectral analysis : `eigs`, `eighs`, `svds`.
- Linear systems : `gmres`, `cg`.

### Known limitations

For the sake of simplicity, `LightKrylov` only works with `real` or `double precision` data. While this might seem restrictive at first, consider that a complex-valued $n \times n$ linear system $\mathbf{Ax} = \mathbf{b}$ can always be rewritten using only real arithmetic as a $2n \times 2n$ real-valued system.
The primary reason to develop `LightKrylov` is to couple it with high-performance solvers in computational mechanics which often use exclusively real-valued data types. As such, we do not have any plan to natively support complex-valued linear operators or vectors.

### Examples

Several examples can be found in the `example` folder. These include:
Some examples can be found in the `example` folder. These include:
- [Ginzburg-Landau]() : Serial computation of the leading eigenpairs of a complex-valued linear operator via time-stepping.
- [Laplace operator]() : Parallel computation of the leading eigenpairs of the Laplace operator defined on the unit-square.

Alternatively, you can also look at [`neklab`](), a bifurcation and stability analysis toolbox based on `LightKrylov` and designed to augment the functionalities of the massively parallel spectral element solver [`Nek5000`]().
Alternatively, you can also look at [`neklab`](https://github.com/nekStab/neklab), a bifurcation and stability analysis toolbox based on `LightKrylov` and designed to augment the functionalities of the massively parallel spectral element solver [`Nek5000`]().

| [**Ginzburg-Landau**]() | [**Laplace operator**]() |
| :---------------------: | :----------------------: |
Expand All @@ -72,12 +67,14 @@ gh repo clone nekStab/LightKrylov
`LightKrylov` has a very minimal set of dependencies. These only include:

- a Fortran compiler,
- [LAPACK]() (or similar),
- [`fpm`](https://github.com/fortran-lang/fpm) or `make` for building the code.
- [`fpm`](https://github.com/fortran-lang/fpm) for building the code.

And that's all of it. To date, the tested compilers include:
To date, the tested compilers include:

- `gfortran 12.0.3`
- `gfortran 12` (Linux)
- `gfortran 13` (Linux, Windows, MacOS)
- `ifort` (Linux)
- `ifx` (Linux)

### Building with `fpm`

Expand All @@ -87,13 +84,17 @@ Provided you have cloned the repo, installing `LightKrylov` with `fpm` is as sim
fpm build --profile release
```

### Building with `make`
To install it and make it accessible for other non-`fpm` related programs, simply run

```
fpm install --profile release
```

N/A
Both of these will make use of the standard compilation options set by the `fpm` team. Please refer to their documentation ([here](https://fpm.fortran-lang.org/)) for more details.

### Running the tests

To see if the library has been compiled correctly, a set of unit tests are provided in [test](). If you use `fpm`, running these tests is as simple as
To see if the library has been compiled correctly, a set of unit tests are provided in [test](). Run the following command.

```
fpm test
Expand Down
12 changes: 12 additions & 0 deletions bootstrap.min.css

Large diffs are not rendered by default.

43 changes: 43 additions & 0 deletions deployment.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import os
import fypp
import argparse


def apply_command(folder, with_qp, with_xqp, with_hp):
# Get a list of all files in the folder
# Filter files based on the provided extension
lfiles = os.listdir(folder)
files = [folder+os.sep+file for file in lfiles if file.endswith(".fypp")]

args = []
if with_qp:
args.append("-DWITH_QP=True")
if with_xqp:
args.append("-DWITH_XQP=True")
if with_hp:
args.append("-DWITH_HP=True")

optparser = fypp.get_option_parser()
options, leftover = optparser.parse_args(args=args)
tool = fypp.Fypp(options)
# Apply the command line to each file
for file in files:
source_file = file
target_file = file.removesuffix('fypp')+'f90'
tool.process_file(source_file, target_file)


if __name__ == "__main__":
parser = argparse.ArgumentParser(
description='Preprocess LightKrylov source files.')
# parser.add_argument("--with_qp", action="store_true",
# help="Include WITH_QP in the command")
# parser.add_argument("--with_xqp", action="store_true",
# help="Include WITH_XQP in the command")
# parser.add_argument("--with_hp", action="store_true",
# help="Include WITH_HP in the command")

args = parser.parse_args()
# apply_command(args.with_qp, args.with_xqp, args.with_hp)
apply_command("./src/", False, False, False)
apply_command("./test/", False, False, False)
Loading
Loading