IP Library Granted Patent US 8,667,501
Granted Patent B2
US 8,667,501 · App. 13/206,590 · Granted Mar 4, 2014

Performing a local barrier operation

Inventors: Charles J. Archer (Rochester, MN); Michael A. Blocksome (Rochester, MN); Joseph D. Ratterman (Rochester, MN); Brian E. Smith (Rochester, MN)
Assignee: International Business Machines Corporation
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 8,667,501
App. No.
13/206,590
Granted
Mar 4, 2014
Kind
B2
Abstract

Performing a local barrier operation with parallel tasks executing on a compute node including, for each task: retrieving a present value of a counter; calculating, in dependence upon the present value of the counter and a total number of tasks performing the local barrier operation, a base value of the counter, the base value representing the counter's value prior to any task joining the local barrier; calculating, in dependence upon the base value and the total number of tasks performing the local barrier operation, a target value, the target value representing the counter's value when all tasks have joined the local barrier; joining the local barrier, including atomically incrementing the value of the counter; and repetitively, until the present value of the counter is no less than the target value of the counter: retrieving the present value of the counter and determining whether the present value equals the target value.

Claims (43)

1. An apparatus for performing a local barrier operation with a plurality of parallel tasks executing on a compute node of a parallel computer, the apparatus comprising a computer processor, a computer memory operatively coupled to the computer processor, the computer memory having disposed within it computer program instructions that, when executed by the computer processor, cause the apparatus to carry out the steps of:

for each task:

retrieving a present value of a counter;

calculating, in dependence upon the present value of the counter and a total number of tasks performing the local barrier operation, a base value of the counter, the base value representing the counter's value prior to any task joining the local barrier;

calculating, in dependence upon the base value and the total number of tasks performing the local barrier operation, a target value of the counter, the target value representing the counter's value when all tasks have joined the local barrier;

joining the local barrier, including atomically incrementing the value of the counter; and

repetitively, until the present value of the counter is no less than the target value of the counter: retrieving the present value of the counter and determining whether the present value equals the target value.

2. The apparatus of claim 1 wherein:

calculating a base value of the counter further comprises: calculating the base value as zero if the present value of the counter is less than the total number of tasks performing the local barrier operation, and calculating the base value as the difference between the present value of the counter and the remainder after division of the present value of the counter by the total number of tasks performing the local barrier operation, if the present value of the counter is not less than the total number of tasks; and

calculating a target value of the counter further comprises calculating the target value as the sum of the base value and the total number of tasks performing the local barrier operation.

3. The apparatus of claim 1 wherein:

one of the plurality of tasks is designated as a master task;

calculating a base value of the counter further comprises:

establishing a replacement value, the replacement value comprising a power-of-two greater than or equal to the total number of tasks performing the local barrier operation;

establishing a bitmask, including calculating a bitwise inverse of one less than the replacement value; and

calculating the base value as a result of a bitwise AND operation with the bitmask and the present counter value;

calculating a target value of the counter further comprises calculating the target value as the sum of the base value and the replacement value; and

joining the local barrier, including atomically incrementing the value of the counter further comprises: atomically incrementing, only by the master task, the value of the counter a number of times equivalent to the result of the difference between the replacement value and the total number of tasks.

4. The apparatus of claim 1 wherein each task comprises a rank in a communicator, wherein one of the ranks is designates as a master rank.

5. The apparatus of claim 1 wherein the parallel computer comprises a plurality of compute nodes, the compute nodes coupled for data communications by a plurality of data communications networks.

6. The apparatus of claim 5 wherein the plurality of data communications networks comprises a mesh network and a torus network.

7. A computer program product for performing a local barrier operation with a plurality of parallel tasks executing on a compute node of a parallel computer, the computer program product disposed upon a computer-readable medium, wherein the computer-readable medium is not a signal, the computer program product comprising computer program instructions that, when executed, cause a computer to carry out the steps of:

for each task:

retrieving a present value of a counter;

calculating, in dependence upon the present value of the counter and a total number of tasks performing the local barrier operation, a base value of the counter, the base value representing the counter's value prior to any task joining the local barrier;

calculating, in dependence upon the base value and the total number of tasks performing the local barrier operation, a target value of the counter, the target value representing the counter's value when all tasks have joined the local barrier;

joining the local barrier, including atomically incrementing the value of the counter; and

repetitively, until the present value of the counter is no less than the target value of the counter: retrieving the present value of the counter and determining whether the present value equals the target value.

8. The computer program product of claim 7 wherein:

calculating a base value of the counter further comprises: calculating the base value as zero if the present value of the counter is less than the total number of tasks performing the local barrier operation, and calculating the base value as the difference between the present value of the counter and the remainder after division of the present value of the counter by the total number of tasks performing the local barrier operation, if the present value of the counter is not less than the total number of tasks; and

calculating a target value of the counter further comprises calculating the target value as the sum of the base value and the total number of tasks performing the local barrier operation.

9. The computer program product of claim 7 wherein:

one of the plurality of tasks is designated as a master task;

calculating a base value of the counter further comprises:

establishing a replacement value, the replacement value comprising a power-of-two greater than or equal to the total number of tasks performing the local barrier operation;

establishing a bitmask, including calculating a bitwise inverse of one less than the replacement value; and

calculating the base value as a result of a bitwise AND operation with the bitmask and the present counter value;

calculating a target value of the counter further comprises calculating the target value as the sum of the base value and the replacement value; and

joining the local barrier, including atomically incrementing the value of the counter further comprises: atomically incrementing, only by the master task, the value of the counter a number of times equivalent to the result of the difference between the replacement value and the total number of tasks.

10. The computer program product of claim 7 wherein each task comprises a rank in a communicator, wherein one of the ranks is designates as a master rank.

11. The computer program product of claim 7 wherein the parallel computer comprises a plurality of compute nodes, the compute nodes coupled for data communications by a plurality of data communications networks.

12. The computer program product of claim 11 wherein the plurality of data communications networks comprises a mesh network and a torus network.

13. The computer program product of claim 7 wherein the computer-readable medium comprises a computer-readable storage medium.

Assignments (2)
CONFIRMATORY LICENSE Recorded Oct 6, 2011
From: INTERNATIONAL BUSINESS MACHINES CORPORATION
To: U.S. DEPARTMENT OF ENERGY
Reel/Frame 027024/0204 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 10, 2011
From: ARCHER, CHARLES J.; BLOCKSOME, MICHAEL A.; RATTERMAN, JOSEPH D.; SMITH, BRIAN E.
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 026725/0484 →
Continuity (1)
Related Publication 20130042254A1 · Feb 14, 2013