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

Guided autoparallelism error in Visual Studio Community 2017 + Educator Intel Parallel Studio XE Cluster


pybind11 linking error with ICC 18.0 and 19.0 but not 17.0

$
0
0

I report this here and not on the pybind11 issues as it is a problem related to ICC on Windows. The code compiles and links with ICC 17.0 but not with ICC 18.0 (I checked with updates 2 and 4) nor 19.0 (initial release and update 1). It also compiles with MSVC and MinGW-w64.

The problem is that the linker will fail if the the main pybind11 module cpp file calls a function defined in another pybind11 wrapper cpp file. The following code can be used to reproduce the issue, using pybind11 2.2.4.

Main pybind11 module:

#include <pybind11/pybind11.h>
#include <iostream>

namespace py = pybind11;

void my_function() 
{
    std::cout << "my_function()\n";
}

void init_other(py::module& m);

PYBIND11_MODULE(test, m) 
{
    m.def("my_function", &my_function);
    init_other(m);
}

Other pybind11 wrapper file:

#include <pybind11/pybind11.h>
#include <iostream>

namespace py = pybind11;

void my_other_function() 
{
    std::cout << "my_other_function()\n";
}

void init_other(py::module& m) 
{
    m.def("my_other_function", &my_other_function);
}

This produces the following errors:

