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

2018.1 crashes in basic code with strings

$
0
0

This crash occurs in Centos 7.4 and Centos 6.9 w/ devtoolkit-6. In other words, GCC 6 plus intel compiler 2018.1. There is no crash using 2018.0. It works fine in -O0 but -O2 and -O3 crash.

#include <cstring>
#include <string>
#include <iostream>

std::string a() {
  return "xxxxxxxxxxxxxxxxxx";
}
std::string b() {
  return std::string("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx") + std::string("x");
}
int main( int argc, char *argv[] ) {
  auto s = a() + b();
  printf("%s, %lu, %lu\n", s.c_str(), s.length(), strlen(s.c_str()));
  return 0;
}


libvpx tests are uncompilable

$
0
0

A few months ago, I compiled libvpx with icc. The output looks good, but at my first attempt, the compiler almost froze the machine compiling it. In the test cases like `tests/dct32x32_test.cc`, there are so many unrollable for statements, and the compiler dying tried to unroll them all. The memory use of icc process kept growing, so I had to kill the make sequence before it could freeze the machine. In the end, I gave up on test programs and compiled the library without them.

void reference_32x32_dct_2d(const int16_t input[kNumCoeffs],
                            double output[kNumCoeffs]) {
  // First transform columns
  for (int i = 0; i < 32; ++i) {
    double temp_in[32], temp_out[32];
    for (int j = 0; j < 32; ++j) temp_in[j] = input[j * 32 + i];
    reference_32x32_dct_1d(temp_in, temp_out);
    for (int j = 0; j < 32; ++j) output[j * 32 + i] = temp_out[j];
  }
  // Then transform rows
  for (int i = 0; i < 32; ++i) {
    double temp_in[32], temp_out[32];
    for (int j = 0; j < 32; ++j) temp_in[j] = output[j + i * 32];
    reference_32x32_dct_1d(temp_in, temp_out);
    // Scale by some magic number
    for (int j = 0; j < 32; ++j) output[j + i * 32] = temp_out[j] / 4;
  }
}

I mean, is it really worth it to optimise this kind of code? I don't know if it's fixed at this point, but the growth of that memory use scared me. I don't have to think about the output binary it would have produced(Oh, maybe the compiler was just doing code branch prediction so it might not have had any effect on the size of the binary)

 

Intel® C++ Compiler 18.0 for Linux gcc requirements

$
0
0

In the Intel C++ Compiler 18.0 for Linux Release Notes:

https://software.intel.com/en-us/articles/intel-c-compiler-180-for-linux-release-notes-for-intel-parallel-studio-xe-2018

says:

  • One of the following Linux distributions (this is the list of distributions tested by Intel; other distributions may or may not work and are not recommended - please refer to Technical Support if you have questions):
    • Debian* 7.0, 8.0, 9.0
    • Fedora* 24, 25, 26
    • Red Hat Enterprise Linux* 6, 7
    • SUSE LINUX Enterprise Server* 11, 12
    • Ubuntu* 14.04 LTS, 15.10, 16.10, 16.04, 17.04 LTS
    • Intel® Cluster Ready
  • Linux Developer tools component installed, including gcc, g++ and related tools
    • gcc versions 4.3 - 6.3 supported
    • binutils versions 2.20-2.26 supported

Linux distribuitions like Fedora 26 (tested by intel) are changing default gcc to gcc 7 and binutils 2.27.

Higher versions of gcc and binutls are planned to be supported in the next updates of 2018? 

Aurelio

C++17 constexpr if

$
0
0

Hi @ all,

I am using constexpr if widely within my code. After a successfull build with the gcc I wanted to use *the good stuff*, namely icpc.

Here is a short example of my code:

/*...*/
  virtual inline void run( ) override {
    #pragma omp parallel for
      for( std::size_t i = 0; i < REP_COUNT; ++i ) {
        //...
        if constexpr( ( PROCESS_DATA_COUNT / 4 ) >= 2 ) {
          //...
        }
        if constexpr( ( PROCESS_DATA_COUNT / 4 ) == 4 ) {
          //...
        }
      }
  }

/*...*/

When I try to compile it with the icpc (Version 18.0.0.128 Build 20170811), it breaks with the following output:

/usr/include/c++/7/bits/stl_pair.h(79): error: inline specifier allowed on function declarations only
    _GLIBCXX17_INLINE constexpr piecewise_construct_t piecewise_construct =
    ^

