mratsim / weave

A state-of-the-art multithreading runtime: message-passing based, fast, scalable, ultra-low overhead
Other
532 stars 22 forks source link

Raytracing example doesnt compile with threads #177

Closed gavr123456789 closed 2 years ago

gavr123456789 commented 2 years ago

nim version: 1.4.8 [Linux: amd64]

Error:

raytracing ) nim c -d:danger --threads:on smallpt.nim
Hint: used config file '/etc/nim/nim.cfg' [Conf]
Hint: used config file '/etc/nim/config.nims' [Conf]
Hint: used config file '/home/gavr/Projects/nim/weave-master/nim.cfg' [Conf]
....................................
/home/gavr/Projects/nim/weave-master/weave/cross_thread_com/scoped_barriers.nim(66, 12) Warning: Moving a shared resource (an atomic type). [User]
..................................Traceback from system (most recent call last)
Error: unhandled exception: 'sym' is not accessible using discriminant 'kind' of type 'TNode' [FieldDefect]

With threads on all works:

raytracing ) nim c -d:danger --threads:off smallpt.nim
Hint: used config file '/etc/nim/nim.cfg' [Conf]
Hint: used config file '/etc/nim/config.nims' [Conf]
Hint: used config file '/home/gavr/Projects/nim/weave-master/nim.cfg' [Conf]
...................CC: stdlib_formatfloat.nim
CC: stdlib_io.nim
CC: stdlib_system.nim
CC: stdlib_parseutils.nim
CC: stdlib_unicode.nim
CC: stdlib_strutils.nim
CC: stdlib_strformat.nim
CC: stdlib_pathnorm.nim
CC: stdlib_times.nim
CC: stdlib_os.nim
CC: smallpt.nim

Hint:  [Link]
Hint: 52978 lines; 1.761s; 61.355MiB peakmem; Dangerous Release build; proj: /home/gavr/Projects/nim/weave-master/demos/raytracing/smallpt.nim; out: /home/gavr/Projects/nim/weave-master/demos/raytracing/smallpt [SuccessX]
gavr123456789 commented 2 years ago

Oh, looks like copy of https://github.com/mratsim/weave/issues/171