MoL fails to build with Intel compiler

Create issue
Issue #2007 closed
Ian Hinder created an issue

Compiling MoL gives this error:

/home/ianhin/Cactus/EinsteinToolkitGit/arrangements/CactusNumerical/MoL/src/RK4-RK2.c(60): error: unrecognized OpenMP #pragma
  #pragma omp /*parallel for*/
          ^

compilation aborted for /home/ianhin/Cactus/EinsteinToolkitGit/configs/sim/build/MoL/RK4-RK2.c (code 2)

This code was introduced in https://bitbucket.org/cactuscode/cactusnumerical/commits/09a209266daa281a3ea844f266e7fb0d94ab6090.

Removing the commented portion doesn't help. Replacing it with

#pragma omp parallel

allows the code to compile.

This is on Minerva, with icc (ICC) 16.0.1 20151021.

Keyword:

Comments (11)

  1. Erik Schnetter
    • removed comment

    I commented out the parallel for constructs because this improves performance. If the above doesn't work, the commenting out the whole line (or outright deleting it) will work.

    I have just finished experimenting more with better parallelization in MoL, and I now know what to do. I plan to suggest a patch that applies this to all of MoL soon. If I make next Monday's call, we should discuss then.

  2. Frank Löffler
    • removed comment

    A question to the patch that introduces this: lot's of the "omp parallel for" lines seem to have been changed to "omp parallel simd", except that one line where the "simd" is missing. Was that on purpose?

    As a remark: "omp parallel simd" is an addition made in openmp 4. Which version of openmp should the Einstein Toolkit require? And connected to that: does anybody know how well this version is supported across machines?

  3. Erik Schnetter
    • removed comment

    Here is what I found to be most efficient: - all the loops that touch only a single grid function should have a simd - the OpenMP parallelization should be over the grid functions instead. I might have made a mistake in my earlier push. (In my defence, the performance improvement I saw was real.) A new patch should probably be properly reviewed, to avoid the problems I caused last time.

    I don't know which OpenMP version is supported in general. These days I tend to use recent versions of GCC instead of relying on older versions of Intel. We might want to autoconf simd.

  4. Ian Hinder reporter
    • removed comment

    In the mean time, would it be possible to make the minimal necessary change to make it build on intel? e.g. commenting out the entire line, or adding back in the "parallel" (though I haven't tested that on GCC, and don't know the openmp details).

  5. Ian Hinder reporter
    • removed comment

    I have removed the offending line completely in fc346d. Erik, please can you check that the effect is what you intended? If so, please close this ticket.

    The ET builds again with the Intel compiler. I have not looked at performance.

  6. Log in to comment