qcscine / qcmaquis

Release-only repository for SCINE QCMaquis, the DMRG software from the Reiher group.
BSD 3-Clause "New" or "Revised" License
32 stars 15 forks source link

Building the OpenMOLCAS interface fails due to missing GlobalArrays headers/libraries detection #5

Closed behnle closed 2 years ago

behnle commented 2 years ago

I tried to build the latest QCMaquis as standalone program with the option BUILD_OPENMOLCAS_INTERFACE. This fails as the cmake script does not test for the availability of the GlobalArrays toolkit and also does not pass the installation directory to the respective include/linker path:

 /home-link/user/builddir_own_modules/qcmaquis_standalone/qcmaquis/dmrg/lib/interfaces/openmolcas>/qcmaquis_interface.f90:1071:25:

 1071 |     Call GA_Brdcst(MT_DBL, [res], storage_size(res)/8, 0)
      |                         1
 Error: Symbol ‘mt_dbl’ at (1) has no IMPLICIT type

QCMaquis was configured as

cmake . -Bobjdir -DBUILD_OPENMOLCAS_INTERFACE="ON" -DTESTS="ON" -DLAPACK_64_BIT="ON" -DBLAS_LAPACK_SELECTOR="openblas" -DGA="ON" -DOPENBLASROOT=/opt/bwhpc/common/group/numlib/openblas/0.3.17-int64-gnu-11.1 -DBOOSTROOT=/opt/bwhpc/common/group/lib/boost/1.78-gnu-11.1

which successfully finishes.

Toolchain:

Full cmake and make outputs are attached. Output was slightly anonymized.

Am i doing something wrong? Is this option only meant to be used in conjunction with an OpenMOLCAS build?

cmake.log make.log

stknecht commented 2 years ago

Dear (@behnle) Stefan, three remarks:

If you want to run QCMaquis calculations within OpenMolcas, I would recommend to compile a sequential OpenMolcas version. QCMaquis does not yet support MPI threads, that's something my colleague Alberto and I are currently finishing up.

behnle commented 2 years ago

Dear (@stknecht) Stefan,

  • more importantly: the OpenMolcas interface does NOT support GA outside of OpenMolcas,

OK, this fully explains the problem. I thought that it might be possible to compile QCMaquis separately and then pass the installation directory to OpenMolcas like a "plugin".

  • your -DBOOSTROOT is wrong if I am not mistaken. The variable to pass should be -DBOOST_ROOT. Could that be the problem with the Boost recognition of cmake?

According to https://cmake.org/cmake/help/latest/module/FindBoost.html both variants are possible. The issue with not recognizing boost turned out to be a combination of building boost with --build-type=complete and setting set (Boost_NO_BOOST_CMAKE ON).

  • what do you mean by "and also does not pass the installation directory to the respective include/linker"? Does that refer to the GA installation.

I expected cmake to add the GA lib to -L and include to -I. But if i am misusing the -DBUILD_OPENMOLCAS_INTERFACE flag, the fault is on my side. Maybe it could be documented a bit more prominent that this flag is NOT allowed in "standalone" builds. Thanks anyway.

stknecht commented 2 years ago

@behnle : thanks for your feedback. I did not know about the -DBOOSTROOT option. I will make a note to add a warning that the GA option is only meant to be used in connection with OpenMolcas. Just to be clear: you can use -DBUILD_OPENMOLCAS_INTERFACE=ON in a standalone build of QCMaquis (I am using it myself in a different project), but not -DGA=ON.