LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 06-23-2013, 03:02 PM   #1
saadhu
LQ Newbie
 
Registered: Jun 2013
Distribution: linuxmint
Posts: 1

Rep: Reputation: Disabled
Wink problem with -fopenmp


hi everyone,I've very basic knowledge about programming.

As a part of program, i had to implement parallel processing in one program file, and that needs to be compiled using a make file. when i was compiling with -fopenmp it is showing the following error

undefined reference to GOMP_parallel_start
undefined reference to GOMP_parallel_end
undefined reference to omp_get_num_threads
undefined reference to omp_get_thread_num
undefined reference to GOMP_barrier

in make file target was written as

problemdef.o: problemdef.cpp
$(CXX) -fopenmp $(CXXFLAGS) $<


and the program was as follows

#include <vector>
#include <complex.h>
#include <iostream>
#include <time.h>
#include <math.h>
#include <cstdlib>
#include <stdio.h>
#include <string.h>
#include <omp.h>
#include <fstream>


#ifndef GLOBAL_H
#include "global.h"
#endif
#include "m_minrad.h"
#include "functs.h"

#define PAR // Comment out if not parallel version
using namespace std;

void test_problem(double* parameters)
{
int i;
#ifdef PAR
#pragma omp parallel for private(parameters,i)
#endif

for(i=0;i<3;i++)
{

obj[i]=function(parameters);
}
}

could anyone please find what's wrong with program or part of makefile,it would be of great help to me
 
Old 07-02-2013, 09:53 AM   #2
Dr_P_Ross
Member
 
Registered: Nov 2003
Location: Edinburgh, UK
Distribution: Arch
Posts: 43

Rep: Reputation: 18
It looks like the library containing the OpenMP functions is not being found by the compiler. Typically the library is named libgomp.so.<whatever>. You could check where the loader is looking for libraries by, say, ld --verbose | grep SEARCH_DIR
 
  


Reply


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
Do I have a path problem, an Apache2 problem or a Javascript problem or any other pro rblampain Linux - Networking 0 12-29-2010 04:50 AM
Sound Card problem(every time i install linux i have diffirent hardware problem) jacka1l Linux - Newbie 7 08-11-2005 07:10 AM
Lan configuration problem - NFS boot problem - RX&TX packets errors 242VDM242 Linux - Networking 4 11-25-2004 02:35 PM
perl problem? apache problem? cgi problem? WorldBuilder Linux - Software 1 09-17-2003 08:45 PM


All times are GMT -5. The time now is 07:15 AM.

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