SAPT2+ Calculation: Segmentation fault during Exch12 computation

Yes, I think BUILD_SHARED_LIBS OFF will build static libraries, which are larger… Maybe @loriab can confirm ?

Yes, BUILD_SHARED_LIBS would explain it. Both are equally valid and will give the same results. With ON, you’ll get several other libs libefp.so and libint.so and libderiv.so along a smaller core.so. With OFF, all the contents of the former (including the integrals, which can be hefty at large AM) will be in core.so.

Hi,

I use the following CMAKE parameters, but the core.so library is still more than 400 MB:

ccmake -DBUILD_SHARED_LIBS=“ON” -DCMAKE_BUILD_TYPE=“RelWithDebInfo” -DCMAKE_CXX_FLAGS_RELWITHDEBINFO=‘-O2 -g -DNDEBUG -ftree-vectorize -march=corei7-avx -mavx’ -DCMAKE_C_FLAGS_RELWITHDEBINFO=‘-O2 -g -DNDEBUG -ftree-vectorize -march=corei7-avx -mavx’ -DCMAKE_INSTALL_PREFIX=“/cluster/apps/psi4/1.1a1_p1/x86_64” -DCMAKE_VERBOSE_MAKEFILE=“ON” -DMAX_AM_ERI=“7” -DCMAKE_INSTALL_OLDINCLUDEDIR=“” -DPYTHON_LIBRARY=“/cluster/apps/python/2.7.12/x86_64/lib64/libpython2.7.so” -DPYTHON_LIBRARY_DEBUG=“/cluster/apps/python/2.7.12/x86_64/lib64/libpython2.7.so” …

I am sure that there is a stupid error on my side, but I could not yet identify it. I will continue building psi4 tomorrow.

Best regards

Sam

Seems that I can not post more than 3 replies to this topic. Therefore I am adding some text here:

Hi,

switching to -DCMAKE_BUILD_TYPE=Release solved the problem. Now the libraries are below 100 MB.

Thank you and best regards

Sam

That -DCMAKE_BUILD_TYPE="RelWithDebInfo" looks very likely. I’ve never tried it myself, but CMake sets up flags to include full debugging symbols in libraries built with that build type. You probably want -DCMAKE_BUILD_TYPE=Release (the default if you don’t include that option at all).

You can also save yourself some build time by compiling libint (https://github.com/psi4/libint) on its own, installing it, and then adding -DCMAKE_PREFIX_PATH=/path/to/libint/install to the psi4 configuration. Then you won’t be rebuilding libint every time you experiment with a psi4 build.

@loriab @jgonthier: Good news, I am currently re-running the calculation on the patched version and it now already finished Exch12_k11u_5 and is still running. So the patched version seems to fix the problem. Thank you for your help.

@polyx15: Thank you for letting us know! We would appreciate if you could
let us know if the computation finishes without problems. These integer
overflows are difficult to locate.