Compiling error in geom hnd.F


Just Got Here
When I triy to compile NWChem using GNU compilers, I get the floowing problem:

gfortran -c -m64 -ffast-math -fdefault-integer-8 -Wextra -Wuninitialized -O3 -mfpmath=sse -ffast-math -fprefetch-loop-arrays -march=native -mtune=native -I. -I/data/ullmann/Software/nwchem/nwchem-6.3.rev2//src/include -I/data/ullmann/Software/nwchem/nwchem-6.3.rev2//src/tools/install/include -DGFORTRAN -DEXT_INT -DLINUX -DLINUX64 -DCHKUNDFLW -DGCC4 -DGCC46 -DPARALLEL_DIAG geom_hnd.F
geom_hnd.F:81.35:

    1     dbl_mb(k_x),dbl_mb(k_y),dbl_mb(k_z),                         
1
Warning: Type mismatch in argument 'izmat' at (1); passed REAL(8) to INTEGER(8)
geom_hnd.F: In function ‘hnd_zxyz’:
geom_hnd.F:4144:0: warning: ‘ssint’ may be used uninitialized in this function [-Wuninitialized]
geom_hnd.F:4143:0: warning: ‘ssinp’ may be used uninitialized in this function [-Wuninitialized]
geom_hnd.F:4143:0: warning: ‘ccost’ may be used uninitialized in this function [-Wuninitialized]
geom_hnd.F:4142:0: warning: ‘ccosp’ may be used uninitialized in this function [-Wuninitialized]
geom_hnd.F:4031:0: warning: ‘ssin’ may be used uninitialized in this function [-Wuninitialized]
geom_hnd.F:4033:0: warning: ‘ccos’ may be used uninitialized in this function [-Wuninitialized]
/tmp/ccsjbe64.s: Assembler messages:
/tmp/ccsjbe64.s:150: Error: no such instruction: `vfmadd312sd .LC3(%rip),%xmm4,%xmm1'
/tmp/ccsjbe64.s:606: Error: no such instruction: `vfmadd312sd (%r14),%xmm4,%xmm2'
/tmp/ccsjbe64.s:662: Error: no such instruction: `vfmadd312sd (%r11),%xmm1,%xmm2'


Looking at the code I found in lines 80-81 of geom_hnd.F

     call hnd_bmat(geom,nzvar,ncart,
1 dbl_mb(k_x),dbl_mb(k_y),dbl_mb(k_z),
2 nzmat,dbl_mb(k_c))

later in line 96-97 is written:

     SUBROUTINE HND_BMAT(GEOM,NZVAR,NCART,B,ZMAT,IZMAT,NZMAT,C)
IMPLICIT DOUBLE PRECISION (A-H,O-Z)

Thus, dbl_mb(k_z) is supposed to be a integer matrix, which is actually not the case. Any idea how this problem can be solved.

Thanks for your help.

Matthias


....

Forum Vet
Dear Matthias
I think that the dbl_mb(k_z) problem is a compiler warning and not the cause for the compiler crash.
Instead, there must be some sort of inconsistency between you compiler gfortran and the assembler (as or gas) installed on your computer, probably because you might have a relatively recent cpu. The compiler options causing trouble should be "-march=native -mtune=native". To verify if my theory is correct, please try to compile wit the following command

If you use a gfortran compiler prior to 4.8:
make FC=gfortran FOPTIMIZE="-O3  -mfpmath=sse -ffast-math"


For gfortran 4.8 and later
make FC=gfotran FOPTIMIZE="-O3  -mfpmath=sse -ffast-math -fno-aggressive-loop-optimizations"

Just Got Here
Solved
Great, this solves the problem. Thanks.

Matthias


Forum >> NWChem's corner >> Compiling NWChem