Quantcast
Channel: Intel® Software - Intel® C++ Compiler
Viewing all 2797 articles
Browse latest View live

How to disable linking time optimizations?

$
0
0

Hi I am using Intel C++ compiler for my projects
 

How to disable linking time optimizations?
The goal is to accelerate the linking time with minimal efforts (without re-organizing the project codes, ... etc)

TCE Open Date: 

Saturday, November 30, 2019 - 21:50

icpc totally broken Apple

$
0
0

The following simple C++ program hello.cc will not compile on Apple OS 10.14.6 xCode version 11.2 icpc version 19.0.5.281

#include <iostream>

int main(int argc,char **argv)
{
    std::cerr << "Hello World\n";
    return 0;
}

icpc hello.cc

Undefined symbols for architecture x86_64:
  "__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1Emc", referenced from:
      _main in icpcRo7DOA.o
ld: symbol(s) not found for architecture x86_64

 

The load is clearly missing a library. The same routine compiles for Apple g++

/usr/bin/g++ hello.cc

./a.out

Hello World

 

Where is the missing library and when will this compiler version be fixed?

 

 

TCE Level: 

TCE Open Date: 

Tuesday, November 26, 2019 - 04:30

OpenMP Affinity conflict with SetThreadAffinityMask

$
0
0

Hi,

I've successfully set openmp affinity using environment OMP_PLACES and OMP_PROC_BIND. At the same, I tried to set affinity for my other threads not managed by openmp using windows SetThreadAfinityMask. Once I added SetThreadAfinityMask, openmp started complaining, 

OMP warning #123: Ignoring invalid os proc ID 0

OMP warning #124: No valid os proc IDs specified - not using affinity

I'm sure I use SetThreadAfinityMask outside the range set in OMP_PLACES. Is there an approach for both affinity to coexist?

Thanks,

kk

TCE Open Date: 

Friday, November 29, 2019 - 18:15

Some questions about the /Qregcall option.

$
0
0

Can the program I compiled with /Qregcall call functions in system DLL?

Calling Conventions of the system DLL is __cdecl or __stdcall.

Can the program compiled without /Qregcall call functions compiled with /Qregcall?

TCE Open Date: 

Tuesday, December 3, 2019 - 11:50

What does BV mean?

$
0
0

Hello.

What does BV mean? How to decipher this abbreviation?

XGETBV, XSETBV, XSTATE_BV, etc...

TCE Open Date: 

Saturday, November 30, 2019 - 14:30

What is the default_random_engine for Intel Compiler in std::random

$
0
0

And secondly, where is this documented? I think gcc's standard is a Mersenne Twister, but what is the standard for icpc?

 

Thank you for your response,

 Christoph.

TCE Open Date: 

Thursday, December 5, 2019 - 09:13

Seg Fault with Gromacs gmx grompp command

$
0
0

This problem is consistent with the following gromacs/compiler versions:

Gromacs 2019.4/Intel Parallel Studio 2019.4

Gromacs 2019.4/Intel 2017.2

Gromacs 2018.2/Intel Parallel Studio 2019.4

Gromacs 2018.5/Intel Parallel Studio 2019.4

The command to build and install gromacs in all cases is

export CC=icc
export CXX=icpc
export FC=ifort

cmake ..  -DGMX_FFT_LIBRARY=mkl \
                  -DCMAKE_INSTALL_PREFIX=$HOME/sw/gromacs/intel/<version>  &&  make VERBOSE=1 && make install

The gcc version in the PATH is 5.4.0

The OS is:

Scientific Linux release 6.10 (Carbon)

I am running the lysozyme tutorial: http://www.mdtutorials.com/gmx/lysozyme/

The command that seg faults is 

gmx grompp -f ions.mdp -c 1AKI_solv.gro -p topol.top -o ions.tpr -maxwarn 2

The gmx grompp command succeeds when using a version of gromacs compiled with GCC 

Any help would be greatly appreciated.

 

 

 

 

 

TCE Open Date: 

Thursday, December 5, 2019 - 10:46

Not compatible with Visual Studio 2019 16.4

$
0
0

