Open main menu

CDOT Wiki β

Changes

GPU621/Group 5

395 bytes removed, 22:37, 12 April 2023
m
File Directory System:
=== OpenMP ===
{
// OpenMP - Runtime Routines
// omp_hi.cpp // for OpenMP library functions
}
}
}
=== TBB ===
{
// TBB - Hello World
// tbb.cpp
<< TBB_INTERFACE_VERSION << ")" << std::endl; // Print a message showing the version of TBB being used
}
}
=== MPI ===
{
// MPI Program - Hello World
// mpi_hello.c
return 0;
}
}
== Final Note ==
=== General G++ ===
[https://gcc.gnu.org/onlinedocs/gcc-12.2.0/gcc/ https://gcc.gnu.org/onlinedocs/gcc-12.2.0/gcc/]
g++ -o2 helloworld.cpp -o ./helloworld
=== OpenMP: ===
[https://gcc.gnu.org/projects/gomp/#usage https://gcc.gnu.org/projects/gomp/#usage]
g++ -fopenmp -O2 helloworld.cpp -O2 ./helloworld
=== TBB: ===
[https://oneapi-src.github.io/oneTBB/ https://oneapi-src.github.io/oneTBB/]
g++ -O2 -ltbb helloworld.cpp -o ./helloworld
=== MPI: ===
[https://www.open-mpi.org/doc/current/man1/mpic++.1.php https://www.open-mpi.org/doc/current/man1/mpic++.1.php]
mpic++ helloworld.cpp -o ./helloworld
[https://www.open-mpi.org/doc/current/man1/mpirun.1.php https://www.open-mpi.org/doc/current/man1/mpirun.1.php]
mpirun -np number_of_processors ./helloworld argument1 argument 2
mpirun -np 4 ./helloworld
=== File Directory System: ===
| \-> launch.json
| \-> task.json
| \-> c_cpp_properties.json
--> ws1
--> ws2
--> /* Your other folders of assignments and files
}
=== Final tasks.json: ===
{ {
"tasks": [
{
}
]
} }
=== Final launch.json ===
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "C/C++ using OpenMP: g++ build and debug active file",
"type": "cppdbg", // Create for a CPP Debugger
"request": "launch",
"program": "${fileDirname}/${fileBasenameNoExtension}", // The program to be debugged.
"args": [],
"stopAtEntry": false,
"cwd": "${fileDirname}",
"environment": [],
"externalConsole": true, // Run task in External Console
"MIMode": "lldb",
"preLaunchTask": "C/C++ using OpenMP: g++ build active file" // Make sure to set this to our task label
},
{
"configurations": [ { "name": "Custom C/C++using TBB: g++ build and debug active file", "type": "cppdbg",// Create for a CPP Debugger "request": "launch", "program": "${fileDirname}/${fileBasenameNoExtension} ",// The program to be debugged. "args": [], "stopAtEntry": false, "cwd": "${fileDirname}", "environment": [], "externalConsole": falsetrue,// Run task in External Console "MIMode": "lldb", "preLaunchTask": "C/C++using TBB: g++ build active file"// Make sure to set this to our task label }, { "name": "Build and Debug WS2", "type": "cppdbg", "request": "launch", "program": "/Users/ibrahim/Desktop/Winter 2023/GPU621/ws2/ws2", "args": ["100000000"], "stopAtEntry": false, "cwd": "${fileDirname}", "environment": [], "externalConsole": false, "MIMode": "lldb", "preLaunchTask": "C/C++using MPI: gmpic++ build WS2 run active file" }, { "name": "Build and Debug WS5", "type": "cppdbg", "request": "launch", "program": "/Users/ibrahim/Desktop/Winter 2023/GPU621/ws5/w5", "args": ["100000000"], "stopAtEntry": false, "cwd": "${fileDirname}", "environment": [], "externalConsole": false, "MIMode": "lldb", "preLaunchTask": "C/C++: g++ build WS5 file" }, { "Task name": "MPI Debug",we'll use to identify the task "type": "cppdbg", "request": "launch", "program": "/usr/local/bin/mpirun",// MPI files uses mpirun "args": [ "-np",// Flag identifies the that we want to configure the number of processes we want to run "4",// Number of processes "${fileDirname}/${fileBasenameNoExtension}",// Path to active file "1000000" ], "stopAtEntry": false, "cwd": "${workspaceFolder}", "environment": [], "externalConsole": true,// Use an external console "MIMode": "lldb", "setupCommandspreLaunchTask": [], "preLaunchTask"C/C++ using MPI: "mpic++ build mpi" } ], "version": "2.0.0active file"
}
]
}
=== Final c_cpp_properties.json ===
{
}
}
== References ==