[CP2K-user] [CP2K:19438] Re: Compile serial CP2K without OpenMP

'Frederick Stein' via cp2k cp2k at googlegroups.com
Fri Oct 27 09:26:50 UTC 2023


Dear Cindy,

No, since version 8.1, CP2K requires to be compiled with OpenMP. In your 
case, you have to append the -fopenmp flag to the CC and FC variables (or 
alternatively, to the FCFLAGS and CFLAGS variables).

What version do you intend to build? The libint and libxc modules you 
intended to include are not compatible with CP2K version 7 or 8 onwards. If 
you would like to use them, you will have to compile them yourself.

HTH

Frederick

Cindy Pham schrieb am Donnerstag, 26. Oktober 2023 um 17:51:07 UTC+2:

> Hi cp2k forum,
>
> When I compile the serial makefile (attached below )with all modules 
> loaded, it gives me the error that I need to add the OpenMP flag due to 
> the base_uses.f90 file at lines19-21. I wonder whether it is possible to 
> compile serial CP2K without OpenMP. Thank you in advance.
>
> Best,
> Cindy.
>
> Beluga-Linux-x86-64-gfortran.sopt/ Beluga-Linux-x86-64-gfortran.ssmp
> # Beluga: 
> # module --force purge
> # module load nixpkgs/16.09 gcc imkl fftw
> #  1) nixpkgs/16.09 (S)   2) gcccore/.7.3.0 (H)   3) gcc/7.3.0 (t)   4) 
> imkl/2018.3.222 (math)   5) fftw/3.3.8 (math)
> # (optional, not used) module load libint libxc
> # 7) libint/1.1.6 8) libxc/4.2.1
>
> CC       = cc
> CPP      =
>
> FC       = gfortran
> LD       = gfortran
>
> AR       = ar -r
>
> DFLAGS   = -D__GFORTRAN -D__FFTSG -D__MKL -D__FFTW3
> #XC#DFLAGS     += -D__LIBXC
> #INT#DFLAGS     += -D__LIBINT
>
> FCFLAGS  = $(DFLAGS) -O0 -ffree-form -ffree-line-length-none -m64
> FCFLAGS += -Werror=realloc-lhs -finline-matmul-limit=0 -Werror=aliasing 
> -Werror=ampersand -Werror=c-binding-type -Werror=intrinsics-std 
> -Werror=line-truncation -Werror=tabs -Werror=target-lifetime 
> -Werror=underflow -Werror=unused-but-set-variable -Werror=conversion 
> -Werror=zerotrip -Wno-maybe-uninitialized -Wuse-without-only
>
> #-Werror=unused-variable
> #-Werror=uninitialized
> #-Werror=unused-dummy-argument
> #
> #XC#FCFLAGS    += -I'/cvmfs/
> soft.computecanada.ca/easybuild/software/2017/avx2/Compiler/gcc5.4/libxc/4.2.1/include
> '
>
> LDFLAGS  = $(FCFLAGS) -static-libgfortran
>
> LIBS     = -L${MKLROOT}/lib/intel64 -Wl,--start-group -lmkl_gf_lp64 
> -lmkl_sequential -lmkl_core -Wl,--end-group -lpthread -lm -ldl
> LIBS       += -lfftw3
> #LIBS       += -lreflapack -lrefblas
> #XC#LIBS       += -lxcf03 -lxc
> #INT#LIBS       += -lint -lderiv -lstdc++
>

-- 
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+unsubscribe at googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cp2k/e31a7247-88f4-423d-9b75-25116dfa9eddn%40googlegroups.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20231027/73458ddd/attachment.htm>


More information about the CP2K-user mailing list