<![CDATA[Multiwfn forum / Build MultiWFN with CMake; work with dependencies]]> - //www.umsyar.com/wfnbbs/viewtopic.php?id=647 Mon, 16 May 2022 09:55:18 +0000 FluxBB <![CDATA[Re: Build MultiWFN with CMake; work with dependencies]]> //www.umsyar.com/wfnbbs/viewtopic.php?pid=2496#p2496 Dear Igor,

I uploaded the file again, it should be correct now.

I don't have a clear plan to introduce cmake into the official compilation of Multiwfn. Because unlike programs with complicate structure, such as GROMACS, source code of Multiwfn doesn't have a complex structure and number of files is not large, therefore I prefer to manually prepare Makefile, which is easier for me, and users do not need to install cmake first.

Best regards,

Tian

]]>
Mon, 16 May 2022 09:55:18 +0000 //www.umsyar.com/wfnbbs/viewtopic.php?pid=2496#p2496
<![CDATA[Re: Build MultiWFN with CMake; work with dependencies]]> //www.umsyar.com/wfnbbs/viewtopic.php?pid=2495#p2495 Dear Tian Lu,

Looks like `module function` is continuing to be... So, the parallel compilation of Multiwfn using CMake is broken...

Anyway, there is a patch that makes Multiwfn's compiling possible using CMake >=3.16 under Linux.
0001-Add-compilation-via-CMake.patch.txt

Tested compilers:
- gfortran 9.3.0
- ifort 2021
- ifx 2022

Tested version of CMake:
- 3.16
- 3.22

I used Ubuntu for testing.

I will introduce the support of Windows and MacOS later. Later, I will also update compilation methods, since currently, there is only a very short description about build customizing.

Best regards,
Igor

]]>
Mon, 16 May 2022 09:00:03 +0000 //www.umsyar.com/wfnbbs/viewtopic.php?pid=2495#p2495
<![CDATA[Re: Build MultiWFN with CMake; work with dependencies]]> //www.umsyar.com/wfnbbs/viewtopic.php?pid=2492#p2492 Dear Igor,

I have correspondingly modified codes and updated source code package to official site.

Best regards,

Tian

]]>
Mon, 16 May 2022 04:45:12 +0000 //www.umsyar.com/wfnbbs/viewtopic.php?pid=2492#p2492
<![CDATA[Re: Build MultiWFN with CMake; work with dependencies]]> //www.umsyar.com/wfnbbs/viewtopic.php?pid=2490#p2490 Dear Tian Lu,

I found a very annoying bug in CMake's module dependency resolver that requires renaming module `function` to module `functions`. Mostly, it can be done via the following sed-script:

sed "s/^use function\b/use functions/" *.f90 -i

Could you please apply it to the Multiwfn source code?

Best regards,
Igor

]]>
Mon, 16 May 2022 02:30:53 +0000 //www.umsyar.com/wfnbbs/viewtopic.php?pid=2490#p2490
<![CDATA[Re: Build MultiWFN with CMake; work with dependencies]]> //www.umsyar.com/wfnbbs/viewtopic.php?pid=2367#p2367 Dear Igor,

Thank you for sharing your opinion. Currently I don't have plan to introduce CMake into the compilation process of Multiwfn.

Compiling libreta is indeed time-consuming, but it only needs to be compiled once.

best regards,

Tian

]]>
Thu, 17 Mar 2022 20:34:31 +0000 //www.umsyar.com/wfnbbs/viewtopic.php?pid=2367#p2367
<![CDATA[Build MultiWFN with CMake; work with dependencies]]> //www.umsyar.com/wfnbbs/viewtopic.php?pid=2365#p2365 Dear Tian Lu,

I've created a new Density Functional Approximation's feature implied on generalized hypergeometric function.
My implementation in MultiWFN is based on Arb C library (https://arblib.org/). I hacked Makefile for linking MultiWFN with it. Unfortunately, currently, it leads to dynamic dependency from this library. Somehow, it is possible to link it statically.
Anyway, in the future, if somebody wants to compile MultiWFN by himself, it will require to have compiled Arb C library, which is not provided by MultiWFN. So, somebody will want to drop support of this library for his experiments. In that case, it will require to have one more script which removes Arb C library dependency (as it is done with ./noGUI.sh).

Also, compiling of libreta is too long. I disabled it in some of my experiments by removing its code.

Can we go out from Makefile to CMake (https://cmake.org) for simplifying building MultiWFN without applying any noSMTH.sh?
CMake allows people to choose which parts can be compiled much simpler than the running of noSMTH.sh with:

cmake -DENABLE_FEATURE=OFF

What do you think about it?

Best regards,
Igor

]]>
Thu, 17 Mar 2022 17:05:29 +0000 //www.umsyar.com/wfnbbs/viewtopic.php?pid=2365#p2365