Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GMPM crashes for me, even before trying to load objects. #2

Open
Kulitorum opened this issue Jul 4, 2020 · 8 comments
Open

GMPM crashes for me, even before trying to load objects. #2

Kulitorum opened this issue Jul 4, 2020 · 8 comments
Assignees

Comments

@Kulitorum
Copy link

No description provided.

@Kulitorum
Copy link
Author

template <std::size_t I> void initParticles() {
auto &cuDev = Cuda::ref_cuda_context(I);
cuDev.setContext();
tmps[I].alloc(config::g_max_active_block);
for (int copyid = 0; copyid < 2; copyid++) {
gridBlocks[copyid].emplace_back(device_allocator{});
particleBins[copyid].emplace_back(
ParticleBuffer<get_material_type(I)>{device_allocator{}});
partitions[copyid].emplace_back(device_allocator{},
config::g_max_active_block);
}
particles[I] = spawn<particle_array_, orphan_signature>(device_allocator{});
checkedCnts[I][0] = 0;
checkedCnts[I][1] = 0;
curNumActiveBlocks[I] = config::g_max_active_block;
curNumActiveBins[I] = config::g_max_particle_bin;
/// tail-recursion optimization
if constexpr (I + 1 < config::g_device_cnt)
initParticles<I + 1>();<<<<<<<<<< Crash here, even with g_device_cnt=1
}

@Kulitorum
Copy link
Author

Also - can you share the data files for the benchmark?

@littlemine
Copy link
Collaborator

The data file "twodragons.bin" used for performance comparison is in my public Data repo (https://github.com/littlemine/Data/tree/master/MpmParticles). Please put this Data directory in the root of claymore.

It seems like the crash is caused by loading a model file that can't be found, you could try this option (

) instead to see if the issue still exists, and feel free to decrease the LEN variable if the memory budget is limited.

@Kulitorum
Copy link
Author

Kulitorum commented Jul 4, 2020

Hmm, I have 32GIG mem, I doubt that's the problem
I'm trying to run it on a single GTX2060 super card.

The crash occurs in gmpm.cu line 86 : "auto benchmark = std::make_unique<mgsp_benchmark>();"
before the "init_models()" have even been called.

Furthermore, init_models is called with "init_models(models, 3);" so running case 3, which is generated data, and not loaded data.

Running it with "init_models(models, 1);" it seems to load the data correct (models[0] and models[1] gets filled with floats between 0 and 1) but it still crashes (see image) so I don't understand what could be the problem.

That being said, I have not done any programming for years, so maybe it's just be being stupid. I just really want this to work, so I can (maybe) simulate concrete 3D printing. I'm Head of R&D at http://www.COBOD.com

Screenshot: https://imgur.com/4oh7oD5

Thank you for any help.

@littlemine
Copy link
Collaborator

Just did a simple test on my PC, indeed encountered an issue within GMPM project.
The good news is the MGSP project functions as expected, and it works basically the same as GMPM when g_device_cnt is set to 1. Could you please check this one as well?
This problem is probably caused by unintentional modifications when I setup the GMPM project from MGSP, where I simplified some implementations. I'll look into this matter soon.

@littlemine littlemine added the bug Something isn't working label Jul 5, 2020
@littlemine littlemine self-assigned this Jul 5, 2020
@Kulitorum
Copy link
Author

mgsp still crashes with g_device_cnt=1 for me.
Also, it seems that changes to the settings.h file is not causing a rebuild, so I have to Rebuild All after changing it, but it still crashes in mgsp_benchmark.cuh, line 77:

fmt::print("{} -vs- {}\n",
           match(particleBins[0][0])([&](auto &pb) { return pb.size; }),
           match(particleBins[0][1])([&](auto &pb) { return pb.size; }));

Thank you.

@littlemine
Copy link
Collaborator

I've updated the GMPM project, please let me know if there are still issues.

@littlemine littlemine removed the bug Something isn't working label Aug 11, 2020
@Kulitorum
Copy link
Author

What version of CUDA is this supposed to work with?

