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

Are there some fortran exmaples used to show how to use SciFortran? #2

Closed
WangYun1995 opened this issue Nov 30, 2020 · 8 comments
Closed

Comments

@WangYun1995
Copy link

No description provided.

@aamaricci
Copy link
Collaborator

aamaricci commented Nov 30, 2020 via email

@WangYun1995
Copy link
Author

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 <#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.

@aamaricci
Copy link
Collaborator

aamaricci commented Nov 30, 2020 via email

@WangYun1995
Copy link
Author

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 <#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)>, 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?

@aamaricci
Copy link
Collaborator

aamaricci commented Nov 30, 2020 via email

@WangYun1995
Copy link
Author

Thank you for your nice explanation!

@WangYun1995
Copy link
Author

Does it need additional compile options when I compile the Fortran code which contains scifor by gfortran?

@aamaricci
Copy link
Collaborator

aamaricci commented Nov 30, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants