Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 08-01-2014, 03:10 AM   #1
LQ Newbie
Registered: Aug 2014
Posts: 1

Rep: Reputation: Disabled
gcc openmp programming trouble

Dear Linux users,
I'm a noob at openmp, gcc and c programming. I can run my own openmp code in terminal with no problem, eg. gcc -fopenmp program.c -o program.

But now I'm trying to compile and run another person's code, it contains a makefile and multiple .c and .h files. I don't know how to compile/run this?
Link to the files -

My attempt to make and run it:

linux@linux ~ $ make
gcc -O3 -march=native main.c monotonic_timer.c functions.c -o memory_profiler -fopenmp -DWITH_OPENMP

linux@linux ~ $ ./memory_profiler
read_memory_rep_lodsq: 6.96 GiB/s
read_memory_loop: 7.89 GiB/s
read_memory_sse: 7.79 GiB/s
write_memory_loop: 6.58 GiB/s
write_memory_rep_stosq: 7.28 GiB/s
write_memory_sse: 6.61 GiB/s
write_memory_nontemporal_sse: 5.86 GiB/s
write_memory_memset: 6.64 GiB/s
memory_profiler: main.c:51: timeitp: Assertion `(1*(1024*1024*1024LL)) % omp_get_max_threads() == 0' failed.

Program aborts half way. It aborts when trying to run openmp code from main.c . I don't think I'm using openmp properly? How can I fix this?

Thankyou for your time,

Last edited by pigeon151; 08-01-2014 at 03:44 AM. Reason: More detail on problem


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
C/C++ Hybrid[MPI + OpenMP] Programming in Linux: mpicc -openmp bdboy Programming 0 03-20-2013 03:44 AM
Openmp support for gcc on ubuntu 11.10 ? kamesh419 Linux - Software 4 02-07-2012 06:33 AM
Lost on parallel programming... (openMPI, openMP..) sylvaticus Programming 2 07-21-2008 02:49 PM
gcc programming gazza Linux - Newbie 3 02-13-2004 01:21 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:09 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration