Fortran is a general purpose programming language widely used by the scientific computing community.

learn more… | top users | synonyms

-7
votes
0answers
21 views

Anyone need expert help/consulting with advanced programming languages? [on hold]

Code Genius was started at MIT to connect programmers in the scientific community to experts of advanced languages for efficient and cost effective support. Our platform helps programmers find the ...
0
votes
1answer
50 views

Efficient method to multiply floating point matrix with binary matrix and get double precision results

I have a matrix A which is of size (n2, n1) and I am multiplying it by a matrix, B, of size ...
2
votes
0answers
21 views

Fortran solver for the Sparse LSE problem

I was wondering if there is a Fortran library that contains a solver for the Sparse LSE(linear equality-constrained least squares) problem $$ min_{x}\|Cx-d\|^2 \text{ subject to } Ax=b $$ where $A$ ...
1
vote
0answers
84 views

Differences in answers between Python and Fortran

I am translating a piece of Fortran code into Python and am testing my code with a certain test case. All the results differ with 0.04% compared to the Fortran results. This is a very small ...
0
votes
0answers
50 views

Monte Carlo simulation

I am wondering if I am thinking correct about the following problem : ...
1
vote
1answer
59 views

Shifting points in fortran

Hello I am trying to shift points which have been previously generated in the square area. I am having a trouble with some additional conditions how they should have been shifted. ...
1
vote
1answer
107 views

How do Fotran77 and Fortran90/95 differ in performance via present-day compilers with array manipulation?

I would like to write the most optimized program for array manipulation in Fortran (e.g. matrix multiplication of large matrices, squaring large matrices, etc.) So, using the fortran compilers on the ...
0
votes
0answers
37 views

How to use QUADPACK for complex integrand with independent parameters?

I am new to fortran and wish to integrate a function using one of the standard quadrature methods contained in quadpack.f The problem is that my integrand is of a ...
0
votes
0answers
33 views

Optimization of nonlocal stencil-like operator on subset of regular grid

I am trying to optimize the execution time for this particular piece of fortran code. Details: i_gc is a (ngpts, 3) array of containing (i,j,k) indices for each grid point. This is a subset of the ...
0
votes
1answer
46 views

Incomplete Cholesky

Is there an efficient way to perform an incomplete Cholesky factorization on a symmetric positive definite sparse matrix (CSR format), in order to use it as a preconditioner for a CG solver? Is there ...
2
votes
1answer
76 views

precision loss in non-trigonometric, periodic functions using FFTW and NaNs after marching forward in time (Fortran)

I have developed a pseudospectral solver of the Navier-Stokes equations using FFTW. I tested my formulation of right hand sides (RHS) of the NS equations against standard trigonometric functions ...
2
votes
0answers
56 views

Iteratively finding both left and right eigenvectors for non-symmetric complex matrix

I have a complex, non-Hermitian matrix $\mathbf{A}$, for which I need to find a few eigenvalues and eigenvectors in the generalised eigenvalue problem: $$\mathbf{A}\cdot \mathbf{x} = \lambda ...
1
vote
1answer
84 views

OpenMP threaded nonlinear solver for complex numbers

Problem: I have translated Jacobian-Free Newton-Krylov solver written by C. T. Kelley to Fortran and now want to parallelize it on shared-memory system with OpenMP. In addition, I want to precondition ...
3
votes
2answers
440 views

literature on scientific computing

Maybe, this is a dump question. But anyway. I developed a finite difference code for a class of problems in dynamo theory. I used GNU Octave (MATLAB) which is good for testing. The problem size ...
2
votes
0answers
64 views

How to fix time intervals to store data in a stochastic simulation (continous time markov chain)

I am using FORTRAN to implement Gillespie's stochastic simulation algorithm. I would be running many simulations in parallel (both parallel instances with different seed and parallel functions); if I ...
0
votes
3answers
354 views

Use of Java or Scala in HPC?

I was looking to brush up and/or pick up some languages for a hobby project on my free Amazon EC2, and I was going through the benchmark results for Java vs C (or Scala vs C)and Fortran vs C. It seems ...
0
votes
2answers
79 views

How in Fortran 77 or in the next standards to do a multi-column out put in a simple calculation, having a Nested loop?

I have a simple question concerning the management of the output after running a Fortran code, having a NESTED LOOP.. I want to calculate for different k=1,5,9 the value $\mathbf{Sin(kx)}$ in the ...
1
vote
1answer
45 views

Sampling from the Generalized Beta of the Second Kind in Fortran

I need to sample from the generalized beta of the second kind (GB2) distribution (McDonald, 1984, Econometrica). Its PDF has the form $$ f_{a,b,p,q}(x) = ...
11
votes
2answers
2k views

Which version of Fortran should I learn?

I'm a Mechanical Engineering student interested in the field of aerospace engineering where, I'm told, Fortran is still commonly used. Which version of Fortran should I invest my time to learn?
1
vote
0answers
73 views

Fortran library for minimization or maximization of functions (optimization problem)

I'm looking for a library or individual package which provides convenient optimization subroutine for Fortran, any suggestions? I'm testing the codes from Numerical Recipe, downhill simplex method ...
1
vote
2answers
235 views

(Fortran) Integrating/summing over complicated 3D domain

I have some function $F(k_x,k_y,k_z)$ that I wish to numerically integrate over a polygon domain - physically, I am integrating over the first Brillouin Zone (BZ) of the FCC lattice (a truncated ...
1
vote
1answer
82 views

Fortran 2003 ARPACK wrapper

I wrote a Fortran 2003 wrapper for the ARPACK routine znaupd, basically translating the the example driver routine zndrv1 into modern Fortran 2003 language with automatic arrays. I initialize every ...
1
vote
2answers
129 views

Azimuthal average in Fortran? Find indexes in Fortran?

I am working on an eigenvalue problem in fortran. I have used Lapack to solve the problem and get the eigenvalues and eigenvectors. This is done for $201\times101$ wavenumbers, only half the wavespace ...
2
votes
1answer
101 views

CUDA Fortran: Multi GPU Programming and memory allocation

I am writing a program that is supposed to use multiple GPUs on a single node using CUDA Fortran. Although I've looked through the Portland Group CUDA Fortran Reference, I am still unclear about how ...
0
votes
0answers
49 views

How much time does DSYEV take to diagonalise a $N \times N $

I have been using a DSYEV, for some time. My instructor told me to calculate how much time does DSYEV take to diagonalise a $N \times N $. I know, in our case matrix M is symmetric. Standard ...
0
votes
1answer
201 views

Using OpenMP in Fortran for common array operations

In Fortran, given arrays A(1000000) and B(1000000), and to compute the sum you simply write: C = A + B However, when I want to implement OpenMP, I have to write ...
4
votes
1answer
166 views

Pre calculate mathematical expressions in Fortran 90

Is there some flag to let the Fortran compiler pre calculate a math expression before compiling it?. I have to write expressions that contain many small 4x4 matrix multiplications. The thing is, most ...
1
vote
2answers
223 views

Lua and Fortran (or Python) I/O

I am writing a global climate simulation software system. My idea is the following : At the top of everything, I interface to the OS using D, a very powerful language for compile time code ...
2
votes
2answers
304 views

CFD absractions in Modern Fortran

I'm a novice in object-oriented programming, but this design technique seems very interesting for me. I have a Fortran 90 CFD package , not very complex, but it is already very hard to maintain and to ...
1
vote
1answer
56 views

Compiling HSL_ME57 and interfacing with C code

Has anyone here had any success (or at least tried) compiling the HSL_ME57 (or similar such as MA57, etc.) matrix factorization libraries? Do any C wrappers exist for the Fortran function calls? I'm ...
4
votes
1answer
302 views

Fortran 90/95: Deallocating variables

I understand the crucial importance of freeing memory when certain variables or arrays need to be reused later in the program, or may not be in use for a while. However, in my experience with ...
0
votes
1answer
592 views

MPI_ERR_TRUNCATE appears for no understandable reason

I am developing some parallel CFD code using Fortran 90 and OpenMPI. The processes are structured into two groups such that half perform a certain type of calculations (let's say Velocity, Pressure ...
0
votes
1answer
78 views

Molecular Dynamics : Phase transition Lennard Jones potential

I'm doing molecular dynamics of $N$ bodies interacting through Lennard-Jones potential. I'm studying the hysteresis phenomena in the phase transition solid-liquid and liquid-solid. Which parameters ...
0
votes
2answers
133 views

Molecular Dynamics: Diffusion with PBC

How can I implement the computation of the diffusion coefficient $D$ using periodic boundary conditions (PBC)? I use molecular dynamics of a set of $nboby$ particles with positions $pos(3,nbody)$ in ...
1
vote
1answer
87 views

Heuristic help with preconditioning large system ODEs

I'm looking for some general insight on preconditioning. In particular, relevant references/resources/comments would be greatly appreciated. Note, I have been through some of the literature, but am ...
1
vote
0answers
84 views

Why would this a pair of E5-2670 cpus be faster than 4 E5-2640 cpus for large matrix diagonalisation problems?

Not really much more to say; Of several computers available for use, these are two of the larger ones; one has 2x E5-2670, and the other has 4x E5-4640. The problems we're looking at essentially boil ...
1
vote
2answers
198 views

Python like generic List in Fortran [closed]

I like to have a list just like in Python, but for Fortran. I know that there is a generic list type. But here I would have to define a type for each data I would like into the list, e.g. one for ...
2
votes
1answer
121 views

'Varargin' in Fortran

Consider the following: I would like to solve a differential equation in Fortran (with a Runge-Kutta routine), e.g. x'=-a*x, where ...
8
votes
6answers
6k views

Python vs FORTRAN

Which one is better: FORTRAN or Python? And I guess that in both cases you need Gnuplot, am I right? I'm working on a Windows machine at the moment. I'd like to use it to get numerical solutions for ...
2
votes
2answers
348 views

Newton-Raphson method fails!

I am trying to solve an equation like $R(x) = 0$, using Newton-Raphson method. To obtain the $x$ increment in each iteration I solve $dx = -(A)^{-1}\cdot R$ where $A = dR/dx$. But the convergence ...
3
votes
3answers
333 views

How to solve a Linear Matrix Equation: AX-XA=B efficiently?

recently I have been working on solving some math problems using Fortran. There occurs to me that a linear matrix equation: $$ AX-XA=B $$ where $A$ and $B$ are known $n\times n$ matrices and $X$ is ...
1
vote
1answer
362 views

Parallel 2d heat equation (implicit timestepping) using MPI

I am trying to solve the time dependent heat equation with backward euler timestepping and second order space finite differences. This results in a Poisson system needing to be inverted. In serial ...
2
votes
1answer
294 views

2-body problem with Fortran 95

I am trying to implement the N-body problem using Fortran 95. Before generalizing it to N bodies, I am first trying to calculate the motion of a single orbiting body (body 2 in my code below) around a ...
2
votes
2answers
141 views

How to design a Hessian Algorithm based on Gradient Algorithm?

I have a question which I think should be pretty simple. I have written a subroutine in Fortran which will compute the Gradient at a point of the form ...
2
votes
2answers
872 views

Stop process from continuing until others have finished MPI

I am looping an array using MPI. The problem is, i think that some processes are moving onto their next iteration before other precesses have finished theirs. This is causing me problems because data ...
0
votes
0answers
136 views

How can we visualize the data in polar coordinates using openDx?

Actually I am trying to visualize data in polar coordinates using openDx but openDx always does in Cartesian coordinates i-e in box shape I want circular shape of my data. I want the data ...
1
vote
1answer
445 views

Lid driven cavity flow problem to solve with the help of projection method and use coding in fortran 90 [closed]

I want to solve Lid driven cavity flow with the help of projection method i want to make own fortran program to solve two dimensional unsteady flow. I propose to solve the equations in the following ...
4
votes
1answer
2k views

Fortran, making a more efficient bilinear interpolation

I'm trying to write an efficient bilinear (2D)-interpolation, after reading some recipes, as a fortran-mex for Matlab that is used extensively throughout a long algorithm of solar image processing, ...
2
votes
1answer
273 views

how to use lanczos code from netlib for large sparse symmetric matrix?

I want to use lanczos method to calculate the few lowest eigenvalue and eigen-vector of a large sparse symmetric matrix(~50k x ~50k). In http://www.netlib.org/lanczos/index.html I found the codes ...
5
votes
4answers
384 views

Need Fortran 77 compiler

Does anyone know a compiler for Fortran 77 available as a free download? I have pre-written 77 code from a source published in the early 90's that I just need to compile, build, and run. But I don't ...