IP Library Granted Patent US 8,910,178
Granted Patent B2
US 8,910,178 · App. 13/206,581 · Granted Dec 9, 2014

Performing a global barrier operation in a parallel computer

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
G06F9/522
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,910,178
App. No.
13/206,581
Granted
Dec 9, 2014
Kind
B2
Abstract

Executing computing tasks on a parallel computer that includes compute nodes coupled for data communications, where each compute node executes tasks, with one task on each compute node designated as a master task, including: for each task on each compute node until all master tasks have joined a global barrier: determining whether the task is a master task; if the task is not a master task, joining a single local barrier; if the task is a master task, joining the global barrier and the single local barrier only after all other tasks on the compute node have joined the single local barrier.

Claims (51)

1. An apparatus for performing a global barrier operation in a parallel computer, the parallel computer comprising a plurality of compute nodes, the compute nodes coupled for data communications, each compute node executing a plurality of tasks, with one task on each compute node designated as a master task, 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 on each compute node until all master tasks have joined a global barrier:

determining whether the task is a master task;

if the task is not a master task, joining a single local barrier;

if the task is a master task:

determining whether all other tasks on the compute node have joined the single local barrier; and

if all other tasks on the compute node have joined the single local barrier, joining the global barrier and the single local barrier.

2. The apparatus of claim 1 wherein joining the single local barrier further comprises:

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 joining the single local barrier, a base value of the counter, the base value representing the counter's value prior to any task joining the single local barrier;

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

joining the single 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.

3. The apparatus of claim 2 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 joining the single local barrier, 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 joining the single local barrier, 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 joining the single local barrier.

4. The apparatus of claim 2 wherein:

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 joining the single local barrier;

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.

5. The apparatus of claim 1 wherein the compute nodes of the parallel computer are coupled for data communications by a plurality of data communications networks, the plurality of data communication networks comprising a mesh network and a torus network.

6. A computer program product for performing a global barrier operation in a parallel computer, the parallel computer comprising a plurality of compute nodes, the compute nodes coupled for data communications, each compute node executing a plurality of tasks, with one task on each compute node designated as a master task, the computer program product disposed upon a non-transitory computer readable medium, the computer program product comprising computer program instructions that, when executed, cause a computer to carry out the steps of:

for each task on each compute node until all master tasks have joined a global barrier:

determining whether the task is a master task;

if the task is not a master task, joining a single local barrier;

if the task is a master task:

determining whether all other tasks on the compute node have joined the single local barrier; and

if all other tasks on the compute node have joined the single local barrier, joining the global barrier and the single local barrier.

7. The computer program product of claim 6 wherein joining the single local barrier further comprises:

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 joining the single local barrier, a base value of the counter, the base value representing the counter's value prior to any task joining the single local barrier;

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

joining the single 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 joining the single local barrier, 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 joining the single local barrier, 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 joining the single local barrier.

9. The computer program product of claim 7 wherein:

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 joining the single local barrier;

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 6 wherein the compute nodes of the parallel computer are coupled for data communications by a plurality of data communications networks, the plurality of data communication networks comprising a mesh network and a torus network.

11. The computer program product of claim 6 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/0120 →
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/0666 →
Continuity (1)
Related Publication 20130042245A1 · Feb 14, 2013