I want to know if it is possible to select different parts of my Fortran 95 routine to compile.
For example, if I pass certain flag to gfortran, then the compiler chooses which section to use for a certain function. I know I can do it using if
inside the routine, but the drawback is that I don't want the program to run the if
all the time due to speed concerns. I suppose solution should be similar to this one
I am working specifically with a program that calculates energies in a many-body system (say, a million). Then I don't want to put an if
each time that I need to use a different energy definition at compilation time.
I hope this is possible and that my question is clear.