/usr/include/c++/7/utility(345): error: inline specifier allowed on function declarations only
    inline constexpr in_place_t in_place{};
    ^

 ... error: expected a "("
            if constexpr( ( PROCESS_DATA_COUNT / 4 ) >= 2 ) {
               ^

Is there no constexpr if within the newest icpc? Is there a proper workaround?

 

Sincerely yours

 

 

 

Where is the hardware library for Intel c compiler?

$
0
0

 

Hi all,

I'm having trouble understanding the concept of Parallel Studio.

where is the hardware library? What folder is it in? How do we use the command line to compile source code made in notepad?

how do we create a bare metal native code ia-32 binary capable of running on boot from DVD outside of any operating system?

Intel customer support is terrible, even with a paid license, they aren't helping.

I don't want to make Windows executables, how do I compile bare metal binaries that can run from SPI flash?

How do we make ia-32 firmware with Intel C Compiler? I cannot figure this out, where is the hardware library, and where can I find code examples for using hardware components native to the CPU? I am trying to code for the Intel Atom D410pt. And I need access to its hardware library.  Thanks!

 

 

 

 

 

 

 

Bug report: ICC 18.0.1 reordering write before read

$
0
0

See the repro below on x86-64 Linux (Ubuntu 17.10) I think the -O2 version is returning the wrong result; in the loop in memswp it appears to be writing to *q before reading from it.

$ cat main.c
#include <stdio.h>
extern void memswp(int *p, int *q, int n);
int main()
{
	__attribute__((aligned(4))) char a[] = {'a','b','c','d','e','f','g','h',0};
	memswp((int *)a, (int *)a + 1, 1);
	puts(a);
	return 0;
}
$ cat move.c
void memswp(int *p, int *q, int n)
{
	for (int i = 0; i < n; i++)
	{
		int t                           = ((struct { int x; } *)p + i)->x;
		((struct { int x; } *)p + i)->x = ((struct { int x; } *)q + i)->x;
		((struct { int x; } *)q + i)->x = t;
	}
}
$ icc -O0 main.c move.c -o swp0 && ./swp0
efghabcd
$ icc -O2 main.c move.c -o swp2 && ./swp2
efghefgh
$ icc --version
icc (ICC) 18.0.1 20171018
Copyright (C) 1985-2017 Intel Corporation.  All rights reserved.

DLL dependencies / which & how to avoid them?

$
0
0

Depending on some compiler flags (which I'm not totally sure which ones are triggering) I get a Intel DLL dependency for my project to:

  • svml_dispmd.dll
  • libiomp5md.dll

My project is a /MD compiled DLL with some tights algorithms where I would like to use auto-parallelization and PGO. I would prefer to statically link everything into our DLL, to avoid having to distribute any further DLLs.

I was able to get rid of the svml_dispmd.dll reference by explicitly including: svml_disp.lib but I'm not sure if this is OK or not?

Is there any way to link the Intel provided libraries statically? Especially the MKL?

"__if_exists" Linux support as part of "fms-dialect" option

$
0
0

Hello,

We have a large windows C++ code base with heavy use of the MS VS++ specific "__if_exists" extension.

I know that "__if_exists"  extension is supported with Intel C++ compiler running on windows, but what about using this extension on Linux Intel C++ compiler - is the support of it is included  in "fms-dialect" option?

thank you, dmitry


Debugging on OS X 10.11 with gdb-ia and icc 17.0 update 4

$
0
0

Hi,

I'm trying to debug with gdb-ia code that I've compiled on my Mac running 10.11 (Xcode 7.6.3). It seems that gdb-ia will not longer look for symbols in the .o files but if I do as the documentation says, and run dsymutil on my executable that builds a .dSYM/ bundle and then gdb-ia will find the symbols from there. It actually prints something like: 

jrb@gambino ~/Documents/code --> gdb-ia main
GNU gdb (GDB) 7.10-18.0.543
Copyright (C) 2015 Free Software Foundation, Inc; (C) 2016-2017 Intel Corp.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
...
Type "apropos word" to search for commands related to "word"...
Reading symbols from main...Reading symbols from /Users/jrb/Documents/code/main.dSYM/Contents/Resources/DWARF/main...done.
done.
(gdb) 

great for tiny test cases but I need to debug the executable when it is copied elsewhere and I don't want to copy the main.dSYM bundle there too. gdb has a -s (or -symbol) option that says "read the symbols from this file" but I cannot get that to work. I have tried these variations and none 

jrb@gambino ~/Documents --> gdb-ia -s ~/Documents/code/main.dSYM main

jrb@gambino ~/Documents --> gdb-ia -symbols ~/Documents/code/main.dSYM/Contents/Resources/DWARF/main main

jrb@gambino ~/Documents --> gdb-ia --symbols=~/Documents/code/main.dSYM/Contents/Resources/DWARF/main main

These don't read the dSYM bundle. How do I make gdb-ia find that bundle and read it?

Cheers,

James

c++ std::sort intel compiler error : access violation

$
0
0

Hi,

I'm having some trouble compiling the following code snippet

#include <algorithm>
#define SIZE (1000)

struct S {
	int *vect;
};

int main() {

	struct S* s = (struct S*)(malloc(sizeof(struct S)));

	s->vect = (int*)(malloc(sizeof(int) * SIZE));

	for(int i = 0; i < SIZE; i++) {
		s->vect[i] = i;
	}

	std::sort(s->vect, s->vect + SIZE);

}

The compiler returns the following error related to the std::sort call

1>C:\Program Files (x86)\Microsoft Visual
Studio\2017\Enterprise\VC\Tools\MSVC\14.12.25827\include\algorithm(3138):
error : access violation
1>              return (pair<_RanIt, _RanIt>(_Pfirst, _Plast));
1>                      ^

I'm using visual studio enterprise 2017 version 15.5.2 and the intel compiler 64 bit version 17.0.4.210 Build 20170411.

The code used to work before the latest visual studio update.

Thanks in advance.

Installing Intel C++ Update 1 installation failure on Fedora 27

$
0
0

I recently upgraded from Fedora 26 to Fedora 27. I had previously installed the initial release of  Intel® Parallel Studio XE Professional Edition for Fortran and C++ Linux 18.0 on Fedora 26 successfully. When I went to install Intel® Parallel Studio XE Professional Edition for Fortran and C++ Linux Update 1 on Fedora 27 I received, during the installation process, the message:

Installing Intel Compilers 18.0 Update 1 common files - comp component: failed
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Failed to install component intel-comp-18.0.1-163-18.0.1-163.x86_64.rpm

Does anyone have any ideas why this failed. Might this have something to do with Wayland on Fedora ? I know that that the installation said that Intel® Parallel Studio XE Professional Edition for Fortran and C++ Linux was compatible only with Fedora 25, 26, but that has never stopped me from successfully installing Intel C++ before. Any help with this would be appreciated but it sure would be nice if Intel C++ installations gave some idea of why an installation failed.

 

 

Problem with Intel distribution RPM files

$
0
0

There is a problem with the RPM files in Intel software distributions when running on Fedora 27. In particular, for me, an attempt to install 'Intel Parallel Studio XE Professional Edition for Fortran and C++ Linux 18.0 Update 1' produces an RPM error of "rpm: signature region 62: tag number mismatch il 7 ril 5 dl 658 rdl 16". In the report at https://bugzilla.redhat.com/show_bug.cgi?id=1514190 this error is reported to occur when installing 'intelpython3 2018.1'. So it looks like Intel is distributing RPM files which do not work with the latest RPM file format rules.

Is Intel aware of this problem ? If not how do I report this to Intel so that someone will look at it and correct it for these latest distributions ?

Reporting a bug for Intel C++

$
0
0

How does someone report a bug to Intel about their Parallel Studio XE Professional product ? I searched on the Internet but I could find no bug reporting website for Intel C++ at all. Maybe Intel does not want anyone reporting bugs to them, but I suspect that they actually do. The fact that I could find no bug reporting site is disappointing. I have a developer's license for the Parallel Studio XE Professional product for both Window and Linux.

OpenMP leaves thread open

$
0
0

I'm just starting with Intel C++18.0 under Visual Studio 15. I mainly am mainly interested in switching to Intel from the MS compiler because of the poor support for OpenMP in the native VS compiler. I'm testing speed on the following piece of code:

    #pragma omp parallel for private(i) shared(a,b,c,m,n) if (m > symtest1 && n > symtest2)
    for (i = 0 ; i < n ; i++) {
        MatrixMultSymmVect(a,b+i*m,c+i*m,m);
    }

(with various test values for symtest1 and symtest2--yes, I know the shared clause is overkill). When I run this, it seems to do the parallel computing OK (sometimes better, sometimes worse depending upon the number of trips), however, when I close the application, it continues to show in the Task Manager as a "background process" hogging one thread worth of CPU resources.  If openMP is never invoked, that doesn't happen. I did not have this problem with the VS compiler.

Note that the controlling application itself uses two threads---one for computation (which would be the active thread when it hits the above code), and one for interface. I don't know if there's something about OpenMP that's interfering with that.

 

who are using svml,i have some question about svml

$
0
0

hi everyone

i have somequestion about svml(short vector math library),are there any one using svml in a open project,or any open project used svml;i want to know the performance of svml vs scalar libm


Minimal symbol differences between msvc and icc

$
0
0

ICC latest
??R?$AdjustContrastv2@UGpuDevice@Eigen@@@functor@tensorflow@@QEAAXAEBUGpuDevice@Eigen@@V?$TensorMap@V?$Tensor@$$CBM$03$00_J@Eigen@@$0BA@UMakePointer@2@@4@V?$TensorMap@V?$TensorFixedSize@$$CBMU?$Sizes@$$V@Eigen@@$00_J@Eigen@@$0BA@UMakePointer@2@@4@V?$TensorMap@V?$Tensor@M$03$00_J@Eigen@@$0BA@UMakePointer@2@@4@@Z

MSVC latest
??R?$AdjustContrastv2@UGpuDevice@Eigen@@@functor@tensorflow@@QEAAXAEBUGpuDevice@Eigen@@V?$TensorMap@V?$Tensor@$$CBM$03$00_J@Eigen@@$0BA@UMakePointer@2@@4@V?$TensorMap@V?$TensorFixedSize@$$CBMU?$Sizes@$S@Eigen@@$00_J@Eigen@@$0BA@UMakePointer@2@@4@V?$TensorMap@V?$Tensor@M$03$00_J@Eigen@@$0BA@UMakePointer@2@@4@@Z

The differences are marked.

'Sizes' struct is defined like this:
template <typename std::ptrdiff_t... Indices>
struct Sizes {...}

This is a problem, because I can't use ICC as host compiler for CUDA in windows, so there will be mismatches in the symbols which leads to linker errors.
It was asked a lot of times, but we still have no real ICC support for CUDA. 

 

Can icc work with portage

$
0
0

Today I am trying to emerge a package on Gentoo Linux.   

It always fails because of `Error: A license for Comp-CL is not available (-9,57).`

I can compile the same package out of portage.

the error is as following.

icpc  -march=native -O2 -pipe -fPIC -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DRAR_SMP -DRARDLL -c ../rar.cpp

Error: A license for Comp-CL is not available (-9,57).

License file(s) used were (in this order):
**  1.  /opt/intel/compilers_and_libraries_2018.1.163/linux/licenses
**  2.  /opt/intel/licenses/((((my licenses)))).lic
...
Please refer http://software.intel.com/sites/support/ for more information..

icpc: error #10052: could not checkout FLEXlm license
make: *** [../makefile:132: rar.o] Error 1

 

Cannot Install Parallel Studio on CentOS

$
0
0

Dear Intel Engineers,

I am trying to install Intel Parallel Studio XE 2018 Update 1 for linux on CentOS 7.2 which installed on OpenStack.

Unfortunately, I am now stuck on "Step 2 : License agreement". After insert "accept", the install programm told me  "Checking the prerequisites. It can take several minutes. Please wait...", I have waited couple of hours. The installation process is now in the IDLE status, with cpu percentage 0.0%.

Have you ever met this kind of problems?

Thanks

zhongqi

Cannot download Composer XE Linux after having downloaded the WIN version

$
0
0

Hi,

In our office we have floating licenses for Windows and Linux parallel studio XE compiler. I was told by our IT person to go to the download center of Intel, download the installers (the trial versions) and then set the floating license. 

I was able to download and install successfully the Windows version ( from https://software.seek.intel.com/ps-w​ ), but when I go to https://software.seek.intel.com/ps-l for the Linux version, I get an error ( https://www-ssl.intel.com/content/www/us/en/404.html?aspxerrorpath=/en/u...​ ) . I suspect this is related to the fact that my email is already linked to the win download. 

Could you please provide an alternative link to download the Linux version installer?

Thank you,

Pablo

Intel C++ Compiler 17 :unable to run 'C:\PROGRA~2\INTELS~1\COMPIL~1\windows\bin\intel64_mic\icc.exe'

$
0
0

Error :unable to run 'C:\PROGRA~2\INTELS~1\COMPIL~1\windows\bin\intel64_mic\icc.exe' when using Intel c++ compiler17 for offloading on intel xeon phi coprocessor(mic) using OpenMP4.0/4.5 Directives for offloading.

Viewing all 2797 articles
Browse latest View live


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