1>other.obj : : error LNK2005: "public: static void __cdecl `struct pybind11::detail::internals & __cdecl pybind11::detail::get_internals(void)'::`7'::_FUNC<lambda_2>(class std::exception_ptr)" (?_FUNC<lambda_2>@?6??get_internals@detail@pybind11@@YAAEAUinternals@23@XZ@SAXVexception_ptr@std@@@Z) already defined in module.obj
1>other.obj : : error LNK2005: "public: static void __cdecl `struct pybind11::detail::internals & __cdecl pybind11::detail::get_internals(void)'::`9'::_FUNC<lambda_3>(class std::exception_ptr)" (?_FUNC<lambda_3>@?8??get_internals@detail@pybind11@@YAAEAUinternals@23@XZ@SAXVexception_ptr@std@@@Z) already defined in module.obj
1>other.obj : : error LNK2005: "public: static void __cdecl `public: __cdecl pybind11::capsule::capsule(void const *,void (__cdecl*)(void *))'::`2'::_FUNC<lambda_0>(struct _object *)" (?_FUNC<lambda_0>@?1???0capsule@pybind11@@QEAA@PEBXP6AXPEAX@Z@Z@SAXPEAU_object@@@Z) already defined in module.obj
1>other.obj : : error LNK2005: "public: static void __cdecl `protected: void __cdecl pybind11::cpp_function::initialize_generic(struct pybind11::detail::function_record *,char const *,class type_info const * const *,unsigned __int64)'::`80'::_FUNC<lambda_4>(void *)" (?_FUNC<lambda_4>@?FA@??initialize_generic@cpp_function@pybind11@@IEAAXPEAUfunction_record@detail@3@PEBDPEBQEBVtype_info@@_K@Z@SAXPEAX@Z) already defined in module.obj
1>other.obj : : error LNK2005: "public: static class pybind11::handle __cdecl `protected: void __cdecl pybind11::cpp_function::initialize<class `struct std::pair<class std::_List_iterator<class std::_List_val<struct std::_List_simple_types<struct std::pair<struct _typeobject * const,class std::vector<struct pybind11::detail::type_info *,class std::allocator<struct pybind11::detail::type_info *> > > > > >,bool> __cdecl pybind11::detail::all_type_info_get_cache(struct _typeobject *)'::`5'::<lambda_8>,void,class pybind11::handle>(class `struct std::pair<class std::_List_iterator<class std::_List_val<struct std::_List_simple_types<struct std::pair<struct _typeobject * const,class std::vector<struct pybind11::detail::type_info *,class std::allocator<struct pybind11::detail::type_info *> > > > > >,bool> __cdecl pybind11::detail::all_type_info_get_cache(struct _typeobject *)'::`5'::<lambda_8> &&,void (__cdecl*)(class pybind11::handle))'::`2'::_FUNC<lambda_17>(struct pybind11::detail::function_call &)" (?_FUNC<lambda_17>@?1???$initialize@V<lambda_8>@?4??all_type_info_get_cache@detail@pybind11@@YA?AU?$pair@V?$_List_iterator@V?$_List_val@U?$_List_simple_types@U?$pair@QEAU_typeobject@@V?$vector@PEAUtype_info@detail@pybind11@@V?$allocator@PEAUtype_info@detail@pybind11@@@std@@@std@@@std@@@std@@@std@@@std@@_N@std@@PEAU_typeobject@@@Z@XVhandle@4@$$V@cpp_function@pybind11@@IEAAX$$QEAV<lambda_8>@?4??all_type_info_get_cache@detail@2@YA?AU?$pair@V?$_List_iterator@V?$_List_val@U?$_List_simple_types@U?$pair@QEAU_typeobject@@V?$vector@PEAUtype_info@detail@pybind11@@V?$allocator@PEAUtype_info@detail@pybind11@@@std@@@std@@@std@@@std@@@std@@@std@@_N@std@@PEAU_typeobject@@@Z@P6AXVhandle@2@@Z@Z@SA?AV92@AEAUfunction_call@52@@Z) already defined in module.obj
1>other.obj : : error LNK2005: "public: static void __cdecl `protected: void __cdecl pybind11::cpp_function::initialize<class `struct std::pair<class std::_List_iterator<class std::_List_val<struct std::_List_simple_types<struct std::pair<struct _typeobject * const,class std::vector<struct pybind11::detail::type_info *,class std::allocator<struct pybind11::detail::type_info *> > > > > >,bool> __cdecl pybind11::detail::all_type_info_get_cache(struct _typeobject *)'::`5'::<lambda_8>,void,class pybind11::handle>(class `struct std::pair<class std::_List_iterator<class std::_List_val<struct std::_List_simple_types<struct std::pair<struct _typeobject * const,class std::vector<struct pybind11::detail::type_info *,class std::allocator<struct pybind11::detail::type_info *> > > > > >,bool> __cdecl pybind11::detail::all_type_info_get_cache(struct _typeobject *)'::`5'::<lambda_8> &&,void (__cdecl*)(class pybind11::handle))'::`7'::_FUNC<lambda_15>(struct pybind11::detail::function_record *)" (?_FUNC<lambda_15>@?6???$initialize@V<lambda_8>@?4??all_type_info_get_cache@detail@pybind11@@YA?AU?$pair@V?$_List_iterator@V?$_List_val@U?$_List_simple_types@U?$pair@QEAU_typeobject@@V?$vector@PEAUtype_info@detail@pybind11@@V?$allocator@PEAUtype_info@detail@pybind11@@@std@@@std@@@std@@@std@@@std@@@std@@_N@std@@PEAU_typeobject@@@Z@XVhandle@4@$$V@cpp_function@pybind11@@IEAAX$$QEAV<lambda_8>@?4??all_type_info_get_cache@detail@2@YA?AU?$pair@V?$_List_iterator@V?$_List_val@U?$_List_simple_types@U?$pair@QEAU_typeobject@@V?$vector@PEAUtype_info@detail@pybind11@@V?$allocator@PEAUtype_info@detail@pybind11@@@std@@@std@@@std@@@std@@@std@@@std@@_N@std@@PEAU_typeobject@@@Z@P6AXVhandle@2@@Z@Z@SAXPEAUfunction_record@52@@Z) already defined in module.obj
1>other.obj : : error LNK2005: "public: static void __cdecl `protected: void __cdecl pybind11::cpp_function::initialize<class `struct std::pair<class std::_List_iterator<class std::_List_val<struct std::_List_simple_types<struct std::pair<struct _typeobject * const,class std::vector<struct pybind11::detail::type_info *,class std::allocator<struct pybind11::detail::type_info *> > > > > >,bool> __cdecl pybind11::detail::all_type_info_get_cache(struct _typeobject *)'::`5'::<lambda_8>,void,class pybind11::handle>(class `struct std::pair<class std::_List_iterator<class std::_List_val<struct std::_List_simple_types<struct std::pair<struct _typeobject * const,class std::vector<struct pybind11::detail::type_info *,class std::allocator<struct pybind11::detail::type_info *> > > > > >,bool> __cdecl pybind11::detail::all_type_info_get_cache(struct _typeobject *)'::`5'::<lambda_8> &&,void (__cdecl*)(class pybind11::handle))'::`9'::_FUNC<lambda_16>(struct pybind11::detail::function_record *)" (?_FUNC<lambda_16>@?8???$initialize@V<lambda_8>@?4??all_type_info_get_cache@detail@pybind11@@YA?AU?$pair@V?$_List_iterator@V?$_List_val@U?$_List_simple_types@U?$pair@QEAU_typeobject@@V?$vector@PEAUtype_info@detail@pybind11@@V?$allocator@PEAUtype_info@detail@pybind11@@@std@@@std@@@std@@@std@@@std@@@std@@_N@std@@PEAU_typeobject@@@Z@XVhandle@4@$$V@cpp_function@pybind11@@IEAAX$$QEAV<lambda_8>@?4??all_type_info_get_cache@detail@2@YA?AU?$pair@V?$_List_iterator@V?$_List_val@U?$_List_simple_types@U?$pair@QEAU_typeobject@@V?$vector@PEAUtype_info@detail@pybind11@@V?$allocator@PEAUtype_info@detail@pybind11@@@std@@@std@@@std@@@std@@@std@@@std@@_N@std@@PEAU_typeobject@@@Z@P6AXVhandle@2@@Z@Z@SAXPEAUfunction_record@52@@Z) already defined in module.obj
1>other.obj : : error LNK2005: "public: static class pybind11::handle __cdecl `protected: void __cdecl pybind11::cpp_function::initialize<void (__cdecl*&)(void),void,struct pybind11::name,struct pybind11::scope,struct pybind11::sibling>(void (__cdecl*&)(void),void (__cdecl*)(void),struct pybind11::name const &,struct pybind11::scope const &,struct pybind11::sibling const &)'::`2'::_FUNC<lambda_20>(struct pybind11::detail::function_call &)" (?_FUNC<lambda_20>@?1???$initialize@AEAP6AXXZXUname@pybind11@@Uscope@2@Usibling@2@@cpp_function@pybind11@@IEAAXAEAP6AXXZP6AXXZAEBUname@2@AEBUscope@2@AEBUsibling@2@@Z@SA?AVhandle@2@AEAUfunction_call@detail@2@@Z) already defined in module.obj
1>other.obj : : error LNK2005: "public: static void __cdecl `protected: void __cdecl pybind11::cpp_function::initialize<void (__cdecl*&)(void),void,struct pybind11::name,struct pybind11::scope,struct pybind11::sibling>(void (__cdecl*&)(void),void (__cdecl*)(void),struct pybind11::name const &,struct pybind11::scope const &,struct pybind11::sibling const &)'::`7'::_FUNC<lambda_18>(struct pybind11::detail::function_record *)" (?_FUNC<lambda_18>@?6???$initialize@AEAP6AXXZXUname@pybind11@@Uscope@2@Usibling@2@@cpp_function@pybind11@@IEAAXAEAP6AXXZP6AXXZAEBUname@2@AEBUscope@2@AEBUsibling@2@@Z@SAXPEAUfunction_record@detail@2@@Z) already defined in module.obj
1>other.obj : : error LNK2005: "public: static void __cdecl `protected: void __cdecl pybind11::cpp_function::initialize<void (__cdecl*&)(void),void,struct pybind11::name,struct pybind11::scope,struct pybind11::sibling>(void (__cdecl*&)(void),void (__cdecl*)(void),struct pybind11::name const &,struct pybind11::scope const &,struct pybind11::sibling const &)'::`9'::_FUNC<lambda_19>(struct pybind11::detail::function_record *)" (?_FUNC<lambda_19>@?8???$initialize@AEAP6AXXZXUname@pybind11@@Uscope@2@Usibling@2@@cpp_function@pybind11@@IEAAXAEAP6AXXZP6AXXZAEBUname@2@AEBUscope@2@AEBUsibling@2@@Z@SAXPEAUfunction_record@detail@2@@Z) already defined in module.obj

 

