Open jmbuhr opened 3 years ago
I got it to compile (well it is still compiling, so we will see) with
# add suport for QMMM engines the starting from <https://gitlab.com/gromacs/gromacs/-/tree/2021.2-qmmm>
cp2k = get_software_root('CP2K')
if cp2k:
self.cfg.update('configopts', '-DGMX_CP2K=ON')
self.cfg.update('configopts', '-DCP2K_DIR=%s/lib' % cp2k)
libs_config = '-DCP2K_LIBS=Wl,--enable-new-dtags'
libs_config += ' -lscalapack -lxsmmf -lxsmm -ldl -lpthread -lxcf03 -lxc -lint2 -lfftw3_mpi -lfftw3 -lfftw3_omp -lmpi -lopenblas -lstdc++ -pthread'
libs_config += ' -L/usr/lib64'
cp2k_libs = ['OpenMPI', 'OpenBLAS', 'FFTW', 'Libint', 'libxc', 'libxsmm', 'ScaLAPACK']
lib_paths = {key: get_software_root(key) for key in cp2k_libs}
for lib in cp2k_libs:
libs_config += ' -L%s/lib' % lib_paths[lib]
self.cfg.update('configopts', libs_config)
but I still hardcoded the cp2k dependencies, so I would very happy about a more easybuild-ideomatic approach :)
The best approach is likely to make sure that cp2klib is dynamic, then you won't need more than a -lcp2k there...
I am attempting to configure the easyblock for gromacs (https://github.com/easybuilders/easybuild-easyblocks/blob/11870c2e93df143587b842cb93524f848418086c/easybuild/easyblocks/g/gromacs.py) with support for the QM/MM integration that is currently in the works on this branch: https://gitlab.com/gromacs/gromacs/-/tree/2021.2-qmmm
The installation instructions mention that it needs to be configured to know about the libraries used by the QM/MM engine (cp2k): https://gitlab.com/gromacs/gromacs/-/blob/2021.2-qmmm/INSTALL-dev#L44
I have successfully added the cp2k library directory if cp2k is a dependency in the configure step, but how do I correctly use the libraries as specified by the cp2k module that is the dependency? After all, I should probably not hardcode these.