Created
November 6, 2025 21:45
-
-
Save emiliodallatorre/d9d5f4cdb9009a49f0a9e6291beed3fa to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| #!/usr/bin/env bash | |
| cat <<'EOF' | |
| LIS (Library of Iterative Solvers) - common compile & run examples | |
| 1) Build LIS test programs (example): | |
| module load lis | |
| mpicc -DUSE_MPI -I${mkLisInc} -L${mkLisLib} -llis test1.c -o test1 | |
| mpicc -DUSE_MPI -I${mkLisInc} -L${mkLisLib} -llis etest1.c -o eigen1 | |
| 2) Run LIS-based linear solver (examples): | |
| mpirun -n 4 ./test1 AtestCG.mtx 2 sol.mtx hist.txt -i cg | |
| mpirun -n 4 ./test1 AtestCG.mtx 2 sol.mtx hist.txt -i cg -p jacobi | |
| mpirun -n 4 ./test1 AtestCG.mtx 2 sol.mtx hist.txt -i cg -p ssor | |
| mpirun -n 4 ./test1 AtestCG.mtx 2 sol.mtx hist.txt -i cg -p ssor -ssor_omega 0.8 | |
| mpirun -n 4 ./test1 AtestCG.mtx 2 sol.mtx hist.txt -i cg -p ilu | |
| ./test1 AtestCG.mtx 2 sol.mtx hist.txt -i cg -p ilu # serial run (no mpi) | |
| 3) Run LIS-based eigensolver (examples): | |
| mpirun -n 4 ./eigen1 testmat0.mtx eigvec.txt hist.txt | |
| mpirun -n 4 ./eigen1 testmat0.mtx eigvec.txt hist.txt -e pi | |
| mpirun -n 4 ./eigen1 testmat0.mtx eigvec.txt hist.txt -e ii | |
| mpirun -n 4 ./eigen1 testmat2.mtx eigvec.txt hist.txt -e cr | |
| mpirun -n 4 ./eigen1 testmat2.mtx eigvec.txt hist.txt -e rqi | |
| 4) Common options (linear solvers / eigensolvers): | |
| -i [method] : choose inner iterative solver (cg, bicg, gmres, bicgstab, gs, ...) | |
| -p [precond] : choose preconditioner (jacobi, ssor, ilu, ...) | |
| -emaxiter [int] : maximum iterations for eigensolvers | |
| -etol [real] : tolerance for eigensolvers | |
| -shift [real] : spectral shift for inverse/shifted methods | |
| -ss [int] : subspace size for subspace eigensolvers | |
| 5) Examples combining options: | |
| mpirun -n 4 ./eigen1 testmat0.mtx eigvec.txt hist.txt -e ii -i cg | |
| mpirun -n 4 ./eigen1 testmat0.mtx eigvec.txt hist.txt -e ii -i gs -p ilu | |
| mpirun -n 4 ./eigen1 testmat2.mtx eigvec.txt hist.txt -e rqi -i bicgstab -p ssor | |
| mpirun -n 4 ./eigen1 testmat0.mtx eigvec.txt hist.txt -e pi -emaxiter 100 -etol 1.e-6 | |
| Notes: | |
| - Replace './test1' or './eigen1' with your compiled binary name. | |
| - Replace matrix and output filenames with your actual files (.mtx, .txt, .mtx). | |
| - For serial runs omit mpirun and call the executable directly. | |
| EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment