-
Notifications
You must be signed in to change notification settings - Fork 39
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
Are there some fortran exmaples used to show how to use SciFortran
?
#2
Comments
Unfortunately not.
But, once installed, using SciFortran is quite straightforward.
You need to *use* the scifor module
program test
USE SCIFOR
implicit none
real(8) :: vec(100),M(100,100)
vec = linspace(0d0,1d0,100)
M(:,:) = eye(100)
M = diag(vec)
call inv(M)
call eigh(M,vec)
.....
end test
So far there is no documentation so you need to take a look inside the
source modules for the available procedures.
The naming convention and input variables are quite similar to that of
scipy.
Cheers.
AA
…On Mon, Nov 30, 2020 at 9:58 AM WangYun1995 ***@***.***> wrote:
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<https://github.com/QcmPlab/SciFortran/issues/2>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AARRDWFMO6M3U7VPXAISK6LSSNNDNANCNFSM4UHIQDKQ>
.
|
Thank you for your reply! To be honest, I am completely unfamiliar with Thank you again. |
The SciFortran Cmake installation checks if Blas/Lapack are installed on
your system. If so it uses them, otherwise Scifor will compile and use
internal Blas/Lapack libraries.
So you should not do anything in particular. This procedures ensures that
user can link against the most optimized version of Blas/Lapack so to
improve execution time.
Cheers.
AA
On Mon, Nov 30, 2020 at 10:32 AM WangYun1995 <notifications@github.com>
wrote:
… Unfortunately not. But, once installed, using SciFortran is quite
straightforward. You need to *use* the scifor module program test USE
SCIFOR implicit none real(8) :: vec(100),M(100,100) vec =
linspace(0d0,1d0,100) M(:,:) = eye(100) M = diag(vec) call inv(M) call
eigh(M,vec) ..... end test So far there is no documentation so you need to
take a look inside the source modules for the available procedures. The
naming convention and input variables are quite similar to that of scipy.
Cheers. AA
… <#m_499543067700771293_>
On Mon, Nov 30, 2020 at 9:58 AM WangYun1995 *@*.***> wrote: — You are
receiving this because you are subscribed to this thread. Reply to this
email directly, view it on GitHub <#2
<https://github.com/QcmPlab/SciFortran/issues/2>>, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AARRDWFMO6M3U7VPXAISK6LSSNNDNANCNFSM4UHIQDKQ
.
Thank you for your reply!
By the way, my machine is Red Hat 6.3.1-1. You said that SciFortran is
dependent on Lapack and Blas libraries and both of them can be installed
using cmake.
To be honest, I am completely unfamiliar with cmake. Could you give me
some examples of how to install Blas/Lapack using cmake?
Thank you again.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<https://github.com/QcmPlab/SciFortran/issues/2#issuecomment-735668424>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AARRDWBFHGDX4Z3DPRF5BHTSSNRB7ANCNFSM4UHIQDKQ>
.
|
You mean I don't need to install Lapack/Blas manually before installing SciFortran? |
I mean this: SciFortran comes with some 3rd libraries (blas/lapack,
minpack, quadpack, arpack, fftpack) of which it provides useful high level
interface.
As Blas/Lapack can exist in your system in a highly optimized version it is
better to link against them rather than compile and install the internal
version. This way top peformances are reached.
If no Blas/Lapack installations are found in your system (e.g. Inel MKL,
VecLib, etc..) then Scifor falls back on installing and using the internal
versions of Blas/Lapack. Although not optimized it is better than nothing.
As an example:
using MKL instead of the compiled Blas/Lapack you can gain up to 4-5times
in hermitian matrix diagonalization.
MKL roughly 0.2-0.3sec
Internal roughly 1.0-1.2sec
Anyway all the installation stuff is done automatically within CMake. Just
read the output of the cmake command and the README.md file.
Cheers,
AA
On Mon, Nov 30, 2020 at 10:43 AM WangYun1995 <notifications@github.com>
wrote:
… The SciFortran Cmake installation checks if Blas/Lapack are installed on
your system. If so it uses them, otherwise Scifor will compile and use
internal Blas/Lapack libraries. So you should not do anything in
particular. This procedures ensures that user can link against the most
optimized version of Blas/Lapack so to improve execution time. Cheers. AA
On Mon, Nov 30, 2020 at 10:32 AM WangYun1995 ***@***.***
wrote:
… <#m_-8394786698170854821_>
Unfortunately not. But, once installed, using SciFortran is quite
straightforward. You need to *use* the scifor module program test USE
SCIFOR implicit none real(8) :: vec(100),M(100,100) vec =
linspace(0d0,1d0,100) M(:,:) = eye(100) M = diag(vec) call inv(M) call
eigh(M,vec) ..... end test So far there is no documentation so you need to
take a look inside the source modules for the available procedures. The
naming convention and input variables are quite similar to that of scipy.
Cheers. AA … <#m_499543067700771293_> On Mon, Nov 30, 2020 at 9:58 AM
WangYun1995 *@*.***> wrote: — You are receiving this because you are
subscribed to this thread. Reply to this email directly, view it on GitHub <
#2 <https://github.com/QcmPlab/SciFortran/issues/2> <#2
<https://github.com/QcmPlab/SciFortran/issues/2>>>, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AARRDWFMO6M3U7VPXAISK6LSSNNDNANCNFSM4UHIQDKQ
. Thank you for your reply! By the way, my machine is Red Hat 6.3.1-1. You
said that SciFortran is dependent on Lapack and Blas libraries and both of
them can be installed using cmake. To be honest, I am completely unfamiliar
with cmake. Could you give me some examples of how to install Blas/Lapack
using cmake? Thank you again. — You are receiving this because you
commented. Reply to this email directly, view it on GitHub <#2 (comment)
<https://github.com/QcmPlab/SciFortran/issues/2#issuecomment-735668424>>,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AARRDWBFHGDX4Z3DPRF5BHTSSNRB7ANCNFSM4UHIQDKQ
.
You mean I don't need to install Lapack/Blas manually before installing
SciFortran?
And Does SciFortran boost performance greatly?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<https://github.com/QcmPlab/SciFortran/issues/2#issuecomment-735674341>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AARRDWBIMFU3RUJUVAASOB3SSNSM3ANCNFSM4UHIQDKQ>
.
|
Thank you for your nice explanation! |
Does it need additional compile options when I compile the Fortran code which contains |
Well, as any other library.
The installation procedure is outline in the README.md file.
After the
$make post-install
some information for loading the library into the system.
Once done the correct linking directives for compilation can be obtained
using
$pkg-config --cflags --libs scifor
pkg-config should be installed in your machine (it is normally installed in
any linux/unix distro).
Note that Scifor normally use MPI and compiles with the mpif90 wrapper.
So mpif90 should be used also to compile serial codes.
Cheers.
AA
…On Mon, Nov 30, 2020 at 1:09 PM WangYun1995 ***@***.***> wrote:
Does it need additional compile options when I compile the Fortran code
which contains scifor by gfortran?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<https://github.com/QcmPlab/SciFortran/issues/2#issuecomment-735747674>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AARRDWC7NKS3ESH6P64ZETLSSODQXANCNFSM4UHIQDKQ>
.
|
No description provided.
The text was updated successfully, but these errors were encountered: