Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!

-pthread deprecated?

Richard_M_
Beginner
223 Views

Hello there,

I am experiencing a very confusing problem. Previously I've been compiling my MPI program using ifort and the mpif90 script from mpich2. Never had any issues until this afternoon, when I all of a sudden get the following message when compiling:

ifort: command line remark #10010: option '-pthread' is deprecated and will be removed in a future release. See '-help deprecated'

After compilation the code does not run, as there seems to be some problem relating to MPI communications, which I haven't looked into yet, but it would seem to be too much of a coincidence not to be related to this new compilation problem. 

Can anybody suggest any possible reasons why I've started to experience this problem please?

Many thanks,

Richard

 

0 Kudos
9 Replies
Kevin_D_Intel
Employee
223 Views

Seeing that for the first time suggests the underlying compiler version changed to a newer release. That is our typical remark issued to announce pending removal of support for an option; however, the version of the compiler you are now using would not treat it any differently than previous releases except to flag it with the remark.

Given the underlying version of the compiler changed, it seems possible other software could have also changed. Maybe the MPI (mpich2) was updated. Check with those administering the system about any compiler and other software upgrades. A change to a newer version of something is likely at play in the app now not running.

Richard_M_
Beginner
223 Views

Hi Kevin, thanks very much for the reply. That was also my first thought, but nothing changed to my knowledge. The compiler and mpich2 are both installed on my local machine, and I haven't knowingly changed anything. Is there any way to pin point why the compiler seems to have this problem with pthreads now?

Kevin_D_Intel
Employee
223 Views

The compiler would not spontaneously start issuing the remark. I looked into this option/remark earlier and was surprised to find the compiler has issued this remark as far back as our 12.0 compiler release, perhaps earlier, and that it was just un-deprecated in 17.0 compiler release. Given that, it is unlikely your compiler changed to cause the remark to now appear. Maybe your build options changed to introduce this or the mpich2 wrapper, I don’t know.

Do you save any older build logs of any sort that might allow looking back to see what options were used in the past to compare those to options used now?

Richard_M_
Beginner
223 Views

Hi Kevin. Unfortunately I've never kept any build logs at all - not good practice I now realise. I will build again and output a log to see if I can spot anything untoward.

Thanks again,

Richard

Kevin_D_Intel
Employee
223 Views

If you are not explicitly throwing -pthread then see if the mpif90 options -compile_info or -link_info or -echo or -show options show any sign of it being introduced.

Richard_M_
Beginner
223 Views

OK great, using -show has thrown up a clue:

ifort -c -real-size 64 -O3 -openmp alloc_dom.for -I/usr/lib/openmpi/include -pthread -I/usr/lib/openmpi/lib

I'm trying to find out where this -pthread option is being specified at the moment. Do you have any idea where it could be by any chance? So far I've found it occurring in some .pc files in /usr/lib/openmpi/lib/pkgconfig, but removing it from these files hasn't solved the problem.

 

Kevin_D_Intel
Employee
223 Views

Try the mpif90 -echo option and capture the output to a file and search for the option. I'm guessing mpif90 might be adding it.

It is also possible to setup default options in the ifort.cfg file. That file resides in the same subdirectory as the ifort executable. Do 'which ifort' and then look in the directory path to see if ifort.cfg contains the option.

Richard_M_
Beginner
223 Views

Hi again Kevin. I couldn't get the -echo option to work - it gives me the message "ignoring unknown option '-echo'". Do you have any advice on how to get this working please? Sorry to keep bothering you with this, but thanks again - your help is greatly appreciated. I've tried to get a diagnostics file output by adding the FOR_DIAGNOSTIC_LOG_FILE environment variable but that didn't work either. I've also checked the ifort.cfg file as you suggested, but it is empty.

Kevin_D_Intel
Employee
223 Views

You're not bothering. This is the point of the forum.

Maybe I'm not being clear. -echo is an mpif90 command-line option (at least as per the man page I’m reading) not an ifort option. Also the environment variable you set is ifort specific and that will not provide any insight about the operation of mpif90. We're not trying to determine what ifort does with the -pthread option but instead trying to determine what underneath mpif90 appears to introduce this option into the command-line options that are ultimately fed to ifort.

Try locating an mpif90 command associated with your app’s build and the add –echo to it and execute the command and capture the output to a file. Then inspect that output to see where –pthread appears.

Reply