Menu

Installation Mac OS

Users
2017-05-19
2018-03-06
  • Daniel Jaschke

    Daniel Jaschke - 2017-05-19

    Hallo,

    we had a report on a segmentation fault of the compiler g95 during the installation on Mac OS. See below for the whole message. It is related to the version 0.93 of g95, version 0.92 works well. So the possible solutions are:

    1) Switch back to 0.92 if still accessible in your macports. You can check all possible version with 'port installed g95' and activate on old one with 'sudo port activate g95 @0.92_other_extensions'. Unfortunately I could not test this, since the v0.92 was not there for me. The full description is here. Checking out the git-version control of macports did not work for me and is not straight-forward at all.
    2) Switch to the gfortran compiler. You have to install the gcc45 libraries, i.e. 'sudo port install gcc45'. Then you have to replace in the if case os == '--mac' the FC='g95' with FC='gfortran-mp-4.5' (file BuildOSMPS.py).

    Other issues:
    a) You have to open the file BuildOSMPS.py and change the '-larpackg95' to '-larpack' in the if-case os == '--mac'
    b) In the same section, the '-framework veclib' seems to work only for old Mac OS X and has been renamed or replaced with the accelerate package. So change it to '-framework accelerate' if veclib causes trouble.

    I tested the g95 compiler on ubuntu/debian under version 0.94 and that works without segmentation fault.

    Kind regards,

    Daniel

    Error message in g95 v0.93 on Mac OS:
    g95 -O3 -c /Users/mpsuser/MPS_Code/MPSFortLib/Mods/TimeEvolutionOps.f90 -I/Users/mpsuser/MPS_Code/MPSFortLib/Mods/
    /Users/mpsuser/MPS_Code/MPSFortLib/Mods/TimeEvolutionOps.f90:0: internal compiler error: Segmentation fault: 11
    Please submit a full bug report,
    with preprocessed source if appropriate.
    See http://www.g95.org or mail andyv@firstinter.net for instructions.
    make[1]: [/Users/mpsuser/MPS_Code/MPSFortLib/Mods/TimeEvolutionOps.o] Error 1
    make: [moddir_obj] Error 2
    ./
    cp "MPSFortLib/Execute_MPSMain ./Execute_MPSMain"
    cp: MPSFortLib/Execute_MPSMain: No such file or directory

     

    Last edit: Daniel Jaschke 2017-05-19
  • Fangli Liu

    Fangli Liu - 2018-03-06

    Hi Daniel,

    I was trying to OSMPS on mac computer. It runs into the same problem as you described.
    So I tried the second solution--switch to gfortran compiler. Still, it gets a new problem as decribed below:
    Error: gcc45 is not supported on macOS High Sierra and newer
    I was wondering if other gcc also work for OSMPS?

    Thanks
    Fangli

     
  • Daniel Jaschke

    Daniel Jaschke - 2018-03-06

    Hello Fangli,

    Yes, the description above was for pre High Sierra. The main change for High Sierra is to switch to a newer version of gfortran. I just tested it with the following settings:

    1) Install version 7 of gfortran: sudo port install gcc7
    2) Install libarpack (if not already done before): sudo port install arpack
    3) You have to change the settings in BuildOSMPS.py, for version 2.1 after the elif-case (os == 'mac')

        Writemakefile(FC='/opt/local/bin/gfortran-mp-7',
                      LAPACK_FLAG='-framework accelerate', BLAS_FLAG='',
                      ARPACK_FLAG='-L/opt/local/lib/ -larpack')
    

    macports did not add gfortran-mp-7 or arpack to the global paths, so I just linked it directly. Most likely you can switch to the fortran compiler version you have already installed.

    Let me know if you have any issues and I'll see if I can reproduce and solve them on my machine.

    Kind regards,

    Daniel

    P.S. It looks like you had macports already installed, so I skipped this step. Although python, numpy, scipy, and matplotlib should come with High Sierra. If they are not installed, they have to be installed in addition.

     
  • Fangli Liu

    Fangli Liu - 2018-03-06

    Hi Daniel,

    Thanks for your prompt reply. I did as you suggested--it works well right now!
    Thanks a lot for your kind help!

    Regards
    Fangli

     

Log in to post a comment.

Monday.com Logo