Trying to add calls to a VSL quasi-random number generator to a largish existing code.
Prior to trying within the existing code, I wrote a small test program which generated sample sets of QRN's to assess the effects of various parameters, etc. After a bit of a struggle with the MKL Reference Manual, I got the test program working. To avoid path issues, I copied Modules MKL_VSL_TYPE & MKL_VSL and inserted them directly within my test program code (in a separte .f90 file). That worked fine. Straightforward once I got on top of the Manual.
However, on attempting to add very similar code into my existing program, I am getting Link errors I have never seem before. The QRN related code added to my existing program is basically the same as I used in the test program, except as indicated below. In both programs, I added the "Additional Library Directories" &
"Additional Dependencies" as per the instructions in Section 4 of the
User Guide for configuring the Development Environment (same details
added in both cases). Same versions of MKL(10.0.3.021) and IVF(10.1.019) in both cases. Of course the test program basically only had code related to QRN - the existing program is a largish, 'diverse' program. It does have some OpenMP code in it, but I have set "Process OpenMP Directives" to "Disable" (having for the moment given up trying to get OpenMP to work correctly!).
Test program example:
!Every access
status = vslnewstream( stream, brng, dimen ) !Create new stream
status = vsrnggaussian( method, stream, num, gauss, 1.0, 0.5 ) !1.0 & 0.5 convenient for displaying output
status = vsldeletestream( stream ) !Delete the stream
Existing program:
!INITIALISE (at start of run)
status = vslnewstream( stream, brng, dimen ) !Create new stream
!Numerous subsequent accesses in a different subroutine
status = vsrnggaussian( method, stream, num, gauss(:,:,1:m), 0.0, std_dev ) !std_dev computed in preceding code
Possibly significant differences?
1. Do not delete the stream because program terminates shortly after last access. Did delete the stream(s) in the test program because were testing several QRN options sequentually in each test run. Used a new stream for each different QRN option. Existing program only uses one set of QRN parameters for a given analysis.
2. Allocated array Guass(:,:,:): In test program were using the whole array each time. In existing program only fill (a varying size) part of the array each time ("m" can vary from 1 to max size allocated)
The code compiles and links without any problem in the sm
all test program. But I get the following Link errors when I attempt to compile the existing program with the MKL code added (compiled previously without problem):
Error 1 error error_during_IPO_compilation: problem during multi-file optimization compilation (code 3) Link
Error 2 error error_during_IPO_compilation: problem during multi-file optimization compilation (code 3) Link
The error messages are the same for both Debug & Release mode compiles. They mean nothing to me. Any assistance would be appreciated.
FWIW:
Compiler command line is:
/nologo /Zi /Od /module:"Debug/" /object:"Debug/" /traceback /check:bounds /libs:static /threads /dbglibs /c
Linker command line is:
/OUT:"Debug/Faults.exe" /INCREMENTAL:NO /NOLOGO /LIBPATH:"C:Program FilesIntelMKL10.0.3.021ia32lib" /MANIFEST /MANIFESTFILE:"I:xxxxxxProgramFaultsdebugfaults.exe.intermediate.manifest" /DEBUG /PDB:"Debug/Faults.pdb" /SUBSYSTEM:CONSOLE /IMPLIB:"I:xxxxxxProgramFaultsdebugfaults.lib" mkl_c.lib libguide.lib



