Community
cancel
Showing results for 
Search instead for 
Did you mean: 
vj2012
Beginner
207 Views

C++ include files

Hi,

I am trying to compile a C++ code which has the following include files: 

#include <iostream>
#include <fstream>
#include <iomanip>
#include <cmath>
#include <string>
#include <vector>

When I was trying to compile, it was apparently looking for these include files and following was the error I got:

icc: error #10417: Problem setting up the Intel(R) Compiler compilation environment.  Requires 'C++ include files' setting gathered from 'g++'

Following are the details of the compiler I was using:

OS info and version: Red Hat Enterprise Linux 7 64-bit
Compiler version: parallel_studio_xe_2020_update4_professional_edition

Where can I get these include files from, are these compiler specific?

Thank you.

0 Kudos
8 Replies
Gopika_Intel
Moderator
176 Views

Hi,

 

Thank you for posting in Intel C++ Compiler forum. Could you please share the outputs of the following?

1.   echo $PATH

2.   echo $LD_LIBRARY_PATH

3.   gcc --version

4.   icc --version

5.   Please ensure libraries are present in the standard path, /usr/include/c++/<version>/,  and please share with us the screenshot of the contents of the folder

 

Regards

Gopika

 

vj2012
Beginner
166 Views

Hi Gopika,

Thank you for your response and thank you very much for your help with my question.

Following are the outputs that you asked:

1. echo $PATH:

/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/home/kveera/.local/bin:/home/kveera/bin

2. echo $LD_LIBRARY_PATH:

(blank)

3. gcc --version:

gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

4.  icc --version:

bash: icc: command not found...

5. Please ensure libraries are present in the standard path,

the "compilers_and_libraries_2020" folder which came during the original installation was not changed. The current path is as shown in the following (/home/kveera/Intel), this was the folder into which was selected during the original installation

/usr/include/c++/<version>/,  and please share with us the screenshot of the contents of the folder:

Following are the contents of the folder:

