资源简介
Mumps,很牛逼和古老的语言工具。MUMPS语言,简称:M技术,全称:Massachusetts General Hospital Utility Multi-Programming System,麻省总医院多用途程序设计系统;算起来也是一种古老的语言了,与FORTRAN和COBOL属于同时代的语言。因为这门语言最主要是用于医疗数据库方面,所以其应用并不像SQL Server、Oracal等那么广泛,虽然在国外的医疗行业应用较多,但在国内尚不为人们所了解。特在此进行一些介绍,希望能够给大家一些帮助。
代码片段和文件信息
/*
*
* This file is part of MUMPS 4.10.0 built on Tue May 10 12:56:32 UTC 2011
*
*/
/* Example program using the C interface to the
* double real arithmetic version of MUMPS dmumps_c.
* We solve the system A x = RHS with
* A = diag(1 2) and RHS = [1 4]^T
* Solution is [1 2]^T */
#include
#include
#include “mpi.h“
#include “dmumps_c.h“
#define JOB_INIT -1
#define JOB_END -2
#define USE_COMM_WORLD -987654
#if defined(MAIN_COMP)
/*
* Some Fortran compilers (COMPAQ fort) define main inside
* their runtime library while a Fortran program translates
* to MAIN_ or MAIN__ which is then called from “main“. This
* is annoying because MAIN__ has no arguments and we must
* define argc/argv arbitrarily !!
*/
int MAIN__();
int MAIN_()
{
return MAIN__();
}
int MAIN__()
{
int argc=1;
char * name = “c_example“;
char ** argv ;
#else
int main(int argc char ** argv)
{
#endif
DMUMPS_STRUC_C id;
int n = 2;
int nz = 2;
int irn[] = {12};
int jcn[] = {12};
double a[2];
double rhs[2];
int myid ierr;
#if defined(MAIN_COMP)
argv = &name;
#endif
ierr = MPI_Init(&argc &argv);
ierr = MPI_Comm_rank(MPI_COMM_WORLD &myid);
/* Define A and rhs */
rhs[0]=1.0;rhs[1]=4.0;
a[0]=1.0;a[1]=2.0;
/* Initialize a MUMPS instance. Use MPI_COMM_WORLD */
id.job=JOB_INIT; id.par=1; id.sym=0;id.comm_fortran=USE_COMM_WORLD;
dmumps_c(&id);
/* Define the problem on the host */
if (myid == 0) {
id.n = n; id.nz =nz; id.irn=irn; id.jcn=jcn;
id.a = a; id.rhs = rhs;
}
#define ICNTL(I) icntl[(I)-1] /* macro s.t. indices match documentation */
/* No outputs */
id.ICNTL(1)=-1; id.ICNTL(2)=-1; id.ICNTL(3)=-1; id.ICNTL(4)=0;
/* Call the MUMPS package. */
id.job=6;
dmumps_c(&id);
id.job=JOB_END; dmumps_c(&id); /* Terminate instance */
if (myid == 0) {
printf(“Solution is : (%8.2f %8.2f)\n“ rhs[0]rhs[1]);
}
ierr = MPI_Finalize();
return 0;
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 337 2011-06-19 10:38 Mumps\coinmumps-uninstalled.pc.in
文件 347 2011-06-19 10:38 Mumps\coinmumps.pc.in
文件 44595 2008-08-22 13:32 Mumps\config.guess
文件 7363 2012-07-19 01:41 Mumps\config.log
文件 32726 2008-08-22 13:32 Mumps\config.sub
文件 887463 2012-02-05 18:18 Mumps\configure
文件 4404 2012-02-05 18:18 Mumps\configure.ac
文件 15936 2008-08-22 13:32 Mumps\depcomp
文件 994 2011-06-19 10:38 Mumps\get.Mumps
文件 9233 2008-08-22 13:32 Mumps\install-sh
文件 2475 2011-06-19 10:38 Mumps\INSTALL.MUMPS
文件 226934 2012-07-19 01:27 Mumps\libtool
文件 196440 2008-08-22 13:32 Mumps\ltmain.sh
文件 3627 2011-06-19 10:38 Mumps\Makefile.am
文件 47763 2011-06-19 10:38 Mumps\Makefile.in
文件 11014 2008-08-22 13:32 Mumps\missing
文件 18784 2011-05-10 08:56 Mumps\MUMPS\ChangeLog
文件 588112 2011-05-10 08:56 Mumps\MUMPS\doc\userguide_4.10.0.pdf
文件 1025584 2011-05-10 08:56 Mumps\MUMPS\doc\userguide_4.10.0.ps
文件 1733 2011-05-10 08:56 Mumps\MUMPS\examples\csimpletest.F
文件 1944 2011-05-10 08:56 Mumps\MUMPS\examples\c_example.c
文件 1733 2011-05-10 08:56 Mumps\MUMPS\examples\dsimpletest.F
文件 322 2011-05-10 08:56 Mumps\MUMPS\examples\input_simpletest_cmplx
文件 189 2011-05-10 08:56 Mumps\MUMPS\examples\input_simpletest_real
文件 1983 2011-05-10 08:56 Mumps\MUMPS\examples\Makefile
文件 1075 2011-05-10 08:56 Mumps\MUMPS\examples\README
文件 1733 2011-05-10 08:56 Mumps\MUMPS\examples\ssimpletest.F
文件 1733 2011-05-10 08:56 Mumps\MUMPS\examples\zsimpletest.F
文件 5021 2011-05-10 08:56 Mumps\MUMPS\include\cmumps_c.h
文件 3373 2011-05-10 08:57 Mumps\MUMPS\include\cmumps_root.h
............此处省略200个文件信息
评论
共有 条评论