The version of IMSL that accompanied CVF provided only static libraries. Current versions of IMSL provide both static and dynamic libraries.
You are probably running into the problems that you described because you are using (by choice or by default, depending on your setup) the DLL libraries. The associations between Fortran I/O unit numbers and files are not shared between your code and the IMSL DLLs.
The simplest solution is to choose to use the static libraries, by using %LINK_FNL_STATIC% or %LINK_F90_STATIC% in the compiler invocation. If that is not acceptable, you need to figure out a way of making the IMSL DLLs associate unit-12 with the desired file, CLUSTER.TXT.
Alternatively, use the -Qopenmp option with the Intel Fortran compiler
For the reasons that I gave above, the following example code from the FNL-6 HTML documentation for UMACH does not work as described in the writeup if the DLL version of the library is used, unless the -Qopenmp option is given to the compiler.
Code:
USE AMACH_INT
USE UMACH_INT
INTEGER N, NUNIT
REAL X
! Set Parameter
N = 0
NUNIT = 9
!
CALL UMACH (-3, NUNIT)
OPEN (UNIT=NUNIT,FILE='CHECKERR')
X = AMACH(N)
END
The result of running this code without the -Qopenmp option is two files: a zero-length file called CHECKERR and another file called FORT.9 that contains the output of the UMACH call.