Building LCModel

Hi all,

Sorry to resurrect an old thread but I had a question about compiling LCModel on M1. I’ve been able to successfully run LCModel on my M1 Macbook-pro, Monterey 12.1, using two methods:

  1. GFortan 12.1 for Monterey - ARM, using locally-compiled LCModel version
  2. GFotran 10.2 for Catalina - INTEL, using Catalina-compiled LCModel binary in the Osprey repo

For the compilation I followed @admin’s suggestion:
gfortran -c -fno-backslash -fno-f2c -O3 -fall-intrinsics -std=legacy -Wuninitialized -ffpe-summary=none LCModel.f
gfortran LCModel.o -o lcmodel

I ran some of our 7T SV-MRS data through both compilations of LCModel (via the Osprey wrapper with a common basis-set, control file, and input data–no pre-processing) and found some numerical differences in the results. About 80% of the amplitude estimates agreed perfectly, and a further 17% of the remaining deviations were less that 1%, so this was relatively minor for most fits. However, there are some larger differences for the more temperamental basis functions (NAAG, Ala, Glc, Gly, GPC, sI, Lac, particularly for Lipids & MMs).

Is anyone aware of a fortran/architecture issue that could cause numerical discrepancies? Or perhaps an issue with my attempt at installation? As I said, the differences are relatively minor, but I’d feel more comfortable if I had an explanation, and I’m definitely no expert in Fortran or chip architecture…

Thanks,
Chris

1 Like