Exasim
Exasim copied to clipboard
Julia and Python apps fail GPU compilation
There are a few issues compiling GPU code with Julia or Python apps.
- Compilation will fail with 4 errors of the form
gpuFbou.cu(32): error: identifier "gpuFbou1" is undefined
In the generated file gpuUbou.cu
in the app folder, the function is called kernelgpuFbou1, not gpuFbou1. These functions are generated in Gencode/gencodeface files. They are generated correctly in the matlab version, but not in Julia or Python for versions 0.1-0.3
- After that, an error appears that
opuApp.a
does not exist. This is due to missing lines incompilecode.jl
andcompilecode.py
. Line 110-113 in the Julia code is
elseif app.platform == "gpu"
run(string2cmd(compilerstr[3]));
run(string2cmd(compilerstr[4]));
if app.mpiprocs==1
run(string2cmd(compilerstr[7]));
else
run(string2cmd(compilerstr[8]));
end
end
while the same code block in matlab is
elseif app.platform == "gpu"
eval(char("!" + compilerstr{1}));
eval(char("!" + compilerstr{2}));
eval(char("!" + compilerstr{3}));
eval(char("!" + compilerstr{4}));
if app.mpiprocs==1
eval(char("!" + compilerstr{7}));
else
eval(char("!" + compilerstr{8}));
end
end
The Julia code also needs to run compilestr(1)
and compilestr(2)
. Same holds for Python