- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
I am trying to figure out whether there is a difference between the -threads and the -pthread compiler option to IFORT. If there is a difference, what is it? Does it make sense to provide both options during compilation, or are they incompatible?
Also, if one of those options (or both) are used during compilation of one piece of code, does the same option have to be specified during linking?
Thank you,
-Gerhard
- Balises:
- Intel® Fortran Compiler
Lien copié
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
These are two different options, neither of which you need. -threads is obsolete and does nothing useful at this time. In the past it said that you wanted to use the thread-safe version of the language support library, but for four or five years now there is only a thread-safe version.
-pthreads is an alternate spelling of -reentrancy threaded, which tells the language support library to support a threaded application. This is the default.
Neither of these affect parallelism of your application.
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Thank you for the explanation. Good to have it clarified that both options are basically the default now. The code I am working with calls Fortran routines from inside Pthreads that were created by a C layer. It sounds like specifying both -pthread and -threads options when compiling the Fortran portions of the code makes sense - albeit redundant with the current defaults.
-Gerhard
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
My preference is to not specify options you don't need. They can be confusing to others when they try to understand your build environment.

- S'abonner au fil RSS
- Marquer le sujet comme nouveau
- Marquer le sujet comme lu
- Placer ce Sujet en tête de liste pour l'utilisateur actuel
- Marquer
- S'abonner
- Page imprimable