The magnetohydrodynamic (MHD) equilibrium problem in magnetic confinement f
usion devices is solved by using the variational moments equilibrium code (
VMEC). The sequential version of the code is highly demanding in computatio
nal terms, requiring several days of CPU time in the most advanced computer
s. In this work, we present the parallelization techniques employed for thi
s code. An automatic tool has been used to guide the data parallelization o
f the critical parts of the code, and some deficiencies in its automatic pa
rallelization techniques have been determined. These shortcomings are overc
ome by the development of manual techniques, which offer better results. Ta
sk parallelism has also been applied to this code in an innovative way, whi
ch significantly reduces the parallel overheads due to load imbalance and m
essage waits. (C) 2001 Published by Elsevier Science B.V.