[root@localhost Intel]# pwd
/home/kveera/Intel
[root@localhost Intel]# ls -ltr
total 32
drwxr-xr-x. 26 root root 4096 Sep 27 16:08 vtune_profiler_2020.3.0.612611
drwxr-xr-x. 4 root root 34 Oct 1 06:51 compilers_and_libraries_2020.4.304
drwxr-xr-x. 4 root root 24 Oct 14 04:39 documentation_2020
lrwxrwxrwx. 1 root root 49 Feb 8 09:12 vtune_profiler -> /home/kveera/Intel/vtune_profiler_2020.3.0.612611
lrwxrwxrwx. 1 root root 49 Feb 8 09:12 vtune_profiler_2020 -> /home/kveera/Intel/vtune_profiler_2020.3.0.612611
lrwxrwxrwx. 1 root root 91 Feb 8 09:12 performance_snapshot -> /home/kveera/Intel/vtune_profiler_2020.3.0.612611/documentation/en/performance_snapshot.htm
drwxr-xr-x. 2 root root 4096 Feb 8 09:12 performance_snapshots_2020.3.0.0.612611
lrwxrwxrwx. 1 root root 58 Feb 8 09:12 performance_snapshots -> /home/kveera/Intel/performance_snapshots_2020.3.0.0.612611
drwxr-xr-x. 3 root root 15 Feb 8 09:13 samples_2020
drwxr-xr-x. 20 root root 4096 Feb 8 09:14 inspector_2020.3.0.604771
lrwxrwxrwx. 1 root root 44 Feb 8 09:14 inspector -> /home/kveera/Intel/inspector_2020.3.0.604771
lrwxrwxrwx. 1 root root 44 Feb 8 09:14 inspector_2020 -> /home/kveera/Intel/inspector_2020.3.0.604771
lrwxrwxrwx. 1 root root 42 Feb 8 09:14 advisor -> /home/kveera/Intel/advisor_2020.3.0.607294
lrwxrwxrwx. 1 root root 42 Feb 8 09:14 advisor_2020 -> /home/kveera/Intel/advisor_2020.3.0.607294
drwxr-xr-x. 22 root root 4096 Feb 8 09:14 advisor_2020.3.0.607294
drwxr-xr-x. 3 root root 20 Feb 8 09:15 ide_support_2020
drwxr-xr-x. 2 root root 23 Feb 8 09:15 impi
drwxr-xr-x. 9 root root 92 Feb 8 09:21 debugger_2020
lrwxrwxrwx. 1 root root 29 Feb 8 09:21 parallel_studio_xe_2020 -> parallel_studio_xe_2020.4.912
drwxr-xr-x. 7 root root 4096 Feb 8 09:23 conda_channel
drwxr-xr-x. 16 root root 4096 Feb 8 09:24 intelpython3
drwxr-xr-x. 3 root root 18 Feb 8 09:24 compilers_and_libraries_2020
lrwxrwxrwx. 1 root root 28 Feb 8 09:24 compilers_and_libraries -> compilers_and_libraries_2020
lrwxrwxrwx. 1 root root 33 Feb 8 09:24 lib -> compilers_and_libraries/linux/lib
lrwxrwxrwx. 1 root root 37 Feb 8 09:24 include -> compilers_and_libraries/linux/include
lrwxrwxrwx. 1 root root 33 Feb 8 09:24 man -> compilers_and_libraries/linux/man
lrwxrwxrwx. 1 root root 33 Feb 8 09:24 ipp -> compilers_and_libraries/linux/ipp
lrwxrwxrwx. 1 root root 35 Feb 8 09:24 mpirt -> compilers_and_libraries/linux/mpirt
lrwxrwxrwx. 1 root root 33 Feb 8 09:24 mkl -> compilers_and_libraries/linux/mkl
lrwxrwxrwx. 1 root root 34 Feb 8 09:24 daal -> compilers_and_libraries/linux/daal
lrwxrwxrwx. 1 root root 33 Feb 8 09:24 tbb -> compilers_and_libraries/linux/tbb
lrwxrwxrwx. 1 root root 34 Feb 8 09:24 pstl -> compilers_and_libraries/linux/pstl
drwxr-xr-x. 2 root root 4096 Feb 8 09:24 bin
drwxr-xr-x. 5 root root 4096 Feb 8 09:24 parallel_studio_xe_2020.4.912

 

Gopika_Intel
Moderator
150 Views

Hi,

Thank you for the information. It seems you haven’t sourced the compilervars.sh file. Please source the compilervars.sh file, it is present in the parallel studio folder path

<path to parallel studio folder>/intel-parallel-studio/compilers_and_libraries_<version>/linux/bin

To source the file, execute

source compilervars.sh

See if the error persists

Regards

Gopika

 

vj2012
Beginner
123 Views

Hi Gopika,

When I tried to source by using the following command:

source /home/user/Intel-sw-download-folder/bin/compilervars.sh

following was the result:

compilervars.sh [-arch] <arch> [-platform <platform>]

<arch> must be one of the following:
ia32 : Set up for IA-32 target.
intel64 : Set up for Intel(R)64 target.
<platform> must be of the following:
android : Set to Android* target.
linux : Set to Linux* target.(default)

If the arguments to the sourced script are ignored (consult docs
for your shell) the alternative way to specify target is environment
variables COMPILERVARS_ARCHITECTURE to pass <arch> to the script
and COMPILERVARS_PLATFORM to pass <platform>

 

So, I tried the following command:

source /home/user/Intel-sw-download-folder/bin/compilervars.sh intel64 linux

yet again, it gave me the same result as the following:

compilervars.sh [-arch] <arch> [-platform <platform>]

<arch> must be one of the following:
ia32 : Set up for IA-32 target.
intel64 : Set up for Intel(R)64 target.
<platform> must be of the following:
android : Set to Android* target.
linux : Set to Linux* target.(default)

