Thanks!!!
But today I found a memory hole for v2.081 in interpND function. Within
a several minutes one-two gigabytes are spend. If I run 20 processes in
parallel then the calculations are interrupted.
You can check this code:
use strict;
use PDL;
use Memory::Usage;
my $mu = Memory::Usage->new();
my $data=zeroes(100,100,100);
$mu->record('starting work');
for(my $i=0; $i<100; $i++){
for(my $j=0;$j<100;$j++){
for(my $k=0; $k<100; $k++){
my $ind=pdl($i,$j,$k);
my $res=$data->interpND($ind);
}
}
$mu->record('step by i');
my $mem=$mu->state();
printf "%3i: RES=%.3f Mb\n",$i,($mem->[-1]->[3])/1024;
}
_________________________
0: RES=33.750 Mb
1: RES=40.375 Mb
2: RES=47.000 Mb
3: RES=53.625 Mb
4: RES=60.250 Mb
5: RES=66.875 Mb
6: RES=73.375 Mb
7: RES=80.000 Mb
....
6.6 Mb was spend for each step by i (10^4 calls of interpND).
Best wishes
Yuri
23.03.2023 06:31, Ed. пишет:
Dear PDL folks,
PDL 2.082 has just been released. Notable changes since 2.081:
* allow OtherPars “nsize => n” to set index-size of
not-otherwise-used index
* fix [o] OtherPars to work if PMCode provided
* fix nested loop() bug for Pars with e.g. (n,n)
* add pp_add_typemaps
* bug fixes: MatrixOps::det now always returns an ndarray, fixed an
intersect bug
Future plans, in something like intended order:
* Finish PDL::OpenCV
* Restructure the TriD stuff so there is a consistent API between
OpenGL and X3D/VRML
* fix more open GitHub issues
* add event-handling hooks for ndarrays
* “loop fusion” techniques to maximise locality of computation,
minimising data’s trips through the “straw” between CPU and main RAM
* finish the independent C interface for making PDL usable from e.g.
Python
* use OpenCL or other means to also utilise GPUs if available
The IRC channel (#pdl on irc.perl.org) is a great virtual place to
come and ask questions, or just watch the GitHub messages flow by.
As usual, please give the new release a try and report problems.
Best regards,
Ed
_______________________________________________
pdl-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pdl-general
_______________________________________________
pdl-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pdl-general