Install CP2K locally on cluster

514 views
Skip to first unread message

Mohammad Shakiba

unread,
Mar 2, 2019, 2:04:39 PM3/2/19
to cp2k
Hello everyone,

I have an account on a cluster and I want to install CP2K locally in my own account. I used the following commands and got the following error:


1- cd /tools/toolchain


2- ./install_cp2k_toolchain.sh


3- copying the create arch files like 'local.ssmp' to arch folder in cp2k path


4- source the setup file in the 'toolchain' folder


5- make -j 30 ARCH=local VERSION=ssmp


Now, when I want to make the executable file this error occurs (the first one happens multiple times for many functions):


../cp2k-6.1.0/src/common/spherical_harmonics.F:1205: error: ‘plm’ may be used uninitialized in this function
....
....
f951: warning: unrecognized command line option "-Wno-maybe-uninitialized"


I don't know what to do with it. Also, when I remove the "-Wno-maybe-uninitialized" from the arch file I get the error of ' 'variable' may be used uninitialized in this function'.

Please help me to solve this.

Thanks in advance.

Tiziano Müller

unread,
Mar 3, 2019, 6:47:25 AM3/3/19
to Mohammad Shakiba, cp...@googlegroups.com
Hi Mohammad,

removing all "-Werror=..." flags should make it compile, see

https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html

for a description of the diagnostic flags for GCC.

Best regards,
Tiziano

Am 02.03.19 um 20:04 schrieb Mohammad Shakiba:
> --
> 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
> <mailto:cp2k+uns...@googlegroups.com>.
> To post to this group, send email to cp...@googlegroups.com
> <mailto:cp...@googlegroups.com>.
> Visit this group at https://groups.google.com/group/cp2k.
> For more options, visit https://groups.google.com/d/optout.

--
Tiziano Müller
University of Zurich
Department of Chemistry
Winterthurerstrasse 190
CH-8057 Zürich

Tel: +41 44 63 54234
www.chem.uzh.ch
tiziano...@chem.uzh.ch

Mohammad Shakiba

unread,
Mar 4, 2019, 6:44:33 AM3/4/19
to cp2k
Dear Tiziano Müller,

Thank you so much. Now I got a new error:

r2p(1:d1,1:d2) => r1p(1:d1*d2)
1
Error: Pointer bounds remapping at (1) is not yet implemented in gfortran

I think the problem is with gfortran. The gcc8 is installed on the cluster and I have used:

module load gcc8

before making the local arch files. But even when I use 'gfortran --version' and 'gcc --version' their versions are 4.4.8 and 4.8.
I used the 'module unload (purge) gfortran' and 'module unload gcc' but when I use ./install_cp2k_toolchain.sh it does not download and install it and find it in the bin folder. Can you help me how to totally unload it so that ./install_cp2k_toolchain installs the gcc and gfortran itself?
 

Tiziano Müller

unread,
Mar 4, 2019, 7:14:07 AM3/4/19
to Mohammad Shakiba, cp...@googlegroups.com
Dear Mohammad,

Wrt gcc8: you should talk to your cluster admin on how to use it.
Usually it is sufficient to just load it to be able to use it via `gcc`
or `gfortran`, but this may be different here.

To use the toolchain to build a suitable compiler as well, you can use:

./install_cp2k_toolchain.sh --install-all

or a bit more selective (only build gcc, but use linker and
MPI-implementation from system):

./install_cp2k_toolchain.sh --with-gcc

Use

./install_cp2k_toolchain.sh --help

to see more options.

Please note: you may have to rebuild the complete toolchain when
changing the compiler (also when switching from a system-provided to a
toolchain-provided one or when loading a different compiler module). To
do that, remove the `build` and `install` directories (in
`tools/toolchain`) prior to re-running `install_cp2k_toolchain.sh`.

Best regards,
Tiziano

On 04.03.19 12:44, Mohammad Shakiba wrote:
> Dear Tiziano Müller,
>
> Thank you so much. Now I got a new error:
>
> r2p(1:d1,1:d2) => r1p(1:d1*d2)
> 1
> Error: Pointer bounds remapping at (1) is *not yet implemented in gfortran*
> *
> *
> I think the problem is with gfortran. The gcc8 is installed on the
> cluster and I have used:
> *
> *
> *module load gcc8*
> *
> *
> before making the local arch files. But even when I use 'gfortran
> --version' and 'gcc --version' their versions are 4.4.8 and 4.8.
> I used the 'module unload (purge) gfortran' and 'module unload gcc' but
> when I use ./install_cp2k_toolchain.sh it does not download and install
> it and find it in the bin folder. Can you help me how to totally unload
> it so that ./install_cp2k_toolchain installs the gcc and gfortran itself?*
> *

Mohammad Shakiba

unread,
Mar 5, 2019, 6:30:24 AM3/5/19
to cp2k
Thank you so much I think this is the best way I can compile it locally.
Reply all
Reply to author
Forward
0 new messages