diff --git a/Version0.1/Julia/Gencode/compilecode.jl b/Version0.1/Julia/Gencode/compilecode.jl index f0944361..ddf21af4 100644 --- a/Version0.1/Julia/Gencode/compilecode.jl +++ b/Version0.1/Julia/Gencode/compilecode.jl @@ -119,6 +119,8 @@ if app.platform == "cpu" run(string2cmd(compilerstr[6])); end elseif app.platform == "gpu" + run(string2cmd(compilerstr[1])); + run(string2cmd(compilerstr[2])); run(string2cmd(compilerstr[3])); run(string2cmd(compilerstr[4])); if app.mpiprocs==1 diff --git a/Version0.1/Julia/Gencode/gencodeface.jl b/Version0.1/Julia/Gencode/gencodeface.jl index 277473c8..f5667eb6 100644 --- a/Version0.1/Julia/Gencode/gencodeface.jl +++ b/Version0.1/Julia/Gencode/gencodeface.jl @@ -52,7 +52,7 @@ for k = 1:nbc else tmp = tmp * "\telse if (ib == " * string(k) * ")\n"; end - tmp = tmp * "\t\t" * gpufile * string(k) * "<<>>(f, xdg, udg, odg, wdg, uhg, nlg, tau, uinf, param, time, ng, nc, ncu, nd, ncx, nco, ncw);\n"; + tmp = tmp * "\t\tkernel" * gpufile * string(k) * "<<>>(f, xdg, udg, odg, wdg, uhg, nlg, tau, uinf, param, time, ng, nc, ncu, nd, ncx, nco, ncw);\n"; end tmp = tmp * "}\n\n"; diff --git a/Version0.1/Python/Gencode/compilecode.py b/Version0.1/Python/Gencode/compilecode.py index 6e2d46eb..fcca9838 100644 --- a/Version0.1/Python/Gencode/compilecode.py +++ b/Version0.1/Python/Gencode/compilecode.py @@ -108,6 +108,8 @@ def compilecode(app): else: os.system(compilerstr[5]); elif app['platform'] == "gpu": + os.system(compilerstr[0]); + os.system(compilerstr[1]); os.system(compilerstr[2]); os.system(compilerstr[3]); if app['mpiprocs']==1: diff --git a/Version0.1/Python/Gencode/gencodeface.py b/Version0.1/Python/Gencode/gencodeface.py index 6093933d..5c6ab787 100644 --- a/Version0.1/Python/Gencode/gencodeface.py +++ b/Version0.1/Python/Gencode/gencodeface.py @@ -46,7 +46,7 @@ def gencodeface(filename, f, xdg, udg, odg, wdg, uhg, nlg, tau, uinf, param, tim tmp = tmp + "\telse if (ib == " + str(k) + ")\n"; else: tmp = tmp + "\telse if (ib == " + str(k) + ")\n"; - tmp = tmp + "\t\t" + gpufile + str(k) + "<<>>(f, xdg, udg, odg, wdg, uhg, nlg, tau, uinf, param, time, ng, nc, ncu, nd, ncx, nco, ncw);\n"; + tmp = tmp + "\t\tkernel" + gpufile + str(k) + "<<>>(f, xdg, udg, odg, wdg, uhg, nlg, tau, uinf, param, time, ng, nc, ncu, nd, ncx, nco, ncw);\n"; tmp = tmp + "}\n\n"; tmp = tmp + "template void " + gpufile; diff --git a/Version0.2/Julia/Gencode/compilecode.jl b/Version0.2/Julia/Gencode/compilecode.jl index f0944361..ddf21af4 100644 --- a/Version0.2/Julia/Gencode/compilecode.jl +++ b/Version0.2/Julia/Gencode/compilecode.jl @@ -119,6 +119,8 @@ if app.platform == "cpu" run(string2cmd(compilerstr[6])); end elseif app.platform == "gpu" + run(string2cmd(compilerstr[1])); + run(string2cmd(compilerstr[2])); run(string2cmd(compilerstr[3])); run(string2cmd(compilerstr[4])); if app.mpiprocs==1 diff --git a/Version0.2/Julia/Gencode/gencodeface.jl b/Version0.2/Julia/Gencode/gencodeface.jl index 6bab66ae..230b9613 100644 --- a/Version0.2/Julia/Gencode/gencodeface.jl +++ b/Version0.2/Julia/Gencode/gencodeface.jl @@ -52,7 +52,7 @@ for k = 1:nbc else tmp = tmp * "\telse if (ib == " * string(k) * ")\n"; end - tmp = tmp * "\t\t" * gpufile * string(k) * "<<>>(f, xdg, udg, odg, wdg, uhg, nlg, tau, uinf, param, time, modelnumber, ng, nc, ncu, nd, ncx, nco, ncw);\n"; + tmp = tmp * "\t\tkernel" * gpufile * string(k) * "<<>>(f, xdg, udg, odg, wdg, uhg, nlg, tau, uinf, param, time, modelnumber, ng, nc, ncu, nd, ncx, nco, ncw);\n"; end tmp = tmp * "}\n\n"; diff --git a/Version0.2/Python/Gencode/compilecode.py b/Version0.2/Python/Gencode/compilecode.py index 6e2d46eb..fcca9838 100644 --- a/Version0.2/Python/Gencode/compilecode.py +++ b/Version0.2/Python/Gencode/compilecode.py @@ -108,6 +108,8 @@ def compilecode(app): else: os.system(compilerstr[5]); elif app['platform'] == "gpu": + os.system(compilerstr[0]); + os.system(compilerstr[1]); os.system(compilerstr[2]); os.system(compilerstr[3]); if app['mpiprocs']==1: diff --git a/Version0.2/Python/Gencode/gencodeface.py b/Version0.2/Python/Gencode/gencodeface.py index 02404597..1ef021d0 100644 --- a/Version0.2/Python/Gencode/gencodeface.py +++ b/Version0.2/Python/Gencode/gencodeface.py @@ -46,7 +46,7 @@ def gencodeface(filename, f, xdg, udg, odg, wdg, uhg, nlg, tau, uinf, param, tim tmp = tmp + "\telse if (ib == " + str(k) + ")\n"; else: tmp = tmp + "\telse if (ib == " + str(k) + ")\n"; - tmp = tmp + "\t\t" + gpufile + str(k) + "<<>>(f, xdg, udg, odg, wdg, uhg, nlg, tau, uinf, param, time, modelnumber, ng, nc, ncu, nd, ncx, nco, ncw);\n"; + tmp = tmp + "\t\tkernel" + gpufile + str(k) + "<<>>(f, xdg, udg, odg, wdg, uhg, nlg, tau, uinf, param, time, modelnumber, ng, nc, ncu, nd, ncx, nco, ncw);\n"; tmp = tmp + "}\n\n"; tmp = tmp + "template void " + gpufile; diff --git a/Version0.3/Julia/Gencode/compilecode.jl b/Version0.3/Julia/Gencode/compilecode.jl index f0944361..ddf21af4 100644 --- a/Version0.3/Julia/Gencode/compilecode.jl +++ b/Version0.3/Julia/Gencode/compilecode.jl @@ -119,6 +119,8 @@ if app.platform == "cpu" run(string2cmd(compilerstr[6])); end elseif app.platform == "gpu" + run(string2cmd(compilerstr[1])); + run(string2cmd(compilerstr[2])); run(string2cmd(compilerstr[3])); run(string2cmd(compilerstr[4])); if app.mpiprocs==1 diff --git a/Version0.3/Julia/Gencode/gencodeface.jl b/Version0.3/Julia/Gencode/gencodeface.jl index 6bab66ae..230b9613 100644 --- a/Version0.3/Julia/Gencode/gencodeface.jl +++ b/Version0.3/Julia/Gencode/gencodeface.jl @@ -52,7 +52,7 @@ for k = 1:nbc else tmp = tmp * "\telse if (ib == " * string(k) * ")\n"; end - tmp = tmp * "\t\t" * gpufile * string(k) * "<<>>(f, xdg, udg, odg, wdg, uhg, nlg, tau, uinf, param, time, modelnumber, ng, nc, ncu, nd, ncx, nco, ncw);\n"; + tmp = tmp * "\t\tkernel" * gpufile * string(k) * "<<>>(f, xdg, udg, odg, wdg, uhg, nlg, tau, uinf, param, time, modelnumber, ng, nc, ncu, nd, ncx, nco, ncw);\n"; end tmp = tmp * "}\n\n"; diff --git a/Version0.3/Python/Gencode/compilecode.py b/Version0.3/Python/Gencode/compilecode.py index 6e2d46eb..fcca9838 100644 --- a/Version0.3/Python/Gencode/compilecode.py +++ b/Version0.3/Python/Gencode/compilecode.py @@ -108,6 +108,8 @@ def compilecode(app): else: os.system(compilerstr[5]); elif app['platform'] == "gpu": + os.system(compilerstr[0]); + os.system(compilerstr[1]); os.system(compilerstr[2]); os.system(compilerstr[3]); if app['mpiprocs']==1: diff --git a/Version0.3/Python/Gencode/gencodeface.py b/Version0.3/Python/Gencode/gencodeface.py index 02404597..1ef021d0 100644 --- a/Version0.3/Python/Gencode/gencodeface.py +++ b/Version0.3/Python/Gencode/gencodeface.py @@ -46,7 +46,7 @@ def gencodeface(filename, f, xdg, udg, odg, wdg, uhg, nlg, tau, uinf, param, tim tmp = tmp + "\telse if (ib == " + str(k) + ")\n"; else: tmp = tmp + "\telse if (ib == " + str(k) + ")\n"; - tmp = tmp + "\t\t" + gpufile + str(k) + "<<>>(f, xdg, udg, odg, wdg, uhg, nlg, tau, uinf, param, time, modelnumber, ng, nc, ncu, nd, ncx, nco, ncw);\n"; + tmp = tmp + "\t\tkernel" + gpufile + str(k) + "<<>>(f, xdg, udg, odg, wdg, uhg, nlg, tau, uinf, param, time, modelnumber, ng, nc, ncu, nd, ncx, nco, ncw);\n"; tmp = tmp + "}\n\n"; tmp = tmp + "template void " + gpufile;