Apparently the DLL process fails at start of OMP loop where the master process seems to fail when private arrays are defined, while other threads are started.
Apparently it has no effect to set the stack-size at linking of the DLL, and use of kmp_set_stacksize_s at runtime has apparently no effect for the master-thread, and if processing in a new thread (via CreateThread) is used in the DLL to allocate the necessary “main” stack, then the OpenMP system fails (e.g. OMP_GET_NUM_PROCS() creates program crash).
Are there any solution for the problem, when the exe-program is at third-party program which cannot be linked?
We need a method to control main stack size at runtime using OMP.
Intel Fortran Version 22.214.171.1241.
This may be related to the main program .NOT. being (Intel) Fortran .OR. of being a much older version of Intel Fortran than the one used to build your DLL. At the load point of your DLL make a call to for_rtl_init_ and at the exit for_rtl_finish_
** Note, the init requirement may be once per first call per process making the call into the DLL.