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

Title: Programming in C at NMFECC (National Magnetic Fusion Energy Computing Center): A practical guide

Technical Report ·
OSTI ID:5865413

Despite its popularity elsewhere, C has not been extensively used for scientific programming on supercomputers. There are a number of reasons for this but perhaps the most compelling has been the lack of C compilers. However, this situation has recently begun to change at the National Magnetic Fusion Energy Computing Center (NMFECC) where two C development platforms --- the Hybrid C Compiler (HCC) written at the Livermore Computer Center and the Portable C Compiler (CC version 4.1) distributed by Cray Research, Inc. (CRI) --- have become available for use. These compilers produce object code for all of the Cray models at NMFECC and, in addition, possess good scalar optimization capabilities along with rudimentary vectorization capabilities. With the advent of the Cray C compilers, it is possible to consider physics code development in C at NMFECC. However, when one actually attempts to pursue this goal, one is quickly faced with a number of practical problems. For instance, How do I compile, link, and debug C codes What special features of C are useful to me as a scientific programmer Are there things I currently can't do in C programs How do I interface my C program to existing Fortran code Can I make use of the Basis code development system from C Over the last three years we have incorporated C into numerous physics codes written at NMFECC and, in the course of this work, we have had to develop solutions to all of the above problems. This turned out to be a surprisingly frustrating and time-consuming venture requiring some rather subtle techniques and hacks. This guide is an attempt to document these techniques.

Research Organization:
Lawrence Livermore National Lab., CA (USA)
DOE Contract Number:
W-7405-ENG-48
OSTI ID:
5865413
Report Number(s):
UCID-21740; ON: DE89015185
Resource Relation:
Other Information: Portions of this document are illegible in microfiche products
Country of Publication:
United States
Language:
English