c - How to share a linked list to all process with MPI -


im kinda new mpi , im having troubles this.

lets have list

struct list{     int number;     int process;     list *next; } 

i created linked list in main process, dont know how send linked list process every process can operation in portion of list.

if manually send list around, have traverse , send each , every element of queue, creating massive communication overhead.

the best way convert list contiguous array of structs , distribute processes via mpi_scatter (or mpi_scatterv if size of list not divisible number of ranks). if must, can locally convert linked list on each rank.

without knowing rest of program i'd there strong chance using linked list bad choice anyway , should use array data in first place.


Comments

Popular posts from this blog

gridview - Yii2 DataPorivider $totalSum for a column -

java - Suppress Jboss version details from HTTP error response -

Sass watch command compiles .scss files before full sftp upload -