OpenKIM on Mac OS X: gfortran worries.

Hi everybody!

I am trying to install the OpenKIM API released today onto my Macbook running OS X Lion (10.7.3). Do I really need gfortran even if I only plan to use the API from C++?

The problem is that gfortran is not available per default. I have MacPorts installed, and can get gfortran as part of the gcc47 package, but it is marked as "prerelease BETA" and the gfortran variant as "completely untested". Not very reassuring :slight_smile:

So before I go down that path: Has anybody else used Mac OS? What did you do?

Best regards

Jakob

Hi Jakob,

Thanks for your interest.

So before I go down that path: Has anybody else used Mac OS? What did you do?

First, we have used the openkim-api package extensively on Mac OS X. We have tested it with gnu 4.2--4.6 and (with gfortran) and it works beautifully. (We are aware of a possible issue with gnu 4.6 and we are currently working to fully diagnose the issue.)

We have been using the fink package manager which allows for installing multiple version of the gnu compiler suite. I have also recently heard very good things about the homebrew package manager (available on GitHub).

Second, we strongly encourage the use of C++, C, and Fortan (all three). More than half the examples that are distributed with the api are written in F90. We expect many KIM Models to be written in F90 (and even F77) so it will be beneficial to take the time to get this working now.

With that said, there is an undocumented environment variable $KIM_NO_FORTRAN that can be used (not recommended). If set, the api does not compile the Fortran bindings. However, the make system will try to compile **all** Tests, Model Drivers, and Models in the TESTs, MODEL_DRIVERs, and MODELs directories, respectively. So, you will have to delete the examples that are written in Fortran before you can get the package to compile without error.

If you wish to go this route, the only examples that will work are:

MODEL_DRIVERs:
   ex_model_driver_P_Morse

MODELs:
   ex_model_Ar_P_MLJ_C
   ex_model_Ar_P_MLJ_CLUSTER_C
   ex_model_Ar_P_Morse
   ex_model_Ne_P_MLJ_NEIGH_RVEC_F
   ex_model_Ne_P_Morse
   ex_model_Ne_P_fastLJ
   model_Ar_P_Morse

TESTs/:
   ex_test_Ar_free_cluster_CLUSTER_C
   ex_test_Ar_multiple_models

Cheers,

Ryan

Hi Jakob,

Thanks for your interest.

So before I go down that path: Has anybody else used Mac OS? What did
you do?

Hi Ryan,

Thank you for your answers! It sounds like it will be asking for trouble trying to do without fortran. I guess it is time to move from Macports to Homebrew. :slight_smile:

Best regards

Jakob