For Programmers: Free Programming Magazines  


Home > Archive > Fortran > July 2004 > Re: Problem: Fortran and OpenMP on Intel Pentium IV 3.0 GHz (Toshiba









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Problem: Fortran and OpenMP on Intel Pentium IV 3.0 GHz (Toshiba
Anton Ishmurzin

2004-07-16, 3:58 pm

Hallo Diego, for my Pentium IV it worked, but I'm not sure if it possesses
th HyperThreading option.

Here's the output:

ishmurzi@reaflow17:~/OpenMP> ./a.out
OpenMP max threads: 1
OpenMP num procs: 1
OpenMP: N_threads = 1 thread = 0
mypc:~/OpenMP> strings /lib/libc.so.6 | egrep GNU.+version
GNU C Library stable release version 2.3.2 (20030827), by Roland McGrath et al.
Compiled by GNU CC version 3.3.1 (SuSE Linux).
mypc:~/OpenMP> cat /etc/issue

Welcome to SuSE Linux 9.0 (i586) - Kernel \r (\l).


mypc:~/OpenMP> ifort -V
Intel(R) Fortran Compiler for 32-bit applications, Version 8.0 Build
20031016Z Package ID: l_fc_p_8.0.034
Copyright (C) 1985-2003 Intel Corporation. All rights reserved.
FOR NON-COMMERCIAL USE ONLY

ifort: Command line error: no files specified; for help type "ifort -help"
mypc:~/OpenMP>

Well, SuSE is not that free... I have Gentoo on my laptop, but PIV there
doesnt support HyperThreading. If it help, I can compile and run this test
on my laptop as well, just let me know if it makes sense.

Anton

Diego Luego wrote:
> Hello all,
>
> Below is a simple OpenMP code I am using to test the hyperthreding
> capabilities of an Intel Pentium IV 3.0 GHz processor under Linux
> Fedora core 2, installed in a Toshiba satellite P15-s420 laptop.
>
> When executing the compiled code on the Toshiba laptop I get the
> following error:
>
> [Test_openmp]$ ifort -openmp test_openmp.f90
> ifort: Command line warning: openmp requires C style preprocessing;
> using fpp to preprocess
> test_openmp.f90(13) : (col. 6) remark: OpenMP DEFINED REGION WAS PARALLELIZED.
>
> [Test_openmp]$ ./a.out
> forrtl: severe (174): SIGSEGV, segmentation fault occurred
> Image PC Routine Line Source
> a.out 008248B7 Unknown Unknown Unknown
> a.out 0012D325 Unknown Unknown Unknown
>
> Since this program produce the expected output in a desktop with
> an Intel Pentium IV 3.0 GHz when compiled with the same Intel
> Fortran compiler under Linux Mandrake and under Fedora Cora I,
> I am wondering is there is a problem with the Intel processor that
> came with the laptop.
>
> Certainly I should install those linuxes on my laptop to see if the
> problem persist, but that is an option I like to avoid as much as
> possible (Fedora core 2 is working fine in my system). If there
> a free Fortran 90/95 for Linux supporting OpenMP? May be the problem
> is not with Fedora core 2 but with the Intel compiler.
>
> Below I am also including information about the glibc library installed
> on my laptop.
>
> Diego
> dluego@yahoo.es
>
> Program test_openmp.f90
> ------------------------
> program test_omp
>
> implicit none
>
> integer :: omp_get_num_procs
> integer :: omp_get_max_threads
> integer :: omp_get_num_threads
> integer :: omp_get_thread_num
>
> write(6,"(a, i3)") " OpenMP max threads: ", omp_get_max_threads()
> write(6,"(a, i3)") " OpenMP num procs: ", omp_get_num_procs()
>
> !$omp parallel
> write(6,"(2(a,i3))") " OpenMP: N_threads = ", omp_get_num_threads(), &
> " thread = ", omp_get_thread_num()
> !$omp end parallel
> end
>
>
> -------------------------------
> [Test_openmp]$ strings /lib/libc.so.6 | egrep GNU.+version
> GNU C Library stable release version 2.3.3, by Roland McGrath et al.
> Compiled by GNU CC version 3.3.3 20040412 (Red Hat Linux 3.3.3-7).
>
> [Test_openmp]$ cat /etc/issue
> Fedora Core release 2 (Tettnang)
> Kernel \r on an \m
>
> [Test_openmp]$ ifort -V
> Intel(R) Fortran Compiler for 32-bit applications, Version 8.0
> Build 20031016Z Package ID: l_fc_p_8.0.034
> Copyright (C) 1985-2003 Intel Corporation. All rights reserved.
> FOR NON-COMMERCIAL USE ONLY


Paul Van Delst

2004-07-28, 9:06 pm

Diego Luego wrote:
> Anto, I missed your post. The output of your compilation is right.
> If you are using a pentium IV processor of 2.8 GHz, the output
> from of "OpenMP num procs" should be 2. Maybe SUSE does not recognize
> hyperthreading.
>
> I did not continue with the intel compiler. I changed to the portland group
> compiler, which I think is more robust than the intel compiler (I was able
> to compile other programs that the intel compiler was unable to do. An
> example is bellow). Also they,
> the portland group, realease things that really works. It is not possible to
> update
> what people from intel call "old realeases" of their compiler.


Hello,

Just to toss my two cents in.... I think both the above compilers you mention are about as
robust as each other. I have legal code that PGI (5.2) compiles, but Intel
(8.0.046.pe50.1) fails on. I also have other legal codes that Intel compiles that PGI
fails on (one with a run-time error, the other with an internal compiler error). All three
codes compile and run fine with Lahey (v6.2)*. Not that I'm saying the Lahey compiler is
better, just that I haven't written code that can break it (yet :o). And none of my code
has any OpenMP stuff in it, just regular, vanilla, non-rocket-science f90.

BTW, I think the Intel version you listed (8.0.034) is known to be quite buggy. The
8.0.046 version performs much better.

cheers,

paulv

* All three codes also compile and run fine on IBM, SGI, and Sun systems too.

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com