- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear friends,
the following simple code seems to run just fine, however, cilkscreen is shouting "Race condition"!
Shall I trust it? Or it is just false sharing?
So, what scalable memory allocator is fast and thread safe to use with intel cilk plus?
#include <cilk/cilk.h> #include "tbb/scalable_allocator.h" char * array[10000000]; int main(int argc, char **argv) { cilk_for (int i = 0; i < 10000000; i++) { array = (char *) scalable_malloc(1); } cilk_for (int i = 0; i < 10000000; i++) { scalable_free(array); } return 0; }
I compile it with
icc -lcilkrts -ltbbmalloc -o example -O3 -std=c99 example.c
but
$ /usr/pkg/intel/bin/cilkscreen ./example Cilkscreen Race Detector V2.0.0, Build 3566 Race condition on location 0x7fc83fd4ae90 write access at 0x7fc83fb0fd5c: (/tmp/tbb.MXm12595/1.0/build/fxtcarvm024icc13_0_64_gcc4_6_cpp11_release/../../src/tbbmalloc/tbbmalloc_internal.h:913, rml::internal::TLSKey::createTLS+0xec) read access at 0x7fc83fb0de78: (/tmp/tbb.MXm12595/1.0/build/fxtcarvm024icc13_0_64_gcc4_6_cpp11_release/../../src/tbbmalloc/tbbmalloc_internal.h:918, scalable_malloc+0x18) called by 0x400cb1: (/home/nikos/projects/reducer/example.c:18, __$U0+0x41) called by 0x400c3c: (/home/nikos/projects/reducer/example.c:17, main+0x4c) ...
The system and compiler are:
$ uname -a Linux leibniz4 3.5.0-44-generic #67~precise1-Ubuntu SMP Wed Nov 13 16:16:57 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux $ icc --version icc (ICC) 14.0.1 20131008 Copyright (C) 1985-2013 Intel Corporation. All rights reserved.
Thank you,
N
Link Copied
0 Replies

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page