Does my network have shared or distributed memory [closed] - parallel-processing

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
Now I have some code that I would like to parallelize. The easiest thing would be to use openmp which will take advantage of the multiple processors and their cores and their shared memory. I have access to a network that I use for number crunching. I don't know if the memory on it is shared or distributed. How can I find this out? If it is shared then I can easily use openmp and it will work. I do less /proc/cpuinfo and I see that I have 8 processors available on the network. and I do less/proc/meminfo and it tells me I have 32000mega bytes of memory.

If you are using OpenMP you are probably writing your software to your machine only, as it is targeted on making the use of parallel programming transparent to the user. You can use OpenMP on a cluster together with MPI or with some OpenMP extension to make the many computers of the network appear to your OpenMP program like a single one.

Related

Are there any computer viruses that affect gpus? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
Recent developments in gpus (the past few generations) allow them to be programmed. Languages like Cuda, openCL, openACC are specific to this hardware. In addition, certain games allow programming shaders which function in the rendering of images in the graphics pipeline. Just as code intended for a cpu can cause unintended execution resulting a vulnerability, I wonder if a game or other code intended for a gpu can result in a vulnerability.
The benefit a hacker would get from targeting the GPU is "free" computing power without having to deal with the energy cost. The only practical scenario here is crypto-miner viruses, see this article for example. I don't know details on how they operate, but the idea is to use the GPU to mine crypto-currencies in the background, since GPUs are much more efficient than CPUs at this. These viruses will cause substential energy consumption if unnoticed.
Regarding an application running on the GPU causing/using a vulnerability, the use-cases here are rather limited since security-relevant data usually is not processed on GPUs.
At most you could deliberately make the graphics driver crash and this way sabotage other programs from being properly executed.
There already are plenty security mechanisms prohibiting reading other processes' VRAM etc., but there always is some way around.

How to write a GPU parallelization program that will run on any GPU? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I have worked with Halide and Cuda. However, a technology like CUDA will only run on NVIDIA GPUs. OpenCL will also run on AMD cards but there is no real all-in-one solution as far as I know.
But software like for example Matlab runs on any OS, independently of which GPU is in there. I believe Matlab uses parallellization techniques to speed up calculations on matrices (or at least I hope so).
So how does one go about writing a piece of software that can use the GPU for parallellizing calculations without writing separate software for each possible type of GPU? Or is this actually the only way to go?
I'm not planning to write such an application any time soon, I just became curious after taking a course on the subject.
You seem to be wrong about matlab supporting any gpu it is uses cuda for nividea gpus
see : https://www.mathworks.com/solutions/gpu-computing.html
and: https://www.mathworks.com/matlabcentral/answers/336084-will-matlab-support-amd-gpu-in-future
To answer your question
It seems like the 2 options are:
OpenCL : https://www.khronos.org/opencl/
DirectCompute/compute-shader : https://learn.microsoft.com/en-us/windows/win32/direct3d11/direct3d-11-advanced-stages-compute-shader
OpenCL is cross platform and DirectCompute is windows only and build on DirectX

Parallel computing: from theory to practice [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
I studied how to optimize algorithms for multiprocessor systems. Now I would understand in main lines how these algorithms can be transformed into code.
I know that exist some libraries MPI based that helps the developement of software portable to different type of systems, but is right the word "portable" that makes me confused: how the program can be authomatically adapted to an arbitrary number of processors at runtime, since this is an option of mpirun? How the software can decide the proper topology (mesh, hypercube, tree, ring, etc)? The programmer can specify the preferred topology through MPI?
you start the application with a fixed number of cores. Thus, you cannot automatically adapted to an arbitrary number of processors at runtime.
You can tune your software to the topology of your cluster. This is really advanced and for sure not portable. It only makes sense if you have a fixed cluster and are striving for the last bit of performance.
Best regards, Georg

How to restricit my cpu affinity to a subset of the cpus available on a given machine? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am working on a machine with 4 sockets with another person that launch performance tests on one precise socket and does not want anybody to iterfer with this socket.
I would like to work transparently on the 3 remaining sockets. How could could I do that, something like prefixing all my commands with numactl... ??
My shell is zsh
Thanks!
I'm assuming this is Linux?
If yes, cpusets are probably what you're looking for. There is also a cpuset userspace package that supposedly makes it easier to use the cpusets mechanism in the kernel.
While I have almost no experience with this, I think you should be able to create a cgroup, move your shell to it, and restrict the cgroup to use only the other CPUs. This restriction would be inherited by all processes started from that shell.

Measuring performances and scalability of mpi programs [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I want to measure scalability and performances of one mpi program I wrote. Till now I used the MPI_Barrier function and the stopwatch library in order to count the time. The thing is that the computation time depends a lot on the current use of my cpu and ram so all the time I get different results. Moreover my program runs on a virtual machine vmware which I need in order to use Unix.
I wanted to ask...how can I have an objective measure of the times? I want to see if my program has a good scalability or not.
In general, the way most people measure time in their MPI programs is to use MPI_WTIME since it's supposed to be a portable way to get the system time. That will give you a decent realtime result.
If you're looking to measure CPU time instead of real time, that's a very different and much more difficult problem. Usually the way most people handle that is to run their benchmarks on an otherwise quiet system.

Resources