From 65ed3a0fb7a6cd5c4abd2d990d1b37883b775cdf Mon Sep 17 00:00:00 2001 From: austinklein <54755755+austinklein@users.noreply.github.com> Date: Sat, 2 Sep 2023 22:13:21 -0700 Subject: [PATCH 01/60] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f72344e..1b9dc84 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -![Sibernetic](http://i.imgur.com/Hbsw6Zs.png) +Workflow![Sibernetic](http://i.imgur.com/Hbsw6Zs.png) Sibernetic is physical simulator of biomechanical matter (membranes, elastic matter, contractile matter) and environments (liquids, solids and elastic matter with variable physical properties) developed for simulations of C. elegans physical body dynamics within the [OpenWorm project](http://www.openworm.org) by Andrey Palyanov, Sergey Khayrulin and Mike Vella (development of a Python module for external muscle activating signals generation and input) as part of the [OpenWorm team](http://www.openworm.org/people.html). At its core, Sibernetic is built as an extension to Predictive-Corrective Incompressible Smoothed Particle Hydrodynamics (PCISPH). It is primarily written in C++ and OpenCL, which makes possible to run simulations on CPUs or GPUs, and has 3D visualization support built on top of OpenGL. From d0f6f9a1939ba1bf02bc2a18bd34f1e701a90019 Mon Sep 17 00:00:00 2001 From: austinklein <54755755+austinklein@users.noreply.github.com> Date: Sat, 2 Sep 2023 22:22:13 -0700 Subject: [PATCH 02/60] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1b9dc84..f72344e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -Workflow![Sibernetic](http://i.imgur.com/Hbsw6Zs.png) +![Sibernetic](http://i.imgur.com/Hbsw6Zs.png) Sibernetic is physical simulator of biomechanical matter (membranes, elastic matter, contractile matter) and environments (liquids, solids and elastic matter with variable physical properties) developed for simulations of C. elegans physical body dynamics within the [OpenWorm project](http://www.openworm.org) by Andrey Palyanov, Sergey Khayrulin and Mike Vella (development of a Python module for external muscle activating signals generation and input) as part of the [OpenWorm team](http://www.openworm.org/people.html). At its core, Sibernetic is built as an extension to Predictive-Corrective Incompressible Smoothed Particle Hydrodynamics (PCISPH). It is primarily written in C++ and OpenCL, which makes possible to run simulations on CPUs or GPUs, and has 3D visualization support built on top of OpenGL. From ddbb5a65cb829e5f0f4dd02e22dcab2359f38f67 Mon Sep 17 00:00:00 2001 From: austinklein <54755755+austinklein@users.noreply.github.com> Date: Sun, 3 Sep 2023 11:30:44 -0700 Subject: [PATCH 03/60] Update ci-build.yml --- .github/workflows/ci-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index d7ffd48..e6814b0 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -14,7 +14,7 @@ jobs: strategy: fail-fast: false matrix: - runs-on: [ ubuntu-latest ] + runs-on: [ ubuntu-20.04 ] steps: - uses: actions/checkout@v2 From 0db6199b1623ad9a99cf89af8c0451a089ac34ab Mon Sep 17 00:00:00 2001 From: Austin Klein Date: Sun, 3 Sep 2023 12:19:19 -0700 Subject: [PATCH 04/60] Add debug print stagements --- src/owHelper.cpp | 2 ++ src/owPhysicsFluidSimulator.cpp | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/owHelper.cpp b/src/owHelper.cpp index bbfde31..f378d03 100644 --- a/src/owHelper.cpp +++ b/src/owHelper.cpp @@ -251,6 +251,7 @@ void owHelper::loadConfiguration(float *position_cpp, float *velocity_cpp, size_t pos; LOADMODE mode = NOMODE; int i = 0; + std::cout << "in load\n"; if (configFile.is_open()) { configFile.seekg(read_position); while (configFile.good()) { @@ -360,6 +361,7 @@ void owHelper::loadConfiguration(float *position_cpp, float *velocity_cpp, throw std::runtime_error("Could not open file configuration file"); configFile.close(); std::cout << "Configuration has been loaded" << std::endl; + std::cout << "in load end of load\n"; } /** Load configuration from simulation to files * diff --git a/src/owPhysicsFluidSimulator.cpp b/src/owPhysicsFluidSimulator.cpp index dbfd741..cee79e0 100644 --- a/src/owPhysicsFluidSimulator.cpp +++ b/src/owPhysicsFluidSimulator.cpp @@ -83,12 +83,13 @@ owPhysicsFluidSimulator::owPhysicsFluidSimulator(owHelper *helper, int argc, density_cpp = new float[1 * config->getParticleCount()]; particleIndex_cpp = new unsigned int[config->getParticleCount() * 2]; + std::cout << "pre load\n"; // LOAD FROM FILE owHelper::loadConfiguration( position_cpp, velocity_cpp, elasticConnectionsData_cpp, membraneData_cpp, particleMembranesList_cpp, config); // Load configuration from file to buffer - + std::cout << "post load\n"; std::cout << "owP1\n"; this->helper = helper; std::cout << "owP1a\n"; From 90ab231fbbecc59c17b022aa143baa4e7f1626f5 Mon Sep 17 00:00:00 2001 From: Austin Klein Date: Sun, 3 Sep 2023 13:01:33 -0700 Subject: [PATCH 05/60] Remove endl --- src/owHelper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/owHelper.cpp b/src/owHelper.cpp index f378d03..05e4247 100644 --- a/src/owHelper.cpp +++ b/src/owHelper.cpp @@ -360,7 +360,7 @@ void owHelper::loadConfiguration(float *position_cpp, float *velocity_cpp, } else throw std::runtime_error("Could not open file configuration file"); configFile.close(); - std::cout << "Configuration has been loaded" << std::endl; + std::cout << "Configuration has been loaded change\n"; std::cout << "in load end of load\n"; } /** Load configuration from simulation to files From 4b420c5bb34dbf2f7ac3d0c1746b6be5661b7c12 Mon Sep 17 00:00:00 2001 From: Austin Klein Date: Sun, 3 Sep 2023 13:12:58 -0700 Subject: [PATCH 06/60] Added endl --- src/owHelper.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/owHelper.cpp b/src/owHelper.cpp index 05e4247..4dfaa21 100644 --- a/src/owHelper.cpp +++ b/src/owHelper.cpp @@ -360,8 +360,8 @@ void owHelper::loadConfiguration(float *position_cpp, float *velocity_cpp, } else throw std::runtime_error("Could not open file configuration file"); configFile.close(); - std::cout << "Configuration has been loaded change\n"; - std::cout << "in load end of load\n"; + std::cout << "Configuration has been loaded new" << std::endl; + std::cout << "in load end new" << std::endl; } /** Load configuration from simulation to files * From c0e867d546d4e7c013d55146de9317cff54f3c39 Mon Sep 17 00:00:00 2001 From: Austin Klein Date: Sun, 3 Sep 2023 13:18:33 -0700 Subject: [PATCH 07/60] Added additional endl --- src/owPhysicsFluidSimulator.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/owPhysicsFluidSimulator.cpp b/src/owPhysicsFluidSimulator.cpp index cee79e0..692b7f9 100644 --- a/src/owPhysicsFluidSimulator.cpp +++ b/src/owPhysicsFluidSimulator.cpp @@ -89,12 +89,12 @@ owPhysicsFluidSimulator::owPhysicsFluidSimulator(owHelper *helper, int argc, position_cpp, velocity_cpp, elasticConnectionsData_cpp, membraneData_cpp, particleMembranesList_cpp, config); // Load configuration from file to buffer - std::cout << "post load\n"; - std::cout << "owP1\n"; + std::cout << "post load" << std::endl; + std::cout << "owP1" << std::endl; this->helper = helper; - std::cout << "owP1a\n"; + std::cout << "owP1a" << std::endl; if (config->numOfElasticP != 0) { - std::cout << "owP1b\n"; + std::cout << "owP1b" << std::endl; ocl_solver = new owOpenCLSolver( position_cpp, velocity_cpp, config, elasticConnectionsData_cpp, membraneData_cpp, From 568a01d3ad303e970875e43e470178cc8ecdada5 Mon Sep 17 00:00:00 2001 From: austinklein <54755755+austinklein@users.noreply.github.com> Date: Sun, 3 Sep 2023 13:37:31 -0700 Subject: [PATCH 08/60] Added step for git to use LF --- .github/workflows/ci-build.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index e6814b0..c74fa69 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -17,6 +17,11 @@ jobs: runs-on: [ ubuntu-20.04 ] steps: + - name: Set git to use LF + run: | + git config --global core.autocrlf false + git config --global core.eol lf + - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} From c6f4dcb00932c08f7f4b2c204e82d039009923f7 Mon Sep 17 00:00:00 2001 From: Austin Klein Date: Sun, 3 Sep 2023 13:52:49 -0700 Subject: [PATCH 09/60] Added all endl --- src/owOpenCLSolver.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/owOpenCLSolver.cpp b/src/owOpenCLSolver.cpp index 08615b8..66e8901 100644 --- a/src/owOpenCLSolver.cpp +++ b/src/owOpenCLSolver.cpp @@ -63,7 +63,7 @@ owOpenCLSolver::owOpenCLSolver(const float *position_cpp, const int *membraneData_cpp, const int *particleMembranesList_cpp) { try { - std::cout << "owC1\n"; + std::cout << "owC1" << std::endl; initializeOpenCL(config); std::cout << "owC10\n"; // Create OpenCL buffers @@ -239,18 +239,18 @@ void owOpenCLSolver::initializeBuffers(const float *position_cpp, * Contain information about simulating configuration */ void owOpenCLSolver::initializeOpenCL(owConfigProperty *config) { - std::cout << "owCi1\n"; + std::cout << "owCi1" << std::endl; cl_int err; std::vector platformList; - std::cout << "owCi1a\n"; + std::cout << "owCi1a" << std::endl; err = cl::Platform::get( &platformList); // TODO make check that returned value isn't error - std::cout << "owCi1b\n"; + std::cout << "owCi1b" << std::endl; if (platformList.size() < 1 || err != CL_SUCCESS) { std::cout << "No OpenCL platforms found, error code: "<< err<< " \n"; throw std::runtime_error("No OpenCL platforms found"); } - std::cout << "owCi2\n"; + std::cout << "owCi2" << std::endl; char cBuffer[1024]; cl_platform_id cl_pl_id[10]; cl_uint n_pl; @@ -267,7 +267,7 @@ void owOpenCLSolver::initializeOpenCL(owConfigProperty *config) { printf(" Error %i in clGetPlatformInfo Call !!!\n\n", ciErrNum); } } - std::cout << "owCi2\n"; + std::cout << "owCi2" << std::endl; // 0-CPU, 1-GPU // depends on the time order of system OpenCL drivers // installation on your local machine // CL_DEVICE_TYPE From 3c86c74c2c824c1c3647b71de1c5ff3e61a6e8d2 Mon Sep 17 00:00:00 2001 From: Austin Klein Date: Sun, 3 Sep 2023 14:00:55 -0700 Subject: [PATCH 10/60] Remove newline --- src/owOpenCLSolver.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/owOpenCLSolver.cpp b/src/owOpenCLSolver.cpp index 66e8901..426406a 100644 --- a/src/owOpenCLSolver.cpp +++ b/src/owOpenCLSolver.cpp @@ -357,8 +357,7 @@ void owOpenCLSolver::initializeOpenCL(owConfigProperty *config) { &cBuffer); // CL_INVALID_VALUE = -30; if (result == CL_SUCCESS) { std::cout << "CL_CONTEXT_PLATFORM [" << plList << "]: CL_DEVICE_NAME [" - << deviceNum << "]:\t" << cBuffer << "\n" - << std::endl; + << deviceNum << "]:\t" << cBuffer << std::endl; } if (strlen(cBuffer) < 1000) { config->setDeviceName(cBuffer); From 9a20c661261381bc303a8b0af85bc5f6b40d3099 Mon Sep 17 00:00:00 2001 From: Austin Klein Date: Sun, 3 Sep 2023 14:08:46 -0700 Subject: [PATCH 11/60] Remove additional newlines --- src/owOpenCLSolver.cpp | 8 ++++---- src/owPhysicsFluidSimulator.cpp | 2 +- src/owWorldSimulation.cpp | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/owOpenCLSolver.cpp b/src/owOpenCLSolver.cpp index 426406a..5a39429 100644 --- a/src/owOpenCLSolver.cpp +++ b/src/owOpenCLSolver.cpp @@ -65,12 +65,12 @@ owOpenCLSolver::owOpenCLSolver(const float *position_cpp, try { std::cout << "owC1" << std::endl; initializeOpenCL(config); - std::cout << "owC10\n"; + std::cout << "owC10" << std::endl; // Create OpenCL buffers initializeBuffers(position_cpp, velocity_cpp, config, elasticConnectionsData_cpp, membraneData_cpp, particleMembranesList_cpp); - std::cout << "owC1a\n"; + std::cout << "owC1a" << std::endl; // Create OpenCL kernels create_ocl_kernel("clearBuffers", clearBuffers); create_ocl_kernel("findNeighbors", findNeighbors); @@ -91,7 +91,7 @@ owOpenCLSolver::owOpenCLSolver(const float *position_cpp, pcisph_computeElasticForces); // membrane handling kernels - std::cout << "owC1b\n"; + std::cout << "owC1b" << std::endl; create_ocl_kernel("clearMembraneBuffers", clearMembraneBuffers); create_ocl_kernel("computeInteractionWithMembranes", computeInteractionWithMembranes); @@ -262,7 +262,7 @@ void owOpenCLSolver::initializeOpenCL(owConfigProperty *config) { ciErrNum = clGetPlatformInfo(cl_pl_id[i], CL_PLATFORM_VERSION, sz = sizeof(cBuffer), cBuffer, nullptr); if (ciErrNum == CL_SUCCESS) { - printf(" CL_PLATFORM_VERSION [%d]: \t%s\n", i, cBuffer); + printf(" CL_PLATFORM_VERSION [%d]: \t%s", i, cBuffer); } else { printf(" Error %i in clGetPlatformInfo Call !!!\n\n", ciErrNum); } diff --git a/src/owPhysicsFluidSimulator.cpp b/src/owPhysicsFluidSimulator.cpp index 692b7f9..4dafd11 100644 --- a/src/owPhysicsFluidSimulator.cpp +++ b/src/owPhysicsFluidSimulator.cpp @@ -115,7 +115,7 @@ owPhysicsFluidSimulator::owPhysicsFluidSimulator(owHelper *helper, int argc, throw; } - std::cout << "owP2\n"; + std::cout << "owP2" << std::endl; } /** Reset simulation * diff --git a/src/owWorldSimulation.cpp b/src/owWorldSimulation.cpp index acb6042..32dcd7a 100644 --- a/src/owWorldSimulation.cpp +++ b/src/owWorldSimulation.cpp @@ -1079,7 +1079,7 @@ int run(int argc, char **argv, const bool with_graphics) { std::cout << "ERROR: " << ex.what() << std::endl; return EXIT_FAILURE; } - std::cout << "S13\n"; + std::cout << "S13" << std::endl; std::signal(SIGINT, sighandler); if (with_graphics) { std::cout << "S1g\n"; @@ -1112,7 +1112,7 @@ int run(int argc, char **argv, const bool with_graphics) { } else { while (1) { try { - std::cout << "S2rr\n"; + std::cout << "S2rr" << std::endl; fluid_simulation->simulationStep(load_to); } catch (std::runtime_error &ex) { cleanupSimulation(); From b0cc491af06b1bd2b1e801b9272ef7e992cbf90b Mon Sep 17 00:00:00 2001 From: Austin Klein Date: Sun, 3 Sep 2023 14:54:38 -0700 Subject: [PATCH 12/60] Add debugging print statements --- src/owOpenCLSolver.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/owOpenCLSolver.cpp b/src/owOpenCLSolver.cpp index 5a39429..ab8bdd1 100644 --- a/src/owOpenCLSolver.cpp +++ b/src/owOpenCLSolver.cpp @@ -287,6 +287,8 @@ void owOpenCLSolver::initializeOpenCL(owConfigProperty *config) { cl_uint device_coumpute_unit_num; cl_uint device_coumpute_unit_num_current = 0; unsigned int deviceNum = 0; + + std::cout << "owA1" << std::endl; // Selection of more appropriate device while (!findDevice) { for (int clSelectedPlatformID = 0; clSelectedPlatformID < (int)n_pl; @@ -343,6 +345,7 @@ void owOpenCLSolver::initializeOpenCL(owConfigProperty *config) { "configuration."); } } + std::cout << "owA2" << std::endl; cl_context_properties cprops[3] = { CL_CONTEXT_PLATFORM, (cl_context_properties)(platformList[plList])(), 0}; context = cl::Context(device_type[config->getDeviceType()], cprops, nullptr, @@ -355,10 +358,12 @@ void owOpenCLSolver::initializeOpenCL(owConfigProperty *config) { size_t compUnintsCount, memoryInfo, workGroupSize; result = devices[deviceNum].getInfo(CL_DEVICE_NAME, &cBuffer); // CL_INVALID_VALUE = -30; + std::cout << "owA3" << std::endl; if (result == CL_SUCCESS) { std::cout << "CL_CONTEXT_PLATFORM [" << plList << "]: CL_DEVICE_NAME [" << deviceNum << "]:\t" << cBuffer << std::endl; } + std::cout << "owA4" << std::endl; if (strlen(cBuffer) < 1000) { config->setDeviceName(cBuffer); } From 822d6309566fb66c323e2a8f4a9191bfd8e81c38 Mon Sep 17 00:00:00 2001 From: Austin Klein Date: Sun, 3 Sep 2023 14:58:35 -0700 Subject: [PATCH 13/60] Add additional debugging print statements --- src/owOpenCLSolver.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/owOpenCLSolver.cpp b/src/owOpenCLSolver.cpp index ab8bdd1..8b11681 100644 --- a/src/owOpenCLSolver.cpp +++ b/src/owOpenCLSolver.cpp @@ -348,14 +348,20 @@ void owOpenCLSolver::initializeOpenCL(owConfigProperty *config) { std::cout << "owA2" << std::endl; cl_context_properties cprops[3] = { CL_CONTEXT_PLATFORM, (cl_context_properties)(platformList[plList])(), 0}; + std::cout << "owA21" << std::endl; context = cl::Context(device_type[config->getDeviceType()], cprops, nullptr, nullptr, &err); + std::cout << "owA22" << std::endl; devices = context.getInfo(); + std::cout << "owA23" << std::endl; if (devices.size() < 1) { + std::cout << "owA24" << std::endl; throw std::runtime_error("No OpenCL devices were found"); } + std::cout << "owA25" << std::endl; // Print some information about chosen platform size_t compUnintsCount, memoryInfo, workGroupSize; + std::cout << "owA26" << std::endl; result = devices[deviceNum].getInfo(CL_DEVICE_NAME, &cBuffer); // CL_INVALID_VALUE = -30; std::cout << "owA3" << std::endl; From fbd0687ac54d5fcddbf80018ce98dbcad46838c4 Mon Sep 17 00:00:00 2001 From: austinklein <54755755+austinklein@users.noreply.github.com> Date: Sun, 24 Sep 2023 12:20:37 -0700 Subject: [PATCH 14/60] Update workflows to ubuntu-latest --- .github/workflows/ci-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index c74fa69..12adf6e 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -14,7 +14,7 @@ jobs: strategy: fail-fast: false matrix: - runs-on: [ ubuntu-20.04 ] + runs-on: [ ubuntu-latest ] steps: - name: Set git to use LF From 35e1c3b299c73994c32a9667e1f621fe48576c40 Mon Sep 17 00:00:00 2001 From: Austin Klein Date: Sun, 24 Sep 2023 12:34:03 -0700 Subject: [PATCH 15/60] Install pocl-opencl-icd --- .github/workflows/ci-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 12adf6e..cad763b 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -48,7 +48,7 @@ jobs: sudo rm -r intel-opencl-tmp sudo cp -R /opt/intel/opencl/include/CL /usr/include/ - sudo apt install -y ocl-icd-opencl-dev vim + sudo apt install -y ocl-icd-opencl-dev vim pocl-opencl-icd - name: Build Sibernetic run: | From bee4aa1e4d05823e1441a29ae5c506560dbbe0f9 Mon Sep 17 00:00:00 2001 From: Austin Klein Date: Sun, 24 Sep 2023 12:46:51 -0700 Subject: [PATCH 16/60] Determine github actions cpu info --- .github/workflows/ci-build.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index cad763b..c349f1d 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -33,7 +33,11 @@ jobs: run: | # Based on: https://github.com/openworm/OpenWorm/blob/master/Dockerfile - + lscpu + cat /proc/cpuinfo + arch + uname --processor + uname --machine mkdir intel-opencl-tmp cd intel-opencl-tmp mkdir intel-opencl From a4f02c97ce837f2e1a43efd789b92293c32fad45 Mon Sep 17 00:00:00 2001 From: Austin Klein Date: Wed, 27 Sep 2023 07:39:00 -0700 Subject: [PATCH 17/60] Additional debug print statements --- .github/workflows/ci-build.yml | 3 ++- src/owOpenCLSolver.cpp | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index c349f1d..da1dacd 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -52,7 +52,8 @@ jobs: sudo rm -r intel-opencl-tmp sudo cp -R /opt/intel/opencl/include/CL /usr/include/ - sudo apt install -y ocl-icd-opencl-dev vim pocl-opencl-icd + sudo apt install -y ocl-icd-opencl-dev vim + # sudo apt install -y pocl-opencl-icd - name: Build Sibernetic run: | diff --git a/src/owOpenCLSolver.cpp b/src/owOpenCLSolver.cpp index 8b11681..311a7c4 100644 --- a/src/owOpenCLSolver.cpp +++ b/src/owOpenCLSolver.cpp @@ -291,34 +291,41 @@ void owOpenCLSolver::initializeOpenCL(owConfigProperty *config) { std::cout << "owA1" << std::endl; // Selection of more appropriate device while (!findDevice) { + std::cout << "owFD1" << std::endl; for (int clSelectedPlatformID = 0; clSelectedPlatformID < (int)n_pl; clSelectedPlatformID++) { // if(findDevice) // break; + std::cout << "owFD2" << std::endl; clGetDeviceIDs(cl_pl_id[clSelectedPlatformID], device_type[config->getDeviceType()], 0, nullptr, &ciDeviceCount); if ((devices_t = static_cast( malloc(sizeof(cl_device_id) * ciDeviceCount))) == nullptr) + std::cout << "owFD3" << std::endl; bPassed = false; if (bPassed) { result = clGetDeviceIDs(cl_pl_id[clSelectedPlatformID], device_type[config->getDeviceType()], ciDeviceCount, devices_t, &ciDeviceCount); + std::cout << "owFD4" << std::endl; if (result == CL_SUCCESS) { for (cl_uint i = 0; i < ciDeviceCount; ++i) { clGetDeviceInfo(devices_t[i], CL_DEVICE_TYPE, sizeof(type), &type, nullptr); + std::cout << "owFD5" << std::endl; if (type & device_type[config->getDeviceType()]) { clGetDeviceInfo(devices_t[i], CL_DEVICE_MAX_COMPUTE_UNITS, sizeof(device_coumpute_unit_num), &device_coumpute_unit_num, nullptr); + std::cout << "owFD6" << std::endl; if (device_coumpute_unit_num_current <= device_coumpute_unit_num) { plList = clSelectedPlatformID; device_coumpute_unit_num_current = device_coumpute_unit_num; findDevice = true; deviceNum = i; + std::cout << "owFD7" << std::endl; } // break; } @@ -337,9 +344,12 @@ void owOpenCLSolver::initializeOpenCL(owConfigProperty *config) { std::cout << "Unfortunately OpenCL couldn't find device " << deviceTypeName << std::endl; std::cout << "OpenCL try to init existing device " << std::endl; + std::cout << "owFD8" << std::endl; if (config->getDeviceType() != ALL) + std::cout << "owFD9" << std::endl; config->setDeviceType(ALL); else + std::cout << "owFD10" << std::endl; throw std::runtime_error("Sibernetic can't find any OpenCL devices. " "Please check you're environment " "configuration."); From a1f5f98fa4959aa76ca5bc6562d2cd67eb9d9604 Mon Sep 17 00:00:00 2001 From: Austin Klein Date: Wed, 27 Sep 2023 07:50:06 -0700 Subject: [PATCH 18/60] Fixed brackets --- src/owOpenCLSolver.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/owOpenCLSolver.cpp b/src/owOpenCLSolver.cpp index 311a7c4..60f2ba1 100644 --- a/src/owOpenCLSolver.cpp +++ b/src/owOpenCLSolver.cpp @@ -301,9 +301,10 @@ void owOpenCLSolver::initializeOpenCL(owConfigProperty *config) { device_type[config->getDeviceType()], 0, nullptr, &ciDeviceCount); if ((devices_t = static_cast( - malloc(sizeof(cl_device_id) * ciDeviceCount))) == nullptr) + malloc(sizeof(cl_device_id) * ciDeviceCount))) == nullptr) { std::cout << "owFD3" << std::endl; bPassed = false; + } if (bPassed) { result = clGetDeviceIDs(cl_pl_id[clSelectedPlatformID], device_type[config->getDeviceType()], @@ -345,14 +346,15 @@ void owOpenCLSolver::initializeOpenCL(owConfigProperty *config) { << deviceTypeName << std::endl; std::cout << "OpenCL try to init existing device " << std::endl; std::cout << "owFD8" << std::endl; - if (config->getDeviceType() != ALL) + if (config->getDeviceType() != ALL) { std::cout << "owFD9" << std::endl; config->setDeviceType(ALL); - else + } else { std::cout << "owFD10" << std::endl; throw std::runtime_error("Sibernetic can't find any OpenCL devices. " "Please check you're environment " "configuration."); + } } } std::cout << "owA2" << std::endl; From d9e68f953c792443563bda964318fe0efbd8c605 Mon Sep 17 00:00:00 2001 From: Austin Klein Date: Wed, 27 Sep 2023 19:35:52 -0700 Subject: [PATCH 19/60] Attempt using Intel OneAPI --- .github/workflows/ci-build.yml | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index da1dacd..c52feb3 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -38,21 +38,22 @@ jobs: arch uname --processor uname --machine - mkdir intel-opencl-tmp - cd intel-opencl-tmp - mkdir intel-opencl - wget https://github.com/openworm/OpenWorm/raw/dev_inte/SRB5.0_linux64.zip - unzip SRB5.0_linux64.zip - tar -C intel-opencl -Jxf intel-opencl-r5.0-63503.x86_64.tar.xz - tar -C intel-opencl -Jxf intel-opencl-devel-r5.0-63503.x86_64.tar.xz - tar -C intel-opencl -Jxf intel-opencl-cpu-r5.0-63503.x86_64.tar.xz - sudo cp -R intel-opencl/* / - sudo ldconfig - cd .. - sudo rm -r intel-opencl-tmp + # mkdir intel-opencl-tmp + # cd intel-opencl-tmp + # mkdir intel-opencl + # wget https://github.com/openworm/OpenWorm/raw/dev_inte/SRB5.0_linux64.zip + # unzip SRB5.0_linux64.zip + # tar -C intel-opencl -Jxf intel-opencl-r5.0-63503.x86_64.tar.xz + # tar -C intel-opencl -Jxf intel-opencl-devel-r5.0-63503.x86_64.tar.xz + # tar -C intel-opencl -Jxf intel-opencl-cpu-r5.0-63503.x86_64.tar.xz + # sudo cp -R intel-opencl/* / + # sudo ldconfig + # cd .. + # sudo rm -r intel-opencl-tmp - sudo cp -R /opt/intel/opencl/include/CL /usr/include/ - sudo apt install -y ocl-icd-opencl-dev vim + # sudo cp -R /opt/intel/opencl/include/CL /usr/include/ + # sudo apt install -y ocl-icd-opencl-dev vim + sudo apt install -y intel-oneapi-runtime-opencl # sudo apt install -y pocl-opencl-icd - name: Build Sibernetic From 980b492413592c57c50ed221e52cce7673403592 Mon Sep 17 00:00:00 2001 From: Austin Klein Date: Wed, 27 Sep 2023 19:37:27 -0700 Subject: [PATCH 20/60] Attempt using Intel OneAPI with apt-get --- .github/workflows/ci-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index c52feb3..3569162 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -53,7 +53,7 @@ jobs: # sudo cp -R /opt/intel/opencl/include/CL /usr/include/ # sudo apt install -y ocl-icd-opencl-dev vim - sudo apt install -y intel-oneapi-runtime-opencl + sudo apt-get install -y intel-oneapi-runtime-opencl # sudo apt install -y pocl-opencl-icd - name: Build Sibernetic From 7a6e1bd9594341d271341013ad19020449fbd062 Mon Sep 17 00:00:00 2001 From: Austin Klein Date: Wed, 27 Sep 2023 19:42:56 -0700 Subject: [PATCH 21/60] Add Intel OneAPI repositories --- .github/workflows/ci-build.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 3569162..2a2f055 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -53,6 +53,14 @@ jobs: # sudo cp -R /opt/intel/opencl/include/CL /usr/include/ # sudo apt install -y ocl-icd-opencl-dev vim + + + # download the key to system keyring + wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null + + # add signed entry to apt sources and configure the APT client to use Intel repository: + echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list + sudo apt-get update sudo apt-get install -y intel-oneapi-runtime-opencl # sudo apt install -y pocl-opencl-icd From b86efde4728488c45793d18eaa8cdda10590414a Mon Sep 17 00:00:00 2001 From: Austin Klein Date: Wed, 27 Sep 2023 19:46:32 -0700 Subject: [PATCH 22/60] Add missing pipe --- .github/workflows/ci-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 2a2f055..d8af619 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -56,7 +56,7 @@ jobs: # download the key to system keyring - wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null + wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null # add signed entry to apt sources and configure the APT client to use Intel repository: echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list From 617c5a0341647af55acca0b4269b06659d27a6fc Mon Sep 17 00:00:00 2001 From: Austin Klein Date: Wed, 27 Sep 2023 20:06:19 -0700 Subject: [PATCH 23/60] Add missing pipe --- .github/workflows/ci-build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index d8af619..e7b93c2 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -61,6 +61,7 @@ jobs: # add signed entry to apt sources and configure the APT client to use Intel repository: echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list sudo apt-get update + sudo apt-get install -y intel-basekit sudo apt-get install -y intel-oneapi-runtime-opencl # sudo apt install -y pocl-opencl-icd From c1beb849a432c4a525b238e463d4d8d8d98df225 Mon Sep 17 00:00:00 2001 From: Austin Klein Date: Wed, 27 Sep 2023 20:28:46 -0700 Subject: [PATCH 24/60] List directories of OpenCL --- .github/workflows/ci-build.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index e7b93c2..e9a8407 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -64,6 +64,9 @@ jobs: sudo apt-get install -y intel-basekit sudo apt-get install -y intel-oneapi-runtime-opencl # sudo apt install -y pocl-opencl-icd + ls /usr/include + dpkg -L intel-basekit + dpkg -L intel-oneapi-runtime-opencl - name: Build Sibernetic run: | From 2f20eb3bb225fd4327c9943b57fdd6144b359fd0 Mon Sep 17 00:00:00 2001 From: Austin Klein Date: Wed, 27 Sep 2023 20:46:59 -0700 Subject: [PATCH 25/60] List directories of OpenCL --- .github/workflows/ci-build.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index e9a8407..162c992 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -64,9 +64,13 @@ jobs: sudo apt-get install -y intel-basekit sudo apt-get install -y intel-oneapi-runtime-opencl # sudo apt install -y pocl-opencl-icd - ls /usr/include - dpkg -L intel-basekit - dpkg -L intel-oneapi-runtime-opencl + # ls /usr/include + # dpkg -L intel-basekit + # dpkg -L intel-oneapi-runtime-opencl + echo "ls /opt/intel" + ls /opt/intel + echo "ls /opt/intel/oneapi" + ls /opt/intel/oneap - name: Build Sibernetic run: | From b7c23af2a2cb684e1f54036df25b6a9cac613f01 Mon Sep 17 00:00:00 2001 From: Austin Klein Date: Wed, 27 Sep 2023 21:06:29 -0700 Subject: [PATCH 26/60] List directories of OpenCL --- .github/workflows/ci-build.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 162c992..9d9bc59 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -69,8 +69,10 @@ jobs: # dpkg -L intel-oneapi-runtime-opencl echo "ls /opt/intel" ls /opt/intel + echo "ls /opt/intel/opencl" + ls /opt/intel/opencl echo "ls /opt/intel/oneapi" - ls /opt/intel/oneap + ls /opt/intel/oneapi - name: Build Sibernetic run: | From f0d719f4843cd08b9ca187582e3b07d9f2f46d3d Mon Sep 17 00:00:00 2001 From: Austin Klein Date: Wed, 27 Sep 2023 22:32:21 -0700 Subject: [PATCH 27/60] Added Xeon OpenCL runtime with previous install --- .github/workflows/ci-build.yml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 9d9bc59..5317ca9 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -38,21 +38,21 @@ jobs: arch uname --processor uname --machine - # mkdir intel-opencl-tmp - # cd intel-opencl-tmp - # mkdir intel-opencl - # wget https://github.com/openworm/OpenWorm/raw/dev_inte/SRB5.0_linux64.zip - # unzip SRB5.0_linux64.zip - # tar -C intel-opencl -Jxf intel-opencl-r5.0-63503.x86_64.tar.xz - # tar -C intel-opencl -Jxf intel-opencl-devel-r5.0-63503.x86_64.tar.xz - # tar -C intel-opencl -Jxf intel-opencl-cpu-r5.0-63503.x86_64.tar.xz - # sudo cp -R intel-opencl/* / - # sudo ldconfig - # cd .. - # sudo rm -r intel-opencl-tmp - - # sudo cp -R /opt/intel/opencl/include/CL /usr/include/ - # sudo apt install -y ocl-icd-opencl-dev vim + mkdir intel-opencl-tmp + cd intel-opencl-tmp + mkdir intel-opencl + wget https://github.com/openworm/OpenWorm/raw/dev_inte/SRB5.0_linux64.zip + unzip SRB5.0_linux64.zip + tar -C intel-opencl -Jxf intel-opencl-r5.0-63503.x86_64.tar.xz + tar -C intel-opencl -Jxf intel-opencl-devel-r5.0-63503.x86_64.tar.xz + tar -C intel-opencl -Jxf intel-opencl-cpu-r5.0-63503.x86_64.tar.xz + sudo cp -R intel-opencl/* / + sudo ldconfig + cd .. + sudo rm -r intel-opencl-tmp + + sudo cp -R /opt/intel/opencl/include/CL /usr/include/ + sudo apt install -y ocl-icd-opencl-dev vim # download the key to system keyring From 4c7668350a1d9fb36b4c18352f778643dc986675 Mon Sep 17 00:00:00 2001 From: Austin Klein Date: Thu, 28 Sep 2023 17:13:59 -0700 Subject: [PATCH 28/60] Rebase --- .github/workflows/ci-build.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 5317ca9..3897b13 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -63,6 +63,10 @@ jobs: sudo apt-get update sudo apt-get install -y intel-basekit sudo apt-get install -y intel-oneapi-runtime-opencl + + wget https://master.dl.sourceforge.net/project/nicehashsgminerv5viptools/APP%20SDK%20A%20Complete%20Development%20Platform/AMD%20APP%20SDK%203.0%20for%2064-bit%20Linux/AMD-APP-SDKInstaller-v3.0.130.136-GA-linux64.tar.bz2?viasf=1 + tar -xf AMD-APP-SDKInstaller-v3.0.130.136-GA-linux64.tar.bz2 + ./AMD-APP-SDK-v3.0.130.136-GA-linux64.sh # sudo apt install -y pocl-opencl-icd # ls /usr/include # dpkg -L intel-basekit From e02eb67a79786bcd123493ddac3af04c6b843353 Mon Sep 17 00:00:00 2001 From: Austin Klein Date: Thu, 28 Sep 2023 17:25:16 -0700 Subject: [PATCH 29/60] Remove Intel OneAPI and BaseKit --- .github/workflows/ci-build.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 3897b13..515d376 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -55,15 +55,15 @@ jobs: sudo apt install -y ocl-icd-opencl-dev vim - # download the key to system keyring - wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null - - # add signed entry to apt sources and configure the APT client to use Intel repository: - echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list - sudo apt-get update - sudo apt-get install -y intel-basekit - sudo apt-get install -y intel-oneapi-runtime-opencl - + # # download the key to system keyring + # wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null + + # # add signed entry to apt sources and configure the APT client to use Intel repository: + # echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list + # sudo apt-get update + # sudo apt-get install -y intel-basekit + # sudo apt-get install -y intel-oneapi-runtime-opencl + wget https://master.dl.sourceforge.net/project/nicehashsgminerv5viptools/APP%20SDK%20A%20Complete%20Development%20Platform/AMD%20APP%20SDK%203.0%20for%2064-bit%20Linux/AMD-APP-SDKInstaller-v3.0.130.136-GA-linux64.tar.bz2?viasf=1 tar -xf AMD-APP-SDKInstaller-v3.0.130.136-GA-linux64.tar.bz2 ./AMD-APP-SDK-v3.0.130.136-GA-linux64.sh From a4ee67727b292153b947f4fe22b827277e0d6c59 Mon Sep 17 00:00:00 2001 From: Austin Klein Date: Thu, 28 Sep 2023 17:31:51 -0700 Subject: [PATCH 30/60] Fix AMD APP SDK url --- .github/workflows/ci-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 515d376..cc8b415 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -64,7 +64,7 @@ jobs: # sudo apt-get install -y intel-basekit # sudo apt-get install -y intel-oneapi-runtime-opencl - wget https://master.dl.sourceforge.net/project/nicehashsgminerv5viptools/APP%20SDK%20A%20Complete%20Development%20Platform/AMD%20APP%20SDK%203.0%20for%2064-bit%20Linux/AMD-APP-SDKInstaller-v3.0.130.136-GA-linux64.tar.bz2?viasf=1 + wget https://master.dl.sourceforge.net/project/nicehashsgminerv5viptools/APP%20SDK%20A%20Complete%20Development%20Platform/AMD%20APP%20SDK%203.0%20for%2064-bit%20Linux/AMD-APP-SDKInstaller-v3.0.130.136-GA-linux64.tar.bz2 tar -xf AMD-APP-SDKInstaller-v3.0.130.136-GA-linux64.tar.bz2 ./AMD-APP-SDK-v3.0.130.136-GA-linux64.sh # sudo apt install -y pocl-opencl-icd From 9ac763badcae33a5a7164424656865dcccc8346a Mon Sep 17 00:00:00 2001 From: Austin Klein Date: Thu, 28 Sep 2023 19:49:11 -0700 Subject: [PATCH 31/60] Answer yes to AMD APP SDK --- .github/workflows/ci-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index cc8b415..0dc4692 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -66,7 +66,7 @@ jobs: wget https://master.dl.sourceforge.net/project/nicehashsgminerv5viptools/APP%20SDK%20A%20Complete%20Development%20Platform/AMD%20APP%20SDK%203.0%20for%2064-bit%20Linux/AMD-APP-SDKInstaller-v3.0.130.136-GA-linux64.tar.bz2 tar -xf AMD-APP-SDKInstaller-v3.0.130.136-GA-linux64.tar.bz2 - ./AMD-APP-SDK-v3.0.130.136-GA-linux64.sh + echo 'Y' | ./AMD-APP-SDK-v3.0.130.136-GA-linux64.sh # sudo apt install -y pocl-opencl-icd # ls /usr/include # dpkg -L intel-basekit From 79b6caa9cfa2180221fbbc6ca3261f51cb37b507 Mon Sep 17 00:00:00 2001 From: Austin Klein Date: Thu, 28 Sep 2023 19:53:40 -0700 Subject: [PATCH 32/60] Answer Y to AMD APP SDK --- .github/workflows/ci-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 0dc4692..5691f8e 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -66,7 +66,7 @@ jobs: wget https://master.dl.sourceforge.net/project/nicehashsgminerv5viptools/APP%20SDK%20A%20Complete%20Development%20Platform/AMD%20APP%20SDK%203.0%20for%2064-bit%20Linux/AMD-APP-SDKInstaller-v3.0.130.136-GA-linux64.tar.bz2 tar -xf AMD-APP-SDKInstaller-v3.0.130.136-GA-linux64.tar.bz2 - echo 'Y' | ./AMD-APP-SDK-v3.0.130.136-GA-linux64.sh + yes Y | ./AMD-APP-SDK-v3.0.130.136-GA-linux64.sh # sudo apt install -y pocl-opencl-icd # ls /usr/include # dpkg -L intel-basekit From 84ea09b8a88f1ef4c440268b201977ddd57fffaa Mon Sep 17 00:00:00 2001 From: Austin Klein Date: Thu, 28 Sep 2023 20:00:39 -0700 Subject: [PATCH 33/60] Pipe to null --- .github/workflows/ci-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 5691f8e..8dcc3d3 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -66,7 +66,7 @@ jobs: wget https://master.dl.sourceforge.net/project/nicehashsgminerv5viptools/APP%20SDK%20A%20Complete%20Development%20Platform/AMD%20APP%20SDK%203.0%20for%2064-bit%20Linux/AMD-APP-SDKInstaller-v3.0.130.136-GA-linux64.tar.bz2 tar -xf AMD-APP-SDKInstaller-v3.0.130.136-GA-linux64.tar.bz2 - yes Y | ./AMD-APP-SDK-v3.0.130.136-GA-linux64.sh + yes Y 2>/dev/null | ./AMD-APP-SDK-v3.0.130.136-GA-linux64.sh # sudo apt install -y pocl-opencl-icd # ls /usr/include # dpkg -L intel-basekit From f8463e62e8bdefad2645c1de90e2aaa90f66d2c4 Mon Sep 17 00:00:00 2001 From: Austin Klein Date: Thu, 28 Sep 2023 20:06:02 -0700 Subject: [PATCH 34/60] Sudo --- .github/workflows/ci-build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 8dcc3d3..87cef3c 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -66,7 +66,8 @@ jobs: wget https://master.dl.sourceforge.net/project/nicehashsgminerv5viptools/APP%20SDK%20A%20Complete%20Development%20Platform/AMD%20APP%20SDK%203.0%20for%2064-bit%20Linux/AMD-APP-SDKInstaller-v3.0.130.136-GA-linux64.tar.bz2 tar -xf AMD-APP-SDKInstaller-v3.0.130.136-GA-linux64.tar.bz2 - yes Y 2>/dev/null | ./AMD-APP-SDK-v3.0.130.136-GA-linux64.sh + # yes Y 2>/dev/null | sudo ./AMD-APP-SDK-v3.0.130.136-GA-linux64.sh + sudo ./AMD-APP-SDK-v3.0.130.136-GA-linux64.sh # sudo apt install -y pocl-opencl-icd # ls /usr/include # dpkg -L intel-basekit From f89af37084b1ede4b391b3db12ce030ad8c48ab0 Mon Sep 17 00:00:00 2001 From: Austin Klein Date: Thu, 28 Sep 2023 20:11:48 -0700 Subject: [PATCH 35/60] Sudo and dev null --- .github/workflows/ci-build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 87cef3c..a666f1a 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -66,8 +66,8 @@ jobs: wget https://master.dl.sourceforge.net/project/nicehashsgminerv5viptools/APP%20SDK%20A%20Complete%20Development%20Platform/AMD%20APP%20SDK%203.0%20for%2064-bit%20Linux/AMD-APP-SDKInstaller-v3.0.130.136-GA-linux64.tar.bz2 tar -xf AMD-APP-SDKInstaller-v3.0.130.136-GA-linux64.tar.bz2 - # yes Y 2>/dev/null | sudo ./AMD-APP-SDK-v3.0.130.136-GA-linux64.sh - sudo ./AMD-APP-SDK-v3.0.130.136-GA-linux64.sh + yes Y 2>/dev/null | sudo ./AMD-APP-SDK-v3.0.130.136-GA-linux64.sh + # sudo ./AMD-APP-SDK-v3.0.130.136-GA-linux64.sh # sudo apt install -y pocl-opencl-icd # ls /usr/include # dpkg -L intel-basekit From c531db7102bc6669d06ca2e5f363b98572936926 Mon Sep 17 00:00:00 2001 From: Austin Klein Date: Thu, 28 Sep 2023 20:18:33 -0700 Subject: [PATCH 36/60] Newlines --- .github/workflows/ci-build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index a666f1a..4eb2be6 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -66,7 +66,8 @@ jobs: wget https://master.dl.sourceforge.net/project/nicehashsgminerv5viptools/APP%20SDK%20A%20Complete%20Development%20Platform/AMD%20APP%20SDK%203.0%20for%2064-bit%20Linux/AMD-APP-SDKInstaller-v3.0.130.136-GA-linux64.tar.bz2 tar -xf AMD-APP-SDKInstaller-v3.0.130.136-GA-linux64.tar.bz2 - yes Y 2>/dev/null | sudo ./AMD-APP-SDK-v3.0.130.136-GA-linux64.sh + # yes Y 2>/dev/null | sudo ./AMD-APP-SDK-v3.0.130.136-GA-linux64.sh + printf 'Y\n\n' | sudo ./AMD-APP-SDK-v3.0.130.136-GA-linux64.sh # sudo ./AMD-APP-SDK-v3.0.130.136-GA-linux64.sh # sudo apt install -y pocl-opencl-icd # ls /usr/include From 4ee2118d5b47df554ec50cdd6051afa171454f91 Mon Sep 17 00:00:00 2001 From: Austin Klein Date: Thu, 28 Sep 2023 20:23:15 -0700 Subject: [PATCH 37/60] Remove directory listings --- .github/workflows/ci-build.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 4eb2be6..d996ce0 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -73,12 +73,12 @@ jobs: # ls /usr/include # dpkg -L intel-basekit # dpkg -L intel-oneapi-runtime-opencl - echo "ls /opt/intel" - ls /opt/intel - echo "ls /opt/intel/opencl" - ls /opt/intel/opencl - echo "ls /opt/intel/oneapi" - ls /opt/intel/oneapi + # echo "ls /opt/intel" + # ls /opt/intel + # echo "ls /opt/intel/opencl" + # ls /opt/intel/opencl + # echo "ls /opt/intel/oneapi" + # ls /opt/intel/oneapi - name: Build Sibernetic run: | From 56e9d2d036d767649c914d6299d01f263b4ddf19 Mon Sep 17 00:00:00 2001 From: Austin Klein Date: Thu, 28 Sep 2023 20:31:44 -0700 Subject: [PATCH 38/60] Remove Intel OpenCL --- .github/workflows/ci-build.yml | 40 +++++++++++++++++----------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index d996ce0..c85ea19 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -33,26 +33,26 @@ jobs: run: | # Based on: https://github.com/openworm/OpenWorm/blob/master/Dockerfile - lscpu - cat /proc/cpuinfo - arch - uname --processor - uname --machine - mkdir intel-opencl-tmp - cd intel-opencl-tmp - mkdir intel-opencl - wget https://github.com/openworm/OpenWorm/raw/dev_inte/SRB5.0_linux64.zip - unzip SRB5.0_linux64.zip - tar -C intel-opencl -Jxf intel-opencl-r5.0-63503.x86_64.tar.xz - tar -C intel-opencl -Jxf intel-opencl-devel-r5.0-63503.x86_64.tar.xz - tar -C intel-opencl -Jxf intel-opencl-cpu-r5.0-63503.x86_64.tar.xz - sudo cp -R intel-opencl/* / - sudo ldconfig - cd .. - sudo rm -r intel-opencl-tmp - - sudo cp -R /opt/intel/opencl/include/CL /usr/include/ - sudo apt install -y ocl-icd-opencl-dev vim + # lscpu + # cat /proc/cpuinfo + # arch + # uname --processor + # uname --machine + # mkdir intel-opencl-tmp + # cd intel-opencl-tmp + # mkdir intel-opencl + # wget https://github.com/openworm/OpenWorm/raw/dev_inte/SRB5.0_linux64.zip + # unzip SRB5.0_linux64.zip + # tar -C intel-opencl -Jxf intel-opencl-r5.0-63503.x86_64.tar.xz + # tar -C intel-opencl -Jxf intel-opencl-devel-r5.0-63503.x86_64.tar.xz + # tar -C intel-opencl -Jxf intel-opencl-cpu-r5.0-63503.x86_64.tar.xz + # sudo cp -R intel-opencl/* / + # sudo ldconfig + # cd .. + # sudo rm -r intel-opencl-tmp + + # sudo cp -R /opt/intel/opencl/include/CL /usr/include/ + # sudo apt install -y ocl-icd-opencl-dev vim # # download the key to system keyring From e92bc77dd9f1fb82a34b9b57c9fe3c049bc93f0b Mon Sep 17 00:00:00 2001 From: Austin Klein Date: Sun, 8 Oct 2023 19:08:56 -0700 Subject: [PATCH 39/60] clinfo and list directories --- .github/workflows/ci-build.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index c85ea19..4dff9df 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -68,6 +68,13 @@ jobs: tar -xf AMD-APP-SDKInstaller-v3.0.130.136-GA-linux64.tar.bz2 # yes Y 2>/dev/null | sudo ./AMD-APP-SDK-v3.0.130.136-GA-linux64.sh printf 'Y\n\n' | sudo ./AMD-APP-SDK-v3.0.130.136-GA-linux64.sh + echo "CLINFO:" + clinfo + echo "ls /usr:" + ls /usr + echo "ls /opt:" + ls /opt + # sudo ./AMD-APP-SDK-v3.0.130.136-GA-linux64.sh # sudo apt install -y pocl-opencl-icd # ls /usr/include From c7b45d426110997ae0f9cc291aede6d2dc40cc26 Mon Sep 17 00:00:00 2001 From: Austin Klein Date: Sun, 8 Oct 2023 19:14:10 -0700 Subject: [PATCH 40/60] Change order of clinfo --- .github/workflows/ci-build.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 4dff9df..9361957 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -68,12 +68,13 @@ jobs: tar -xf AMD-APP-SDKInstaller-v3.0.130.136-GA-linux64.tar.bz2 # yes Y 2>/dev/null | sudo ./AMD-APP-SDK-v3.0.130.136-GA-linux64.sh printf 'Y\n\n' | sudo ./AMD-APP-SDK-v3.0.130.136-GA-linux64.sh - echo "CLINFO:" - clinfo + echo "ls /usr:" ls /usr echo "ls /opt:" ls /opt + echo "CLINFO:" + clinfo # sudo ./AMD-APP-SDK-v3.0.130.136-GA-linux64.sh # sudo apt install -y pocl-opencl-icd From b7b182bce0d6317ca4f39a52321ba283a940cf3f Mon Sep 17 00:00:00 2001 From: Austin Klein Date: Sun, 8 Oct 2023 19:17:50 -0700 Subject: [PATCH 41/60] Deeper directory listing --- .github/workflows/ci-build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 9361957..92afeff 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -69,10 +69,10 @@ jobs: # yes Y 2>/dev/null | sudo ./AMD-APP-SDK-v3.0.130.136-GA-linux64.sh printf 'Y\n\n' | sudo ./AMD-APP-SDK-v3.0.130.136-GA-linux64.sh - echo "ls /usr:" - ls /usr - echo "ls /opt:" - ls /opt + echo "ls /usr/lib:" + ls /usr/lib + echo "ls /opt/AMDAPPSDK-3.0:" + ls /opt/AMDAPPSDK-3.0 echo "CLINFO:" clinfo From fae6b290c32a68165439d3e77e84cd920bf1d8da Mon Sep 17 00:00:00 2001 From: Austin Klein Date: Sun, 8 Oct 2023 19:26:33 -0700 Subject: [PATCH 42/60] Additional lists --- .github/workflows/ci-build.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 92afeff..fb039c7 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -71,8 +71,23 @@ jobs: echo "ls /usr/lib:" ls /usr/lib + + echo "ls /usr/lib/x86_64-linux-gnu:" + ls /usr/lib/x86_64-linux-gnu + + echo "ls /opt/AMDAPPSDK-3.0:" ls /opt/AMDAPPSDK-3.0 + + echo "ls /opt/AMDAPPSDK-3.0/lib:" + ls /opt/AMDAPPSDK-3.0/lib + + echo "ls /opt/AMDAPPSDK-3.0/bin:" + ls /opt/AMDAPPSDK-3.0/bin + + echo "ls /opt/AMDAPPSDK-3.0/include:" + ls /opt/AMDAPPSDK-3.0/include + echo "CLINFO:" clinfo From 708610c39c2ee38baa28d6a6ea6870fc56c9b318 Mon Sep 17 00:00:00 2001 From: Austin Klein Date: Sun, 8 Oct 2023 19:32:26 -0700 Subject: [PATCH 43/60] List AMDAPPSDK x86_64 --- .github/workflows/ci-build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index fb039c7..54164b2 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -79,8 +79,8 @@ jobs: echo "ls /opt/AMDAPPSDK-3.0:" ls /opt/AMDAPPSDK-3.0 - echo "ls /opt/AMDAPPSDK-3.0/lib:" - ls /opt/AMDAPPSDK-3.0/lib + echo "ls /opt/AMDAPPSDK-3.0/lib/x86_64:" + ls /opt/AMDAPPSDK-3.0/lib/x86_64 echo "ls /opt/AMDAPPSDK-3.0/bin:" ls /opt/AMDAPPSDK-3.0/bin From 58ecd276dcc13fc340f3dca97ac42fc709b42cc4 Mon Sep 17 00:00:00 2001 From: Austin Klein Date: Sun, 8 Oct 2023 19:37:02 -0700 Subject: [PATCH 44/60] Symlink to libOpenCL.so --- .github/workflows/ci-build.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 54164b2..0a2bfc7 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -88,6 +88,9 @@ jobs: echo "ls /opt/AMDAPPSDK-3.0/include:" ls /opt/AMDAPPSDK-3.0/include + + ln -s /opt/AMDAPPSDK-3.0/lib/x86_64/libOpenCL.so /usr/lib/libOpenCL.so + echo "CLINFO:" clinfo From 520f3203eafea9bd5fc69f96b45e992f075e9fa6 Mon Sep 17 00:00:00 2001 From: Austin Klein Date: Sun, 8 Oct 2023 19:43:10 -0700 Subject: [PATCH 45/60] Symlink print --- .github/workflows/ci-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 0a2bfc7..fcf41c6 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -88,7 +88,7 @@ jobs: echo "ls /opt/AMDAPPSDK-3.0/include:" ls /opt/AMDAPPSDK-3.0/include - + echo "ln -s /opt/AMDAPPSDK-3.0/lib/x86_64/libOpenCL.so /usr/lib/libOpenCL.so" ln -s /opt/AMDAPPSDK-3.0/lib/x86_64/libOpenCL.so /usr/lib/libOpenCL.so echo "CLINFO:" From 5db045c80328f1bf3f491ceec3ec67dd31df90ee Mon Sep 17 00:00:00 2001 From: Austin Klein Date: Sun, 15 Oct 2023 16:14:43 -0700 Subject: [PATCH 46/60] cp instead of ln --- .github/workflows/ci-build.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index fcf41c6..a0aaa42 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -88,8 +88,11 @@ jobs: echo "ls /opt/AMDAPPSDK-3.0/include:" ls /opt/AMDAPPSDK-3.0/include - echo "ln -s /opt/AMDAPPSDK-3.0/lib/x86_64/libOpenCL.so /usr/lib/libOpenCL.so" - ln -s /opt/AMDAPPSDK-3.0/lib/x86_64/libOpenCL.so /usr/lib/libOpenCL.so + # echo "ln -s /opt/AMDAPPSDK-3.0/lib/x86_64/libOpenCL.so /usr/lib/libOpenCL.so" + # ln -s /opt/AMDAPPSDK-3.0/lib/x86_64/libOpenCL.so /usr/lib/libOpenCL.so + + echo "cp /opt/AMDAPPSDK-3.0/lib/x86_64/libOpenCL.so /usr/lib/libOpenCL.so" + cp /opt/AMDAPPSDK-3.0/lib/x86_64/libOpenCL.so /usr/lib/libOpenCL.so echo "CLINFO:" clinfo From 4acf8f253badc3601532c5ed308904795ebf865d Mon Sep 17 00:00:00 2001 From: Austin Klein Date: Sun, 15 Oct 2023 16:26:17 -0700 Subject: [PATCH 47/60] sudo cp --- .github/workflows/ci-build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index a0aaa42..4252e26 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -91,8 +91,8 @@ jobs: # echo "ln -s /opt/AMDAPPSDK-3.0/lib/x86_64/libOpenCL.so /usr/lib/libOpenCL.so" # ln -s /opt/AMDAPPSDK-3.0/lib/x86_64/libOpenCL.so /usr/lib/libOpenCL.so - echo "cp /opt/AMDAPPSDK-3.0/lib/x86_64/libOpenCL.so /usr/lib/libOpenCL.so" - cp /opt/AMDAPPSDK-3.0/lib/x86_64/libOpenCL.so /usr/lib/libOpenCL.so + echo "sudo cp /opt/AMDAPPSDK-3.0/lib/x86_64/libOpenCL.so /usr/lib/libOpenCL.so" + sudo cp /opt/AMDAPPSDK-3.0/lib/x86_64/libOpenCL.so /usr/lib/libOpenCL.so echo "CLINFO:" clinfo From d0c2aff5b44e745bb85e8721cd8a2791825004ce Mon Sep 17 00:00:00 2001 From: Austin Klein Date: Sun, 15 Oct 2023 16:32:51 -0700 Subject: [PATCH 48/60] sudo cp attempt --- .github/workflows/ci-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 4252e26..ed944f2 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -92,7 +92,7 @@ jobs: # ln -s /opt/AMDAPPSDK-3.0/lib/x86_64/libOpenCL.so /usr/lib/libOpenCL.so echo "sudo cp /opt/AMDAPPSDK-3.0/lib/x86_64/libOpenCL.so /usr/lib/libOpenCL.so" - sudo cp /opt/AMDAPPSDK-3.0/lib/x86_64/libOpenCL.so /usr/lib/libOpenCL.so + sudo cp /opt/AMDAPPSDK-3.0/lib/x86_64/libOpenCL.so /usr/lib echo "CLINFO:" clinfo From acec0e827fa5a509b23d4e2dd86d00fd58267a1a Mon Sep 17 00:00:00 2001 From: Austin Klein Date: Sun, 15 Oct 2023 16:42:09 -0700 Subject: [PATCH 49/60] export LD_LIBRARY_PATH --- .github/workflows/ci-build.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index ed944f2..39c8414 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -91,8 +91,11 @@ jobs: # echo "ln -s /opt/AMDAPPSDK-3.0/lib/x86_64/libOpenCL.so /usr/lib/libOpenCL.so" # ln -s /opt/AMDAPPSDK-3.0/lib/x86_64/libOpenCL.so /usr/lib/libOpenCL.so - echo "sudo cp /opt/AMDAPPSDK-3.0/lib/x86_64/libOpenCL.so /usr/lib/libOpenCL.so" - sudo cp /opt/AMDAPPSDK-3.0/lib/x86_64/libOpenCL.so /usr/lib + # echo "sudo cp /opt/AMDAPPSDK-3.0/lib/x86_64/libOpenCL.so /usr/lib/libOpenCL.so" + # sudo cp /opt/AMDAPPSDK-3.0/lib/x86_64/libOpenCL.so /usr/lib + + export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/opt/AMDAPPSDK-3.0/lib/x86_64/" + echo "CLINFO:" clinfo From a3c2e9279acb811e2e94a14ebbd256e610522d03 Mon Sep 17 00:00:00 2001 From: Austin Klein Date: Sun, 15 Oct 2023 19:35:07 -0700 Subject: [PATCH 50/60] Add symbolic links --- .github/workflows/ci-build.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 39c8414..224cd74 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -94,7 +94,11 @@ jobs: # echo "sudo cp /opt/AMDAPPSDK-3.0/lib/x86_64/libOpenCL.so /usr/lib/libOpenCL.so" # sudo cp /opt/AMDAPPSDK-3.0/lib/x86_64/libOpenCL.so /usr/lib - export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/opt/AMDAPPSDK-3.0/lib/x86_64/" + # export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/opt/AMDAPPSDK-3.0/lib/x86_64/" + echo "sudo ln -s /opt/AMDAPPSDK-3.0/lib/x86_64/sdk/libOpenCL.so.1 /usr/lib/libOpenCL.so.1" + sudo ln -s /opt/AMDAPPSDK-3.0/lib/x86_64/sdk/libOpenCL.so.1 /usr/lib/libOpenCL.so.1 + echo "sudo ln -s /opt/AMDAPPSDK-3.0/lib/x86_64/sdk/libamdocl64.so /usr/lib/libamdocl64.so" + sudo ln -s /opt/AMDAPPSDK-3.0/lib/x86_64/sdk/libamdocl64.so /usr/lib/libamdocl64.so echo "CLINFO:" From 4a918cbca72b3bcc29688de7635cc197e071b592 Mon Sep 17 00:00:00 2001 From: Austin Klein Date: Sun, 15 Oct 2023 19:46:01 -0700 Subject: [PATCH 51/60] Install ocl-icd-opencl-dev --- .github/workflows/ci-build.yml | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 224cd74..bee0cdd 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -95,10 +95,27 @@ jobs: # sudo cp /opt/AMDAPPSDK-3.0/lib/x86_64/libOpenCL.so /usr/lib # export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/opt/AMDAPPSDK-3.0/lib/x86_64/" - echo "sudo ln -s /opt/AMDAPPSDK-3.0/lib/x86_64/sdk/libOpenCL.so.1 /usr/lib/libOpenCL.so.1" - sudo ln -s /opt/AMDAPPSDK-3.0/lib/x86_64/sdk/libOpenCL.so.1 /usr/lib/libOpenCL.so.1 - echo "sudo ln -s /opt/AMDAPPSDK-3.0/lib/x86_64/sdk/libamdocl64.so /usr/lib/libamdocl64.so" - sudo ln -s /opt/AMDAPPSDK-3.0/lib/x86_64/sdk/libamdocl64.so /usr/lib/libamdocl64.so + + + + + + + + + # echo "sudo ln -s /opt/AMDAPPSDK-3.0/lib/x86_64/sdk/libOpenCL.so.1 /usr/lib/libOpenCL.so.1" + # sudo ln -s /opt/AMDAPPSDK-3.0/lib/x86_64/sdk/libOpenCL.so.1 /usr/lib/libOpenCL.so.1 + # echo "sudo ln -s /opt/AMDAPPSDK-3.0/lib/x86_64/sdk/libamdocl64.so /usr/lib/libamdocl64.so" + # sudo ln -s /opt/AMDAPPSDK-3.0/lib/x86_64/sdk/libamdocl64.so /usr/lib/libamdocl64.so + + sudo apt install -y ocl-icd-opencl-dev + + + + + + + echo "CLINFO:" From 063619336acf2151a8172f804e4c2cc3fdab8428 Mon Sep 17 00:00:00 2001 From: Austin Klein Date: Sun, 15 Oct 2023 19:52:31 -0700 Subject: [PATCH 52/60] Re-add symbolic links --- .github/workflows/ci-build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index bee0cdd..8840e05 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -103,10 +103,10 @@ jobs: - # echo "sudo ln -s /opt/AMDAPPSDK-3.0/lib/x86_64/sdk/libOpenCL.so.1 /usr/lib/libOpenCL.so.1" - # sudo ln -s /opt/AMDAPPSDK-3.0/lib/x86_64/sdk/libOpenCL.so.1 /usr/lib/libOpenCL.so.1 - # echo "sudo ln -s /opt/AMDAPPSDK-3.0/lib/x86_64/sdk/libamdocl64.so /usr/lib/libamdocl64.so" - # sudo ln -s /opt/AMDAPPSDK-3.0/lib/x86_64/sdk/libamdocl64.so /usr/lib/libamdocl64.so + echo "sudo ln -s /opt/AMDAPPSDK-3.0/lib/x86_64/sdk/libOpenCL.so.1 /usr/lib/libOpenCL.so.1" + sudo ln -s /opt/AMDAPPSDK-3.0/lib/x86_64/sdk/libOpenCL.so.1 /usr/lib/libOpenCL.so.1 + echo "sudo ln -s /opt/AMDAPPSDK-3.0/lib/x86_64/sdk/libamdocl64.so /usr/lib/libamdocl64.so" + sudo ln -s /opt/AMDAPPSDK-3.0/lib/x86_64/sdk/libamdocl64.so /usr/lib/libamdocl64.so sudo apt install -y ocl-icd-opencl-dev From 2a6eb12eea560b00eb76284becf404a105d2854c Mon Sep 17 00:00:00 2001 From: Austin Klein Date: Thu, 26 Oct 2023 21:15:27 -0700 Subject: [PATCH 53/60] Clean up debugging statements and workflows --- .github/workflows/ci-build.yml | 78 +++------------------------------ src/owHelper.cpp | 4 +- src/owOpenCLSolver.cpp | 45 +++++++++---------- src/owPhysicsFluidSimulator.cpp | 3 +- 4 files changed, 32 insertions(+), 98 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 8840e05..ed10e46 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -32,12 +32,12 @@ jobs: - name: Install Intel OpenCL libraries needed for Sibernetic run: | + lscpu + + echo "Installing OpenCL Drivers" + + # Legacy install of Intel's OpenCL Drivers: # Based on: https://github.com/openworm/OpenWorm/blob/master/Dockerfile - # lscpu - # cat /proc/cpuinfo - # arch - # uname --processor - # uname --machine # mkdir intel-opencl-tmp # cd intel-opencl-tmp # mkdir intel-opencl @@ -54,85 +54,21 @@ jobs: # sudo cp -R /opt/intel/opencl/include/CL /usr/include/ # sudo apt install -y ocl-icd-opencl-dev vim - - # # download the key to system keyring - # wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null - - # # add signed entry to apt sources and configure the APT client to use Intel repository: - # echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list - # sudo apt-get update - # sudo apt-get install -y intel-basekit - # sudo apt-get install -y intel-oneapi-runtime-opencl - + # Install AMD's OpenCL Drivers (AMD-APP-SDK 3.0): wget https://master.dl.sourceforge.net/project/nicehashsgminerv5viptools/APP%20SDK%20A%20Complete%20Development%20Platform/AMD%20APP%20SDK%203.0%20for%2064-bit%20Linux/AMD-APP-SDKInstaller-v3.0.130.136-GA-linux64.tar.bz2 tar -xf AMD-APP-SDKInstaller-v3.0.130.136-GA-linux64.tar.bz2 - # yes Y 2>/dev/null | sudo ./AMD-APP-SDK-v3.0.130.136-GA-linux64.sh printf 'Y\n\n' | sudo ./AMD-APP-SDK-v3.0.130.136-GA-linux64.sh - echo "ls /usr/lib:" - ls /usr/lib - - echo "ls /usr/lib/x86_64-linux-gnu:" - ls /usr/lib/x86_64-linux-gnu - - - echo "ls /opt/AMDAPPSDK-3.0:" - ls /opt/AMDAPPSDK-3.0 - - echo "ls /opt/AMDAPPSDK-3.0/lib/x86_64:" - ls /opt/AMDAPPSDK-3.0/lib/x86_64 - - echo "ls /opt/AMDAPPSDK-3.0/bin:" - ls /opt/AMDAPPSDK-3.0/bin - - echo "ls /opt/AMDAPPSDK-3.0/include:" - ls /opt/AMDAPPSDK-3.0/include - - # echo "ln -s /opt/AMDAPPSDK-3.0/lib/x86_64/libOpenCL.so /usr/lib/libOpenCL.so" - # ln -s /opt/AMDAPPSDK-3.0/lib/x86_64/libOpenCL.so /usr/lib/libOpenCL.so - - # echo "sudo cp /opt/AMDAPPSDK-3.0/lib/x86_64/libOpenCL.so /usr/lib/libOpenCL.so" - # sudo cp /opt/AMDAPPSDK-3.0/lib/x86_64/libOpenCL.so /usr/lib - - # export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/opt/AMDAPPSDK-3.0/lib/x86_64/" - - - - - - - - - echo "sudo ln -s /opt/AMDAPPSDK-3.0/lib/x86_64/sdk/libOpenCL.so.1 /usr/lib/libOpenCL.so.1" sudo ln -s /opt/AMDAPPSDK-3.0/lib/x86_64/sdk/libOpenCL.so.1 /usr/lib/libOpenCL.so.1 - echo "sudo ln -s /opt/AMDAPPSDK-3.0/lib/x86_64/sdk/libamdocl64.so /usr/lib/libamdocl64.so" sudo ln -s /opt/AMDAPPSDK-3.0/lib/x86_64/sdk/libamdocl64.so /usr/lib/libamdocl64.so sudo apt install -y ocl-icd-opencl-dev - - - - - - - + echo "OpenCL Driver Installation Complete" echo "CLINFO:" clinfo - # sudo ./AMD-APP-SDK-v3.0.130.136-GA-linux64.sh - # sudo apt install -y pocl-opencl-icd - # ls /usr/include - # dpkg -L intel-basekit - # dpkg -L intel-oneapi-runtime-opencl - # echo "ls /opt/intel" - # ls /opt/intel - # echo "ls /opt/intel/opencl" - # ls /opt/intel/opencl - # echo "ls /opt/intel/oneapi" - # ls /opt/intel/oneapi - - name: Build Sibernetic run: | diff --git a/src/owHelper.cpp b/src/owHelper.cpp index 4dfaa21..bbfde31 100644 --- a/src/owHelper.cpp +++ b/src/owHelper.cpp @@ -251,7 +251,6 @@ void owHelper::loadConfiguration(float *position_cpp, float *velocity_cpp, size_t pos; LOADMODE mode = NOMODE; int i = 0; - std::cout << "in load\n"; if (configFile.is_open()) { configFile.seekg(read_position); while (configFile.good()) { @@ -360,8 +359,7 @@ void owHelper::loadConfiguration(float *position_cpp, float *velocity_cpp, } else throw std::runtime_error("Could not open file configuration file"); configFile.close(); - std::cout << "Configuration has been loaded new" << std::endl; - std::cout << "in load end new" << std::endl; + std::cout << "Configuration has been loaded" << std::endl; } /** Load configuration from simulation to files * diff --git a/src/owOpenCLSolver.cpp b/src/owOpenCLSolver.cpp index 60f2ba1..979a82d 100644 --- a/src/owOpenCLSolver.cpp +++ b/src/owOpenCLSolver.cpp @@ -263,11 +263,12 @@ void owOpenCLSolver::initializeOpenCL(owConfigProperty *config) { sz = sizeof(cBuffer), cBuffer, nullptr); if (ciErrNum == CL_SUCCESS) { printf(" CL_PLATFORM_VERSION [%d]: \t%s", i, cBuffer); + std::cout << std::endl; } else { printf(" Error %i in clGetPlatformInfo Call !!!\n\n", ciErrNum); } } - std::cout << "owCi2" << std::endl; + std::cout << "owCi2a" << std::endl; // 0-CPU, 1-GPU // depends on the time order of system OpenCL drivers // installation on your local machine // CL_DEVICE_TYPE @@ -288,45 +289,45 @@ void owOpenCLSolver::initializeOpenCL(owConfigProperty *config) { cl_uint device_coumpute_unit_num_current = 0; unsigned int deviceNum = 0; - std::cout << "owA1" << std::endl; + std::cout << "owCi2b" << std::endl; // Selection of more appropriate device while (!findDevice) { - std::cout << "owFD1" << std::endl; + std::cout << "owCfda" << std::endl; for (int clSelectedPlatformID = 0; clSelectedPlatformID < (int)n_pl; clSelectedPlatformID++) { // if(findDevice) // break; - std::cout << "owFD2" << std::endl; + std::cout << "owCfdb" << std::endl; clGetDeviceIDs(cl_pl_id[clSelectedPlatformID], device_type[config->getDeviceType()], 0, nullptr, &ciDeviceCount); if ((devices_t = static_cast( malloc(sizeof(cl_device_id) * ciDeviceCount))) == nullptr) { - std::cout << "owFD3" << std::endl; + std::cout << "owCfdc" << std::endl; bPassed = false; } if (bPassed) { result = clGetDeviceIDs(cl_pl_id[clSelectedPlatformID], device_type[config->getDeviceType()], ciDeviceCount, devices_t, &ciDeviceCount); - std::cout << "owFD4" << std::endl; + std::cout << "owCfdd" << std::endl; if (result == CL_SUCCESS) { for (cl_uint i = 0; i < ciDeviceCount; ++i) { clGetDeviceInfo(devices_t[i], CL_DEVICE_TYPE, sizeof(type), &type, nullptr); - std::cout << "owFD5" << std::endl; + std::cout << "owCfde" << std::endl; if (type & device_type[config->getDeviceType()]) { clGetDeviceInfo(devices_t[i], CL_DEVICE_MAX_COMPUTE_UNITS, sizeof(device_coumpute_unit_num), &device_coumpute_unit_num, nullptr); - std::cout << "owFD6" << std::endl; + std::cout << "owCfdf" << std::endl; if (device_coumpute_unit_num_current <= device_coumpute_unit_num) { plList = clSelectedPlatformID; device_coumpute_unit_num_current = device_coumpute_unit_num; findDevice = true; deviceNum = i; - std::cout << "owFD7" << std::endl; + std::cout << "owCfdg" << std::endl; } // break; } @@ -345,43 +346,43 @@ void owOpenCLSolver::initializeOpenCL(owConfigProperty *config) { std::cout << "Unfortunately OpenCL couldn't find device " << deviceTypeName << std::endl; std::cout << "OpenCL try to init existing device " << std::endl; - std::cout << "owFD8" << std::endl; + std::cout << "owCfdh" << std::endl; if (config->getDeviceType() != ALL) { - std::cout << "owFD9" << std::endl; + std::cout << "owCfdi" << std::endl; config->setDeviceType(ALL); } else { - std::cout << "owFD10" << std::endl; + std::cout << "owCfdj" << std::endl; throw std::runtime_error("Sibernetic can't find any OpenCL devices. " "Please check you're environment " "configuration."); } } } - std::cout << "owA2" << std::endl; + std::cout << "owCi2c" << std::endl; cl_context_properties cprops[3] = { CL_CONTEXT_PLATFORM, (cl_context_properties)(platformList[plList])(), 0}; - std::cout << "owA21" << std::endl; + std::cout << "owCi2d" << std::endl; context = cl::Context(device_type[config->getDeviceType()], cprops, nullptr, nullptr, &err); - std::cout << "owA22" << std::endl; + std::cout << "owCi2e" << std::endl; devices = context.getInfo(); - std::cout << "owA23" << std::endl; + std::cout << "owCi2f" << std::endl; if (devices.size() < 1) { - std::cout << "owA24" << std::endl; + std::cout << "owCi2g" << std::endl; throw std::runtime_error("No OpenCL devices were found"); } - std::cout << "owA25" << std::endl; + std::cout << "owCi2h" << std::endl; // Print some information about chosen platform size_t compUnintsCount, memoryInfo, workGroupSize; - std::cout << "owA26" << std::endl; + std::cout << "owCi2i" << std::endl; result = devices[deviceNum].getInfo(CL_DEVICE_NAME, &cBuffer); // CL_INVALID_VALUE = -30; - std::cout << "owA3" << std::endl; + std::cout << "owCi2j" << std::endl; if (result == CL_SUCCESS) { std::cout << "CL_CONTEXT_PLATFORM [" << plList << "]: CL_DEVICE_NAME [" - << deviceNum << "]:\t" << cBuffer << std::endl; + << deviceNum << "]:\t" << cBuffer << std::endl << std::endl; } - std::cout << "owA4" << std::endl; + std::cout << "owCi2k" << std::endl; if (strlen(cBuffer) < 1000) { config->setDeviceName(cBuffer); } diff --git a/src/owPhysicsFluidSimulator.cpp b/src/owPhysicsFluidSimulator.cpp index 4dafd11..09a9cbd 100644 --- a/src/owPhysicsFluidSimulator.cpp +++ b/src/owPhysicsFluidSimulator.cpp @@ -83,13 +83,12 @@ owPhysicsFluidSimulator::owPhysicsFluidSimulator(owHelper *helper, int argc, density_cpp = new float[1 * config->getParticleCount()]; particleIndex_cpp = new unsigned int[config->getParticleCount() * 2]; - std::cout << "pre load\n"; // LOAD FROM FILE owHelper::loadConfiguration( position_cpp, velocity_cpp, elasticConnectionsData_cpp, membraneData_cpp, particleMembranesList_cpp, config); // Load configuration from file to buffer - std::cout << "post load" << std::endl; + std::cout << "owP1" << std::endl; this->helper = helper; std::cout << "owP1a" << std::endl; From 9e2c2017886bc4a65008ebff8cc915349c251963 Mon Sep 17 00:00:00 2001 From: Padraig Gleeson Date: Thu, 16 Nov 2023 12:35:44 +0000 Subject: [PATCH 54/60] Add test on Intel drivers --- .github/workflows/ci-build-intel.yml | 83 ++++++++++++++++++++++++++++ .github/workflows/ci-build.yml | 4 +- 2 files changed, 85 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/ci-build-intel.yml diff --git a/.github/workflows/ci-build-intel.yml b/.github/workflows/ci-build-intel.yml new file mode 100644 index 0000000..3eba438 --- /dev/null +++ b/.github/workflows/ci-build-intel.yml @@ -0,0 +1,83 @@ +name: Build Sibernetic Intel drivers + +on: + push: + branches: [ master, dev*, ow* ] + pull_request: + branches: [ master, dev, ow* ] + +jobs: + + build: + + runs-on: ${{ matrix.runs-on }} + strategy: + fail-fast: false + matrix: + runs-on: [ ubuntu-latest ] + + steps: + - name: Set git to use LF + run: | + git config --global core.autocrlf false + git config --global core.eol lf + + - uses: actions/checkout@v3 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Install Intel OpenCL libraries needed for Sibernetic + run: | + + lscpu + + echo "Installing OpenCL Drivers" + + # Based on: https://github.com/openworm/OpenWorm/blob/master/Dockerfile + + mkdir intel-opencl-tmp + cd intel-opencl-tmp + mkdir intel-opencl + wget https://github.com/openworm/OpenWorm/raw/dev_inte/SRB5.0_linux64.zip + unzip SRB5.0_linux64.zip + tar -C intel-opencl -Jxf intel-opencl-r5.0-63503.x86_64.tar.xz + tar -C intel-opencl -Jxf intel-opencl-devel-r5.0-63503.x86_64.tar.xz + tar -C intel-opencl -Jxf intel-opencl-cpu-r5.0-63503.x86_64.tar.xz + sudo cp -R intel-opencl/* / + sudo ldconfig + cd .. + sudo rm -r intel-opencl-tmp + + sudo cp -R /opt/intel/opencl/include/CL /usr/include/ + sudo apt install -y ocl-icd-opencl-dev vim + + echo "OpenCL Driver Installation Complete" + + echo "CLINFO:" + clinfo + + - name: Build Sibernetic + run: | + + sudo apt install -y python3-dev freeglut3-dev libglu1-mesa-dev + #sudo apt install -y --allow-downgrades libc-bin=2.27-3ubuntu1.5 # Fails with 2.27-3ubuntu1.6 for some reason... + python -V + ls -alt /usr/bin/python* + ls -alt + make clean + make + + - name: Run quick Sibernetic test + run: | + ldd ./Release/Sibernetic + + ./Release/Sibernetic -no_g timelimit=0.001 + + - name: Final version info + run: | + + python -V + pip list diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 974e906..2e562a6 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -1,4 +1,4 @@ -name: Build Sibernetic +name: Build Sibernetic AMD drivers on: push: @@ -29,7 +29,7 @@ jobs: with: python-version: ${{ matrix.python-version }} - - name: Install Intel OpenCL libraries needed for Sibernetic + - name: Install AMD OpenCL libraries needed for Sibernetic run: | lscpu From 5c23f5fd11cd4406c60442c7a2f2c62f58c84e69 Mon Sep 17 00:00:00 2001 From: Padraig Gleeson Date: Thu, 16 Nov 2023 12:37:14 +0000 Subject: [PATCH 55/60] No clinfo for intel... --- .github/workflows/ci-build-intel.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci-build-intel.yml b/.github/workflows/ci-build-intel.yml index 3eba438..9c6328d 100644 --- a/.github/workflows/ci-build-intel.yml +++ b/.github/workflows/ci-build-intel.yml @@ -56,8 +56,6 @@ jobs: echo "OpenCL Driver Installation Complete" - echo "CLINFO:" - clinfo - name: Build Sibernetic run: | From 264d0d7f34a8ea487b47b18c17401acc3a5de850 Mon Sep 17 00:00:00 2001 From: Padraig Gleeson Date: Thu, 16 Nov 2023 12:41:04 +0000 Subject: [PATCH 56/60] Don't run test on intel --- .github/workflows/ci-build-intel.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-build-intel.yml b/.github/workflows/ci-build-intel.yml index 9c6328d..690ea8b 100644 --- a/.github/workflows/ci-build-intel.yml +++ b/.github/workflows/ci-build-intel.yml @@ -68,11 +68,12 @@ jobs: make clean make - - name: Run quick Sibernetic test + - name: Print info on executable run: | ldd ./Release/Sibernetic - ./Release/Sibernetic -no_g timelimit=0.001 + echo "NOTE: not running Sibernetic on GitHub actions test with Intel drivers. Seg faults." + ###./Release/Sibernetic -no_g timelimit=0.001 - name: Final version info run: | From 6660922bee5c867d6185f5053a7c314b46115906 Mon Sep 17 00:00:00 2001 From: Padraig Gleeson Date: Thu, 16 Nov 2023 13:56:43 +0000 Subject: [PATCH 57/60] Test on multiple pythons --- .github/workflows/ci-build-intel.yml | 5 +++-- .github/workflows/ci-build.yml | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-build-intel.yml b/.github/workflows/ci-build-intel.yml index 690ea8b..f8faa60 100644 --- a/.github/workflows/ci-build-intel.yml +++ b/.github/workflows/ci-build-intel.yml @@ -14,6 +14,7 @@ jobs: strategy: fail-fast: false matrix: + python-version: ["3.7", "3.9", "3.10", "3.11"] runs-on: [ ubuntu-latest ] steps: @@ -24,10 +25,10 @@ jobs: - uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.python-version }} + - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 with: - python-version: ${{ matrix.python-version }} + python-version: ${{ matrix.python-version }} - name: Install Intel OpenCL libraries needed for Sibernetic run: | diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 2e562a6..a8d9fee 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -14,6 +14,7 @@ jobs: strategy: fail-fast: false matrix: + python-version: ["3.7", "3.9", "3.10", "3.11"] runs-on: [ ubuntu-latest ] steps: @@ -24,10 +25,10 @@ jobs: - uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.python-version }} + - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 with: - python-version: ${{ matrix.python-version }} + python-version: ${{ matrix.python-version }} - name: Install AMD OpenCL libraries needed for Sibernetic run: | From f831d4e3a257bd9e6e5dfe731adcb403f5f85ed1 Mon Sep 17 00:00:00 2001 From: Padraig Gleeson Date: Thu, 16 Nov 2023 15:54:52 +0000 Subject: [PATCH 58/60] Only use native python (issue with installing/finding python3-dev)... test on ubuntu-20.04 also --- .github/workflows/ci-build-intel.yml | 10 +--------- .github/workflows/ci-build.yml | 8 +------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci-build-intel.yml b/.github/workflows/ci-build-intel.yml index f8faa60..827d9fb 100644 --- a/.github/workflows/ci-build-intel.yml +++ b/.github/workflows/ci-build-intel.yml @@ -14,21 +14,13 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.7", "3.9", "3.10", "3.11"] - runs-on: [ ubuntu-latest ] + runs-on: [ ubuntu-latest, ubuntu-20.04 ] steps: - name: Set git to use LF run: | git config --global core.autocrlf false git config --global core.eol lf - - - uses: actions/checkout@v3 - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - name: Install Intel OpenCL libraries needed for Sibernetic run: | diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index a8d9fee..040f2f1 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -14,8 +14,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.7", "3.9", "3.10", "3.11"] - runs-on: [ ubuntu-latest ] + runs-on: [ ubuntu-latest, ubuntu-20.04 ] steps: - name: Set git to use LF @@ -25,11 +24,6 @@ jobs: - uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - name: Install AMD OpenCL libraries needed for Sibernetic run: | From 9d946c6f540dba07d074cec27d31db5ba2f3e087 Mon Sep 17 00:00:00 2001 From: Padraig Gleeson Date: Thu, 16 Nov 2023 16:00:18 +0000 Subject: [PATCH 59/60] Need to checkout... --- .github/workflows/ci-build-intel.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci-build-intel.yml b/.github/workflows/ci-build-intel.yml index 827d9fb..6ad75f0 100644 --- a/.github/workflows/ci-build-intel.yml +++ b/.github/workflows/ci-build-intel.yml @@ -21,6 +21,8 @@ jobs: run: | git config --global core.autocrlf false git config --global core.eol lf + + - uses: actions/checkout@v3 - name: Install Intel OpenCL libraries needed for Sibernetic run: | From 0e7f82ad5ba4d2740e679ee8072b3395424d341f Mon Sep 17 00:00:00 2001 From: Padraig Gleeson Date: Thu, 16 Nov 2023 17:18:51 +0000 Subject: [PATCH 60/60] To v0.0.7; remove all debugging statements --- .github/workflows/ci-build-intel.yml | 2 +- .github/workflows/ci-build.yml | 2 +- sibernetic_c302.py | 2 +- src/main.cpp | 9 ++------ src/owOpenCLSolver.cpp | 31 +--------------------------- src/owPhysicsFluidSimulator.cpp | 4 ---- src/owSignalSimulator.cpp | 1 - src/owWorldSimulation.cpp | 14 ------------- 8 files changed, 6 insertions(+), 59 deletions(-) diff --git a/.github/workflows/ci-build-intel.yml b/.github/workflows/ci-build-intel.yml index 6ad75f0..fdfce87 100644 --- a/.github/workflows/ci-build-intel.yml +++ b/.github/workflows/ci-build-intel.yml @@ -1,4 +1,4 @@ -name: Build Sibernetic Intel drivers +name: Build using Intel drivers on: push: diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 040f2f1..a5d62b6 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -1,4 +1,4 @@ -name: Build Sibernetic AMD drivers +name: Build using AMD drivers on: push: diff --git a/sibernetic_c302.py b/sibernetic_c302.py index 26ed92b..e7827ab 100644 --- a/sibernetic_c302.py +++ b/sibernetic_c302.py @@ -9,7 +9,7 @@ import pprint pp = pprint.PrettyPrinter(indent=4) -script_version = '0.1.4' # This will change at different rate to C++ code... +script_version = '0.1.5' # This will change at different rate to C++ code... DEFAULTS = {'duration': 2.0, 'dt': 0.005, diff --git a/src/main.cpp b/src/main.cpp index e25ba2e..6d3be80 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -45,7 +45,7 @@ bool load_to = false; bool skip_display_particles = false; bool skip_display_membranes = false; bool skip_display_connections = false; -std::string version = "0.0.6"; +std::string version = "0.0.7"; int usage() { std::cout @@ -103,13 +103,11 @@ int usage() { } int main(int argc, char **argv) { - int exitStatus; - std::cout << "S1\n"; + int exitStatus = -1; if (argc == 1) { std::cout << "Sibernetic: no arguments specified, run method executing\n"; exitStatus = run(argc, argv); } else { - std::cout << "S1e\n"; bool graph = true; bool run_tests = false; @@ -135,7 +133,6 @@ int main(int argc, char **argv) { 0) { // run load config from file mode graph = true; load_from_file = true; - std::cout << "S1f\n"; } if (std::string("-skip_display_particles").compare(argv[i]) == 0) { skip_display_particles = true; @@ -154,9 +151,7 @@ int main(int argc, char **argv) { test_energy_conservation(argc, argv); } else - std::cout << "S1r\n"; exitStatus = run(argc, argv, graph); } - std::cout << "S1n\n"; return exitStatus; } diff --git a/src/owOpenCLSolver.cpp b/src/owOpenCLSolver.cpp index 979a82d..ca2314c 100644 --- a/src/owOpenCLSolver.cpp +++ b/src/owOpenCLSolver.cpp @@ -63,14 +63,11 @@ owOpenCLSolver::owOpenCLSolver(const float *position_cpp, const int *membraneData_cpp, const int *particleMembranesList_cpp) { try { - std::cout << "owC1" << std::endl; initializeOpenCL(config); - std::cout << "owC10" << std::endl; // Create OpenCL buffers initializeBuffers(position_cpp, velocity_cpp, config, elasticConnectionsData_cpp, membraneData_cpp, particleMembranesList_cpp); - std::cout << "owC1a" << std::endl; // Create OpenCL kernels create_ocl_kernel("clearBuffers", clearBuffers); create_ocl_kernel("findNeighbors", findNeighbors); @@ -91,14 +88,13 @@ owOpenCLSolver::owOpenCLSolver(const float *position_cpp, pcisph_computeElasticForces); // membrane handling kernels - std::cout << "owC1b" << std::endl; create_ocl_kernel("clearMembraneBuffers", clearMembraneBuffers); create_ocl_kernel("computeInteractionWithMembranes", computeInteractionWithMembranes); create_ocl_kernel("computeInteractionWithMembranes_finalize", computeInteractionWithMembranes_finalize); } catch (std::runtime_error &ex) { - std::cout << "errrr\n"; + std::cout << "Error in owOpenCLSolver.cpp!!\n"; destroy(); throw; } @@ -239,18 +235,14 @@ void owOpenCLSolver::initializeBuffers(const float *position_cpp, * Contain information about simulating configuration */ void owOpenCLSolver::initializeOpenCL(owConfigProperty *config) { - std::cout << "owCi1" << std::endl; cl_int err; std::vector platformList; - std::cout << "owCi1a" << std::endl; err = cl::Platform::get( &platformList); // TODO make check that returned value isn't error - std::cout << "owCi1b" << std::endl; if (platformList.size() < 1 || err != CL_SUCCESS) { std::cout << "No OpenCL platforms found, error code: "<< err<< " \n"; throw std::runtime_error("No OpenCL platforms found"); } - std::cout << "owCi2" << std::endl; char cBuffer[1024]; cl_platform_id cl_pl_id[10]; cl_uint n_pl; @@ -268,7 +260,6 @@ void owOpenCLSolver::initializeOpenCL(owConfigProperty *config) { printf(" Error %i in clGetPlatformInfo Call !!!\n\n", ciErrNum); } } - std::cout << "owCi2a" << std::endl; // 0-CPU, 1-GPU // depends on the time order of system OpenCL drivers // installation on your local machine // CL_DEVICE_TYPE @@ -289,45 +280,37 @@ void owOpenCLSolver::initializeOpenCL(owConfigProperty *config) { cl_uint device_coumpute_unit_num_current = 0; unsigned int deviceNum = 0; - std::cout << "owCi2b" << std::endl; // Selection of more appropriate device while (!findDevice) { - std::cout << "owCfda" << std::endl; for (int clSelectedPlatformID = 0; clSelectedPlatformID < (int)n_pl; clSelectedPlatformID++) { // if(findDevice) // break; - std::cout << "owCfdb" << std::endl; clGetDeviceIDs(cl_pl_id[clSelectedPlatformID], device_type[config->getDeviceType()], 0, nullptr, &ciDeviceCount); if ((devices_t = static_cast( malloc(sizeof(cl_device_id) * ciDeviceCount))) == nullptr) { - std::cout << "owCfdc" << std::endl; bPassed = false; } if (bPassed) { result = clGetDeviceIDs(cl_pl_id[clSelectedPlatformID], device_type[config->getDeviceType()], ciDeviceCount, devices_t, &ciDeviceCount); - std::cout << "owCfdd" << std::endl; if (result == CL_SUCCESS) { for (cl_uint i = 0; i < ciDeviceCount; ++i) { clGetDeviceInfo(devices_t[i], CL_DEVICE_TYPE, sizeof(type), &type, nullptr); - std::cout << "owCfde" << std::endl; if (type & device_type[config->getDeviceType()]) { clGetDeviceInfo(devices_t[i], CL_DEVICE_MAX_COMPUTE_UNITS, sizeof(device_coumpute_unit_num), &device_coumpute_unit_num, nullptr); - std::cout << "owCfdf" << std::endl; if (device_coumpute_unit_num_current <= device_coumpute_unit_num) { plList = clSelectedPlatformID; device_coumpute_unit_num_current = device_coumpute_unit_num; findDevice = true; deviceNum = i; - std::cout << "owCfdg" << std::endl; } // break; } @@ -346,43 +329,31 @@ void owOpenCLSolver::initializeOpenCL(owConfigProperty *config) { std::cout << "Unfortunately OpenCL couldn't find device " << deviceTypeName << std::endl; std::cout << "OpenCL try to init existing device " << std::endl; - std::cout << "owCfdh" << std::endl; if (config->getDeviceType() != ALL) { - std::cout << "owCfdi" << std::endl; config->setDeviceType(ALL); } else { - std::cout << "owCfdj" << std::endl; throw std::runtime_error("Sibernetic can't find any OpenCL devices. " "Please check you're environment " "configuration."); } } } - std::cout << "owCi2c" << std::endl; cl_context_properties cprops[3] = { CL_CONTEXT_PLATFORM, (cl_context_properties)(platformList[plList])(), 0}; - std::cout << "owCi2d" << std::endl; context = cl::Context(device_type[config->getDeviceType()], cprops, nullptr, nullptr, &err); - std::cout << "owCi2e" << std::endl; devices = context.getInfo(); - std::cout << "owCi2f" << std::endl; if (devices.size() < 1) { - std::cout << "owCi2g" << std::endl; throw std::runtime_error("No OpenCL devices were found"); } - std::cout << "owCi2h" << std::endl; // Print some information about chosen platform size_t compUnintsCount, memoryInfo, workGroupSize; - std::cout << "owCi2i" << std::endl; result = devices[deviceNum].getInfo(CL_DEVICE_NAME, &cBuffer); // CL_INVALID_VALUE = -30; - std::cout << "owCi2j" << std::endl; if (result == CL_SUCCESS) { std::cout << "CL_CONTEXT_PLATFORM [" << plList << "]: CL_DEVICE_NAME [" << deviceNum << "]:\t" << cBuffer << std::endl << std::endl; } - std::cout << "owCi2k" << std::endl; if (strlen(cBuffer) < 1000) { config->setDeviceName(cBuffer); } diff --git a/src/owPhysicsFluidSimulator.cpp b/src/owPhysicsFluidSimulator.cpp index 09a9cbd..ea42dde 100644 --- a/src/owPhysicsFluidSimulator.cpp +++ b/src/owPhysicsFluidSimulator.cpp @@ -89,11 +89,8 @@ owPhysicsFluidSimulator::owPhysicsFluidSimulator(owHelper *helper, int argc, membraneData_cpp, particleMembranesList_cpp, config); // Load configuration from file to buffer - std::cout << "owP1" << std::endl; this->helper = helper; - std::cout << "owP1a" << std::endl; if (config->numOfElasticP != 0) { - std::cout << "owP1b" << std::endl; ocl_solver = new owOpenCLSolver( position_cpp, velocity_cpp, config, elasticConnectionsData_cpp, membraneData_cpp, @@ -114,7 +111,6 @@ owPhysicsFluidSimulator::owPhysicsFluidSimulator(owHelper *helper, int argc, throw; } - std::cout << "owP2" << std::endl; } /** Reset simulation * diff --git a/src/owSignalSimulator.cpp b/src/owSignalSimulator.cpp index feed170..bd3a339 100644 --- a/src/owSignalSimulator.cpp +++ b/src/owSignalSimulator.cpp @@ -119,7 +119,6 @@ std::vector SignalSimulator::run() { // Call a method of the class // pValue = PyObject_CallMethod(pInstance, "rrun // un", nullptr); - std::cout << "S1s\n"; pValue = PyObject_CallMethod(pInstance, const_cast("run"), nullptr); if (PyErr_Occurred()) { PyErr_Print(); diff --git a/src/owWorldSimulation.cpp b/src/owWorldSimulation.cpp index 32dcd7a..6223692 100644 --- a/src/owWorldSimulation.cpp +++ b/src/owWorldSimulation.cpp @@ -142,7 +142,6 @@ void read_muscles_activity_signals_from_log_file( /** Main displaying function */ void display(void) { - std::cout << "owD1\n"; // Update Scene if not paused int i, j, k; //int err_coord_cnt = 0; @@ -523,7 +522,6 @@ inline void drawScene() { // Display user interface if enabled bool displayInfos = true; if (displayInfos) { - std::cout << "S1d\n"; glDisable(GL_DEPTH_TEST); glBlendFunc(GL_ONE_MINUS_DST_COLOR, GL_ZERO); // invert color glEnable(GL_BLEND); @@ -664,7 +662,6 @@ inline void renderInfo(int x, int y) { glPrint(2, 12, label, m_font); glColor3f(1.0F, 1.0F, 1.0F); - std::cout << "S2\n"; if (load_from_file) // sprintf(label, "Selected device: %s FPS = %.2f, time step: %d (%f s)", // localConfig->getDeviceName(), fps, iteration, @@ -1057,7 +1054,6 @@ void sighandler(int s) { */ int run(int argc, char **argv, const bool with_graphics) { - std::cout << "S1w\n"; helper = new owHelper(); try { if (!load_from_file) { @@ -1066,9 +1062,7 @@ int run(int argc, char **argv, const bool with_graphics) { muscle_activation_signal_cpp = fluid_simulation->getMuscleActivationSignal(); } else { - std::cout << "S11\n"; localConfig = new owConfigProperty(argc, argv); - std::cout << "S12\n"; muscle_activation_signal_cpp = new float[localConfig->MUSCLE_COUNT]; for (unsigned int i = 0; i < localConfig->MUSCLE_COUNT; ++i) { muscle_activation_signal_cpp[i] = 0.f; @@ -1079,15 +1073,12 @@ int run(int argc, char **argv, const bool with_graphics) { std::cout << "ERROR: " << ex.what() << std::endl; return EXIT_FAILURE; } - std::cout << "S13" << std::endl; std::signal(SIGINT, sighandler); if (with_graphics) { - std::cout << "S1g\n"; glutInit(&argc, argv); glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB); glutInitWindowSize(1200, 800); glutInitWindowPosition(100, 100); - std::cout << "S1g2\n"; glutCreateWindow("SIBERNETIC (2011-2017) by Andrey Palyanov and Sergey " "Khayrulin. Build from 28/10/2017 sources (development " "branch)"); @@ -1095,16 +1086,12 @@ int run(int argc, char **argv, const bool with_graphics) { init(); glutDisplayFunc(display); glutReshapeFunc(resize); - std::cout << "S1g3\n"; glutMouseFunc(respond_mouse); glutMotionFunc( mouse_motion); // process movement in case if the mouse is clicked, glutKeyboardFunc(respondKey); - std::cout << "S1g4\n"; glutTimerFunc(TIMER_INTERVAL * 0, Timer, 0); - std::cout << "S1g4a\n"; glutMainLoop(); - std::cout << "S1g4e\n"; if (!load_from_file) { cleanupSimulation(); return EXIT_SUCCESS; @@ -1112,7 +1099,6 @@ int run(int argc, char **argv, const bool with_graphics) { } else { while (1) { try { - std::cout << "S2rr" << std::endl; fluid_simulation->simulationStep(load_to); } catch (std::runtime_error &ex) { cleanupSimulation();