Skip to content

Commit a8b6d2b

Browse files
Alberto-VillarrealAlberto Villarreal
and
Alberto Villarreal
authored
Create makefile for NMAKE to build and run on windows (oneapi-src#271)
* create makefile for NMAKE Signed-off-by: Alberto Villarreal <[email protected]> * create makefile for NMAKE Signed-off-by: Alberto Villarreal <[email protected]> * create makefile for NMAKE Signed-off-by: Alberto Villarreal <[email protected]> * create makefile for NMAKE Signed-off-by: Alberto Villarreal <[email protected]> Co-authored-by: Alberto Villarreal <[email protected]>
1 parent 1a1c0b3 commit a8b6d2b

File tree

7 files changed

+24
-250
lines changed

7 files changed

+24
-250
lines changed

DirectProgramming/DPC++/StructuredGrids/particle-diffusion/Particle_Diffusion.sln

Lines changed: 0 additions & 25 deletions
This file was deleted.

DirectProgramming/DPC++/StructuredGrids/particle-diffusion/Particle_Diffusion.vcxproj

Lines changed: 0 additions & 167 deletions
This file was deleted.

DirectProgramming/DPC++/StructuredGrids/particle-diffusion/Particle_Diffusion.vcxproj.filters

Lines changed: 0 additions & 28 deletions
This file was deleted.

DirectProgramming/DPC++/StructuredGrids/particle-diffusion/Particle_Diffusion.vcxproj.user

Lines changed: 0 additions & 15 deletions
This file was deleted.

DirectProgramming/DPC++/StructuredGrids/particle-diffusion/README.md

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -56,21 +56,13 @@ Base Toolkit Get Started Guide (https://devcloud.intel.com/oneapi/get-started/ba
5656

5757
## Build and run
5858

59-
### On a Windows\* System Using Microsoft Visual Studio 2017 or Newer
59+
### On a Windows\* System Using NMAKE
6060

61-
#### Build the motionsim Program Using Visual Studio 2017 or Visual Studio 2019
61+
Run `nmake` to build and run the sample. `nmake clean` removes temporary files.
6262

63-
##### 1. Right click on the solution file (.sln) and open it using either Visual Studio 2017 or Visual Studio 2019
64-
##### 2. From Visual Studio, right click on the project solution file in solution explorer and select rebuild
65-
##### 3. From top menu select Debug -> Start Without Debugging
63+
Run executable with select parameters:
6664

67-
#### Build the motionsim Program Using MSBuild
68-
69-
##### 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)
70-
##### 2. Build
71-
From the particle diffusion Project directory:
72-
73-
> MSBuild Particle_Diffusion.sln /t:Rebuild /p:Configuration="Release"
65+
`motionsim.exe 10000 256 22 777 0 1`
7466

7567
### On a Linux\* System Using CMake
7668

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Makefile for NMAKE
2+
3+
default: run_all
4+
5+
all: run_all
6+
7+
run_all: motionsim.exe
8+
.\motionsim
9+
10+
DPCPP_OPTS=/I"$(MKLROOT)\include" /Qmkl /DMKL_ILP64 /EHsc -fsycl-device-code-split=per_kernel -fno-sycl-early-optimizations OpenCL.lib
11+
12+
motionsim.exe: src\motionsim.hpp src\motionsim.cpp src\motionsim_kernel.cpp src\utils.cpp
13+
dpcpp src\motionsim.cpp src\utils.cpp src\motionsim_kernel.cpp /Femotionsim.exe $(DPCPP_OPTS)
14+
15+
clean:
16+
del /q motionsim.exe
17+
18+
pseudo: run_all clean all

DirectProgramming/DPC++/StructuredGrids/particle-diffusion/sample.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,8 @@
2020
}],
2121
"windows": [{
2222
"steps": [
23-
"MSBuild Particle_Diffusion.sln /t:Rebuild /p:Configuration=\"Release\"",
24-
"cd x64/Release",
25-
"Particle_Diffusion.exe 10000 256 22 777 0 1"
23+
"nmake clean",
24+
"nmake"
2625
]
2726
}]
2827

0 commit comments

Comments
 (0)