openmp-collaboration's People
Forkers
edmondiumopenmp-collaboration's Issues
Survey Question on the For loop in source file Templates/Day_1/Running_OpenMP/SampleScript/C/code.c line 38
Hello Sir/ Madam
We are from a research group at Iowa State University, USA. We want to do a survey on Github developers on the methods they used for paralleling their code. To do the survey, We want to ask three questions about this for loop:
-
Can you briefly explain the purpose of using pragma for this case? If the pragma contained reduction and private clauses, can you briefly mention the purposes of variables in those clauses?
-
How much confidence do you have about the correctness of this implementation? You can choose from 1-5 with 1 as the lowest confidence score and 5 as the highest confidence score.
-
(Optional) Do you actually run (interpret the code with compilation and pass input/get output) the code and see the optimization of parallelization? Yes/No
- If yes, can you provide the information of what are the input and expected output of this program (the input that caused the program to run through this for-loop).
The for loop is from line 38 of file https:/github.com/hpc2n/OpenMP-Collaboration/blob/master/Templates/Day_1/Running_OpenMP/SampleScript/C/code.c
Here is a part of the code:
omp parallel for default(none) private(xpos, ypos) reduction(+:integral) schedule(static,250)
#include <stdio.h>
#include "omp.h"
#include <math.h>
// parameters N and h
#define NSIZE 44800
#define STEPSIZE 0.0002
int main()
{
double xpos, ypos;
double integral=0.0;
int numThreads;
// Query the number of threads
// A master construct would be a more elegant solution here
#ifdef _OPENMP
#pragma omp parallel default(none) shared(numThreads)
{
if (omp_get_thread_num() == 0 )
{
numThreads = omp_get_num_threads();
}
}
#else
numThreads = 1;
#endif
// s
Sincerely thanks
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.