Questions tagged [fortran]

Fortran is a general-purpose, procedural, imperative programming language that is especially suited for numeric computation and scientific computing.

4 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4
votes
0answers
37 views

Lightweight lock using OMP atomic

I am working on a Monte Carlo simulation using OpenMP multithreading. To avoid race conditions when multiple threads work on the same resolution element, I have implemented the following ...
3
votes
0answers
84 views

Passing file identifiers to all subroutines of fortran code

The Fortran program 'MAIN' below calls 3 subroutines. It opens a file if it is not present, (overwrites if it is already present). writes something on the file using the file identifier integer and ...
2
votes
0answers
71 views

Reversing a file in Fortran

This is my first foray into (modern) Fortran in order to learn a bit more about the language, and I'm attempting the following problem: taking the path of an arbitrarily-sized text or binary file ...
1
vote
0answers
71 views

Array initialization inside function to be called repeatedly

I have written a Fortran95 function that will be called many times in a loop. A much reduced version of it, called myFunction, is below. Examples of its use is ...