Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.


#50 does auto-parallelization work?

Anthony Falzone


i wanted to try out the new graphite auto-parallelization options using gfortran. the code compiled but is still not multi-threaded. i don't know of a way to get feedback out of it. but basically nothing seems to be happening. runs the same as without the optimizations. as far as i know there is no reason it shouldn't be able to parallelize my code. the code is prop_design and available on sourceforge if you need to view it for some reason. i'm trying to parallelize the mp version. my computer is capable of four threads so the options i used were -floop-parallelize-all -ftree-parallelize-loops=4. i used cygwin to install mingw-64.

any help would be appreciated.


  • Kai Tietz
    Kai Tietz

    To use openmp you need to have pthread support enabled for toolchain and of course you need to specify -fopenmp.
    You can use for Windows the pthread-win32 (look for additional patches for x64 Windows on our SF site), or you can use the upcomin winpthread library (to be found in our experimental tree in svn).


  • hi,

    the only pthread stuff i can find in cygwin i have installed. i am using windows 7 home premium 65-bit and have a core i3 350m processor (arrandale). i don't know how to compile mingw-w64 myself. i'm a novice with this stuff. so if its not already up and running i wouldn't be able to do it. i see on gcc site it says -floop-parallelize-all -ftree-parallelize-loops=n is implemented in gcc 4.5. Mingw says sorry unimplemented. When I tried cygwin and mingw-w64 it compiles and runs (which is more than mingw) but there is absolutely no performance difference. the code still uses 1 thread rather than 4. the code i'm trying to auto parallelize simply re-runs multiple times in a loop. so i would think the graphite auto parallelization should easily be able to deal with it. but i don't know much about it. i only have a basic understanding of fortran. props though about one thing i noticed. the code runs significantly faster using mingw-w64 than mingw. not sure why, but i was pleasently surprised. also for me the i686 version of mingw-w64 ran faster than the x86_64 version. again not sure why, but thought you may want to know.

  • Jonathan Yong
    Jonathan Yong


    The Cygwin packaged release found in the Cygwin setup has OpenMP support. Try using -fopenmp in addition to your usual gfortran parameters.

    • status: open --> closed
  • I got the answer to this on the gcc graphite google group. I found that it is installed and working, however, it is not able to work with my code yet.