Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

Compile errors in MS includes

BHawk
Beginner
488 Views

I'm trying to compile the Spec CPU 2006 benchmarks with the Intel compiler, which I'm using for the first time. Apparently it uses headers from MS Visual Studio, but in some cases it can't compile them. The following errors are failing to compile the MS header "yvals.h". Does anyone know why this might not work? Are there other flags I need to pass?

icl -Qvc9 -c -FoCompute.obj -DSPEC_CPU -DNDEBUG -DSPEC_CPU_WINDOWS  -DWIN32ERFC -QxHOST  -Qipo -O3 -Qprec-div- -Qparallel -Qansi-alias -Qopt-prefetch -Qcxx-features -Qauto-ilp32    /TP      Compute.C

Compute.C
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\yvals.h(666): error: expected a ";"
        __CLR_OR_THIS_CALL _Lockit(const _Lockit&) = delete;
                                                   ^

C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\yvals.h(667): error: expected a ";"
        _Lockit& __CLR_OR_THIS_CALL operator=(const _Lockit&) = delete;
                                                              ^

C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\stddef.h(36): error: identifier "__nullptr" is undefined
  namespace std { typedef decltype(__nullptr) nullptr_t; }
                                   ^

C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\stddef.h(36): error: expected a ";"
  namespace std { typedef decltype(__nullptr) nullptr_t; }
                                              ^

C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\stddef.h(37): error: namespace "std" has no member "nullptr_t"
  using ::std::nullptr_t;

 

0 Kudos
4 Replies
JenniferJ
Moderator
488 Views

should not use /Qvc9. It means to set the icl to be compatible with VS2008. But you're using VS2012.

Just remove /Qvc9, icl will set the correct mode from the cl on the path or VS IDE.

Jennifer

0 Kudos
BHawk
Beginner
488 Views

Thanks, that works! Now there is a strange problem in just one benchmark:

icl -c -Foblock_sparse_matrix.obj -DSPEC_CPU -DNDEBUG -DSPEC_CPU_WINDOWS  -Iinclude -DBOOST_DISABLE_THREADS -Ddeal_II_dimension=3 -QxHOST  -Qipo -O3 -Qprec-div- -Qparallel -Qansi-alias -Qopt-prefetch -Qcxx-features -Qauto-ilp32    -DDEAL_II_MEMBER_VAR_SPECIALIZATION_BUG      block_sparse_matrix.cc
block_sparse_matrix.cc
include\lac/block_indices.h(217): error: no instance of function template "std::make_pair" matches the argument list
            argument types are: (int, unsigned int)
    return std::make_pair<unsigned int>(block, i-start_indices[block]);

Here is the code that is failing, which clearly has a syntax error:

inline
std::pair<unsigned int,unsigned int>
BlockIndices::global_to_local (const unsigned int i) const
{
  Assert (i<total_size(), ExcIndexRange(i, 0, total_size()));

  int block = n_blocks-1;
  while (i < start_indices[block])
    --block;

  return std::make_pair<unsigned int>(block, i-start_indices[block]);
}

Since this is shipping with the official Spec CPU 2006, I would assume the intention is for "int block" to be converted into "unsigned int" when added to the pair. Is there a compiler setting to make this possible? I would normally just tweak the code, but Spec has this crazy MD5 verification that will block everything if I touch the source files. 

0 Kudos
JenniferJ
Moderator
488 Views

Yes, it's a bug in the spec source.

There are patches for the fix already on the spec site http://www.spec.org/cpu2006/src.alt/. Please look for patches from:

  • 13 February 2014
  • or 30 July 2013

Jennifer

0 Kudos
BHawk
Beginner
488 Views

Thanks! I have all the benchmarks working now. 

0 Kudos
Reply