Digital Assignment-6: Name: Bejugam Shiva Suprith REG NO: 18BCE0427 Faculty: Narayanamoorthi M SLOT: L59+L60
Digital Assignment-6: Name: Bejugam Shiva Suprith REG NO: 18BCE0427 Faculty: Narayanamoorthi M SLOT: L59+L60
Digital Assignment-6: Name: Bejugam Shiva Suprith REG NO: 18BCE0427 Faculty: Narayanamoorthi M SLOT: L59+L60
FACULTY: NARAYANAMOORTHI M
SLOT: L59+L60
Q1) Write short notes on performance metrics and bench mark programs of parallel
computing.
Performance metrics :
Performance metrics are integral to an organization's success. It's important that organizations
select their chief performance metrics and focus on these areas because these metrics help
guide and gauge an organization’s success. Key success factors are only useful if they are
acknowledged and tracked. Business measurements must also be carefully managed to make
sure that they give right answers, and that the right questions are being asked.
Profit
Market share
Earnings growth
Stock price
Non-financial measurements are also useful to help assess, report, and drive success. Most
notably, the Malcolm Baldrige National Quality Award's Criteria for Performance Excellence
non-financial success metrics include:
Customer satisfaction
Process excellence
Employee satisfaction
Organizations may define their own indicators of performance in key areas. Such metrics are
often useful because they reduce complex measurements and results to a single value that can
be tracked, managed, and improved. These “shortcuts” can be misleading, however, when used
either for process improvement or for other feedback such as promotion, recognition, or
compensation.
Cpu-z :
CPU-Z will provide users with a complete rundown of your PC's hardware specifications,
particularly concerning your CPU.It also provides specifications for your motherboard, RAM,
and graphics card, making it a great all-around program to visualize hardware makes and
models. You can even save a TXT file of the information via the Tools option.
Speccy :
Piriform's Speccy, from the creators of CCleaner, is a favorite among the gaming community for
its simple layout of a PC's hardware configuration.Once it's open, Speccy will provide a
thorough rundown of every component, and most drivers, currently available on your PC.If you
click on the individual parameters on the left-hand side of the window, you'll get even more
information concerning your specific hardware including temperature, voltage, fan speeds, and
more.
Cine bench :
Cine Bench provides one of the most thorough and trusted CPU benchmarks available. It
renders an image---rendering being a task largely undertaken by the CPU---and compares it to
other real-world tests in order to gauge your CPU's performance.
It's as real-world as it gets: while other benchmarks will test your overall PC performance or a
combination of your CPU and GPU, Cine Bench specifically tests all available processor cores of
your CPU. After the test is run, your processor will be graded in points: the higher your points,
the stronger your CPU's performance output.
Real bench :
Real Bench is another example of real-world CPU benchmarking. It uses four tests, all involving
rendering in some capacity: Image Editing, H.264 Video Encoding, OpenCL, and Heavy
Multitasking. You can upload your finding to the Real Bench website to compare where you
stand with other benchmarked hardware configurations. Possibly the best aspect of Real Bench
is that it simulates a regular course load; no stress testing to push your CPU to the max in order
to gauge its performance. Although, of course, stress testing is also an available feature in Real
Bench.
Q2) Write an open MP program using C for the following and discuss your findings.
a)Fibonacci series
Code:
#include <stdio.h>
#include <stdlib.h>
#define N 25
if (n <= 1)
return n;
else {
int main(void)
int i;
a[i] = fib(b[i]);
return 0;
Output:
Code:
#include <stdio.h>
#include <stdlib.h>
#include <omp.h>
int main(void)
int n = 10;
int factorial[n];
factorial[1] = 1;
int *proda;
proda[0] = 1;
int prod = 1;
prod *= i;
factorial[i] = prod;
proda[ithread+1] = prod;
#pragma omp barrier
int offset = 1;
free(proda);
printf("%d\n", factorial[i]);
putchar('\n');
Output:
c) Number base conversion of the following: decimal to binary, decimal to octal and decimal
to hexadecimal and vice-versa
code:
#include<stdio.h>
#include<stdlib.h>
#include<omp.h>
long binarynum = 0;
while (decimalnum!=0)
rem = decimalnum%2;
decimalnum = decimalnum / 2;
return binarynum;
while (decimalnum != 0)
decimalnum = decimalnum / 8;
}
return octalnum;
while(num>0)
rem[i]=num%16;
num=num/16;
i++;
length++;
for(i=length-1;i>=0;i--)
switch(rem[i])
case 10:
printf("A");
break;
case 11:
printf("B");
break;
case 12:
printf("C");
break;
case 13:
printf("D");
break;
case 14:
printf("E");
break;
case 15:
printf("F");
break;
default :
printf("%ld",rem[i]);
printf("\n");
int main()
int a,b;
char ch[10];
int num;
printf("Enter the number to convert: ");
scanf("%d",&num);
a=dectobin(num);
b=dectooct(num);
dectohex(num);
return 0;
}
Output:
(3) Write a program using open MP or MPI to compute the following series:
Sin(x)
Code:
#include<stdio.h>
#include<omp.h>
int main()
int i, n;
float x, sum, t;
scanf("%f",&x);
scanf("%d",&n);
x=x*3.14159/180;
t=x;
sum=x;
for(i=1;i<=n;i++)
sum=sum+(t*(-1)x*x)/(2*i(2*i+1));
return 0;
Output:
Cos(x)
Code:
#include <bits/stdc++.h>
x = x * (PI / 180.0);
double res = 1;
fact = fact * (2 * i - 1) *
(2 * i);
pow = pow * x * x;
pow / fact;
return res;
// Driver Code
int main()
float x;
int n;
cout<<"enter x ";
cin>>x;
cout<<endl<<"enter n ";
cin>>n;
cout<<endl;
cout<<endl;
return 0;
Output: