-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug fixes and enhancements for the linear solver.
- Modified forsolver.f90. - Updated and added new tests. - Modified fpm.toml. - Removed gfortran.rsp, ifort.rsp, ifx.rsp, nvfortran.rsp. - Added fpm.rsp. - Updated README.md
- Loading branch information
Showing
25 changed files
with
219 additions
and
67 deletions.
There are no files selected for viewing
This file contains 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 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,9 @@ | ||
@gfortran | ||
options test --compiler gfortran --flag "-Wno-line-truncation -Ofast -march=native -llapack -lblas" | ||
@ifort | ||
# options test --compiler ifort --flag "-Ofast -xHost -mtune=native -qopenmp -parallel -qmkl=parallel" | ||
options test --compiler ifort --flag "-Ofast -xHost -mtune=native -qopenmp -parallel -llapack -lblas" | ||
@ifx | ||
options test --compiler ifx --flag "-Ofast -xHost -mtune=native -qopenmp -fopenmp-target-do-concurrent -parallel -qmkl=parallel" | ||
@nvfortran | ||
options test --compiler nvfortran --flag "-O4 -mtune=native -stdpar=gpu,multicore -llapack" |
This file contains 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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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 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,7 +1,7 @@ | ||
program test1 | ||
|
||
use :: kinds | ||
use :: forsolver, only : solve | ||
use kinds | ||
use forsolver, only: solve | ||
|
||
implicit none | ||
|
||
|
This file contains 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 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 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 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 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 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,39 @@ | ||
program test15 | ||
|
||
use kinds | ||
use forsolver, only: solve | ||
|
||
implicit none | ||
|
||
real(rk), dimension(6,4) :: A | ||
real(rk), dimension(6) :: b | ||
real(rk), dimension(4) :: x, x_expected | ||
|
||
! set the matrix A | ||
A(1,:) = [ 1.44_rk, -7.84_rk, -4.39_rk, 4.53_rk] | ||
A(2,:) = [-9.96_rk, -0.28_rk, -3.24_rk, 3.83_rk] | ||
A(3,:) = [-7.55_rk, 3.24_rk, 6.27_rk, -6.64_rk] | ||
A(4,:) = [ 8.34_rk, 8.09_rk, 5.28_rk, 2.06_rk] | ||
A(5,:) = [ 7.08_rk, 2.52_rk, 0.74_rk, -2.47_rk] | ||
A(6,:) = [-5.45_rk, -5.70_rk, -1.19_rk, 4.70_rk] | ||
|
||
! set the right-hand side | ||
b = [8.58_rk, 8.26_rk, 8.48_rk,-5.28_rk, 5.72_rk, 8.93_rk] | ||
|
||
! solve the system | ||
X = solve(A, b) ! X = solve(A, b, method='gels') | ||
|
||
! expected result | ||
x_expected(1) = -0.45063713541953410_rk | ||
x_expected(2) = -0.84915021471399577_rk | ||
x_expected(3) = 0.70661216240939595_rk | ||
x_expected(4) = 0.12888575215577794_rk | ||
|
||
! check the result | ||
if (norm2(X - x_expected) < 1e-6_rk) then | ||
print'(a)', 'test15: passed' | ||
else | ||
print'(a)', 'test15: failed' | ||
end if | ||
|
||
end program test15 |
Oops, something went wrong.