cp2k macOS Big Sur Installation Error

112 views
Skip to first unread message

Bensen Hsu

unread,
Jan 23, 2021, 2:54:18 AM1/23/21
to cp2k
Is there anyone who also uses macOS came across the below problem during first time installation?

(base) Bensens-MacBook-Pro:cp2k bensenhsu$ make ARCH=Darwin-IntelMacintosh-gfortran VERSION=sopt
Discovering programs ...
Version sopt is now an alias for ssmp with OMP_NUM_THREADS=1.
/Users/bensenhsu/cp2k/Makefile:51: /Users/bensenhsu/cp2k/arch/Darwin-IntelMacintosh-gfortran.ssmp: No such file or directory
make[2]: *** No rule to make target '/Users/bensenhsu/cp2k/arch/Darwin-IntelMacintosh-gfortran.ssmp'.  Stop.
make[1]: *** [/Users/bensenhsu/cp2k/Makefile:130: sopt] Error 2
make: *** [Makefile:121: all] Error 2

I'm new in this field, so I would like to hear from you. Drown me with your advice!

Tiziano Müller

unread,
Jan 23, 2021, 8:21:19 AM1/23/21
to cp...@googlegroups.com
Hi Bensen,

the arch files for macOS has been recently renamed to Darwin-gfortran.*,
so you need `make ARCH=Darwin-gfortran VERSION=ssmp -j`
... please also note that building without OpenMP (`sopt`) is deprecated
and an alias for running CP2K with `OMP_NUM_THREADS=1`.

Best,
Tiziano

On 1/23/21 8:54 AM, Bensen Hsu wrote:
> Is there anyone who also uses macOS came across the below problem during
> first time installation?
>
> (base) Bensens-MacBook-Pro:cp2k bensenhsu$ *make
> ARCH=Darwin-IntelMacintosh-gfortran VERSION=sopt*
> Discovering programs ...
> Version sopt is now an alias for ssmp with OMP_NUM_THREADS=1.
> /Users/bensenhsu/cp2k/Makefile:51:
> /Users/bensenhsu/cp2k/arch/Darwin-IntelMacintosh-gfortran.ssmp: No such
> file or directory
> make[2]: *** No rule to make target
> '/Users/bensenhsu/cp2k/arch/Darwin-IntelMacintosh-gfortran.ssmp'.  Stop.
> make[1]: *** [/Users/bensenhsu/cp2k/Makefile:130: sopt] Error 2
> make: *** [Makefile:121: all] Error 2
>
> I'm new in this field, so I would like to hear from you. Drown me with
> your advice!
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/cp2k/6e8b1eb9-f53b-4c4b-b8cc-91b7a602f65fn%40googlegroups.com
> <https://groups.google.com/d/msgid/cp2k/6e8b1eb9-f53b-4c4b-b8cc-91b7a602f65fn%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
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

Bensen Hsu

unread,
Jan 23, 2021, 10:10:01 AM1/23/21
to cp2k
Hi Tiziano,

Very thankful for your kind reply! I tried 'make ARCH=Darwin-gfortran VERSION=ssmp -j', it worked better than before, but still ended up with:

make[4]: *** [/Users/bensenhsu/cp2k/exts/dbcsr/.cp2k/Makefile:281: dbcsr_tensor_block.o] Error 1
make[3]: *** [.cp2k/Makefile:206: libdbcsr] Error 2
make[2]: *** [/Users/bensenhsu/cp2k/exts/Makefile.inc:16: dbcsr] Error 2
make[1]: *** [/Users/bensenhsu/cp2k/Makefile:126: ssmp] Error 2
make: *** [Makefile:121: all] Error 2

And I still didn't see the cp2k.sopt in cp2k/exe directory.

BTW. What do you mean by "building without OpenMP (`sopt`) is deprecated and an alias for running CP2K with `OMP_NUM_THREADS=1`"? I don't quite understand, very sorry.

Best,
Bensen

Tiziano Müller

unread,
Jan 25, 2021, 8:02:36 AM1/25/21
to cp...@googlegroups.com
Hi Bensen,

On 1/23/21 4:10 PM, Bensen Hsu wrote:
> Hi Tiziano,
>
> Very thankful for your kind reply! I tried 'make ARCH=Darwin-gfortran
> VERSION=ssmp -j', it worked better than before, but still ended up with:
>
> make[4]: *** [/Users/bensenhsu/cp2k/exts/dbcsr/.cp2k/Makefile:281:
> dbcsr_tensor_block.o] Error 1
> make[3]: *** [.cp2k/Makefile:206: libdbcsr] Error 2
> make[2]: *** [/Users/bensenhsu/cp2k/exts/Makefile.inc:16: dbcsr] Error 2
> make[1]: *** [/Users/bensenhsu/cp2k/Makefile:126: ssmp] Error 2
> make: *** [Makefile:121: all] Error 2

