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

Visual Studio 2017 15.9

$
0
0

Can anyone tell me if there are any problems with VS 2017 15.9 ( latest update) and the Intel 2018/2019 compilers. I have been badly burnt before by VS 2017 updates breaking the Intel Compilers.... such is the downside of continuous deployment that the Visual Studio team are now using.


Compiling NCBI BLAST 2.7.1 -- error #3377: constexpr function return is non-constant

$
0
0

Hi,

I've been trying to compile the NCBI BLAST toolkit 2.7.1 release in CentOS 7.5 using the 2017 (17.0.2 20170213) version of the Parallel Studio. I keep getting the following error when compiling:

ncbi-blast-2.7.1+-src/c++/include/corelib/ncbifloat.h(78): error #3377: constexpr function return is non-constant
      inline ISNAN_CONSTEXPR bool bool_isnan(double x)      { return isnan(x); }
                                                                     ^

I haven't seen this problem compiling an older version of BLAST (2.2.31). I can compile the toolkit with GCC 6.3.0.

I put the code of the offending header file below.

Has anyone seen a similar problem, or know what I can do to fix the compilation?

Thank you!

#ifndef CORELIB___NCBIFLOAT__H
#define CORELIB___NCBIFLOAT__H

/*  $Id: ncbifloat.h 453541 2014-12-04 14:58:29Z ucko $
 * ===========================================================================
 *
 *                            PUBLIC DOMAIN NOTICE
 *               National Center for Biotechnology Information
 *
 *  This software/database is a "United States Government Work" under the
 *  terms of the United States Copyright Act.  It was written as part of
 *  the author's official duties as a United States Government employee and
 *  thus cannot be copyrighted.  This software/database is freely available
 *  to the public for use. The National Library of Medicine and the U.S.
 *  Government have not placed any restriction on its use or reproduction.
 *
 *  Although all reasonable efforts have been taken to ensure the accuracy
 *  and reliability of the software and data, the NLM and the U.S.
 *  Government do not and cannot warrant the performance or results that
 *  may be obtained by using this software or data. The NLM and the U.S.
 *  Government disclaim all warranties, express or implied, including
 *  warranties of performance, merchantability or fitness for any particular
 *  purpose.
 *
 *  Please cite the author in any work or product based on this material.
 *
 * ===========================================================================
 *
 * Author:  Andrei Gourianov
 *
 *
 */

/**
 * @file ncbifloat.h
*
 * Floating-point support routines.
 *
 */

/** @addtogroup Exception
 *
 * @{
 */


#include <ncbiconf.h>

#if defined(NCBI_OS_MSWIN)
#   include <float.h>
#elif defined(HAVE_IEEEFP_H)
#   if defined(NCBI_OS_CYGWIN) && defined(__cplusplus)
/* At least some versions of Cygwin's ieeefp.h fail to use extern "C",
 * requiring us to. :-/ */
extern "C" {
#      include <ieeefp.h>
}
#   else
#      include <ieeefp.h>
#   endif
#endif

#if defined(NCBI_HAVE_CXX11)  && \
    (!defined(__GLIBCXX__)  ||  defined(_GLIBCXX_USE_C99_MATH))
// Kludge to avoid formal ambiguity in C++ '11 between ::isnan, which
// returns int, and std::isnan, which returns bool.
#  include <cmath>
#  ifdef isnan
#    undef isnan
#  endif
#  if __cplusplus >= 201103L  &&  defined(_GLIBCXX_CONSTEXPR)  \
    &&  !defined(__MIC__)
#    define ISNAN_CONSTEXPR _GLIBCXX_CONSTEXPR
#  else
#    define ISNAN_CONSTEXPR
#  endif
namespace std {
    inline ISNAN_CONSTEXPR bool bool_isnan(float x)       { return isnan(x); }
    inline ISNAN_CONSTEXPR bool bool_isnan(double x)      { return isnan(x); }
    inline ISNAN_CONSTEXPR bool bool_isnan(long double x) { return isnan(x); }
}
// Unbreak <boost/math/special_functions/fpclassify.hpp>.
namespace boost {
    namespace math_detail {
        using std::bool_isnan;
    }
}
#  define isnan bool_isnan
#elif defined(NCBI_OS_DARWIN)
  include <cmath>
#endif

#if defined(NCBI_OS_MSWIN)  &&  !defined(isnan)
/**
 * Define value of isnan (Is Not A Number).
 *
 * Checks double-precision value for not a number (NaN).
 */
#   define isnan _isnan
#endif

#if defined(NCBI_OS_MSWIN)
/**
 * Define value of finite (Is Finite).
 *
 * Checks whether given double-precision floating point value is finite
 */
   define finite _finite
#elif defined(NCBI_OS_DARWIN)
/**
 * Define value of finite (Is Finite).
 *
 * Checks whether given double-precision floating point value is finite
 */
#   ifdef finite
#     undef finite
#   endif
#   define finite isfinite
#endif


#endif  /* CORELIB___NCBIFLOAT__H */


/* @} */

 

Transfer license owner

$
0
0

I need some help with transferring floating license ownership from a person who has left my company to myself.

Linker Error in debug build

$
0
0

Using icpc (ICC) 19.0.1.144 20181018. The following (stand alone) code compiles and links as expected when using

"icpc -std=c++17 error.cpp -o exec"

However, building a debug executable by turning on either -g or -O0 flag results in a linker error.

// error.cpp
#include <vector>
 
constexpr bool decider = false;
 
void Function() {
 
   std::vector<unsigned long long> v1;
 
   if constexpr( decider ) {
      if( false ) {}
      std::vector<unsigned long long> v2 = v1;
   }
}
 
int main() {return 0;}

 

ICC: Multiple issues when header not included

$
0
0

With ICC 19.0.1.144 as well as older versions I experience the following behavior which I think are bugs in the compiler:

Take the following very simple code:

---
#include

int main (int argc, char* argv[]) {
printf("%f\n", fabs(0.5));
return 0;
}
---

It's missing an include of for fabs(). However, when compiling it with ICC using -Wmissing-prototypes I receive no warning. Instead it silently generates a prototype for fabs() and works as intended:

---
$ icc -Wmissing-prototypes -o test test.c
$ ./test
0.500000
---

Using -Wall also does not show it. Is that how it's supposed to be?

Now, here comes the second issue: If I compile the code with -g to include debugging symbols, ICC suddenly thinks of a wrong signature for fabs(), returning an int. Again, I receive no warning about the missing prototype:

---
$ icc -g -Wmissing-prototypes -o test test.c
$ ./test
0.000000
---

Note that the behavior of the program changed by adding -g to the compiler call. This does not seem right to me... One gets a bit more insight into this calling icc with -Wall, since printf() isn't happy here:

---
test.c(4): warning #181: argument of type "int" is incompatible with format "%f", expecting argument of type "double"
printf("%f\n", fabs(0.5));
^
---

Issue with Serial Number for Parallel Studio XE Installation

$
0
0

Hello everyone,

I am sorry to post this here but I wasn't able to find any other related forums. 

I am trying to install Intel Cluster Tools 2013 SP1 Update 1 on Windows 10, As I am a student, Intel provided a serial number for me, but when I try using it I get the error "Activation rights do not allow this software to be installed. This could be due to expired subscription or incompatible serial number", and when I download the license file and use it, I get the error "license file provided is invalid".

I tried redownloading the license file as well. Nothing seems to work.

Please let me know what you think the problem is. Thank you.

Pin Tool Building Issues in Windows

$
0
0

Hi,

Before I start in case I should post this question in a different section, please let me know I would be happy to move it.

I'm currently facing the below issue while building the PinTool.

Below is the environment:

Operating SystemS: windows 7 x64 sp1

Visual Studio: 2012

Pin Tool :- 3.7.97

After running make command as per REDME file I'm getting the below error.

C:\PinTool\source\tools\SimpleExamples>make obj-intel64/opcodemix.dll
mkdir -p obj-intel64/
cl /MT /EHs- /EHa- /wd4530 /DTARGET_WINDOWS /nologo /Gy /Oi- /GR- /GS- /D__PIN__
=1 /DPIN_CRT=1 /D_WINDOWS_H_PATH_="C:\Program Files (x86)\Windows Kits\8.0\Inclu
de\um" /D__LP64__ /DTARGET_IA32E /DHOST_IA32E  /I../../../source/include/pin /I.
./../../source/include/pin/gen -I../../../extras/stlport/include -I../../../extr
as -I../../../extras/libstdc++/include -I../../../extras/crt/include -I../../../
extras/crt -I../../../extras/crt/include/arch-x86_64 -I../../../extras/crt/inclu
de/kernel/uapi -I../../../extras/crt/include/kernel/uapi/asm-x86 /FIinclude/msvc
_compat.h /I../../../extras/components/include /I../../../extras/xed-intel64/inc
lude/xed /I../../../source/tools/InstLib /O2  /c /Foobj-intel64/opcodemix.obj op
codemix.cpp
opcodemix.cpp
../../../extras/stlport/include\stl/char_traits.h(83) : error C2118: negative su
bscript
make: *** [../../../source/tools/Config/makefile.default.rules:196: obj-intel64/
opcodemix.obj] Error 2

Please let me know how can I fix it?

I tried some old PinTool releases that also giving me the same error.

Thanks,

Bhakta

 

icc 18.0.0 20170811 seems to be unsupported in Xcode 9.1!!!

$
0
0

After updating last week Xcode from 9.0 to 9.1, it seems to me that the icc compiler (version 18.0.0 20170811) stopped to be supported by the editor. I was wondering whether there may be a workaround I can use to fix this temporarily.

Thanks,


icpc incorrectly links to symbolic linked library

$
0
0

We are using icpc to dynamically link to an oracle library as follows:

icpc -shared -m64 -static-intel  -Wl,--version-script .... (object list) ... -L/home/oracle/app/oracle/product/12.1.0/dbhome_1/lib -lclntsh

In the directory /home/oracle/app/oracle/product/12.1.0/dbhome_1/lib, we have the symbolic link:

lrwxrwxrwx 1 oracle oinstall    69 May 8 2017 libclntsh.so -> /home/oracle/app/oracle/product/12.1.0/dbhome_1/lib/libclntsh.so.12.1

 

We assume that this link will produce a library which will dependant on libclntsh.so .  But the resulted library is dependent on libclntsh.so.12.1, which is the symolic linked library. This causes our library not to be version in dependent.

Please advise.

Thanks in advanced

catastrophic error - bits/c++config.h (icpc 19.0.1.144)

$
0
0

Hi,

I am trying to compile a simple program with icpc version 19.0.1.144 (gcc version 8.2.0 compatibility) and I get the following error:

icpc -g -O2 -std=c++17 -I. -c main.cc -o main.o
In file included from main.cc(4):
/usr/include/c++/8/iostream(38): catastrophic error: cannot open source file "bits/c++config.h"
  #include <bits/c++config.h>
                                            ^

If I add the gcc8 include path "-I/usr/include/x86_64-linux-gnu/c++/8", I can compile the code. However, this seems like a bug (I shouldn't have to tell the compiler where it's headers are installed.)

I have also tried using gcc7, but get the same error, i.e.,

icpc -g -O2 -std=c++17 -gxx-name=/usr/bin/x86_64-linux-gnu-g++-7 -I. -c main.cc -o main.o
In file included from main.cc(4):
/usr/include/c++/7/iostream(38): catastrophic error: cannot open source file "bits/c++config.h"
  #include <bits/c++config.h>
                                            ^

I am running on Ubuntu 18.04:

Linux momoney 4.15.0-43-generic #46-Ubuntu SMP Thu Dec 6 14:45:28 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

>>>>>> lsb_release -a
No LSB modules are available.
Distributor ID:    Ubuntu
Description:    Ubuntu 18.04.1 LTS
Release:    18.04
Codename:    bionic

My g++ version is:

Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/8/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 8.2.0-1ubuntu2~18.04' --with-bugurl=file:///usr/share/doc/gcc-8/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-8 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 8.2.0 (Ubuntu 8.2.0-1ubuntu2~18.04)

The test program that I am trying to compile is:

#include <iostream>

int main(int argc, char ** argv) {

  return 0;
} // main

Assertion in shared/cfe/edgcpfe/exprutil.c

$
0
0

Compiling revision
https://github.com/idaholab/moose/pull/12703/commits/7e842a5348523cebe36...
of the MOOSE Framework with icc 18.0.1 gives:

 

[Ubuntu-16][/ssd/schwd/moose/modules]> make -j 32
Compiling C++ (in opt mode) /ssd/schwd/moose/modules/tensor_mechanics/build/unity_src/kernels_Unity.C...
/ssd/schwd/moose/modules/tensor_mechanics/src/kernels/ADStressDivergenceTensors.C(46): internal error: assertion failed at: "shared/cfe/edgcpfe/exprutil.c", line 17133

      _disp_var[i] = coupled("displacements", i);
                     ^

