Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • SWIFTsim SWIFTsim
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 54
    • Issues 54
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 18
    • Merge requests 18
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • SWIFT
  • SWIFTsimSWIFTsim
  • Issues
  • #214
Closed
Open
Issue created Sep 09, 2016 by Massimiliano Culpo@mculpoGuest

swift : thread sanitizer output

From :

$ git branch -vv
...
* master                  c541791 [origin/master] Merge branch 'gizmo_volume_io' into 'master'

$ module list

Currently Loaded Modules:
  1) gcc-6.2.0-gcc-4.8-fw44bda   2) openmpi-2.0.0-gcc-6.2.0-rmv3caz   3) hdf5-1.10.0-patch1-gcc-6.2.0-dbjkmep   4) metis-5.1.0-gcc-6.2.0-kbowe7l

Configure line :

$ ../sources/configure CC=mpicc CPPFLAGS="-I${METIS_ROOT}/include" --prefix=$PWD/../install --disable-optimization --enable-debug=yes --enable-parallel-hdf5 --enable-mpi --with-metis=${METIS_ROOT} --enable-compiler-warnings CFLAGS="-fsanitize=thread" LDFLAGS="-fsanitize=thread"

When I run the example UniformBox_3D :

$ ../../install/bin/swift -s -C -t 1 uniformBox.yml

I get a lot of Warning on data races, like :

==================
WARNING: ThreadSanitizer: data race (pid=29715)
  Atomic write of size 4 at 0x7d800000f320 by thread T1:
    #0 __tsan_atomic32_compare_exchange_weak /home/mculpo/PycharmProjects/spack/var/spack/stage/gcc-6.2.0-fw44bdamcou7rerucarajomex4zjg4s6/gcc-6.2.0/libsanitizer/tsan/tsan_interface_atomic.cc:809 (libtsan.so.0+0x00000005fc63)
    #1 queue_insert ../../sources/src/queue.c:105 (swift+0x000000491329)
    #2 scheduler_enqueue ../../sources/src/scheduler.c:1183 (swift+0x0000004818c1)
    #3 scheduler_enqueue_mapper ../../sources/src/scheduler.c:1018 (swift+0x000000480fcd)
    #4 threadpool_runner ../../sources/src/threadpool.c:68 (swift+0x0000004905bc)

  Previous read of size 4 at 0x7d800000f320 by thread T2:
    #0 queue_get_incoming ../../sources/src/queue.c:56 (swift+0x000000490de2)
    #1 queue_gettask ../../sources/src/queue.c:180 (swift+0x0000004916d6)
    #2 scheduler_gettask ../../sources/src/scheduler.c:1299 (swift+0x000000481db9)
    #3 runner_main ../../sources/src/runner.c:1222 (swift+0x00000046bd41)

  Location is heap block of size 4096 at 0x7d800000f000 allocated by main thread:
    #0 malloc /home/mculpo/PycharmProjects/spack/var/spack/stage/gcc-6.2.0-fw44bdamcou7rerucarajomex4zjg4s6/gcc-6.2.0/libsanitizer/tsan/tsan_interceptors.cc:538 (libtsan.so.0+0x0000000268bc)
    #1 queue_init ../../sources/src/queue.c:148 (swift+0x00000049149d)
    #2 scheduler_init ../../sources/src/scheduler.c:1375 (swift+0x0000004822ca)
    #3 engine_init ../../sources/src/engine.c:3495 (swift+0x00000047984d)
    #4 main ../../sources/examples/main.c:458 (swift+0x000000404bd9)

  Thread T1 (tid=29717, running) created by main thread at:
    #0 pthread_create /home/mculpo/PycharmProjects/spack/var/spack/stage/gcc-6.2.0-fw44bdamcou7rerucarajomex4zjg4s6/gcc-6.2.0/libsanitizer/tsan/tsan_interceptors.cc:876 (libtsan.so.0+0x000000027d6d)
    #1 threadpool_init ../../sources/src/threadpool.c:109 (swift+0x0000004908e1)
    #2 engine_init ../../sources/src/engine.c:3480 (swift+0x0000004795f3)
    #3 main ../../sources/examples/main.c:458 (swift+0x000000404bd9)

  Thread T2 (tid=29718, running) created by main thread at:
    #0 pthread_create /home/mculpo/PycharmProjects/spack/var/spack/stage/gcc-6.2.0-fw44bdamcou7rerucarajomex4zjg4s6/gcc-6.2.0/libsanitizer/tsan/tsan_interceptors.cc:876 (libtsan.so.0+0x000000027d6d)
    #1 engine_init ../../sources/src/engine.c:3506 (swift+0x000000479a46)
    #2 main ../../sources/examples/main.c:458 (swift+0x000000404bd9)

SUMMARY: ThreadSanitizer: data race ../../sources/src/queue.c:105 in queue_insert
==================

For the most part they seems read on write problems (likely due to the fact that reads are not atomic).

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking