Skip to content

No MKL fails #2

Open
Open

Description

@lisucr

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

Activity

  1. fgallovic commented on Jul 29, 2019

    @fgallovic
    Owner
  2. lisucr commented on Aug 14, 2019

    @lisucr
    Author

    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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions