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

Ising model #25

Open
ivan-pi opened this issue Jul 1, 2021 · 4 comments
Open

Ising model #25

ivan-pi opened this issue Jul 1, 2021 · 4 comments

Comments

@ivan-pi
Copy link
Member

ivan-pi commented Jul 1, 2021

I just found a nice example of idiomatic Fortran in the work

Reid, J. K. (1990). Fortran 8X features and the exploitation of parallelism. In Scientific Software Systems (pp. 102-111). Springer, Dordrecht. https://doi.org/10.1007/978-94-009-0841-3_7

It is based on an example by Alan Wilson, showing a simple Ising model, which is a well-known Monte Carlo simulation in 3-dimensional space.

image

The paper by Wilson is the following one

Reid, J. K., & Wilson, A. (1985). The array features in FORTRAN 8x with examples of their use. Computer Physics Communications, 37(1-3), 125-132. https://doi.org/10.1016/0010-4655(85)90144-4

@certik
Copy link
Member

certik commented Jul 1, 2021

Very cool. I've also implemented the Ising model while I was at school long time ago. I might have used Python, I don't remember anymore.

@ivan-pi
Copy link
Member Author

ivan-pi commented Jul 2, 2021

According to the references the tradeoff between the >=F90 implementation and the old code are code clarity for higher memory use due to array temporaries. There are some further tricks to mitigate the higher memory use in the new code. For small to medium N sizes the array temporaries probably won't introduce significant performance overhead.

@certik
Copy link
Member

certik commented Jul 2, 2021

Is Fortran 8x what eventually became Fortran 90?

@arjenmarkus
Copy link
Member

arjenmarkus commented Jul 5, 2021 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

3 participants