why cp2k instructions are wrong

273 views
Skip to first unread message

Victor Volkov

unread,
Jul 27, 2021, 1:17:29 PM7/27/21
to cp2k
why cp2k instructions are misleading
for any version


 /cp2k-7.1.0
$ make ARCH=Cygwin-i686-gfortran VERSION=sopt
Discovering programs ...
/cp2k-7.1.0/exts/Makefile.inc:2: *** "No DBCSR submodule available, please run 'git submodule update --init --recursive'".  Stop.
make[1]: *** [/cp2k-7.1.0/Makefile:123: sopt] Error 2
make: *** [Makefile:118: all] Error 2

/cp2k-8.1
$ make ARCH=Cygwin-i686-gfortran VERSION=sopt
Discovering programs ...
Version sopt is now an alias for ssmp with OMP_NUM_THREADS=1.
Removing stale archives for ssmp ...
Resolving dependencies for ssmp ...
make -C /cp2k-8.1/exts/dbcsr -f .cp2k/Makefile \
   INCLUDEMAKE=/cp2k-8.1/arch/Cygwin-i686-gfortran.ssmp \
   LIBDIR=/cp2k-8.1/lib/Cygwin-i686-gfortran/ssmp/exts/dbcsr \
   OBJDIR=/cp2k-8.1/obj/Cygwin-i686-gfortran/ssmp/exts/dbcsr \
   ACC="" \
   ACCFLAGS=""
Removing stale archives ...
Resolving dependencies ...
gcc -c  /cp2k-8.1/src/grid/common/grid_library.c
/cp2k-8.1/src/grid/common/grid_library.c:28:2: error: #error "OpenMP is required. Please add -fopenmp to your C compiler flags."
   28 | #error "OpenMP is required. Please add -fopenmp to your C compiler flags."
      |  ^~~~~
make[3]: *** [/cp2k-8.1/Makefile:508: grid_library.o] Error 1
make[2]: *** [/cp2k-8.1/Makefile:144: all] Error 2
make[1]: *** [/cp2k-8.1/Makefile:130: sopt] Error 2
make: *** [Makefile:121: all] Error 2


/cp2k-8.2
$ make ARCH=Linux-x86-64-gfortran.ssmp
Discovering programs ...
/cp2k-8.2/Makefile:51: /cp2k-8.2/arch/Linux-x86-64-gfortran.ssmp.ssmp: No such file or directory
make[2]: *** No rule to make target '/cp2k-8.2/arch/Linux-x86-64-gfortran.ssmp.ssmp'.  Stop.
make[1]: *** [/cp2k-8.2/Makefile:126: ssmp] Error 2
make: *** [Makefile:121: all] Error 2




Fabian Ducry

unread,
Jul 27, 2021, 2:50:46 PM7/27/21
to cp...@googlegroups.com

Hi

I'm not sure what is misleading. The error message tells you what to do:

For 7.1: go to /cp2k-7.1.0 and run 'git submodule update --init --recursive', then try again

For 8.1: add -fopenmp to the lines CFLAGS and FCFLAGS in /cp2k-8.1/Cygwin-i686-gfortran.sopt

For 8.2: the command 'make ARCH=Linux-x86-64-gfortran.ssmp' is wrong, use the same syntax as for 7.1 and 8.1: 'make ARCH=Linux-x86-64-gfortran VERSION=ssmp'

Cheers

Fabian

--
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 cp2k+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cp2k/994368cf-21a8-4cd1-b0b9-ba6ed7040829n%40googlegroups.com.

Victor Volkov

unread,
Jul 27, 2021, 4:00:34 PM7/27/21
to cp...@googlegroups.com
Dear Fabian:
thank you for the kind email.

> For 8.2: the command 'make ARCH=Linux-x86-64-gfortran.ssmp' is wrong, use the same syntax as for 7.1 and 8.1: 'make ARCH=Linux-x86-64-gfortran VERSION=ssmp'

Answer: Thank you ..clear

>For 8.1: add -fopenmp to the lines CFLAGS and FCFLAGS in /cp2k-8.1/Cygwin-i686-gfortran.sopt

Answer:
I set
CPPFLAGS      = -fopenmp
CFLAGS does not exit in the sopt
but
what the heck
I added the line
CFLAGS        = -fopenmp

and also I set
FCFLAGS     = -O2 -ffast-math -funroll-loops -ftree-vectorize -ffree-form -fopenmp $(DFLAGS)

still I get 

/cp2k-8.1/src/grid/common/grid_library.c:28:2: error: #error "OpenMP is required. Please add -fopenmp to your C compiler flags."
   28 | #error "OpenMP is required. Please add -fopenmp to your C compiler flags."
      |  ^~~~~
make[3]: *** [/cp2k-8.1/Makefile:508: grid_library.o] Error 1
make[2]: *** [/cp2k-8.1/Makefile:144: all] Error 2
make[1]: *** [/cp2k-8.1/Makefile:130: sopt] Error 2
make: *** [Makefile:121: all] Error 2

.. -fopenmp is not recognized regardless

>"run 'git submodule update --init --recursive'"

ANSWER:
under CYGWIN I tried to command
"git submodule update --init --recursive"
and got
"-bash: git: command not found"

Shoul I go to SIGWIN update and search through databases
that somewhere there should be THREE libraries titled
1) "run.LIB"
2) "git.LIB"
3) " --init --recursive.LIB"
to be installed in a "collective" way, all together?

please instruct ....very curious!!!

Thank you.
sincerely
victor





CC_nerd

unread,
Sep 14, 2022, 3:03:14 AM9/14/22
to cp2k
Hi 
I am getting same error is it been solved?

Reply all
Reply to author
Forward
0 new messages