The latest Intel 2019 Update 5 compiler is not compatible with the updated Visual Studio 2019 16.4 headers.

 

C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.24.28314\include\utility(92): error: expected an identifier
          !_Is_implicitly_default_constructible<_Uty1>::value || !_Is_implicitly_default_constructible<_Uty2>::value)
          ^

 

And so on with many other errors.

TCE Open Date: 

Thursday, December 5, 2019 - 10:55

Eclipse C++ Makefile Project icpc Command Not Found

$
0
0

Does anyone know how to get the Eclipse C++ (2019-05 on CentOS 7) console to recognize the icpc command for Makefile Projects? 

I recently downloaded Intel Parallel Studio XE 2019 update 5 from [1] and completed an "offline" installation following section 3.2 of the Intel Parallel Studio XE 2019 Update 4 Installation Guide for Linux OS [2] using a trial license. I then followed the tutorial in [3] to integrate the Intel compiler into Eclipse. I was then able to create a "Hello World" C++ Project through the Eclipse New Project Wizard and it compiled as expected. Unfortunately, when I changed my compiler from "g++" to "icpc" in an existing makefile project (I typically work with makefile projects), I received the following error in the Eclipse console:

"make: icpc: Command not found".

I also realized I couldn't use make from a bash terminal unless I used the compilervars.sh script as explained in [4]. Even after using the compilervars.sh script, I was still unable to use Eclipse to build the project; which I think is expected since the script seems to set the environment variable only for the bash terminal it is used in.

Has anyone had success using Makefile Projects in Eclipse with the Intel C++ Compiler or know how to get the icpc command recognized globally on CentOS 7?

 

References:

  1. https://software.seek.intel.com/ps-l
  2. https://software.intel.com/en-us/download/parallel-studio-xe-2019-instal...
  3. https://software.intel.com/en-us/get-started-with-cpp-compiler-19.0-for-...
  4. https://software.intel.com/en-us/articles/setting-up-the-build-environme...

TCE Open Date: 

Thursday, December 5, 2019 - 13:13

Intel C++ compiler and Xcode

$
0
0

I've just installed the Intel Parallel Studio but it won't let me compile anything because I don't have Xcode installed.  Can somebody shed any light on this?  Why is this so?  If I am required to have Xcode what is the sense in having Intel's compiler when I can just use the bloated Xcode?  Please help.

TCE Open Date: 

Friday, December 6, 2019 - 10:32

icpc , c++ fail std=c++14 with gcc version 4.8.5

$
0
0

Hello,

I  have observed an issue  with intel  c++ compiler   using old versions of g++  and support for std=c++14 and std=c++17

Short background :  We use an enterprise Linux Version,  SLES12SP4, and  by  default the compiler ist  gcc 4.8.5

A perfectly supported std c++14 code ( memory std::make_unique<myClass()>)   will not compile with icpc -std=c++14 -v 19.**   unless I  have added in the path a recent  version of gcc , for example 8.0.3  .   I have examined  the output of  icpc /g++   -E   and  icpc is using the CPP  found in the path ,  and the STL headers in the path of  CPP.

I always tought  , that  the icpc  has an integrated preprocessor, and also STL headers making it inmune to the current installed version of gcc .  There is  list of supported features c++14 c++17, but not sure if  there is no parallel to the recommended  gcc .

1) Is there  a parallel  of which gcc  suits best to icpc ?  Also icpc  2018 failed to build the code above ,  but icpc 2019  compiled it fine using the CPP-8.0.3

2) Is there a way , using a configuration file on enviroment to instruct / tell    icpc  where to find the preprocessor/gcc and STL librares?   a system-wide  export PATH is not  recommend in my case .  

Thanks

 

 

 

TCE Open Date: 

Monday, December 9, 2019 - 00:02

Missing dlls after install of system studio 2020 on Windows

$
0
0

After uninstalling SystemStudio 2019 and installing SystemStudio 2020 on Windows 10 (Windows Host, Windows target), my 32 bit application builds OK but can't run (on the build machine) due to missing DLLs.

Also, for deployment, I can't find the Intel C++ runtime redistributables for version 19.1 (system studio 2020) for Windows.

