Skip to content

ReFrame tutorial: missing -pthread in A Multithreaded “Hello, World!” #1726

@akesandgren

Description

@akesandgren

The initial Multithreaded “Hello, World!” most likely need a "-pthread" compiler flag. It is at least required for g++ 9.3.0.

Without it I get:

cat stage/generic/default/builtin/HelloThreadedTest/rfm_HelloThreadedTest_build.err 
/scratch/cc0LAYZw.o:hello_threads.cpp:function std::thread::thread<void (&)(int), int&, void>(void (&)(int), int&): error: undefined reference to 'pthread_create'
collect2: error: ld returned 1 exit status

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions