I have a subroutine that receives a vector and rearranges its elements according to "mapping" vector. So for example the 1st element becomes 3rd, etc. This is done on integer, double, and double complex vectors. One way to do it is with the generic interface, e.g.:
Dear Steve and Fortran Masters,
I have a Fortran DLL called from C++ that is used in a chemical process simulator. The subroutines / functions in the DLL are normally called millions of times during the solution of a single process flow sheet.
We have a lot of Fortran code, which compiled and run fine under Intel Fortran 12.1 (Windows). However, under version 16.0, we find some runtime errors around arrays having been already allocated.
Intel's help and the Fortran standard say that these deallocate statements should not be necessary:
If a RETURN or END statement terminates a procedure, an allocatable array has one of the following allocation statuses:
- It keeps its previous allocation and association status if the following is true:
When I compile (build) my fortran code, which compiled and ran some time ago on an IBM mainframe, I get the error:
#5507 there are multiple unnamed main program declarations in this file
and I don't know where to start to repair. Help?