Closed prckent closed 4 years ago
I just checked the latest commit and it runs correctly on a couple of platforms with gcc so it could be something specific to the Intel compiler. Could you do a debug build and see the exact line where the error is occurring? I'll also see about getting a local machine setup with the Intel compilers so that we can test that on a regular basis.
Thanks. I'll script my compilations here for reproducibility and also try the debug builds. Please can you add the debug build instructions to https://github.com/RMGDFT/rmgdft/wiki/Building-RMG ?
I assume that there is some incompatibility on my machine.
can you try to change Misc/Pw.cpp, lines 190, 191 delete [ ] out; delete [ ] in; to fftw_free(out); fftw_free(in);
@WenchangLu Seems to work! I have run diamond8 and C60 successfully now.
@WenchangLu are you going to merge this change?
I would greatly appreciate developer comments on the recommended way to debug but @prckent If it helps anyone, I was able to get some debug working on my test Ubuntu 18.04 VM by commenting the release option and uncommenting the debug option in the CMakeLists.txt, then the normal cmake ..
from the clean build directory, then make
I ran the program with mpirun -np 1 xterm -e gdb /home/jack/rmgdft/build2/rmg-cpu
Which pops up a new gdb in xterm instance, where I could insert a break at main with something like b main
and then start with run <rmgInFile>
Apologies if this is redundant, however
Thanks @jcklasseter . From my experience with other projects, what you suggest should work and is typical. I haven't tried with rmgdft yet, but changing CMAKE_BUILD_TYPE is the standard way of doing this in cmake projects. Ideally the CMakeLists.txt would check for input options and not override them, allowing for "cmake -DCMAKE_BUILD_TYPE=Debug .." and other options. e.g. Similar to https://github.com/QMCPACK/qmcpack/blob/develop/CMakeLists.txt#L129
Latest commit should let cmake -DCMAKE_BUILD_TYPE=Debug work reliably. As for general debug techniques @jcklasseter what you suggested is what I often do. If you are trying to debug anything other than a small example or if you are trying to debug a parallelization issue it becomes cumbersome very quickly though the use of gdb command files (-x option) can streamline the process
I went ahead and merged the change.
I am getting a memory free error and crash when e.g. running the diamond8 example. Potentially this could be a compile/link configuration isssue on my end. Type mismatch?
Development version from a few days ago. Intel 2019.1 compilers, MKL, C++ library from gcc 7.3.0