...
During runtime the C# wrapper could only reference one Fortran shared library. All Fortran sources were compiled to one shared library with the following compiler options:
Compilation: {panel:
Panel | ||||
---|---|---|---|---|
| ||||
ifort -c -fPIC -convert big_endian -fpp *.f90 |
Linking the compiled objects:
Panel | ||||
---|---|---|---|---|
| ||||
ifort -shared *.o -o <sharedLibrary.so> |
During runtime some fortran libraries must be accessible via LD_LIBRARY_PATH. In the following examples they are provided by the ifort compiler:
Panel | ||||
---|---|---|---|---|
| ||||
export LD_LIBRARY_PATH=/opt/intel/fce/9.1.051/lib:. // on 64bit systems |
2.2. Ifort parameter bug
The ifort compiler v. 9.1.051 has a bug with public character parameters in modules.
Example:
Panel | ||||
---|---|---|---|---|
| ||||
ifort -shared *.o -o <sharedLibrary.so> |
The parameter c_att_name can not be accessed from outside the module. The solution is a function that exports the parameter as a return value. Now the values can be accessed from outside.
Panel | ||||
---|---|---|---|---|
| ||||
PUBLIC FUNCTION get_c_att_name ( idx ) & |
4. OpenMI on Mono in five steps
4.1. Download from SourceForge
...