игра брюс 2048
Главная / Программирование / Introduction to performance optimization using Intel SW tools / Тест 7

Introduction to performance optimization using Intel SW tools - тест 7

Упражнение 1:
Номер 1
 OpenMP is:

Ответ:

 (1) compiler option linked to output binary 

 (2) technology to execute code on multiple computers 

 (3) technology for parallel computing on the shared memory systems 

 (4) technology for parallel computing on the distributed memory systems 


Номер 2
 For parallelization it is required to:

Ответ:

 (1) use compiler command line option -Qomp. Compiler will choose regions to parallelize 

 (2) code could be enclosed by #pragma omp parallel start 

 (3) code for parallelization have to be moved to separate function, marked with intrinsic __omp_parallel 

 (4) parallel code have to be combined to blocks started with pragma #pragma omp parallel 


Номер 3
When using OpenMP variables behave as follows:

Ответ:

 (1) inside a block all variables for different threads use separate memory address and could not interact 

 (2) all variables inside parallel blocks use the same addresses, so user could control concurrent workflow 

 (3) variables could be marked to have different or same memory cell 


Упражнение 2:
Номер 1
 OpenMP uses the following model of parallel execution:

Ответ:

 (1) refork model: each time parallel loop starts new threads are created 

 (2) fork-join model: all threads are created at the first parallel region and then used 

 (3) queue model: each parallel task is queued; different executors are taking tasks from this queue concurrently 


Номер 2
 What pragma is used to parallelize loop:

Ответ:

 (1) #pragma omp parallel for 

 (2) #pragma omp parallel while 

 (3) #pragma omp single 

 (4) #pragma omp set parallel for 


Номер 3
 What identifier is not reserved for OpenMP:

Ответ:

 (1) nowait 

 (2) prefork 

 (3) schedule 

 (4) reduction 


Упражнение 3:
Номер 1
 What could be performed to save the last state of the 
	variable into master thread after the parallel block?

Ответ:

 (1) add this variable to private set 

 (2) add this variable to lastprivate set 

 (3) add this variable to lastshared set 

 (4) this kind of behavior is not allowed by the technology 


Номер 2
 As a default all variables except local function variables
	and loop iterators are add to

Ответ:

 (1) private set 

 (2) shared set 

 (3) lastprivate set 

 (4) firstprivate set 


Номер 3
 Schedule clause accepts the following arguments:

Ответ:

 (1) static 

 (2) dynamic 

 (3) variant 

 (4) object 

 (5) guided 

 (6) int 

 (7) realtime 

 (8) runtime 


Упражнение 4:
Номер 1
nowait directive is used for:

Ответ:

 (1) avoid "Press any key to exit" at the end of the program 

 (2) tell the compiler to start executing before init ends 

 (3) to disable synchronization at the end of the loop 

 (4) to disable additional delays in the threads 


Номер 2
 What directive is used to create synchronization point?

Ответ:

 (1) critical 

 (2) barrier 

 (3) atomic 

 (4) master 

 (5) sync 

 (6) stop 


Номер 3
How many threads could enter the critical section at a time?

Ответ:

 (1)

 (2)

 (3)

 (4) any, because OpenMP sets no limit to the thread number 


Упражнение 5:
Номер 1
What directive is used to avoid incorrect concurrent 
	usage of the lval variable?

Ответ:

 (1) SEMAPHORE 

 (2) TRASACTION 

 (3) ATOMIC 

 (4) CHECK SHARED 

 (5) CONTROL SHARED 


Номер 2
What directive is used to mark a piece of code to be executed
	by master thread only?

Ответ:

 (1) SOLO 

 (2) MASTER 

 (3) ONLYONE 

 (4) OWNER 

 (5) SUPER 

 (6) CREATOR 


Номер 3
What directive marks sequential execution block?

Ответ:

 (1) SERIAL 

 (2) ORDERED 

 (3) SOLO 

 (4) MASTER 

 (5) guided 


Упражнение 6:
Номер 1
What option used to determine multi-thread iteration 
	distribution?

Ответ:

 (1) SCHEDULE 

 (2) TT 

 (3) FORALL 

 (4) THREADS 


Номер 2
What of the following is schedule type?

Ответ:

 (1) dispatch 

 (2) nodispatch 

 (3) runtime 

 (4) static 

 (5) serial 

 (6) ordered 


Номер 3
What of the following is schedule type?

Ответ:

 (1) random 

 (2) round-robin 

 (3) guided 

 (4) dynamic 

 (5) serial 

 (6) concurrent 




Главная / Программирование / Introduction to performance optimization using Intel SW tools / Тест 7