fminsearch and OpenMP

Forums I think I found a bug fminsearch and OpenMP

This topic contains 2 replies, has 3 voices, and was last updated by Paulo Lins November 2, 2021 at 3:06 am.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #1877

    Lucas Finamor

    I believe there is a small problem when using fminsearch in Parallel mode with OpenMP. In line 5535 (inside Brent’s subroutine), the variables “a”,”b”,”d”, and “e” are declared and attributed the value 0d0 in the same line. When trying to debug the code in parallel mode with OpenMP, Intel Checker finds Date racing conditions with these variables.
    I declared them as any other variable (that is, without the 0d0) and I attributed the value 0do in other line. This apparently solved my problem.


    Fabian Kindermann

    Dear Lucas,

    sorry, for not getting back to you earlier on this. This is extremely interesting and I will take a closer look at this. I had no problems with using fminsearch in parallel mode with the Intel Fortran Compiler, but I had issues with the gfortran compiler. I will keep you posted once I figured this out.

    Thanks for letting me know.



    Paulo Lins

    Hi Fabian,

    I was having some problems using fminsearch and OpenMP. Lucas’ solution above fixed my problem.

    The problem that I was having was the same as this one:

    Parallelization using OpenMP


    • This reply was modified 1 year ago by Paulo Lins.
Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.