AttachmentSize
Downloadtext/plainCMakeLists.txt139 bytes
Downloadtext/x-c++srcmodule.cpp260 bytes
Downloadtext/x-c++srcother.cpp239 bytes

inline variables do not call constructor

$
0
0

There appears to be a bug with inline variable initialization.  The following code prints "0".  With gcc, it prints "1".

(ICC) 19.0.0.117 20180804

#include <iostream>

int flag = 0;

class C
{
public:
  C() { ::flag = 1; }
};

class D
{
public:
  static inline C c = C();
};

int main(int, char **)
{
  D d;
  std::cout << ::flag << std::endl;
}
 
 

bitfield errors

$
0
0

I found some unexpected behavior in ICC relating to bitfields, although it works in GCC and Clang. Initially, I thought this was caused by constexpr lambda, but it appears that some bitfield masking is getting incorrectly dropped/misapplied.

----

Output w/ icpc (ICC) 19.0.0.117 20180804
bitfield sizes:
nFourBits: 16
rest: 16

nFourBits: 4
rest: 12

nFourBits: 16
rest: 16

Output w/ g++ (GCC) 7.2.1 20170829 (Red Hat 7.2.1-1)
bitfield sizes:
nFourBits: 4
rest: 12

nFourBits: 4
rest: 12

