Skip to content

Commit

Permalink
Fixed gfortran compilation issues and updated makefiles to compile me…
Browse files Browse the repository at this point in the history
…_numer and RWF
  • Loading branch information
diatomicDisaster committed Jan 26, 2021
1 parent 59564b7 commit a5c2d2c
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 17 deletions.
6 changes: 4 additions & 2 deletions MAKEFILES/makefile_LINUXgfortran
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,22 @@ LIB = $(LAPACK)

###############################################################################

OBJ = grids.o accuracy.o lapack.o timer.o input.o diatom.o refinement.o functions.o symmetry.o dipole.o quadrupole.o header_info.o atomic_and_nuclear_data.o Lobatto.o
OBJ = grids.o accuracy.o lapack.o timer.o input.o diatom.o refinement.o functions.o symmetry.o dipole.o quadrupole.o header_info.o atomic_and_nuclear_data.o Lobatto.o me_numer.o RWF.o

diatom.o: symmetry.o functions.o input.o lapack.o Lobatto.o timer.o atomic_and_nuclear_data.o accuracy.o
diatom.o: symmetry.o functions.o input.o lapack.o Lobatto.o timer.o atomic_and_nuclear_data.o accuracy.o me_numer.o
dipole.o: timer.o accuracy.o diatom.o symmetry.o
quadrupole.o: timer.o accuracy.o diatom.o symmetry.o
duo.o: header_info.o diatom.o accuracy.o refinement.o timer.o dipole.o
functions.o: accuracy.o timer.o
grids.o: accuracy.o Lobatto.o
header_info.o: accuracy.o
me_numer.o : accuracy.o lapack.o timer.o
lapack.o: accuracy.o timer.o
Lobatto.o: accuracy.o timer.o
refinement.o: timer.o accuracy.o diatom.o
symmetry.o: accuracy.o
timer.o: accuracy.o
RWF.o: accuracy.o diatom.o timer.o symmetry.o lapack.o

# clear internal suffix rules
.SUFFIXES:
Expand Down
8 changes: 5 additions & 3 deletions RWF.f90
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,7 @@ subroutine rwf_intensity(Jval,iverbose)
!
nu = intensity%freq_window(1)+dnu*real(inu,rk)
!
if (iverbose>=4.and.mod(inu,50)) write(out,"('nu = ',f9.2)") nu
if (iverbose>=4.and.mod(inu,50)==0) write(out,"('nu = ',f9.2)") nu
!
do ilevelI = 1, nlevelsI
!
Expand Down Expand Up @@ -934,7 +934,8 @@ subroutine rwf_intensity(Jval,iverbose)
!
if (ilevelF==ilevelR) then
!
Amat(ilevelF,ilevelR) = Amat(ilevelF,ilevelR) + nu + energyI - energyR + cmplx(0.0_rk,intensity%gamma,kind=rk)
Amat(ilevelF,ilevelR) = Amat(ilevelF,ilevelR) + nu + energyI - energyR &
+ cmplx(0.0_rk,intensity%gamma,kind=rk)
!
endif
!
Expand Down Expand Up @@ -1637,7 +1638,8 @@ subroutine rwf_dvr_intensity(Jval,iverbose)
!
if (ilevelF==ilevelR) then
!
Amat(ilevelF,ilevelR) = Amat(ilevelF,ilevelR) + nu + energyI - energyR + cmplx(0.0_rk,intensity%gamma,kind=rk)
Amat(ilevelF,ilevelR) = Amat(ilevelF,ilevelR) + nu + energyI - energyR &
+ cmplx(0.0_rk,intensity%gamma,kind=rk)
!
endif
!
Expand Down
3 changes: 2 additions & 1 deletion diatom.f90
Original file line number Diff line number Diff line change
Expand Up @@ -6849,7 +6849,8 @@ subroutine duo_j0(iverbose_,J_list_,enerout,quantaout,nenerout)
Ndimen = Nlambdasigmas*ngrid
contracted(iomega)%Ndimen = Ndimen
!
allocate(contracted(iomega)%vector(Ndimen,Ndimen),contracted(iomega)%energy(Ndimen),contracted(iomega)%ilevel(Ndimen),stat=alloc)
allocate(contracted(iomega)%vector(Ndimen,Ndimen),contracted(iomega)%energy(Ndimen),&
contracted(iomega)%ilevel(Ndimen),stat=alloc)
call ArrayStart('contracted%vector',alloc,size(contracted(iomega)%vector),kind(contracted(iomega)%vector))
call ArrayStart('contracted%energy',alloc,size(contracted(iomega)%energy),kind(contracted(iomega)%energy))
call ArrayStart('contracted%ilevel',alloc,size(contracted(iomega)%ilevel),kind(contracted(iomega)%ilevel))
Expand Down
18 changes: 8 additions & 10 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,10 @@ tarball:
checkin:
ci -l Makefile *.f90


