LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-02-2006, 05:04 AM   #1
kairen
Member
 
Registered: Oct 2006
Location: Bulgaria
Distribution: Slackware64 14.1, CentOS 7
Posts: 108

Rep: Reputation: 15
How to split one process on 2 or more processors?


There is a multiprocessor box with Slackware 11.0 running with 2.6.17.13- smp kernel. Kernel sees all the processors and uses them all distributing processes among them.

The problem is that a mathematical model has to be run on it. In the source there are loops which should be split on several processors. Practically it has to run one process simultaneously on more then 1 processor. But it is not happening.

If you use Fedora the process split. I know there is quite a difference between Fedora and Slack so I don't compare them.

My Question is : How can I make the model run on Slackware the same way as it does on Fedora? I really don't want to give up on Slack because of this. Can anyone help?
 
Old 11-02-2006, 08:35 AM   #2
Wells
Member
 
Registered: Nov 2004
Location: Florida, USA
Distribution: Debian, Redhat
Posts: 417

Rep: Reputation: 53
So....wait... the source is written with SMP threading built into it? That should simply work in Slack.

The differences between FC and Slack are not all that wide as you may think. It is still linux, and the kernel source is still the same. Software that you have compiled on either box should just simply work, unless something else is going on that you are not aware of.
 
Old 11-02-2006, 02:09 PM   #3
kairen
Member
 
Registered: Oct 2006
Location: Bulgaria
Distribution: Slackware64 14.1, CentOS 7
Posts: 108

Original Poster
Rep: Reputation: 15
That's right. It "should" be ok but it is not. When the model is running the "top" shows one of the processors busy 100% and the others almost sleep and in the list below there is only one process (model) running. In Fedora there are 2 processors running at 100% and two processes running the model. there is an obvious difference in speed as well.

May be there is another difference between Slack and Fedora. Kernel source is the same but the precompiled kernels for both distributions are quite different. The way kernels "work" with the other software is different.

My question is about Slackware - I want to work on a Slack box.
How to make it split the process?

Thanks for your time and help
 
Old 11-02-2006, 05:35 PM   #4
Shade
Senior Member
 
Registered: Mar 2003
Location: Burke, VA
Distribution: RHEL, Slackware, Ubuntu, Fedora
Posts: 1,418
Blog Entries: 1

Rep: Reputation: 46
Was this a precompiled kernel, or did you configure and compile it yourself? The first thing I would try is building a new kernel from the latest source. If you get the same results, start looking at the binary. Is there an option to run it with a number of threads?

Also, under the kernel configuration there is an option for 'max number of processors' if you enable SMP. Set that to 2 or greater.

-- Shade
 
Old 11-03-2006, 06:58 AM   #5
PDock
Member
 
Registered: Aug 2004
Distribution: Slack10 & curr. tried numerous
Posts: 189

Rep: Reputation: 37
Quote:
Originally Posted by kairen
That's right. It "should" be ok but it is not.

May be there is another difference between Slack and Fedora. Kernel source is the same but the precompiled kernels for both distributions are quite different. The way kernels "work" with the other software is different.
Hopefully the difference is Fedora loads a module [not hardwired] that Slack is not loading. Try lsmod on each system to see what Slack might not be loading. Harder approach is to diff the .config files used by the smp kernels of each distro. I am assuming you are dual booting the same computer as I have no idea what differences in actual cpus used may throw into the mix.

ppd
 
Old 11-03-2006, 07:28 PM   #6
Shade
Senior Member
 
Registered: Mar 2003
Location: Burke, VA
Distribution: RHEL, Slackware, Ubuntu, Fedora
Posts: 1,418
Blog Entries: 1

Rep: Reputation: 46
Oh yes -- good question. What CPU is this specifically?

-- Shade
 
Old 11-04-2006, 06:24 PM   #7
guzzi
Member
 
Registered: Jun 2004
Location: Lawrence, KS
Distribution: Slackware
Posts: 313

Rep: Reputation: 40
process split

Having just done a bunch of SMP kernel compiling both 2.4 and 2.6 I noticed that
2.6 has tweeks for PREEMPT and IO Schedulers, which could be the source of what
you are seeing.

The .config could give you the clue you need.

Good luck
 
Old 11-05-2006, 03:53 PM   #8
granth
Member
 
Registered: Jul 2004
Location: USA
Distribution: Slackware64
Posts: 212

Rep: Reputation: 55
What processors are you using?

I would check both kernel config files for a few things.


What processor family is selected?

