pscale.c(310): error: identifier "DLAMCHS" is undefined error


Just Got Here
I am trying to verify the benchmark given at intel code recipe [1]
My environment variable configuration script file :
# This file was auto-generated by /home/d3y133/nwchem-releases/nwchem-6.5/contrib/distro-tools/build_nwchem
export NWCHEM_TOP=/home/puneet/NWChem/NWCHEM_INTEL/Nwchem-6.5
export NWCHEM_TARGET=any
export NWCHEM_MODULES=all\ python
#export NWCHEM_MPIF_WRAP=/opt/intel/impi/5.0.1.035/intel64/bin/mpiifort
export NWCHEM_MPIF_WRAP=/opt/intel/impi/5.0.1.035/intel64/bin/mpif90
export NWCHEM_MPIC_WRAP=/opt/intel/impi/5.0.1.035/intel64/bin/mpiicc
export NWCHEM_MPICXX_WRAP=/opt/intel/impi/5.0.1.035/intel64/bin/mpicxx
export USE_NOFSCHECK=Y
export USE_MPI=y
export USE_MPIF=y
export USE_MPIF4=y
export USE_CPPRESERVE=y
export MPI_HOME=/opt/intel/impi/5.0.1.035/intel64/
export MPI_INCLUDE="$MPI_HOME"/include
export MPI_LIB="$MPI_HOME"/lib
export LIBMPI="-lmpigf -lmpi -lmpigi -ldl -lrt -lpthread"
export FC=ifort
export CC=icc
export CXX=icpc

export ARMCI_DEFAULT_SHMMAX_UBOUND=65536
export MKLROOT=/opt/intel/composer_xe_2015.0.090/mkl/
export SCALAPACK_LIB=" -mkl -openmp -lmkl_scalapack_ilp64 -lmkl_blacs_intelmpi_ilp64 -lpthread -lm"
export SCALAPACK="$SCALAPACK_LIB"
export LAPACK_LIB="-mkl -openmp  -lpthread -lm"
export BLAS_LIB="$LAPACK_LIB"
export BLASOPT="$LAPACK_LIB"
export USE_SCALAPACK=y
export SCALAPACK_SIZE=8
export BLAS_SIZE=8
export LAPACK_SIZE=8
export ARMCI_NETWORK=MPI-TS
export MSG_COMMS=MPI
export PYTHON_EXE=/usr/bin/python
export PYTHONVERSION=2.6
export USE_PYTHON64=yes
export PYTHONPATH=/usr/lib64/python2.6/site-packages/
export PYTHONHOME=/usr
export PYTHONLIBTYPE=so
export USE_OPENMP=1
export USE_OFFLOAD=1
function renwc()
{
   make FC=$FC ; pushd $NWCHEM_TOP/src ; make FC=$FC link ; popd
}

