Commit 59ae88e0693ec0d9934298af451f5e17c5e713d0

Authored by daniau
1 parent 02a8cc89cd

git-svn-id: https://lxsd.femto-st.fr/svn/fvn@41 b657c933-2333-4658-acf2-d3c7c2708721

Showing 8 changed files with 65 additions and 24 deletions Side-by-side Diff

... ... @@ -3,7 +3,7 @@
3 3  
4 4  
5 5 objects = fvnlib.o
6   -library = libfvn.a
  6 +library = libfvn$(libext)
7 7  
8 8 all: umfpack fnlib $(library)
9 9  
10 10  
11 11  
... ... @@ -18,13 +18,13 @@
18 18  
19 19 install:
20 20 cp fvn.mod $(BTREE)/modules
21   - cp libfvn.a $(BTREE)/lib
  21 + cp $(library) $(BTREE)/lib
22 22 ( cd fvn_fnlib ; make install )
23   - ( cp fvn_sparse/UMFPACK/Lib/libumfpack.a $(BTREE)/lib )
24   - ( cp fvn_sparse/AMD/Lib/libamd.a $(BTREE)/lib )
  23 + ( cp fvn_sparse/UMFPACK/Lib/libumfpack.a $(BTREE)/lib/libumfpack.lib )
  24 + ( cp fvn_sparse/AMD/Lib/libamd.a $(BTREE)/lib/libamd.lib )
25 25  
26 26 %.o: %.f90
27   - $(F95) $(F95FLAGS) -c $<
  27 + $(F95) $(F95FLAGS) -c $< -o $@
28 28  
29 29 $(objects):fvnlib.f90 fvn_quadpack/dqk15_2d_inner.f fvn_quadpack/dqk31_2d_outer.f \
30 30 fvn_quadpack/d1mach.f fvn_quadpack/dqk31_2d_inner.f fvn_quadpack/dqage.f \
31 31  
... ... @@ -39,11 +39,11 @@
39 39 $(library): $(objects)
40 40 $(AR) rcu $@ $(objects)
41 41 $(AR) ru $@ fvn_sparse/umfpack_wrapper.o
42   - $(AR) s $@
  42 + $(RANLIB) $@
43 43  
44 44 umfpack:
45 45 ( cd fvn_sparse/UMFPACK ; make )
46   - ( cd fvn_sparse ; $(CC) $(CFLAGS) -c umfpack_wrapper.c -IUMFPACK/Include -IAMD/Include -IUFconfig )
  46 + ( cd fvn_sparse ; $(CC) $(CFLAGS) -c umfpack_wrapper.c -IUMFPACK/Include -IAMD/Include -IUFconfig -o umfpack_wrapper.o)
47 47  
48 48 fnlib:
49 49 ( cd fvn_fnlib ; make )
1 1  
2 2 include $(BTREE)/Make.inc
3 3  
4   -library = libfvn_fnlib.a
  4 +library = libfvn_fnlib$(libext)
5 5  
6 6 objects = acosh.o aide.o aid.o aie.o \
7 7 ai.o albeta.o algams.o ali.o \
8 8  
9 9  
10 10  
... ... @@ -69,18 +69,18 @@
69 69  
70 70 $(library): $(objects)
71 71 $(AR) rcu $@ $(objects)
72   - $(AR) s $@
  72 + $(RANLIB) $@
73 73  
74 74 install:
75 75 cp fvn_fnlib.mod $(BTREE)/modules
76   - cp libfvn_fnlib.a $(BTREE)/lib
  76 + cp $(library) $(BTREE)/lib
77 77  
78 78 clean:
79 79 rm -f {*.o,*.oo,*.ipo,*.a,*.mod}
80 80  
81 81 %.o: %.f90
82   - $(F95) $(F95FLAGS) -c $<
  82 + $(F95) $(F95FLAGS) -c $< -o $@
83 83  
84 84 %.o: %.f
85   - $(F95) $(F95FLAGS) -c $<
  85 + $(F95) $(F95FLAGS) -c $< -o $@
... ... @@ -36,7 +36,7 @@
36 36 alngam = sqpi2l + (x-0.5)*alog(y) - x - alog(sinpiy) - r9lgmc(y)
37 37 c
38 38 if (abs((x-aint(x-0.5))*alngam/x).lt.dxrel) call seteru (
39   - 1'alngam answer lt half precision because x too near negative ',
  39 + 160halngam answer lt half precision because x too near negative,
40 40 2 68, 1, 1)
41 41 return
42 42 c
fvn_sparse/UFconfig/UFconfig.mk
... ... @@ -23,11 +23,11 @@
23 23 # C and Fortran libraries
24 24 # No use to repeat BLAS here as it should be defined in Make.inc
25 25 # but in case we are using acml we include it here
26   -LIB = -lm $(ACML) $(EXTRALIBS)
  26 +LIB = $(ACML) $(EXTRALIBS)
27 27  
28 28 XERBLA =
29 29  
30   -UMFPACK_CONFIG =
  30 +UMFPACK_CONFIG =
