Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

linking GNU fortran with OpenMP

Status
Not open for further replies.

Bosse7

Programmer
Aug 3, 2015
19
0
0
FR
Hi

I use MigGW in Windows and want to test using OpenMP parallel processing in my Fortran program
and compile the code with -fopenmp but the linker returns with error

C./mingw/bin/.../lib/gcc/mingw32/4.8.1/../../../ ... cannot find -lpthread

Which MinGW package is missing?

There is no problem compiling, linking and executing if I omitt the -fopenmp

Bosse
 
Check if libpthread.a is in mingw/lib
 
There is no such library. When I look at the mingw installation tool it lists a number of POSIX threading libraries that all are marked as installed except the mingw32-libquserex.dll This is marked as experimental and useless for 64 bit

I have a 64 bit installation.

 
There must be something wrong with your MinGW installation. I used OpenMP in some older threads e.g.:
and it worked fine for me.

I have the library mentioned by xwb in my installation of MinGW in 2 directories:
C:\MinGW\lib\libpthread.a
C:\MinGW\mingw32\lib\libpthread.a
 
OK, I removed and installed again the POSIX packages and now it works. Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top