I got my program running on the build machine by installing the version 19 update 5 rdist but surely that is not how this is supposed to work?

System Studio 2020 should come with all the needed dlls registered and the redistributables should be available for application deployment.

 

 

 

 

TCE Open Date: 

Thursday, December 12, 2019 - 11:34

icpc: error #10106: Fatal error

$
0
0

Encountered on the devcloud...

icpc: error #10106: Fatal error in /glob/development-tools/versions/intel-parallel-studio/compilers_and_libraries_2019.3.199/linux/bin/intel64/mcpcom, terminated by kill signal

Command argmuments

-Wall -Wextra  -wd1011 -O3   -qopenmp -std=gnu++17 

Attached preprocessed source.

TCE Open Date: 

Friday, December 13, 2019 - 08:28

C++11 SFINAE for expressions fails with Intel 18.0 and 19.0 on Windows

$
0
0

C++11 SFINAE for expressions fails with Intel C++ 18.0 and Intel C++ 19.0 even though it succeds with vc++14.1 and vc++14.2. The code:

template<class>
struct ignore {
    typedef void type;
};

template<class T>
T& object();

template<class T, class E = void>
struct trait {
    static const int value = 0;
};

template<class T>
struct trait<T, typename ignore<decltype(&object<T>())>::type> { };

template<class T>
struct result {
    static const int value = T::value;
};

class type {
    void operator&() const { }
};

int test()
{
    return result<trait<type> >::value;
}

int main() 
	{
    return test();
    }

The error:

test_cxx11_sfinae_expression.cpp
test_cxx11_sfinae_expression.cpp(19): error: class "trait<type, void>" has no member "value"
      static const int value = T::value;
                                  ^
          detected during instantiation of class "result<T> [with T=trait<type, void>]" at line 28

The code also fails with earlier versions of Intel C++ on Windows but this is expected since it also fails with vc++14.0 on down. Since Intel C++ is compilng in C++14 mode by default, in order to emulate vc++ 14.1 on up, the code should compile correctly.

TCE Open Date: 

Sunday, December 15, 2019 - 19:45

image::write causing exception

$
0
0

I am trying to write data into an image buffer using image::write but it is causing an exception.

Input image img2 is a simple uchar4 rgba image and I just want to copy this image to new buffer (*out). If I comment out image3Ptr.write, I do not get an exception

uint4 *out = (uint4 *)calloc(fWidth * fHeight, sizeof(uchar4));

cl::sycl::image<2> img2(second, cl::sycl::image_channel_order::rgba,
	cl::sycl::image_channel_type::unsigned_int8, range<2>(sWidth, sHeight));
cl::sycl::image<2> img3(out, cl::sycl::image_channel_order::rgba,
	cl::sycl::image_channel_type::unsigned_int8, range<2>(sWidth, sHeight));
myQueue.submit([&](handler &cgh)
{
	accessor<uint4, 2, access::mode::read, access::target::image> image2Ptr(img2, cgh);
	accessor<uint4, 2, access::mode::write, access::target::image> image3Ptr(img3, cgh);
	cgh.parallel_for<class nn_search1>(
		nd_range<2>(range<2>(fWidth, fHeight), range<2>(1, 1)),
		[=](nd_item<2> item)
	{
		auto idx = item.get_global_id(0);
		auto idy = item.get_global_id(1);
		uint4 v = image2Ptr.read((int2)(idx, idy));
		image3Ptr.write((int2)(idx, idy), v);
	});
});

Exception details: Exception thrown at 0x00007FFA776BBACF (igc64.dll) in PatchMatch.exe: 0xC0000005: Access violation writing location 0x000000000000001A.

Visual studio takes me to handler.hpp, line 407 

detail::EventImplPtr Event = detail::Scheduler::getInstance().addCG(
        std::move(CommandGroup), std::move(MQueue));