#FPATH =

EXE = j-duo-v218.v1.x

FOR = ifort # Fortran compiler
##FOR = gfortran
#FOR = gfortran

# Lorenzo Lodi ---- meaning of some flags used by the Intel fortran compiler
# see (e.g.) file:https:///opt/intel/composer_xe_2011_sp1.8.273/Documentation/en_US/compiler_f/main_for/index.htm
Expand Down Expand Up @@ -52,36 +49,37 @@ FOR = ifort # Fortran compiler
#
##FFLAGS = -O0 -fpe0 -fltconsistency -stand f03 -check all -warn all -traceback -fp-stack-check # debugging options

FFLAGS = -O3 -ip -openmp -mkl=parallel # -xHost -fast

FFLAGS = -O3 -Qip -Qopenmp -Qmkl:parallel # -xHost -fast
#FFLAGS = -O3
##FFLAGS = -C -check bounds -g -gen-interfaces -warn interfaces -check arg_temp_created -prof-value-profiling=all -warn all
##FFLAGS = -O3 -ip -openmp # no optimization -- fast compilation
##FFLAGS = -W -Wall -fbounds-check -pedantic-errors -std=f2003 -Wunderflow -O0 -fbacktrace -g -Wextra


#ARPACK = ~/libraries/ARPACK/libarpack_omp_64.a

LAPACK = -mkl=parallel -static
#LAPACK = -mkl=parallel -static
LAPACK = -Qmkl:parallel -static

LIB = $(LAPACK)

###############################################################################

OBJ = grids.o accuracy.o lapack.o timer.o input.o diatom.o refinement.o functions.o symmetry.o dipole.o quadrupole.o header_info.o atomic_and_nuclear_data.o Lobatto.o
OBJ = grids.o accuracy.o lapack.o timer.o input.o diatom.o refinement.o functions.o symmetry.o dipole.o quadrupole.o header_info.o atomic_and_nuclear_data.o Lobatto.o me_numer.o RWF.o

diatom.o: symmetry.o functions.o input.o lapack.o Lobatto.o timer.o atomic_and_nuclear_data.o accuracy.o
diatom.o: symmetry.o functions.o input.o lapack.o Lobatto.o timer.o atomic_and_nuclear_data.o accuracy.o me_numer.o
dipole.o: timer.o accuracy.o diatom.o symmetry.o
quadrupole.o: timer.o accuracy.o diatom.o symmetry.o
duo.o: header_info.o diatom.o accuracy.o refinement.o timer.o dipole.o
functions.o: accuracy.o timer.o
grids.o: accuracy.o Lobatto.o
header_info.o: accuracy.o
me_numer.o : accuracy.o lapack.o timer.o
lapack.o: accuracy.o timer.o
Lobatto.o: accuracy.o timer.o
refinement.o: timer.o accuracy.o diatom.o
symmetry.o: accuracy.o
timer.o: accuracy.o
RWF.o: accuracy.o diatom.o timer.o symmetry.o lapack.o

# clear internal suffix rules
.SUFFIXES:
Expand Down
3 changes: 2 additions & 1 deletion me_numer.f90
Original file line number Diff line number Diff line change
Expand Up @@ -2565,7 +2565,8 @@ SUBROUTINE OVRLAP(BFCT,DER,EFN,OVR,OVRCRT,PSI,RH,RMIN,TMFPRM,VJ,&
605 FORMAT(' At J=',I3,' E= ',F12.2,' R(end)= R(',I5,')=',F7.4,' FCM(',I1,')=',F12.8:/(4x,3(5x,'FCM(',I1,')=',F12.8:)))
606 FORMAT(5X,'S0= ',1PD10.3,' & last 4 amplitudes are',2D14.6/45x,2D14.6)
607 FORMAT(' *** ERROR *** At J = ',I3,' EFN = ',F10.2,' have V .GT. E everywhere.' )
608 FORMAT(' *** Caution *** For J = ',I3,' (EFN= ',F10.2,') .GE. (V = ',F10.2,') at I = ',I4,' ,so initialize with a node.')
608 FORMAT(' *** Caution *** For J = ',I3,' (EFN= ',F10.2,') .GE. (V = ',F10.2,') at I = ',I4, &
&' ,so initialize with a node.')

END subroutine OVRLAP

Expand Down

0 comments on commit a5c2d2c

Please sign in to comment.