Posted on November 5, 2009 by kurniawano
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 [...]
Filed under: Uncategorized | Tagged: fortran | Leave a Comment »
Posted on October 28, 2009 by kurniawano
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 [...]
Filed under: Uncategorized | Tagged: fortran, openmp | Leave a Comment »
Posted on October 23, 2009 by kurniawano
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 [...]
Filed under: Uncategorized | Tagged: fortran, visualization | Leave a Comment »
Posted on October 14, 2009 by kurniawano
IEEE require that PDF documents are created with embedded fonts. To do this, run
$ updmap –setoption pdftexDownloadBase14 true
And then run pdflatex again. To check whether it is embedded, run pdffonts on to the newly created pdf. You will see something like this.
$ pdffonts draft_isic2009_1.pdf
name [...]
Filed under: Uncategorized | Tagged: latex | Leave a Comment »
Posted on October 6, 2009 by kurniawano
Octave has released a major version 3.2 and now the latest bug fix release is 3.2.3. I decided to install it. What I did was to download the tarball from www.octave.org and then unzip it. After that, I run the configure:
./configure –prefix=$HOME/Programs/Octave-3.2.3
where the prefix defines the location where to install the new version of octave. [...]
Filed under: Uncategorized | Tagged: octave | Leave a Comment »
Posted on October 2, 2009 by kurniawano
I have been trying to search for a good debugger for Fortran code in Linux. But it is very hard to find. I know that GDB is supposed to be able to do it. But when I debug Fortran 95 code compiled using GFortran, I simply don’t know how to display the dynamic size array. [...]
Filed under: Uncategorized | Tagged: debugging, Intel, linux | Leave a Comment »
Posted on September 29, 2009 by kurniawano
In the previous post, we show how to plot 2D data with plcont. It plots the line contour. Now, how about if we want something more colorful? we can use a filled contour plot with the command plshade. The syntax is similar. But first, let’s look at the complete program.
program simple
use plplot
implicit none
real(plflt),dimension(6) :: x,y
real(plflt),dimension(6,6)::z,x2d,y2d,z2
real(plflt)::xmin,xmax,ymin,ymax,zmin,zmax
real(plflt),dimension(10)::clevel
real::step
integer::nlevel
integer::i,j
character*1 [...]
Filed under: Uncategorized | Tagged: plplot | Leave a Comment »
Posted on September 29, 2009 by kurniawano
In the previous post, we describe how to do a simple line plot. In this post, I will describe how to plot contour using Plplot libraries, particularly using the “plcont” function. Let’s look at the code first.
program simple
use plplot
implicit none
real(plflt),dimension(6) :: x,y
real(plflt),dimension(6,6)::z,x2d,y2d
real(plflt)::xmin,xmax,ymin,ymax,zmin,zmax
real(plflt),dimension(10)::clevel
real::step
integer::nlevel
integer::i,j
x=(/1,2,3,4,5,6/)
y=x
do i=1,6
do j=1,6
z(i,j)=x(i)*2*y(j)
x2d(i,j)=x(i)
[...]
Filed under: Uncategorized | Tagged: plplot | Leave a Comment »
Posted on September 25, 2009 by kurniawano
my presentation during presentation skills workshop with the topic: Wiki for Corporate
Filed under: Uncategorized | Leave a Comment »
Posted on September 18, 2009 by kurniawano
I installed libplplot from Kubuntu Adept package manager, and chose “libplplot-fortran9″ package.
To test the code, I created the following fortran program:
program testplplot2d
use plplot
implicit none
real(plflt),dimension(6) :: x,y
real(plflt)::xmin,xmax,ymin,ymax
x=(/1,2,3,4,5,6/)
y=x**2
write(*,*) y
call plinit()
xmin=1.0
xmax=6.0
ymin=1.0
ymax=40.0
call plcol0(1)
[...]
Filed under: Uncategorized | Tagged: kubuntu, plplot, ubuntu, visualization | Leave a Comment »