I am just simply trying to scatter some strings to nodes and then receive them back in a new array. When I print the new array the terminal will output
name1
(empty line)
(empty line)
(empty line)
Here is my scatter:
std::string files[4] = {"name1", "name2", "name3", "name4"};
std::string recArr[4];
MPI_Scatter(files, 5, MPI_CHAR, recArr, 5, MPI_CHAR, 0, world);
for(int i = 0; i < 4; i++) std::cout << recArr[i] << "\n";