and stack trace shows:

     PatchMatch.exe!cl::sycl::handler::finalize() Line 407    C++
     PatchMatch.exe!cl::sycl::detail::queue_impl::submit_impl<`lambda at ..\\source\\PM_SYCL.cpp:531:21'>(nn_search_sycl1::<unnamed-tag> cgf, std::shared_ptr<cl::sycl::detail::queue_impl> self) Line 212    C++
     PatchMatch.exe!cl::sycl::detail::queue_impl::submit<`lambda at ..\\source\\PM_SYCL.cpp:531:21'>(nn_search_sycl1::<unnamed-tag> cgf, std::shared_ptr<cl::sycl::detail::queue_impl> self) Line 106    C++
     PatchMatch.exe!cl::sycl::queue::submit<`lambda at ..\\source\\PM_SYCL.cpp:531:21'>(nn_search_sycl1::<unnamed-tag> cgf) Line 87    C++

 

TCE Open Date: 

Monday, December 16, 2019 - 23:45

Intel® Parallel Studio XE Pro Windows System requirements

$
0
0

Hello.
I would like to know if the latest version of "Intel® Parallel Studio XE Pro for Windows" is still compatible with Windows 7 SP1.

Regards

 

TCE Open Date: 

Tuesday, December 17, 2019 - 00:03

Modifying a char pointer initialized by character string literal should cause an error.

$
0
0

Hi,

In section 6.7.8 of the C99 draft document defines :

      If an attempt is made to use pointer variable p to modify the contents of the array, the behavior is undefined. 

When executing the testcase below, icc does not report an error or modify the value of the variable NISLParameter0 while other compilers such as gcc and clang report runtime errors: “Segmentation fault”. I think it would be better for intelc to throw an error or at least a warning for the wrong action.

 

The OS is:

Linux version 4.15.0-65-generic

The GCC version in path is :

gcc (GCC) 7.3.0

 

TestCase:

#include<stdio.h>

char *function(char *buf){

    int i = 5;

    buf[5] = '1';

    return buf;

}

int main(void){

    char *NISLParameter0 = "abcdefghij";

    char *NISLParameter1 = function(NISLParameter0);

    printf("%s\n", NISLParameter1);

    return 0;

}

 

Compiler Version:

icc (ICC) 19.0.4.243 20190416

 

Output:

abcdefghij

 

Expected output:

Throw an error or at least a warning.

TCE Open Date: 

Tuesday, December 17, 2019 - 05:11

_udiv128 in VS2019, not in ICL2020?

$
0
0

Is there an _udiv128 intrinsic in ICL2020, like there is in VS2019?

I just installed the new Parallel Studio 2020 update, and the following program fails to compile in ICL2020, but compiles and runs just fine in VS2019.  ICL returns the error message:

"error: identifier "_udiv128" is undefined"

 

#include <immintrin.h> // for _udiv128 in VS2019.

int main()
{
  unsigned long long Result;

  _udiv128( 1234, 1234, 12345678, &Result );

  return Result;
} 

 

TCE Open Date: 

Tuesday, December 17, 2019 - 19:06

How do you Remove Old Intel Compiler Versions

$
0
0

Stupid question: I have accumulated a number of obsolete versions of the Intel compilers and need to clean up. I used the brute force method of trashing the whole /opt/intel directory and then installing the current release. Is there a better way to clean up?

TCE Open Date: 

Wednesday, December 18, 2019 - 12:02

Initialisation of for-loop variable using string literal

$
0
0

Hi,

I've recently encountered a compiler error using the Intel compiler using the following code:

inline unsigned long long operator""_abc(const unsigned long long value)
{
    return value;
}

int main()
{
    auto a = 0_abc;
    for (; a < 2_abc; ++a)
    {
    }

    for (auto b = 0_abc; b < 2_abc; ++b)
    {
    }

    return 0;
}

The compiler error I get is 

1>C:\Users\dkoschier\Dev\StringLiteral\StringLiteral\main.cpp(14): error : user-defined literal operator not found
1>      for (auto b = 0_abc; b < 2_abc; ++b)
 

The first for-loop happily compiles while the initialisation in the second one doesn't. I genuinely believe this is a bug in the compiler.

Does anyone know of a way to fix this problem? 

EDIT: Occured using Intel® C++ Compiler 18.0 in Windows 10

TCE Open Date: 

Thursday, December 19, 2019 - 06:46
Viewing all 2797 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>