GithubHelp home page GithubHelp logo

Comments (6)

petertorelli avatar petertorelli commented on September 25, 2024 1

The correct macro name is -DUSE_PTHREAD, not -DUSE_PTHREAD**S**.

from coremark.

jimsalterjrs avatar jimsalterjrs commented on September 25, 2024 1

Aha! Thank you in return for the typo catch. =)

from coremark.

jimsalterjrs avatar jimsalterjrs commented on September 25, 2024

-DUSE_FORK worked, for what that's worth; the problem seems limited to PTHREAD.

from coremark.

petertorelli avatar petertorelli commented on September 25, 2024

The pthread library is not linked by default. I will add a note to the README. You need to modify the core_portme.mak file for your platform, adding -lpthread to LFLAGS_END. Example edit to the linux64 folder:

:
#Flag: LFLAGS_END
#	Define any libraries needed for linking or other flags that should come at the end of the link line (e.g. linker scripts). 
#	Note: On certain platforms, the default clock_gettime implementation is supported but requires linking of librt.
LFLAGS_END += -lrt -lpthread
# Flag: PORT_SRCS
# Port specific source files can be added here
PORT_SRCS = $(PORT_DIR)/core_portme.c
:

from coremark.

petertorelli avatar petertorelli commented on September 25, 2024

@jimsalterjrs Also, thanks for pointing this out!

from coremark.

jimsalterjrs avatar jimsalterjrs commented on September 25, 2024

Still didn't get us there.

gcc -O2 -Ilinux64 -I. -DFLAGS_STR=\""-O2 -DMULTITHREAD=16 -DUSE_PTHREADS -DPERFORMANCE_RUN=1  -lrt -lpthread"\" -DITERATIONS=0 -DMULTITHREAD=16 -DUSE_PTHREADS -DPERFORMANCE_RUN=1 core_list_join.c core_main.c core_matrix.c core_state.c core_util.c linux64/core_portme.c -o ./coremark.exe -lrt -lpthread
In file included from coremark.h:38,
                 from core_list_join.c:19:
linux64/core_portme.h:270:2: error: #error "Please implement multicore functionality in core_portme.c to use multiple contexts."
  270 | #error \
      |  ^~~~~
In file included from coremark.h:38,
                 from core_main.c:23:
linux64/core_portme.h:270:2: error: #error "Please implement multicore functionality in core_portme.c to use multiple contexts."
  270 | #error \
      |  ^~~~~
In file included from coremark.h:38,
                 from core_matrix.c:19:
linux64/core_portme.h:270:2: error: #error "Please implement multicore functionality in core_portme.c to use multiple contexts."
  270 | #error \
      |  ^~~~~
In file included from coremark.h:38,
                 from core_state.c:19:
linux64/core_portme.h:270:2: error: #error "Please implement multicore functionality in core_portme.c to use multiple contexts."
  270 | #error \
      |  ^~~~~
In file included from coremark.h:38,
                 from core_util.c:19:
linux64/core_portme.h:270:2: error: #error "Please implement multicore functionality in core_portme.c to use multiple contexts."
  270 | #error \
      |  ^~~~~
In file included from ./coremark.h:38,
                 from linux64/core_portme.c:21:
linux64/core_portme.h:270:2: error: #error "Please implement multicore functionality in core_portme.c to use multiple contexts."
  270 | #error \
      |  ^~~~~
linux64/core_portme.c:417:2: error: #error "Please implement multicore functionality in core_portme.c to use multiple contexts."
  417 | #error \
      |  ^~~~~
make[2]: *** [Makefile:86: compile] Error 1

This was with core_portme.mak edited as follows:

#Flag: LFLAGS_END
#       Define any libraries needed for linking or other flags that should come>
#       Note: On certain platforms, the default clock_gettime implementation is>
LFLAGS_END += -lrt
LFLAGS_END += -lpthread
# Flag: PORT_SRCS
# Port specific source files can be added here
PORT_SRCS = $(PORT_DIR)/core_portme.c

from coremark.

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.