Sponsored Content
Top Forums Programming OpenMP and MPI hybrid thread numbers Post 302953696 by armando_2011 on Monday 31st of August 2015 11:22:58 AM
Old 08-31-2015
OpenMP and MPI hybrid thread numbers

hi,

I have two basic questions, I will be really grateful if I receive any
comment from you,

I have an MPI code where I am trying to implement OpenMP directives.
The machine where I run the code has 16 cores. I run the code with

Code:
export OMP_NUM_THREADS=2
mpirun -np 4  ./exec

If I used mpi alone, I understand that the program "exec" would run on
4 cores. But what does the program do when I use MPI combined with
OpenMP, does it mean that I will be using 8 cores (4 MPI processes x
2 threads) for the entire work? Or that I will use only 4 cores and
each core will be doubly occupied?

The second thing is related to the use of OpenMP directives inside subroutines.
If I have the following code:

Code:
program main 
....
!$omp parallel 
!$omp sections 
!$omp section
    print*, "hello"
!$omp section 
    call func()
!$omp end sections 
!$omp end parallel

end program

subroutine func()
...
!$omp parallel do
do i=1,100
   ...
enddo
!$omp end parallel do 
end subroutine

how many threads would there be in the parallel section of func() if
I set export OMP_NUM_THREADS=2? According to my code there
will be 1 thread available for func() because it is inside a "section"
but I don't know how the threads work when the function is nested
as in this case,

Thanks.
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Hybrid CD-ROMs

Hello, Is there any way to create a hybrid CD-ROM on either a Windows or Solaris server to be able to mastered with a Windows mastering software like Roxio. Thanks, Mike (1 Reply)
Discussion started by: bubba112557
1 Replies

2. What is on Your Mind?

Has anyone in this forum tried a hybrid HDD, is it worth?

I'm looking for a new internal hard drive for my desktop PC. Having a look at some 'techie' sites I ran along some reviews of hybrid drives which supposedly combine the high capacity storage of magnetic drives with the fast performance of SSDs. For example this 500 GB Seagate has 4 GB NAND... (4 Replies)
Discussion started by: verdepollo
4 Replies

3. Virtualization and Cloud Computing

Private, Public and Hybrid Clouds

Hi all, Private, Public and Hybrid Clouds I'm now testing OpenStack; Home OpenStack Open Source Cloud Computing Software -Infrastructure as a Service (IaaS) -Platform as a Service (PaaS) -Software as a Service (SaaS) It is an Open Source software. I'm interested to know whether... (0 Replies)
Discussion started by: satimis
0 Replies

4. HP-UX

Spawn more than 8 threads OpenMP & HPUX

Hi folks, I am trying to run more than 8 threads in OpenMP team on my HP-UX 11i v3 system (without root access), but NO success. Compiler: aCC A.06.26 I tried to setup: OMP_NUM_THREADS, omp_set_num_threads(), max_thread_proc=1000, nkthread=8416, set_dynamic=0 Machine has 2 processors... (1 Reply)
Discussion started by: ATveretinov
1 Replies

5. Shell Programming and Scripting

Grep username and get all the lines with thread numbers

I need help to extract the file. If I am entering the user name like abcd@xyz.com, search the username and get the tread number. Once will get thread number all the line having same threadnumber wanted to keep in seperate file. It can be more than thread number for single username. For... (3 Replies)
Discussion started by: nes
3 Replies

6. Programming

Gcc openmp programming problem

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... (2 Replies)
Discussion started by: pigeon151
2 Replies

7. Programming

Need help with counting within parallelized block - OpenMP/C-Programming

Hello together, I have a question for you. Since a few weeks I am trying to programm a small bruteforce application in C on Ubuntu 14.04.1 using Code::Blocks with gcc-4.8.2. My programm is nothing special. It's just for practise, Without hashing or something like that. For me the focus is on... (11 Replies)
Discussion started by: DaveX
11 Replies

8. Programming

Undefined reference to omp_get_thread_num using OpenMP?

I am using a large code-base that compiled successfully before using make with a makefile and cmake. However, now that I'm trying to use openmp with it, I'm now getting the errors undefined reference to `omp_get_thread_num' undefined reference to `omp_get_num_threads'I don't think this... (0 Replies)
Discussion started by: larry burns
0 Replies
LAM(7)								   LAM OVERVIEW 							    LAM(7)

NAME
LAM - introduction to Local Area Multicomputer (LAM) DESCRIPTION
LAM is an MPI programming environment and development system for a message-passing parallel machine constituted with heterogeneous UNIX computers on a network. With LAM, a dedicated cluster or an existing network computing infrastructure can act as one parallel computer solving one compute-intensive problem. LAM emphasizes productivity in the application development cycle with extensive control and moni- toring functionality. The user can easily debug the common errors in parallel programming and is well equipped to diagnose more difficult problems. LAM features a full implementation of the MPI communication standard, with the exception that the MPI_CANCEL function will not properly cancel messages that have been sent. User Information Users are strongly encouraged to read the LAM/MPI User's Guide that is included with the LAM/MPI distribution, and is provided on the main LAM/MPI web site (http://www.lam-mpi.org/). Up-to-Date Information The LAM home page can be found on the World Wide Web at: http://www.lam-mpi.org/. It should be consulted for the most current information about LAM, as well as updates, patches, etc. SEE ALSO
Overview of Commands and Libraries introu(1), introc(2), INTROF(2) System Services Interface (SSI) lamssi(7), lamssi_boot(7), lamssi_coll(7), lamssi_rpi(7) Starting / Stopping LAM recon(1), lamboot(1), lamhalt(1), lamnodes(1), lamwipe(1), tping(1), lamgrow(1), lamshrink(1) Compiling MPI Applications mpicc(1), mpiCC(1), mpif77(1) Running MPI Applications mpirun(1), lamclean(1) Running Non-MPI Applications lamexec(1) Monitoring MPI Applications mpitask(1) Unloading MPI Trace Data lamtrace(1) Reference Documents "LAM/MPI Installation Guide" included in the LAM/MPI distribution and available on http://www.lam-mpi.org/ "LAM/MPI User's Guide" included in the LAM/MPI distribution and available on http://www.lam-mpi.org/ "LAM Frequently Asked Questions" at http://www.lam-mpi.org/faq/ "MPI Primer / Developing with LAM", Ohio Supercomputer Center "MPI: A Message-Passing Interface Standard", Message-Passing Interface Forum, version 1.1 at http://www.mpi-forum.org/ "MPI-2: Extensions to the Message Passing Interface", Message Passing Interface Forum, version 2.0 at http://www.mpi-forum.org/ MPI Quick Tutorials "LAM/MPI ND User Guide / Introduction" at http://www.lam-mpi.org/mpi/tutorials/lam/ "MPI: It's Easy to Get Started" "MPI: Everyday Datatypes" "MPI: Everyday Collective Communication" Guaranteed Envelope Resources "Robust MPI Message Delivery Through Guaranteed Resources", MPI Developer's Conference, 1995 LAM 7.1.4 July, 2007 LAM(7)
All times are GMT -4. The time now is 09:29 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy