You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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 -I${MKLROOT}/include -L${MKLROOT}/lib/intel64 -lmkl_rt -lpthread -lm -ldl -ffree-line-length-none -DMKL -O -cpp -fopenmp -DMKL -o SlipInvNNLS SlipInvNNLS.f90 CreateGandD.f90 filters.for init.f90 dc3dmodif.f nr.for nnls.f90 OutputModel.f90 -llapack -lblas
Activity
fgallovic commentedon Jul 29, 2019
lisucr commentedon Aug 14, 2019
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 -I${MKLROOT}/include -L${MKLROOT}/lib/intel64 -lmkl_rt -lpthread -lm -ldl -ffree-line-length-none -DMKL -O -cpp -fopenmp -DMKL -o SlipInvNNLS SlipInvNNLS.f90 CreateGandD.f90 filters.for init.f90 dc3dmodif.f nr.for nnls.f90 OutputModel.f90 -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 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:
gfortran -ffree-line-length-none -o stations stations.f90
For src-dwn:
gfortran -O -freal-4-real-8 -o gr_nez gr_nez.for
gfortran -O -freal-4-real-8 -o cnv_nez cnv_nez.for
gfortran -O -o prepare prepare.f90
gfortran -O -o resort resort.f90
For src-graphics:
gfortran -ffree-line-length-none -o processseis processseis.f90 filters.for