mpi-rma

order issue in sychronizing MPI-2 one sided communication

 ̄綄美尐妖づ 提交于 2019-12-11 08:09:07
问题 I am learning MPI-2 and trying to implement the first simple functionality using MPI-2 one-sided-communication: Have process 0 host one array of fixed size data_size . Each process (including 0) will generate an array and compare with the host array: If the first element of the generated array is smaller than that of the host array, replace the host array with the generated one. In code: vector<int> v1 = {rank,rank+1,rank+2}; v = get_vec(vec); if (v1[0] < v[0]) put_vec(vec,v1); The complete

Creating a counter that stays synchronized across MPI processes

冷暖自知 提交于 2019-11-26 12:27:52
问题 I have quite a bit of experience using the basic comm and group MPI2 methods, and do quite a bit of embarrassingly parallel simulation work using MPI. Up until now, I have structured my code to have a dispatch node, and a bunch of worker nodes. The dispatch node has a list of parameter files that will be run with the simulator. It seeds each worker node with a parameter file. The worker nodes run their simulation, then request another parameter file, which the dispatch node provides. Once all