Just tried again, with a RTX 3090 card and CUDA 11.1:
...
archivertest.vcxproj -> F:\claymore-master\Build\bin\Debug\archivertest.exe
fmt.vcxproj -> F:\claymore-master\Build_deps\fmt-build\Debug\fmtd.lib
mncuda.vcxproj -> F:\claymore-master\Build\Library\MnSystem\Debug\mncuda.lib
partio.vcxproj -> F:\claymore-master\Build\Externals\partio\Debug\partio.lib
mnio.vcxproj -> F:\claymore-master\Build\Library\MnSystem\Debug\mnio.lib
spdlog.vcxproj -> F:\claymore-master\Build_deps\spdlog-build\Debug\spdlogd.lib
Compiling CUDA source file ......\Projects\GMPM\gmpm.cu...

F:\claymore-master\Build\Projects\GMPM>"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.1\bin\nvcc.exe" -gencode=arch=compute_50,code="sm_50,compute_50" -gencode=arch=compute_50,code="sm_50,compute_50" -gencode=arch=comput
e_52,code="sm_52,compute_52" -gencode=arch=compute_60,code="sm_60,compute_60" -gencode=arch=compute_61,code="sm_61,compute_61" -gencode=arch=compute_70,code="sm_70,compute_70" -gencode=arch=compute_75,code="sm_75,compute_75
" -gencode=arch=compute_75,code="compute_75,compute_75" --use-local-env -ccbin "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.27.29110\bin\HostX64\x64" -x cu -rdc=true -I"F:\claymore-master\Exte
rnals\variant" -I"F:\claymore-master\Externals\optional" -I"F:\claymore-master\Externals\function_ref" -I"F:\claymore-master\Library" -I"F:\claymore-master\Externals\partio" -I"F:\claymore-master\Build_deps\cxxopts-src\include" -I"F
:\claymore-master\Build_deps\spdlog-src\include" -I"F:\claymore-master\Build_deps\fmt-src\include" -I"F:\claymore-master\Build_deps\rapidjson-src\include" -I"F:\claymore-master\Build_deps\range-v3-src\include" -I"F:\claymore-mast
er\Build_deps\filesystem-src\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.1\include" --keep-dir x64\Debug -maxrregcount=0 --machine 64 --compile -cudart static --expt-extended-lambda --expt-relaxed-constex
pr --default-stream=per-thread -lineinfo --ptxas-options=-allow-expensive-optimizations=true -std=c++14 -Xcompiler="/EHsc -Zi -Ob0" -g -use_fast_math -D_WINDOWS -D"_WINDOWS -Xcompiler=" /GR /EHsc"" -DCMAKE_GENERATOR_PLATFORM=x64 -
D"AssetDirPath="F:/claymore-master/Data/"" -DSPDLOG_COMPILED_LIB -DFMT_LOCALE -D"CMAKE_INTDIR="Debug"" -DWIN32 -D_WINDOWS -DCMAKE_GENERATOR_PLATFORM=x64 -D"AssetDirPath="F:/claymore-master/Data/"" -DSPDLOG_COMPILED_LIB -DFMT_LO
CALE -D"CMAKE_INTDIR="Debug"" -D_MBCS -Xcompiler "/EHsc /W1 /nologo /Od /Fdgmpm.dir\Debug\vc142.pdb /FS /Zi /RTC1 /MDd /GR" -o gmpm.dir\Debug\gmpm.obj "F:\claymore-master\Projects\GMPM\gmpm.cu"
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.27.29110\include\experimental/filesystem(30): fatal error C1189: #error: The <experimental/filesystem> header providing std::experimental::filesystem is
deprecated by Microsoft and will be REMOVED. It is superseded by the C++17 header providing std::filesystem. You can define _SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING to acknowledge that you have received this w
arning. [F:\claymore-master\Build\Projects\GMPM\gmpm.vcxproj]
CUDACOMPILE : nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning). [F:\cla
ymore-master\Build\Projects\GMPM\gmpm.vcxproj]
gmpm.cu
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Microsoft\VC\v160\BuildCustomizations\CUDA 11.1.targets(785,9): error MSB3721: The command ""C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.1\bin\nvcc.exe
" -gencode=arch=compute_50,code="sm_50,compute_50" -gencode=arch=compute_50,code="sm_50,compute_50" -gencode=arch=compute_52,code="sm_52,compute_52" -gencode=arch=compute_60,code="sm_60,compute_60" -gencode=arch=compute_61,code
="sm_61,compute_61" -gencode=arch=compute_70,code="sm_70,compute_70" -gencode=arch=compute_75,code="sm_75,compute_75" -gencode=arch=compute_75,code="compute_75,compute_75" --use-local-env -ccbin "C:\Program Files (x86)\Microsof
t Visual Studio\2019\Professional\VC\Tools\MSVC\14.27.29110\bin\HostX64\x64" -x cu -rdc=true -I"F:\claymore-master\Externals\variant" -I"F:\claymore-master\Externals\optional" -I"F:\claymore-master\Externals\function_ref" -I"F:\claymo
re-master\Library" -I"F:\claymore-master\Externals\partio" -I"F:\claymore-master\Build_deps\cxxopts-src\include" -I"F:\claymore-master\Build_deps\spdlog-src\include" -I"F:\claymore-master\Build_deps\fmt-src\include" -I"F:\claymore-m
aster\Build_deps\rapidjson-src\include" -I"F:\claymore-master\Build_deps\range-v3-src\include" -I"F:\claymore-master\Build_deps\filesystem-src\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.1\include" --keep-
dir x64\Debug -maxrregcount=0 --machine 64 --compile -cudart static --expt-extended-lambda --expt-relaxed-constexpr --default-stream=per-thread -lineinfo --ptxas-options=-allow-expensive-optimizations=true -std=c++14 -Xcompiler="/EHsc
-Zi -Ob0" -g -use_fast_math -D_WINDOWS -D"_WINDOWS -Xcompiler=" /GR /EHsc"" -DCMAKE_GENERATOR_PLATFORM=x64 -D"AssetDirPath="F:/claymore-master/Data/"" -DSPDLOG_COMPILED_LIB -DFMT_LOCALE -D"CMAKE_INTDIR="Debug"" -DWIN32 -D_WINDO
WS -DCMAKE_GENERATOR_PLATFORM=x64 -D"AssetDirPath="F:/claymore-master/Data/"" -DSPDLOG_COMPILED_LIB -DFMT_LOCALE -D"CMAKE_INTDIR="Debug"" -D_MBCS -Xcompiler "/EHsc /W1 /nologo /Od /Fdgmpm.dir\Debug\vc142.pdb /FS /Zi /RTC1 /MDd /GR"
-o gmpm.dir\Debug\gmpm.obj "F:\claymore-master\Projects\GMPM\gmpm.cu"" exited with code 2. [F:\claymore-master\Build\Projects\GMPM\gmpm.vcxproj]
Compiling CUDA source file ......\Projects\MGSP\mgsp.cu...

