Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Problem with ifort and filesystem

Jose_Martin
Beginner
711 Views
I have installed ifort 11.0069 in a x86_64 machine with opensuse 11.0 and kernel 2.6.25.
I use Glusterfs (a distributed filesystem based in FUSE) to share contents between nodes in a HPC cluster. Problem is writings in ifort compiled programs is very slow.
I have made the following test:
* Compiling a easy program with a high rate of writes
PROGRAM PRUEBA
CHARACTER *100 buffer
REAL :: w
open(8,file='r.txt')
c write(6,*)'w=?'
c read(5,*)w
call getarg(1,buffer)
read(buffer,*)w
x=3.1
do 100 n=1,1000000
do 200 j=1,100
y=(x*n)/j
if(y.lt.w)write(8,*)j,n,y
200 continue
100 continue
close(8)
end
This program receives a parameter, w, which determines the amount of data to calculate and write.
I compile it: ifort -O3 program.f -o program, and I run it.
With w=100, it generates a file of 6.5MB. Execution times are (time ./program 100):
ifort:
real 1m29.762s
user 0m1.396s
sys 0m0.852s

gfortran:
real 0m2.528s
user 0m1.896s
sys 0m0.008s

So, with ifort, I/O tasks spent about 97% of time. gfort does not have that problem


If I run the same ifort program in a local (non-distributed) ext3 filesystem times are:
real 0m1.448s
user 0m1.024s
sys 0m0.392s

Max bandwith of the distributed filesystem is about 50MB/second reached copying files with rsync, so this is not a bottleneck. The problem is the behavior of ifort.

I used vtune to search for the causes of the problem. I realized that gfortran uses procedure "_gfortran_st_write" from library libgfortran while ifort uses "__write" from libpthread, which takes 97% execution time.

What can I do to resolve this issue? Can I use libgfortran instead of libphtread whith ifort?

Any suggestion will be very appreciated.
Thank you.

Jos M. Martn


0 Kudos
2 Replies
TimP
Honored Contributor III
711 Views
You didn't say whether you have set similar buffering strategies for ifort and gfortran, e.g.
ifort -assume buffered_io (or using the environment variables). This option doesn't apply to stdout (unit=*).
Both ifort and gfortran use libpthread, under options which require it. ifort isn't compatible with libgfortran.
As you are running on a cluster, I suppose you would use MPI, and you would want to check whether the difference might be associated with change in MPI. I don't know why ifort would be using libpthread, unless you compiled with MPI or threading. Any answers here may be meaningless if you don't specify such details.
Intel MPI comes with pre-built wrapper scripts for both gfortran and ifort, so they ought to be consistent.
0 Kudos
Jose_Martin
Beginner
711 Views
Quoting - tim18
You didn't say whether you have set similar buffering strategies for ifort and gfortran, e.g.
ifort -assume buffered_io (or using the environment variables). This option doesn't apply to stdout (unit=*).
Both ifort and gfortran use libpthread, under options which require it. ifort isn't compatible with libgfortran.
As you are running on a cluster, I suppose you would use MPI, and you would want to check whether the difference might be associated with change in MPI. I don't know why ifort would be using libpthread, unless you compiled with MPI or threading. Any answers here may be meaningless if you don't specify such details.
Intel MPI comes with pre-built wrapper scripts for both gfortran and ifort, so they ought to be consistent.

Thank you very much, I did not know such option for buffering. Compiling with ifort -assume buffered_io solves the problem.

Thank you.
Jos M. Martn
0 Kudos
Reply