This was extremely frustrating because parallelizing step A would bring runtime down from 10+ seconds to under 1 second (yes, it's a beefy machine), but it was definitely not worth it to do that if step C would then be some 10 times (if not more) slower, with low CPU usage to boot.

I have not investigated in detail the reasons for this massive slowdown. I suspect step C in general was slow because of (parallel and) dynamic memory allocation to build the per-G-element lists plus the need for each element to run over the whole L list to find the relevant elements.

I still don't know why it would become slower when the L was generated in parallel, but I actually found a solution that makes step C much simpler: sorting L by the second index in the tuples (the j) makes sure that the list can be trivially split (each section assigned to the proper j) simply by cutting it up at the boundaries when the j changes.

Sorting itself is extremely fast even on a list with millions of elements, and with this change step C takes less than a second *without parallelization*. It's not even worth parallelizing it anymore (in contrast to step A that does significantly benefit from it).

2/2

#Julia #parallelization

I had a weird experience with #Julia and #parallelization.

I had to collect all the pairs of items in two sets (S and G) that satisfied a particular relation function R. For Reasons™, it's easier to find these pairs looking at each element of S and find which elements of G are in relation with it, but this information is better used in reverse (i.e. on use we want, for any given element of G, find which elements of S are in relation with it.

So my idea was to build a set of tuples (i, j, r) where i is the index of an element of S, j the index of an element of G, and r the result of applying R to these two elements (which gives a value I need “on use” of this information I'm collecting).

To build this set of tuples, I went with (step A) a function mapping each index i to the list of tuples where the relation was possible, and then (step B) merge the lists together into a single list L.

Then (step C) for each index j of G, the approach was to find_all elements in L in which the second index was j, and thus have for each element of G the elements of S it was in relation with, including the relation function value, just as I wanted.

My original implementation was SLOW. Step A would take some 20 seconds, which I was able to bring down to 10 with optimizations, but step C, which would take between 30 and 130 second *using parallelization*.

The worst of it? I could trivially parallelize step A, but in this case step C would take FOREVER (stopped waiting after 15 minutes).

1/n

So far the language is developing as #ruby, #python3, and #julia DSL though. Im also learning more Lojban for specific tasks.

Julia Symbolics

JuliaSymbolics는 Julia 언어를 위한 고성능 컴퓨터 대수 시스템(CAS)으로, 다층 구조의 패키지로 구성되어 있다. Symbolics.jl은 빠른 기호 연산과 미분, 방정식 풀이 등을 지원하며, SymbolicUtils.jl은 표현식 재작성과 단순화를 담당한다. Metatheory.jl은 강력한 패턴 매칭과 재작성 시스템을 제공하며, TermInterface.jl은 기호 표현식의 공통 인터페이스를 정의한다. 이 생태계는 ModelingToolkit.jl, Catalyst.jl 등 다양한 확장 패키지와 연계되어 과학적 모델링과 방정식 자동화에 활용된다.

https://juliasymbolics.org/

#julia #symbolics #computeralgebra #modelingtoolkit #automaticdifferentiation

JuliaSymbolics — Symbolic programming in Julia

NeuroAnalyzer.jl

Julia toolbox for analyzing neurophysiological data

Codeberg.org

I'm currently looking for a way to bring together my experience with #SmoothedParticleHydroynamics and #remoteSensing, and as part of this process I also wrote a converter (in #Julia, because this has to fit within some existing code which I wrote in that language) that allows me to export satellite imagery as #VTK unstructured grids, so that I can visualize them in #ParaView

It feels weird because ParaView *really* isn't suited for #GIS work, but in this case it turns out to be The Right Tool For The Job™.

#SPH

Small experiment using Lagragian passive tracers injected in the sequence of outputs of an ENZO MHD cosmological simulations, to track the formation history of filaments and threads in the intracluster medium .

tracer propagation code in #Julia language

#SimulatedUniverses #astronomy #astrophysics #science

Oh may God and the #EU forgive me… I have watched an interview at Tucker Carlson on X with #Julia-Mendel #Iuliia-Mendel - ex press secretary of #Zelenskyy … (link from lostineu.eu)
describing the situation of Ukrainians in the country, #Zelenskiy as some kind of narcistic psychopath
(some development to be seen soon also in the EU - besides the psychopathic character of actual #EU politics btw)
https://en.wikipedia.org/wiki/Iuliia_Mendel
looks like not only #Putin is a bad guy…
https://x.com/TuckerCarlson/status/2053883236984520746
shame on me
Iuliia Mendel - Wikipedia