Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

Error in compiler aliasing

tudoroiu__marin
Beginner
637 Views

Dear all,

First of all I am not a programmer so please excuse me if I use some improper terms.

I am trying to compile the hdf5 libraries under ubuntu 16.04 with Intel Parallel Studio XE 2018, but whenever I configure them, in the configure output I read:

compiler 'icc' is Intel icc-18.0.1.163
compiler 'ifort' is Intel ifort-18.0.1.163
compiler 'icpc' is GNU g++-5.0.0

My environment variables are set up under /home/.bashrc and are as follows

source /opt/intel/parallel_studio_xe_2018.1.038/bin/psxevars.sh
source /opt/intel/compilers_and_libraries_2018.1.163/linux/bin/compilervars.sh intel64
export CC=icc
export CXX=icpc
export CPP='icc -E' 
export F77=ifort
export FC=ifort

Also this is the reply of the which command:

chertan@chertan-UX310UQ:~/Software/Installers/hdf5-1.10.1$ which icpc
/opt/intel/compilers_and_libraries_2018.1.163/linux/bin/intel64/icpc

I generally use cmake-gui to be sure to point to the correct compilers, but I cannot in this case, and I have to make sure that hdf is compiled with intel. Why does my environment sets icpc to g++? There's no environmental variable pointing to that!

Thanks!

0 Kudos
1 Solution
TimP
Honored Contributor III
637 Views

That log file is the right one.  The error messages are a bit strange.  It seems that it tried to run icpc without specifying the conftest, so something went wrong in a hidden place.   Maybe the script hasn't been set up for recent versions of icpc.  If that is the case, you would have to go to an hdf5 forum to find out what it takes to support the latest icpc (make certain you have the right up to date hdf5 distribution).

By the way, there probably isn't any advantage in building hdf5 with icpc.  The specification of ifort rather than gfortran is important, as ifort and gfortran don't use compatible libraries, but g++ and icpc should be fully link compatible.  Intel compilers require g++ to be working, as it is the basis to find many of the required include files and libraries.

View solution in original post

0 Kudos
4 Replies
TimP
Honored Contributor III
637 Views

You would need to examine the log of the tests performed when deciding whether icpc is working.

0 Kudos
tudoroiu__marin
Beginner
637 Views

Tim P. wrote:

You would need to examine the log of the tests performed when deciding whether icpc is working.

Tim, thanks for your answer, but, unfortunately, I am rather inexperienced on the topic, what exactly should I check?

I have both the output of the configure command redirected to a text file (configure_stdout.txt) and the log generated by the configure itself (configure_log.txt), but it's still not clear to me if it employed g++ or icpc

0 Kudos
TimP
Honored Contributor III
638 Views

That log file is the right one.  The error messages are a bit strange.  It seems that it tried to run icpc without specifying the conftest, so something went wrong in a hidden place.   Maybe the script hasn't been set up for recent versions of icpc.  If that is the case, you would have to go to an hdf5 forum to find out what it takes to support the latest icpc (make certain you have the right up to date hdf5 distribution).

By the way, there probably isn't any advantage in building hdf5 with icpc.  The specification of ifort rather than gfortran is important, as ifort and gfortran don't use compatible libraries, but g++ and icpc should be fully link compatible.  Intel compilers require g++ to be working, as it is the basis to find many of the required include files and libraries.

0 Kudos
tudoroiu__marin
Beginner
637 Views

Tim P. wrote:

That log file is the right one.  The error messages are a bit strange.  It seems that it tried to run icpc without specifying the conftest, so something went wrong in a hidden place.   Maybe the script hasn't been set up for recent versions of icpc.  If that is the case, you would have to go to an hdf5 forum to find out what it takes to support the latest icpc (make certain you have the right up to date hdf5 distribution).

By the way, there probably isn't any advantage in building hdf5 with icpc.  The specification of ifort rather than gfortran is important, as ifort and gfortran don't use compatible libraries, but g++ and icpc should be fully link compatible.  Intel compilers require g++ to be working, as it is the basis to find many of the required include files and libraries.

Dear Tim, thank you for your response!

As you suggest I will  go on as is thanks to the g++/icpc compatibility you kindly explained. I will still inquire on the hdf5 forum since I'm having troubles compiling netcdf libraries with hdf5 and I would like to be certain that this isn't an issue.

 

0 Kudos
Reply