41,922 research outputs found

    Abstract data types in Fortran 90

    Get PDF

    Object-oriented construction of a multigrid electronic-structure code with Fortran 90

    Get PDF
    We describe the object-oriented implementation of a higher-order finite-difference density-functional code in Fortran 90. Object-oriented models of grid and related objects are constructed and employed for the implementation of an efficient one-way multigrid method we have recently proposed for the density-functional electronic-structure calculations. Detailed analysis of performance and strategy of the one-way multigrid scheme will be presented.Comment: 24 pages, 6 figures, to appear in Comput. Phys. Com

    ADF95: Tool for automatic differentiation of a FORTRAN code designed for large numbers of independent variables

    Full text link
    ADF95 is a tool to automatically calculate numerical first derivatives for any mathematical expression as a function of user defined independent variables. Accuracy of derivatives is achieved within machine precision. ADF95 may be applied to any FORTRAN 77/90/95 conforming code and requires minimal changes by the user. It provides a new derived data type that holds the value and derivatives and applies forward differencing by overloading all FORTRAN operators and intrinsic functions. An efficient indexing technique leads to a reduced memory usage and a substantially increased performance gain over other available tools with operator overloading. This gain is especially pronounced for sparse systems with large number of independent variables. A wide class of numerical simulations, e.g., those employing implicit solvers, can profit from ADF95.Comment: 24 pages, 2 figures, 4 tables, accepted in Computer Physics Communication

    QCDF90: Lattice QCD with Fortran 90

    Get PDF
    We have used Fortran 90 to implement lattice QCD. We have designed a set of machine independent modules that define fields (gauge, fermions, scalars, etc...) and overloaded operators for all possible operations between fields, matrices and numbers. With these modules it is very simple to write high-level efficient programs for QCD simulations. To increase performances our modules also implements assignments that do not require temporaries, and a machine independent precision definition. We have also created a useful compression procedure for storing the lattice configurations, and a parallel implementation of the random generators. We have widely tested our program and modules on several parallel and single processor supercomputers obtaining excellent performances.Comment: LaTeX file, 8 pages, no figures. More information available at: http://hep.bu.edu/~leviar/qcdf90.htm

    Object-oriented implementations of the MPDATA advection equation solver in C++, Python and Fortran

    Full text link
    Three object-oriented implementations of a prototype solver of the advection equation are introduced. The presented programs are based on Blitz++ (C++), NumPy (Python), and Fortran's built-in array containers. The solvers include an implementation of the Multidimensional Positive-Definite Advective Transport Algorithm (MPDATA). The introduced codes exemplify how the application of object-oriented programming (OOP) techniques allows to reproduce the mathematical notation used in the literature within the program code. A discussion on the tradeoffs of the programming language choice is presented. The main angles of comparison are code brevity and syntax clarity (and hence maintainability and auditability) as well as performance. In the case of Python, a significant performance gain is observed when switching from the standard interpreter (CPython) to the PyPy implementation of Python. Entire source code of all three implementations is embedded in the text and is licensed under the terms of the GNU GPL license

    Mainstream parallel array programming on cell

    Get PDF
    We present the E] compiler and runtime library for the ‘F’ subset of the Fortran 95 programming language. ‘F’ provides first-class support for arrays, allowing E] to implicitly evaluate array expressions in parallel using the SPU coprocessors of the Cell Broadband Engine. We present performance results from four benchmarks that all demonstrate absolute speedups over equivalent ‘C’ or Fortran versions running on the PPU host processor. A significant benefit of this straightforward approach is that a serial implementation of any code is always available, providing code longevity, and a familiar development paradigm

    Kranc: a Mathematica application to generate numerical codes for tensorial evolution equations

    Full text link
    We present a suite of Mathematica-based computer-algebra packages, termed "Kranc", which comprise a toolbox to convert (tensorial) systems of partial differential evolution equations to parallelized C or Fortran code. Kranc can be used as a "rapid prototyping" system for physicists or mathematicians handling very complicated systems of partial differential equations, but through integration into the Cactus computational toolkit we can also produce efficient parallelized production codes. Our work is motivated by the field of numerical relativity, where Kranc is used as a research tool by the authors. In this paper we describe the design and implementation of both the Mathematica packages and the resulting code, we discuss some example applications, and provide results on the performance of an example numerical code for the Einstein equations.Comment: 24 pages, 1 figure. Corresponds to journal versio

    Domain-Specific Acceleration and Auto-Parallelization of Legacy Scientific Code in FORTRAN 77 using Source-to-Source Compilation

    Get PDF
    Massively parallel accelerators such as GPGPUs, manycores and FPGAs represent a powerful and affordable tool for scientists who look to speed up simulations of complex systems. However, porting code to such devices requires a detailed understanding of heterogeneous programming tools and effective strategies for parallelization. In this paper we present a source to source compilation approach with whole-program analysis to automatically transform single-threaded FORTRAN 77 legacy code into OpenCL-accelerated programs with parallelized kernels. The main contributions of our work are: (1) whole-source refactoring to allow any subroutine in the code to be offloaded to an accelerator. (2) Minimization of the data transfer between the host and the accelerator by eliminating redundant transfers. (3) Pragmatic auto-parallelization of the code to be offloaded to the accelerator by identification of parallelizable maps and reductions. We have validated the code transformation performance of the compiler on the NIST FORTRAN 78 test suite and several real-world codes: the Large Eddy Simulator for Urban Flows, a high-resolution turbulent flow model; the shallow water component of the ocean model Gmodel; the Linear Baroclinic Model, an atmospheric climate model and Flexpart-WRF, a particle dispersion simulator. The automatic parallelization component has been tested on as 2-D Shallow Water model (2DSW) and on the Large Eddy Simulator for Urban Flows (UFLES) and produces a complete OpenCL-enabled code base. The fully OpenCL-accelerated versions of the 2DSW and the UFLES are resp. 9x and 20x faster on GPU than the original code on CPU, in both cases this is the same performance as manually ported code.Comment: 12 pages, 5 figures, submitted to "Computers and Fluids" as full paper from ParCFD conference entr

    Launch Vehicle Operations Simulator

    Get PDF
    The Saturn Launch Vehicle Operations Simulator (LVOS) was developed for NASA at Kennedy Space Center. LVOS simulates the Saturn launch vehicle and its ground support equipment. The simulator was intended primarily to be used as a launch crew trainer but it is also being used for test procedure and software validation. A NASA/contractor team of engineers and programmers implemented the simulator after the Apollo XI lunar landing during the low activity periods between launches
    • 

    corecore