Community
cancel
Showing results for 
Search instead for 
Did you mean: 
monica__nicolo
Beginner
122 Views

Assertion failed building parallel-hashmap

I can't manage to compile the header only parallel hashmap library with the latest icc (19) on Windows 10 

https://github.com/greg7mdp/parallel-hashmap

Just including the header ( <parallel_hashmap/phmap.h>), create a basic hashmap, and compiling with the suggested building options (c++ 11 support), and I get the following error:

 

#include <parallel_hashmap/phmap.h>
int main()
{
	phmap::flat_hash_map<unsigned int, unsigned int> sides_table;

}

assertion failed at: "shared/cfe/edgcpfe/lower_init.c", line 7013 

C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include\parallel_hashmap\phmap.h    1202    
 

With the visual studio compiler, it works fine. 

Thank you very much 

0 Kudos
5 Replies
Viet_H_Intel
Moderator
122 Views

What Visual Studio version are you using?

122 Views

Using this: Intel® System Studio 2019 Update 3 Integration for Microsoft* Visual Studio* 2017, Version 19.0.6.15, 

This program crashes the compiler:

#include <parallel_hashmap/phmap.h>
int main()
{
    // Create an unordered_map of three strings (that map to strings)
    phmap::flat_hash_map<int, int> email;
    return 0;
}

=>

1>------ Build started: Project: ex_basic, Configuration: Release x64 ------
1>basic.cc
1>C:\greg\github\parallel-hashmap\parallel_hashmap/phmap.h(992): error : assertion failed at: "shared/cfe/edgcpfe/lower_init.c", line 7013
1>
1>      raw_hash_set() noexcept(
1>      ^
1>
1>compilation aborted for C:\greg\github\parallel-hashmap\examples\basic.cc (code 4)
1>Done building project "ex_basic.vcxproj" -- FAILED.

However if you initialize the hash map it builds fine... Following program compiles:

#include <parallel_hashmap/phmap.h>
int main()
{
    // Create an unordered_map of three strings (that map to strings)
    phmap::flat_hash_map<int, int> email = { { 1, 1 } };
    return 0;
}

=>

1>------ Build started: Project: ex_basic, Configuration: Release x64 ------
1>basic.cc
1>ex_basic.vcxproj -> C:\greg\github\parallel-hashmap\build\Release\ex_basic.exe
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

 

122 Views

Intel® System Studio 2019 Update 3 Integration for Microsoft* Visual Studio* 2017, Version 19.0.6.15, 

Actually this simpler program crashes the compiler:

#include <parallel_hashmap/phmap.h>

struct Empty {};
 
int main()
{
    phmap::container_internal::CompressedTuple<Empty> x{{}};
    return 0;
}

 

122 Views

I am the author of parallel_hashmap, so if  you can suggest a way to avoid this issue by changing the code I'll be happy to incorporate it.

Viet_H_Intel
Moderator
122 Views

you can see which VS versions supports at https://software.intel.com/en-us/articles/intel-compilers-integration-support-for-microsoft-visual-studio-2017