If the arguments to the sourced script are ignored (consult docs
for your shell) the alternative way to specify target is environment
variables COMPILERVARS_ARCHITECTURE to pass <arch> to the script
and COMPILERVARS_PLATFORM to pass <platform>

I appreciate your help in this regard.

Thank you very much.

Gopika_Intel
Moderator
98 Views

Hi,

 

Thank you for the update. Please try these solutions. See whether you can include files after that.

 

1.   

source compilervars.sh intel64

 instead of source compilervars.sh intel64 linux and try icc --version. Ensure you're getting an output.

2.   Ensure you’ve installed all the components in parallel studio xe, including intel C++ Compiler and sourced psxevars.sh.

 

NOTE :  Intel Parallel Studio has been rebranded as oneAPI. To get the equivalent software development environment as Intel Parallel Studio download the oneAPI Base Toolkit and the oneAPI HPC Toolkit from here, https://software.intel.com/content/www/us/en/develop/tools/oneapi/all-toolkits.html.

 

Regards

Gopika

 

Gopika_Intel
Moderator
74 Views

Hi,

 

We haven’t heard from you in a while. Did the solution work for you? Are you able to include the files now? Let us know your updates.

 

Regards

Gopika


vj2012
Beginner
56 Views

Hi Gopika,

Thank you for checking back with me. As you had suggested I tried the following two commands and the following are the outputs that I got:

1. source compilervars.sh intel64 instead of source compilervars.sh intel64 linux:

command used: source /home/user/Intel-sw-download-folder/bin/compilervars.sh intel64

This appeared to have worked because upon executing the command I didn't get any message..

and try icc --version. Ensure you're getting an output.:

command used: /home/user/Intel-sw-download-folder/bin/icc *.cc:

Following was the message that I got:

icc: error #10417: Problem setting up the Intel(R) Compiler compilation environment.  Requires 'C++ include files' setting gathered from 'g++'

 

2. Ensure you’ve installed all the components in parallel studio xe, including intel C++ Compiler: 

I believe following are the components under my "parallel_studio_xe_2020.4.912" directory:

advisor_2020 , bin  compilers_and_libraries_2020,  documentation_2020,  ide_support_2020,  inspector_2020,  licensing,  man,  psxevars.csh,  psxevars.sh,  samples_2020,  uninstall,  uninstall_GUI.sh,  uninstall.sh,  vtune_profiler_2020.

and sourced psxevars.sh:

 command used: source /home/user/Intel-sw-download-folder/parallel_studio_xe_2020.4.912/psxevars.sh:

Following was the message that I got:

Intel(R) Parallel Studio XE 2020 Update 4 for Linux*
Copyright 2009-2020 Intel Corporation.

Then, I tried the previous command again (/home/user/Intel-sw-download-folder/bin/icc *.cc):

Yet again I got the following message:

icc: error #10417: Problem setting up the Intel(R) Compiler compilation environment.  Requires 'C++ include files' setting gathered from 'g++'.

Thank you.

 

Gopika_Intel
Moderator
10 Views

Hi,

 

Thank you for the update. Compiling does not require complete path. We suggest the following steps again and see if you can compile your program. Please share the output after each step

1.     Go to the folder where the C++ program to be executed is present.

2.     Execute

source  <path to parallel studio folder>/intel-parallel-studio/compilers_and_libraries_<version>/linux/bin/compilervars.sh intel64

3.     Execute (full path not required, /home/user/Intel-sw-download-folder/bin/icc *.cc — not required)

icc --version

4.     Execute either of the below. Full path is not required.( /home/user/Intel-sw-download-folder/bin/icc *.cc — not required)

icc filename.c                                 //for c program

icpc filename.cpp                        //for c++ program

where filename is the program to be executed.

Hope this helps

Regards

Gopika