Creating table columns in a parfor loop

2 vues (au cours des 30 derniers jours)
asdfg asdfg
asdfg asdfg le 6 Jan 2024
Commenté : Raymond Norris le 10 Jan 2024
Found this buggy behaviour when creating tables in a parfor loop. The first example (doesn't work) causes the parallel pool worker to crash and gives a "Segmentation Violation" error in the crash dump file. However, in the second example (works), including any character that needs escaping (i.e. -, +, etc) in the table column title avoids the error.
%doesnt work
parpool('local', 1);
parfor i=1
temptab = table();
temptab.('var1') = ['a';'b'];
end
%works
parpool('local', 1);
parfor i=1
temptab = table();
temptab.('var-1') = ['a';'b'];
end
  6 commentaires
Matt J
Matt J le 9 Jan 2024
R2023b Windows 10.
Raymond Norris
Raymond Norris le 10 Jan 2024
Good thought, @Damian Pietrus. R2024a prerelease also works for me. So,
@asdfg asdfg has problems with R2023b (Mac)
@Damian Pietrus and @Raymond Norris have problems with R2023b (Windows 11)
@Matt J works fine with R2023b (Windows 10)
My next thought is the release Update. But I'm runnig GR (Update 0) and Damian's running the latest (Update 5).
@asdfg asdfg if you need this working on macOS R2023b, I'd suggest contacting MathWorks Technical Support. Otherwise, consider trying R2024a Prerelease.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Parallel for-Loops (parfor) dans Help Center et File Exchange

Produits


Version

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by