Re: [AMBER] Install broke and compilation fails

From: Gustaf Olsson <gustaf.olsson.lnu.se>
Date: Tue, 7 Jul 2020 21:12:51 +0000

So it seems that some part of the code is not compatible with gcc versions above 7 (at least not on macOS).


So I found a workaround which is not neat and will likely cause other things to fail though for anyone else that might be interested:


brew install gcc.7
brew list --versions gcc
brew unlink gcc
brew unlink gcc.7 && brew link gcc.7
ln -s /usr/local/bin/gfortran-7 /usr/local/bin/gfortran

This takes care of the serial installation, next up is figuring out how to configure for MPI and getting brew openmpi to work as it seems that mpic.. (c, c++, and so forth) are all somehow apple clang.


Fore someone with more insight into the configuration of with CMAKE, is there a way to specify directly "usr/local/bin/gfortran-7" as "gfortran" which is persistent? This solution will most likely break if i remove the symlink and as gfortran (gcc10) will be "activated" during next update, overwriting the symlink, I will see software failures again.


Best regards

// Gustaf

________________________________
Från: Gustaf Olsson <gustaf.olsson.lnu.se>
Skickat: den 7 juli 2020 15:58:10
Till: AMBER Mailing List
Ämne: [AMBER] Install broke and compilation fails

I tried to launch cpptraj today receiving this error

cpptraj
dyld: Library not loaded: /usr/local/opt/gcc/lib/gcc/9/libgfortran.5.dylib
  Referenced from: /Users/guolaa/SOFTWARE/amber18/bin/cpptraj
  Reason: image not found
Abort trap: 6

The reason seems pretty straight forward, the brew version of gcc has been updated to gcc10, hence gcc9 is not present or available.

Now, as I don’t have a licence for Amber20 I have been using AmberTools19 and Amber18. The problem now being that I cannot compile amber anymore.

    $ export AMBERHOME=“/path/to/amber18"
    $ ./configure -macAcelerate clang

Works just fine, installing updates and dependencies. Then the build fails… I cannot say for sure though this breaks during something with “arpack” which seems somewhat similar to be the problem I had with the gnu gcc version >7 when building on centOS as well.

[ARPACK] FC dnaitr.f
dnaitr.f:658:35:

  376 | call dvout (logfil, 1, rnorm, ndigit,
      | 2
......
  658 | call dvout (logfil, 2, xtemp, ndigit,
      | 1
Error: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)
dnaitr.f:729:39:

  376 | call dvout (logfil, 1, rnorm, ndigit,
      | 2
......
  729 | call dvout (logfil, 2, xtemp, ndigit,
      | 1
Error: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)
make[2]: *** [dnaitr.o] Error 1
make[1]: *** [utils] Error 2
make: *** [install] Error 2


As the ability to use straight gnu gcc compilers from home-brew on mac has been proven to be “challenging”, I cannot build using just the gnu gcc compilers. Even if I can make the gcc7 compilers my system defaults, the build process of amber still calls “Xcode” which then causes the build to come to a complete stop. It also seems that the gcc10 fortran is not compatible with either amber18/ambertools19 or the macOS gcc (clang) compiler.

Any suggestions on how to solve this would be appreciated. I am currently trying to recompile the AT20 package though I am now unable to build using openmpi because of some problem.

Best regards
// Gustaf
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Tue Jul 07 2020 - 14:30:02 PDT
Custom Search