skip to main content
OSTI.GOV title logo U.S. Department of Energy
Office of Scientific and Technical Information

Title: Using the force to write parallel HEP programs

Technical Report ·
DOI:https://doi.org/10.2172/86860· OSTI ID:86860

The basic idea behind using the force method of parallel programming is to write a program (a force) which can be executed by any number of processes, including one process. The fork into parallel processes is done before the force is ever executed and the number of processes can be chosen on the basis of hardware efficiency only. Experience indicates that it is not hard to write programs which are independent of the number of executing processes on a shared-memory MIMD computer. Several such applications programs have been written for the HEP computer in HEP Fortran 77, which is standard Fortran 77 with very rudimentary parallel extensions. The constructs which seemed to be useful in these programs were formalized into a set of statements which can be macro-expanded into HEP Fortran 77. Some essential ideas to keep in mind when writing a force is that each statement is executed by all processes of the force unless an explicit synchronization prevents this. The distinction between a local variable, which has a separate memory cell assigned for each process referencing it, and a global variable, which has one memory cell which Is used by all processes, is important to keep straight. There are force constructs which make it easy to specify that a section of code is to be executed by only one process. Other constructs specify that the body of a loop is to be executed for all values of the loop index in parallel with one process handling each index value. Unless explicit force statements prevent it, a call is executed by all processes so that subroutines executed by all processes of the force are also possible.

Research Organization:
Los Alamos National Lab. (LANL), Los Alamos, NM (United States)
Sponsoring Organization:
USDOE, Washington, DC (United States)
DOE Contract Number:
W-7405-ENG-36
OSTI ID:
86860
Report Number(s):
LA-SUB-95-77; ON: DE95014566; TRN: 95:005526
Resource Relation:
Other Information: PBD: [1995]
Country of Publication:
United States
Language:
English