Expand documentation

Offen
#115 1 Kommentar 3 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
45/100
Issue-Typ
Dokumentation
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
julia

Rechercherichtung

Es ist keine Dokumentationsdatei oder kein Test benannt. Beginne damit, die vorhandene DistributedArrays-Dokumentation und die Materialien zum DArray-Konstruktor zu finden, und überprüfe anschließend die aktuellen Beispiele für dzeros, Slicing, Konvertierung und Konstruktoren. Als abgeschlossen gilt die Dokumentation der Speicherung von DistributedArray, des Kopierverhaltens und der Hinweise zur Performance sowie das Hinzufügen eines klareren Beispiels für einen Zwischenkonstruktor mit seiner Erklärung der Prozessindizes.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

We are finding the documentation for DistributedArrays to be lacking in a few ways:

  1. There is no description of the actual DistributedArray type. It would be helpful to know how DistributedArrays are stored across processes. A lot of people who are using DistributedArrays are experienced at distributed programming, and will find it helpful to know how things are implemented. For instance, it would be helpful to get an idea (without looking at the source code) of how the local parts are tied together in a single type.

  2. When are values copied/not copied? For example:

da = dzeros(100,100)
sa = da[1:10, 35:50]
out = convert(DArray, sa)

Does the last line here copy the values of sa? More generally, information about performance would be really useful, as well as some performance tips.

  1. Expound a bit more on DArray constructor. Perhaps an example somewhere between dfill and the Game of Life would help, like this:
procs = addprocs(5)

# Construct a DArray 
da = DArray((2,5), procs, [1,5]) do I  
	# construct a local part
	localpart = Array{Float64}(2,1)	
	for i in first(I)  # first(I) = 1:2
		localpart[i] =  i
	end
	return localpart
end

It would help to describe this example as follows:

This DArray is distributed so that each of 5 processes holds one column. I is a tuple of indices describing the indices of the DArray that reside on a given process. On the first process, I = (1:2,1:1). In the init function, we construct the local column as a regular Array and return it to the DArray constructor. Note that it is important to return localpart: if we don't do this, then Julia returns the last variable that was assigned, which is localpart[2] - but the DArray constructor is expecting an array.

cc @pearlzli

Vorherrschende Sprache
Julia
Sterne
205
Forks
34
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus JuliaParallel/DistributedArrays.jl

Alle Issues in JuliaParallel/DistributedArrays.jl

Ähnliche Issues

Weitere Issues zu Julia

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.