What preemption options do you have compiled?

What timer frequency do you have compiled?
 
Old 11-05-2006, 05:09 PM   #9
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 78
Quote:
Originally Posted by guzzi
Having just done a bunch of SMP kernel compiling both 2.4 and 2.6 I noticed that
2.6 has tweeks for PREEMPT and IO Schedulers, which could be the source of what
you are seeing.

The .config could give you the clue you need.

Good luck
Even if your kernel is tweaked for a certain type of scheduling, you can tweak a running kernel using the cpusets functionality that was introduced to linux in 2.6.9.
 
Old 11-07-2006, 10:01 AM   #10
kairen
Member
 
Registered: Oct 2006
Location: Bulgaria
Distribution: Slackware64 14.1, CentOS 7
Posts: 108

Original Poster
Rep: Reputation: 15
I have made consulting with colleagues and now I am refining the question:

--I mean mathematical model MM5 which runs 95% in user mode;
--OpenMP parallelization;
-- SMP kernel (self compiled | precompiled);
--Dual processor (dual core) Xeon 5140 box.

The doubts are, the matter of fact is pthread library in FC vs tls/pthread in Slack. The last one do not support (still???) user mode. Is that correct?
Is it possible that it is the problem?
 
Old 11-07-2006, 10:23 AM   #11
Wells
Member
 
Registered: Nov 2004
Location: Florida, USA
Distribution: Debian, Redhat
Posts: 417

Rep: Reputation: 53
Aha! OpenMP parallelization is the key here. It sounds like the Slackware box doesn't have the OpenMPI drivers installed, which do come with Redhat straight out of the box.

You have a choice of using OpenMPI or perhaps mvapich to solve this problem you are having.
 
Old 11-07-2006, 05:06 PM   #12
theoffset
Member
 
Registered: Aug 2005
Location: Guadalajara, Jal, Mexico
Distribution: Slackware Linux
Posts: 211

Rep: Reputation: 31
Is this OpenMP? or OpenMPI? both are different things. OpenMP was specifically thought for making Multi-Processor enabled processes without too much low-level thinkering. OpenMPI was made as a Message Passing Interface (i.e., how dbus should've been done, even if MPI comes from ages before dbus), and is mostly used as a paralell or distributed computing librarly (but it can do more than that).

OpenMP needs support at the compiler side (either ICC or GCC-4.2-cvs are OpenMP-enabled). It's possible that RedHat have included an OpenMP-patched GCC distribution (specially if you consider that they are the main sponsors of GCC), but it isn't supported in any of the official releases of GCC (yet).

OpenMPI, instead can be installed as a separate program, and I presume (I haven't tried) that it will work OK on Slack.

One is not a susbtitute for the other, they work in completely different ways. If you need OpenMP support, the easiest path, IMHO, is to get the Intel Compiler for linux (http://www.intel.com/cd/software/pro...eng/219771.htm).

EDIT:
Another solution to have OpenMP support under GCC is the Omni OpenMP project which is suppoused to translate OpenMP C/C++ into plain C/C++, you may want to take a look at it:
http://phase.hpcc.jp/Omni/

Last edited by theoffset; 11-07-2006 at 06:08 PM.
 
Old 11-08-2006, 01:16 AM   #13
kairen
Member
 
Registered: Oct 2006
Location: Bulgaria
Distribution: Slackware64 14.1, CentOS 7
Posts: 108

Original Poster
Rep: Reputation: 15
refining the question again:

--the model MM5 is a mixed FORTRAN/C project and requires Intel or Portland compiler;
--it compiles successfully with both and gives no compile errors (on Slack and Fedora/Redhat ;
--on Slack it gives runtime errors (segmentation fault) , on Fedora/Redhad it runs fine.

In the previous message I mentioned pthread and tls/pthread for a reason. If that is the core of the problem where should I look for an answer?

And yes, it is OpenMP parallelization;
 
  


Reply

Tags
coreduo



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
how a father process know which child process send the signal SIGCHLD icoming Programming 10 07-20-2010 07:26 AM
child process usses same amount of ram as parent process socialjazz Programming 7 10-19-2006 05:48 PM
How to split file , .. awk or split ERBRMN Linux - General 9 08-15-2006 12:02 AM
Bash Scripting - child process affecting parent process mthaddon Linux - General 1 05-02-2004 01:19 PM
Will Linux Support Amd Processors And Other Than Intel Processors? halovivek Linux - Hardware 6 09-02-2003 01:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:32 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
Open Source Consulting | Domain Registration