These are a list of standards we are conforming to in development of OpenMx.
Numerical routines will be written in C or written in Fortran with a C wrapper. This decision is driven by the structure of linkable R numerical libraries, which are written to allow C to call R internals and compile them in. In this way, we can compile lightweight computational nodes that make use of the matrix algebra evaluation functions, random number generator, integration functions, and statistical distribution functions built into R. C functions need to maintain Fortran style arguments, data structures, and not depend on the use of return() values when such functions might be replaced by Fortran subprograms. Documentation on conventions for writing compiled code that can be linked to R libraries can be found in the CRAN manual Writing R Extensions , chapters 5 and 6.
BLAS, LAPACK, some LINPACK function definitions are provided in R. BLAS and LAPACK routines will be used whenever possible, since this minimizes the code to be written and the porting support for the future. BLAS documentation can be found here  and LAPACK documentation here  and a table of other possibilities here . Sparse routines from ScaLAPACK may also be useful, and these can be found here . Inevitably, some numerical routines will need to be added. These will be added in such a way as to use BLAS as much as possible and to conform to the R calling standards so that we can give these routines back to the R community. We should keep track of the proposed Parallel Linear Algebra for Scalable Multi-Core Architectures (PLASMA) standard being developed at Oak Ridge.