nFourBits: 4
rest: 12

Output w/ clang version 5.0.1 (tags/RELEASE_501/final)
bitfield sizes:
nFourBits: 4
rest: 12

nFourBits: 4
rest: 12

nFourBits: 4
rest: 12

-----

#include
#include
#include
#include

template
constexpr size_t countBits(T t) {
size_t bits = 0;
while (t)
{
t &= (t - 1);
++bits;
}
return bits;
}

#define GET_BITFIELD_SIZE_CONSTEXPR(Bitfield, element) \
[]() constexpr -> size_t { \
Bitfield t = {}; \
using int_type = decltype(t.element); \
int_type inverted = static_cast(~0ull); \
t.element |= inverted; \
return countBits(t.element); \
} ()

#define GET_BITFIELD_SIZE_NON_CONSTEXPR(Bitfield, element) \
[]() -> size_t { \
Bitfield t; \
using int_type = decltype(t.element); \
int_type inverted = static_cast(~0ull); \
t.element = inverted; \
return countBits(t.element); \
} ()

#define GET_BITFIELD_SIZE_NON_CONSTEXPR2(Bitfield, element) \
[]() -> size_t { \
Bitfield t = {}; \
using int_type = decltype(t.element); \
int_type inverted = static_cast(~0ull); \
t.element |= inverted; \
return countBits(t.element); \
} ()

struct SomeStruct
{
uint16_t nFourBits:4;
uint16_t rest:12;
};

static_assert(sizeof(SomeStruct) == 2, "Unexpected size");

int main(int argc, char* argv[])
{
printf("bitfield sizes:\n");
printf("nFourBits: %lu\n", GET_BITFIELD_SIZE_CONSTEXPR(SomeStruct, nFourBits));
printf("rest: %lu\n", GET_BITFIELD_SIZE_CONSTEXPR(SomeStruct, rest));

printf("\n");
printf("nFourBits: %lu\n", GET_BITFIELD_SIZE_NON_CONSTEXPR(SomeStruct, nFourBits));
printf("rest: %lu\n", GET_BITFIELD_SIZE_NON_CONSTEXPR(SomeStruct, rest));

printf("\n");
printf("nFourBits: %lu\n", GET_BITFIELD_SIZE_NON_CONSTEXPR2(SomeStruct, nFourBits));
printf("rest: %lu\n", GET_BITFIELD_SIZE_NON_CONSTEXPR2(SomeStruct, rest));
return 0;
}

