From 1439e2cc74f5cbbd4a5e4df7ee73ab4a4e54e285 Mon Sep 17 00:00:00 2001 From: Alberto Villarreal Date: Thu, 22 Oct 2020 16:49:07 -0700 Subject: [PATCH 1/4] create makefile for NMAKE Signed-off-by: Alberto Villarreal --- .../particle-diffusion/Particle_Diffusion.sln | 25 --- .../Particle_Diffusion.vcxproj | 167 ------------------ .../Particle_Diffusion.vcxproj.filters | 28 --- .../Particle_Diffusion.vcxproj.user | 15 -- .../particle-diffusion/README.md | 14 +- .../particle-diffusion/makefile | 18 ++ .../particle-diffusion/sample.json | 5 +- 7 files changed, 21 insertions(+), 251 deletions(-) delete mode 100644 DirectProgramming/DPC++/StructuredGrids/particle-diffusion/Particle_Diffusion.sln delete mode 100644 DirectProgramming/DPC++/StructuredGrids/particle-diffusion/Particle_Diffusion.vcxproj delete mode 100644 DirectProgramming/DPC++/StructuredGrids/particle-diffusion/Particle_Diffusion.vcxproj.filters delete mode 100644 DirectProgramming/DPC++/StructuredGrids/particle-diffusion/Particle_Diffusion.vcxproj.user create mode 100644 DirectProgramming/DPC++/StructuredGrids/particle-diffusion/makefile diff --git a/DirectProgramming/DPC++/StructuredGrids/particle-diffusion/Particle_Diffusion.sln b/DirectProgramming/DPC++/StructuredGrids/particle-diffusion/Particle_Diffusion.sln deleted file mode 100644 index 1814266556..0000000000 --- a/DirectProgramming/DPC++/StructuredGrids/particle-diffusion/Particle_Diffusion.sln +++ /dev/null @@ -1,25 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.28307.136 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Particle_Diffusion", "Particle_Diffusion.vcxproj", "{9A9AAD41-D608-401F-9339-FECF2C3CD8E4}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|x64 = Debug|x64 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {9A9AAD41-D608-401F-9339-FECF2C3CD8E4}.Debug|x64.ActiveCfg = Debug|x64 - {9A9AAD41-D608-401F-9339-FECF2C3CD8E4}.Debug|x64.Build.0 = Debug|x64 - {9A9AAD41-D608-401F-9339-FECF2C3CD8E4}.Release|x64.ActiveCfg = Release|x64 - {9A9AAD41-D608-401F-9339-FECF2C3CD8E4}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {8E9143FB-0D63-4518-8E00-05D9E8F5CACB} - EndGlobalSection -EndGlobal diff --git a/DirectProgramming/DPC++/StructuredGrids/particle-diffusion/Particle_Diffusion.vcxproj b/DirectProgramming/DPC++/StructuredGrids/particle-diffusion/Particle_Diffusion.vcxproj deleted file mode 100644 index 3c661db20b..0000000000 --- a/DirectProgramming/DPC++/StructuredGrids/particle-diffusion/Particle_Diffusion.vcxproj +++ /dev/null @@ -1,167 +0,0 @@ - - - - - Debug - x64 - - - Release - x64 - - - - 15.0 - {9a9aad41-d608-401f-9339-fecf2c3cd8e4} - Win32Proj - Particle_Diffusion - $(WindowsSDKVersion.Replace("\","")) - - - - Application - true - oneAPI Data Parallel C++ Compiler - Unicode - - - Application - false - oneAPI Data Parallel C++ Compiler - true - Unicode - - - Application - true - Intel(R) oneAPI DPC++ Compiler - Unicode - No - - - Application - false - Intel(R) oneAPI DPC++ Compiler - true - Unicode - No - - - - - - - - - - - - - - - - - - - - - true - - - true - - - false - - - false - - - - Use - Level3 - Disabled - true - true - pch.h - - - Console - true - - - - - Use - Level3 - Disabled - true - true - pch.h - DisableAllWarnings - $(ONEAPI_ROOT)dev-utilities\latest\include;$(ONEAPI_ROOT)\mkl\latest\include;$(ONEAPI_ROOT)\mkl\latest\include\rng; %(AdditionalIncludeDirectories) - - - Console - true - /link /libpath:"$(ONEAPI_ROOT)\mkl\latest\lib\intel64" mkl_intel_ilp64.lib mkl_sequential.lib mkl_core.lib mkl_sycl.lib opencl.lib %(AdditionalOptions) - -fsycl-device-code-split;%(SpecifyDevCmplAdditionalOptions) - $(ONEAPI_ROOT)/mkl/latest/lib/intel64/mkl_sycl.lib - - - - - Use - Level3 - MaxSpeed - true - true - true - true - pch.h - - - Console - true - true - true - - - - - Use - Level3 - MaxSpeed - true - true - true - true - pch.h - DisableAllWarnings - $(ONEAPI_ROOT)dev-utilities\latest\include;$(ONEAPI_ROOT)\mkl\latest\include;$(ONEAPI_ROOT)\mkl\latest\include\rng; %(AdditionalIncludeDirectories) - - - Console - true - true - true - /link /libpath:"$(ONEAPI_ROOT)\mkl\latest\lib\intel64" mkl_intel_ilp64.lib mkl_sequential.lib mkl_core.lib mkl_sycl.lib opencl.lib %(AdditionalOptions) - -fsycl-device-code-split;%(SpecifyDevCmplAdditionalOptions) - $(ONEAPI_ROOT)/mkl/latest/lib/intel64/mkl_sycl.lib - - - - - - - - - - - - - - - - - diff --git a/DirectProgramming/DPC++/StructuredGrids/particle-diffusion/Particle_Diffusion.vcxproj.filters b/DirectProgramming/DPC++/StructuredGrids/particle-diffusion/Particle_Diffusion.vcxproj.filters deleted file mode 100644 index 79fc277815..0000000000 --- a/DirectProgramming/DPC++/StructuredGrids/particle-diffusion/Particle_Diffusion.vcxproj.filters +++ /dev/null @@ -1,28 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;hm;inl;inc;ipp;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - - - - - - - \ No newline at end of file diff --git a/DirectProgramming/DPC++/StructuredGrids/particle-diffusion/Particle_Diffusion.vcxproj.user b/DirectProgramming/DPC++/StructuredGrids/particle-diffusion/Particle_Diffusion.vcxproj.user deleted file mode 100644 index 7c11a5f5c9..0000000000 --- a/DirectProgramming/DPC++/StructuredGrids/particle-diffusion/Particle_Diffusion.vcxproj.user +++ /dev/null @@ -1,15 +0,0 @@ - - - - 10000 256 22 777 0 1 - WindowsLocalDebugger - - - - - 10000 256 22 777 0 1 - WindowsLocalDebugger - - - - diff --git a/DirectProgramming/DPC++/StructuredGrids/particle-diffusion/README.md b/DirectProgramming/DPC++/StructuredGrids/particle-diffusion/README.md index 560c59095e..0e56e649c8 100644 --- a/DirectProgramming/DPC++/StructuredGrids/particle-diffusion/README.md +++ b/DirectProgramming/DPC++/StructuredGrids/particle-diffusion/README.md @@ -58,19 +58,7 @@ Base Toolkit Get Started Guide (https://devcloud.intel.com/oneapi/get-started/ba ### On a Windows\* System Using Microsoft Visual Studio 2017 or Newer -#### Build the motionsim Program Using Visual Studio 2017 or Visual Studio 2019 - -##### 1. Right click on the solution file (.sln) and open it using either Visual Studio 2017 or Visual Studio 2019 -##### 2. From Visual Studio, right click on the project solution file in solution explorer and select rebuild -##### 3. From top menu select Debug -> Start Without Debugging - -#### Build the motionsim Program Using MSBuild - -##### 1. Open "x64 Native Tools Command Prompt for VS 2017" or "x64 Native Tools Command Prompt for VS 2019" as Administrator (right click application and select Run as Administrator) -##### 2. Build -From the particle diffusion Project directory: - - > MSBuild Particle_Diffusion.sln /t:Rebuild /p:Configuration="Release" +Run `nmake` to build and run the sample. `nmake clean` removes temporary files. ### On a Linux\* System Using CMake diff --git a/DirectProgramming/DPC++/StructuredGrids/particle-diffusion/makefile b/DirectProgramming/DPC++/StructuredGrids/particle-diffusion/makefile new file mode 100644 index 0000000000..1d217bacdd --- /dev/null +++ b/DirectProgramming/DPC++/StructuredGrids/particle-diffusion/makefile @@ -0,0 +1,18 @@ +# Makefile for NMAKE + +default: run_all + +all: run_all + +run_all: motionsim.exe + .\motionsim + +DPCPP_OPTS=/I"$(MKLROOT)\include" /Qmkl /DMKL_ILP64 /EHsc -fsycl-device-code-split=per_kernel -fno-sycl-early-optimizations OpenCL.lib + +motionsim.exe: src\motionsim.hpp src\motionsim.cpp src\motionsim_kernel.cpp src\utils.cpp + dpcpp src\motionsim.cpp src\utils.cpp src\motionsim_kernel.cpp /Femotionsim.exe $(DPCPP_OPTS) + +clean: + del /q motionsim.exe + +pseudo: run_all clean all diff --git a/DirectProgramming/DPC++/StructuredGrids/particle-diffusion/sample.json b/DirectProgramming/DPC++/StructuredGrids/particle-diffusion/sample.json index 79d2c7f919..ad1dbb1479 100644 --- a/DirectProgramming/DPC++/StructuredGrids/particle-diffusion/sample.json +++ b/DirectProgramming/DPC++/StructuredGrids/particle-diffusion/sample.json @@ -20,9 +20,8 @@ }], "windows": [{ "steps": [ - "MSBuild Particle_Diffusion.sln /t:Rebuild /p:Configuration=\"Release\"", - "cd x64/Release", - "Particle_Diffusion.exe 10000 256 22 777 0 1" + "nmake clean", + "nmake" ] }] From 000c61b3282839dae5203d65b79d6f0a3d439338 Mon Sep 17 00:00:00 2001 From: Alberto Villarreal Date: Thu, 22 Oct 2020 16:56:54 -0700 Subject: [PATCH 2/4] create makefile for NMAKE Signed-off-by: Alberto Villarreal --- .../DPC++/StructuredGrids/particle-diffusion/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DirectProgramming/DPC++/StructuredGrids/particle-diffusion/README.md b/DirectProgramming/DPC++/StructuredGrids/particle-diffusion/README.md index 0e56e649c8..f236d86097 100644 --- a/DirectProgramming/DPC++/StructuredGrids/particle-diffusion/README.md +++ b/DirectProgramming/DPC++/StructuredGrids/particle-diffusion/README.md @@ -56,7 +56,7 @@ Base Toolkit Get Started Guide (https://devcloud.intel.com/oneapi/get-started/ba ## Build and run -### On a Windows\* System Using Microsoft Visual Studio 2017 or Newer +### On a Windows\* System Using NMAKE Run `nmake` to build and run the sample. `nmake clean` removes temporary files. From 85a5c55f9b9db21ae2800a8c839ee3caed0c0b88 Mon Sep 17 00:00:00 2001 From: Alberto Villarreal Date: Thu, 22 Oct 2020 17:02:58 -0700 Subject: [PATCH 3/4] create makefile for NMAKE Signed-off-by: Alberto Villarreal --- .../DPC++/StructuredGrids/particle-diffusion/README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/DirectProgramming/DPC++/StructuredGrids/particle-diffusion/README.md b/DirectProgramming/DPC++/StructuredGrids/particle-diffusion/README.md index f236d86097..2b060b9d6d 100644 --- a/DirectProgramming/DPC++/StructuredGrids/particle-diffusion/README.md +++ b/DirectProgramming/DPC++/StructuredGrids/particle-diffusion/README.md @@ -60,6 +60,11 @@ Base Toolkit Get Started Guide (https://devcloud.intel.com/oneapi/get-started/ba Run `nmake` to build and run the sample. `nmake clean` removes temporary files. +Run executable with select parameters: +#### +motionsim.exe 10000 256 22 777 0 1 +#### + ### On a Linux\* System Using CMake #### 1. Enter Particle Diffusion Directory From 45e673f2e395232be58d1aba67e0f96f4cda56ba Mon Sep 17 00:00:00 2001 From: Alberto Villarreal Date: Thu, 22 Oct 2020 17:05:29 -0700 Subject: [PATCH 4/4] create makefile for NMAKE Signed-off-by: Alberto Villarreal --- .../DPC++/StructuredGrids/particle-diffusion/README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/DirectProgramming/DPC++/StructuredGrids/particle-diffusion/README.md b/DirectProgramming/DPC++/StructuredGrids/particle-diffusion/README.md index 2b060b9d6d..3670dc9609 100644 --- a/DirectProgramming/DPC++/StructuredGrids/particle-diffusion/README.md +++ b/DirectProgramming/DPC++/StructuredGrids/particle-diffusion/README.md @@ -61,9 +61,8 @@ Base Toolkit Get Started Guide (https://devcloud.intel.com/oneapi/get-started/ba Run `nmake` to build and run the sample. `nmake clean` removes temporary files. Run executable with select parameters: -#### -motionsim.exe 10000 256 22 777 0 1 -#### + +`motionsim.exe 10000 256 22 777 0 1` ### On a Linux\* System Using CMake