GPU for Flocking/swarming transfer entropy scripts

44 views
Skip to first unread message

Mohammad Samsuzzaman

unread,
Apr 19, 2022, 6:56:25 AM4/19/22
to Java Information Dynamics Toolkit (JIDT) discussion
Respected Professor Dr. Joseph Lizier

    My name is Mohammad Samsuzzaman, and I have been exploring around your flocking/swarming transfer entropy scripts, which was distributed at demos/octave/FlockingAnalysis. I also came across the GPU section which stated that JIDT ships with GPU implementation for the KSG estimators. Now my aim here is to calculate the local transfer entropy of swarm individual ( like in Wang et al. https://doi.org/10.1371/journal.pone.0040084 ) and in https://www.youtube.com/shorts/4-PA6hYhjHw?&ab_channel=JosephLizier by using GPU to speed up my calculations.

 In order to do that 1) I have installed CUDA toolkit then 2) I have compiled the JIDT GPU estimator library 3) To check everything is done in order I have run the file demos/java/example10GPUBenchmark.sh and clearly I was able to see (by monitoring GPU usage) that my GPU was being used.

 Since i am not using the AutoAnalyser(which has a USE_GPU menu) but i am using the MATLAB codes provided in the flocking demo (demos/octave/FlockingAnalysis). So i am not able to find out what code i should include in my matlab script to use the gpu. I am not sure where to put the code line “calc.setProperty('USE_GPU', 'true');" to use the GPU for my transfer entropy calculations in swarms. for example should I include the code lines (calc.setProperty('USE_GPU', 'true');) in the "loadProperties.m" file or in the "runAnalysis.m" file  or somewhere else in order to use the GPU, or should I use different approach/codes in order to use the GPU. I would be really thankful if you could provide me with some clue about the current issue.


I look forward to hearing back from you.

 

Thanking You

Yours Sincerely

Mohammad Samsuzzaman

Joseph Lizier

unread,
Oct 13, 2022, 9:12:01 PM10/13/22
to Java Information Dynamics Toolkit (JIDT) discussion
Dear Mohammad,

I'm sorry that I missed your question.

In the Flocking demo, you are able to set any parameters that are acceptable for the estimator as shown in the AutoAnalyser. To do this, generate the code to implement that property in the AutoAnalyser, then edit the demo code for computeTE.m and computeAIS.m around line 52 in both to make the calculators set the required properties as shown in the AutoAnalyser. (Obviously the variable names for the calculators themselves are different, but the setProperty() call will be the same). That applies for the USE_GPU property here also.

Hope that helps,
--joe
Reply all
Reply to author
Forward
0 new messages