Obtaining clock time using Fortran

to get the current time in Fortran, we can use “system_clock” built-in function. To do this, take a look at the code below.

integer::count_0,count_rate,count_max, walltime, tstart,tend
call system_clock(count_0,count_rate,count_max)
tstart=count_0/count_rate
write(*,*) ‘begin (system_clock)’,tstart

To find out how long your program has run, add a similar line and save the time to, for example “t_end” variable, and get the difference. It will [...]

Debugging OpenMP fortran code

As the code becomes parallel, the complexity increases. One of the common problem in parallel code is data race. To debug this problem, I encounter that Intel’s Thread Checker to be a good software. You can download from the Intel’s website for evaluation. I found about this when I read this article
When I run [...]

VTK error reading ascii data! when writing using Fortran

I write a fortran code and save the data in VTK legacy format with structured points. However, for certain data somehow Paraview and Mayavi are unable to read the VTK file. It gives a “Generic Warning”, and says that
Error reading ascii data!
After days of debugging, it turns out that the cause is my precision, I [...]

What does !DEC$ mean in fortran

I encounter this symbol !DEC$ in fortran code, and tried to figure out what it means. It’s rather difficult to search using google, but after a while, I got a good explanation. It is basically similar to preprocessor in C/C++, you may read further from here:
http://h21007.www2.hp.com/portal/download/files/unprot/Fortran/docs/lrm/lrm0588.htm

Regarding Inverse Fermi Dirac Integral

Regarding my previous post on obtaining inverse fermi dirac integral. I found a paper by Antia which uses rational function to solve the inverse integral.
Antia, H. M. Rational Function Approximations for Fermi-Dirac Integrals. Astrophysical Journal Supplement v.84, p.101, (1993)
Do a Google Scholar Search to get the file.
The paper provide the Fortran codes.

Creating fermi dirac integral order -3/2 Octave function from Fortran source code

I need to use a Fermi Dirac Integral function of order -3/2 which is not available in Octave. Octave only has order -1/2, 1/2, and 3/2 from its GSL package. The source code is available in Fortran from
A. Trellakis, A. J. Galick, U. Ravaioli, Rational Chebyshev approximation for the Fermi-Dirac integral F_{−3/2}(x). Solid-State Electronics, [...]