Please attach the complete build log (especially the error message from
the compiler).

> And I still didn't see the /cp2k.sopt/ in /cp2k/exe/ directory.

That's because the build didn't finish.

> BTW. What do you mean by "building without OpenMP (`sopt`) is deprecated
> and an alias for running CP2K with `OMP_NUM_THREADS=1`"? I don't quite
> understand, very sorry.

Previously you used VERSION=sopt. "sopt", which would mean single threaded.

Best,
Tiziano
> <https://groups.google.com/d/msgid/cp2k/6e8b1eb9-f53b-4c4b-b8cc-91b7a602f65fn%40googlegroups.com?utm_medium=email&utm_source=footer
> <https://groups.google.com/d/msgid/cp2k/6e8b1eb9-f53b-4c4b-b8cc-91b7a602f65fn%40googlegroups.com?utm_medium=email&utm_source=footer>>.
>
>
> --
> Tiziano Müller
> University of Zurich
> Department of Chemistry
> Winterthurerstrasse 190
> CH-8057 Zürich
>
> Tel: +41 44 63 54234
> www.chem.uzh.ch <http://www.chem.uzh.ch>
> tiziano...@chem.uzh.ch
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/cp2k/2345baa8-5a0f-448c-909a-ce21b615670en%40googlegroups.com
> <https://groups.google.com/d/msgid/cp2k/2345baa8-5a0f-448c-909a-ce21b615670en%40googlegroups.com?utm_medium=email&utm_source=footer>.

Bensen Hsu

unread,
Jan 25, 2021, 8:12:47 AM1/25/21
to cp2k
Hi Tiziano,

Below is the entire error message: (I think the build has finished, I tried it today but ended up with the same result)

(base) Bensens-MacBook-Pro:cp2k bensenhsu$ make ARCH=Darwin-gfortran VERSION=ssmp -j
Discovering programs ...
make -C /Users/bensenhsu/cp2k/exts/dbcsr -f .cp2k/Makefile \
   INCLUDEMAKE=/Users/bensenhsu/cp2k/arch/Darwin-gfortran.ssmp \
   LIBDIR=/Users/bensenhsu/cp2k/lib/Darwin-gfortran/ssmp/exts/dbcsr \
   OBJDIR=/Users/bensenhsu/cp2k/obj/Darwin-gfortran/ssmp/exts/dbcsr \
   ACC="" \
   ACCFLAGS=""
Removing stale archives for ssmp ... 
Removing stale archives ... 
Resolving dependencies for ssmp ... 
Resolving dependencies ... 
/usr/bin/env python3 /Users/bensenhsu/cp2k/exts/dbcsr/tools/build_utils/fypp/bin/fypp -n /Users/bensenhsu/cp2k/exts/dbcsr/src/tensors/dbcsr_tensor_block.F dbcsr_tensor_block.F90
gfortran -c -I  -I  -fopenmp -funroll-loops -ftree-vectorize -ffree-form -O2 -D__NO_STATM_ACCESS -D__ACCELERATE -D__LIBXC -D__LIBINT -D__SHORT_FILE__="\"dbcsr_tensor_block.F\"" -I'/Users/bensenhsu/cp2k/exts/dbcsr/src/tensors/' -I'/Users/bensenhsu/cp2k/exts/dbcsr/src' dbcsr_tensor_block.F90 
Warning: Nonexistent include directory "-I"
f951(38553,0x14ba89e00) malloc: *** error for object 0x1413a5e70: pointer being freed was not allocated
f951(38553,0x14ba89e00) malloc: *** set a breakpoint in malloc_error_break to debug
f951: internal compiler error: Abort trap: 6
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
make[4]: *** [/Users/bensenhsu/cp2k/exts/dbcsr/.cp2k/Makefile:281: dbcsr_tensor_block.o] Error 1
make[3]: *** [.cp2k/Makefile:206: libdbcsr] Error 2
make[2]: *** [/Users/bensenhsu/cp2k/exts/Makefile.inc:16: dbcsr] Error 2
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [/Users/bensenhsu/cp2k/Makefile:126: ssmp] Error 2
make: *** [Makefile:121: all] Error 2

Best,
Bensen

Tiziano Müller

unread,
Jan 25, 2021, 8:32:18 AM1/25/21
to cp...@googlegroups.com
Hi Bensen,

On 1/25/21 2:12 PM, Bensen Hsu wrote:
> Hi Tiziano,
>
> Below is the entire error message: (I think the build has finished, I
> tried it today but ended up with the same result)

