[CP2K-user] [CP2K:15295] Compiling error: identifier undefined

MEF fost... at gmail.com
Tue May 4 14:41:15 UTC 2021


That worked! Thanks for the help; I did try searching but didn't see that 
post. Thanks again.

On Tuesday, May 4, 2021 at 10:22:01 AM UTC-4 Matthias Krack wrote:

> Hello MEF
>
>  
>
> I seems that you have the same issue as discussed here 
> <https://groups.google.com/g/cp2k/c/Vh1abbGJlkk/m/77ZWN6cLCwAJ> and 
> solved here 
> <https://groups.google.com/g/cp2k/c/Vh1abbGJlkk/m/ewuTayBgAQAJ>.
>
>  
>
> HTH
>
>  
>
> Matthias
>
>  
>
> *Von:* c... at googlegroups.com <c... at googlegroups.com> *Im Auftrag von *
> MEF
> *Gesendet:* Dienstag, 4. Mai 2021 16:10
> *An:* cp2k <c... at googlegroups.com>
> *Betreff:* [CP2K:15295] Compiling error: identifier undefined
>
>  
>
> Hi,
>
>  
>
> I'm having a hard time compiling CP2K (using master but also tried 8.1); I 
> have tried multiply versions of intel compilers (also tried openmpi) but 
> keep having the same problem. If anyone has any ideas, please let me know.
>
>  
>
> Not sure if this is helpful, but I saw a similar error with another 
> program when it was trying to use fftw instead of fftw3. I tried removing 
> the D__FFTW3 flag but same error; I also tried removing just about all of 
> the flags. 
>
>  
>
> I'm starting with a very simple build (Linux-x86-64-intel-minimal):
>
>  
>
> CC        = mpiicc
>
> FC        = mpiifort
>
> LD        = mpiifort
>
> AR        = ar -r
>
>  
>
> MKLROOT=/opt/intel/19.1/mkl
>
> CFLAGS    = -O2 -fno-inline -fopenmp -fp-model precise -funroll-loops -g 
> -qopenmp-simd -traceback -xHost
>
>  
>
> DFLAGS    = -D__FFTW3
>
> DFLAGS   += -D__MAX_CONTR=4
>
> DFLAGS   += -D__MKL
>
> DFLAGS   += -D__MPI_VERSION=3
>
> DFLAGS   += -D__parallel
>
> DFLAGS   += -D__SCALAPACK
>
>  
>
> FCFLAGS   = $(CFLAGS) $(DFLAGS)
>
> FCFLAGS  += -diag-disable=8291
>
> FCFLAGS  += -diag-disable=8293
>
> FCFLAGS  += -fpp
>
> FCFLAGS  += -free
>
> FCFLAGS  += -I$(MKLROOT)/include
>
> FCFLAGS  += -I$(MKLROOT)/include/fftw
>
>  
>
> LDFLAGS   = $(FCFLAGS) -static-intel -static_mpi
>
> LDFLAGS_C = -nofor-main
>
>  
>
> MKL_LIB   = $(MKLROOT)/lib/intel64
>
>  
>
> LIBS      = $(MKL_LIB)/libmkl_scalapack_lp64.a
>
> LIBS     += -Wl,--start-group
>
> LIBS     += $(MKL_LIB)/libmkl_intel_lp64.a
>
> LIBS     += $(MKL_LIB)/libmkl_sequential.a
>
> LIBS     += $(MKL_LIB)/libmkl_core.a
>
> LIBS     += $(MKL_LIB)/libmkl_blacs_intelmpi_lp64.a
>
> LIBS     += -Wl,--end-group
>
>  
>
> # Required due to memory leak that occurs if high optimisations are used
>
> mp2_optimize_ri_basis.o: mp2_optimize_ri_basis.F
>
>         $(FC) -c $(subst O2,O0,$(FCFLAGS)) $<
>
>  
>
>  
>
> Error:
>
> /projects/cp2k/tools/build_utils/fypp -n 
> /projects/cp2k/src/pw/cube_utils.F cube_utils.F90
>
> mpiifort -c -O2 -fno-inline -fopenmp -fp-model precise -funroll-loops -g 
> -qopenmp-simd -traceback -xHost -D__FFTW3 -D__MAX_CONTR=4 -D__MKL 
> -D__MPI_VERSION=3 -D__parallel -D__SCALAPACK -diag-disable=8291 
> -diag-disable=8293 -fpp -free -I/opt/intel/19.1/mkl/include 
> -I/opt/intel/19.1/mkl/include/fftw 
> -D__COMPILE_ARCH="\"Linux-x86-64-intel-minimal\"" -D__COMPILE_DATE="\"Tue 
> May  4 07:52:35 MDT 2021\"" -D__COMPILE_HOST="\"manzano-login3\"" 
> -D__COMPILE_REVISION="\"git:0b61f2f\"" 
> -D__DATA_DIR="\"/projects/cp2k/data\"" 
> -D__SHORT_FILE__="\"pw/cube_utils.F\"" -I'/projects/cp2k/src/pw/' 
> -I'/projects/cp2k/obj/Linux-x86-64-intel-minimal/psmp/exts/dbcsr' 
> cube_utils.F90
>
> /projects/cp2k/tools/build_utils/fypp -n 
> /projects/cp2k/src/grid/grid_api.F grid_api.F90
>
> mpiifort -c -O2 -fno-inline -fopenmp -fp-model precise -funroll-loops -g 
> -qopenmp-simd -traceback -xHost -D__FFTW3 -D__MAX_CONTR=4 -D__MKL 
> -D__MPI_VERSION=3 -D__parallel -D__SCALAPACK -diag-disable=8291 
> -diag-disable=8293 -fpp -free -I/opt/intel/19.1/mkl/include 
> -I/opt/intel/19.1/mkl/include/fftw 
> -D__COMPILE_ARCH="\"Linux-x86-64-intel-minimal\"" -D__COMPILE_DATE="\"Tue 
> May  4 07:52:35 MDT 2021\"" -D__COMPILE_HOST="\"manzano-login3\"" 
> -D__COMPILE_REVISION="\"git:0b61f2f\"" 
> -D__DATA_DIR="\"/projects/cp2k/data\"" 
> -D__SHORT_FILE__="\"grid/grid_api.F\"" -I'/projects/cp2k/src/grid/' 
> -I'/projects/cp2k/obj/Linux-x86-64-intel-minimal/psmp/exts/dbcsr' 
> grid_api.F90
>
> mpiicc -c -O2 -fno-inline -fopenmp -fp-model precise -funroll-loops -g 
> -qopenmp-simd -traceback -xHost /projects/cp2k/src/grid/grid_replay.c
>
> /projects/cp2k/src/grid/grid_replay.c(107): error: expected an expression
>
>     for (int i = 0; i < 3; i++) {
>
>          ^
>
>  
>
> /projects/cp2k/src/grid/grid_replay.c(107): error: identifier "i" is 
> undefined
>
>     for (int i = 0; i < 3; i++) {
>
>                     ^
>
>  
>
> /projects/cp2k/src/grid/grid_replay.c(122): error: expected an expression
>
>     for (int i = 0; i < size; i++) {
>
>          ^
>
>  
>
> /projects/cp2k/src/grid/grid_replay.c(122): error: identifier "i" is 
> undefined
>
>     for (int i = 0; i < size; i++) {
>
>                     ^
>
>  
>
> /projects/cp2k/src/grid/grid_replay.c(123): error: expected an expression
>
>       for (int j = 0; j < size; j++) {
>
>            ^
>
>  
>
> /projects/cp2k/src/grid/grid_replay.c(123): error: identifier "j" is 
> undefined
>
>       for (int j = 0; j < size; j++) {
>
>                       ^
>
>  
>
> /projects/cp2k/src/grid/grid_replay.c(135): error: expected an expression
>
>     for (int i = 0; i < npgf; i++) {
>
>          ^
>
>  
>
> /projects/cp2k/src/grid/grid_replay.c(188): error: expected an expression
>
>     for (int i = 0; i < cycles; i++) {
>
>          ^
>
>  
>
> /projects/cp2k/src/grid/grid_replay.c(188): error: identifier "i" is 
> undefined
>
>     for (int i = 0; i < cycles; i++) {
>
>                     ^
>
>  
>
> /projects/cp2k/src/grid/grid_replay.c(279): error: expected an expression
>
>     for (int i = 0; i < n2; i++) {
>
>          ^
>
>  
>
> /projects/cp2k/src/grid/grid_replay.c(279): error: identifier "i" is 
> undefined
>
>     for (int i = 0; i < n2; i++) {
>
>                     ^
>
>  
>
> /projects/cp2k/src/grid/grid_replay.c(280): error: expected an expression
>
>       for (int j = 0; j < n1; j++) {
>
>            ^
>
>  
>
> /projects/cp2k/src/grid/grid_replay.c(280): error: identifier "j" is 
> undefined
>
>       for (int j = 0; j < n1; j++) {
>
>                       ^
>
>  
>
> /projects/cp2k/src/grid/grid_replay.c(293): error: expected an expression
>
>     for (int n = 0; n < ngrid_nonzero; n++) {
>
>          ^
>
>  
>
> /projects/cp2k/src/grid/grid_replay.c(293): error: identifier "n" is 
> undefined
>
>     for (int n = 0; n < ngrid_nonzero; n++) {
>
>                     ^
>
>  
>
> /projects/cp2k/src/grid/grid_replay.c(303): error: expected an expression
>
>     for (int i = o2; i < ncoset(lb_max) + o2; i++) {
>
>          ^
>
>  
>
> /projects/cp2k/src/grid/grid_replay.c(304): error: expected an expression
>
>       for (int j = o1; j < ncoset(la_max) + o1; j++) {
>
>            ^
>
>  
>
> /projects/cp2k/src/grid/grid_replay.c(304): error: identifier "j" is 
> undefined
>
>       for (int j = o1; j < ncoset(la_max) + o1; j++) {
>
>                        ^
>
>  
>
> /projects/cp2k/src/grid/grid_replay.c(347): error: expected an expression
>
>       for (int i = 0; i < n1; i++) {
>
>            ^
>
>  
>
> /projects/cp2k/src/grid/grid_replay.c(348): error: expected an expression
>
>         for (int j = 0; j < n2; j++) {
>
>              ^
>
>  
>
> /projects/cp2k/src/grid/grid_replay.c(348): error: identifier "j" is 
> undefined
>
>         for (int j = 0; j < n2; j++) {
>
>                         ^
>
>  
>
> /projects/cp2k/src/grid/grid_replay.c(366): error: expected an expression
>
>         for (int i = 0; i < n2; i++) {
>
>              ^
>
>  
>
> /projects/cp2k/src/grid/grid_replay.c(367): error: expected an expression
>
>           for (int j = 0; j < n1; j++) {
>
>                ^
>
>  
>
> /projects/cp2k/src/grid/grid_replay.c(367): error: identifier "j" is 
> undefined
>
>           for (int j = 0; j < n1; j++) {
>
>                           ^
>
>  
>
> /projects/cp2k/src/grid/grid_replay.c(383): error: expected an expression
>
>         for (int i = 0; i < cycles; i++) {
>
>              ^
>
>  
>
> /projects/cp2k/src/grid/grid_replay.c(395): error: expected an expression
>
>         for (int i = 0; i < cycles; i++) {
>
>              ^
>
>  
>
> /projects/cp2k/src/grid/grid_replay.c(403): error: expected an expression
>
>         for (int i = 0; i < 3; i++) {
>
>              ^
>
>  
>
> /projects/cp2k/src/grid/grid_replay.c(404): error: expected an expression
>
>           for (int j = 0; j < 3; j++) {
>
>                ^
>
>  
>
> /projects/cp2k/src/grid/grid_replay.c(404): error: identifier "j" is 
> undefined
>
>           for (int j = 0; j < 3; j++) {
>
>                           ^
>
>  
>
> /projects/cp2k/src/grid/grid_replay.c(419): error: expected an expression
>
>       for (int i = 0; i < npts_local_total; i++) {
>
>            ^
>
>  
>
> /projects/cp2k/src/grid/grid_replay.c(430): error: expected an expression
>
>       for (int i = 0; i < n2; i++) {
>
>            ^
>
>  
>
> /projects/cp2k/src/grid/grid_replay.c(431): error: expected an expression
>
>         for (int j = 0; j < n1; j++) {
>
>              ^
>
>  
>
> /projects/cp2k/src/grid/grid_replay.c(431): error: identifier "j" is 
> undefined
>
>         for (int j = 0; j < n1; j++) {
>
>                         ^
>
>  
>
> /projects/cp2k/src/grid/grid_replay.c(446): error: expected an expression
>
>       for (int i = 0; i < 2; i++) {
>
>            ^
>
>  
>
> /projects/cp2k/src/grid/grid_replay.c(447): error: expected an expression
>
>         for (int j = 0; j < 3; j++) {
>
>              ^
>
>  
>
> /projects/cp2k/src/grid/grid_replay.c(447): error: identifier "j" is 
> undefined
>
>         for (int j = 0; j < 3; j++) {
>
>                         ^
>
>  
>
> /projects/cp2k/src/grid/grid_replay.c(457): error: expected an expression
>
>       for (int i = 0; i < 3; i++) {
>
>            ^
>
>  
>
> /projects/cp2k/src/grid/grid_replay.c(458): error: expected an expression
>
>         for (int j = 0; j < 3; j++) {
>
>              ^
>
>  
>
> /projects/cp2k/src/grid/grid_replay.c(458): error: identifier "j" is 
> undefined
>
>         for (int j = 0; j < 3; j++) {
>
>                         ^
>
>  
>
> compilation aborted for /projects/cp2k/src/grid/grid_replay.c (code 2)
>
> make[3]: *** [grid_replay.o] Error 2
>
> make[2]: *** [all] Error 2
>
> make[1]: *** [psmp] Error 2
>
> make: *** [all] Error 2
>
>  
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "cp2k" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to cp... at googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/cp2k/a8259003-0925-4a10-ac05-f8078f12f054n%40googlegroups.com 
> <https://groups.google.com/d/msgid/cp2k/a8259003-0925-4a10-ac05-f8078f12f054n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20210504/64bcf7be/attachment.htm>


More information about the CP2K-user mailing list