From 04ce57c6c43ec4d8cf88970016ec9f71d4fbfda0 Mon Sep 17 00:00:00 2001 From: Anatoly Volkov <117643568+avolkov-intel@users.noreply.github.com> Date: Tue, 14 Jan 2025 11:25:05 +0100 Subject: [PATCH] Update build instructions (#3009) * Update build instructions * Fix build instructions --- docs/source/conf.py | 1 + .../get-started/build-and-run-examples.rst | 46 +++++++++++++------ 2 files changed, 32 insertions(+), 15 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 32e276709c7..a10cd11ed55 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -134,6 +134,7 @@ ('cpp:identifier', 'base'), # method ('cpp:identifier', 'method'), + ('cpp:identifier', 'method::by_default'), ('cpp:identifier', 'Method'), # task ('cpp:identifier', 'task'), diff --git a/docs/source/get-started/build-and-run-examples.rst b/docs/source/get-started/build-and-run-examples.rst index e4f24653c36..e92be2a6b5c 100644 --- a/docs/source/get-started/build-and-run-examples.rst +++ b/docs/source/get-started/build-and-run-examples.rst @@ -63,7 +63,7 @@ basic usage scenarios of |short_name| with DPCPP. Go to .. group-tab:: Windows - To set up |short_name| environment, run ``source /env/vars.bat`` or ``source setvars.bat``. + To set up |short_name| environment, run ``call /env/vars.bat`` or ``call setvars.bat``. #. Copy ``./examples/oneapi/dpc`` to a writable directory if necessary (since it creates temporary files): @@ -76,9 +76,20 @@ basic usage scenarios of |short_name| with DPCPP. Go to #. Set up oneMKL environment in case of static linking: - .. code-block:: bash + .. tabs:: + + .. group-tab:: Linux + + .. code-block:: bash + + source mkl/latest/env/vars.sh + + .. group-tab:: Windows + + .. code-block:: bash + + call mkl/latest/env/vars.bat - source mkl/latest/env/vars.sh #. Build and run examples: @@ -89,6 +100,7 @@ basic usage scenarios of |short_name| with DPCPP. Go to Otherwise, you need to copy :file:`examples/oneapi/dpc` and :file:`examples/oneapi/data` folders to the directory with right permissions. These two folders must be retained in the same directory level relative to each other. + If you want to build examples from /examples/oneapi/cpp you can set CC and CXX with other compliers as well. .. tabs:: @@ -96,12 +108,14 @@ basic usage scenarios of |short_name| with DPCPP. Go to .. code-block:: bash - # Navigate to examples directory and build examples - cd /examples/oneapi/dpc - cmake -G "Unix Makefilesā®" -DEXAMPLES_LIST=svm_two_class_thunder # This would generate makefiles for all svm examples matching passed name - make # This will compile and run generated svm examples - cmake -G "Unix Makefilesā®" -DONEDAL_LINK=static # This wouldgenerate make for static version - make # This will compile and run all the examples + # Navigate to examples directory and build examples + cd /examples/oneapi/dpc + export CC=icx + export CXX=icpx or export CXX=icx + cmake -G "Unix Makefiles" -DEXAMPLES_LIST=svm_two_class_thunder # This would generate makefiles for all svm examples matching passed name + make # This will compile and run generated svm examples + cmake -G "Unix Makefiles" -DONEDAL_LINK=static # This wouldgenerate make for static version + make # This will compile and run all the examples .. group-tab:: Windows @@ -109,17 +123,19 @@ basic usage scenarios of |short_name| with DPCPP. Go to # Navigate to examples directory and build examples cd /examples/oneapi/dpc - cmake -G "NMake Makefiles" -DEXAMPLES_LIST=svm_two_class_thunder # This would generate makefiles for all svm examples matching passed name - nmake # This will compile and run generated svm examples - cmake -G "NMake Makefiles" -DONEDAL_LINK=static # This wouldgenerate make for static version - nmake # This will compile and run all the examples + set CC=icx + set CXX=icx + cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -DEXAMPLES_LIST=svm_two_class_thunder # This would generate makefiles for all svm examples matching passed name + nmake # This will compile and run generated svm examples + cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -DONEDAL_LINK=static # This wouldgenerate make for static version + nmake # This will compile and run all the examples -#. The resulting example binaries and log files are written into the :file:`_results` directory. +#. The resulting example binaries and log files are written into the :file:`_cmake_results` directory. .. note:: - You should run the examples from :file:`examples/oneapi/dpc` folder, not from :file:`_results` folder. + You should run the examples from :file:`examples/oneapi/dpc` folder, not from :file:`_cmake_results` folder. Most examples require data to be stored in :file:`examples/oneapi/data` folder and to have a relative link to it started from :file:`examples/oneapi/dpc` folder.