F:\claymore-master\Build\Projects\MGSP>"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.1\bin\nvcc.exe" -gencode=arch=compute_50,code="sm_50,compute_50" -gencode=arch=compute_50,code="sm_50,compute_50" -gencode=arch=comput
e_52,code="sm_52,compute_52" -gencode=arch=compute_60,code="sm_60,compute_60" -gencode=arch=compute_61,code="sm_61,compute_61" -gencode=arch=compute_70,code="sm_70,compute_70" -gencode=arch=compute_75,code="sm_75,compute_75
" -gencode=arch=compute_75,code="compute_75,compute_75" --use-local-env -ccbin "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.27.29110\bin\HostX64\x64" -x cu -rdc=true -I"F:\claymore-master\Exte
rnals\variant" -I"F:\claymore-master\Externals\optional" -I"F:\claymore-master\Externals\function_ref" -I"F:\claymore-master\Library" -I"F:\claymore-master\Externals\partio" -I"F:\claymore-master\Build_deps\fmt-src\include" -I"C:\Pr
ogram Files\NVIDIA GPU Computing Toolkit\CUDA\v11.1\include" --keep-dir x64\Debug -maxrregcount=0 --machine 64 --compile -cudart static --expt-extended-lambda --expt-relaxed-constexpr --default-stream=per-thread -lineinfo --ptxa
s-options=-allow-expensive-optimizations=true -std=c++14 -Xcompiler="/EHsc -Zi -Ob0" -g -use_fast_math -D_WINDOWS -D"_WINDOWS -Xcompiler=" /GR /EHsc"" -DCMAKE_GENERATOR_PLATFORM=x64 -D"AssetDirPath="F:/claymore-master/Data/"" -D
FMT_LOCALE -D"CMAKE_INTDIR="Debug"" -DWIN32 -D_WINDOWS -DCMAKE_GENERATOR_PLATFORM=x64 -D"AssetDirPath="F:/claymore-master/Data/"" -DFMT_LOCALE -D"CMAKE_INTDIR="Debug"" -D_MBCS -Xcompiler "/EHsc /W1 /nologo /Od /Fdmgsp.dir\Debug
\vc142.pdb /FS /Zi /RTC1 /MDd /GR" -o mgsp.dir\Debug\mgsp.obj "F:\claymore-master\Projects\MGSP\mgsp.cu"
F:\claymore-master\Projects\MGSP\settings.h(65): error : expected a "(" [F:\claymore-master\Build\Projects\MGSP\mgsp.vcxproj]

