×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

linking GNU fortran with OpenMP

linking GNU fortran with OpenMP

linking GNU fortran with OpenMP

(OP)
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

RE: linking GNU fortran with OpenMP

Check if libpthread.a is in mingw/lib

RE: linking GNU fortran with OpenMP

(OP)
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.

RE: linking GNU fortran with OpenMP

There must be something wrong with your MinGW installation. I used OpenMP in some older threads e.g.:
http://www.tek-tips.com/viewthread.cfm?qid=1736891
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

RE: linking GNU fortran with OpenMP

(OP)
OK, I removed and installed again the POSIX packages and now it works. Thanks

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close