OpenNARS for Application single threaded?

已查看 17 次
跳至第一个未读帖子

corv...@gmail.com

未读,
2022年1月16日 06:54:442022/1/16
收件人 open-nars
Hi folks

Congrats to Patrick for getting out a shiny new release of ONA.
I just had a quick poke around in the code and it looks great. Well done!

I just have one quick question about ONA and threads.
If I don't use the networked parts of ONA, can I get away with running just a single thread?
Having looked at the code, it all seems fairly procedural. I don't know if I am going to run into locking issues as my C is only OK :)

Thanks in advance

Seamus

Patrick Hammer

未读,
2022年1月17日 00:05:442022/1/17
收件人 open...@googlegroups.com
Hi Seamus!

You will not run into locking issues.
All Shell.h and NAR.h functions are thread-safe even when the reasoner itself is running multithreaded, so no worries!

And unless you need to squeeze out some extra performance (only about 50%, and dependent on use case), I suggest to run it single-threaded. (which is the default when building it with build.sh without passing -fopenmp)

Best regards,
Patrick

--
You received this message because you are subscribed to the Google Groups "open-nars" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-nars+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/open-nars/bd38c1cc-1408-4100-b6ae-d9b5c2cd4d20n%40googlegroups.com.
回复全部
回复作者
转发
0 个新帖子