No, it didn't (if it ends with "make: *** [Makefile:121: all] Error 2"
means there was an error and the build did not finish).

There seems to be a more general problem with the compiler (`gfortran`)
on your machine.
If you have installed gfortran with Homebrew or MacPorts, please make
sure you have a recent version of it (update if needed). Sometimes you
have to update/reinstall gfortran after an update of macOS or the XCode
environment. If you have installed gcc/gfortran from somewhere else,
please check whether they provide an updated version of it.

Best,
Tiziano
> > www.chem.uzh.ch <http://www.chem.uzh.ch> <http://www.chem.uzh.ch
> <http://www.chem.uzh.ch>>
> > tiziano...@chem.uzh.ch
> >
> > --
> > 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 view this discussion on the web visit
> >
> https://groups.google.com/d/msgid/cp2k/2345baa8-5a0f-448c-909a-ce21b615670en%40googlegroups.com
> <https://groups.google.com/d/msgid/cp2k/2345baa8-5a0f-448c-909a-ce21b615670en%40googlegroups.com>
>
> >
> <https://groups.google.com/d/msgid/cp2k/2345baa8-5a0f-448c-909a-ce21b615670en%40googlegroups.com?utm_medium=email&utm_source=footer
> <https://groups.google.com/d/msgid/cp2k/2345baa8-5a0f-448c-909a-ce21b615670en%40googlegroups.com?utm_medium=email&utm_source=footer>>.
>
>
> --
> Tiziano Müller
> University of Zurich
> Department of Chemistry
> Winterthurerstrasse 190
> CH-8057 Zürich
>
> Tel: +41 44 63 54234
> www.chem.uzh.ch <http://www.chem.uzh.ch>
> tiziano...@chem.uzh.ch
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/cp2k/41441b01-f7fb-414a-9dbd-87cb81c99a14n%40googlegroups.com
> <https://groups.google.com/d/msgid/cp2k/41441b01-f7fb-414a-9dbd-87cb81c99a14n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Bensen Hsu

unread,
Jan 25, 2021, 10:01:00 AM1/25/21
to cp2k
Hi Tiziano,

I've checked, gfortran is the latest version, but it still doesn't work.

I followed the instructions from 2 places:

I'm wondering if the instructions are out of date. Since they all ask me to use the cp2k-2.6.2 version. Should I adjust my gfortran to the corresponding version?

Best,
Bensen

Tiziano Müller

unread,
Jan 25, 2021, 10:09:17 AM1/25/21
to cp...@googlegroups.com
Hi Bensen,

an up-to-date (and tested) arch file for macOS can be found here:

https://github.com/cp2k/cp2k/blob/master/arch/Darwin-gfortran.ssmp

(if you used `git` to get the source code, simply do a `git pull
--rebase` to get that).

We do not ship `gfortran` nor do the instructions specify a specific
version. Hence I don't know where the `gfortran` you are using is coming
from, or which version it is. But the message from your report earlier:

f951: internal compiler error: Abort trap: 6

> > libbacktrace could not find executable to open

> > Please submit a full bug report,

> > with preprocessed source if appropriate.

states that the compiler failed in a bad way. Which it should not do.
So it is less a problem of CP2K and more a problem of the build
environment (compiler, etc.).

Best,
Tiziano
> > See <http://gcc.gnu.org/bugs.html <http://gcc.gnu.org/bugs.html>>
> https://groups.google.com/d/msgid/cp2k/41441b01-f7fb-414a-9dbd-87cb81c99a14n%40googlegroups.com
> <https://groups.google.com/d/msgid/cp2k/41441b01-f7fb-414a-9dbd-87cb81c99a14n%40googlegroups.com>
>
> >
> <https://groups.google.com/d/msgid/cp2k/41441b01-f7fb-414a-9dbd-87cb81c99a14n%40googlegroups.com?utm_medium=email&utm_source=footer
> <https://groups.google.com/d/msgid/cp2k/41441b01-f7fb-414a-9dbd-87cb81c99a14n%40googlegroups.com?utm_medium=email&utm_source=footer>>.
>
>
> --
> Tiziano Müller
> University of Zurich
> Department of Chemistry
> Winterthurerstrasse 190
> CH-8057 Zürich
>
> Tel: +41 44 63 54234
> www.chem.uzh.ch <http://www.chem.uzh.ch>
> tiziano...@chem.uzh.ch
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/cp2k/63dd4dc6-508b-4e2e-9003-9fc41fcee302n%40googlegroups.com
> <https://groups.google.com/d/msgid/cp2k/63dd4dc6-508b-4e2e-9003-9fc41fcee302n%40googlegroups.com?utm_medium=email&utm_source=footer>.
Reply all
Reply to author
Forward
0 new messages