diff --git a/Makefile b/Makefile index 5e82f88..07849fd 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ include $(BTREE)/Make.inc objects = fvnlib.o -library = libfvn.a +library = libfvn$(libext) all: umfpack fnlib $(library) @@ -18,13 +18,13 @@ clean: install: cp fvn.mod $(BTREE)/modules - cp libfvn.a $(BTREE)/lib + cp $(library) $(BTREE)/lib ( cd fvn_fnlib ; make install ) - ( cp fvn_sparse/UMFPACK/Lib/libumfpack.a $(BTREE)/lib ) - ( cp fvn_sparse/AMD/Lib/libamd.a $(BTREE)/lib ) + ( cp fvn_sparse/UMFPACK/Lib/libumfpack.a $(BTREE)/lib/libumfpack.lib ) + ( cp fvn_sparse/AMD/Lib/libamd.a $(BTREE)/lib/libamd.lib ) %.o: %.f90 - $(F95) $(F95FLAGS) -c $< + $(F95) $(F95FLAGS) -c $< -o $@ $(objects):fvnlib.f90 fvn_quadpack/dqk15_2d_inner.f fvn_quadpack/dqk31_2d_outer.f \ fvn_quadpack/d1mach.f fvn_quadpack/dqk31_2d_inner.f fvn_quadpack/dqage.f \ @@ -39,11 +39,11 @@ fvn_quadpack/dqk21_2d_inner.f fvn_quadpack/dqk15_2d_outer.f $(library): $(objects) $(AR) rcu $@ $(objects) $(AR) ru $@ fvn_sparse/umfpack_wrapper.o - $(AR) s $@ + $(RANLIB) $@ umfpack: ( cd fvn_sparse/UMFPACK ; make ) - ( cd fvn_sparse ; $(CC) $(CFLAGS) -c umfpack_wrapper.c -IUMFPACK/Include -IAMD/Include -IUFconfig ) + ( cd fvn_sparse ; $(CC) $(CFLAGS) -c umfpack_wrapper.c -IUMFPACK/Include -IAMD/Include -IUFconfig -o umfpack_wrapper.o) fnlib: ( cd fvn_fnlib ; make ) diff --git a/fvn_fnlib/Makefile b/fvn_fnlib/Makefile index 988177a..a8f0516 100644 --- a/fvn_fnlib/Makefile +++ b/fvn_fnlib/Makefile @@ -1,7 +1,7 @@ include $(BTREE)/Make.inc -library = libfvn_fnlib.a +library = libfvn_fnlib$(libext) objects = acosh.o aide.o aid.o aie.o \ ai.o albeta.o algams.o ali.o \ @@ -69,20 +69,20 @@ lib:$(library) $(library): $(objects) $(AR) rcu $@ $(objects) - $(AR) s $@ + $(RANLIB) $@ install: cp fvn_fnlib.mod $(BTREE)/modules - cp libfvn_fnlib.a $(BTREE)/lib + cp $(library) $(BTREE)/lib clean: rm -f {*.o,*.oo,*.ipo,*.a,*.mod} %.o: %.f90 - $(F95) $(F95FLAGS) -c $< + $(F95) $(F95FLAGS) -c $< -o $@ %.o: %.f - $(F95) $(F95FLAGS) -c $< + $(F95) $(F95FLAGS) -c $< -o $@ diff --git a/fvn_fnlib/alngam.f b/fvn_fnlib/alngam.f index c4be817..d7c969e 100644 --- a/fvn_fnlib/alngam.f +++ b/fvn_fnlib/alngam.f @@ -36,7 +36,7 @@ c alngam = sqpi2l + (x-0.5)*alog(y) - x - alog(sinpiy) - r9lgmc(y) c if (abs((x-aint(x-0.5))*alngam/x).lt.dxrel) call seteru ( - 1'alngam answer lt half precision because x too near negative ', + 160halngam answer lt half precision because x too near negative, 2 68, 1, 1) return c diff --git a/fvn_sparse/UFconfig/UFconfig.mk b/fvn_sparse/UFconfig/UFconfig.mk index f725bac..dbf9898 100644 --- a/fvn_sparse/UFconfig/UFconfig.mk +++ b/fvn_sparse/UFconfig/UFconfig.mk @@ -23,11 +23,11 @@ F77LIB = # C and Fortran libraries # No use to repeat BLAS here as it should be defined in Make.inc # but in case we are using acml we include it here -LIB = -lm $(ACML) $(EXTRALIBS) +LIB = $(ACML) $(EXTRALIBS) XERBLA = -UMFPACK_CONFIG = +UMFPACK_CONFIG = #------------------------------------------------------------------------------ # Linux diff --git a/fvn_sparse/UMFPACK/Source/cholmod_blas.h b/fvn_sparse/UMFPACK/Source/cholmod_blas.h index 709f2d0..8a59d52 100644 --- a/fvn_sparse/UMFPACK/Source/cholmod_blas.h +++ b/fvn_sparse/UMFPACK/Source/cholmod_blas.h @@ -142,6 +142,47 @@ #endif +#ifdef PGIW32 + +#undef BLAS_DTRSV +#undef BLAS_DGEMV +#undef BLAS_DTRSM +#undef BLAS_DGEMM +#undef BLAS_DSYRK +#undef BLAS_DGER +#undef BLAS_DSCAL +#undef LAPACK_DPOTRF + +#undef BLAS_ZTRSV +#undef BLAS_ZGEMV +#undef BLAS_ZTRSM +#undef BLAS_ZGEMM +#undef BLAS_ZHERK +#undef BLAS_ZGER +#undef BLAS_ZSCAL +#undef LAPACK_ZPOTRF + + + +#define BLAS_DTRSV dtrsv_ +#define BLAS_DGEMV dgemv_ +#define BLAS_DTRSM dtrsm_ +#define BLAS_DGEMM dgemm_ +#define BLAS_DSYRK dsyrk_ +#define BLAS_DGER dger_ +#define BLAS_DSCAL dscal_ +#define LAPACK_DPOTRF dpotrf_ + +#define BLAS_ZTRSV ztrsv_ +#define BLAS_ZGEMV zgemv_ +#define BLAS_ZTRSM ztrsm_ +#define BLAS_ZGEMM zgemm_ +#define BLAS_ZHERK zherk_ +#define BLAS_ZGER zgeru_ +#define BLAS_ZSCAL zscal_ +#define LAPACK_ZPOTRF zpotrf_ + +#endif /* ========================================================================== */ /* === BLAS and LAPACK integer arguments ==================================== */ /* ========================================================================== */ diff --git a/fvn_test/Makefile b/fvn_test/Makefile index 52612b8..d2ca836 100644 --- a/fvn_test/Makefile +++ b/fvn_test/Makefile @@ -1,10 +1,10 @@ include $(BTREE)/Make.inc -programs = test_fac test_matinv test_specfunc \ -test_det test_matcon test_matev test_sparse test_inter1d \ -test_inter2d test_inter3d test_akima test_lsp test_muller \ -test_integ test_bsyn test_bsjn test_bskn test_bsin +programs = test_fac$(exext) test_matinv$(exext) test_specfunc$(exext) \ +test_det$(exext) test_matcon$(exext) test_matev$(exext) test_sparse$(exext) test_inter1d$(exext) \ +test_inter2d$(exext) test_inter3d$(exext) test_akima$(exext) test_lsp$(exext) test_muller$(exext) \ +test_integ$(exext) test_bsyn$(exext) test_bsjn$(exext) test_bskn$(exext) test_bsin$(exext) prog:$(programs) @@ -12,10 +12,10 @@ clean: rm -f {*.o,*.oo,*.ipo,*.a,*.mod} rm -f $(programs) -%: %.o +%$(exext): %.o $(LINK) $(LINKFLAGS) $< init_random_seed.o $(LINKFVN) -o $@ %.o: %.f90 - $(F95) $(F95FLAGS) -c $< + $(F95) $(F95FLAGS) -c $< -o $@ $(programs): init_random_seed.o diff --git a/fvn_test/test_akima.f90 b/fvn_test/test_akima.f90 index 31088aa..b075706 100644 --- a/fvn_test/test_akima.f90 +++ b/fvn_test/test_akima.f90 @@ -30,8 +30,8 @@ program akima end do close(2) deallocate(coeff_fvn_d,breakpoints_d,y_d,x_d) -write(*,*) "All done, plot results with gnuplot using command :" -write(*,*) "pl 'fvn_akima_double.dat' u 1:2 w l,'fvn_akima_breakpoints_double.dat' w p" +write(6,*) "All done, plot results with gnuplot using command :" +write(6,*) "pl 'fvn_akima_double.dat' u 1:2 w l,'fvn_akima_breakpoints_double.dat' w p" 44 FORMAT(4(1X,1PE22.14)) end program diff --git a/fvn_test/test_sparse.f90 b/fvn_test/test_sparse.f90 index 7eb54b3..7f34a87 100644 --- a/fvn_test/test_sparse.f90 +++ b/fvn_test/test_sparse.f90 @@ -29,7 +29,7 @@ write(*,'("Right hand side :",5f8.4)') B !specific routine that will be used here !call fvn_di_sparse_solve(n,nz,A,Ti,Tj,B,x,status) -call fvn_sparse_solve(n,nz,A,Ti,Tj,B,x,status) +call fvn_di_sparse_solve(n,nz,A,Ti,Tj,B,x,status) write(*,'("Solution :",5f8.4)') x write(*,'("Product matrix Solution :",5f8.4)') matmul(As,x) end program \ No newline at end of file