Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente Prochaine révisionLes deux révisions suivantes | ||
umfpack [2009/11/24 16:35] – gerard | umfpack [2009/11/25 14:44] – gerard | ||
---|---|---|---|
Ligne 12: | Ligne 12: | ||
* / | * / | ||
* / | * / | ||
+ | * / | ||
+ | | ||
+ | |||
+ | Utilisation de umfpack dans un code fortran: | ||
+ | * umfpack est écrit en C | ||
+ | * il existe une interface fortran 77, utilisable en fortran 90 | ||
+ | * prendre pour exemple le fichier Demo/ | ||
+ | * dans son fichier, ajouter les lignes suivantes: | ||
+ | |||
+ | < | ||
+ | call umf4def (control) ! met les parametres par defauts | ||
+ | control (1) = 1 | ||
+ | call umf4pcon (control) | ||
+ | call umf4sym (N, N, Ap, Ai, Ax, symbolic, control, info) ! | ||
+ | call umf4num (Ap, Ai, Ax, symbolic, numeric, control, info) | ||
+ | call umf4fsym (symbolic) | ||
+ | call umf4sol (sys, x, RHSV, numeric, control, info) | ||
+ | call umf4fnum (numeric) | ||
+ | call umf4pinf (control, info) | ||
+ | </ | ||
+ | Pour cela, il faut bien entendu lier votre programme avec le programme umf4_f77wrapper.c, | ||
+ | < | ||
+ | cc -o umf4_f77wrapper.o -DDLONG -m64 -I/ | ||
+ | f90 -o poisson3d_umfpack.o -g -fast -C -e -fpp -stackvar -xcheck=init_local -fpover -ftrap=%none -Xlist -fsimple=0 -fns=no -dalign -O4 -KPIC -xmodel=medium -m64 -c poisson3d_umfpack.f90 | ||
+ | f90 -g -fast -C -e -fpp -stackvar -xcheck=init_local -fpover -ftrap=%none -Xlist -fsimple=0 -fns=no -dalign -O4 -KPIC -xmodel=medium -m64 -o poisson3d_umfpack poisson3d_umfpack.o umf4_f77wrapper.o / | ||
+ | |||
+ | </ | ||
====== Config ====== | ====== Config ====== |