OVP Forums - A community of assistance, help, questions, and answers.
|
View previous topic :: View next topic |
Author |
Message |
AntonioPrioletti
Joined: 02 May 2011 Posts: 20
|
Posted: Wed Oct 12, 2011 12:22 am Post subject: Benchmark multithread |
|
|
Hi,
I created a multithread application, creating a thread with unix function pthread_t name_thead. And in makefile I insert the option "-lpthread" for include the library, and in the application I include the library <pthread>. But when I compile the compilator don't recognizes pthread_t. Where is the problem?? |
|
Back to top |
|
 |
DuncGrah OVP Technologist

Joined: 27 Feb 2008 Posts: 1654 Location: United Kingdom
|
Posted: Wed Oct 12, 2011 1:45 am Post subject: |
|
|
You are using the wrong Compiler!
I suspect you are using a bare metal compiler when, in fact, you need a compiler for a Linux hosted system whose libraries will support pthreads |
|
Back to top |
|
 |
AntonioPrioletti
Joined: 02 May 2011 Posts: 20
|
Posted: Wed Oct 12, 2011 1:49 am Post subject: |
|
|
DuncGrah wrote: | You are using the wrong Compiler!
I suspect you are using a bare metal compiler when, in fact, you need a compiler for a Linux hosted system whose libraries will support pthreads |
and how I can use a compiler for a Linux hosted system? |
|
Back to top |
|
 |
DuncGrah OVP Technologist

Joined: 27 Feb 2008 Posts: 1654 Location: United Kingdom
|
Posted: Wed Oct 12, 2011 2:01 am Post subject: |
|
|
One you could try is from CodeSourcery. They have a lite version of the GNU toolchain .. I found them at this link. You will want the GNU/Linux version.
There will be other toolchains you could use.
Remember, you will then need to run this within a Linux operating system on a platform such as the Arm IntegratorCP or MIPS Malta virtual platforms. |
|
Back to top |
|
 |
AntonioPrioletti
Joined: 02 May 2011 Posts: 20
|
Posted: Wed Oct 12, 2011 2:08 am Post subject: |
|
|
DuncGrah wrote: | One you could try is from CodeSourcery. They have a lite version of the GNU toolchain .. I found them at this link. You will want the GNU/Linux version.
There will be other toolchains you could use.
Remember, you will then need to run this within a Linux operating system on a platform such as the Arm IntegratorCP or MIPS Malta virtual platforms. |
sorry but I don't understand. I used MSYS for compiler in a Windows enviroment, with this I simulated a ork1 platform with no operating system. If I want simulate the same platform with Linux operating system because I need thread, I can't use MSYS? |
|
Back to top |
|
 |
DuncGrah OVP Technologist

Joined: 27 Feb 2008 Posts: 1654 Location: United Kingdom
|
Posted: Wed Oct 12, 2011 3:12 am Post subject: |
|
|
MSYS provides a Linux like environment on a Windows system. It has nothing to do with running or compiling.
You will also have installed MINGW which provides a host toolchain. This was used to compile the virtual platform (OVPsim_or1k.c?) that runs the simulation.
The application that was executing on the OR1K processor model was compiled by an OR1K cross compiler toolchain. This application does not use features that are only available from an operating system, such as pthreads, that you now want to use.
What are you trying to do? |
|
Back to top |
|
 |
AntonioPrioletti
Joined: 02 May 2011 Posts: 20
|
Posted: Wed Oct 12, 2011 4:54 am Post subject: |
|
|
DuncGrah wrote: | MSYS provides a Linux like environment on a Windows system. It has nothing to do with running or compiling.
You will also have installed MINGW which provides a host toolchain. This was used to compile the virtual platform (OVPsim_or1k.c?) that runs the simulation.
The application that was executing on the OR1K processor model was compiled by an OR1K cross compiler toolchain. This application does not use features that are only available from an operating system, such as pthreads, that you now want to use.
What are you trying to do? |
perfect, i understand now. I try to create a multithread benchmark; if I want to use pthread, what processor can I use that the cross compiler toolchain support thread? |
|
Back to top |
|
 |
LeeMoore OVP Technologist

Joined: 27 Feb 2008 Posts: 635
|
Posted: Wed Oct 12, 2011 8:32 am Post subject: |
|
|
Firstly what is the threads package you intend to use, I will assume pthreads (posix threads)
For pthreads to execute correctly, it requires services from a Virtual Memory operating system, because it makes use of system calls such as clone().
This means that a bare metal compiler will not be capable of compiling an application which uses calls to pthreads() functions (it has no virtual memory support), you must use a compiler which runs under a virtual memory operating system, such as Linux.
If you compile an application to run under a Linux operating system, you must create a platform capable of running the Linux Operating system, and run the operating system on the platform, the application can then be executed as a user application.
This is all based upon the premise that you are using posix threads, if your intention is to use a different threads package, then this is not the case.
If posix is your intended target, I would suggest looking at the Mips Malta platform or the Arm Integrator platform.
Thx
Lee |
|
Back to top |
|
 |
AntonioPrioletti
Joined: 02 May 2011 Posts: 20
|
Posted: Wed Oct 12, 2011 9:27 am Post subject: |
|
|
LeeMoore wrote: | Firstly what is the threads package you intend to use, I will assume pthreads (posix threads)
For pthreads to execute correctly, it requires services from a Virtual Memory operating system, because it makes use of system calls such as clone().
This means that a bare metal compiler will not be capable of compiling an application which uses calls to pthreads() functions (it has no virtual memory support), you must use a compiler which runs under a virtual memory operating system, such as Linux.
If you compile an application to run under a Linux operating system, you must create a platform capable of running the Linux Operating system, and run the operating system on the platform, the application can then be executed as a user application.
This is all based upon the premise that you are using posix threads, if your intention is to use a different threads package, then this is not the case.
If posix is your intended target, I would suggest looking at the Mips Malta platform or the Arm Integrator platform.
Thx
Lee |
perfect. Can I create a multithread benchmark? It's supported by OVP? Because in the using_processor_model guide say that it don't use with OVP |
|
Back to top |
|
 |
LeeMoore OVP Technologist

Joined: 27 Feb 2008 Posts: 635
|
Posted: Wed Oct 12, 2011 12:06 pm Post subject: |
|
|
please explain what is the intention of your benchmark ?
Are you trying to prove/disprove some theory ?
It is possible to install Debian Linux in the Mips Malta Platform, and then to compile multithreaded programs which will run on the simulated platforms.
It is not clear whether this will meet your goals, you have not discussed your ideas.
Thx
Lee |
|
Back to top |
|
 |
AntonioPrioletti
Joined: 02 May 2011 Posts: 20
|
Posted: Wed Oct 12, 2011 1:12 pm Post subject: |
|
|
LeeMoore wrote: | please explain what is the intention of your benchmark ?
Are you trying to prove/disprove some theory ?
It is possible to install Debian Linux in the Mips Malta Platform, and then to compile multithreaded programs which will run on the simulated platforms.
It is not clear whether this will meet your goals, you have not discussed your ideas.
Thx
Lee |
I don't have real theory to prove, because I am a student that is testing OVP characterist. With Mips Malta Platform, I can have many core as or1k platform? And then install Debian Linux and run a multithread benchmark? |
|
Back to top |
|
 |
LeeMoore OVP Technologist

Joined: 27 Feb 2008 Posts: 635
|
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Information regarding OVP © 2008-2022 Imperas Software
|