Building "/QxHost" for a different system (i.e. on a different host)?

$
0
0

So I was wondering if one could do something as follows: instead of compiling the code with QxHost on the machine it is to be run, get some sort of "instructions" that could be executed on another system (using visual studio, perhaps) to build for that particular system. On GCC I believe the march=native flags can be viewed and used to do such a compilation---is something similar possible on ICL or ICC?

Why do compiled executables always link libgcc_s.so.1 and libdl.so.2?

$
0
0

I'm trying to get rid of these 2 "unused dependencies" that literally show up in all the executables I have compiled with icc/icpc

For example, the simple "time" debian package:

richard@yenforyang:~/debs/time/time-1.7$ ldd -u -r /usr/bin/time
Unused direct dependencies:
        /lib/x86_64-linux-gnu/libgcc_s.so.1
        /lib/x86_64-linux-gnu/libdl.so.2
 

Installing the official stable release of the time package gives me no unused direct dependencies at all.

Note that I am using linker options like -Wl,--as-needed,--gc-sections (as there would be way more unused dependencies if I didn't, like "libiomp5.so" for instance)

 

 

Intel 19 on MacOS Xcode version 10.1

$
0
0

My security plan requires me to stay up to date on Xcode releases. This means I am currently using Xcode 10.1. I tried to install the Intel 19 compilers (I assume the same problem applies to other packages as well) and the installation failed since the m_ccompxe_2019.1.034 only supports versions up to Xcode 10.0. I guess for now I give up on installing version 19. Is there a time frame for Xcode 10.1 support by the Intel compilers? I know I could install Xcode 10.0 in an alternate location. I just prefer not to deal with that hassle.

Intel C++ for Windows bug in long double

$
0
0

Can someone pass this bug report to whoever handles bugs in the compiler since I have failed to find any way of reporting bugs.

Both cout << x and log(x) give wrong answers when x is declared long double. But various other functions including log10 are fine.

Here is the test program

int main()
{

   {
      cout << "Declaring two as double"<< endl;
      double two = 2;
      double sqrt2 = (double)sqrt(two);
      double log2 = (double)log(two);
      double log10_2 = (double)log10(two);
      double exp2 = (double)exp(two);
      cout << "two        "<< two << endl;
      cout << "sqrt(two)  "<< sqrt2 << endl;
      cout << "log(two)   "<< log2 << endl;
      cout << "log10(two) "<< log10_2 << endl;
      cout << "exp(two)   "<< exp2 << endl;
      cout << endl;
   }
   {
      cout << "Declaring two as long double"<< endl;
      long double two = 2;
      double sqrt2 = (double)sqrt(two);
      double log2 = (double)log(two);
      double log10_2 = (double)log10(two);
      double exp2 = (double)exp(two);
      cout << "two        "<< two << endl;
      cout << "sqrt(two)  "<< sqrt2 << endl;
      cout << "log(two)   "<< log2 << endl;
      cout << "log10(two) "<< log10_2 << endl;
      cout << "exp(two)   "<< exp2 << endl;
      cout << endl;
   }

   return 0;

and here is the output

Declaring two as double
two        2
sqrt(two)  1.41421
log(two)   0.693147
log10(two) 0.30103
exp(two)   7.38906

Declaring two as long double
two        1.38893e-312
sqrt(two)  1.41421
log(two)   -nan(ind)
log10(two) 0.30103
exp(two)   7.38906

This happens with both the 2018 and 2019 versions of the compiler. This is the line in the make file calling the compiler

icl -Qstd=c++17 -c -EHsc -GR -Ge -GS -Qprec -Qprec_div -nologo -Qlong_double -fp:precise $*.cpp -D__builtin_huge_val()=HUGE_VAL -D__builtin_huge_valf()=HUGE_VALF -D__builtin_nan=nan -D__builtin_nanf=nanf -D__builtin_nans=nan -D__builtin_nansf=nanf

It looks like a compiler bug rather than my error but it would be nice if anyone can assist.

Robert

 


Windows Intel Compiler Redistributable for 2019 update 1

Bug? Binary literals are supported for old c++

$
0
0

I use this compilation lines:

icpc -std=c++98 -pedantic-errors integers.cc

To compile the following piece of code:

int i = 0b10101;
std::cout << i << std::endl;

It compiles well and works perfectly (the output is 21).
To verify that i use the correct compiler flags I add the following line

auto g () {
    return 2.3;
 }

And indeed in this case I get the expected compiler error when using the compiler flags.

Binary literals is a feature that is supposed to exist only since C++14. So why does my code of binary literals compile? Is it icpc bug?

(With g++ and same flags, it works as expected and does not compile with the binary literals)

How to use GDB?

$
0
0

I have:
ubuntu 18.04, ICC latest (19.1) and problem:

/opt/intel/debugger_2019/gdb/intel64/bin# ./gdb-ia
./gdb-ia: error while loading shared libraries: libipt.so.2: cannot open shared object file: No such file or directory

ICE with OpenMP and missing increment

$
0
0

A typo led me to discover that if the increment (e.g., ++) on an OpenMP parallel for is missing, then the compiler reports an internal error rather a normal error message such as I would expect.  Here is a reduced repro case:

int main() {
    #pragma omp parallel for
    for ( int foo = 0; foo < 100; foo )
        /* pass */;            // ^ ICE if increment missing
}

When I attempt to compile it, I see the following:

% icpc -fopenmp ompice.cpp
ompice.cpp(4): internal error: bad pointer
          /* pass */;            // ^ ICE if increment missing
                    ^

compilation aborted for ompice.cpp (code 4)
%

The most recent build of the compiler that I have tested this on is "Intel(R) C++ Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 19.0.0.120 Build 20180804", running on Ubuntu 18.04.  However, I also tried it on a machine with "17.0.4.196 Build 20170411" on Centos 7.3 and observed this behavior there as well.

Cheers,
- Andrew

FFTW

$
0
0

I want to use FFTW for computing fft, please help on this

ivdep: save to ignore possibly incomplete list of dependencies

$
0
0

Hello,

i got a kernel function, which i like to vectorize. The compiler report (icpc (ICC) 18.0.2 20180210) states some dependencies, of which i know, that i can ignore them. Though  the code contains two different dependencies, not listed in the report. (For reference, i will add code and the vectorization report later on) Putting a #pragma ivdep in front of the loop will create vectorized code, though i am not sure, whether it deals correctly with the dependencies ( in a slightly more specialized variant, the auto-vectorization resolved them without any pragma and warning)
My question  is: does the report always list all relevant dependencies such that ignoring them with ivdep (if irrelevant) will not remove treatment of any "skipped" dependencies?

The vectorization report for my example (icpc (ICC) 18.0.2 20180210):
  LOOP BEGIN at /home/hpc/pr27be/ga92gac3/lrr_repo/scrimppp/src/ScrimpDistribPar.cpp(231,3)
      remark #15344: loop was not vectorized: vector dependence prevents vectorization
      remark #15346: vector dependence: assumed ANTI dependence between s_hor[j] (234:82) and prof_rowmin[i] (241:5)
      remark #15346: vector dependence: assumed FLOW dependence between prof_rowmin[i] (241:5) and s_hor[j] (234:82)
   LOOP END

While those should not be a problem (actually strange, why the const s_hor is reported as a dependency anyways?) lines 240 and 241 as well 251 and 252 contain dependendieces which need some treatmen, but are not listed in the report.
So, will the be properly handled, if i put the #pragma ivdep before the loop?

   LOOP BEGIN at /home/hpc/pr27be/ga92gac3/lrr_repo/scrimppp/src/ScrimpDistribPar.cpp(231,3)
      remark #15344: loop was not vectorized: vector dependence prevents vectorization
      remark #15346: vector dependence: assumed ANTI dependence between s_hor[j] (234:82) and prof_rowmin[i] (241:5)
      remark #15346: vector dependence: assumed FLOW dependence between prof_rowmin[i] (241:5) and s_hor[j] (234:82)
   LOOP END

 

201 void ScrimpDistribPar::eval_diag_block_triangle(
 202         tsa_dtype prof_colmin[],
 203         idx_dtype idx_colmin[],
 204         tsa_dtype prof_rowmin[],
 205         idx_dtype idx_rowmin[],
 206         tsa_dtype tmpQ[],
 207         const int blocklen,
 208         const int trianglen,
 209         const tsa_dtype A_hor[],
 210         const tsa_dtype A_vert[],
 211         const int windowSize,
 212         const tsa_dtype s_hor[],
 213         const tsa_dtype mu_hor[],
 214         const tsa_dtype s_vert[],
 215         const tsa_dtype mu_vert[],
 216         const idx_dtype baserow,
 217         const idx_dtype basecol
 218     )
 219 {
 220         EXEC_TRACE("evaluate block of diagonals in triangle. Triangle length: "<< trianglen << " blocklen "<< blocklen);
 221 
 222         //iteration in diagonal direction for all of the blocked diagonals.
 223             //the loop is expressed in terms of the column-coordinate
 224         for (idx_dtype j=0; j<trianglen; j++)
 225         {
 226                 tsa_dtype profile_j = prof_colmin[j];
 227                 idx_dtype index_j = idx_colmin[j];
 228 
 229                 //iteration over all diagonals in the block. Handling incomplete blocks with the "iterlimit"
 230                 const int iterlimit = j+std::min(blocklen, trianglen-j);
 231                 for (idx_dtype i=j; i < iterlimit; ++i)
 232                 {
 233                         const idx_dtype diag = i-j;
 234                         const tsa_dtype corrScore = tmpQ[diag]* (s_vert[i] * s_hor[j]) - mu_vert[i] * mu_hor[j];
 235                         EXEC_TRACE ("eval i: "<< j+basecol << " j: "<< i+baserow  << " lastz "<< tmpQ[diag] << " mu_h_j "<< mu_hor[j]); //logging for debugging
 236 
 237                         tmpQ[diag] += A_vert[i+windowSize]*A_hor[j+windowSize]  ; //- A_vert[i]*A_hor[j];
 238                         tmpQ[diag] -= A_vert[i]*A_hor[j];
 239 
 240                         if (corrScore > prof_rowmin[i]) {
 241                                 prof_rowmin[i] = corrScore;
 242                                 idx_rowmin[i] = j+basecol;
 243                         }
 244 
 245                         if (corrScore > profile_j) {
 246                                 profile_j = corrScore;
 247                                 index_j = i+baserow;
 248                         }
 249                 }
 250                 //integration of the result in i direction into memory
 251                 if (profile_j > prof_colmin[j]) {
 252                         prof_colmin[j] = profile_j;
 253                         idx_colmin[j] = index_j;
 254                 }
 255         }
 256 }

 

Intel Composer XE 2011 licensing questions

$
0
0

Don't know where to put this but maybe you can direct me to the correct forum.

We have a permanent license for Composer XE 2011 and I'm trying to find out exactly what that is and what components it makes available. I don't know who the license manager is or if they even know they are the license manager. At any rate, I'm needing to find out if this license covers the ifort, c and c++ compilers and what, if anything else, it should make available to us. I need to see if I can get added as a manager for the license so I can get the installers downloaded.

Any additional info you need to help me figure this out, I can get it to you.

Thanks for your help.


license working with icc_18_update3 is not working with icc_19_update1

$
0
0

Dear Sir/Madam,

 

I have an active ICC license serial number which is working with icc_18_ipdate3 .

But ,that same serial number is not working with icc_19_update1

Can you please help me resolve this issue 

 

Thanks,

 

-F on OSX

$
0
0

I tried to use

-Fdir

on OSX but it seems to have no effect.

I tried

-F/Applications/Xcode5.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/

-F /Applications/Xcode5.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk

Should have I have used

/Applications/Xcode5.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include

?

Is only the include path affected. Or also the lib path?

 

 

 

icc 2019 update 1 and problems with Xcode 10's new build system

$
0
0

Although icc 2019 update 1 claims to be compatible with Xcode 10.0., it's not compatible with the new build system (at least the way I use it).

My app is a Cocoa app where the GUI is written in objective-c. The engine is written in C and uses icc for OpenMP support. I have my project configured to use the default compiler in the target build settings and have a build rule for "c source files" using icc. This way objective-c source files are built with clang and c source files are compiled with icc. In Xcode 9 and earlier, this has worked. I tried building my project with Xcode 10.0 and icc 2019 update 1 and this no longer works. When I look at the build log, I see that clang is used instead of icc for my c source files and I get build errors because clang can't find omp.h. When I switched my project setting to use the legacy build system, everything worked as before.

New build system:

CompileC /Users/someuser/foo/bar/build/foo.build/Release/foo-mp.build/Objects-normal/x86_64/somefile.o /Users/someuser/foo/bar/src/somefile.c normal x86_64 c com.apple.compilers.llvm.clang.1_0.compiler (in target: foo-mp)
    cd /Users/someuser/foo/bar/src/mac
    export LANG=en_US.US-ASCII
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c -arch x86_64 ...

Legacy build system:

CompileICC /Users/someuser/foo/bar/build/foo.build/Release/foo-mp.build/Objects-normal/x86_64/somefile.o /Users/someuser/foo/bar/src/somefile.c
    cd /Users/someuser/foo/bar/src/mac
    /usr/local/bin/icc-19.0.1.144 -x c -arch x86_64 ...

 

I think icc added support for passing through objective-c files a while back so you could theoretically set the default compiler to icc. I think I tried it and it didn't work for me so I just stuck with having a build rule. I don't remember the details though.

Win10 boot sometimes hangs with Intel® Parallel Studio XE 2019 Cluster

$
0
0

I have Intel® Parallel Studio XE 2019 Cluster Edition installed on two different Windows 10 Pro 64-bit computers.  Both have different Asus motherboards and one has an i7CPU while the other has an i3.  I have installed the entire Parallel Studio XE 2019 Cluster Edition on both and have had the license server installed on both at one time or another, but never on both simultaneously.  Approximately 2 out of every 10 times I restart either system (either from a restart or a cold boot) it hangs after the POST completes but some place before or during the appearance of the lock screen.  At that point resetting or power cycling the computer is the only way out.

To determine if the Intel products were at fault I did completely clean OS installation on my i3 machine then did all the OS updates.  I then did restarts and power ups about 30 times with no hangs. Then I installed Visual Studio 2017 with the latest update and did the restart/power up test again and there were still no hangs.  I then created a system restore point and installed the Intel license manager and Parallel Studio and repeated the restart/power up tests, and the system began to hang about 2 out of every 10 restarts.  I then uninstalled the Intel products and tried the tests again, but the system still hung as before.  Finally I used the restore point to restore my system to its pre-Intel state and repeated the tests, and all hangs were gone.  I then moved to my i7 system and uninstalled the Intel products but the hangs remained.  Because I had not created a pre-Intel restore point on that machine my only choice to get rid of the hangs appears to be to do a clean OS installation.  So it appears that whatever the Intel products are doing is not reversible with a simple uninstall.

Has anyone else experienced these types of hangs?  I don't know how to go about debugging them.

vector size bug

$
0
0

When I am running this program, it will return wrong results, which are shown in the comments.

 

#include <iostream>
#include <vector>

int main()
{
  size_t n = 1000000000;
  std::vector<double> V(n);
  std::cout << V.size() << std::endl;
  // output: 1000000000

  std::cout << V.size() << std::endl;
  // output: 18446744073635809792

  std::cout << V.capacity() << std::endl;
  // output: 1000000000

  return 0;
}
 

icc for Mac

Version 19.0.1.144 Build 20181018

Viewing all 2797 articles
Browse latest View live


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