• Multiwfn forum

    Multiwfn official website: http://www.shanxitv.org/multiwfn. Multiwfn forum in Chinese: http://bbs.keinsci.com/wfn. E-mail of admin: sobereva[at]sina.com

    You are not logged in.

    #1 2022-06-15 00:59:51

    kjelljorner
    Member
    Registered: 2022-06-15
    Posts: 11

    Mac build recipe

    I created a minimal build recipe for Multiwfn on Mac using CMake and posted it on GitHub: https://github.com/kjelljorner/multiwfn-mac-build. Feedback or improvements appreciated. It seems to work reasonably well for me.

    Additionally, I found that there is a line of non-compliant code on line 2090 of the file util.f90:

    if ((.not.present(irewind)).or.(present(irewind).and.irewind==1)) rewind(fileid)

    This apparently works with ifort, but does not work with GFortran. The reason is given here, http://www.cs.rpi.edu/~szymansk/OOF90/bugs.html, and in short the compiler is free to evaluate the expressions in any order. GFortran then seems to evaluate irewind==1 and as it is not given, the program crashes. I refactored into:

    if (.not. present(irewind)) then
      rewind(fileid)
    else
      if (irewind==1) rewind(fileid)
    end if

    Edit: There's also a couple of other cases. I created a patch file here: https://github.com/kjelljorner/multiwfn … util.patch

    Last edited by kjelljorner (2022-06-15 02:27:15)

    Offline

    #2 2022-06-15 03:24:21

    sobereva
    Tian Lu (Multiwfn developer)
    From: Beijing
    Registered: 2017-09-11
    Posts: 1,468
    Website

    Re: Mac build recipe

    Thank you, your patch will be applied to next update of Multiwfn source code package.

    Please note that in your patch "if (usern1/=-1) n2=usern2" should be "if (usern2/=-1) n2=usern2"

    Offline

    #3 2022-06-15 17:44:26

    kjelljorner
    Member
    Registered: 2022-06-15
    Posts: 11

    Re: Mac build recipe

    sobereva wrote:

    Thank you, your patch will be applied to next update of Multiwfn source code package.

    Please note that in your patch "if (usern1/=-1) n2=usern2" should be "if (usern2/=-1) n2=usern2"

    Are you sure about that? The current source code that I downloaded yesterday has the two lines (1913 and 1914). Is this a bug that will also be corrected in your source?

    if (present(usern1).and.usern1/=-1) n1=usern1
    if (present(usern2).and.usern1/=-1) n2=usern2

    Offline

    #4 2022-06-16 02:08:01

    sobereva
    Tian Lu (Multiwfn developer)
    From: Beijing
    Registered: 2017-09-11
    Posts: 1,468
    Website

    Re: Mac build recipe

    The new source code package has not been uploaded currently. The last update date is 2022-Jun-14.

    Offline

    #5 2022-06-18 17:19:44

    kjelljorner
    Member
    Registered: 2022-06-15
    Posts: 11

    Re: Mac build recipe

    Thanks for patching the source so quickly. I now removed the patch from GitHub as it is no longer needed. I set up an automated GitHub Actions that downloads your source code once per day and publishes it to a special branch of my repo: https://github.com/kjelljorner/multiwfn … ource_dist. The license file and settings.ini are taken from the binary distribution and is also included. This way, the user can always be assured that they have the latest code (+- one day) if they run "git pull". I also make a Homebrew "tap" so that the user can install Multiwfn with the homebrew package manager with minimal knowledge of how to compile a program: https://github.com/kjelljorner/homebrew-multiwfn. Here, the user can also update their version with "brew upgrade multiwfn". I hope this setup is OK for you

    Offline

    #6 2022-06-19 01:01:13

    sobereva
    Tian Lu (Multiwfn developer)
    From: Beijing
    Registered: 2017-09-11
    Posts: 1,468
    Website

    Re: Mac build recipe

    Thank you for your warm contribution of helping Mac users to use Multiwfn.

    Offline

    #7 2022-06-19 02:51:37

    kjelljorner
    Member
    Registered: 2022-06-15
    Posts: 11

    Re: Mac build recipe

    Many thanks to you - I was very happy to find Multiwfn when I started my PhD. I almost could not believe that so many things were implemented.

    There also can be some interest to package Multiwfn with other package managers. I know conda-forge best, where it could be built for all operating systems. On Twitter I got a suggestion for that: https://twitter.com/ghutchis/status/1538140686029135872.

    Currently I think the versioning would be the main problem to get it into the standard repository of any package. Multiwfn has an unclear version number, as 3.8dev changes often, while package manager maintainers want it to be more clear. I would suggest to have some type of date-based numbering: https://calver.org. There are some software that use this, for example RDKit: https://github.com/rdkit/rdkit/tags. Also, the licensing situation would need to be clarified a bit, as there is some LGPL code in Multiwfn.

    Offline

    #8 2022-06-20 10:55:14

    sobereva
    Tian Lu (Multiwfn developer)
    From: Beijing
    Registered: 2017-09-11
    Posts: 1,468
    Website

    Re: Mac build recipe

    Currently I don't have a plan to include Multiwfn into any software repository.

    Multiwfn updates frequently, the last update date can be seen when Multiwfn boots up, and it is also explicitly shown in "download" page of Multiwfn website.

    There are some tools written by Chinese Multiwfn users that can update Multiwfn automatically:
    http://bbs.keinsci.com/thread-20052-1-1.html
    http://bbs.keinsci.com/thread-20070-1-1.html
    http://bbs.keinsci.com/thread-20109-1-1.html
    http://bbs.keinsci.com/thread-20115-1-1.html

    Offline

    #9 2022-06-28 01:00:23

    kjelljorner
    Member
    Registered: 2022-06-15
    Posts: 11

    Re: Mac build recipe

    I updated the build recipe to include the GUI: https://github.com/kjelljorner/multiwfn-mac-build

    Offline

    Board footer

    Powered by FluxBB

    久久精品国产99久久香蕉