The commit
https://github.com/idaholab/moose/pull/12703/commits/4f720c63730d11740cc...
fixes the build.

 

[Ubuntu-16][/ssd/schwd/moose/modules]> icc -v
icc version 18.0.1 (gcc version 5.4.0 compatibility)

 

Graphic library to use with intel C++

$
0
0

Hello all.

Am writing a fortran code using the intel fortran ..

Now I want to write a GUI for it. if I use IVF it cannot be used in Linux systems.

 

So I thought to write GUI in C++ and call my fortran routines from that..

So the question is which graphic library to use with INTEL c++ ???

It needs to be compatible with INTEL C++ and cross platform too..

 

Please suggest..

 

Thank you..

assertion failed: reconcile_routine_types: shared param types unexpected (shared/cfe/edgcpfe/decls.c, line 5524)

$
0
0

Hello!

Here is minimal working example, where combination of typedefed templated method type with static keyword results into compilation failure:

template<typename T>
using func_t = void (T x);

class MyClass
{
public:
template<typename T>
    static func_t<T> method;
};

template<typename T>
void MyClass::method(T x)
{
}

 

Namely, I am getting following error:

internal error: assertion failed: reconcile_routine_types: shared param types unexpected (shared/cfe/edgcpfe/decls.c, line 5524)"

 

If I simply substitute templated typedef, compilation works fine. Presented example compiles with other compilers (gnu) but fails with Intel 2015, 2016 2017 and 2018 compilers with -std=c++11 flag.

License Compliance Fail: Missing redist.txt files in Intel Parallel Studio XE 2018

$
0
0

Since the 2016 Intel Composer Suite product release, there have been several redistribution license files for elements of the comprehensive product that are missing. I was able to audit the following historical versions:
2011.sp1.9.293
2013.0.079
2013.3.163
2013.4.183
1025.3.187
2015.5.223

In each of those releases, we were able to use the following redistribution guidelines under ...Documentation/en_US/
.../ipp/redist.txt
.../mkl/redist.txt
.../tbb/redist.txt
.../credist.txt
.../fredist.txt

Beginning in 2016, in every release since, including the 2018 Parallel Studio XE, we have only the following:
.../licensing/compiler/en//credist.txt
.../licensing/compiler/en//fredist.txt
.../licensing/mpi/en/redist_rt.txt

Redistribution guidance for the library products, namely MKL, IPP, TBB, and so on, are missing from the newer releases of the comprehensive product. This makes it impossible to comply with the terms of Intel's licenses when redistributing dynamically-linked binaries. We would like to see these files added back into Parallel Studio XE as quickly as possible and to have a patchlevel release made available that includes them.

Thank you.

Build C/C++ application using VSCODE

$
0
0