31 31  
32 32 #------------------------------------------------------------------------------
33 33 # Linux
fvn_sparse/UMFPACK/Source/cholmod_blas.h
... ... @@ -142,6 +142,47 @@
142 142  
143 143 #endif
144 144  
  145 +#ifdef PGIW32
  146 +
  147 +#undef BLAS_DTRSV
  148 +#undef BLAS_DGEMV
  149 +#undef BLAS_DTRSM
  150 +#undef BLAS_DGEMM
  151 +#undef BLAS_DSYRK
  152 +#undef BLAS_DGER
  153 +#undef BLAS_DSCAL
  154 +#undef LAPACK_DPOTRF
  155 +
  156 +#undef BLAS_ZTRSV
  157 +#undef BLAS_ZGEMV
  158 +#undef BLAS_ZTRSM
  159 +#undef BLAS_ZGEMM
  160 +#undef BLAS_ZHERK
  161 +#undef BLAS_ZGER
  162 +#undef BLAS_ZSCAL
  163 +#undef LAPACK_ZPOTRF
  164 +
  165 +
  166 +
  167 +#define BLAS_DTRSV dtrsv_
  168 +#define BLAS_DGEMV dgemv_
  169 +#define BLAS_DTRSM dtrsm_
  170 +#define BLAS_DGEMM dgemm_
  171 +#define BLAS_DSYRK dsyrk_
  172 +#define BLAS_DGER dger_
  173 +#define BLAS_DSCAL dscal_
  174 +#define LAPACK_DPOTRF dpotrf_
  175 +
  176 +#define BLAS_ZTRSV ztrsv_
  177 +#define BLAS_ZGEMV zgemv_
  178 +#define BLAS_ZTRSM ztrsm_
  179 +#define BLAS_ZGEMM zgemm_
  180 +#define BLAS_ZHERK zherk_
  181 +#define BLAS_ZGER zgeru_
  182 +#define BLAS_ZSCAL zscal_
  183 +#define LAPACK_ZPOTRF zpotrf_
  184 +
  185 +#endif
145 186 /* ========================================================================== */
146 187 /* === BLAS and LAPACK integer arguments ==================================== */
147 188 /* ========================================================================== */
1 1  
2 2 include $(BTREE)/Make.inc
3 3  
4   -programs = test_fac test_matinv test_specfunc \
5   -test_det test_matcon test_matev test_sparse test_inter1d \
6   -test_inter2d test_inter3d test_akima test_lsp test_muller \
7   -test_integ test_bsyn test_bsjn test_bskn test_bsin
  4 +programs = test_fac$(exext) test_matinv$(exext) test_specfunc$(exext) \
  5 +test_det$(exext) test_matcon$(exext) test_matev$(exext) test_sparse$(exext) test_inter1d$(exext) \
  6 +test_inter2d$(exext) test_inter3d$(exext) test_akima$(exext) test_lsp$(exext) test_muller$(exext) \
  7 +test_integ$(exext) test_bsyn$(exext) test_bsjn$(exext) test_bskn$(exext) test_bsin$(exext)
8 8  
9 9 prog:$(programs)
10 10  
11 11  
... ... @@ -12,11 +12,11 @@
12 12 rm -f {*.o,*.oo,*.ipo,*.a,*.mod}
13 13 rm -f $(programs)
14 14  
15   -%: %.o
  15 +%$(exext): %.o
16 16 $(LINK) $(LINKFLAGS) $< init_random_seed.o $(LINKFVN) -o $@
17 17  
18 18 %.o: %.f90
19   - $(F95) $(F95FLAGS) -c $<
  19 + $(F95) $(F95FLAGS) -c $< -o $@
20 20  
21 21 $(programs): init_random_seed.o
fvn_test/test_akima.f90
... ... @@ -30,8 +30,8 @@
30 30 end do
31 31 close(2)
32 32 deallocate(coeff_fvn_d,breakpoints_d,y_d,x_d)
33   -write(*,*) "All done, plot results with gnuplot using command :"
34   -write(*,*) "pl 'fvn_akima_double.dat' u 1:2 w l,'fvn_akima_breakpoints_double.dat' w p"
  33 +write(6,*) "All done, plot results with gnuplot using command :"
  34 +write(6,*) "pl 'fvn_akima_double.dat' u 1:2 w l,'fvn_akima_breakpoints_double.dat' w p"
35 35  
36 36 44 FORMAT(4(1X,1PE22.14))
37 37 end program
fvn_test/test_sparse.f90
... ... @@ -29,7 +29,7 @@
29 29  
30 30 !specific routine that will be used here
31 31 !call fvn_di_sparse_solve(n,nz,A,Ti,Tj,B,x,status)
32   -call fvn_sparse_solve(n,nz,A,Ti,Tj,B,x,status)
  32 +call fvn_di_sparse_solve(n,nz,A,Ti,Tj,B,x,status)
33 33 write(*,'("Solution :",5f8.4)') x
34 34 write(*,'("Product matrix Solution :",5f8.4)') matmul(As,x)
35 35 end program