gfortran & openmp on windows 
Author Message
 gfortran & openmp on windows

I developed a copy of gomp in win32 thread, and built a copy of gfortran
with win32 thread for openmp, and tested on some examples. So far, it works
OK. However, the compiler cannot read the file from the statement "use
omp_lib". I got the following error message

Fatal Error: Reading module omp_lib at line 16 column 27: Bad name
gcc: Internal error: Aborted (program f951)
Please submit a full bug report.
See <URL: http://www.*-*-*.com/ ; for instructions.

Fortunately, it is not absolutely necessary to have the statement "use
omp_lib". The compiler still works. I wonder if "pthread version" encounters
a similar problem.

The configuration is as
Using built-in specs.
Target: i386-pc-mingw32
Configured with:
../gcc-4.2-20060520-mingw32/configure --with-gcc --with-gnu-ld --with-gnu-as
 --host=i386-pc-mingw32 --build=x86_64-unknown-linux-gnu --target=i386-pc-mi
ngw32 --prefix=/home/gfortran/gcc-native-mingw32-4.2-20060520 --disable-shar
ed --disable-nls --with-gmp=/home/gfortran/gmp-mingw32 --with-mpfr=/home/gfo
rtran/mpfr-mingw32 --with-sysroot=/home/gfortran/gcc-cross-mingw32-4.2-20060
520 --enable-threads=win32 --enable-languages=c,c++,fortran --enable-libgomp
 --disable-win32-registry
Thread model: win32
gcc version 4.2.0 20060520 (experimental)

Thank you.

JL

--
Posted via a free Usenet account from http://www.*-*-*.com/



Tue, 25 Nov 2008 03:39:22 GMT  
 gfortran & openmp on windows
I solve the problem.

It is not a bug with gfortran or gcc. File structure causes the problem. I
built the compiler for windows on x86_64-linux (cross-compiler). The file
omp_lib.mod is an ASCII file. Linux writes the ASCII file in a file
structure different from the file structure Microsoft Windows can correctly
access. MS windows appends line_feed and carriage_return on each line.

The problem can be solved as follows:
1) Change directory to the finclude subdirectory, e.g.
     <gfortran_directory>\lib\gcc\i386-pc-mingw32\4.2.0\finclude
2) delete the two files,omp_lib.mod and omp_lib_kinds.mod
3) apply the following command to get a new copy of omp_lib.mod and
omp_lib_kinds.mod:
    gfortran -c omp_lib.f90
4) delete the unnecessary object file
     del omp_lib.o

The new file omp_mod is accessible on Windows.

The omp_lib.mod generated on Linux has 6688 bytes.
The omp_lib.mod generated on Windows has 6817 bytes.

JL

--
Posted via a free Usenet account from http://www.teranews.com



Tue, 25 Nov 2008 11:25:14 GMT  
 gfortran & openmp on windows
Hi,

Quote:
> I developed a copy of gomp in win32 thread, and built a copy of
> gfortran with win32 thread for openmp, and tested on some examples. So
> far, it works OK.

I was about to reply to your message, but it seems that you fixed the
problem by yourself. I had a few questions about your gomp port:
  -- does it allow THREADPRIVATE variables (because those are not
     available for gomp on mingw32 with pthread-win32)?
  -- how large is your patch?
  -- do you intend to contribute it back to GCC, so that we can all
     benefit from this work?

--
FX



Tue, 25 Nov 2008 14:59:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. gfortran with OpenMP on Windows

2. GFortran - OpenMP problem with Windows XP memory

3. gfortran and OpenMP

4. Gfortran 4.4 binary (OpenMP and 64bit capability) for PPC Tiger

5. linking to OpenMP run-time library with gfortran

6. gfortran and OpenMP

7. gfortran, OpenMP, and AMD64 X2

8. XL Fortran 7.1 & OpenMP

9. Photran IDE & gfortran compiler

10. gfortran & adjustable array: most values remain zero

11. gfortran and graphical windows ?

12. gfortran new Windows package

 

 
Powered by phpBB® Forum Software