Hi,
I have latest Intel Parallel Studio XE 2019.1, and I want to compile my C/C++  sources using Intel Compiler toolchain using VSCode.
It has build task configuration, Launch and Attach configuration I have tried some attempts and failed,
I need your guidance and help to Compile + Link and Run and Debug, simply build a C/C++ Application and Debug it using Intel Compiler and latest VsCode. 
Also, one thing I want to note is, ICL command has not been set as an environment variable by the Intel parallel studio installer.
I tried to run "C:\Program Files (x86)\IntelSWTools\parallel_studio_xe_2019.1.051\bin\psxevars.bat" through VSCode as pre-compilation/before the compilation kicks in but It was not working.
(Please don't suggest to use Visual Studio 2015/17 I want to try this with VSCode editor.)

Once again I want to compile, link, run and debug simple C/C++ source file with VSCode simply.
Looking forward for simple and clear guidance.
Thank you for listening and appreciate if you and provide a neat and elegant approach.
 


Inline variable support in intel 19 compiler

$
0
0
The following code compiles and runs properly with gcc 8.2.0 (using -std=c++17).
It also compiles with icc 19.0.1.144, but throws a 'Floating point exception' when trying to access 'map' in the constructor.

#include <iostream>
#include <unordered_map>

struct A {
    static inline std::unordered_map<int, int> map;
    A(){
        map[1] = 2;
    }
};

int main(){
    A a;
}

A similar code with a primitive or 'std::vector' in place of 'std::unordered_map' does appears to work.

Am I missing something or is this a problem with the compiler?

This question was first posted here

FFTW compilation issue (autoconf for standard headers fails)

$
0
0

Hi,

I try to compile FFTW 3.3.8 on Ubuntu 18.10 and get the following errors (note that I have remove some lines)

checking fcntl.h usability... no
checking fcntl.h presence... yes
configure: WARNING: fcntl.h: present but cannot be compiled
configure: WARNING: fcntl.h:     check for missing prerequisite headers?
checking for fcntl.h... no
checking fenv.h usability... no
checking fenv.h presence... yes
configure: WARNING: fenv.h: present but cannot be compiled
configure: WARNING: fenv.h:     check for missing prerequisite headers?
checking for fenv.h... no
checking limits.h usability... no
checking limits.h presence... yes
configure: WARNING: limits.h: present but cannot be compiled
configure: WARNING: limits.h:     check for missing prerequisite headers?
checking for limits.h... no
checking malloc.h usability... no
checking malloc.h presence... yes
configure: WARNING: malloc.h: present but cannot be compiled
configure: WARNING: malloc.h:     check for missing prerequisite headers?
checking for malloc.h... no
checking stddef.h usability... no
checking stddef.h presence... yes
configure: WARNING: stddef.h: present but cannot be compiled
configure: WARNING: stddef.h:     check for missing prerequisite headers?
checking for stddef.h... no
checking sys/time.h usability... no
checking sys/time.h presence... yes
configure: WARNING: sys/time.h: present but cannot be compiled
configure: WARNING: sys/time.h:     check for missing prerequisite headers?
checking for sys/time.h... no
checking altivec.h usability... no
checking altivec.h presence... no
checking for altivec.h... no
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for size_t... no
checking for uint32_t... no
checking for uint64_t... no
checking whether time.h and sys/time.h may both be included... no
checking for long double... no
checking for hrtime_t... no
checking size of int... 0
checking size of unsigned int... 0
checking size of long... 0
checking size of unsigned long... 0
checking size of long long... 0
checking size of unsigned long long... 0
checking size of size_t... 0
checking size of ptrdiff_t... 0
checking for ptrdiff_t... no
checking for uintptr_t... no
checking size of void *... 0
checking size of float... 0
checking size of double... 0
checking size of fftw_r2r_kind... 0
configure: error: sizeof(fftw_r2r_kind) test failed

So essentially, something with respect to the system headers went terribly wrong.

Please note that I have updated to the more recent gcc compilers 8.2

icc version 19.0.1.144 (gcc version 8.2.0 compatibility)

 

Debugging OpenMP programs

$
0
0

Hello,

I have a program - call it A - that makes heavy use of OpenMP. I see the CPU time going down as I increase the number of threads in my "#pragma omp for" loops.

When this program is called from within another program - call it B - that also uses OpenMP, suddenly I no longer see the CPU going down as when A runs in stand-alone mode.

I could use help in two questions:

1) Does anybody know of something that program B could be doing that would prevent program A from parallelizing properly?

2) Is there a way that I can compile/link my program (perhaps both A and B), so that every call/instance of an OpenMP directive is sent to a console window so I can see what program B may be doing that is making A no longer run in parallel?

Thanks.

-Arthur

Annotated source listing for template

$
0
0

I use /Qopt-report-annotate to annotate source files with optimisation reporting. It's very useful and simple to use. I go directly to the part that I know is slow and I read what the compiler have done.

Nonetheless when there is template code (in a header file), we have no annotated file for each template instantiation. The information is available via /Qopt-report:3 but then we have to go back and forth between the header file and the optrpt file to verify each optimisation.

Is there any option to have also these template annotated.
Such a feature will be greatly appreciated.

icc 17.0 can't compile immintrin.h header from gcc 4.4.7

$
0
0

I am trying to compile our project with icc with -mavx option, and it cannot recognise gcc built-ins from avxintrin.h (such as __builtin_ia32_loadupd256 and __m256d). We don't include the header directly, it comes from tbb headers through immintrin.h header. How can I fix this issue? Or is gcc 4.7 just too old for icc 17, i.e. not supported?

Viewing all 2797 articles
Browse latest View live


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