I applied xmpoles patch [2] and mic offload patch for ifort [3] from your official page.But while compiling nwchem on my Intel(R) Xeon(R) E5-2670 v2 host(with mic card) i am getting errors & The breif error log is:
ifort -c   -I. -I/opt/intel/impi/5.0.1.035/intel64//include -I/home/puneet/NWChem/NWCHEM_INTEL/Nwchem-6.5/src/include -I/home/puneet/NWChem/NWCHEM_INTEL/Nwchem-6.5/src/tools/install/include -DSCALAPACK -DPARALLEL_DIAG -DNOFSCHECK -DJOBTIMEPATH=\"/home/puneet/NWChem/NWCHEM_INTEL/Nwchem-6.5/bin/any\" -DNWCHEM_SRCDIR="\"/home/puneet/NWChem/NWCHEM_INTEL/Nwchem-6.5/src\""  util_test_cholesky.F
ifort -c   icopy.f
ifort -c   dsum.f
ifort -c   dgefa.f
make[2]: Leaving directory `/home/puneet/NWChem/NWCHEM_INTEL/Nwchem-6.5/src/util'
Making all in md5
make[2]: Entering directory `/home/puneet/NWChem/NWCHEM_INTEL/Nwchem-6.5/src/util/md5'
icc -c -I.  -I/home/puneet/NWChem/NWCHEM_INTEL/Nwchem-6.5/src/include -I/home/puneet/NWChem/NWCHEM_INTEL/Nwchem-6.5/src/tools/install/include -DSCALAPACK -DPARALLEL_DIAG  -O0 -g -g  -o md5wrap.o md5wrap.c
icc -c -I.  -I/home/puneet/NWChem/NWCHEM_INTEL/Nwchem-6.5/src/include -I/home/puneet/NWChem/NWCHEM_INTEL/Nwchem-6.5/src/tools/install/include -DSCALAPACK -DPARALLEL_DIAG  -O0 -g -g  -o md5.o md5.c
make[3]: Entering directory `/home/puneet/NWChem/NWCHEM_INTEL/Nwchem-6.5/src/util/md5'
Got lock on /home/puneet/NWChem/NWCHEM_INTEL/Nwchem-6.5/lib/any/libnwcutil.lock
xiar r /home/puneet/NWChem/NWCHEM_INTEL/Nwchem-6.5/lib/any/libnwcutil.a md5wrap.o md5.o
xiar: executing 'ar'
/home/puneet/NWChem/NWCHEM_INTEL/Nwchem-6.5/lib/any/libnwcutil.a
/bin/sh: line 7: /home/puneet/NWChem/NWCHEM_INTEL/Nwchem-6.5/lib/any/libnwcutil.a: Permission denied
make[3]: Leaving directory `/home/puneet/NWChem/NWCHEM_INTEL/Nwchem-6.5/src/util/md5'
make[2]: Leaving directory `/home/puneet/NWChem/NWCHEM_INTEL/Nwchem-6.5/src/util/md5'
make[2]: Entering directory `/home/puneet/NWChem/NWCHEM_INTEL/Nwchem-6.5/src/util'
Got lock on /home/puneet/NWChem/NWCHEM_INTEL/Nwchem-6.5/lib/any/libnwcutil.lock
xiar r /home/puneet/NWChem/NWCHEM_INTEL/Nwchem-6.5/lib/any/libnwcutil.a output.o errquit.o ffflush.o print_center.o util_flush.o util_sgroup.o util_host.o util_date.o input_echo.o util_transpose.o ga_iter_diag.o ga_maxelt.o nga_idamax.o ga_pcg_min.o line_search.o ga_orth_vec.o ga_ran_fill.o ga_mix.o ga_list.o ga_it_proj.o ga_screen.o ga_get_diag.o fortchar.o seq_output.o ga_mat2col.o util_ch_brd.o two_ind_trn.o util_pname.o sread.o swrite.o banner.o util_print.o util_version.o util_nwchem_version.o util_ga_version.o util_nwchem_paper.o util_nwchem_srcdir.o utilc_nwchem_srcdir.o mk_fit_xf.o int_2c_ga.o ga_local_mdot.o util_cpusec.o util_wallsec.o gather.o scatter.o ga_trace_dg.o lcopy.o util_legal.o util_file_name.o util_io_unit.o util_speak.o util_rtdb_speak.o util_file_copy.o util_file_unlink.o util_system.o util_sleep.o util_rtdb_state.o ecce_print.o util_random.o util_job.o util_getenv.o util_getarg.o util_nwchemrc.o util_md.o util_md_c.o util_md_sockets.o dgewr.o atoi.o indint.o util_wall_remain.o ga_normf.o corr_mk_ref.o nw_inp_from_file.o bgj.o movecs_ecce.o get_density.o moeig_read.o util_file_copy.o util_debug.o util_erf.o util_cflush.o util_ascii_plot.o util_length_scale.o ga_it2.o ga_lkain_ext.o ma_print.o freeze_input.o ga_extra.o util_test.o util_ga_test.o util.o util_patch_test.o util_ndim_test.o util_perf_test.o util_test_lu.o util_test_eig.o util_dra_test.o util_eaf_test.o util_sf_test.o ga_lkain_2cpl3.o util_io.o util_xyz.o util_ma.o util_mpinap.o ga_lkain_2cpl3_ext.o util_dgeev.o util_nwsort.o util_mygabcast.o util_getppn.o util_mic_support.o ga_matpow.o util_pack.o dabssum.o dabsmax.o dfill.o ifill.o mabyte_fill.o ga_it_lsolve.o ga_it_orth.o ga_orthog.o idamin.o util_jacobi.o stpr_sjacobi.o util_memcpy.o ga_accback.o ga_asymmetr.o util_gnxtval.o nxtask.o util_mirror.o ga_copy_dz.o dgami.o util_eri_cholesky.o util_test_cholesky.o icopy.o dsum.o dgefa.o
xiar: executing 'ar'
/home/puneet/NWChem/NWCHEM_INTEL/Nwchem-6.5/lib/any/libnwcutil.a
/bin/sh: line 7: /home/puneet/NWChem/NWCHEM_INTEL/Nwchem-6.5/lib/any/libnwcutil.a: Permission denied
make[2]: Leaving directory `/home/puneet/NWChem/NWCHEM_INTEL/Nwchem-6.5/src/util'
make[1]: Leaving directory `/home/puneet/NWChem/NWCHEM_INTEL/Nwchem-6.5/src/util'
Making libraries in peigs
make[1]: Entering directory `/home/puneet/NWChem/NWCHEM_INTEL/Nwchem-6.5/src/peigs'
(make lib ) || exit 1
make[2]: Entering directory `/home/puneet/NWChem/NWCHEM_INTEL/Nwchem-6.5/src/peigs'
(cd ./src/c; make)
make[3]: Entering directory `/home/puneet/NWChem/NWCHEM_INTEL/Nwchem-6.5/src/peigs/src/c'
icc  -I/home/puneet/NWChem/NWCHEM_INTEL/Nwchem-6.5/src/peigs/h -Dany -D  -c clustrfix.c
clustrfix.c(206): error: identifier "DLAMCHE" is undefined
    eps = DLAMCHE;
          ^

compilation aborted for clustrfix.c (code 2)
make[3]: *** [clustrfix.o] Error 2
make[3]: Leaving directory `/home/puneet/NWChem/NWCHEM_INTEL/Nwchem-6.5/src/peigs/src/c'
make[2]: *** [lib] Error 2
make[2]: Leaving directory `/home/puneet/NWChem/NWCHEM_INTEL/Nwchem-6.5/src/peigs'
make[1]: *** [peigs_stamp] Error 1
make[1]: Leaving directory `/home/puneet/NWChem/NWCHEM_INTEL/Nwchem-6.5/src/peigs'
make: *** [libraries] Error 1


I guess the library permission is the root cause , but i manually setting permission (after make failure), and rerunning make is also not getting me past this error.
I have uploaded detailed make error log at 4shared [4];
Any help/Hint will be very fruitful.
Awaiting your reply

Forum Vet
Please follow the instructions at
http://nwchemgit.github.io/index.php/Compiling_NWChem#How-to:_Intel_Xeon_Phi


Forum >> NWChem's corner >> Compiling NWChem