23
Alternative Implementation
•Message passing is “heavy weight” because it needs send, acknowledgement, marshalling
•Using one-sided communication is easy
•my_temp := data1;     -- store where neighbor can get it
•post(P-1,my_data_ready);  -- say that it’s available
•much computing;       -- overlap
•wait(P+1,his_data_ready); -- wait if neighbor not ready
•get(P+1.his_temp, loc1); -- get it now
•One-sided comm is more efficient because of reduced waiting and less network traffic
Most computers do not implement shmem