Master construct program in parallel construct, Computer Networking

Assignment Help:

master construct

#include

extern float average(float,float,float);

void master_construct ( float* x, float* xold, int n, float tol )

 {

int c, i, toobig;

float error, y;

c = 0;

#pragma omp parallel

{

do{

#pragma omp for private(i)

for( i = 1; i < n-1; ++i ){

xold[i] = x[i];

}

#pragma omp single

{

toobig = 0;

}

#pragma omp for private(i,y,error) reduction(+:toobig)

for( i = 1; i < n-1; ++i ){

y = x[i];

x[i] = average( xold[i-1], x[i], xold[i+1] );

error = y - x[i];

if( error > tol || error < -tol ) ++toobig;

}

#pragma omp master

{

++c;

printf( "iteration %d, toobig=%d\n", c, toobig );

}

}while( toobig > 0 );

}

}


Related Discussions:- Master construct program in parallel construct

Dns in the internet, DNS in the Internet -Domain name space is split i...

DNS in the Internet -Domain name space is split into three sections: country, generic and inverse -Generic domains define hosts by generic behavior -Country domains are

What is unacknowledged connectionless service, What is Unacknowledged conne...

What is Unacknowledged connectionless service This service is a datagram-style service. It is a very simple service that does not involve any of the flow- and error-control mec

Which statement is true regarding half duplex, Half duplex is analogous to ...

Half duplex is analogous to a one a lane bridge, it can handle traffic in both directions but no at the similar time.

Network and system administration, The goal of this assignment is to provid...

The goal of this assignment is to provide an exposure to Network and System Administration issues. For the project, you are required to design/configure/implement/test/review a Net

Network access technologies, Question 1 Explain the following with respect...

Question 1 Explain the following with respect to Data Encoding                     Digital Signaling of Digital Data                     Digital Signal Encoding Techniques Questi

CCNA, What is basic purpose of Routers

What is basic purpose of Routers

Message passing libraries mpi and pvm, In this part, we shall talk about ab...

In this part, we shall talk about about message passing libraries. In history, various message passing libraries have been available since the 1980s. These executions differed subs

Define the non-blocking and blocking network, Non-Blocking and Blocking net...

Non-Blocking and Blocking network In Non-blocking networks, route from a free input node to another free output node can forever be provided. Crossbar is an illustration of non

Retransmission of packets - transport layer, Retransmission of packets ...

Retransmission of packets The disadvantage  of thronging away a correctly received packet is that  the subsequent retransmission  of the  packet might  be lost  or garbled and

Root dns servers - application layer , Root DNS Servers A root  server...

Root DNS Servers A root  server is a serve which  consists of the entire  hierarchy  of servers. A root  server  usually  does not  store any  information  about  domains  but

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd