Fortran compilers compatibility

Fortran compilers compatibility

I have to replicate a preexisting code compiled with Intel 64, Version 11.0.061. The codes also use IMSL Fortran Numerical
Library, Version 6.0.

I have downloaded Parallel studio 2017 and Visual studio 2017 . However, I cannot build the project as I receive several errors during the building step. Do you think this is caused by the different compilers? If I buy the license for IMSL library can you see any compatibility issues between what I have and the codes I have to replicate?

If you do not have IMSL installed, you are going to see error messages when you attempt to build an application that requires the missing IMSL support.

If, on the other hand, you do have the older version of IMSL, and you configured your build process (in Visual Studio, or at the command line), there is a very slight likelihood of running into problems related to mixing a current compiler and a seven year old version of IMSL, and in this case, as Lorri said, you should report the actual error messages.

In my experience, IMSL has been very stable. If your code does not use IMSL features that were absent in IMSL-6, you should be able to use IMSL-6 or IMSL-7.

1>Build log written to "file://C:\Users\Mirela%20Miescu\Downloads\int_rec\international_recessions_data_codes\codes\Figures%201-5%20and%20Tables%203-12\1.%20LaborElasticity%20-%20Data%20Figure%201%20&%20Tables%203\Debug\BuildLog.htm"

Attachments:

The file that you provided includes numerous include directives, and cannot be compiled unless the included files are available. You will have to provide all the include files needed, or construct and provide a simplified source code that causes an ICE similar to the one that you saw.

I noticed one instance where an attempt is made to surround an include directive with an IF (SimType ==1) THEN ... ENDIF. This is possibly wrong, even if SimType is a named constant in one of the missing include files. Here is an example that should illustrate this point.

The indentation and the usual meaning of an IF block seems to suggest that the file xyz.inc does not get included since the condition is not satisfied.

If you compile and run the program, what would you expect it to print, and what does it actually print? Can you explain the result?

Hint: File xyz.inc is included regardless of the value of SimType; in fact, the inclusion occurs regardless of whether SimType has been declared or has a value assigned, and could happen before the statements in the code have been parsed by the compiler.

The include 'xyz.inc' happens at compile time, not at run time (as can be done with interpreter languages, and/or JIT compilers). What this means is after a build, you copy the executable to some user's folder, then then cannot supply there own xyz.inc file and affect changes in the runtime. If this is what you require your program to do, then you need to a) read/parse an xyz.ini data file, or b) use environment variables, or c) use command line arguments (or a bunch of other techniques to pass in initialization values).

Program RiskAve can be built and run with no problems when the 17.0 or 18.0 compilers are used with IMSL 7.0.1.

The choices for you are:

Obtain and install the old 11.1.072 Intel Fortran compiler, which is compatible with your IMSL-6,

Obtain the current version 7.0.1 of IMSL from Intel, or version 7.1 from Roguewave.

Modify your code such that no IMSL modules are needed and such that the implicit interfaces to IMSL routines are correct.

Since your source codes USE the IMSL linear operators module, Choice 3 would require a lot of work. Choice 2 may not be available if you do not wish to pay for a newer version of IMSL. Choice 1 may be the easiest for you, if Intel lets you download the older Fortran compiler.and use it.

Mirela, here is a minor point: the library (*.LIB), by itself, is compatible; it is the modules (.MOD) files that are incompatible. However, if by "library" one means "the IMSL library package taken as a whole, consisting of .F90, .MOD and .LIB files", yes, there is an incompatibility.

There were certainly some issues with old IMSL modules that could leas to internal compiler errors. Intel Fortran tries to allow use of old modules, but sometimes older bugs that were fixed require the modules to be recompiled.