-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No MKL fails #2
Comments
This is correct. I have not coded the non-MKL version yet. It is so because
the MKL library is so fast when compared to, e.g., Numerical Recipes.
Suggestions to alternatives are welcome!
čt 25. 7. 2019 v 17:34 odesílatel lisucr <notifications@github.com> napsal:
… When running SlipInvNNLS without the MKL option, there seems to be a
missing part of the code. I have ran the example for L'Aquila, but the
program stops in the following part saying there is no code for the non-MKL
option.
%SlipInvNNLS
Reading parameters...
(Warning! Assumig order epicL, epicW in input.dat!)
(Using mu values from file crustal.dat)
(reading observed data from files)
Creating matrix H...
(Correcting GFs for artifical time delay by 30.000000000000000 sec.)
Creating vector u...
Creating matrix G and vector d...
(constraint on M0 applied)
(smoothing by model covariance matrix applied)
(Preparing the covariance matrix ...)
(k^-2 in space and f^0 in time)
!!!!!!!!!!!!!!!!!!!!!!!Not yet coded!!!!!!!!!!!!!!!!!!!!!!!
The problem seems to be in the file CreateGandD.f90 right here,
#ifdef MKL
call dpotrf('U',Nseis,CD,Nseis,i) ! Upper triangle of CD becomes U
if (i>0) then
print
*,' the matrix is not positive definite!' stop endif call
dpotri('U',Nseis,CD,Nseis,i) ! Inverse of CD call
dpotrf('U',Nseis,CD,Nseis,i) ! Upper triangle of CD becomes U do
i=1,Nseis-1 ! Transpose and clear upper triangle !
CD(i+1:Nseis,i)=CD(i,i+1:Nseis) ! CD(i,i+1:Nseis)=0.d0 CD(i+1:Nseis,i)=0.d0
! Clear lower triangle enddo continue #else write(*,*)'!!!!!!!!!!!!!!!!!!!!!!!Not
yet coded!!!!!!!!!!!!!!!!!!!!!!!'
stop
! CDinv=CD
! CALL cholsl(Nseis,CDinv,CD)
#endif
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2?email_source=notifications&email_token=ACEYJONV75YJ67JQQNGK3ATQBHBZ7A5CNFSM4IG35BHKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HBQNHVA>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACEYJOP7SEOPAAG4XWP7QHDQBHBZ7ANCNFSM4IG35BHA>
.
|
Thanks for your answer. I'm used to open source software, but I did not know MKL was free from Intel (at least for now). So I managed to install it in my system and worked out the compilation with gfortran. Intel fortran compiler (ifort) stopped being free for non-commercial use and even though I work at a University, I could not get a license from them. Here is how I managed to compile your code under Ubuntu Linux 4.15.0-55-generic using gfortran For the main program: gfortran -m64 -I${MKLROOT}/include -L${MKLROOT}/lib/intel64 -lmkl_rt -lpthread -lm -ldl -ffree-line-length-none -O -cpp -fopenmp -DMKL -DNNLSMKL -o SlipInvSVD1 SlipInvSVD1.f90 CreateGandD.f90 filters.for init.f90 dc3dmodif.f nr.for -llapack -lblas gfortran -m64 -I${MKLROOT}/include -L${MKLROOT}/lib/intel64 -lmkl_rt -lpthread -lm -ldl -ffree-line-length-none -O -cpp -fopenmp -DMKL -DNNLSMKL -o SlipInvSVD2 SlipInvSVD2.f90 init.f90 OutputModel.f90 -llapack -lblas For src-stations: For src-dwn: For src-graphics: |
When running SlipInvNNLS without the MKL option, there seems to be a missing part of the code. I have ran the example for L'Aquila, but the program stops in the following part saying there is no code for the non-MKL option.
%SlipInvNNLS
Reading parameters...
(Warning! Assumig order epicL, epicW in input.dat!)
(Using mu values from file crustal.dat)
(reading observed data from files)
Creating matrix H...
(Correcting GFs for artifical time delay by 30.000000000000000 sec.)
Creating vector u...
Creating matrix G and vector d...
(constraint on M0 applied)
(smoothing by model covariance matrix applied)
(Preparing the covariance matrix ...)
(k^-2 in space and f^0 in time)
!!!!!!!!!!!!!!!!!!!!!!!Not yet coded!!!!!!!!!!!!!!!!!!!!!!!
The problem seems to be in the file CreateGandD.f90 right here,
#ifdef MKL
call dpotrf('U',Nseis,CD,Nseis,i) ! Upper triangle of CD becomes U
if (i>0) then
print ,' the matrix is not positive definite!'
stop
endif
call dpotri('U',Nseis,CD,Nseis,i) ! Inverse of CD
call dpotrf('U',Nseis,CD,Nseis,i) ! Upper triangle of CD becomes U
do i=1,Nseis-1 ! Transpose and clear upper triangle
! CD(i+1:Nseis,i)=CD(i,i+1:Nseis)
! CD(i,i+1:Nseis)=0.d0
CD(i+1:Nseis,i)=0.d0 ! Clear lower triangle
enddo
continue
#else
write(,*)'!!!!!!!!!!!!!!!!!!!!!!!Not yet coded!!!!!!!!!!!!!!!!!!!!!!!'
stop
! CDinv=CD
! CALL cholsl(Nseis,CDinv,CD)
#endif
The text was updated successfully, but these errors were encountered: