C Source Codes
Here are a few C packages.
For each package listed below, if you click on its name, you can see
an expanded explanation of its purpose, a list of its contents, and
copy the entire source code file, a sample calling program, or the
results of running the calling program.
Currently available software includes:
-
3ds_read,
a program which
reads a 3D Studio graphics file;
-
args,
a program which
reports the command line arguments with
which it was invoked;
-
asa172
a library which
simulates the generation of a set of multi-indices by nested DO-Loops;
this is Applied Statistics Algorithm 172;
-
asa183,
a library which
implements the Wichman-Hill pseudorandom number generator;
this is Applied Statistics Algorithm 183;
-
asa299,
a library which
computes the lattice points
(integer coordinates) in an M-dimensional simplex;
this is Applied Statistics Algorithm 299;
-
ascii_to_mri,
a program which
restores MRI data to its original binary format, having been
previously converted to an ASCII text file.
-
bio,
a library which
manages binary I/O;
-
blas1_c,
a library of the Level 1 Basic Linear Algebra Subprograms,
using single precision complex arithmetic;
-
blas1_d,
a library of the Level 1 Basic Linear Algebra Subprograms,
using double precision real arithmetic;
-
blas1_s,
a library of the Level 1 Basic Linear Algebra Subprograms,
using single precision real arithmetic;
-
blas1_z,
a library of the Level 1 Basic Linear Algebra Subprograms,
using double precision complex arithmetic;
-
brent
a library which
contains Richard Brent's routines for finding zeroes or minima of
functions, without the use of derivative information.
-
c,
examples which
illustrate some of the features of the C programming language.
-
c4lib,
a library which
implements a basic level of single precision complex arithmetic.
-
c8lib,
a library which
implements a basic level of double precision complex arithmetic.
-
chrpak,
a library which
can manipulate characters and strings;
-
csparse,
a library which
carries out the direct solution of sparse
linear systems, by Timothy Davis.
-
ctangle,
a program which
reads a CWEB file and creates the corresponding C source code file.
-
cweave,
a program which
reads a CWEB file and creates the corresponding TeX documentation file.
-
dislin,
examples which
illustrate the use of DISLIN, a scientific graphics package.
-
drawcgm,
a library of FORTRAN and C routines for
graphics output in CGM, PostScript or X11 format;
-
f77split,
a program which
splits a file containing
multiple FORTRAN77 routines into separate files;
-
f90split,
a program which
splits a file containing multiple FORTRAN90 routines into separate files;
-
fd_predator_prey,
a program which
solves a pair of predator prey ODE's using a finite difference approximation.
-
fd1d_bvp,
a program which
applies the finite difference method
to a two point boundary value problem in one spatial dimension.
-
fd1d_heat_explicit,
a program which
implements a finite difference solution, explicit in time, of the
time dependent 1D heat equation;
-
fd1d_heat_implicit,
a program which
implements a finite difference solution, implicit in time, of the
time dependent 1D heat equation;
-
fd1d_heat_steady,
a program which
implements a finite difference solution for the steady
(time independent) 1D heat equation;
-
fem1d,
a program which
applies the finite element method,
using piecewise linear basis functions, to a linear
two point boundary value problem in 1D;
-
feynman_kac,
a program which
demonstrates the use of the Feynman-Kac algorithm for solving
certain partial differential equations.
-
fft_open_mp
is a program which
demonstrates the computation of a Fast Fourier Transform
in parallel, using OpenMP.
-
fft_serial
is a program which
computes a Fast Fourier Transform, and is intended as
a starting point for implementing an OpenMP parallel version.
-
fftw3,
examples which
illustrate the use of FFTW3, a library of routines
for Fast Fourier Transforms;
-
filum,
a library which
performs various operations with files;
-
flood_open_gl,
a program which
uses OpenGL to allow the user to select regions of an image
and flood them with color,
by Art Wetzel.
-
gcc_intrinsics,
a program which
demonstrates or tests some of the intrinsic functions made available
by the GCC compiler.
-
gnuplot_i,
a library which
allows an executing C or FORTRAN program to interact with the GNUPLOT graphics program.
-
gprof,
examples which
illustrate the use of the GPROF program performance monitor;
-
graphchk,
a program, using the
METIS library, which can check
that a METIS graph file has the proper format;
-
heat_mpi,
a program which
demonstrates the use of MPI, by solving the 1D time dependent heat equation.
-
heated_plate
is a program which
solves the steady state heat equation in a 2D
rectangular region, and is intended as
a starting point for implementing an OpenMP parallel version.
-
hello,
a program which
prints out "Hello, world!".
-
hodge,
a program which
implements a 2D cellular automaton, that can be regarded as a model
of the spread of an illness, and whose parameters can be tuned to
exhibit stability, regular waves, or a variety of chaotic behavior.
This is a simplified version of a program by Martin Gerhardt and Heike Schuster
-
iris_to_pc,
a program which
runs on an SGI IRIS and receives
data sent over a UDP socket from another machine;
-
is_serial
is a program which
is a serial version of the NAS Parallel Benchmark IS
(integer sort).
-
kmetis,
a program which
uses the METIS library to partition
the nodes of a graph in a balanced way, useful for parallel
processing;
-
legendre_rule_fast,
a program which
uses a fast (order N) algorithm to compute a Gauss-Legendre quadrature rule of given order.
-
life_open_gl,
a program which
uses OpenGL to display the evolution of John Conway's "Game of Life",
by Simon Green.
-
linpack_bench,
a program which
is a version of the LINPACK benchmark program;
-
linpack_d,
a library which
factors matrices in a variety of formats, and solving the
associated linear systems, using double precision real arithmetic;
-
linpack_s,
a library which
factors matrices in a variety of formats, and solving the
associated linear systems, using single precision real arithmetic;
-
linplus,
a library which
factors/solves/multiplies matrices in a variety of formats;
-
machar,
a library which
dynamically computes the value of various
machine characteristic constants;
-
machine,
a library which
returns tabulated values of the constants associated with computer arithmetic
-
makefiles,
a directory of example programs which
illustrate the use of MAKEFILES for maintaining a software project;
-
matmul,
a program which
carries out a matrix multiplication benchmark;
-
matt_message
a program which
simulates the behavior of a satellite warning system, by generating
a set of 20 messages that report the observance of various threats.
-
md
is a program which
carries out a molecular dynamics simulation, and is intended as
a starting point for implementing an OpenMP parallel version.
-
md_open_mp
a program which
carries out a molecular dynamics simulation using OpenMP.
-
mddisk,
a program which
simulates a fluid modeled as a collection of soft disks,
by Dennis Rapaport;
-
mesh2dual,
a program which
used the METIS library to convert
a finite element mesh to a dual graph.
-
mesh2nodal,
a program which
uses the
METIS library to convert
a finite element mesh to a nodal graph.
-
metis,
a library which
partitions the nodes of a graph or the elements of a mesh, for division among
a number of parallel processes, or to reorder the variables in a sparse
matrix to minimize fillin;
-
mgmres,
a library which
applies the restarted GMRES algorithm to a sparse linear system;
-
mixed,
a directory of example programs which
illustrate the use of mixed language programming in which the main
routine is written in C;
-
mm_io,
a library which
reads and writes a Matrix Market Sparse Matrix File;
-
mpi,
examples which
illustrate the use of the MPI Message Passing Interface
library, for parallel programming;
-
mpi_ithaca,
programs which
illustrate the use of PBS scripts for submitting MPI jobs
on Virginia Tech's ITHACA cluster.
-
mpi_stubs,
a library which
may be used if a parallel program is to be compiled, loaded and run in a
serial machine.
-
mpi_sysx,
examples which
illustrate the use of PBS scripts for submitting MPI jobs to System X.
-
mri_to_ascii,
a program which
converts the binary data in an MRI file to ASCII text.
-
mxv,
a program which
compares the performance of (FOR I, FOR J) loops and (FOR J, FOR I ) loops
for computing the product of an MxN matrix A and an N vector X.
-
mxv_open_mp,
a program which
compares the performance of the matrix multiplication problem
y=A*x, with and without parallelization by OpenMP.
-
nasadig_x,
a library which
contains interface routines for use by the NASADIG graphics
library when generating X Window graphics output.
-
normal,
a library which
generates pseudorandom normal values;
-
nsasm,
a library which
computes the jacobian matrix associated
with a finite element approximation of the incompressible
steady Navier-Stokes equations in 2D, and to store these as
a sparse matrix.
-
oa,
a library which
computes orthogonal arrays, by Art Owen;
-
oa_executables,
programs which
create, testing, and
manipulate orthogonal arrays, by Art Owen;
-
obj_to_ply,
a program which
converts a 3D graphics file from
OBJ format to
PLY format format, by Greg Turk.
-
ode,
a library which
implements the Adams-Bashforth-Moulton and Runge-Kutta methods of
solving systems of ordinary differential equations,
by Steven Moshier.
-
oemetis,
a program which
uses the METIS library to reorder
the variables in a sparse matrix.
-
onmetis,
a program, using the
METIS library, which can reorder
the variables in a sparse matrix.
-
open_gl,
examples which
illustrate the use of the OpenGL graphics library;
-
open_mp,
examples which
illustrate the use of the OpenMP interface for
parallel programming shared memory system;
-
open_mp_ithaca
programs which
illustrate the use of OpenMP on the Virginia Tech ITHACA cluster.
-
open_mp_sgi,
examples which
illustrate the use of OpenMP with C programs on the
Virginia Tech SGI systems.
-
open_mp_stubs,
a "stub" library, which is a dummy implementation of the OpenMP routines,
and can be used to compile, load, and run a program using OpenMP on a
system which does not have OpenMP installed.
-
paranoia,
a program which
checks the accuracy of the floating point arithmetic on a computer.
-
partdmesh,
a program, using the
METIS library, which can partition
a finite element mesh after constructing the dual graph.
-
partnmesh,
a program, using the
METIS library, which can partition
a finite element mesh after constructing the nodal graph.
-
pbmlib,
a library which
reads or writes
graphics files in the Portable Bit Map format;
-
pc_to_iris,
a program which
runs on a Windows NT machine, and sends data over a UDP socket to another machine;
-
pcl_read,
a program which
reads a PCL file and extracts the numeric data;
-
petsc,
examples which
illustrate the use of the Portable Extensible Toolkit for
Scientific Computations;
-
pig_latin,
a program which
converts its input to Pig Latin; a winner of the International
Obfuscated C Code Competition in the "Most Humorous" category,
by Don Dodson;
-
plato_ply
a program which
writes a PLY graphics file for
any Platonic solid,
by Greg Turk.
-
ply_io,
a library which
reads or writes a 3D graphics file in
PLY format,
by Greg Turk;
-
ply_to_iv,
a program which
converts a 3D graphics file from
PLY format to
Inventor format,
by Greg Turk.
-
ply_to_obj,
a program which
converts a 3D graphics file from
PLY format to
OBJ format.
-
pmetis,
a program which
uses the METIS library to partition
the nodes of a graph in a balanced way, useful for parallel processing;
-
power_method
a library which
carries out the power method for finding a dominant eigenvalue
and its eigenvector.
-
prime_number
is a program which
counts the number of primes between 1 and N.
-
prime_number_mpi
is a program which
counts the number of primes between 1 and N,
using MPI for parallel execution.
-
prime_number_open_mp
is a program which
counts the number of primes between 1 and N,
using OpenMP for parallel execution.
-
pthreads,
examples which
illustrate the use of the POSIX thread library to carry out
parallel program execution.
-
quad_mpi,
a program which
applies a quadrature rule to estimate an
integral, working in parallel by using MPI;
-
quad_open_mp,
a program which
applies a quadrature rule to estimate an
integral, working in parallel by using OpenMP;
-
quadrule,
a library which
defines quadrature rules for
approximating integrals;
-
qvoronoi,
a program which
computes the Voronoi diagram
of a pointset in M dimensions (part of the QHULL package);
-
rand48,
a program which
demonstrates the use of the RAND48 family of random number generators
available in the C/C++ standard library.
-
random_mpi,
a program which
demonstrates one way to generate the same sequence of random numbers
for both sequential execution and parallel execution under MPI.
-
rbox,
a program which
generates random pointsets for testing computational geometry algorithms;
-
rgb_io,
a library which
reads or writes an SGI RGB file.
-
sandia_rules,
a library which
can produce a standard 1D Gauss quadrature rule of
Chebyshev, Gegenbauer, generalized Hermite, generalized Laguerre, Hermite,
Jacobi, Laguerre, and Legendre types.
-
satisfiability
is a program which
demonstrates, for a particular circuit, an exhaustive search
for solutions of the circuit satisfiability problem.
-
satisfiability_mpi
is a program which
demonstrates, for a particular circuit, an exhaustive search
for solutions of the circuit satisfiability problem,
using MPI to perform the calculation in parallel.
-
satisfiability_open_mp
is a program which
demonstrates, for a particular circuit, an exhaustive search
for solutions of the circuit satisfiability problem,
using OpenMP for parallel execution.
-
sgefa_open_mp,
a program which
compares a standard linear algebra solver against a revised version
which can be run in parallel with OpenMP.
-
sgmga,
a library which
creates sparse grids based on a mixture of 1D quadrature rule families,
allowing user specified growth rates for each family,
allowing anisotropic weights for each dimension.
-
showme,
an program which
displays triangulations and meshes,
by Jonathan Shewchuk;
-
smolpack,
a library which
estimates the integral of a function
over a multidimensional hypercube using a sparse grid,
by Knut Petras;
-
subpak,
a library which
contains many utility routines;
-
subset,
a library which
ranks, unranks, and generates random
subsets, combinations, permutations, and so on;
-
sum_million,
a program which
sums the integers from 1 to 1,000,000, as a demonstration of how
to rate a computer's speed;
-
super_blas,
a library which
implements some of the BLAS routines, for
particular use by SUPER_LU;
-
super_lu,
a library which
implements a very fast direct solver
for sparse linear systems;
-
sweep2,
a program which
computes Voronoi Diagrams or Delaunay triangulations,
by Steve Fortune;
-
table_io,
a library which
reads and writes a simple dataset stored as a
TABLE file;
-
test_mat,
a library which
implements test matrices.
-
test_values,
a library which
returns a small set of values
for a variety of mathematical functions,
suitable for a rough test of accuracy for algorithms;
-
tiff_io,
a library which
reads or writes a TIFF file (not working).
-
timer,
examples which
illustrate how to estimate the CPU time taken by a portion of a program;
-
timestamp,
a library which
returns the current YMDHMS date as a timestamp, and performs other chores;
-
toms178,
a library which
seeks the minimizer of a function of several variables, using the
Hooke-Jeeves direct search method;
this is a C version of ACM TOMS algorithm 178.
-
toms179
a library which
calculates the incomplete Beta ratio;
this is a C version of ACM TOMS algorithm 179.
-
toms322,
a library which
evaluates the F and Student's T cumulative density functions;
this is a C version of ACM TOMS algorithm 322.
-
toms722,
a library which
supports IEEE arithmetic.
-
triangle,
a program which
generates meshes, Delaunay triangulations, and Voronoi diagrams,
by Jonathan Shewchuk;
-
triangulate,
a program which
triangulates a polygonal region,
by Joseph ORourke;
-
uniform,
a library which
generates uniform pseudorandom values;
-
uudecode,
a program which
recovers the original file from a UU encoded file;
-
uuencode,
a program which
takes an input file, especially a binary file,
and creates a UU encoded copy that is a text file, suitable for
transmission through mail or other text-only systems.
-
vitles_to_tec_2d,
a program which
reads a 2D flow file from the VITLES
fluid flow program and writes a corresponding file for use
by TECPLOT;
-
vitles_to_tec_3d,
a program which
reads a 3D flow file from the VITLES
fluid flow program and writes a corresponding file for use
by TECPLOT;
-
vitles_to_vtk,
a program which
reads a 3D flow file from the VITLES
fluid flow program and writes a corresponding VTK file for use
by 3D graphics programs such as PARAVIEW.
-
wtime
is a library which
returns a reading of the wall clock time in seconds.
-
xdr,
a library which
allows data to be transferred
from one computer system to another using an external
data representation;
-
xfires,
a program which
models the occurrence of fires in a forest, and displays the status
of the forest using X Windows.
-
xged,
a program which
allows the user to display, edit and animate a mathematical graph within an
X Window display.
-
xising,
a program which
models the variations in ferromagnetism in a material, displaying
the results using X Windows.
-
xwaves,
a program which
simulates the behavior of solutions of certain forms of the wave equation, displaying
the results using X Windows.
-
ziggurat,
a library which
samples the uniform, normal or exponential distributions, using the ziggurat method.
-
ziggurat_open_mp,
a program which
demonstrates how the ZIGGURAT library can be used to generate random numbers
in an OpenMP parallel program.
-
ziggurat_original,
a library which
is the original version of the ZIGGURAT library.
You can go up one level to
the main web page.
Last revised on 09 December 2008.