F:\claymore-master\Projects\MGSP\mgsp_benchmark.cuh(66): error : expected a "(" [F:\claymore-master\Build\Projects\MGSP\mgsp.vcxproj]
detected during instantiation of "void mn::mgsp_benchmark::initParticles() [with I=0ULL]"
(76): here

F:\claymore-master\Projects\MGSP\mgsp_benchmark.cuh(66): error : expected a "(" [F:\claymore-master\Build\Projects\MGSP\mgsp.vcxproj]
detected during:
instantiation of "void mn::mgsp_benchmark::initParticles() [with I=1ULL]"
(67): here
instantiation of "void mn::mgsp_benchmark::initParticles() [with I=0ULL]"
(76): here

F:\claymore-master\Projects\MGSP\mgsp_benchmark.cuh(66): error : expected a "(" [F:\claymore-master\Build\Projects\MGSP\mgsp.vcxproj]
detected during:
instantiation of "void mn::mgsp_benchmark::initParticles() [with I=2ULL]"
(67): here
instantiation of "void mn::mgsp_benchmark::initParticles() [with I=1ULL]"
(67): here
instantiation of "void mn::mgsp_benchmark::initParticles() [with I=0ULL]"
(76): here

F:\claymore-master\Projects\MGSP\mgsp_benchmark.cuh(66): error : expected a "(" [F:\claymore-master\Build\Projects\MGSP\mgsp.vcxproj]
detected during:
instantiation of "void mn::mgsp_benchmark::initParticles() [with I=3ULL]"
(67): here
instantiation of "void mn::mgsp_benchmark::initParticles() [with I=2ULL]"
(67): here
instantiation of "void mn::mgsp_benchmark::initParticles() [with I=1ULL]"
(67): here
instantiation of "void mn::mgsp_benchmark::initParticles() [with I=0ULL]"
(76): here

F:\claymore-master\Projects\MGSP\mgsp_benchmark.cuh(66): error : expected a "(" [F:\claymore-master\Build\Projects\MGSP\mgsp.vcxproj]
detected during:
instantiation of "void mn::mgsp_benchmark::initParticles() [with I=4ULL]"
(67): here
instantiation of "void mn::mgsp_benchmark::initParticles() [with I=3ULL]"
(67): here
instantiation of "void mn::mgsp_benchmark::initParticles() [with I=2ULL]"
(67): here
instantiation of "void mn::mgsp_benchmark::initParticles() [with I=1ULL]"
(67): here
instantiation of "void mn::mgsp_benchmark::initParticles() [with I=0ULL]"
(76): here

F:\claymore-master\Projects\MGSP\mgsp_benchmark.cuh(66): error : expected a "(" [F:\claymore-master\Build\Projects\MGSP\mgsp.vcxproj]
detected during:
instantiation of "void mn::mgsp_benchmark::initParticles() [with I=5ULL]"
(67): here
instantiation of "void mn::mgsp_benchmark::initParticles() [with I=4ULL]"
(67): here
instantiation of "void mn::mgsp_benchmark::initParticles() [with I=3ULL]"
(67): here
instantiation of "void mn::mgsp_benchmark::initParticles() [with I=2ULL]"
(67): here
instantiation of "void mn::mgsp_benchmark::initParticles() [with I=1ULL]"
(67): here
instantiation of "void mn::mgsp_benchmark::initParticles() [with I=0ULL]"
(76): here

