Giter Site home page Giter Site logo

OMP problem with Intel compiler about blis HOT 10 CLOSED

flame avatar flame commented on May 10, 2024
OMP problem with Intel compiler

from blis.

Comments (10)

jeffhammond avatar jeffhammond commented on May 10, 2024

Below is my attempt at an MCVE. It compiles cleanly with icc -std=c11 -O3 -qopenmp -qopt-report capture.c -o capture.x.

Can you evolve my code into a valid MCVE?

#include <stdio.h>
#include <stdlib.h>

struct thread_comm_s
{
    int n;
};
typedef struct thread_comm_s thread_comm_t;

thread_comm_t c;

int main(int argc, char* argv[])
{
    int a;
    thread_comm_t * p = &c;
    _Pragma("omp atomic capture")
    a = ++(p->n);

    return 0;
}

from blis.

jeffhammond avatar jeffhammond commented on May 10, 2024

Here's a better attempt:

#include <stdio.h>
#include <stdlib.h>

typedef size_t dim_t;

struct thread_comm_s
{
    dim_t n;
};
typedef struct thread_comm_s thread_comm_t;

thread_comm_t c;

int main(int argc, char* argv[])
{
    dim_t a;
    thread_comm_t * p = &c;
    _Pragma("omp atomic capture")
    a = ++(p->n);

    return 0;
}

from blis.

tlrmchlsmth avatar tlrmchlsmth commented on May 10, 2024

BLIS is compiling for me with icc 15.0.1.

Victor, can you attach the make_defs.mk file that you're using?

On Thu, Aug 20, 2015 at 7:52 AM, VictorEijkhout [email protected]
wrote:

Compiling frame/base/bli_threading_omp.c
frame/base/bli_threading_omp.c: In function 'bli_barrier':
frame/base/bli_threading_omp.c:88: error: expected end of line before 'capture'
frame/base/bli_threading_omp.c:89: error: invalid operator for '#pragma omp atomic' before '=' token
make: *** [obj/sandybridge/frame/base/bli_threading_omp.o] Error 1

I know that earlier Intel compilers did not support the full OMP 3.1
standard, but this is Intel 15.


Reply to this email directly or view it on GitHub
#32.

from blis.

VictorEijkhout avatar VictorEijkhout commented on May 10, 2024

On Aug 20, 2015, at 10:43 AM, Tyler Michael Smith <[email protected]mailto:[email protected]> wrote:

BLIS is compiling for me with icc 15.0.1.

Victor, can you attach the make_defs.mk file that you're using?

I’m not using anything custom. Here’s my whole installation:

./configure -p $RPM_BUILD_ROOT/%{INSTALL_DIR} sandybridge
make
make install

I think this means I’m using the standard sandybridge configuration.

If you are using custom settings, feel free to mail them to me and indicate how to use them.

Victor.

from blis.

fgvanzee avatar fgvanzee commented on May 10, 2024

If you are using the sandybridge configuration unmodified, then you're not using icc, you're using gcc.

from blis.

VictorEijkhout avatar VictorEijkhout commented on May 10, 2024

On Aug 21, 2015, at 10:30 AM, Field G. Van Zee <[email protected]mailto:[email protected]> wrote:

If you are using the sandybridge configuration unmodified, then you're not using icc, you're using gcc.

Override with configure option?

Victor.

from blis.

VictorEijkhout avatar VictorEijkhout commented on May 10, 2024

On Aug 21, 2015, at 10:30 AM, Field G. Van Zee <[email protected]mailto:[email protected]> wrote:

If you are using the sandybridge configuration unmodified, then you're not using icc, you're using gcc.

PS I didn’t know the compiler was a property of the processor architecture…..

from blis.

fgvanzee avatar fgvanzee commented on May 10, 2024

Override with configure option?

Someday, yes. But for now, the compiler shall be specified in the configuration.

PS I didn’t know the compiler was a property of the processor architecture…..

It's not, it's a property of the configuration, which specifies the build environment as well as the kernels and their associated parameters (such as blocksizes).

from blis.

jeffhammond avatar jeffhammond commented on May 10, 2024

Is there any further action required on this specific issue or can it be closed?

from blis.

fgvanzee avatar fgvanzee commented on May 10, 2024

I think it can be closed. I suspect the issue was born largely from confusion over the build system. Devin's recent upgrades to the configure script, supporting icc and gcc explicitly, certainly helps as well.

from blis.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.