F:\claymore-master\Projects\MGSP\mgsp_benchmark.cuh(66): error : expected a "(" [F:\claymore-master\Build\Projects\MGSP\mgsp.vcxproj]
detected during:
instantiation of "void mn::mgsp_benchmark::initParticles() [with I=6ULL]"
(67): here
instantiation of "void mn::mgsp_benchmark::initParticles() [with I=5ULL]"
(67): here
instantiation of "void mn::mgsp_benchmark::initParticles() [with I=4ULL]"
(67): here
instantiation of "void mn::mgsp_benchmark::initParticles() [with I=3ULL]"
(67): here
instantiation of "void mn::mgsp_benchmark::initParticles() [with I=2ULL]"
(67): here
instantiation of "void mn::mgsp_benchmark::initParticles() [with I=1ULL]"
(67): here
instantiation of "void mn::mgsp_benchmark::initParticles() [with I=0ULL]"
(76): here

F:\claymore-master\Projects\MGSP\mgsp_benchmark.cuh(66): error : expected a "(" [F:\claymore-master\Build\Projects\MGSP\mgsp.vcxproj]
detected during:
instantiation of "void mn::mgsp_benchmark::initParticles() [with I=7ULL]"
(67): here
instantiation of "void mn::mgsp_benchmark::initParticles() [with I=6ULL]"
(67): here
instantiation of "void mn::mgsp_benchmark::initParticles() [with I=5ULL]"
(67): here
instantiation of "void mn::mgsp_benchmark::initParticles() [with I=4ULL]"
(67): here
instantiation of "void mn::mgsp_benchmark::initParticles() [with I=3ULL]"
(67): here
instantiation of "void mn::mgsp_benchmark::initParticles() [with I=2ULL]"
(67): here
instantiation of "void mn::mgsp_benchmark::initParticles() [with I=1ULL]"
(67): here
instantiation of "void mn::mgsp_benchmark::initParticles() [with I=0ULL]"
(76): here

F:\claymore-master\Projects\MGSP\mgsp_benchmark.cuh(66): error : expected a "(" [F:\claymore-master\Build\Projects\MGSP\mgsp.vcxproj]
detected during:
instantiation of "void mn::mgsp_benchmark::initParticles() [with I=8ULL]"
(67): here
instantiation of "void mn::mgsp_benchmark::initParticles() [with I=7ULL]"
(67): here
instantiation of "void mn::mgsp_benchmark::initParticles() [with I=6ULL]"
(67): here
instantiation of "void mn::mgsp_benchmark::initParticles() [with I=5ULL]"
(67): here
instantiation of "void mn::mgsp_benchmark::initParticles() [with I=4ULL]"
(67): here
instantiation of "void mn::mgsp_benchmark::initParticles() [with I=3ULL]"
(67): here
instantiation of "void mn::mgsp_benchmark::initParticles() [with I=2ULL]"
(67): here
instantiation of "void mn::mgsp_benchmark::initParticles() [with I=1ULL]"
(67): here
instantiation of "void mn::mgsp_benchmark::initParticles() [with I=0ULL]"
(76): here

F:\claymore-master\Projects\MGSP\mgsp_benchmark.cuh(66): error : expected a "(" [F:\claymore-master\Build\Projects\MGSP\mgsp.vcxproj]
detected during:
instantiation of "void mn::mgsp_benchmark::initParticles() [with I=9ULL]"
(67): here
instantiation of "void mn::mgsp_benchmark::initParticles() [with I=8ULL]"
(67): here
instantiation of "void mn::mgsp_benchmark::initParticles() [with I=7ULL]"
(67): here
instantiation of "void mn::mgsp_benchmark::initParticles() [with I=6ULL]"
(67): here
instantiation of "void mn::mgsp_benchmark::initParticles() [with I=5ULL]"
(67): here
instantiation of "void mn::mgsp_benchmark::initParticles() [with I=4ULL]"
(67): here
instantiation of "void mn::mgsp_benchmark::initParticles() [with I=3ULL]"
(67): here
instantiation of "void mn::mgsp_benchmark::initParticles() [with I=2ULL]"
(67): here
instantiation of "void mn::mgsp_benchmark::initParticles() [with I=1ULL]"
(67): here
instantiation of "void mn::mgsp_benchmark::initParticles() [with I=0ULL]"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants